Fields
This class has no fields.
Functions
Toggle
This function has no parameters.
IsOpened
This function has no parameters.
Return value
Name |
Type |
Description |
value |
bool |
|
local is_opened = Menu.IsOpened()
Checkbox
Name |
Type |
Description |
label |
string |
Checkbox name |
def_value |
bool |
Default value |
callback |
function |
Change callback |
Return value
Name |
Type |
Description |
value |
UIMenuItem* |
Checkbox pointer |
local checkbox = Menu.Checkbox("my first checkbox", false)
checkbox:Set(true)
print(checkbox:Get())
CheckboxColorEdit
Name |
Type |
Description |
label |
string |
Checkbox name |
def_value |
bool |
Default value |
def_color |
Color |
Default color |
callback |
function |
Change callback |
Return value
Name |
Type |
Description |
value |
UIMenuItem* |
Checkbox pointer |
local checkbox = Menu.CheckboxColorEdit("my first checkbox", false, Color.new(1.0, 1.0, 1.0, 1.0))
checkbox:Set(true)
checkbox:SetColor(Color.new(0.0, 0.0, 0.0, 1.0))
local value = checkbox:Get()
local color = checkbox:GetColor()
ColorEdit
Name |
Type |
Description |
label |
string |
Item name |
def_color |
Color |
Default color |
callback |
function |
Change callback |
Return value
Menu.ColorEdit("my first color edit", Color.new(1.0, 1.0, 1.0, 1.0), function(value)
print(value)
end)
GroupBox
Name |
Type |
Description |
title |
string |
Group name |
Menu.Group("my first group")
SliderInt
Name |
Type |
Description |
label |
string |
Slider name |
def_value |
int |
Default value |
min |
int |
Minimal value |
max |
int |
Maximal value |
callback |
function |
Change callback |
Return value
local slider = Menu.SliderInt("my first slider", 100, 0, 255, function(value)
print(value)
end)
SliderFloat
Name |
Type |
Description |
label |
string |
Slider name |
def_value |
float |
Default value |
min |
float |
Minimal value |
max |
float |
Maximal value |
callback |
function |
Change callback |
Return value
local slider = Menu.SliderFloat("my first slider", 100.0, 0.0, 255.0, function(value)
print(value)
end)
Combo
Name |
Type |
Description |
label |
string |
Combo name |
items |
table |
Array of items |
def_value |
int |
Default value |
callback |
function |
Change callback |
Return value
local elements = {
'item 1',
'item 2',
'item 3',
}
local combo = Menu.Combo("my first combo", elements, 1, function(value)
print(value)
end)
Text
Name |
Type |
Description |
text |
string |
Display text |
InputText
Name |
Type |
Description |
label |
string |
Input name |
def_value |
string |
Default value |
size |
int |
Max length |
callback |
function |
Change callback |
Return value
local input = Menu.InputText("my first input", "MemeSense", 64, function(text)
print(text)
end)
Name |
Type |
Description |
label |
string |
Button title |
callback |
function |
Change callback |
Menu.Button("my first button", function()
print("clicked!")
end)
Hotkey
Hotkey will work only on server
Name |
Type |
Description |
label |
string |
Hotkey title |
type |
e_bind_types |
Hotkey type |
callback |
function |
Hotkey callback; only for simple type |
Return value
Name |
Type |
Description |
bind |
Bind* |
Bind pointer |
Menu.Hotkey("My hotkey", e_bind_types.simple, function()
print("key pressed!")
end)
DestroyItem
local checkbox = Menu.Checkbox('my first element', false)
local button = Menu.Button('my second element', function()
Menu.DestroyItem(checkbox)
end)