Gameplay HUD
Lives in: screens.json → screen with role: "hud"
A small bar (or corner controls) shown while the story plays — pause, backlog, and similar.
Default strip
"hud": {
"role": "hud",
"layers": [
{
"type": "menu",
"order": 10,
"layout": {
"host": "panel",
"anchor_h": "right",
"anchor_v": "top",
"offset_x": 8
},
"buttons": [
{
"label": "",
"icon": "sprites/ico-pause.png",
"interaction": { "hooks": { "on_click": "screen:pause" } }
}
]
}
]
}
| Idea | Effect |
|---|---|
role: "hud" | Persistent during play; does not pause; clicks pass through empty areas |
layout.host: "panel" | Dock relative to the dialogue panel |
host: "screen" | Dock to the window instead |
| Auto-show | session.hud_screen names which HUD id appears when play starts |
Several different HUD ids can be up at once. Story can push another strip:
{ "type": "screen", "value": "minimap" }
{ "type": "screen", "value": "minimap", "show": false }
Usually you need
| Want | Do |
|---|---|
| Pause button | HUD menu button → "screen:pause" |
| Hide HUD entirely | "hud_screen": "" in session |
| Second strip mid-story | Another role: "hud" screen + screen command |
Menus around the story: Title, pause and settings screens. Button actions: Buttons and actions.