Skip to content

Add HUD scale setting#1387

Open
KevinLemaMartinez wants to merge 3 commits into
TwilitRealm:mainfrom
KevinLemaMartinez:hud-scale
Open

Add HUD scale setting#1387
KevinLemaMartinez wants to merge 3 commits into
TwilitRealm:mainfrom
KevinLemaMartinez:hud-scale

Conversation

@KevinLemaMartinez
Copy link
Copy Markdown

@KevinLemaMartinez KevinLemaMartinez commented May 15, 2026

Adds a configurable HUD scale slider (50–200%) that scales hearts, buttons, mini-map and other gameplay HUD elements without affecting dialog boxes or menus.

Had to manually clamp the UI elements because the UI scaling pushes them toward the center of the screen.

Pending:

  • Only tested with the core HUD elements (hearts, buttons, mini-map). Remaining UI elements still need to be reviewed.
  • Live preview on slider drag is not yet implemented. Would like to explore the same approach used for resolution changes to apply the scale in real time without needing to close the settings menu.

Preview:
Captura de pantalla 2026-05-15 a las 10 03 34
Captura de pantalla 2026-05-15 a las 10 04 10

@KevinLemaMartinez KevinLemaMartinez marked this pull request as draft May 15, 2026 08:23
@depende3000
Copy link
Copy Markdown

depende3000 commented May 15, 2026

Absolute game changer! Tried the 50% mode with the AppImage on Linux on my Steam Deck, and looks amazing this way. The minimal map makes so much sense, night and day difference (The hide D-Pad function also does wonders). Good job 👍

A66A9A9A-BADA-47EE-9D22-9BF58C9FA971_4_5005_c

@GiorgioMendieta
Copy link
Copy Markdown
Contributor

Just for info, this would fix #881

@encounter
Copy link
Copy Markdown
Member

This looks pretty good so far. Would you mind wrapping all changes to the original code in #if TARGET_PC? The idea is to allow the original decompilation to continue matching by wrapping our changes to it

Adds a "HUD Scale" preference (50%–200%) that scales the gameplay HUD
(hearts, magic/lantern meter, light drops, rupees/keys, action buttons
and the mini-map) without affecting dialog boxes or menus.

Each HUD group is scaled around its own pane origin and nudged toward
its anchor corner (via dApplyHudCorner) so it stays put against the
screen edge instead of drifting toward the centre when shrunk. The
mini-map is scaled and shifted in d_meter_map so its bottom-left corner
stays anchored. The setting is clamped to a safe range and is a no-op on
non-PC targets. It is disabled in the menu while Minimal HUD is enabled.

Signed-off-by: kevin Lema <kevin.soesto@gmail.com>
Extends the HUD Scale setting to the item ammo counters, the lantern oil
  gauge and the small-key counter, and gives the oil/magic meter a reduced
  horizontal anchor pull so it stays on-screen at small scales.

Signed-off-by: kevin Lema <kevin.soesto@gmail.com>
Signed-off-by: kevin Lema <kevin.soesto@gmail.com>
@KevinLemaMartinez
Copy link
Copy Markdown
Author

This looks pretty good so far. Would you mind wrapping all changes to the original code in #if TARGET_PC? The idea is to allow the original decompilation to continue matching by wrapping our changes to it

Done — all changes to the original code in d_meter2_draw.cpp and d_meter_map.cpp
are wrapped in #if TARGET_PC

@KevinLemaMartinez KevinLemaMartinez marked this pull request as ready for review May 31, 2026 20:51
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.

4 participants