Closed flamendless closed 3 years ago
The 2nd commit of this PR changes:
local t = Slab.ColorPicker(...)
if t.Button == "OK" then ... end
to
local t = Slab.ColorPicker(...)
if t.Button == 1 then --okay
elseif t.Button == -1 then --cancel
end
As ColorPicker's buttons (according to the wiki API) are not customizable. So returning a boolean integer would suffice to check if the OK is pressed or not.
This is useful for those who don't want to pass any 4th value (alpha) to the
Color
parameter.I've encountered something weird: in testing outside of my project (using Slab's own main.lua):
But in my project, the same thing is done:
This PR fixes those.