Skip to content

Minimap: unify text sizing on one Text Size (px) control - #1808

Open
tough-griff wants to merge 2 commits into
EllesmereGaming:mainfrom
tough-griff:minimap-text-font-size
Open

Minimap: unify text sizing on one Text Size (px) control#1808
tough-griff wants to merge 2 commits into
EllesmereGaming:mainfrom
tough-griff:minimap-text-font-size

Conversation

@tough-griff

@tough-griff tough-griff commented Aug 28, 2026

Copy link
Copy Markdown

What does this PR do?

Unifies the five minimap text elements — clock, zone, coordinates, FPS/MS, and instance difficulty — onto a single Text Size slider (8–30 px), applied through ApplyMinimapFont the way the difficulty readout already was.

  • clockScale / locationScale / coordsScaleclockSize / locationSize / coordsSize. The FPS readout's separate fpsScale multiplier is removed; its existing fpsTextSize is now the only control.
  • The clock and zone edge-boxes size to their text instead of being scaled.
  • Drops the dead _G._EBS_* globals that only existed so the old sliders could live-SetScale, plus the hard-coded font sizes at fontstring creation.

Migration minimap_text_scale_to_font_size_v1 (profile scope) keeps every existing UI looking identical:

  • seeds each *Size key from old scale × the size that scale multiplied (clock/zone 10, coords 11; fpsScale folded into fpsTextSize), clamped 8–30
  • SetScale also multiplied each frame's anchor offsets, so a saved X/Y Offset was rendered in scaled space — the migration folds the old scale into clockOffsetX/Y, locationOffsetX/Y, coordsBelowOffsetX/Y, fpsOffsetX/Y too
  • the base map-edge inset is the only thing not compensated — ~1 px at the old 1.15 default, larger only at extreme scales

Net effect: existing minimaps keep their current text size and position; the controls just read in pixels now.

Closes #1806

How was it tested?

Changes applied against AtrocityUI profile, small adjustments were made since I'm running Ultrawide 1440p and wanted to size up my fonts. That's what inspired this change.

Screenshots

before, trying to increase size:
image

immediately after migration
image

1px adjustments after calculations:
image

Checklist

  • New settings default OFF — N/A: converts existing controls; the migration preserves every UI's appearance
  • Zero cost while disabled: unchanged; elements stay event-driven, nothing new registered
  • Cheap while enabled: unchanged tickers; adds only a SetSize on an addon-owned box inside an existing update tick
  • No writes onto Blizzard-owned frames: clock/zone/FPS boxes and the coord fontstring are all addon-created
  • Tested in-game on live; no version gates or pre-Midnight APIs added

🤖 Generated with Claude Code

@tough-griff
tough-griff force-pushed the minimap-text-font-size branch from 2e84779 to 6c9a1f0 Compare August 29, 2026 14:43
tough-griff and others added 2 commits August 31, 2026 13:33
Clock, zone, coordinates and the FPS/MS readout each resized through a
different mechanism -- a 0.5-2.0 "Scale" multiplier applied with SetScale
on the host frame, plus the FPS readout carrying its own text-size slider
on top of a scale. Replace all four with a single 8-30px Text Size slider
applied via ApplyMinimapFont, matching the instance-difficulty control,
and drop the fpsScale multiplier.

- clockScale / locationScale / coordsScale -> clockSize / locationSize /
  coordsSize; fpsScale removed (fpsTextSize stays)
- clock and zone edge-boxes now size to their text
- dead _G._EBS_* globals (only used to live-SetScale from the options) removed
- migration minimap_text_scale_to_font_size_v1 seeds the new *Size keys
  from the old scales (clock/zone x10, coords x11; fpsScale folded into
  fpsTextSize), clamped 8-30, so no minimap changes size

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PcbTBmdnc5d7ZXcLwVvGqe
SetScale on the clock/zone/coords/FPS host frame also multiplied that
frame's SetPoint offsets, so a user's saved X/Y Offset was rendered in
scaled space. Dropping to font size alone would shift any element that
ran a scale other than 1.0. Fold the scale into the raw offset keys
(clockOffsetX/Y, locationOffsetX/Y, coordsBelowOffsetX/Y, fpsOffsetX/Y),
clamped to the slider range. The base map-edge inset was scaled too and
is not compensated -- ~1px at the old 1.15 default, only visible for
extreme scales.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PcbTBmdnc5d7ZXcLwVvGqe
@tough-griff
tough-griff force-pushed the minimap-text-font-size branch from 6c9a1f0 to 38f91e5 Compare August 31, 2026 18:05
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.

Minimap text elements use inconsistent sizing controls (scale vs. font size)

1 participant