/trunk/libs/LibBars-1.0
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. |
for i = ct + 1, #values do |
values[i] = nil |
end |
table_sort(values, self.sortFunc or sortFunc) |
local orientation = self.orientation |
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 |
end |
function barPrototype:SetMaxValue(val) |
self.maxValue = val |
self:SetValue(self.value) |
self:SetValue(self.value, val) |
end |
function barPrototype:RegisterTimeLeftTrigger(time, func) |