Skip to content

(Dispel Overlay) Fix absorb bar z-ordering and gradient opacity on live frames#65

Merged
DanderBot merged 1 commit into
DanderBot:mainfrom
Krathe82:fix/dispel-overlay-absorb-zorder-opacity
May 11, 2026
Merged

(Dispel Overlay) Fix absorb bar z-ordering and gradient opacity on live frames#65
DanderBot merged 1 commit into
DanderBot:mainfrom
Krathe82:fix/dispel-overlay-absorb-zorder-opacity

Conversation

@Krathe82

@Krathe82 Krathe82 commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Absorb bar z-ordering (https://danders-lab.netlify.app/bugs/865): dfAbsorbBar and dfHealAbsorbBar were parented to frame with frame levels set to healthBar+3 and healthBar+4 at creation. The dispel gradient is a child of healthBar at healthBar+2, so its effective level floats when SecureGroupHeaderTemplate adjusts healthBar's level after creation. Re-parenting the absorb bars to healthBar and bumping their levels to +4/+5 ensures all three track frame level changes together — the gradient can never drift above the absorbs.

  • Gradient opacity on live frames: ShowOverlayWithSecretColor called tex:SetVertexColor(gradientColor:GetRGBA()), passing the alpha channel from a secret ColorMixin returned by C_UnitAuras.GetAuraDispelTypeColor. SetVertexColor cannot handle secret values in the alpha position and silently renders at full opacity. Fixed by using GetRGB() for the secret-safe colour and folding the base opacity into the SetAlphaFromBoolean call on the gradient frame (inAlpha=gradientAlpha, oorAlpha=gradientAlpha*oorAlpha). This also means health-tracking SetValue calls in UpdateDispelGradientHealth can no longer reset the opacity, which explains why the bug only manifested on live frames (not test mode, where health events don't fire).

  • Opacity slider live preview: The gradient opacity and intensity slider preview callbacks (during drag) were not invalidating the curve cache. On live frames, the next UNIT_AURA event would call UpdateDispelOverlayGetGradientCurve → return the stale cached curve → overwrite whatever the lightweight update had just applied. Added InvalidateDispelColorCurve() to both preview callbacks.

Test plan

  • With a dispellable debuff active on a live frame, confirm the absorb bar (shield) remains visible on top of the dispel gradient overlay
  • Change group size mid-session to trigger frame re-layout — absorb bars should remain above the gradient
  • Drag the Gradient Opacity slider — confirm the gradient on live frames responds in real time
  • Drag the Gradient Intensity slider — confirm the same
  • Confirm OOR fading still applies correctly to the gradient when targets go out of range

…ve frames

- Re-parent dfAbsorbBar and dfHealAbsorbBar from frame to healthBar in both
  party and raid Create functions, and bump their frame levels from hb+3/+4
  to hb+4/+5. The dispel gradient is a child of healthBar at hb+2; parenting
  absorbs to the same ancestor ensures all three track healthBar level changes
  together, preventing the gradient from drifting above the absorb bars when
  SecureGroupHeaderTemplate adjusts frame levels after creation.

- Fix gradient opacity slider having no effect on live frames. The
  GetAuraDispelTypeColor API returns a secret ColorMixin whose alpha channel
  cannot be passed to SetVertexColor — it silently renders at full opacity.
  Switch from GetRGBA() to GetRGB() and fold the base gradient opacity into
  the frame's SetAlphaFromBoolean call (inAlpha=gradientAlpha,
  oorAlpha=gradientAlpha*oorDispelAlpha) so it is never overwritten by health
  tracking SetValue calls.

- Invalidate the gradient curve cache in the opacity and intensity slider
  preview callbacks so live UNIT_AURA events rebuild the curve from the
  current value during drag rather than restoring the stale cached alpha.
@DanderBot DanderBot merged commit 8c3c01e into DanderBot:main May 11, 2026
@DanderBot

Copy link
Copy Markdown
Owner

Thanks for the PR! Merged into main and will ship in the next alpha build.

DanderBot added a commit that referenced this pull request May 11, 2026
Krathe82 added a commit to Krathe82/DandersFrames that referenced this pull request May 15, 2026
…nsition

UpdateDispelOverlayAppearance was restoring the gradient to alpha 1.0 when
a unit came back in range, ignoring the configured dispelGradientAlpha. This
was masked before PR DanderBot#65 because ShowOverlayWithSecretColor also used 1.0,
but after DanderBot#65 corrected that function to use the configured alpha the two
fell out of sync. The dfLastDispelAuraID skip then prevented ShowOverlay from
correcting it, leaving the gradient stuck at full brightness permanently.

Fix: use element-specific alphas (gradientAlpha, borderAlpha, iconAlpha)
derived from settings in UpdateDispelOverlayAppearance, matching what
ShowOverlayWithSecretColor applies, so OOR->in-range transitions restore
the correct opacity rather than 1.0.
DanderBot pushed a commit that referenced this pull request May 17, 2026
…nsition

UpdateDispelOverlayAppearance was restoring the gradient to alpha 1.0 when
a unit came back in range, ignoring the configured dispelGradientAlpha. This
was masked before PR #65 because ShowOverlayWithSecretColor also used 1.0,
but after #65 corrected that function to use the configured alpha the two
fell out of sync. The dfLastDispelAuraID skip then prevented ShowOverlay from
correcting it, leaving the gradient stuck at full brightness permanently.

Fix: use element-specific alphas (gradientAlpha, borderAlpha, iconAlpha)
derived from settings in UpdateDispelOverlayAppearance, matching what
ShowOverlayWithSecretColor applies, so OOR->in-range transitions restore
the correct opacity rather than 1.0.
@Krathe82 Krathe82 deleted the fix/dispel-overlay-absorb-zorder-opacity branch June 4, 2026 12:42
Krathe82 pushed a commit to Krathe82/DandersFrames that referenced this pull request Jun 6, 2026
…rb-zorder-opacity

(Dispel Overlay) Fix absorb bar z-ordering and gradient opacity on live frames
Krathe82 added a commit to Krathe82/DandersFrames that referenced this pull request Jun 6, 2026
…nsition

UpdateDispelOverlayAppearance was restoring the gradient to alpha 1.0 when
a unit came back in range, ignoring the configured dispelGradientAlpha. This
was masked before PR DanderBot#65 because ShowOverlayWithSecretColor also used 1.0,
but after DanderBot#65 corrected that function to use the configured alpha the two
fell out of sync. The dfLastDispelAuraID skip then prevented ShowOverlay from
correcting it, leaving the gradient stuck at full brightness permanently.

Fix: use element-specific alphas (gradientAlpha, borderAlpha, iconAlpha)
derived from settings in UpdateDispelOverlayAppearance, matching what
ShowOverlayWithSecretColor applies, so OOR->in-range transitions restore
the correct opacity rather than 1.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants