Files
Puppeteer/gui/GuiUtil.lua
T
2026-10-30 16:27:05 +00:00

20 lines
584 B
Lua

PTGuiUtil = {}
PTUtil.SetEnvironment(PTGuiUtil)
local _G = getfenv(0)
local compost = PTPool
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