WoWInterface SVN PhanxConfigWidgets

Compare Revisions

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

Rev 187 → Rev 188

PhanxConfig-Dropdown.lua
3,12 → 3,11
Simple scrolling dropdown widget generator.
Based on tekKonfig-Dropdown by Tekkub and OmniCC_Options by Tuller.
Requires LibStub.
https://github.com/phanx/PhanxConfigWidgets
Copyright (c) 2009-2014 Phanx. All rights reserved.
See the accompanying README and LICENSE files for more information.
https://github.com/phanx/PhanxConfigWidgets
----------------------------------------------------------------------]]
 
local MINOR_VERSION = tonumber(strmatch("$Revision$", "%d+"))
local MINOR_VERSION = 182
 
local lib, oldminor = LibStub:NewLibrary("PhanxConfig-Dropdown", MINOR_VERSION)
if not lib then return end
314,20 → 313,6
end
function methods:SetValue(value, text)
self.selected = value
if not text and self.items and type(self.items[1]) == "table" then
local found
for i = 1, #self.items do
local item = self.items[i]
if type(item) == "table" and item.value == value then
text = item.text
found = true
break
end
end
if not found then
text = CUSTOM
end
end
self.valueText:SetText(text or value)
end
 
369,13 → 354,6
self.valueText:SetFontObject(GameFontDisableSmall)
self.button:Disable()
end
function methods:SetEnabled(enable)
if enable then
self:Enable()
else
self:Disable()
end
end
 
------------------------------------------------------------------------