CorsixTH Lua Documentation

UIMenuList Class

A menu list with a scrollbar. Used by load_game, save_game and custom_game.

Declared on: line 21 of Lua/dialogs/resizables/menu_list_dialog.lua.
Inheritance: UIMenuList » UIResizable » Window
Subclasses: UICustomGame, UIMakeDebugPatient

Method Index

Member Index

(*) only used in superclass methods
function UIMenuList:UIMenuList(ui, mode, title, items, num_rows, extra_above_list)

Constructs the menu list dialog.

Parameters:

NameTypeDescription
ui UI The active ui.
mode string Either "menu" or "game" depending on which mode the game is in right now.
title string The desired title of the dialog.
items table A list of items to include in the list. Each listing should be a table with keys "name" and "tooltip" with the corresponding values.
num_rows integer The number of rows displayed at a given time. Default is 10.
extra_above_list integer How much space, if any, the dialog will need above the list.

Declared on: line 36 of Lua/dialogs/resizables/menu_list_dialog.lua.

function UIMenuList:buttonClicked(num)

Function stub for dialogs to override. This function is called each time a button is clicked.

Parameters:

NameTypeDescription
num integer Number of the button pressed.

Declared on: line 102 of Lua/dialogs/resizables/menu_list_dialog.lua.

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