Skip to content

General: HUD Centered / At edges (#817) - #821

Merged
peiikai merged 1 commit into
developfrom
feature/817-hud-edges
Nov 16, 2026
Merged

peiikai merged 1 commit into
developfrom
feature/817-hud-edges

Conversation

@peiikai

@peiikai peiikai commented Nov 16, 2026

Copy link
Copy Markdown
Owner

Closes #817.

What changed

A new HUD row in Settings > General: Centered / At edges. With Aspect ratio set to Unlocked and a window that isn't 16:9, At edges moves the HUD out of the centred 16:9 box to the screen's edges: hearts and keys to the left edge, item buttons and rupees to the right. On 21:9 and 32:9 monitors this puts the HUD in the corners instead of in the middle of the screen. The row is greyed out while Aspect ratio is Original 16:9.

  • Desktop default: Centered (as before).
  • Phones and tablets: they already always put the HUD at the edges. They now follow the same setting, with At edges as their default, so nothing changes for them unless the player picks Centered.

How

No new game patches. The phone and tablet layout in runtime/hle/hud_corners.c already moves the HUD's panes (from the existing HUD_HEARTS_SITE hook), and the Metal and Vulkan draw paths for it (renderer.m, vulkan/exec.c: the window-wide viewport for layout draws and the cleared bars in boxed rooms) were already shared by every platform. Only the game-thread part was behind PLAT_TOUCH. It now runs everywhere when the setting is At edges. The touch-only parts (camera cutout insets, hiding X/Y under the on-screen controls) stay behind PLAT_TOUCH.

  • runtime/settings.{h,c}: hud_pos, saved as hud = centered | edges.
  • runtime/ui/difficulty.mm: the General tab row.
  • runtime/ui/lang/*.inc: the 4 new strings in all languages.
  • docs/debug-hooks.md: LARECOMP_HUD_EDGES (new, forces At edges) and LARECOMP_NO_HUD_CORNERS (existing).

Testing

macOS, Metal (Apple Silicon). Scratch save and settings, muted, scripted runs with tools/shot.sh:

  • 21:9 (1680x720), At edges, Field (Mabe Village) with an item on X: hearts at the top-left edge, X button at the top-right edge.
  • 32:9 (2560x720), At edges, same spot: the same, at the far edges.
  • 32:9, At edges, Tail Cave entrance (a boxed room): the HUD sits in the black side bars, as it does on phones.
  • 21:9 and 32:9, Centered: the HUD stays in the 16:9 box, as before.
  • General tab with the menu open: the row shows At edges, and the HUD stays at the edges under the menu.

Not tested: Vulkan (Windows/Linux) and phones/tablets. The Vulkan draw path is the same code phones on Android already use. On iOS and Android the default keeps today's layout.

🤖 Generated with Claude Code

On windows wider or taller than 16:9 (Aspect ratio Unlocked) the HUD can now
sit at the screen's edges instead of in the centred 16:9 box: hearts and keys
to the left edge, item buttons and rupees to the right. It uses the phone and
tablet layout that already existed (runtime/hle/hud_corners.c), so the Metal and
Vulkan draw paths are unchanged. Phones and tablets now follow the setting too,
with At edges as their default; elsewhere the default is Centered.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@peiikai
peiikai merged commit 9d0f046 into develop Nov 16, 2026
8 checks passed
@peiikai
peiikai deleted the feature/817-hud-edges branch November 16, 2026 03:22
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