WoWInterface SVN PhanxConfigWidgets

Compare Revisions

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

Rev 28 → Rev 58

PhanxConfig-Dropdown.lua
48,7 → 48,11
end
 
local i = 0
function lib.CreateDropdown(parent, name, init)
function lib.CreateDropdown(parent, name, init, desc)
assert( type(parent) == "table" and parent.GetFrameType, "PhanxConfig-Button: Parent is not a valid frame!" )
if type(name) ~= "string" then name = nil end
if type(desc) ~= "string" then desc = nil end
 
i = i + 1
 
local frame = CreateFrame("Frame", nil, parent)
59,6 → 63,8
frame:SetScript("OnLeave", OnLeave)
frame:SetScript("OnHide", OnHide)
 
frame.desc = desc
 
local dropdown = CreateFrame("Frame", "PhanxConfigDropdown" .. i, frame)
dropdown:SetPoint("TOPLEFT", frame, -16, -14)
dropdown:SetPoint("TOPRIGHT", frame, 16, -14)
119,7 → 125,7
frame.GetValue = GetValue
frame.SetValue = SetValue
 
if init then
if type(init) == "function" then
UIDropDownMenu_Initialize(dropdown, init)
end