Repository navigation
General: HUD Centered / At edges (#817) - #821
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
How
No new game patches. The phone and tablet layout in
runtime/hle/hud_corners.calready moves the HUD's panes (from the existingHUD_HEARTS_SITEhook), 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 behindPLAT_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 behindPLAT_TOUCH.runtime/settings.{h,c}:hud_pos, saved ashud = 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) andLARECOMP_NO_HUD_CORNERS(existing).Testing
macOS, Metal (Apple Silicon). Scratch save and settings, muted, scripted runs with
tools/shot.sh: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