WoWInterface SVN oUF_AuraBars

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 17 to Rev 18
    Reverse comparison

Rev 17 → Rev 18

trunk/oUF_AuraBars/oUF_AuraBars.lua
232,7 → 232,7
end
 
bar.spellname:SetText(spellText)
bar.spelltime:SetText(FormatTime(bar.aura.expirationTime-GetTime()))
bar.spelltime:SetText(not bar.noTime and FormatTime(bar.aura.expirationTime-GetTime()))
 
-- Colour bars
local r, g, b = 0.2, 0.6, 1.0 -- Colour for buffs (This is Magic Blue)
253,41 → 253,10
end
 
--[[
This function is used to handle the legacy support for:
renamed ==>
nameFont -> spellNameFont
nameSize -> spellNameSize
spellFont -> spellTimeFont
spellSize -> spellTimeSize
 
]]--
local warning = "|cffff0000Warning oUF_AuraBars!|r [%q.%s] has been deprecated, please use [%s] instead."
local function Legacy(unit, auraBars)
 
if(auraBars.nameFont) then
DEFAULT_CHAT_FRAME:AddMessage(string.format(warning, unit, "AuraBars.nameFont", "AuraBars.spellNameFont"))
auraBars.spellNameFont = auraBars.nameFont
end
if(auraBars.nameSize) then
DEFAULT_CHAT_FRAME:AddMessage(string.format(warning, unit, "AuraBars.nameSize", "AuraBars.spellNameSize"))
auraBars.spellNameSize = auraBars.nameSize
end
if(auraBars.spellFont) then
DEFAULT_CHAT_FRAME:AddMessage(string.format(warning, unit, "AuraBars.spellFont", "AuraBars.spellTimeFont"))
auraBars.spellTimeFont = auraBars.spellFont
end
if(auraBars.spellSize) then
DEFAULT_CHAT_FRAME:AddMessage(string.format(warning, unit, "AuraBars.spellSize", "AuraBars.spellTimeSize"))
auraBars.spellTimeSize = auraBars.spellSize
end
end
 
--[[
Enable function for oUF
]]--
local function Enable(self)
if(self.AuraBars) then
Legacy(self.unit, self.AuraBars) -- Warn if deprecated values are been used.
self:RegisterEvent("UNIT_AURA", Update)
self.AuraBars.bars = {}
self.AuraBars:SetScript("OnUpdate",function(self)