WoWInterface SVN NoTaint_UIDropDownMenu_Update

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 5 to Rev 6
    Reverse comparison

Rev 5 → Rev 6

trunk/UIDropDownMenu.lua
283,8 → 283,13
level = 1;
end
 
local index;
local listFrame = _G["Lib_DropDownList"..level];
local index = listFrame and (listFrame.numButtons + 1) or 1;
if (listFrame and listFrame.numButtons) then
index = listFrame.numButtons + 1;
else
index = 1;
end
local width;
 
Lib_UIDropDownMenuDelegate:SetAttribute("createframes-level", level);
540,8 → 545,15
colorSwatch:Hide();
end
 
width = max(Lib_UIDropDownMenu_GetButtonWidth(button), info.minWidth or 0);
if (info.minWidth) then
width = max(Lib_UIDropDownMenu_GetButtonWidth(button), info.minWidth);
else
width = 0;
end
--Set maximum button width
if (not listFrame.maxWidth) then
listFrame.maxWidth = 0;
end
if ( width > listFrame.maxWidth ) then
listFrame.maxWidth = width;
end
1178,11 → 1190,11
end
 
function Lib_UIDropDownMenu_SetButtonNotClickable(level, id)
_G["DropDownList"..level.."Button"..id]:SetDisabledFontObject(GameFontHighlightSmallLeft);
_G["Lib_DropDownList"..level.."Button"..id]:SetDisabledFontObject(GameFontHighlightSmallLeft);
end
 
function Lib_UIDropDownMenu_SetButtonClickable(level, id)
_G["DropDownList"..level.."Button"..id]:SetDisabledFontObject(GameFontDisableSmallLeft);
_G["Lib_DropDownList"..level.."Button"..id]:SetDisabledFontObject(GameFontDisableSmallLeft);
end
 
function Lib_UIDropDownMenu_DisableDropDown(dropDown)
1211,9 → 1223,9
 
function Lib_UIDropDownMenu_GetValue(id)
--Only works if the dropdown has just been initialized, lame, I know =(
local button = _G["DropDownList1Button"..id];
local button = _G["Lib_DropDownList1Button"..id];
if ( button ) then
return _G["DropDownList1Button"..id].value;
return _G["Lib_DropDownList1Button"..id].value;
else
return nil;
end