Hud
The commander's glass, as one pure function of state: `Hud.build(state)` returns the widget tree and nothing else, so what is on screen is always a picture of what `game.command.Command` holds.
Hud
The commander's glass, as one pure function of state: Hud.build(state)
returns the widget tree and nothing else, so what is on screen is always a
picture of what game.command.Command holds.
The composition follows design/refs/screen-hud.png: regiment cards down the
left edge, three round ability buttons with cooldown rings down the right, a
wave banner across the top with the Gate's strength under it, a spoken line
along the bottom, and the middle of the frame left clear for the canyon.
Every number comes out of state.screen, which is whatever ui.screenSize()
last reported, so the same tree composes on a phone held upright, on a laptop
and on a television — and the card column folds to two columns of five when
the screen is too short for ten.
Hud.field(w, h) is the second tree: one box under everything the HUD draws,
so a press anywhere the HUD is not becomes an act at that point. A mouse click
and a finger tap both arrive on it carrying mouseX / mouseY.
The HUD is also this slice's touch control surface — the cards, the stance
strips, the ability buttons, ALL, ADD, RECENTRE and the pause pip are the
touch counterparts of every control tactical.inputMap marks touch = false.
Scoped to this part · feeds back into the world's score.