submenu
Button Callbacks
| Type | Script Root | Player Root |
|---|---|---|
on_click | function(): void | function(index: int): void |
Toggle Callbacks
| Type | Script Root | Player Root |
|---|---|---|
on_click | function(state: bool): void | function(index: int, state: bool): void |
Slider Int Callbacks
| Type | Script Root | Player Root |
|---|---|---|
on_click | function(value: int): void | function(index: int, value: int): void |
on_change | function(value: int): void | function(index: int, value: int): void |
on_click --[[w/ Toggle]] | function(value: int, state: bool): void | function(index: int, value: int, state: bool): void |
on_change --[[w/ Toggle]] | function(value: int, state: bool): void | function(index: int, value: int, state: bool): void |
Slider Float Callbacks
| Type | Script Root | Player Root |
|---|---|---|
on_click | function(value: float): void | function(index: int, value: float): void |
on_change | function(value: float): void | function(index: int, value: float): void |
on_click --[[w/ Toggle]] | function(value: float, state: bool): void | function(index: int, value: float, state: bool): void |
on_change --[[w/ Toggle]] | function(value: float, state: bool): void | function(index: int, value: float, state: bool): void |
Submenu Callbacks
| Type | Script Root | Player Root |
|---|---|---|
on_enter | function(): void | function(index: int): void |
on_exit | function(): void | function(index: int): void |
Text Input Callbacks
| Type | Script Root | Player Root |
|---|---|---|
on_submit | function(text: string): void | function(index: int, text: string): void |
List Callbacks
| Type | Script Root | Player Root |
|---|---|---|
on_click | function(item: string): void | function(index: int, item: string): void |
on_change | function(item: string): void | function(index: int, item: string): void |
on_click --[[w/ Toggle]] | function(item: string, state: bool): void | function(index: int, item: string, state: bool): void |
on_change --[[w/ Toggle]] | function(item: string, state: bool): void | function(index: int, item: string, state: bool): void |
Methods
is_valid
Returns true if the submenu reference is still valid
is_focused
Returns true if the submenu is focused
get_label
Returns the label of the submenu
set_label
Sets the label of the submenu
add_separator
Creates and adds a separator option to the submenu and returns a reference to the option created
add_button
Creates and adds a button option to the submenu and returns a reference to the option created
add_toggle
Creates and adds a toggle option to the submenu and returns a reference to the option created
add_slider_int
Creates and adds a slider option to the submenu and returns a reference to the option created
add_slider_float
Creates and adds a slider option to the submenu and returns a reference to the option created
add_submenu
Creates and adds a submenu option to the submenu and returns a reference to the submenu and option created
add_text_input
Creates and adds a text input option to the submenu and returns a reference to the option created
add_list
Creates and adds a list option to the submenu and returns a reference to the option created
add_colour
Creates and adds a colour option to the submenu and returns a reference to the option created