Use ClassicAPI animation groups for fades and pulses

Replace hand-rolled OnUpdate alpha loops with engine animation groups:
unit frame aggro/combat glow, tracking icon pulse, new-mail blink,
castbar fade-out, autohide, XP/rep bar fade, info box timeout and the
unlock-mode scale label. Timing no longer depends on framerate, and the
always-running glow driver and tracking OnUpdate are gone.

The XP bar tracks hover through OnEnter/OnLeave instead of MouseIsOver,
so a fade can't restart under the cursor.
This commit is contained in:
Brues
2026-10-22 21:28:34 -05:00
parent 65ad47e842
commit 9cb21b982b
8 changed files with 113 additions and 94 deletions
+17 -15
View File
@@ -109,24 +109,26 @@ pfUI:RegisterModule("minimap", function ()
this.highlight.tex:SetPoint("BOTTOMRIGHT", MiniMapMailIcon, "BOTTOMRIGHT", 2, -2)
this.highlight.tex:SetVertexColor(1,.5,.5)
this.highlight:SetScript("OnUpdate", function()
if not this.count then this.count = 0 end
if not this.modifier then this.modifier = 1 end
if this.count >= 10 then this:Hide() end
this:SetAlpha(this:GetAlpha() + this.modifier)
if this:GetAlpha() <= 0.1 then
this.modifier = 0.05
this.count = this.count + 1
elseif this:GetAlpha() >= 0.9 then
this.modifier = -0.05
end
end)
-- Blink ten times between .9 and .1, then hide
local highlight = this.highlight
highlight:SetAlpha(.9)
highlight.blink = highlight:CreateAnimationGroup()
for i = 1, 10 do
local down = highlight.blink:CreateAnimation("Alpha")
down:SetChange(-.8)
down:SetDuration(.3)
down:SetOrder(i * 2 - 1)
local up = highlight.blink:CreateAnimation("Alpha")
up:SetChange(.8)
up:SetDuration(.3)
up:SetOrder(i * 2)
end
highlight.blink:SetScript("OnFinished", function() highlight:Hide() end)
end
this.highlight.count = 0
this.highlight:Show()
this.highlight.blink:Stop()
this.highlight.blink:Play()
end)
-- Create coordinates text frame with location configurable