Skip to content

In-game menus Part B: One menu, at the right or on the bottom screen, picked once with pictures - #679

Open
davdxpx wants to merge 3 commits into
igawa6:mainfrom
davdxpx:ingame-menus-bottom
Open

davdxpx wants to merge 3 commits into
igawa6:mainfrom
davdxpx:ingame-menus-bottom

Conversation

@davdxpx

@davdxpx davdxpx commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Some players want one menu instead of two, and a poll did not find one layout everybody prefers. So the player picks: after the update (and for a new player after the first start's setup) the app asks once, with a picture of each layout: Two menus (the game menu at the left, the quick menu at the right), One menu at the right, and on a device with a second screen, such as the AYN Thor, One menu on the bottom screen. One menu holds everything: its rail starts with Game (the game menu's rows) above the quick menu's tabs. On the bottom screen the game stays in full view on top, so every change to the frame rate, the picture or a cheat shows on the screen you are watching.

Builds on Part A (#678): the game menu at the left, the quick menu at the right.

What players get

  • Picked once, with pictures. The question shows the layouts side by side; a press or a tap picks one. Later keeps two menus and asks again at the next start. On a device with two screens the focus starts on the bottom screen's layout, marked For two screens. The menu's own settings change it later (Layout).
  • One menu, Game first. Its rail starts with Game (Back to the game, Pause, Back up the save, Button mapping, Share log, Stop) above the quick menu's tabs (Performance, Display, Cheats, Mods, Controls, the menu's settings). On Game its own header (the cover, the name, the version, this session's time) is the top, as in the game menu.
  • Opening: Home pressed (on the AYN Thor: Back) opens it on Game, held on the tab shown last; − and + held open it too.
  • At the right: it slides in over the game where the quick menu does. The swipe in from the right edge and the on-screen controls' button open it; the left edge is left to the game.
  • On the bottom screen: no sheet over the game, which is dimmed a little as behind the other menus: it runs on, but is not being played (a touch on it closes the menu). The game keeps the controller's focus, and the menu takes the keys while it is open. On the bottom screen's own page (the live stats or Now playing) a faint grip at the bottom edge shows where it comes from, and a swipe up from that edge opens it with a finger. Swipes on the top screen still open the menus there, for a quick look without the second screen.
  • Moving: L and R step over Game and the tabs, up and down move through the rows, B closes it. A touch sets a value directly, and the game shows its effect while the finger moves.
  • Stop stays in sight: Game's rows scroll under the header while Stop the game is kept at the bottom, as in the game menu; a row cut by the edge fades out.
  • The bottom screen is given back when the menu closes: it slides down in 220 ms and its window goes, so what was there before (the game's live stats, a companion, Android's launcher) is back as it was. When the game leaves the screen, the window goes at once.

Pictures

Game on the bottom screen A tab (Performance) The top screen meanwhile
01-bottom-game 02-bottom-tab 03-top-meanwhile
One menu at the right Layout in the menu's settings The question, picked once
06-one-menu-right 05-layout-setting 07-layout-question

How it is built

One menu is a second instance of upstream's SidePanel that builds the same tabs (one marked hook, rows()), its rail with Game first (dev.peanuts.ingame.GameRows). At the right it sits in the game's window above the quick menu; what opens the quick menu opens it instead (one marked hook at the top of SidePanel.open). On the bottom screen it lives in a presentation window (dev.peanuts.ingame.BottomScreen) that never takes the input focus, so the controller stays with the game, which hands its keys to the menu while it is open; the window is made when the menu opens and dismissed when it has slid down, and without a second display the menu at the right opens instead. The question is dev.peanuts.ui.LayoutChoice (its pictures drawable/pil_layout_*.xml from design/peanuts-native/layouts/layouts.py), asked from Home's list. PeanutsPrefs.menuLayout keeps the question's pick (the launcher's prefs) and the menu's own setting (the game's prefs file) each with when it was set, and the newer one counts; two menus until one is picked. PEANUTS.md and peanuts/UPSTREAM-EDITS.md list the hooks and the new files.

Tested

  • Thor, test app, Pokémon Legends: Z-A on a copy of the save: Layout switched in the menu's settings while the game runs; one menu at the right opens with Back on Game, R steps to Performance with the focus on the chosen choice; on the bottom screen Back opens it on Game while the top screen dims the game a little, the yellow frame follows the D-pad there too, Back closes it and the bottom screen shows the game's page again, Now playing with its grip at the bottom edge.
  • Emulator (dual-screen Thor AVD, second display 1240x1080): Home opens the menu on Game, L moves to the tabs, Home closes it and the window goes; a swipe up from the bottom edge opens it.
  • peanuts/tests/test_ingame_menus.py; upstream-update.sh --check; check-publish.sh; check-min-api.py on the APK.

@davdxpx
davdxpx force-pushed the ingame-menus-bottom branch from 4d6469d to b57dd75 Compare November 25, 2026 07:37
@davdxpx
davdxpx marked this pull request as ready for review November 25, 2026 09:19
davdxpx added a commit to davdxpx/peanuts-native that referenced this pull request Nov 25, 2026
… readable name, the ZIP's size words) brought in
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.
@davdxpx
davdxpx force-pushed the ingame-menus-bottom branch from 583c4b3 to 5eec77c Compare November 25, 2026 19:48
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