WoWInterface SVN PhanxConfigWidgets

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 164 to Rev 165
    Reverse comparison

Rev 164 → Rev 165

trunk/PhanxConfig-ScrollingDropdown/PhanxConfig-ScrollingDropdown.lua
164,8 → 164,10
for i = 1, #items do
local item = items[i]
if type(item) == "table" then
--print(i, "table", item.text or item.value)
self.text:SetText(item.text or item.value)
else
--print(i, "string", item)
self.text:SetText(item)
end
width = max(width, self.text:GetStringWidth())
181,19 → 183,19
for i = 1, listSize do
local index = i + offset
local button = self.buttons[i]
 
local item = items[index]
if item then
if type(item) == "table" then
--print(i, "table", item.value, "|", item.text or item.value, "|", item.selected or item.value == selected)
button.value = item.value
button:SetText(item.text or item.value)
button.check:SetShown(item.selected or item.value == selected)
else
--print(i, "string", item, "|", item == selected)
button.value = item
button:SetText(item)
button.check:SetShown(item == selected)
end
 
button:SetWidth(width)
button:Show()
else
209,6 → 211,7
end
 
for i = listSize + 1, #buttons do
--print(i, "Hide")
buttons[i]:Hide()
end
end