mirror of
https://github.com/OldManAlpha/Puppeteer.git
synced 2025-11-28 23:48:35 +00:00
20 lines
603 B
Lua
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 |