WoWInterface SVN oUF_BarFader

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 2 to Rev 3
    Reverse comparison

Rev 2 → Rev 3

oUF_BarFader/oUF_BarFader.lua New file
0,0 → 1,32
local function UpdateElement(self)
local notFull = UnitHealth('player') ~= UnitHealthMax('player') or
(UnitPowerType("player") == 1 and UnitMana('player') > 0) or
(UnitPowerType("player") ~= 1 and UnitMana('player') ~= UnitManaMax('player'))
 
if(notFull) then
self:SetAlpha(1)
elseif(UnitAffectingCombat('player')) then
self:SetAlpha(1)
elseif(UnitExists('target')) then
self:SetAlpha(1)
elseif(self.Castbar.casting) then
self:SetAlpha(1)
else
self:SetAlpha(self.BarFade.alpha or 0.25)
end
end
 
oUF:RegisterInitCallback(function(self)
local unit = self.unit
if(self.BarFade) then
local val = 0
local event = CreateFrame('Frame')
event:SetScript('OnUpdate', function(_, al)
val = val + al
if(val > 0.25) then
UpdateElement(self)
val = 0
end
end)
end
end)
oUF_BarFader/oUF_BarFader.toc New file
0,0 → 1,8
## Interface: 20400
## Author: p3lim
## Version: Revision wowi:revision
## Title: oUF BarFader
## Notes: Condition fading support for oUF layouts
## RequiredDeps: oUF
 
oUF_BarFader.lua
\ No newline at end of file