Skip to content

Pinned frames: ride the global lock + per-set position panel#161

Open
Krathe82 wants to merge 8 commits into
DanderBot:mainfrom
Krathe82:pr/pinned-lock-position
Open

Pinned frames: ride the global lock + per-set position panel#161
Krathe82 wants to merge 8 commits into
DanderBot:mainfrom
Krathe82:pr/pinned-lock-position

Conversation

@Krathe82

Copy link
Copy Markdown
Contributor

Reworks how pinned frames are positioned and locked.

Global lock
Pinned frames no longer have their own Lock Position toggle — they lock and unlock together with the main party/raid frames. Unlocking shows each set's drag handle; locking hides them all. The per-set lock field is retired and migrated away.

Per-set position panel
Each set's drag handle opens the same nudge position panel as the party/raid frames (precise X/Y, Center, Reset). The panel is titled with the set's name and mode (e.g. NPC (Raid)) and themed raid-orange for raid sets. Pinned gets its own Snap to Grid and Hide Mover, independent of the main frames and off by default.

Handle discoverability
Pinned handles now read as interactive: hover highlight + a tooltip ("Drag to move / Click to open the position panel"), the targeted set's handle stays solid while the others dim so it's clear which set the panel is driving, and handles auto-size to their label.

Self-contained: party/raid lock wiring, a pinned POSITION_MODES descriptor, and a guarded migration that strips the dead set.locked field. No new dependencies.

Krathe82 added 8 commits June 16, 2026 13:24
Pinned frames no longer have their own Lock Position toggle — they now
lock/unlock together with the main party/raid frames (global lock only).
Unlocking shows each set's drag handle; locking hides them all. The
per-set lock field is retired and migrated away.

Each set's handle also opens the same nudge position panel as party/raid
(precise X/Y, Center, Reset), titled with the set name and mode and themed
raid-orange for raid sets. Pinned gets its own Snap to Grid and Hide Mover,
independent of the main frames and off by default.

Handles read as interactive: hover highlight + tooltip, the targeted set's
handle is solid while the others dim, and handles auto-size to their label.
Pin each pinned container by its GROWTH corner (not its saved-point corner)
via a shared PositionPinnedContainer helper, with pos.point kept as the
screen reference plus a half-frame offset. The first frame's screen position
no longer depends on the container's frame count, so test mode (sized to
testCount) and live (sized to the visible count) place the frames identically
— with no migration and no jump for existing positions.

Also re-apply the saved position when leaving test mode: a test-mode drag
updates set.position, but the live container was only re-reading it on a
/reload, so it snapped back to its old spot. ExitTestMode now repositions
each live container from set.position on the way out.
CENTER never actually centred the pinned frames — they grew START-style and
only the anchor/label shifted. Remove it from the Frame Growth / Column Growth
dropdowns (Start / End only) and normalise existing CENTER values to START
(no visual change, since CENTER already rendered as START). The layout
plumbing is left in place for a proper centred mode later.
- Live-mover drag mirrors position to _realRaidDB only in raid (IsInRaid guard);
  party drags no longer overwrite the raid set's saved position.
- A user Lock during combat clears the combat-restore intent so handles don't
  re-appear after combat (SetMoversShown(false) cancels moversShownBeforeCombat/
  pendingMoversShown; LockAllForCombat re-arms it after).
- SetEnabled doesn't show live chrome while test mode is active (the preview owns
  the screen) and re-asserts Hide-Mover alpha + active-highlight on re-show.
- RemoveSet compacts _realRaidDB.pinnedFrames.sets too (raid, identity-guarded)
  so the index-based position mirror stays aligned after a remove.
- FullProfileRefresh pinned loops use MAX_SETS (sets 3-4 refresh on profile switch).
- Pinned snap-to-grid uses a point-snap (its coord is a point anchor, not a
  centred box) instead of the centre/edge model.
- RestampPinnedPresets restamps all MAX_SETS sets after a preset rename/delete
  (was sets 1-2 only), so sets 3-4 don't keep a stale/dead preset stamp.
- Exporting/importing the pinnedFrames category carries the Aura/Text Designer
  preset libraries, so a shared pinned set doesn't land on a missing preset.
- Trim the dead PINNED_DEFAULTS keys (incl. a contradictory keepOfflinePlayers
  default) to just {enabled}.
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.

1 participant