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.
@param page — The page (or pages) the option should be added to. Must be registered with registerOptionsPage first.
@param name — The name of the option, displayed in the options list.
@param config — The config option to toggle.
@param callback — Additional callback for when the option is toggled.
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.
@param page — The page (or pages) the option should be added to. Must be registered with registerOptionsPage first.
@param name — The name of the option, displayed in the options list.
@param value — A function which is called to get the value displayed for the option.
@param callback — A function called when the user selects this option.
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.
@param id — The id of the page, referred to when adding options.
@param name — The name of the page, displayed in 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. |