feat(menu): the Controls tab in General, Controller and Keyboard + Mouse sections #2993
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
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
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2993
Loading…
Reference in a new issue
No description provided.
Delete branch "llun/Longshot:feat/controls-sections"
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?
Summary
The Insert menu's Controls tab listed controller, keyboard and mouse rows mixed together in one list, so it was hard
to tell which input a row changes. Walk speed is the example that prompted this: it sets how far the keyboard's movement
keys tilt the stick while Link walks, but it reads as if it changed a controller too.
The tab now has three sections, by the input a row changes:
controller's right stick only:
host/nn_hid.c,host/pad_sdl.c), Vibration, Vibration strength, Test vibration,DualSense HD Haptics, Motion, Controller menu button.
Walk speed, Menu shortcut, Compact menu key, Command palette key.
Every row keeps its key, its label, help, values and defaults; only its place changes. The two new headings' names
(General, Keyboard + Mouse) are translated in all 13 menu languages, by me, not checked by speakers. The settings table in
docs/user/graphics-and-controls.mdfollows the new order, and its Controls section says what each section is for.This was first made for
main; it is remade here formod-api's menu, at a maintainer's request.Read first:
game/mods/menu/src/layout.ts(the three headings, with the Controls and Motion links), then each row'splaceingame/mods/controls,interface,sprint-walkandcamera-centering'smod.toml, then PLACED ingame/mods/menu/test/menu.test.ts.Testing
Tested: Windows 11, in the game: RTX 5080, driver 621.47, 1280x720 window, at the title screen with a fresh profile, sound off, the sandbox on; this change on
mod-api582b6a1ab. All 25 rows of the Controls tab were seen under General, Controller and Keyboard + Mouse, in the order above. Through the control bridge,walk_speed,controller_in_background,invert_camera_x,menu_shortcutandcommand_palette_keyread their defaults, and Walk speed set to 50% was saved aswalk_speed = 50in the profile'ssettings.toml. No FATAL line, and no system mod that did not start, in the log.mod-apid6b5bd512: the same diff (same patch-id). The game was not built again on it.mod test game/mods/menuond6b5bd512: 52 passed. The updated layout tests fail on582b6a1abwithout this change (2 of 7) and pass with it.cargo teston582b6a1ab, llvm-mingw: modtool 224 passed, sprint-walk 31, camera-centering 4, api 497; none failed. The rest of the Rust workspace was not run.mise run test(Windows, 12 at once) on582b6a1ab: 782 passed, 39 failed, 50 skipped. The same 39, run without this change: all 39 fail. Some may come from this PC's setup. They are:test_astc_upload_chunking,test_async_astc_upload_chunks,test_bind_memo,test_blocks_at_start,test_direct_buffer_writes,test_draw_stream_visibility,test_drawn_page_map,test_early_split_before_draw,test_flat_map,test_fsr_image_retirement,test_fsr_uniform_ownership,test_game_menu_mouse_buttons,test_helpers_extract,test_image_reaper_threads,test_import_reach,test_input_movie,test_late_fix_build,test_lifter,test_longshot_builder,test_menu_i18n,test_mirror_bookkeeping,test_pass_barrier,test_present_acquire_ahead,test_present_image_free,test_readback_timeout_reuse,test_recorder_sync,test_recording_admission,test_report_words,test_staging_burst,test_target_retention,test_tex_desc_memo,test_text_keyboard_policy,test_ub_snapshot_default,test_ub_snapshot_gpu_writes,test_ui_keys_by_keycode,test_vram_compact,test_wb_diff_stale_shadow,test_wb_pending_capture,test_wrote_regions.mise run lint: passes.scripts/check_guide_screenshots.py --review-sources: the same as without this change.dev.py smokeon582b6a1ab: FAIL, only because its screenshot was not taken ("the PNG could not be written"); the game was in play and the Insert menu opened. Whether it fails without this change was not checked.Still to test: None.
Measurements
Nothing to measure: the rows' order and three headings on one menu tab, no rendering or game code.
Risks
A player sees the Controls tab's rows in a new order, under three headings; their saved settings are unchanged (no key
changed). A mod that places a row
beforeoraftercontrols_pagenow gets it under General. One with a place in theControls tab and no section gets it above General. A revert is enough.
Checklist
Ready for review
mod-api; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmod-apiis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
tests/that reads changed source is updated, not weakened.mod-apiand here, for a change that shows on screen. (Here only, in a comment: the row names, with the background made black so no game art is in it. No picture ofmod-apiwithout the change was taken; its order is the oldcontrolslist in PLACED,game/mods/menu/test/menu.test.ts.)Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
Tested in game: Windows 11, RTX 5080, NVIDIA driver, 1280x720 window, a pack on the shared base
56823e27through the job queue, the title screen: the Insert menu's Controls tab shows General, Controller and Keyboard and mouse with their rows; the arrow keys step over the headings and the 24 rows wrap; walk_speed set to 50% through the control bridge was saved as walk_speed=50 under its old key; no menu diagnostics in the log.The Controls tab before and after, rendered without the game by the UI-only helper (
scripts/screenshots/capture_menu.py, WSL Ubuntu 24.04, clang 18.1.3; the bundled Libertinus fonts, no game assets).Main

56823e27:This pull request:

Possibly related, for context:
WIP: feat(menu): the Controls tab in General, Controller and Keyboard and mouse sectionsto feat(menu): the Controls tab in General, Controller and Keyboard and mouse sectionsRecommendation: Approve. The new sections make the Controls tab easier to navigate, and the reported in-game run shows the intended order and navigation. CI is still running. Nothing blocking is left. Recommend approval; not approved on the forge.
Groups existing control settings by input without changing their keys, values or defaults. The change uses the existing menu section mechanism and adds a check of the complete Controls order.
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes. The author reports that the three sections, keyboard navigation, row wrapping and saving Walk speed worked in game on Windows 11. This is not a performance change.
Other systems: The change affects menu layout and translated heading text, not input processing. The reported in-game run covers Windows; the game-free helper also rendered the menu on Linux.
Switches: None.
Reviewed:
0bf5769f90against56823e27a1: Read the repository rules, PR template, standards, commit messages, changed menu modules and section test. Reviewed the changes to the other code and tests with their surrounding menu model and navigation paths; skimmed the translation additions, guide manifest and source-review record. The full large files vk_menu.cpp, menu_i18n.h, manifest.json and the two existing changed tests were not read in full.; nothing run (a code review).Checked and fine:
Testing: No commands that build, run tests or execute project code were run for this review. The author reports an in-game Windows run, game-free Linux rendering, and matching test failures on the base and this branch. Forgejo CI is still running.
Overlaps and merge order: Not checked; network access is closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as llun took it out of WIP. Nothing was run; a maintainer decides.
feat(menu): the Controls tab in General, Controller and Keyboard and mouse sectionsto feat(menu): the Controls tab in General, Controller and Keyboard + Mouse sectionsThe third heading is now "Keyboard + Mouse" instead of "Keyboard and mouse", and its 13 translations use "+" too. The rows and their keys are unchanged; earlier pictures here show the old name. Tested again in the game, and this time all 24 rows were seen: the earlier run had not shown the last four (Walk mode to Compact menu key), although Testing said it had.
mise run testwas run again too (54 failures, all also on main).6b5156c1690352f58e61Moved to
mod-api, as a maintainer asked.mod-api's menu is built differently, so the change is remade there instead of replayed: the headings are in the menu mod's layout and each row'splacenames its section. The sections, and the rowsmainalso has, are the same; Command palette key is added under Keyboard + Mouse. Head0352f58e6ond6b5bd512; tested in the game on582b6a1ab, the same diff. Earlier comments and pictures here are of the version formain.The Controls tab on
mod-apiwith this change, from the game run on582b6a1ab(the same diff). Cropped to the row names, enlarged, and the background made black so no game art is in it; the lettering is the menu's bundled font. The columns are three scroll positions side by side, so some Controller rows show twice. The values are cut off.@review
Recommendation: Approve. The Controls tab groups its existing settings by input, and the reported game run shows the new layout working. CI is still running and must pass before merge. Nothing blocking is left. Recommend approval; not approved on the forge.
Players get General, Controller, and Keyboard + Mouse sections without changing saved setting keys or defaults. The change keeps placement in the existing mod layout and adds translated headings and updated documentation.
Checks: Still running: 11 checks.
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Not a perf change. The author reports seeing all 25 rows in their intended sections in a Windows game run, and saving Walk speed under its existing key.
Other systems: The menu layout is shared across platforms; the change does not alter input processing or graphics code. Mods placing rows around controls_page now place them in General, while unsectioned Controls rows appear above it, as the description notes.
Switches: None added, changed, or removed.
Reviewed:
0352f58e61againstd6b5bd5123: Read the repository rules, contribution guide, PR template, standards, diff, layout, changed placement declarations and related tests; skimmed translations and recorded test reports. The review checklist file is absent. The full changed code files and placement implementation were not all read in full.; nothing run (a code review).Checked and fine:
Testing: The author reports a Windows in-game run and 52 passing menu tests; the same 39 broader test failures occurred on the base. CI is still running. No commands from the project were run for this review.
Overlaps and merge order: Not checked; network access is unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.