Skip to content

Commit

Permalink
Update ColorFilter.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
noname08662 authored Jan 18, 2025
1 parent f367cd9 commit 4fc8079
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Modules/Unitframes/ColorFilter.lua
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,9 @@ end

local function constructAnimation(bar, colorFilter)
colorFilter.flashTexture = bar:CreateTexture(nil, 'OVERLAY')
colorFilter.flashTexture:SetAllPoints(bar:GetStatusBarTexture())
colorFilter.flashTexture:SetAllPoints(bar)
colorFilter.flashTexture:SetTexture(E.media.blankTex)
colorFilter.flashTexture:Hide()

colorFilter.flashTexture.anim = colorFilter.flashTexture:CreateAnimationGroup("Flash")
colorFilter.flashTexture.anim.fadein = colorFilter.flashTexture.anim:CreateAnimation("ALPHA", "FadeIn")
Expand Down Expand Up @@ -969,7 +970,6 @@ function mod:ConstructHighlight(frame)
colorFilter.appliedBordersColors.Health = { applied = false, override = false }

constructAnimation(frame.Health, colorFilter.Health)
colorFilter.Health.flashTexture:Hide()

colorFilter.Health.shadow:Hide()

Expand All @@ -989,7 +989,6 @@ function mod:ConstructHighlight(frame)
colorFilter.appliedBordersColors.Power = { applied = false, override = false }

constructAnimation(power, colorFilter.Power)
colorFilter.Power.flashTexture:Hide()

colorFilter.Power.shadow:Hide()
end
Expand All @@ -1007,7 +1006,6 @@ function mod:ConstructHighlight(frame)
colorFilter.appliedBordersColors.Castbar = { applied = false }

constructAnimation(castbar, colorFilter.Castbar)
colorFilter.Castbar.flashTexture:Hide()

colorFilter.Castbar.shadow:Hide()
if castbar.Icon then
Expand Down Expand Up @@ -1660,6 +1658,7 @@ function mod:UpdateAll(db)
local targetBar = colorFilter[statusbar]
if targetBar.flashTexture then
targetBar.flashTexture:Hide()
targetBar.flashTexture = nil
end
targetBar:SetScript('OnUpdate', nil)
if metaTable.events[unit] then
Expand Down Expand Up @@ -1842,4 +1841,4 @@ function mod:InitializeCallback()
mod:Toggle(db)
end

core.modules[modName] = mod.InitializeCallback
core.modules[modName] = mod.InitializeCallback

0 comments on commit 4fc8079

Please sign in to comment.