Skip to content

colorpicker

Represents menu colorpicker

Methods

get_value: color

Returns colorpicker value

1
local col = cp:get_value()

set_value(v)

Type Name Description Default
color v Value to set none

Sets colorpicker value

1
cp:set_value(color.new(239, 9, 95))

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