hud
What HELSINKI LIFE draws OVER the board while a turn is played.
hud
What HELSINKI LIFE draws OVER the board while a turn is played.
local H = require("game.screens.hud")
ui.registerScreen("hl_hud", H.build(T.metrics(), vm), 20)
One pure builder. It takes the metrics table from game.screens.theme and a view
model and returns the whole overlay.
| Part | What it says |
|---|---|
| turn banner | whose turn it is, what the phase is doing, and the tile they stand on |
| player column | one card per player: colour bar, name, money, onni, marks for a home, a degree, a marriage, children, and their career or district |
| caption strip | the Konduktööri's line, in writing, under his name |
| log ticker | the tail of the running log |
| action | the one big button: SPIN on a turn, OK on a card, SKIP over the intro |
| pips | pause and overview, as tap targets |
The view model
{ players, current, player, phase, caption, log, actEnabled, spinValue, compact, touchGutter }
compact is the overlay UNDER a card: the banner and the money column stay, so a
player choosing a home can still see what they can afford, and everything the
card itself owns comes off so nothing competes with it for a tap.
touchGutter is how much of the right edge the engine's own touch overlay is
using for the board's Spin / Pause / Map buttons. The whole page steps out of
that column, so the two sets of controls sit side by side rather than on top of
each other.
Shape
At every aspect the player cards are a COLUMN pinned to the leading edge, never a
bar across the top, which a 3:4 frame has no room for. The banner is a centred
plate under the top edge and the action sits at the bottom where a thumb reaches
it. On a wide screen the same rules hold and only the widths change, because
every one of them is a share of the live ui.screenSize().
Every control here is a real tap target, and none is drawn smaller than the
metrics table's tap.
Scoped to this part · feeds back into the world's score.