WoWInterface SVN PhanxConfigWidgets

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/PhanxConfig-Checkbox
    from Rev 71 to Rev 72
    Reverse comparison

Rev 71 → Rev 72

PhanxConfig-Checkbox.lua
33,6 → 33,20
end
end
 
local function OnDisable(self)
if self.disabled then return end
local r, g, b = self.label:GetTextColor()
self.label:SetTextColor(r/2, g/2, b/2)
self.disabled = true
end
 
local function OnEnable(self)
if not self.disabled then return end
local r, g, b = self.label:GetTextColor()
self.label:SetTextColor(r*2, g*2, b*2)
self.disabled = nil
end
 
function lib.CreateCheckbox(parent, text, desc)
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-Checkbox: Parent is not a valid frame!" )
if type(name) ~= "string" then name = nil end
48,6 → 62,9
check:SetDisabledCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check-Disabled")
check:SetCheckedTexture("Interface\\Buttons\\UI-CheckBox-Check")
 
check:SetScript("OnDisable", OnDisable)
check:SetScript("OnEnable", OnEnable)
 
check:SetScript("OnEnter", OnEnter)
check:SetScript("OnLeave", OnLeave)
check:SetScript("OnClick", OnClick)