feat(actionbars): add a Hide option for the proc glow - #1089
Open
dfrisone wants to merge 1 commit into
Open
Conversation
The Custom Proc Glow dropdown could replace Blizzard's gold proc glow with a different style, but never suppress it. Its "None" entry means "do not customise", so it leaves Blizzard's own glow in place, which reads as an off switch that does not turn anything off. There was no way to have no glow at all. Adds a "Hide" style. Appended last in LOOP_GLOW_TYPES on purpose: procGlowType is stored by INDEX, so inserting anywhere else would silently reassign every existing player's chosen style. Only the VISUAL is suppressed. _procState.active still tracks the button, so the assisted-highlight rescan and the glow rescan that read proc state stay correct; this hides the surfaces rather than skipping the bookkeeping. Both surfaces are covered (our glow wrapper and Blizzard's SpellActivationAlert), with alpha 0 as well as Hide() on the latter, because Blizzard re-Shows its own region on the next proc and alpha survives that. Checked before the custom-shape force in UpdateFlipbook: that force decides HOW a glow is drawn and must not resurrect one the player asked not to see. Options side: - The dropdown lists it automatically (built from LOOP_GLOW_TYPES). - The custom-glow performance warning no longer fires when selecting it, since Hide does strictly less work than Blizzard's own glow. - Colour and Use Class Color grey out, as they already do for "None", because there is no glow to colour. - The preview icon renders dimmed with no glow, matching how "None" reads; without that the preview dispatch fell through to its FlipBook arm with an entry that has no atlas or texture. Note PROC_START_TYPES (which already had its own Hide entry) is defined and exported but never consumed anywhere, so the loop style is the only glow control and one entry is sufficient.
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.
Problem
There is no way to turn the proc glow off.
The Custom Proc Glow dropdown can replace Blizzard's gold proc glow with a different style, but never suppress it. Its
"None"entry means "do not customise", so selecting it leaves Blizzard's own glow fully in place. It reads like an off switch that turns nothing off, and players who simply do not want a glow on their buttons have no option.Fix
Adds a Hide style to the Custom Proc Glow dropdown.
{ name = "Hide", hide = true }is appended last inLOOP_GLOW_TYPESdeliberately:procGlowTypeis stored by index, so inserting anywhere else would silently reassign every existing player's chosen style.Handled in
UpdateFlipbookbefore the custom-shape force, because that force decides HOW a glow is drawn and must not resurrect one the player asked not to see.Only the visual is suppressed.
_procState.activestill tracks the button, so the assisted-highlight rescan and the glow rescan that read proc state stay correct. Both surfaces are covered (our glow wrapper and Blizzard'sSpellActivationAlert), with alpha 0 as well asHide()on the latter, because Blizzard re-Shows its own region on the next proc and alpha survives that.Options side:
LOOP_GLOW_TYPES."None", because there is no glow to colour."None"reads. Without that the preview dispatch fell through to its FlipBook arm with an entry that has no atlas or texture.Testing
Confirmed in game: with Custom Proc Glow set to Hide, the proc glow is suppressed as intended.
Also verified: both files compile (
luac -p), the change applies cleanly tomain, and the code paths were traced by hand, including that switching to Hide while a proc is already live tears the existing glow down, sinceRefreshProcGlowsre-runsUpdateFlipbookon any button with an active proc.Why the Cooldown Manager did not need this
Worth recording, because it is the clearest argument for the change and it also confirms no equivalent work is needed in CDM.
CDM already offers a real off switch. Its per-spell Proc Glow menu has
{ val = 0, label = "None" }, and the glow starter honours it directly:That works because CDM hides Blizzard's own
SpellActivationAlerton its icons and renders its own glow instead, so returning early leaves nothing drawn.Action Bars is the opposite case. It does not universally suppress Blizzard's region, so its
"None"(procGlowType 0) means "do not customise" and Blizzard's gold glow stays visible. Same label, opposite behaviour between the two modules. This change makes the Action Bars dropdown able to express what CDM could already express.Verified in game that the CDM side already behaves correctly with Proc Glow -> None, so this PR is confined to Action Bars.
One asymmetry left, noted rather than addressed here: CDM's control is per spell, whereas this one is global. A bar-level or profile-level CDM default that per-spell values override would be a reasonable follow-up, but it is a separate change.
Notes for review
Two pre-existing things noticed while working here, neither changed:
disabledwhen Blizzard Style Action Bars is on, or when any bar uses a custom shape (custom shapes always use Shape Glow). Those players cannot reach Hide through the UI. A stored Hide still applies, which seems the right call, but the constraint is worth knowing.PROC_START_TYPESalready contains its own{ name = "Hide", hide = true }entry, but that table is defined and exported and then never consumed anywhere. It looks like dead code. Left alone here since removing it is unrelated to this change.