fix(raid frames): let an aura show duration text with no cooldown swipe - #1373
Closed
dfrisone wants to merge 5 commits into
Closed
fix(raid frames): let an aura show duration text with no cooldown swipe#1373dfrisone wants to merge 5 commits into
dfrisone wants to merge 5 commits into
Conversation
…s on Opacity and Border describe the icon art and are rightly greyed out when the icon is hidden. The swipe is a separate layer that keeps drawing over a hidden icon, so it was greyed out in exactly the situation where a user needs it: the text-only setup (hidden icon, duration text, no swipe) had no way to turn the swipe off at all. Two reporters hit the same wall.
…into rf-party-duration-swipe
…hidden SetDurationCooldown transfers ownership of the widget to the engine, which then draws and re-shows the swipe on its own schedule. ApplyStyleToRegions hides it with SetShown a few lines earlier, and that does not survive the handover, so Hide Icons and Duration Swipe off both left the swipe drawing with no way to stop it. Gate the registration instead, inside the creation window, since touching an engine-owned region afterwards is forbidden-object access. Duration text is unaffected: it comes from SetDurationTextSafe, not the swipe, which is what makes a text-only aura display possible.
…source Withholding the frame from SetDurationCooldown removed the duration TEXT along with the swipe: that registration is the button's duration source, not just a place to draw. Register it as before and turn the drawing off instead. SetDrawSwipe is a CooldownStyle aspect rather than visibility, so an aura refresh has no reason to clear it, and it is AllowedWhenTainted so the call is legal where this matters.
Owner
|
merging this manually as i was doing similar work in that area |
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.
Cause
Two things blocked the text-only aura setup on Party/Raid frames.
Cooldown:SetShown(false)does not stick on an aura button: the engine callsSetCooldownon that frame whenever the slot's data refreshes, and the native call implicitly re-Shows it. SohideSwipewas written and then overruled, from both Hide Icons and Duration Swipe.On top of that, Duration Swipe was greyed out whenever Hide Icons was on, so the one control that could have helped was unreachable in exactly the configuration that needed it.
Fix
Use
SetDrawSwipe, a CooldownStyle aspect the engine has no reason to clear on refresh (andAllowedWhenTainted, so the call is legal in restricted content). The cooldown stays registered viaSetDurationCooldownbecause that registration is the button's duration SOURCE -- withholding it removes the duration text along with the swipe. Ungate the toggle; Opacity and Border keep their gating, since those describe icon art.Test
Verified in game on party frames: hidden icon with duration text, stacks and no swipe, and the swipe returns when re-enabled.