Constructor


MainMenuOptions(menu: any)

Arguments:

menu: any




Methods








MainMenuOptions:onEnter(old_state: any)

Arguments:

old_state: any






MainMenuOptions:onKeyPressed(key: any, is_repeat: any)

Arguments:

key: any
is_repeat: any


MainMenuOptions:onKeyPressedBorder(key: any, is_repeat: any)

Arguments:

key: any
is_repeat: any


MainMenuOptions:onKeyPressedFPS(key: any, is_repeat: any)

Arguments:

key: any
is_repeat: any


MainMenuOptions:onKeyPressedMenu(key: any, is_repeat: any)

Arguments:

key: any
is_repeat: any


MainMenuOptions:onKeyPressedVolume(key: any, is_repeat: any)

Arguments:

key: any
is_repeat: any


MainMenuOptions:onKeyPressedWindowScale(key: any, is_repeat: any)

Arguments:

key: any
is_repeat: any




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 registerOptionsPage first.

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 registerOptionsPage first.

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.



MainMenuOptions:setState(state: any, : unknown)

Arguments:

state: any
: unknown







Fields
















Undocumented