CorsixTH Lua Documentation

UIDropdown Class

Dropdown "window" used for selection of one item from a list.

Declared on: line 21 of Lua/dialogs/resizables/dropdown.lua.
Inheritance: UIDropdown » UIResizable » Window

Method Index

Member Index

(*) only used in superclass methods
function UIDropdown:UIDropdown(ui, parent_window, parent_button, items, callback, colour)

Constructor for the dropdown "window"

Parameters:

NameTypeDescription
ui UI The ui the window is created in
parent_window Window The window that this dropdown will be attached to
parent_button Button The button in the parent_window that this dropdown will be positioned under
items table A list of items for the list to display, where each item is a table with at least the field text, and optionally fields font and/or tooltip
callback function A function to be called when an item is selected. It is called with two parameters: The parent window and the index of the selected item
colour table A colour in the form of {red = ..., green = ..., blue = ...}. Optional if parent_window is a UIResizable

Declared on: line 24 of Lua/dialogs/resizables/dropdown.lua.

function UIDropdown:beginDrag(x, y)

Parameters:

NameTypeDescription
x ? ?
y ? ?

Overrides: Window:beginDrag.
Declared on: line 77 of Lua/dialogs/resizables/dropdown.lua.

function UIDropdown:selectItem(number)

Parameters:

NameTypeDescription
number ? ?

Declared on: line 69 of Lua/dialogs/resizables/dropdown.lua.

Page generated on Sat Feb 07, 2015 at 18:38:28 by LDocGen.