Idea: mod API: the game screens' button prompts, set by a mod, and every prompt clickable #2642

Open
opened 2026-11-27 01:53:40 +00:00 by dyst · 1 comment
Member

The idea

A mod API service for the game screens' button prompts (the app menu overlay's guides at the bottom right: "Select
(A)", "Back (B)", Options' "Default Settings (Y)"), and every prompt clickable with the mouse.

  1. Set a screen's prompts. A mod that adds an action to one of the game's screens shows it the game's way: a guide
    with a key icon and a text, beside the screen's own. Today that means calling the overlay's functions by address
    (make the guides for its kind, show the first n, set guide i's key and label, then the pane Pa_Guide_NN/T_Guide_00's
    text through Layout_SetText with a UTF-16 buffer the mod allocates in guest memory) and knowing the overlay's layout
    offsets. Proposed: ui.prompts.set(screen kind, [{ key, text }]) and ui.prompts.reset(kind), the service doing
    the calls on the game's thread at the overlay's guide site, texts translated by the mod.
  2. Every prompt clickable. The menus' mouse (oot::menus) clicks "Back" by a fixed box at the bottom right and the
    map's Y prompt by another. Reading the overlay's own guides (their count, panes, keys and hit boxes) and tapping the
    clicked guide's key would make every prompt clickable, the game's and a mod's, with no fixed boxes and nothing for a
    mod to do. This part is core, and comes first.

Anything else

First user: the save slots system mod on mod-api (branch feat/save-slots-mod) shows "X New Save, B Back" in the
save list through the overlay's functions as named locations; on main, its C version clicked "New Save" by a fixed box
beside Back's. With (2) its click needs no code of its own; with (1) its prompt is a call.

Prior work: none found (searched button prompt, guide prompt, clickable).

### The idea A mod API service for **the game screens' button prompts** (the app menu overlay's guides at the bottom right: "Select (A)", "Back (B)", Options' "Default Settings (Y)"), and every prompt **clickable** with the mouse. 1. **Set a screen's prompts.** A mod that adds an action to one of the game's screens shows it the game's way: a guide with a key icon and a text, beside the screen's own. Today that means calling the overlay's functions by address (make the guides for its kind, show the first n, set guide i's key and label, then the pane `Pa_Guide_NN/T_Guide_00`'s text through `Layout_SetText` with a UTF-16 buffer the mod allocates in guest memory) and knowing the overlay's layout offsets. Proposed: `ui.prompts.set(screen kind, [{ key, text }])` and `ui.prompts.reset(kind)`, the service doing the calls on the game's thread at the overlay's guide site, texts translated by the mod. 2. **Every prompt clickable.** The menus' mouse (`oot::menus`) clicks "Back" by a fixed box at the bottom right and the map's Y prompt by another. Reading the overlay's own guides (their count, panes, keys and hit boxes) and tapping the clicked guide's key would make every prompt clickable, the game's and a mod's, with no fixed boxes and nothing for a mod to do. This part is core, and comes first. ### Anything else First user: the save slots system mod on `mod-api` (branch `feat/save-slots-mod`) shows "X New Save, B Back" in the save list through the overlay's functions as named locations; on main, its C version clicked "New Save" by a fixed box beside Back's. With (2) its click needs no code of its own; with (1) its prompt is a call. Prior work: none found (searched `button prompt`, `guide prompt`, `clickable`).
Member

Possibly related, for context:

  • issue #2641 Idea: mod API: the pad as the game was given it (taps and recordings in), for mods and engine callbacks — Related mod API input work; discusses mouse clicks on prompts tapping buttons
  • issue #2643 Idea: more save slots as core save plumbing with an API, the save list a mod over it — Save-slots system mod is the first stated consumer of the prompt API
  • PR #2434 WIP: feat(game)!: the game side and the whole mod API in Rust, with system mods and the sandbox on by default — Open mod API implementation is the context for this proposed API service
  • PR #1700 feat(prompts): the System page's guide follows every controller and binding (#1211) — Open prompt-guide work concerns game-screen button prompts, but focuses on guide layout
Possibly related, for context: - issue #2641 Idea: mod API: the pad as the game was given it (taps and recordings in), for mods and engine callbacks — Related mod API input work; discusses mouse clicks on prompts tapping buttons - issue #2643 Idea: more save slots as core save plumbing with an API, the save list a mod over it — Save-slots system mod is the first stated consumer of the prompt API - PR #2434 WIP: feat(game)!: the game side and the whole mod API in Rust, with system mods and the sandbox on by default — Open mod API implementation is the context for this proposed API service - PR #1700 feat(prompts): the System page's guide follows every controller and binding (#1211) — Open prompt-guide work concerns game-screen button prompts, but focuses on guide layout
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Longshot#2642
No description provided.