QoL: move and scale the Loss of Control frame in Unlock Mode - #1119
Open
labrie75 wants to merge 2 commits into
Open
QoL: move and scale the Loss of Control frame in Unlock Mode#1119labrie75 wants to merge 2 commits into
labrie75 wants to merge 2 commits into
Conversation
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 a Loss of Control mover to Unlock Mode, so the alert can be placed and sized like the other Blizzard windows Shifter already handles.
It reuses the existing hidden-window proxy path (
LOOT_WINDOWS), with two small additions:alwaysOn-- the entry is not part of the Loot opt-in group. Whether the frame ever appears is Blizzard's own "Loss of Control Alerts" combat option, so a Shifter toggle of its own would only duplicate a Blizzard setting. The mover is simply always offered, and the label readsLoss of Control (on)/(off)from thelossOfControlCVar so it is obvious when the alert itself is switched off.scalable-- the frame is one icon + timer + label block, so resizing it by width or height would distort it. Both inputs drive the same SCALE, keeping the aspect ratio; the anchor offsets are divided back out so the frame lands exactly where the mover showed it. The mover box tracks the live frame's real size, floored to a size that fits its label.Everything else follows the existing loot-window behaviour: hidden rect-only proxy,
ignoreFramePositionManager, SetPoint/OnShow re-application, no mouse state touched, protected/forbidden frames skipped. Position and scale are stored where Shifter already keeps its window positions (account-wide inEllesmereUIDB, not per profile) -- deliberately the same as every other Shifter window rather than a one-off exception. Existing entries are unaffected:alwaysOnandscalableare nil for them, so their code paths compute exactly what they did before.Includes the koKR locale entries for the new label.
How was it tested?
Tested in game on live retail: dragged and scaled from Unlock Mode, verified the live alert appears at the saved position and scale (
/reloadand fresh login), with Blizzard's Loss of Control Alerts option both on and off, and with the Loot unlock toggle both on and off (the entry is independent of it).Known limitation: the
(on)/(off)label is resolved when Unlock Mode builds the mover, so flipping the Blizzard option mid-session needs a reload to refresh the text. Updating a live mover's label would need access to the unlock module's internal mover table, so I left it alone rather than widen the API for a cosmetic refresh -- happy to add that if you'd prefer it live.Screenshots
Unlock Mode mover at a small and a large scale (the frame keeps its proportions):
width 200

width 400

Checklist
ignoreFramePositionManageropt-out only; state lives in EllesmereUIDB and the module's frame-field data