Skip to content

slider

Represents menu slider

Methods

get_value: number

Returns slider value

1
local num = s:get_value()

set_value(v)

Type Name Description Default
number v Value to set none

Sets slider value

1
s:set_value(123)

set_callback(fn)

Type Name Description Default
function() fn Callback none

Sets callback to current control that's being called on value change

1
2
3
my_element:set_callback(function()
    print('Changed!')
end)

set_tooltip(txt)

Type Name Description Default
string txt Text to set none

Sets tooltip text. Works only for script-created elements!

1
my_element:set_tooltip('This is big function!')