Skip to content

Unit frames: independent left/right/center health and BTB text#351

Open
liamcooper wants to merge 1 commit into
EllesmereGaming:mainfrom
liamcooper:feat/unit-frame-three-slot-text
Open

Unit frames: independent left/right/center health and BTB text#351
liamcooper wants to merge 1 commit into
EllesmereGaming:mainfrom
liamcooper:feat/unit-frame-three-slot-text

Conversation

@liamcooper
Copy link
Copy Markdown
Contributor

@liamcooper liamcooper commented May 23, 2026

Summary

Health bar and bottom text bar (BTB) text on player, target, and focus can use left, right, and center at the same time. Each slot has its own content, size, color, and X/Y offset.

Mini frames (pet, target-of-target, boss) use center or left/right: center can be used alone, or left and/or right together, but not all three at once.

Refactored duplicated positioning logic into a shared helper and aligned the options preview with live frame truncation.

What changed

Full frames (Frame Display — player / target / focus)

  • Left, right, and center health bar text can all be active together.
  • Duplicate content across slots is prevented (the same value cannot occupy two slots).
  • BTB supports the same combined layout; selecting center no longer clears left/right.

Mini frames (Mini Frame Edit — pet / ToT / boss)

  • Left, right, and center are all configurable in the UI.
  • When center text is set, left and right are cleared, disabled in the UI, and hidden on the frame. When center is none, left and/or right work as usual.

Code quality

  • Added ApplyBarOverlayTextPositions for health bar and BTB layout.
  • Fixed ApplyClassColor load order (nil on frame init).
  • Preview applies width constraints to right text as well as left.

Decisions

Decision Rationale
All three slots on full frames Normal-sized bars with per-slot X/Y offsets.
Mini frames: center or sides Narrow bars; center and side text are mutually exclusive.
No center-aware width truncation Left/right width still only accounts for each other; overlap is handled via offsets for now.
BTB only on full frames Mini frames have no text bar settings or runtime bar.
Boss follows mini text rules Same center-or-sides behavior as pet and ToT on Mini Frame Edit.

Test plan

  • Player/target: left + right + center with X/Y offsets; /reload
  • Focus: same with default right text perhp
  • BTB: left, right, and center together
  • Pet / ToT: center only vs left+right (not all three)
  • Boss: same mini text rules as pet/ToT
  • Options preview matches in-game layout

Mini frames keep center-or-sides exclusivity; shared overlay layout reduces duplication and fixes preview width constraints.
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