[Feat] Raid Frames: inverted health bars for raid and party frames - #2061
Open
Irame wants to merge 1 commit into
Open
[Feat] Raid Frames: inverted health bars for raid and party frames#2061Irame wants to merge 1 commit into
Irame wants to merge 1 commit into
Conversation
Adds a "Invert Health Fill" toggle to the Health Bar Fill cog, next to Vertical Fill. When on, the bar texture paints MISSING health and current health is left to the background, so a frame reads as "how much damage has been taken" rather than "how much health is left". Implemented as SetReverseFill plus an inverted percent, not as a swap of the two textures. The seam -- the current-HP point -- therefore sits at the same coordinate either way; only which side of it the fill paints changes. That gives the rule the whole change follows: every overlay anchored to the fill's leading edge moves from its RIGHT/TOP to its LEFT/BOTTOM, and every anchor on the health FRAME's edges is left alone. Absorb backfill and forward bars, the filled/missing clip frames, heal absorb, heal prediction and the bar background are all re-anchored on that basis, on both fill axes, in the live and preview paths. SetReverseFill is owned by RF_ApplyHealthOrientation alongside SetOrientation, which now returns both flags so callers take the returns instead of re-reading the setting. Both are applied in the restyle/style passes only; the per-tick value paths set the value and nothing else. The key is registered in the healthBar party-sync section, so an unsynced party tab keeps its own value. Defaults to false; so no migration is needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds an "Invert Health Fill" toggle to the Health Bar Fill cog on the raid
frames, next to Vertical Fill. With it on, the bar texture paints MISSING
health and current health is left to the background, so a frame reads as "how
much damage has been taken" rather than "how much health is left". Off by
default, so nothing changes for anyone who does not turn it on.
Works on both fill axes and on raid, party, extra and friendly boss frames, in
the live frames and in the options preview. The key sits in the healthBar
party-sync section, so an unsynced party tab keeps its own value.
How was it tested?
In game, on raid and party frames, with the toggle on and off:
While testing I found two seemingly unrelated bugs:
Screenshots
Before:
Raid (preview):
Party:
After:
Raid (preview):
Party:
Checklist
HookScript/hooksecurefunconly, neverSetScripton Blizzard framesImplementation note for review
This is
SetReverseFillplus an inverted percent, not a swap of the two textures. The seam -- the current-HP point -- therefore stays at the same coordinate either way and only the side the fill paints on changes. That gives the rule the whole diff follows: every overlay anchored to the fill's LEADING EDGE moves from its RIGHT/TOP to its LEFT/BOTTOM, and every anchor on the health FRAME's edges is left alone. Absorb backfill and forward bars, the filled/missing clip frames, heal absorb, heal prediction and the bar background are re-anchored on that basis.SetReverseFillis owned byRF_ApplyHealthOrientationnext toSetOrientation, which now returns both flags so callers take the returns instead of re-reading the setting.The options health-animation ticker also moves from
PvEffectiveProfileto thenew party-aware
PvSettings, which fixessmoothBarsbeing resolved raid-sideonly in the party preview.