Theme
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
Theme
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2Theme — the look of every screen in First Light: Crowfeet, in one place. Two real faces, a type scale, the palette derived from CF.PALETTE, and the handful of style fragments every card is built out of (a plate, a row, a meter, a focus ring). A screen that needs a colour or a size asks here, so the title, the HUD and the end cards are visibly one designed thing. local T = require("game.ui.Theme") { type = "label", props = { text = "HUNGER" }, style = T.eyebrow() } EVERY size is a fraction of the SHORTER screen edge (CF.sz), read live from ui.screenSize(). At 1080x1440 the shorter edge is 1080; on a 1920x1080 television it is also 1080, so the type keeps its size and only the frame changes shape. Nothing here is a pixel chosen for one screen. Owned by the presentation slice. See /zero/source/design/spec.md.
sz(fraction: number) → number
A fraction of the shorter screen edge, read live. The one sizing call.
| arg | type | description |
|---|---|---|
| fraction | number |
screen( ) → void
The live screen box, plus which way round it is.
pad( ) → number return T
The gutter every screen breathes inside, and the width a column of content is allowed to grow to. A phone gets most of its width; a television gets a column it can read across rather than a line of text a metre wide.
columnStyle(extra: ?) → void
| arg | type | description |
|---|---|---|
| extra | ? |
fit( ) → number
How much a tall card has to shrink to fit the frame it is in. Sizes are a fraction of the SHORTER edge, so a card laid out for a portrait phone is the same height on a wide television — where there is far less room down the screen for it. This is the one number that answers that: 1 in portrait, and proportionally smaller the wider and shorter the frame gets.
display(scale: number?) → void
The wordmark: the biggest thing on any screen.
| arg | type | description |
|---|---|---|
| scale | number? |
heading(color: string?) → void
A card's heading — smaller than the wordmark, same voice.
| arg | type | description |
|---|---|---|
| color | string? |
eyebrow(color: string?, scale: number?) → void
A small hard label in caps — HUNGER, FIRST LIGHT, the section rules.
| arg | type | description |
|---|---|---|
| color | string? | |
| scale | number? |
body(color: string?, scale: number?) → void
Reading text.
| arg | type | description |
|---|---|---|
| color | string? | |
| scale | number? |
voice(color: string?) → void
The Old Crow's own voice — italic, warm, larger than body.
| arg | type | description |
|---|---|---|
| color | string? |
scrim( ) → void
The scrim a card lays over the game: a dark wash with a vignette and frosted glass behind it.
plate(extra: ?) → void
A raised plate — the card body. Lifted by a lightness step and a lit top edge, not by a black shadow on black.
| arg | type | description |
|---|---|---|
| extra | ? |
rule( ) → void
A hairline rule between sections.
rowStyle(focused: boolean, tone: string?) → void
One visible state, shared by the pad, the arrow keys, the mouse and a finger: whatever is focused is what `confirm` acts on, and it is lit the same way whichever device moved the focus there.
| arg | type | description |
|---|---|---|
| focused | boolean | |
| tone | string? |
rise(delay: number, distance: number?) → void
A staggered entrance: fade and rise. Used only on screens rebuilt on a change, never on a per-frame screen.
| arg | type | description |
|---|---|---|
| delay | number | |
| distance | number? |
breathe(period: number?, low: number?, high: number?) → void
A slow breath — for the title mark and the pulse on a warning.
| arg | type | description |
|---|---|---|
| period | number? | |
| low | number? | |
| high | number? |
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.