Repository navigation
Keep the menu Medium on every input, and shrink a long version to fit - #1968
Merged
hckrman101 merged 2 commits intoNov 10, 2026
Merged
Conversation
…s to fit Menu size Auto drew the menu Large whenever a controller opened it in fullscreen at 1080 lines and up, so the menu changed size with the input. Auto is gone: Small, Medium and Large, Medium by default. An options file's menu_size=0 (that Auto) loads as Medium, not the Small the row's clamp would give. Since the Audio tab (NotRexed#1270) the banner's version no longer fitted beside five tabs for a source build ("v2.0.11-821-g7b81752") and was dropped. At Small and Medium it now shrinks to the largest half-point size that fits, 10 points at the least (vk_ui.h fit_px); a release's "v2.0.14" fits at 15 points as before. At Large, the size for a TV across the room, it stays at its size or not at all. tests/test_menu_size.py: the sizes, the labels, the old Auto, and fit_px on a stand-in font. Assisted-by: Claude Opus 5.5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Screenshots of the Gameplay tab at 1920×1080. They were taken from this branch's build in a headless run ( Small: the version fits at its normal 15 pt. Medium (the default now): the same text, shrunk to fit beside the tabs. Before this PR it wasn't drawn at all at this size. Large: unchanged. The version isn't drawn, because it doesn't fit at full size. |
… checks
It took CXX from the environment and fell back to g++, so without g++
(llvm-mingw's clang++ only, say) run_all failed it instead of skipping
it. RUN_ALL_ARGS = ["--cxx", "{cxx}"] and --cxx, as test_menu_keys.py.
Assisted-by: Claude Opus 5.5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
|
Thanks for the review, hckrman101.
|
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.



The Insert menu got bigger whenever a controller opened it, and the build version at the top left disappeared after the Audio tab was added. This keeps the menu one size, Medium by default, and makes a long version shrink to fit instead of vanishing.
What changed
Menu size: no more Auto.
menu_size=0(the old Auto) loads as Medium. Without that step, the row's clamp would turn it into Small.auto_pad,auto_largeand the second prebake pass for "the other size Auto might pick" are removed.ui::unitno longer takes the fullscreen and controller arguments.The banner's version shrinks to fit.
Hookshot v2.0.11-821-g7b81752) no longer fit, so the code dropped it completely.(source …), as before.ui::fit_pxinvk_ui.h. It takes the text's own width at a given size, so it works for any version string and any text.Measured with the game's own menu font at 1920×1080. The widths scale with the window height, so 1440p and 4K give the same sizes:
Hookshot v2.0.11-821-g7b81752-dirtyHookshot v2.0.12(release)readme.md: the options table and the Menu size note.Tested
menu_size=0. Both are covered by the test below.tests/test_menu_size.py(new, game-free) covers:fit_pxon a stand-in font: text that fits as is, the largest step that fits, nothing below the floor, Large never shrinking, and rounding on either side of the first guesspython -I -B tests/run_all.py: 296 passed, 1 failed, 49 skipped. The failure istest_precompile_compute_guard, which needs the MSVC target's libraries on this PC and doesn't touch these files.tests/test_stick_dead_zone.py, which compilesmenu_init's options loop, passes. That's why the old-Auto check sits outside that loop.Screenshots
Small, Medium and Large at 1920×1080 are in this comment.
🤖 Generated with Claude Code