Skip to content

MythicTimer: reserve threshold-label space early for Gaps style too - #2020

Merged
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/mplus-timer-gaps-placement
Sep 8, 2026
Merged

MythicTimer: reserve threshold-label space early for Gaps style too#2020
EllesmereGaming merged 1 commit into
EllesmereGaming:mainfrom
dfrisone:fix/mplus-timer-gaps-placement

Conversation

@dfrisone

@dfrisone dfrisone commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Fix from Svart. His GitHub account is currently suspended, so this is being submitted on his behalf.

What does this PR do?

Fixes Mythic+ Timer's threshold time labels (e.g. 19:12/02:36) rendering directly on top of the main clock text (e.g. 23:00/32:00) when Thresholds style is set to Gaps and Enemy Forces Position is set to Bottom.

Gaps style renders the threshold labels above the timer bar, the same as Under Timer Bar mode. But the code only reserved vertical space for that row before positioning the bar when Enemy Forces Position was Under Timer Bar. With Bottom selected, that reservation ran after the bar instead, leaving nothing held open between the clock text and the bar.

Fix: reserve the space early whenever Gaps style (timerBarStyle == "SEGMENTS") is active, not just in Under Timer Bar mode, matching the pattern already used correctly there.

How was it tested?

Author-tested by Svart; not independently retested in-game by me before opening this on his behalf.

Checklist

  • New settings default OFF (no behavior change without opt-in) -- N/A, no new settings
  • Zero cost while disabled: no events registered, no polling, no hooks doing work, no frames built -- N/A, this only touches an existing per-render layout branch
  • Cheap while enabled: event-driven (no polling, no timer-based logic, no per-frame allocations) -- the change is one extra boolean check in an existing render pass, no new work added
  • No writes onto Blizzard-owned frames (weak-table pattern used); HookScript/hooksecurefunc only, never SetScript on Blizzard frames -- N/A, this only affects EllesmereUI's own timer frame layout
  • Tested in-game on live; no version gates or pre-Midnight APIs added -- see note above

Gaps style (timerBarStyle == "SEGMENTS") renders the threshold time
labels above the timer bar, the same as Under Timer Bar mode. But the
code only reserved vertical space for that row before positioning the
bar when Enemy Forces Position was set to Under Timer Bar. With Bottom
selected, the reservation ran after the bar instead, leaving nothing
held open between the clock text and the bar -- so with Gaps style and
Enemy Forces Position=Bottom, the threshold labels rendered directly on
top of the main clock text.

Reserve the space early whenever Gaps style is active, not just in
Under Timer Bar mode, matching the pattern already used correctly
there.

Fix from Svart. His GitHub account is currently suspended, so this is
being submitted on his behalf.
@EllesmereGaming
EllesmereGaming merged commit 18a8263 into EllesmereGaming:main Sep 8, 2026
1 check passed
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.

2 participants