fix(menu): keep the FPS counter off the banner on a window just wider than 16:9 #1545

Merged
hckrman101 merged 1 commit from fps-counter-banner into main 2026-11-10 07:47:51 +00:00
hckrman101 commented 2026-11-10 07:32:51 +00:00 (Migrated from github.com)

In a normal 1280x720 window, the FPS counter is drawn on top of the menu's tabs while the menu is open.

The game area of such a window, without its title bar, is about 1278x690: a little wider than 16:9. Since #1459, a window wider than 16:9 draws the menu in a centred 16:9 column and moves the counter to the window's top corner, beside the banner. On a window only a little wider, the column covers almost the whole width, so the corner is still over the banner. Now the counter moves to the corner only when it fits beside the column; otherwise it stays under the banner, as on 16:9. Real ultrawide windows (2560x1080, 3440x1440, 5120x1440) are unchanged.

Before After

(1280x720 window, Menu size Large, Gameplay tab.)

How it was tested: tests/run_all.py (all pass except tests/test_linux_update.py, which fails the same way on main), the Linux build and the Windows DLL cross-build, and headless runs in 1280x720 and 1920x1080 windows and at 2560x1080, 3440x1440 and 5120x1440.

In a normal 1280x720 window, the FPS counter is drawn on top of the menu's tabs while the menu is open. The game area of such a window, without its title bar, is about 1278x690: a little wider than 16:9. Since #1459, a window wider than 16:9 draws the menu in a centred 16:9 column and moves the counter to the window's top corner, beside the banner. On a window only a little wider, the column covers almost the whole width, so the corner is still over the banner. Now the counter moves to the corner only when it fits beside the column; otherwise it stays under the banner, as on 16:9. Real ultrawide windows (2560x1080, 3440x1440, 5120x1440) are unchanged. | Before | After | |---|---| | <img src="https://github.com/hckrman101/Hookshot/raw/pr-assets/fps-banner/before-1280x720.png" width="100%"> | <img src="https://github.com/hckrman101/Hookshot/raw/pr-assets/fps-banner/after-1280x720.png" width="100%"> | (1280x720 window, Menu size Large, Gameplay tab.) **How it was tested:** `tests/run_all.py` (all pass except `tests/test_linux_update.py`, which fails the same way on main), the Linux build and the Windows DLL cross-build, and headless runs in 1280x720 and 1920x1080 windows and at 2560x1080, 3440x1440 and 5120x1440.
Commenting is not possible because the repository is archived.
No description provided.