Every screen COINFALL draws.
One component owns the whole UI: the marquee menus, the seed and settings
screens, the extras gallery, the pause overlay, the relic draft, and the
in-play HUD. It reads the director's state through `cf_hub` and sends every
decision back the same way, so the UI never reaches into the run directly.
Geometry is expressed against `ui.screenSize()`, the one coordinate space the
whole UI lives in. Numbers read off a screenshot are wrong by the capture's
downscale factor.
label(text: string, size: number, color: string, extra: ?) → void
| arg | type | description |
|---|
| text | string | |
| size | number | |
| color | string | |
| extra | ? | |
marquee(text: string, size: number, color: string) → void
Marquee type: the arcade face, set solid. Its letters already stand a pixel
apart, so nothing is tracked out between them.
| arg | type | description |
|---|
| text | string | |
| size | number | |
| color | string | |
plate(children: ?, extra: ?) → void
| arg | type | description |
|---|
| children | ? | |
| extra | ? | |
menuRow(text: string, id: string, selected: boolean) → void
A menu row. The whole row is clickable, not just a nested button, and the
selected row carries the marquee bulb.
| arg | type | description |
|---|
| text | string | |
| id | string | |
| selected | boolean | |
led(text: string, size: number, color: string?) → void
A segmented LED readout: orange digits on a dead-black plate with a sunken
bezel, the only clean thing in the building.
| arg | type | description |
|---|
| text | string | |
| size | number | |
| color | string? | |
row(children: ?, extra: ?) → void
| arg | type | description |
|---|
| children | ? | |
| extra | ? | |
col(children: ?, extra: ?) → void
| arg | type | description |
|---|
| children | ? | |
| extra | ? | |
settingRow(name: string, widget: ?) → void
| arg | type | description |
|---|
| name | string | |
| widget | ? | |
screenW( ) → number return ui
screenH( ) → number return ui
keyRow(text: string, id: string, color: string) → void
A keyboard-lit action. It reads its own selected state from the cursor, so a
screen never has to track which of its rows is live -- the same list the keys
walk is the list that lights up.
| arg | type | description |
|---|
| text | string | |
| id | string | |
| color | string | |
buildWalk( ) → void
The WALK overlay: nothing but the prompt, and the subtitle when one is up.
shellMenu( ) → void
The HUD. Bank and target top-centre as segmented LED, the debt clock beside
them, vitality as coin pips bottom-left, corruption bleeding down the right
edge, relic cooldowns bottom-right, coins in hand bottom-centre.
The screens `cf_shell` has taken over are adapted here rather than rebuilt:
this component still owns the state and the keyboard cursor, and hands
`cf_shell` the values it draws. The rows `cf_shell` renders are in the same
order as `MENU_ITEMS`, so the cursor that walks that list lights the right one.
wanted(phase: string) → void
Which screens belong to which phase. Everything not listed is hidden.
| arg | type | description |
|---|
| phase | string | |
focusIds(phase: string) → void
CONTINUE is unpickable until a run exists, so the cursor steps over it rather
than landing on a row that answers nothing.
EVERY screen is driven from the keyboard. The machine this is pretending to be
had no mouse, and the cabinet captures the pointer for looking around the
hall, so a screen reachable only by clicking is a screen the player cannot
leave. Each phase lists the callback ids it can move between, in order; the
cursor walks that list and Enter sends the id straight to `onCallback`, the
same handler a click would have reached.
| arg | type | description |
|---|
| phase | string | |
focusedId( ) → string
Which callback id the cursor is sitting on, so a screen can light its
own selected row without duplicating the ordering.
editorUpdate(dt: ?) → void
Edit mode draws the screens so the author sees them, and takes no input.
onCallback(callbackId: ?, data: ?) → void
| arg | type | description |
|---|
| callbackId | ? | |
| data | ? | |
screens( ) → void
Which screens are currently registered -- the data query that confirms
the UI matches the phase without trusting a screenshot.