WoWInterface SVN KnowItAll

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/libs/LibBars-1.0
    from Rev 35 to Rev 42
    Reverse comparison

Rev 35 → Rev 42

LibBars-1.0.lua
1,5 → 1,5
local MAJOR = "LibBars-1.0"
local MINOR = 90000 + tonumber(("$Revision: 12 $"):match("%d+"))
local MINOR = 90000 + tonumber(("$Revision: 13 $"):match("%d+"))
 
local lib, oldminor = LibStub:NewLibrary(MAJOR, MINOR)
if not lib then return end -- No Upgrade needed.
837,6 → 837,7
for i = ct + 1, #values do
values[i] = nil
end
 
table_sort(values, self.sortFunc or sortFunc)
 
local orientation = self.orientation
1475,9 → 1476,12
return self.orientation % 2 == 0
end
 
function barPrototype:SetValue(val)
function barPrototype:SetValue(val, maxValue)
assert(val ~= nil, "Value cannot be nil!")
self.value = val
if maxValue ~= nil then
self.maxValue = maxValue
end
if not self.maxValue or val > self.maxValue then
self.maxValue = val
end
1519,8 → 1523,7
end
 
function barPrototype:SetMaxValue(val)
self.maxValue = val
self:SetValue(self.value)
self:SetValue(self.value, val)
end
 
function barPrototype:RegisterTimeLeftTrigger(time, func)