Skip to content

keybox

Methods

get_value: number

Returns keybox value

1
2
if (input_handler.is_key_pressed(kb:get_value())) then
end

set_value(v)

Type Name Description Default
number v Value to set none

Sets keybox value

1
kb:set_value(2) -- 2 = right mouse button

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!')