πŸ–₯️Gui

gui namespace

If you need to get a container ID or an existing control ID, enable

LUA>GENERAL>Debug mode

and hover on a groupbox or any element.

You can stack most control in line with other controls. To do that, pass the ID of a control that already exists into the container_id argument of the function.

Enums

Hotkey modes
  • hotkey_toggle

  • hotkey_hold

Dialog buttons
  • dialog_buttons_ok_cancel

  • dialog_buttons_yes_no

  • dialog_buttons_yes_no_cancel

Dialog result
  • dialog_result_affirmative

  • dialog_result_negative

Controls

checkbox

id

string

new id

container_id

string

container id

label

string

label

Returns:

get_checkbox

Returns:

slider

id

string

new id

❌

container_id

string

container id

❌

label

string

label

❌

min

number

minimum slider value

❌

max

number

maximum slider value

❌

format

string

format string

'%.0f'

step

number

step value

1.0

Returns:

get_slider

Returns:

combobox

id

string

new id

container_id

string

container id

label

string

label

is_multi

boolean

true if combobox should enable multiselect

values

string...

items

Returns:

get_combobox

Returns:

list

id

string

new id

❌

container_id

string

container id

❌

label

string

label

❌

is_mult

boolean

true if list should enable multiselect

❌

height

number

element height

120

Returns:

button

id

string

new id

container_id

string

container id

label

string

label

Returns:

label

id

string

new id

container_id

string

container id

label

string

label

Returns:

textbox

id

string

new id

container_id

string

container id

Returns:

colorpicker

id

string

new id

❌

container_id

string

container id

❌

label

string

label

❌

default

default color

❌

allow_alpha

boolean

true if alpha modification is allowed

true

Returns:

get_colorpicker

Returns:

Misc

is_menu_open

Returns:

menu's visibility state

boolean

get_menu_rect

Returns:

x1

number

y1

number

x2

number

y2

number

show_message

id

string

messagebox id

title

string

title

message

string

message

show_dialog

id

string

dialog id

title

string

title

message

string

message

button

dialog box buttons

callback

function(Enum)

result callback

add_notification

title

string

title

message

string

message

for_each_hotkey

fn

function(string, number, number, bool)

callback function

Callback parameters:

name

string

item name

key

number

active key (keycode)

mode

hotkey mode

is_active

boolean

true if currently active

Last updated