menu#
get_size#
Returns size of menu as a vec2_t
Example
get_pos#
Returns screen position of the menu as a vec2_t
Example
is_open#
Returns if the menu is open
Example
find#
Returns a control object or an array depending on the elements
can return any of the menu controls
Note: When getting the value of an element inside any of these types of controls make sure to suffix it with "#" and the tab name
| Fields | Description |
|---|---|
tabstring |
tab name |
sub_tabstring |
sub tab name |
group_namestring |
group tab name |
element_namestring |
element name |
Example
local find_lock_layout = menu.find("misc","main","config","lock menu layout")
find_lock_layout:set(true)
-- when referencing a control that has sub-controls (like a colorpicker or keybinds) it will return an indexed table instead
local accent_color = menu.find("misc", "main", "config", "accent color")
-- accent_color[1] is the text
-- accent_color[2] is the color picker
-- or, alternatively...
local accent_color_text, accent_color_color = unpack(menu.find("misc", "main", "config", "accent color"))
--
local glow_enabled,glow_color = unpack(menu.find("visuals", "esp", "models","glow#enemy"))
set_group_column#
places the target group in a column
| Fields | Description |
|---|---|
groupstring |
group which will be moved to the target column |
columnint |
Example
set_group_visibility#
toggles visiblity for a group
| Fields | Description |
|---|---|
groupstring |
group which will be made visible or not |
visiblebool |
Example
Warning
Controls should only be created OUTSIDE of callbacks to avoid infinite controls being spawned
add_text#
Creates a text control and returns it
| Fields | Description |
|---|---|
groupstring |
group in which the control will be placed (will be created if it doesnt already exist) |
textstring |
text |
Example
add_checkbox#
Creates a checkbox control and returns it
| Fields | Description |
|---|---|
groupstring |
group in which the control will be placed (will be created if it doesnt already exist) |
namestring |
checkbox name |
checkbox_statebool |
[optional] default value |
Example
add_selection#
Creates a selection control and returns it
void add_selection(<string> group, <string> name, <table> items, [optional] <int> visible_items = 6)
| Fields | Description |
|---|---|
groupstring |
group name |
namestring |
selection name |
itemsbool |
array of items |
visible_itemsbool |
[optional] items to show before showing a scrollbar |
Example
add_slider#
Creates a slider control and returns it
slider_t add_slider(<string> group, <string> name, <float> min, <float> max, [optional] <float> step = 1.0, [optional] <int> precision = 0, [optional] <string> suffix )
| Fields | Description |
|---|---|
groupstring |
group name |
namestring |
name |
minfloat |
minimum slider value |
maxfloat |
maximum slider value |
stepfloat |
[optional] |
precisionint |
[optional] |
suffixstring |
[optional] |
Example
add_button#
Creates a button control and returns it
| Fields | Description |
|---|---|
groupstring |
group name |
namestring |
button name |
callbackfunction |
function executed on click |
Example
add_separator#
Creates a separator control and returns it
| Fields | Description |
|---|---|
groupstring |
group name |
Example
add_list#
Creates a list control and returns it
| Fields | Description |
|---|---|
groupstring |
group name |
namestring |
list name |
itemstable |
array of items |
visible_itemstable |
[optional] items to show |
Example
add_text_input#
Creates a text input control and returns it
| Fields | Description |
|---|---|
groupstring |
group name |
namestring |
text input name |
Example
add_multi_selection#
Creates a multi selection control and returns it
multi_selection_t add_multi_selection(<string> group, <string> name, <table> items, [optional] <int> visible_items = 6)
| Fields | Description |
|---|---|
groupstring |
group name |
namestring |
control name |
itemsstring |
array of items |
visible_itemsstring |
[optional] |