Skip to content

Commit b41ea4e

Browse files
committed
Anim: enable animated borders on defensive + missing-buff icons
The DF-owned border animations (Pulsate/Wipe/Ripple/Segment Reveal/ Marching Dash/Sides/Corners) run off our own secretRect border textures via the shared driver, so they work on the 12.1 container icons exactly as they do on the Aura Designer's placed indicators. Un-frosts what the port marked as a limitation, scoped to the two low-icon-count elements. - Defensive row: sets adBorderAnim so the container's SAFE_OVERLAY_ANIM filter keeps the animation (and still strips the LCG glow types). - Missing-buff badge: applies its border directly (no container filter), so it guards to the exposed SAFE_BORDER_ANIM set itself; its border is now torn down in _teardownContainer's StopAnimation pass, so continuous animation is safe (the old forced-off invariant is lifted). - GUI: un-frosts the animation dropdown on both pages and hides the LCG-only types (Pixel/Autocast/Button/Proc) via animExcludeTypes. Buff/debuff rows stay off (many-icon perf). Config keys + exports already existed from the pre-12.1 feature.
1 parent 98cfa55 commit b41ea4e

4 files changed

Lines changed: 21 additions & 16 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ DandersFrames has been rebuilt for WoW 12.1 (Midnight), which fundamentally chan
1111
* (Tooltips) **The aura tooltip Enable toggles now apply immediately on the 12.1 aura rows** — turning Buff / Debuff / Defensive Icon tooltips on or off used to do nothing until the next unrelated settings change. The remaining tooltip options can't apply to aura icons on 12.1 and are marked in place: the game draws its aura tooltip at a fixed spot beside the icon with no addon hook (Anchor / Offset), and the icon's mouse state is protected during combat so hover can't be dropped per-combat (Disable in Combat). All of these keep working for Frame and Binding tooltips, which aren't aura-driven.
1212
* (Aura Designer) **The designer's own preview canvas renders through the real 12.1 engine** — the indicators you drag around on the editor's mock frame are styled by the exact same code that styles them live (size, borders, border animations, duration/stack text, bar fill), so what you see in the editor is what ships to the frames. Out-of-range fading also works on Aura Designer indicators again (the whole indicator dims with your configured alpha).
1313
* (Aura Designer) **Test mode previews the Aura Designer through the real 12.1 engine** — each placed indicator renders in its actual container wearing its own configured spell's icon, name and tooltip identity, with live-true position, borders, animations and fonts; frame effects (health-bar colour, background, frame border) apply exactly as they do live. The old hand-painted preview is gone, and preview sounds are no longer registered with the game while test mode is open.
14+
* (Auras) **Animated borders are back for Defensive and Missing-Buff icons.** The border animations (Pulsate, Wipe, Ripple, Segment Reveal, Marching Dash, Sides/Corners) were marked as a 12.1 limitation during the rework, but the Aura Designer's own approach — DF-drawn border textures animated by an external driver, rather than Blizzard's aura-button glow — works on the container icons too. The particle-glow styles (Pixel/Autocast/Button/Proc) still can't run on the new aura buttons and are hidden from these dropdowns. Under the hood the animation driver is now shared (one timer for all animated borders instead of one each), so it's lighter across the board.
1415
* (Auras) **Out-of-range and dead-unit fading works on the 12.1 aura displays again** — buff/debuff rows, defensive icons and the missing-buff strip now dim as one when the unit is out of range (with your configured out-of-range alphas), live and in test mode. This was a known gap since the rework.
1516
* (Aura Designer) The spell picker shows one unified grid — the separate "Inferred Tracking" section (and its cast-tracking caveats) is gone. On 12.1 every tracked aura works the same way, driven by the game's native spell-ID matching, so the whitelisted/inferred distinction no longer exists.
1617
* (Interface) The deprecated My Buff Indicators feature (hidden from the UI and force-disabled since 4.0.12) has been fully removed. Its successors — the missing-buff display and the Aura Designer — cover its use cases on the new aura engine.

Features/Auras.lua

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -862,6 +862,7 @@ function DF:BuildDefensiveRowConfig(db, unit)
862862
return {
863863
unit = unit,
864864
mode = "row",
865+
adBorderAnim = true, -- opt into DF-owned border animations (see buildPlacedConfig)
865866
filter = factoryFilter or BuildDirectDefensiveFilters(),
866867
max = db.defensiveBarMax or 4,
867868
enabled = true,
@@ -1060,11 +1061,15 @@ local function styleMissingBadge(h, db, frame, info)
10601061
local spec = DF.Border:BuildSpec(db, "missingBuffIcon", { unit = frame.unit, frame = frame, iconMode = true })
10611062
spec.enabled = showBorder
10621063
spec.size = borderSize
1063-
-- The badge border is secretRect, so an animation driver would be hosted on UIParent
1064-
-- (see ensureDriver in Border.lua) and this badge is NOT covered by a container
1065-
-- teardown loop. Keep animation OFF here — never let the badge animate, or its driver
1066-
-- would tick forever with no teardown.
1067-
spec.animation = nil
1064+
-- Animate only via the DF-owned (taint-safe) types — the LCG glows SetParent
1065+
-- their pooled frames onto the secretRect badge, which is forbidden on the native
1066+
-- button subtree. Continuous animation is safe now: the shared anim driver hosts on
1067+
-- UIParent and the badge's border is torn down in _teardownContainer's StopAnimation
1068+
-- pass (the GUI already hides the LCG types; this guards stale/imported profiles).
1069+
local safeAnim = DF.AuraContainer and DF.AuraContainer.SAFE_BORDER_ANIM
1070+
if spec.animation and not (safeAnim and safeAnim[spec.animation.type]) then
1071+
spec.animation = nil
1072+
end
10681073
DF.Border:Apply(badge.dfBorder, spec)
10691074

10701075
local artInset = showBorder and borderSize or 0

Frames/AuraContainer.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ local SAFE_OVERLAY_ANIM = {
9292
CORNERS_ONLY = true,
9393
SIDES_ONLY = true,
9494
}
95+
-- Exposed so non-container consumers that apply a secretRect border directly
96+
-- (the missing-buff badge) can restrict to the same taint-safe DF-owned set.
97+
AuraContainer.SAFE_BORDER_ANIM = SAFE_OVERLAY_ANIM
9598

9699
-- ============================================================
97100
-- CAPABILITY DETECTION (the version gate + PTR-4 feature gates)
@@ -1866,6 +1869,7 @@ function Handle:_teardownContainer()
18661869
-- MISSING mode: with no container the push geometry is gone — park the badge
18671870
-- hidden on the window (never claim "missing" without a live container).
18681871
if self.badge then
1872+
if DF.Border and self.badge.dfBorder then DF.Border:StopAnimation(self.badge.dfBorder) end
18691873
self.badge:Hide()
18701874
self.badge:ClearAllPoints()
18711875
self.badge:SetPoint("TOPLEFT", self.frame, "TOPLEFT", 0, 0)

Options/Options.lua

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6292,18 +6292,16 @@ function DF:SetupGUIPages(GUI, CreateCategory, CreateSubTab, BuildPage)
62926292
include = { alpha = true, inset = true, offset = true, blendMode = true,
62936293
gradient = true, shadow = true, animate = true,
62946294
classColor = true, roleColor = true },
6295+
-- Only the DF-owned (secretRect-driven) animations work on 12.1 buttons;
6296+
-- the LCG glows SetParent onto the native button (forbidden). Hide them.
6297+
animExcludeTypes = { PULSATE = true, CHASE = true, FLASH = true, PROC = true },
62956298
fullUpdate = function() refreshMissing() end,
62966299
lightUpdate = function() DF:LightweightUpdateMissingBuff() end,
62976300
lightColors = function() DF:LightweightUpdateMissingBuffBorderColor() end,
62986301
refreshStates = function() self:RefreshStates() end,
62996302
hideWhen = function(d) return not d.missingBuffIconEnabled end,
63006303
sizeMin = 0, sizeMax = 6, sizeStep = 1, -- 0 = animation-only (no solid edge)
63016304
})
6302-
-- 12.1: the badge's position derives from the container's secret geometry and
6303-
-- the factory strips spec.animation on render (same treatment as the aura
6304-
-- rows). Frost to match; candidate for the post-port cleanup sweep.
6305-
GUI:BlockControl12_1(mbBorderW.animationType, "limitation",
6306-
{ id = "missingbuffs:borderanimation", page = L["Missing Buffs"], when = function(d) return DF:FactoryOwnsMissingBuff(d) end })
63076305
borderGroup.disableChildrenOn = HideMissingBuffOptions
63086306
Add(borderGroup, nil, 1)
63096307

@@ -6411,18 +6409,15 @@ function DF:SetupGUIPages(GUI, CreateCategory, CreateSubTab, BuildPage)
64116409
gradient = true, shadow = true, alpha = true,
64126410
classColor = true, roleColor = true,
64136411
animate = true },
6412+
-- DF-owned animations only (see the missing-buff note); LCG glows are
6413+
-- forbidden on native aura buttons.
6414+
animExcludeTypes = { PULSATE = true, CHASE = true, FLASH = true, PROC = true },
64146415
fullUpdate = function() if DF.UpdateAllDefensiveBars then DF:UpdateAllDefensiveBars() end end,
64156416
lightUpdate = function() DF:LightweightUpdateDefensiveIcons() end,
64166417
lightColors = function() DF:LightweightUpdateDefensiveIconColors() end,
64176418
refreshStates = function() self:RefreshStates() end,
64186419
hideWhen = function(d) return not d.defensiveIconEnabled end,
64196420
})
6420-
-- Animations can't run on the 12.1 container buttons (LCG's pooled glow
6421-
-- frames re-SetParent onto the host — forbidden on native AuraButtons), and
6422-
-- the factory strips spec.animation on render. Frost to match; candidate
6423-
-- for deletion in the post-port cleanup sweep.
6424-
GUI:BlockControl12_1(defBorderW.animationType, "limitation",
6425-
{ id = "defensives:borderanimation", page = L["Defensives"], when = function(d) return DF:FactoryOwnsDefensiveRow(d) end })
64266421
borderGroup.disableChildrenOn = HideDefensiveIconOptions
64276422
Add(borderGroup, nil, 2)
64286423

0 commit comments

Comments
 (0)