WIP: fix(menu): a row that takes a restart says so before it is changed, and the help box keeps its place #304
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/upscaling
beanstalk: approved @ 1697603
beanstalk: approved @ 2c5a62e
beanstalk: approved @ 4fd82b7
beanstalk: approved @ 64d6d09
beanstalk: approved @ 6f91fae
beanstalk: approved @ 70a78f9
beanstalk: approved @ 8015c9a
beanstalk: approved @ 8d361dc
beanstalk: approved @ 9d8356e
beanstalk: approved @ abf2227
beanstalk: approved @ d82f202
beanstalk: approved @ e5f1e40
beanstalk: approved @ ee8ab5f
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
testing wanted
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!304
Loading…
Reference in a new issue
No description provided.
Delete branch "snaildev99/Longshot:fix/menu-restart-note"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why
In the Insert menu you cannot tell which rows take a restart before you change one: "Takes effect after a restart" shows in the help only once the row is changed. And when it shows, the help box grows and its title jumps up, so the change is hard to follow with the eye. Both were found by a player going through the menu by hand.
What changed
gpu/vk/vk_menu.cpp,restart_note,help_box): the help of every row that takes a restart says "Takes effect after a restart" before the row is changed, in the tone of the hint's bar (ui::kAccent), and in gold (ui::kGoldHi) once it is changed, as before.restart_notegives 0 (not such a row), 1 or 2 whererestart_changedgave a yes or no.help_box): the box keeps the height of the tallest help (min_h) so that it does not jump, but added the note (30) and the "Restart needed" line (52) on top of it; where it then passed the prompt strip, the whole box moved up. Both now stand in the height the box keeps, the line at the box's foot. The box grows only when the help itself leaves them no room. The narrow window's estimate of the box is its kept height.restart_line_shown): with the note in gold on a changed row, the "Restart needed" line under it said the same a second time. It shows when something other than the selected row waits for a restart, and then lists all of it: it is for keeping track of what else waits.tests/test_menu_restart.pyreads the three; the README's paragraph on the rows that take a restart says them.Flags and settings
Measurements
main:
514591a3(2026-11-13)this PR: fix/menu-restart-note @
ea668e00Hardware: RTX 3090, Windows 11
Scene: the Insert menu's Graphics tab over the game in play, 2048x1152; the Output resolution and Profile rows
Method: this PR's
tests/test_menu_restart.pyon main's sources and on this PR's (the same file copied over main's), twice each, the same result both times; and the menu by hand, with the two pictures belowHow to reproduce:
python -I -B tests/test_menu_restart.py --cxx clang++ --cc clang; in the game, F1, the Graphics tab, select Output resolution, then change it514591a3ea668e00tests/test_menu_restart.py(this PR's)vk_menu.cpp: the help does not say that a row takes a restart before the row is changedTesting
Tested:
python -I -B tests/run_all.pyon Windows 11 atea668e00, with llvm-mingw'sbinon the path: 495 passed, 33 skipped, 5 failed. The same five fail on main @514591a3on this PC:test_menu_i18n(a stale key in the tables, #273's),test_check_third_party,test_portable_builder_home,test_portable_builder_startup(no .NET SDK here),test_release.vk_menu.cppcompiled alone atea668e00with the build's flags and include folders (llvm-mingw's clang,-fsyntax-only): no error, no new warning.Not tested:
help_box,restart_note,restart_line_shownand their callers only.Needs other testers:
Screenshots
Both are from the test build named under Testing (this PR's commits on top of #134), Windows 11, RTX 3090, taken by the tester. main has no build of the same spot to put beside them here: on main the first picture's note is not there.
this PR @
ea668e00(in the test build): a row that takes a restart selected and not changed. Its help says "Takes effect after a restart" in the lighter tone, so a player sees before a change that it will ask for a restart.this PR @
ea668e00(in the test build): one setting changed and selected. In this build the note is then gold, the box and its title stay where they were, and with only this row waiting there is no "Restart needed" line.Risk and rollback
Only the Insert menu's help box changes. A help as tall as the tallest one, on a row that takes a restart, with other rows waiting, makes the box grow as before (none does today: the tallest is the Bug report's line after a save). Reverting the three commits is enough; each also reverts alone.
Reviewer notes
restart_line_shownif you prefer the stricter rule.help_boxcall; whichever goes in second I rebase.Issues
None.
Checklist
For everyone
type(scope): description).main.python -I -B tests/run_all.pyrun and passing (any failure that also fails onmainis named above).third_party/untouched (a new folder with aPROVENANCE.mdinstead).If applicable
Assisted-by:/Co-Authored-By:trailers.mainand passing here.tests/that reads changed source updated in this PR, not weakened.🤖 Generated with Claude Code
WIP: fix(menu): a row that takes a restart says so before it is changed, and the help box keeps its placeto fix(menu): a row that takes a restart says so before it is changed, and the help box keeps its placefix(menu): a row that takes a restart says so before it is changed, and the help box keeps its placeto WIP: fix(menu): a row that takes a restart says so before it is changed, and the help box keeps its placeBack to work in progress for one box: I had marked this ready, and the check then pointed out that
gpu/vk/vk_menu.cppcounts as host code, so "Host code builds on both Windows and Linux" applies. It is built on Windows only (our PC has no Linux). The box is in the checklist now, unticked, with a test request for a Linux build and a look at the Graphics tab: T-FZGV. It needs the "testing wanted" label from a maintainer before anyone can claim it. Nothing else changed; the description's other sections are as they were.The Mods tab's half of the same tester's notes is #305, on top of #134.
Yeetbot90 referenced this pull request2026-11-14 10:05:30 +00:00
ea668e00fd4d83422631Rebased onto
main@7bacf846: no conflicts. No tests were run here; the test boxes stay yours.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.