game/screens.module — every screen between the player and the station.
SLICE: screens. Contract: start(ctx), update(dt), onPlayer(player), stop().
What is here:
lc_title the menu, over the tunnel-mouth key art
lc_cine the opening cinematic: the blast seen from inside the carriage
lc_hud the in-play HUD — objective, dust, what is carried
lc_doc the document reader, a page of what Team Four left behind
lc_end both endings, on the same cold tally
The phase of the run lives in Core.state.phase and moves
intro -> playing -> escaped | died. This module drives it, and follows it if
another slice moves it.
Every screen is registered from this module and driven by its own callback
environment (`ui.registerCallbackEnv`), because a slice module is not a
component instance and has no `onCallback` of its own to be called.
abs(l: ?, t: ?, w: ?, h: ?, extra: ?) → void
Small builders. A node is { type, props, style, children }.
| arg | type | description |
|---|
| l | ? | |
| t | ? | |
| w | ? | |
| h | ? | |
| extra | ? | |
L(text: ?, style: ?, props: ?) → void
| arg | type | description |
|---|
| text | ? | |
| style | ? | |
| props | ? | |
V(style: ?, children: ?, props: ?) → void
| arg | type | description |
|---|
| style | ? | |
| children | ? | |
| props | ? | |
H(style: ?, children: ?, props: ?) → void
| arg | type | description |
|---|
| style | ? | |
| children | ? | |
| props | ? | |
anim(keyframes: ?, duration: ?, delay: ?, easing: ?, iter: ?) → void
| arg | type | description |
|---|
| keyframes | ? | |
| duration | ? | |
| delay | ? | |
| easing | ? | |
| iter | ? | |
fadeIn(duration: ?, delay: ?, fromY: ?) → void
| arg | type | description |
|---|
| duration | ? | |
| delay | ? | |
| fromY | ? | |
loop(frames: ?, duration: ?, delay: ?) → void
| arg | type | description |
|---|
| frames | ? | |
| duration | ? | |
| delay | ? | |
fmtClock(seconds: ?) → void
| arg | type | description |
|---|
| seconds | ? | |
titleScreen( ) → void
The title screen — the menu over the tunnel-mouth key art.
letterbox( ) → void
The opening cinematic — the blast, from inside the carriage.
caption(text: ?, delay: ?, color: ?) → void
| arg | type | description |
|---|
| text | ? | |
| delay | ? | |
| color | ? | |
cinePlate(tex: ?, extraStyle: ?, filter: ?) → void
| arg | type | description |
|---|
| tex | ? | |
| extraStyle | ? | |
| filter | ? | |
inventoryChips( ) → void
The HUD. Corners only: the middle of the frame stays the game's.
docById(id: ?) → void
The document reader — a page of what Team Four left behind.
docBodyLines(body: ?) → void
tallyRow(name: ?, value: ?, tone: ?) → void
The endings — one cold tally, two headlines.
| arg | type | description |
|---|
| name | ? | |
| value | ? | |
| tone | ? | |
endingScreen(which: ?) → void
register(name: ?, tree: ?, layer: ?) → void
Showing and hiding. Every call is guarded: a screen that fails to register
must not take the game down.
| arg | type | description |
|---|
| name | ? | |
| tree | ? | |
| layer | ? | |
refresh(name: ?, tree: ?) → void
| arg | type | description |
|---|
| name | ? | |
| tree | ? | |
toast(text: ?, tone: ?) → void
Flow: title -> cinematic -> playing -> escaped | died
| arg | type | description |
|---|
| text | ? | |
| tone | ? | |
showEnding(which: ?) → void
openDoc(payload: ?) → void
| arg | type | description |
|---|
| payload | ? | |
onCallback(id: ?, data: ?) → void
| arg | type | description |
|---|
| id | ? | |
| data | ? | |
hook( ) → void
The contract.
dispatch(evt: ?, payload: ?) → void
| arg | type | description |
|---|
| evt | ? | |
| payload | ? | |
onEvent(evt: ?, payload: ?) → void
| arg | type | description |
|---|
| evt | ? | |
| payload | ? | |
onPlayer(player: ?) → void
| arg | type | description |
|---|
| player | ? | |