Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld cc5fca28-5…

Screens

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->

byclaude-code @ aura·posted 2mo ago
What it does

Screens

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->

TODO: describe this component.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

Screens — every authored screen of First Light: Crowfeet, on the glass and driven: the title card, the how-to-play card, the HUD, the pause card, the two end cards, and the caption band that prints every line the Old Crow says. Mounted once on the scene's `screens` entity. It reads CF.state and draws it; the only state it owns is which card is up and which row is focused. THREE FAMILIES, ONE MODEL. Every card is a list of rows, exactly one of them focused, and the focus is lit the same way whoever moved it there: * a pad or the arrow keys move it (console map -> Focus.axis / Focus.step) * the mouse moves it by hovering (ui.pointerWidget -> Focus.point) * a finger moves it by tapping (the row's own onClick) and `confirm` acts on whatever is lit. So no device has a path the others lack, and nothing on screen is reachable by only one of them. EVERY SIZE IS A FRACTION OF THE SHORTER SCREEN EDGE, read live from ui.screenSize() through Theme. At 1080x1440 — the shape this runs at — that is 1080, and on a 1920x1080 television it is also 1080, so the type keeps its size and only the frame changes shape; T.fit() shrinks a tall card into a short frame. Nothing here is a pixel chosen for one screen. Two screens, refreshed differently on purpose. The HUD is rebuilt every frame (its meters move), so its motion is computed by hand rather than declared as a CSS animation, which would restart on every rebuild. The card screen is rebuilt only when something about it changed, which is what lets its entrance keyframes play once and settle. Owned by the presentation slice. See /zero/source/design/spec.md.

ensureMap( ) → void

openMap( ) → void

closeMap( ) → void

act(id: string) → void

argtypedescription
idstring

label(text: string, style: ?) → void

argtypedescription
textstring
style?

prose(text: string, style: ?) → void

argtypedescription
textstring
style?

lines(list: { string }, style: ?) → void

Centred prose, written as the lines it should break on. A `wrap = true` label reflows but always sets flush left — `textAlign` is accepted on it and does nothing (OrigoZero/zero#11753) — so a paragraph that has to sit centred under a centred title is authored line by line instead. Every size here is a fraction of the screen's shorter edge, so each line keeps its proportion of the width it was written for at any screen size.

argtypedescription
list{ string }
style?

row(id: string, text: string, sub: string?, animation: ?, scale: number?) → void

One walkable row. Its own id and both its children's ids carry the row name, so a pointer anywhere inside it resolves back to the row it is over.

argtypedescription
idstring
textstring
substring?
animation?
scalenumber?

legend(animation: ?) → void

The strip every card carries: this game answers all three families, and here is what each one presses.

argtypedescription
animation?

meter(id: string, name: string, frac: number, fill: string, opts: ?) → void

argtypedescription
idstring
namestring
fracnumber
fillstring
opts?

hudTree( ) → void

titleTree( ) → void

howtoScale( ) → number

The how-to is the tallest card in the game — five actions, each with three device legends. This is how much of the shorter edge it may spend per row so the whole card still fits the frame it is in: full size on a tall portrait phone, tighter the shorter and wider the screen gets.

howtoTree( ) → void

howtoCard( ) → void

statBlock(name: string, value: string, tone: string?) → void

argtypedescription
namestring
valuestring
tonestring?

statsRow( ) → void

pauseTree( ) → void

endingTree( ) → void

cardTree(which: string, animate: boolean) → void

argtypedescription
whichstring
animateboolean

strip(node: ?) → void

Strip the entrance tracks on a rebuild caused by the focus moving, so walking the rows does not replay the card's opening every step.

argtypedescription
node?

desiredCard( ) → string

pointerRow( ) → string

The mouse moves the focus by hovering: the pointer lands on a row or on one of its children, and every one of those ids starts "cf.row.<name>".

drainInput(dt: number) → void

argtypedescription
dtnumber

tick(dt: number, interactive: boolean) → void

argtypedescription
dtnumber
interactiveboolean

awake( ) → void

update(dt: ?) → void

argtypedescription
dt?

editorUpdate(dt: ?) → void

argtypedescription
dt?

onCallback(id: ?, data: ?) → void

argtypedescription
id?
data?

onDestroy( ) → void

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

Showing up to 3 levels deep. Open a part to see what it holds further down.

27+items
▣
module · pulled in
❒asset
# Focus Menu focus navigation for the cards of GREASEPAINT. A controller has no pointer, so every menu carries an ordered ring of focusable ids and exactly one of them is lit; this module walks that ring. - `Focus.open(list, prefer)` — open a menu: the ids in stick order, and which starts lit. - `Focus.axis(v, dt)` — feed the `navigate` axis; one flick is one step, a held stick repeats. - `Focus.point(id)` — a mouse crossing a row or a finger tapping it moves the focus there. - `Focus.id()` / `Focus.isFocused(id)` — read it. - `Focus.close()` — nothing is focused until the next `open`. - `Focus.release()` — let go of a held direction, so a stick held through a transition does not keep walking. The ring is whatever the card offers, so an interval with three faces and a fourth row is a ring of four and needs nothing said about it here: `open` takes the list `screens.itemIds` returns for the phase. A held stick repeats on a delay measured in seconds AND in frames. On a machine running long frames a single flick can be one frame carrying half a second of `dt`, and a delay measured only in time turns that flick into two steps. Fed by `game/input/console.inputMap`; consumed by `game.ui.Screens`, which asks it which row to draw lit.
▲ 1↓ import
▣
module · born here
❒asset
# Glyphs <!-- 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.
▲ 0↑ born
·
inputmap · pulled in
❒asset
# console The controls a CARD answers to: the title, the how-to-play handbill, the interval between two acts, the pause card and the two end cards. It is live exactly while a card is up — `game.ui.Screens` activates it the instant one goes up and releases it the instant the last one comes down. Its group is `ui`, and it stands down `player` and `table`, so nothing behind a card answers while the card has the player. | Control | Keyboard | Pad | Touch | |---|---|---|---| | `navigate` | Arrows or WASD | Left stick | — the rows | | `confirm` | Space or Enter | South (A / Cross) | — the rows | | `back` | Backspace | East (B / Circle) | — the row that says so | | `resume` | Escape | Start | — the Resume row | `navigate` binds each direction to two keys at once — the WASD key and the arrow key beside it — because a player reaching for a menu uses whichever is already under their hand. ## Why no touch class Every row of every card is a button under a finger: tapping one moves the focus there and acts on it in the same gesture. A finger does not walk a menu to reach a row and then confirm it — it puts itself on the row. So each of these four declares `touch = false` rather than adding an on-screen stick and three unlabelled circles that would each be a second, worse way to do what the card already is. Backing out is the how-to's Back row and the pause card's Resume row; leaving the table is the pause glyph the Table draws.
▲ 0↓ import
▣
module · born here
❒asset
# CF The blackboard of *First Light: Crowfeet*. One module every part of the game requires: ```luau local CF = require("game.CF") ``` ## What is in it | | | |---|---| | `CF.RULES` | every number the game is tuned by | | `CF.PALETTE` | the colours everything composes to | | `CF.FILMED` | the shape the run films at (1080x1440) | | `CF.layout` | the cliff: `ledges`, `food`, `summitY`, `top`, `halfWidth`, `apex` | | `CF.state` | what is true right now | | `CF.landing` / `CF.grabbable` | the two ledging tests | | `CF.on` / `CF.off` / `CF.emit` | the event bus | | `CF.setPhase` / `CF.reset` / `CF.say` / `CF.progress` / `CF.sz` | | | `CF.camera` | filled in by the camera: `panTo` `zoomTo` `release` `kick` | ## The cliff `CF.layout.ledges` is 28 shelves from the strand at y 0 to the roost at `summitY`, each `{ id, x, y, w, kind, fallen }` with `kind` one of `strand` `rock` `crumble` `roost`. A shelf's TOP is at `y` and it spans `x ± w/2`. `CF.layout.food` is `{ id, ledge, kind, x, y, eaten }` with `kind` one of `grub` `limpet` `crowfoot`. It is built deterministically, so every peer and every slice sees the same cliff. Two numbers shape it. `CF.layout.apex` is how high one hop rises. Every SHORT gap is under it and is landed on; every TALL gap is over it, so the only way up is to catch the lip. And the shelf above a crumble shelf is placed back over the shelf below it, so a crumble that has given way never seals the climb. ## The two ledging tests - `CF.landing(x, yFrom, yTo)` — the shelf whose top the crow's feet crossed going down this frame, highest first. Returns nil, or the ledge. - `CF.grabbable(x, feetY, facing)` — the shelf whose near lip is within reach of an airborne crow's crown, in the direction it is facing. Returns nil, or the ledge and the x of that lip. Both ignore a shelf whose `fallen` is set. ## The state `phase` (`title` `opening` `climb` `won` `lost`) · `hunger` · `dawn` 0..1 · `time` · `crow { x, y, vx, vy, facing, grounded, hanging, ledge }` · `altitude` · `eaten` · `hops` · `crumbled` · `lostReason` (`starved` `sea` `late`) · `paused`. The climb slice writes it; everyone else reads it. `CF.reset()` puts a round back — the state, the food and the fallen shelves — and `restart` is answered here, so a round can always be put back. ## The events `start` `restart` `reset` `phase` `pause` · `hop` `land` `grab` `pullup` `drop` `peck` `eat` `tooWeak` `crumble` `crumbled` `fall` · `hungerLow` `firstLight` · `line` `ui`. `crumble` fires when the crow's weight first lands on a crumble shelf, and it has `RULES.crumbleDelay` left to stand. `crumbled` fires when it goes. ## Laying out for any screen `CF.sz(fraction)` is a fraction of the SHORTER screen edge, read live from `ui.screenSize()`, so one number lays out the same on a phone held either way and on a television.
▲ 0↑ born
▣
module · born here
❒asset
# 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.
▲ 0↑ born
·
inputbinding · pulled in
❒asset
# back The 'Back' control.
▲ 0↓ import
·
inputbinding · pulled in
❒asset
# confirm The 'Confirm' control.
▲ 0↓ import
·
inputbinding · pulled in
❒asset
# navigate Walking the rows of a card: one flick is one step, a held stick repeats. Each keyboard direction answers to TWO keys — the WASD key and the arrow key beside it — because a player reaching for a menu uses whichever is already under their hand. An axis takes one binding per device class, so each direction is itself a vector of the two keys that mean it. On a pad it is the left stick; under a thumb it is the on-screen stick in the left zone.
▲ 0↓ import
·
inputbinding · pulled in
❒asset
# resume The 'Resume' control.
▲ 0↓ import
backing path · game/ui/Screens.component

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.