πŸ’»gui

available examples: gui interaction

functions:

gui.menu_bool(name: string): menu_element

Name
Type
Description

name

string

The needed element.

Returns an item from the menu that has been assigned the boolean data type.

gui.menu_int(name: string): menu_element

Name
Type
Description

name

string

The needed element.

Returns an item from the menu that has been assigned the integer data type.

gui.menu_float(name: string): menu_element

Name
Type
Description

name

string

The needed element.

Returns an item from the menu that has been assigned the float data type.

gui.menu_color(name: string): menu_element

Name
Type
Description

name

string

The needed element.

Returns an item from the menu that has been assigned the color data type.

get_binds

gui.get_binds([ show_from_scripts: bool ]): array

Name
Type
Description

active

boolean

Bind state

name

string

Bind name

mode

string

Bind mode

get_bind_mode

gui.get_bind_mode(name: string): number

Name
Type
Description

name

string

The needed element.

Returns the mode of the bind.

get_bind_state

gui.get_bind_state(name: string): boolean

Name
Type
Description

name

string

The needed element.

Returns the state of the bind.

set_bind_state

gui.set_bind_state(name: string, state: boolean)

Name
Type
Description

name

string

The needed element.

state

boolean

The state to which the bind will be set.

Sets the value of the bind.

begin

gui.begin(groups: {, ...}): gui_group maximum: 4

Name
Type
Description

groups

string

Table with groups.

Creates a group with gui elements.

πŸ”— gui_group

:new_checkbox

group:new_checkbox(name: string): menu_element

Name
Type
Description

name

string

Element name.

:new_input

group:new_input(name: string): menu_element

Name
Type
Description

name

string

Element name.

:new_bind

group:new_bind(name: string): menu_element

Name
Type
Description

name

string

Element name.

:new_combo

group:new_combo(name: string, items: {, ...}): menu_element

Name
Type
Description

name

string

Element name.

items

string

Combo items.

:new_multi_combo

group:new_multi_combo(name: string, items: {, ...}): menu_element

Name
Type
Description

name

string

Element name.

items

string

Multi combo items.

:new_slider_int

group:new_slider_int(name: string, min: number, max: number): menu_element

Name
Type
Description

name

string

Element name.

min

number

Minimum allowed value.

min

number

Maximum allowed value.

:new_slider_float

group:new_slider_float(name: string, min: number, max: number): menu_element

Name
Type
Description

name

string

Element name.

min

number

Minimum allowed value.

min

number

Maximum allowed value.

:new_button

group:new_button(name: string): menu_element

Name
Type
Description

name

string

Element name.

:new_color

group:new_color(name: string): menu_element

Name
Type
Description

name

string

Element name.

:new_label

group:new_label(name: string): menu_element

Name
Type
Description

name

string

Element name.

:new_list

group:new_list(name: string, items: {, ...}): menu_element

Name
Type
Description

name

string

Element name.

items

string

List items.

:get

element:get(): any

Returns the value of the menu element.

:get_type

element:get_type(): string

Returns the type of the menu element.

:get_name

element:get_name(): string

Returns the name of the menu element.

:get_items

element:get_items(): table

Returns the list of items. new_combo / new_list / new_multi_combo menu element objects only.

:get_mode

element:get_mode(): number

Returns the current keybind mode. new_bind menu element objects only.

:set

element:set(value: any)

Name
Type
Description

value

any

The value to which the menu element will be set.

Sets the value of the menu element.

:set_items

element:set_items(items: {, ...})

Name
Type
Description

items

string

Table with string values.

Sets a table with items. new_combo / new_list / new_multi_combo menu element objects only.

:set_tooltip

element:set_tooltip(text: string)

Name
Type
Description

value

string

Tooltip text.

Sets the tooltip of the gui element.

:set_visible

element:set_visible(state: boolean)

Name
Type
Description

state

boolean

Visibility state.

Sets the gui element visibility.

:set_callback

element:set_callback(callback: function)

Name
Type
Description

callback

function

Function that will be called when the gui element is interacted with.

Sets the callback to the specified gui element.

:set_group

element:set_group(group: string)

Name
Type
Description

group

string

Group name.

Sets the group to the specified gui element.

Last updated