Puppeteer/gui/GuiUtil.lua
OldManAlpha 08436a8df5 Add Bindings UI; Divide out parts of the addon
There's still a lot of polish that needs to be done
2025-08-02 10:53:28 -07:00

20 lines
603 B
Lua

PTGuiUtil = {}
PTUtil.SetEnvironment(PTGuiUtil)
local _G = getfenv(0)
local compost = AceLibrary("Compost-2.0")
local util = PTUtil
local colorize = util.Colorize
function CreateColorUpdater(checkboxGetter, colorSelectGetter, colorGetter)
return function(self)
local color = colorGetter(self)
if color then
checkboxGetter(self):SetChecked(true)
colorSelectGetter(self):Show()
colorSelectGetter(self):SetColor(color)
else
checkboxGetter(self):SetChecked(false)
colorSelectGetter(self):Hide()
end
end
end