-
-
Notifications
You must be signed in to change notification settings - Fork 8
ColorPicker
João Cardoso edited this page Dec 5, 2019
·
8 revisions
ColorPicker is a color selection button which inherits from the TextedClickable class.
💡 Image not up to date with the current design
Name | Description |
---|---|
SetColor (color), SetValue (color) | Sets the current value using a color mixin object. |
GetColor, GetValue | Returns the current value as a color mixin object. |
HasAlpha | Returns whether alpha is enabled. |
Name | Description |
---|---|
OnColor (color), OnInput (color) | Fired when a new color or alpha is selected by the user. |
OnUpdate | Fired after the color selection dialog is closed. |
local picker = LibStub('Sushi-3.1').ColorPicker()
picker:SetLabel('Lipstick Color')
picker:SetValue(CreateColor(1,0,0))
picker:SetCall('OnColor', function(picker, color)
if color.r > .8 then
print("Too much red.")
elseif color.g < .4 then
print("Just a little greener, please?")
else
print("That is a beautiful color!")
end
end)
This is the Sushi-3.1 wiki. Wiki Home