Skip to content

In-game menus Part C: A button of your own opens the quick menu at once - #680

Open
davdxpx wants to merge 4 commits into
igawa6:mainfrom
davdxpx:ingame-quick-button
Open

davdxpx wants to merge 4 commits into
igawa6:mainfrom
davdxpx:ingame-quick-button

Conversation

@davdxpx

@davdxpx davdxpx commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

On the AYN Thor, Home belongs to Android: it goes to the launcher and closes the game. Back opens the game menu, and the quick menu is one step further. With this change a player picks a button of their own that opens the quick menu at once, by pressing it. Nothing is set by default.

Builds on Part A (#678, the two menus) and Part B (#679, one menu and the layout's question).

What players get

  • Set up by pressing the button. Settings › Controls › Controller › Quick menu button: "Press a button", and the next press of the controller is it. Back cancels.
  • Asked at the start. While no button is set and a controller is attached, the app asks once when it starts: Set up, Later or Never.
  • A warning for a button games use. A, B, X, Y, the shoulders, the sticks' presses, the D-pad, + and −: "While it opens the quick menu, the game no longer gets it". Use it anyway, or pick another. A button games leave free, such as a back button, is taken at once.
  • Home stays as it is: pressed the game menu, held the quick menu (on an Xbox controller too). Home itself, Android's own buttons and the volume cannot be picked.
  • In a game the button opens the quick menu (with one menu: on the tab shown last) and closes whichever menu is open. A button the menus move with (the D-pad, A, B, L, R) keeps that job while a menu is open. The game menu's Quick menu row names the button.

Pictures

The question at the start Press a button The warning
01-question 02-press-a-button 03-warning
The row in Settings The game menu naming it
04-settings-row 05-game-menu

How it is built

dev.peanuts.ui.QuickButton asks for the button, names it and warns; PeanutsPrefs.quickKey keeps it in the launcher's prefs, which the game's process reads when it starts. In the game one marked hook in GameActivity.dispatchKeyEvent hands the button to InGamePanel.quickKey, after the controller's Back and before the − + combination. PEANUTS.md and peanuts/UPSTREAM-EDITS.md list the hook and the new file.

Tested

  • Thor, test app, Pokémon Legends: Z-A on a copy of the save: the question at the start, Set up, the right stick's press with its warning, Use it anyway; in the game it opens the quick menu (one menu: on the tab shown last) and closes it again; the game menu's Quick menu row names it; Change and Remove from the settings row.
  • Thor, test app, at the start with no layout picked and no button set: Home's list shows the layout question alone (also after it fills again meanwhile), and the quick button's question comes only once it is closed.
  • peanuts/tests/test_ingame_menus.py; upstream-update.sh --check; check-publish.sh; check-min-api.py on the APK.

Upstream's one in-game panel with five text tabs becomes two menus, as on a
console: everything about this session at the left, everything that tunes the
running game at the right. The game keeps running behind both.

- The game menu: the game's cover, name, version and this session's time;
  Back to the game, Pause the game, Quick menu, Back up the save (copied while
  the game runs, checked before and after the copy), Button mapping, Share log,
  and Stop the game set apart at the bottom, asked once inline.
- The quick menu: the panel's tabs on a rail of solid icons at the left
  (Performance, Display, Cheats, Mods, Controls, the menu's own settings at the
  bottom). Cheats and Mods are two tabs now. A header with Back and the tab's
  name, section heads in capitals, a slider's value at its right.
- Home pressed, - and + held, Back and a swipe in from the left edge open the
  game menu; Home held opens the quick menu, as do a swipe in from the right
  edge and a long press on the on-screen controls' button.
- Calm motion: in 240 ms decelerating, out 180 ms, on hardware layers.
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