Methods
MainMenuOptions:registerConfigOption(page: string|string[], name: string, config: string, callback: fun( boolean)?)
(Called internally) Convenience method to add a menu option based on a config option which is toggled on and off.
Arguments:
page: string|string[] | The page (or pages) the option should be added to. Must be registered with |
name: string | The name of the option, displayed in the options list. |
config: string | The config option to toggle. |
callback: fun( boolean)? | Additional callback for when the option is toggled. |
MainMenuOptions:registerOption(page: string|string[], name: string, value: (fun( number, y)any)?, callback: fun())
Adds an option to the menu's options list.
Arguments:
page: string|string[] | The page (or pages) the option should be added to. Must be registered with |
name: string | The name of the option, displayed in the options list. |
value: (fun( number, y)any)? | A function which is called to get the value displayed for the option. |
callback: fun() | A function called when the user selects this option. |
MainMenuOptions:registerOptionsPage(id: string, name: string)
Adds a page to the options menu.
Arguments:
id: string | The id of the page, referred to when adding options. |
name: string | The name of the page, displayed in the options menu. |