gui
Functions for creating a menu.
gui create(name, force_open) -> menu
name
string
Window title
force_open
bool
Still open when menu is not drawing
gui remove(name) -> menu
Removes the specific windows title.
menu set_pos(X, Y) -> void
Sets the position of the menu, Can be set constantly.
menu set_size(X, Y) -> void
Sets the size of the menu, Can be set constantly.
menu add_button(name, callback) -> button_struct
Adds the button to the specific menu. Callback will be called when its been pressed.
menu add_textbox(name) -> textbox_struct
Adds a textbox to the menu for user input.
menu add_slider(name, min, max, initial_value) -> slider_struct
name
string
The display label of the slider.
min
float
The minimum value of the slider.
max
float
The maximum value of the slider.
initial_value
float
The initial value of the slider, What it starts from.
menu add_combo(name, options, initial_index) -> combo_struct
name
string
The display label of the combo box.
options
table
A list of string options.
initial_index
int
The index of the initially selected option (0-based).
menu add_multicombo(name, options, initial_selected) -> combo_struct
name
string
The display label of the combo box.
options
table
A list of string options.
initial_selected
table
The index of the initially selected option (0-based).
menu add_checkbox(name, initial_value) -> checkbox_struct
name
string
The display label of the check box.
initial_value
bool
The initial value of the checkbox (true or false).
menu add_label(text) -> label_struct
text
string
The text display.
menu add_keybind(id, keycode) -> label_struct
id
string
The id.
label_struct set_label(label) -> void
Sets a new label.
struct get_state() -> bool
Returns the current state from the structure, This can only be used on keybind_struct.
menu add_color(name, color) -> color_struct
Self explanatory.
struct change_callback(callback) -> void
This can used for every struct except button_struct.
struct get_value() -> value_type
Returns the value from the structure. This cannot be used on textbox_struct, color_struct, button_struct.
checkbox_struct bool
slider_struct float
combo_struct int
struct get_text() -> string
Returns the current string from the structure, This can only be used on combo_struct, textbox_struct.
struct get_color() -> color
Returns the current color from the structure, This can be only used on color_struct.
Example
Result

Last updated