Skip to content

Keep the menu Medium on every input, and shrink a long version to fit - #1968

Merged
hckrman101 merged 2 commits into
NotRexed:mainfrom
nullifyshot:fix/menu-size-medium-version-fit
Nov 10, 2026
Merged

hckrman101 merged 2 commits into
NotRexed:mainfrom
nullifyshot:fix/menu-size-medium-version-fit

Conversation

@nullifyshot

@nullifyshot nullifyshot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

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.

  • Auto drew the menu Large (1.3× and wider margins) in fullscreen at 1080 lines and up whenever a controller opened it, and Medium otherwise. The menu changed size depending on which input you used.
  • The row is now Small, Medium and Large, with Medium as the default. The size no longer depends on the input.
  • An options file with menu_size=0 (the old Auto) loads as Medium. Without that step, the row's clamp would turn it into Small.
  • auto_pad, auto_large and the second prebake pass for "the other size Auto might pick" are removed. ui::unit no longer takes the fullscreen and controller arguments.

The banner's version shrinks to fit.

  • Since feat: Audio tab in the Insert menu with Volume and Mute in background #1270 added the Audio tab, there's less room beside the tabs. A source build's version (Hookshot v2.0.11-821-g7b81752) no longer fit, so the code dropped it completely.
  • It still tries the full text first, then drops (source …), as before.
  • If it's still too wide, at Small and Medium it now shrinks to the largest half-point size that fits, with 10 pt as the floor.
  • Large is unchanged: full size or not at all.
  • The shrinking is a small general helper, ui::fit_px in vk_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:

Menu size Hookshot v2.0.11-821-g7b81752-dirty Hookshot v2.0.12 (release)
Small 15 pt (fits as is) 15 pt
Medium about 11 pt (was hidden) 15 pt, as before
Large hidden, as before hidden, as before
  • readme.md: the options table and the Menu size note.

Tested

  • In game on Windows 11, RTX 5080, 1920×1080 fullscreen: the version shows at full size on Small and shrunk on Medium.
  • Not checked in game: switching between controller and keyboard with the menu open, and loading an older options file with menu_size=0. Both are covered by the test below.
  • tests/test_menu_size.py (new, game-free) covers:
    • the sizes, the labels and the old Auto value
    • fit_px on 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 guess
  • python -I -B tests/run_all.py: 296 passed, 1 failed, 49 skipped. The failure is test_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 compiles menu_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

…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>
@nullifyshot

Copy link
Copy Markdown
Contributor Author

Screenshots of the Gameplay tab at 1920×1080. They were taken from this branch's build in a headless run (HOS_HEADLESS=1 RX_VK_SHOT_MENU=1, keys from RX_VK_MENU_SCRIPT), on an RTX 5080. The version is a source build's, Hookshot v2.0.11-821-g7b81752-dirty.

Small: the version fits at its normal 15 pt.

Menu size Small

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.

Menu size Medium

Large: unchanged. The version isn't drawn, because it doesn't fit at full size.

Menu size Large

… 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>
@nullifyshot

Copy link
Copy Markdown
Contributor Author

Thanks for the review, hckrman101.

  • Test compiler: fixed in 9192909 (see the reply on the test). The full suite on Windows with llvm-mingw gives 295 passed, 2 failed. The failures are test_precompile_compute_guard, which needs the MSVC target's libraries on this PC, and test_fpx_sticky. That one passed on the run before and passes alone (run_all.py test_fpx_sticky), so it looks flaky when 24 run at once here. Neither touches these files.
  • Glyph sizes: the banner is part of what prebake's dry run draws, and fit_px only depends on the window's width and height, the Menu size and the version string. So the shrunk size is baked before the first open, at the same unit and width that prebake_needed tracks. I haven't timed the first open separately.
  • TV users: agreed, that's NotRexed's call. Anyone who wants the old controller size picks Large once.

@hckrman101
hckrman101 merged commit ab0aee5 into NotRexed:main Nov 10, 2026
9 of 10 checks passed
@nullifyshot
nullifyshot deleted the fix/menu-size-medium-version-fit branch November 11, 2026 10:02
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