screens
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
screens
<!-- 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/v2ui/screens.module — OWNED BY THE UI SLICE. Every screen of Toddler of Duty, as styled widget trees over generated claymation/crayon art (/zero/source/ui/art/): tod_title — clay logo over the sandbox-hill backdrop, construction-paper DEPLOY / HOW TO PLAY buttons, PRESS SPACE TO DEPLOY strip, and the how-to-play paper card. tod_hud — bandage Boo-Boo Meter, RED vs BLUE crayon score + timer, pinecone x3, POOP READY meter, crosshair, hit marker, kill feed, damage flash, stun wobble and the big TIME-OUT overlay. tod_over — MISSION ACCOMPLISHED / MISSION FAILED end screens with play again. Reads Rules.state (written by game.match). Owns the phase changes title -> playing (DEPLOY) and over -> playing (play again). Controls: Space / Enter, gamepad south / start, mouse click or touch tap on the paper buttons (the whole end screen is a tap target). Called by scenes/main.scene/entrypoint.luau: start(), update(dt), stop().
hex(c: { number }, a: number?) → string
Palette (hex of Rules.COLORS, plus paper/ink tones).
| arg | type | description |
|---|---|---|
| c | { number } | |
| a | number? |
tex(path: string) → string
| arg | type | description |
|---|---|---|
| path | string |
dims( ) → void
coverImg(src: string, iw: number, ih: number, id: string) → void
An image placed to cover the whole canvas, cropped evenly (CSS cover).
| arg | type | description |
|---|---|---|
| src | string | |
| iw | number | |
| ih | number | |
| id | string |
img(name: string, w: number, h: number, extra: { [string]: any }?, props: { [string]: any }?, id: string?) → void
| arg | type | description |
|---|---|---|
| name | string | |
| w | number | |
| h | number | |
| extra | { [string]: any }? | |
| props | { [string]: any }? | |
| id | string? |
label(text: string, size: number, color: string, extra: { [string]: any }?, id: string?) → void
| arg | type | description |
|---|---|---|
| text | string | |
| size | number | |
| color | string | |
| extra | { [string]: any }? | |
| id | string? |
abs(left: any, top: any, w: any?, h: any?, extra: { [string]: any }?) → void
| arg | type | description |
|---|---|---|
| left | any | |
| top | any | |
| w | any? | |
| h | any? | |
| extra | { [string]: any }? |
entrance(delay: number, from: string?) → void
| arg | type | description |
|---|---|---|
| delay | number | |
| from | string? |
pulse(scaleTo: number, dur: number) → void
| arg | type | description |
|---|---|---|
| scaleTo | number | |
| dur | number |
howToRow(icon: any, action: string, keys: string, note: string?) → void
| arg | type | description |
|---|---|---|
| icon | any | |
| action | string | |
| keys | string | |
| note | string? |
keyGlyph(t: string, color: string) → void
| arg | type | description |
|---|---|---|
| t | string | |
| color | string |
howToCard( ) → void
titleTree( ) → void
fmtTime(t: number) → string
| arg | type | description |
|---|---|---|
| t | number |
booBooMeter(pct: number) → void
| arg | type | description |
|---|---|---|
| pct | number |
scoreBoard(st: any) → void
| arg | type | description |
|---|---|---|
| st | any |
pineconeBox(n: number) → void
| arg | type | description |
|---|---|---|
| n | number |
poopMeter(charge: number) → void
| arg | type | description |
|---|---|---|
| charge | number |
crosshair(hit: boolean, stunned: boolean?) → void
| arg | type | description |
|---|---|---|
| hit | boolean | |
| stunned | boolean? |
bar(l: number, t: number, w: number, h: number) → void
| arg | type | description |
|---|---|---|
| l | number | |
| t | number | |
| w | number | |
| h | number |
killFeed(st: any) → void
| arg | type | description |
|---|---|---|
| st | any |
timeoutOverlay(st: any) → void
| arg | type | description |
|---|---|---|
| st | any |
hudTree(st: any) → void
| arg | type | description |
|---|---|---|
| st | any |
overTree(st: any) → void
| arg | type | description |
|---|---|---|
| st | any |
setPhase(p: string) → void
| arg | type | description |
|---|---|---|
| p | string |
startMatch( ) → void
onCallback(id: any, _data: any) → void
| arg | type | description |
|---|---|---|
| id | any | |
| _data | any |
pressed( ) → boolean
backPressed( ) → boolean
freeCursor( ) → void
show(name: string, on: boolean) → void
| arg | type | description |
|---|---|---|
| name | string | |
| on | boolean |
hudSig(st: any) → string
| arg | type | description |
|---|---|---|
| st | any |
refresh(force: boolean?) → void
| arg | type | description |
|---|---|---|
| force | boolean? |
preload( ) → void
Ask the renderer for every texture up front so a screen's first frame is not a "[loading]" plate (large textures otherwise wait for first use).
start( ) → void
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
stop( ) → 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.
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.