ui table
Functions
add_check_box(label, var_name, def_value): check_box_t
Type |
Name |
Description |
string |
label |
Checkbox label |
string |
var_name |
Variable key |
bool |
def_value |
Default value |
Creates checkbox in menu
| local my_checkbox = ui.add_check_box("lua checkbox", "lua_boolean", false)
|
get_check_box(var_name): check_box_t
Type |
Name |
Description |
string |
var_name |
Variable key |
Returns checkbox object from menu
| local my_checkbox = ui.get_check_box("legit_enable")
|
add_slider_int(label, var_name, min, max, def_value): slider_int_t
Type |
Name |
Description |
string |
label |
Slider label |
string |
var_name |
Variable key |
number |
min |
Min value |
number |
max |
Max value |
number |
def_value |
Default value |
Creates int slider in menu
| local my_slider_int = ui.add_slider_int("lua int slider", "lua_integer", 0, 100, 50)
|
get_slider_int(var_name): slider_int_t
Type |
Name |
Description |
string |
var_name |
Variable key |
Returns slider int object from menu
| local visuals_other_nightmode = ui.get_slider_int("visuals_other_nightmode")
|
add_combo_box(label, var_name, items, def_value): combo_box_t
Type |
Name |
Description |
string |
label |
Combobox label |
string |
var_name |
Variable key |
string array |
items |
Combo items |
number |
def_value |
Default value |
Creates combo box in menu
| local my_combo = ui.add_combo_box("lua combo", "lua_integer", { "item1", "item2", "item3" }, 0)
|
get_combo_box(var_name): combo_box_t
Type |
Name |
Description |
string |
var_name |
Variable key |
Returns combo box object from menu
| local rage_active_exploit = ui.get_combo_box("rage_active_exploit")
|
add_multi_combo_box(label, var_name, items, def_values): multi_combo_box_t
Type |
Name |
Description |
string |
label |
Multicombobox label |
string |
var_name |
Variable key |
string array |
items |
Items |
bool array |
def_values |
Default values |
Creates combo box in menu
| local my_multi_combo = ui.add_multi_combo_box("multi combo", "lua_multi_combo", { "item1", "item2", "item3" }, { false, false, false })
|
Type |
Name |
Description |
string |
var_name |
Variable key |
Returns multi combo box object from menu
| local visuals_other_removals = ui.get_multi_combo_box("visuals_other_removals")
|
add_text_input(label, var_name, def_value): text_input_t
Type |
Name |
Description |
string |
label |
Slider label |
string |
var_name |
Variable key |
string |
def_value |
Default value |
Creates text input in menu
| local text_input = ui.add_text_input("some text", "lua_text", "default")
|
add_slider_float(label, var_name, min, max, def_value): slider_float_t
Type |
Name |
Description |
string |
label |
Slider label |
string |
var_name |
Variable key |
number |
min |
Min value |
number |
max |
Max value |
number |
def_value |
Default value |
Creates float slider in menu
| local slider = ui.add_slider_float("lua float slider", "lua_float", 0.0, 1.0, 0.3)
|
Type |
Name |
Description |
string |
var_name |
Variable key |
Returns slider float object from menu
| local slider = local skins_aspect_ratio = ui.get_slider_float("skins_aspect_ratio")
|
add_key_bind(label, var_name, def_key, def_mode): key_bind_t
Type |
Name |
Description |
string |
label |
Keybind label |
string |
var_name |
Variable key |
number |
def_key |
Default key |
number |
def_mode |
Default mode |
Creates key bind in menu
| local my_keybind = ui.add_key_bind("lua key bind", "lua_keybind", 0, 0)
|
get_key_bind(var_name): key_bind_t
Type |
Name |
Description |
string |
var_name |
Variable key |
Returns keybind object from menu
| local rage_enable_bind = ui.get_key_bind("rage_enable_bind")
|
add_color_edit(label, var_name, show_alpha, def_color): color_edit_t
Type |
Name |
Description |
string |
label |
Coloredit label |
string |
var_name |
Variable key |
bool |
show_alpha |
Enables the alpha modifer |
color_t |
def_color |
Default color |
Creates color edit in menu
| local my_coloredit = ui.add_color_edit("lua coloredit", "lua_color", true, color_t.new(255, 255, 255, 255))
|
get_color_edit(var_name): color_edit_t
Type |
Name |
Description |
string |
var_name |
Variable key |
Returns color edit object from menu
| local misc_ui_color = ui.get_color_edit("misc_ui_color")
|
is_visible(): bool
Returns true if menu opened
| local is_menu_opened = ui.is_visible()
|
set_visible(value)
Type |
Name |
Description |
bool |
value |
Set menu visible or not |
Setting menu visibility
| -- close menu
ui.set_visible(false)
|
Returns menu coordinates
| local menu_rect = ui.get_menu_rect()
renderer.rect_filled(vec2_t.new(menu_rect.z + 10, menu_rect.y), vec2_t.new(menu_rect.z + 50, menu_rect.w), color_t.new(255, 255, 255, 255))
|