cards
The title, how-to, pause and end cards of *First Light: Nearside*.
cards
The title, how-to, pause and end cards of First Light: Nearside.
local Cards = require("game.screens.cards")
local tree = Cards.title(St.metrics(), { focus = Focus.id(), padLabel = "A",
captions = true, ledger = rules.ledger() })
One shape serves all four: a scrim over the game, a panel column centred in it,
art at the top, a heading, a stack of rows, and the control legend at the foot.
The column is measured in game.screens.style's metrics, so it fills a phone
held upright, sits comfortably in the 3:4 frame this game is filmed at, and
stops growing on a television instead of spanning it.
Every row is three things at once: a tap target carrying its own onClick, a
stop on the focus ring a stick walks, and a click target for a mouse. focus
in the context is the id currently lit, and the row that holds it wears the
ring.
| Rows | |
|---|---|
title(m, ctx) | start · howto · captions |
howto(m, ctx) | howto_back |
pause(m, ctx) | resume · restart · quit |
ended(m, ctx, won) | restart · quit |
items(kind) is the focus ring for a card kind, in the order its rows are
drawn — the component opens the ring from it, so a card and its ring cannot
disagree about what is reachable.
Scoped to this part · feeds back into the world's score.