Skip to content

gui

Info

Values of created controls will be saved to your config automatically as soon as you click "Save" button.

How to get existing menu elements?

Open your config file and lookup for control you want to get. The parent entry will be cfg_tab, and the entry - cfg_name. Example: RAGE -> Anti aim -> Align desync in config is antiaim -> align_fake, so cfg_tab will be antiaim and cfg_name will be align_fake

Inline controls

You can add multiple controls to a single line by using \n as a name. If an element has the \n name, next element will be appended to the same row. First element without \n will finish the row. Elements are added from left (first element) to right (last element). Name of the row will be taken from the last element.

Methods

new_draggable(x, y, col, w, h): draggable

Type Name Description Default
number x Initial X none
number y Initial Y none
color col Background color none
number w Forced width. If not present, will auto-resize empty
number h Forced height. If not present, will auto-resize empty

Note

If you set width, you also must set height.

Creates draggable object

1
local drg = gui.new_draggable(50, 50, color.new(50, 50, 50, 150), false)

new_drawable(): drawable

Creates drawable object

1
local drw = gui.new_drawable()

new_checkbox(title, cfg_name, default): checkbox

Type Name Description Default
string title Control title none
string cfg_name Entry in config file none
bool default Default value none

Creates checkbox in menu

1
local my_cb = gui.new_checkbox('Enable', 'mylua_enable', false)

new_colorpicker(title, cfg_name, default): colorpicker

Type Name Description Default
string title Control title none
string cfg_name Entry in config file none
color default Default value none

Creates colorpicker in menu

1
local my_cp = gui.new_colorpicker('Super color', 'mylua_col', color.new(255, 255, 255))

new_combobox(title, cfg_name, ms, ...): combobox

Type Name Description Default
string title Control title none
string cfg_name Entry in config file none
bool ms Multiselect mode none
string... ... Elements none

Creates combobox in menu

1
local my_cb = gui.new_combobox('Type', 'mylua_type', false, 'Variant A', 'Variant B', 'Some other variant')

new_keybox(title, cfg_name): keybox

Type Name Description Default
string title Control title none
string cfg_name Entry in config file none

Creates keybox in menu

1
local my_kb = gui.new_keybox('Key', 'mylua_key')

new_slider(title, cfg_name, default, min, max, step): slider

Type Name Description Default
string title Control title none
string cfg_name Entry in config file none
number default Default value none
number min Minimal value none
number max Maximal value none
number step Step none

Creates slider in menu


new_textbox(title, cfg_name): textbox

Type Name Description Default
string title Control title none
string cfg_name Entry in config file none

Creates textbox in menu


1
local my_sl = gui.new_slider('How much', 'mylua_howmuch', 0, 0, 100, 1)

get_checkbox(cfg_tab, cfg_name): checkbox

Type Name Description Default
string cfg_tab Tab name from config none
string cfg_name Name of control from config none

Finds specific control in a tab with given name

1
local bhop = gui.get_checkbox('misc', 'bhop')

get_colorpicker(cfg_tab, cfg_name): colorpicker

Type Name Description Default
string cfg_tab Tab name from config none
string cfg_name Name of control from config none

Finds specific control in a tab with given name

1
local menu_color = gui.get_colorpicker('misc', 'menu_color')

get_combobox(cfg_tab, cfg_name): combobox

Type Name Description Default
string cfg_tab Tab name from config none
string cfg_name Name of control from config none

Finds specific control in a tab with given name

1
local ff = gui.get_combobox('misc', 'autostrafe')

get_keybox(cfg_tab, cfg_name): keybox

Type Name Description Default
string cfg_tab Tab name from config none
string cfg_name Name of control from config none

Finds specific control in a tab with given name

1
local aim_key = gui.get_keybox('lua', 'input_toggle_key')

get_slider(cfg_tab, cfg_name): slider

Type Name Description Default
string cfg_tab Tab name from config none
string cfg_name Name of control from config none

Finds specific control in a tab with given name

1
local oof = gui.get_slider('player_esp', 'offscreen_radius')

is_menu_open(): bool

Returns true if menu is currently open

1
2
if gui.is_menu_open() then
end

set_weapon_group(tab, id)

Type Name Description Default
string tab Tab to change group in (rage/legit) none
number id Group ID to set none

Changes active weapon group in rage or legit tab.

1
gui.set_weapon_group('rage', 0)