Screens
Everything HELSINKI LIFE puts on the glass, and the three ways a player drives it.
Screens
Everything HELSINKI LIFE puts on the glass, and the three ways a player drives it.
Mounted once, on mount_screens, by the scene entrypoint. It needs nothing else
on that entity.
What it draws
| Screen | Layer | When |
|---|---|---|
hl_hud | 20 | while a turn is being played, and in compact form under a board card |
hl_card | 900 | title, setup, how-to-play, event, choice, pause, end |
The trees come from game.screens.cards and game.screens.hud, which are pure
builders: each takes the metrics table from game.screens.theme plus a small
view model and returns a widget tree. This component owns the state those are
built from, the registration, and the input.
Which card is up
HL.state() decides, except for the three cards this slice owns outright:
| Card | Shown when |
|---|---|
title | no game exists, or phase == title |
setup | the player asked for it from the title |
howto | the player asked for it from the title or from pause |
choice | phase == choice |
event | phase == event |
pause | phase == paused |
over | phase == over |
event, choice and pause sit ON the board, so the HUD stays under them in
its compact form (banner and money column, nothing else) and a player choosing a
home can still read what they can afford. title, setup, howto and over
replace the board, so the HUD comes off.
The three input families
Every row and button carries an id that is BOTH its focus id and its onClick
callback id, so all three families end at the same public:act(id).
- Mouse and keyboard. Clicks land in
onCallback. The pointer also moves the focus, but only when it actually moves: a cursor resting on a row would otherwise take the lit row back from the pad after every step. - Touch. The same ids are the tap targets, and nothing interactive is drawn
smaller than the metrics table's
tap. When the engine draws the board's own Spin / Pause / Map buttons fromplay.inputMap's touch class, the HUD steps its whole page out of that column so the two sets sit side by side. - Controller. This component owns
game.input.menu, activates it the moment a card goes up and releases it when the last one comes down.navigatewalksgame.vendor.Focus,confirmfires whatever is lit,backcloses the card. The lit row draws a gold ring. The neutral frame is fed back toFocustoo, so one push of the stick is one step.
While a card is up the menu map stands play and player down, so nothing at
the board answers underneath it.
Public surface
| Field / method | What it is |
|---|---|
menuMap | the inputMap a card answers to; game.input.menu |
captionSeconds | how long a spoken line stays in the caption strip |
logLines | how many lines of the running log the ticker shows |
:card() | the card on the glass right now, or nil while the board is playing |
:act(id) | act on one id: the single path a click, a tap and confirm all take |
:back() | back out of whatever card is up |
:say(text) | put a line in the caption strip |
It listens to the whole HL bus and rebuilds only when something changed, when
the screen shape changed, or when a caption expired.
Shape
Nothing here is laid out at a pixel chosen for one screen. Every build reads
ui.screenSize() through game.screens.theme, so the same tree lays out on a
3:4 phone, a laptop and a television: cards are a share of the screen capped at a
readable measure, the player cards are a COLUMN at every aspect, and the action
sits at the bottom where a thumb reaches it.
Card entrances animate while the clock runs and are skipped while it is held, so a paused or edit-mode frame shows the settled pose rather than the first keyframe.
Scoped to this part · feeds back into the world's score.