WoWInterface SVN oUF_AuraBars

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 21 to Rev 22
    Reverse comparison

Rev 21 → Rev 22

trunk/oUF_AuraBars/oUF_AuraBars.lua
1,3 → 1,55
--[[
 
oUF Element: .AuraBars
 
Options regarding visual layout:
- <element>.auraBarHeight
Sets the height of the statusbars and icons.
- <element>.auraBarWidth
Sets the width of the statusbars (excluding icon). Will use the
framewidth of <element> by default.
- <element>.auraBarTexture
Sets the statusbar texture.
- <element>.fgalpha
Foreground alpha.
- <element>.bgalpha
Background alpha.
- <element>.spellTimeObject, <element>.spellNameObject
Objects passed by CreateFontObject(). These will ignore the
following options:
<element>.spellTimeFont
<element>.spellTimeSize
<element>.spellNameFont
<element>.spellNameSize
- <element>.spellTimeFont, <element>.spellTimeSize,
<element>.spellNameFont, <element>.spellNameSize
Options to control the texts on the statusbars.
- <element>.gap
Will add space between the statusbars and icons by amount of .gap
in pixels.
- <element>.spacing
Will add space between statusbars by amount of .spacing in pixels.
 
Options regarding functionality:
- <element>.sort
Will enable sorting if set to true or 1 (or whatever). See
functions for info on how to override the sort function.
- <element>.scaleTime
Will add time-scaling (bar widths according to the total duration
of the aura assigned to it). Will use the minimum of
<element>.scaleTime and the total aura duration to determine the
width in percent.
 
Functions that can be overridden from within a layout:
- <element>.PostCreateBar(bar)
To do stuff to a bar once it has been created, such as set a
backdrop, etc, use this function. Use bar:GetParent() to get the
<element> object.
- <element>.sort(a, b)
Custom compare function to sort aura's before the bars are being
updated. Is being called every UNIT_AURA for the <element>'s unit.
--]]
 
local _, ns = ...
local oUF = ns.oUF or oUF
assert(oUF, 'oUF_AuraBars was unable to locate oUF install.')
78,15 → 130,6
end
 
statusBar.icon = statusBar:CreateTexture(nil, 'BACKGROUND')
if(auraBarParent.auraIconOverlay) then
statusBar.icon.overlay = statusBar:CreateTexture(nil, 'OVERLAY')
statusBar.icon.overlay:SetTexture(auraBarParent.auraIconOverlay)
statusBar.icon.overlay:SetPoint("TOPLEFT", statusBar.icon, "TOPLEFT", -1, 1)
statusBar.icon.overlay:SetPoint("BOTTOMRIGHT", statusBar.icon, "BOTTOMRIGHT", 1, -1)
statusBar.icon.overlay:SetTexCoord(0.07, 0.93, 0.07, 0.93)
statusBar.icon.overlay.Hide = function(self) end
statusBar.icon.overlay:SetTexture(auraBarParent.auraIconOverlay)
end
statusBar.icon:SetHeight(statusBar:GetHeight())
statusBar.icon:SetWidth(statusBar:GetHeight())
statusBar.icon:SetTexCoord(0.07, 0.93, 0.07, 0.93)
266,10 → 309,8
local function Enable(self)
if(self.AuraBars) then
self:RegisterEvent("UNIT_AURA", Update)
self.AuraBars.bars = {}
self.AuraBars:SetScript("OnUpdate",function(self)
UpdateBars(self)
end)
self.AuraBars.bars = self.AuraBars.bars or {}
self.AuraBars:SetScript("OnUpdate", UpdateBars)
return true -- Ensure we get an update when the parent frame is displayed
end
end