ðŸ–Ĩïļcontrol

The following functions can be used for all gui types.

Functions

set_tooltip

local item = gui.combobox('lua>elements a>test', 'lua>elements a', 'Test combobox', false, 'Value 1', 'Value 2')
item:set_tooltip("This is a combobox")

tooltip

string

tooltip text

set_visible

local item = gui.checkbox('lua>elements a>test', 'lua>elements a', 'Test checkbox')
iteam:set_visible(false)

value

boolean

new visibility

add_callback

local item = gui.slider('lua>elements a>test', 'lua>elements a', 'Test slider', 0, 10)
iteam:add_callback(function()
    print(item:get())
end)

callback

function()

callback function

get_name

local item = gui.textbox('lua>elements a>test', 'lua>elements a')
print(iteam:get_name()) -- prints 'textbox'

Returns:

name

string

get_type

local item = gui.color_picker('lua>elements a>test', 'lua>elements a', 'Test color picker', render.color('#fff'))
print(iteam:get_type()) -- prints 'color_picker'

Returns:

type

string

Last updated