CorsixTH Lua Documentation

UIMainMenu Class

Class for main menu window.

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

Method Index

Member Index

(*) only used in superclass methods
function UIMainMenu:UIMainMenu(ui)

Parameters:

NameTypeDescription
ui ? ?

Declared on: line 42 of Lua/dialogs/resizables/main_menu.lua.

function UIMainMenu:addMenuItem(label, callback, tooltip, y_pos)

Adds a single menu item to the main menu.

Parameters:

NameTypeDescription
label string The (localized) label to use for the new button.
callback function Function to call when the user clicks the button.
tooltip string Text to show when the player hovers over the button.
y_pos integer Y-position from where to add the menu item.

Declared on: line 97 of Lua/dialogs/resizables/main_menu.lua.

function UIMainMenu:draw(canvas, x, y)

Parameters:

NameTypeDescription
canvas ? ?
x ? ?
y ? ?

Overrides: UIResizable:draw.
Declared on: line 115 of Lua/dialogs/resizables/main_menu.lua.

function UIMainMenu:onMouseMove(x, y, dx, dy)

Parameters:

NameTypeDescription
x ? ?
y ? ?
dx ? ?
dy ? ?

Overrides: Window:onMouseMove.
Declared on: line 139 of Lua/dialogs/resizables/main_menu.lua.