Example available!
βοΈUI Interactionui.add_checkbox(name: string): MenuItem
Creates and returns a menu item object, or throws an error on failure.
ui.add_combobox(name: string, items: {, ...}): MenuItem
Creates and returns a menu item object, or throws an error on failure.
ui.add_sliderint(name: string, min: number, max: number): MenuItem
Creates and returns a menu item object, or throws an error on failure.
add_sliderfloat
ui.add_sliderfloat(name: string, min: number, max: number): MenuItem
Creates and returns a menu item object, or throws an error on failure.
ui.add_button(name: string): MenuItem
Creates and returns a menu item object, or throws an error on failure.
add_colorpicker
ui.add_colorpicker(name: string): MenuItem
Creates and returns a menu item object, or throws an error on failure.
ui.add_label(name: string): MenuItem
Creates and returns a menu item object, or throws an error on failure.
ui.add_hotkey(name: string): MenuItem
Creates and returns a menu item object, or throws an error on failure.
ui.add_input(name: string): MenuItem
Creates and returns a menu item object, or throws an error on failure.
get_keybind_state
ui.get_keybind_state(name: string)
Returns true, if keybind is active.
get_keybind_mode
ui.get_keybind_mode(name: string)
Returns the keybind mode.
set_keybind_state
ui.set_keybind_state(name: string, var: boolean)
Sets the keybind boolean value.
<element>:get(): any
Returns the value of the menu item.
<element>:set(value: any)
The value to which the menu item will be set
Sets the value of the menu item.
<element>:set_visible(state: boolean)
Shows or hides the menu item depending on the value of state.
<element>:set_callback(callback: function)
Function that will be called when the menu item is interacted with
Sets the callback to the specified menu item.
<element>:set_group(group: number)
1 - Left group
2 - Right group
Sets the group to the specified menu item.
Combobox additive functions:
<element>:set_items(items: {, ...})
Sets a table with items. ui.add_combobox menu item objects only.
<element>:get_items(): table
Returns the table of items. ui.add_combobox menu item objects only.
Hotkey additive functions:
<element>:get_mode(): number
Returns the current keybind mode. ui.add_hotkey menu item objects only.
Find menu items:
ui.find_menu_int(item_name: string): MenuItem
ui.find_menu_float(item_name: string): MenuItem
ui.find_menu_bool(item_name: string): MenuItem
ui.find_menu_color(item_name: string): MenuItem
Returns the MenuItem object that corresponds to the specified name.