Module CorsixTH.CorsixTH.Lua.dialogs.resizables.main_menu
Class for main menu window.
Functions
| UIMainMenu:addMenuItem (label, callback, tooltip, y_pos) | Adds a single menu item to the main menu. |
Functions
- UIMainMenu:addMenuItem (label, callback, tooltip, y_pos)
-
Adds a single menu item to the main menu.
Parameters:
- 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.
Returns:
-
(integer) Y-position below which more items can be added.
This function has added a menu item between y_pos and the return value.