WoWInterface SVN PhanxConfigWidgets

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/PhanxConfig-Dropdown
    from Rev 108 to Rev 123
    Reverse comparison

Rev 108 → Rev 123

PhanxConfig-Dropdown.lua
48,6 → 48,18
CloseDropDownMenus()
end
 
local function Disable(self)
self.labelText:SetFontObject(GameFontDisable)
self.valueText:SetFontObject(GameFontDisableSmall)
self.button:Disable()
end
 
local function Enable(self)
self.labelText:SetFontObject(GameFontNormal)
self.valueText:SetFontObject(GameFontHighlightSmall)
self.button:Enable()
end
 
local function GetValue(self)
return UIDropDownMenu_GetSelectedValue(self.dropdown) or self.valueText:GetText()
end
58,8 → 70,8
end
 
local i = 0
function lib.CreateDropdown(parent, name, desc, init)
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-Button: Parent is not a valid frame!" )
function lib:New(parent, name, desc, init)
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-Dropdown: Parent is not a valid frame!" )
if type(name) ~= "string" then name = nil end
if type(desc) ~= "string" then desc = nil end
 
138,6 → 150,8
button:SetHighlightTexture("Interface\\Buttons\\UI-Common-MouseHilight")
button:GetHighlightTexture():SetBlendMode("ADD")
 
frame.Enable = Enable
frame.Disable = Disable
frame.GetValue = GetValue
frame.SetValue = SetValue
 
146,4 → 160,6
end
 
return frame
end
\ No newline at end of file +end + +function lib.CreateDropdown( ... ) return lib:New( ...) end \ No newline at end of file