screens
Every Ladrilho screen as a pure function of what it shows and the canvas size: title (wordmark, "N playing now", level and XP, Play), modes (four cards), daily (today's best and the day's world leaderboard), adventure (a chapter path of 12 level tiles with stars and locks, five c…
ladrilho.screens
Every Ladrilho screen as a pure function of what it shows and the canvas size:
title (wordmark, "N playing now", level and XP, Play), modes (four cards), daily
(today's best and the day's world leaderboard), adventure (a chapter path of 12
level tiles with stars and locks, five chapters), duel (friend or computer), play
(HUD and the board region the kit's view mounts in; a marked placeholder until the
kit is installed), results and profile (stats and tile looks). Portrait stacks,
landscape sets things side by side. Called by ladrilho.app.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
T(key: string, vars: any?) → any return i18n
| arg | type | description |
|---|---|---|
| key | string | |
| vars | any? |
fmt(n: number) → string return i18n
| arg | type | description |
|---|---|---|
| n | number |
frame(W: number, H: number, safe: any?) → any
the layout every screen shares: the safe box, portrait or not, and a scale
| arg | type | description |
|---|---|---|
| W | number | |
| H | number | |
| safe | any? |
root(f: any, kids: { any }, id: string?) → any
the root: the tiled background under the notch, content inside the safe box
| arg | type | description |
|---|---|---|
| f | any | |
| kids | { any } | |
| id | string? |
rise(delay: number) → any
| arg | type | description |
|---|---|---|
| delay | number |
header(f: any, title: any, right: any?) → any
a header row: back button, title, optional right part
| arg | type | description |
|---|---|---|
| f | any | |
| title | any | |
| right | any? |
xpBar(view: any, width: number, k: number) → any
| arg | type | description |
|---|---|---|
| view | any | |
| width | number | |
| k | number |
title(view: any, W: number, H: number, safe: any?) → any
| arg | type | description |
|---|---|---|
| view | any | |
| W | number | |
| H | number | |
| safe | any? |
modeCard(m: any, view: any, w: number, h: number, k: number, i: number) → any
| arg | type | description |
|---|---|---|
| m | any | |
| view | any | |
| w | number | |
| h | number | |
| k | number | |
| i | number |
modes(list: { any }, view: any, W: number, H: number, safe: any?) → any
| arg | type | description |
|---|---|---|
| list | { any } | |
| view | any | |
| W | number | |
| H | number | |
| safe | any? |
durationText(sec: number) → any
| arg | type | description |
|---|---|---|
| sec | number |
boardRow(r: any, k: number, w: number, mine: boolean) → any
| arg | type | description |
|---|---|---|
| r | any | |
| k | number | |
| w | number | |
| mine | boolean |
daily(d: any, myBest: number, W: number, H: number, safe: any?) → any
| arg | type | description |
|---|---|---|
| d | any | |
| myBest | number | |
| W | number | |
| H | number | |
| safe | any? |
stat(id: string, label: any, value: any, colour: string) → any
| arg | type | description |
|---|---|---|
| id | string | |
| label | any | |
| value | any | |
| colour | string |
goalIcon(kind: string) → string
The chapter path: 12 level tiles snaking up a 3-wide grid (6-wide in landscape) along a painted road, a tab per chapter, and the goal card of the focused level. a = { chapter, chapters, perChapter, focus, next, starsTotal, chapterOpen = { bool }, levels = { [n] = { open, stars, badge, stone } }, card = { n, open, stars, goals = { { kind, text } }, moves, intro? } }
| arg | type | description |
|---|---|---|
| kind | string |
goalList(goals: { any }, width: number, k: number, fontSize: number?) → any
the goal lines of a level (map card, start card): icon + "Collect 6 gems"
| arg | type | description |
|---|---|---|
| goals | { any } | |
| width | number | |
| k | number | |
| fontSize | number? |
starRow(stars: number, size: number, gap: number?) → any
| arg | type | description |
|---|---|---|
| stars | number | |
| size | number | |
| gap | number? |
movesChip(moves: number, k: number) → any
| arg | type | description |
|---|---|---|
| moves | number | |
| k | number |
chapter(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
level(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
play(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
locked(_: any) → void
| arg | type | description |
|---|---|---|
| _ | any |
locked_hint(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
stars_total(v: any) → void
| arg | type | description |
|---|---|---|
| v | any |
adventureSpec(a: any, f: any) → any
the levelPathMap spec for an adventure view `a` (see the comment above goalIcon)
| arg | type | description |
|---|---|---|
| a | any | |
| f | any |
card(_n: number, _lv: any) → void
| arg | type | description |
|---|---|---|
| _n | number | |
| _lv | any |
adventure(a: any, W: number, H: number, safe: any?) → any
| arg | type | description |
|---|---|---|
| a | any | |
| W | number | |
| H | number | |
| safe | any? |
goalCard(g: any, W: number, H: number, safe: any?) → any
The goal card shown over the board when a level starts (its own screen, above the board); a tap anywhere starts playing. g = { n, goals = { { kind, text } }, moves, intro? }
| arg | type | description |
|---|---|---|
| g | any | |
| W | number | |
| H | number | |
| safe | any? |
duel(W: number, H: number, safe: any?) → any
| arg | type | description |
|---|---|---|
| W | number | |
| H | number | |
| safe | any? |
choice(id: string, title: any, desc: any, kind: string, iconSvg: string) → any
| arg | type | description |
|---|---|---|
| id | string | |
| title | any | |
| desc | any | |
| kind | string | |
| iconSvg | string |
streakMeter(streak: number, k: number, id: string) → any
| arg | type | description |
|---|---|---|
| streak | number | |
| k | number | |
| id | string |
bestChip(p: any, k: number) → any
| arg | type | description |
|---|---|---|
| p | any | |
| k | number |
clockIcon( ) → string
goalChips(p: any, k: number, wrap: boolean) → any
| arg | type | description |
|---|---|---|
| p | any | |
| k | number | |
| wrap | boolean |
scoreBlock(p: any, k: number, size: number) → any
| arg | type | description |
|---|---|---|
| p | any | |
| k | number | |
| size | number |
modeTag(p: any, k: number) → any
| arg | type | description |
|---|---|---|
| p | any | |
| k | number |
playSolo(p: any, W: number, H: number, safe: any?) → void
| arg | type | description |
|---|---|---|
| p | any | |
| W | number | |
| H | number | |
| safe | any? |
play(p: any, W: number, H: number, safe: any?) → void
p = { modeTitle, sub, score, best, timeLeft?, opponent? = { name, score }, placeholder = bool } Answers the tree and the board region (where the kit's board view mounts), in canvas points.
| arg | type | description |
|---|---|---|
| p | any | |
| W | number | |
| H | number | |
| safe | any? |
stat(label: any, value: string, id: string, colour: string) → any
| arg | type | description |
|---|---|---|
| label | any | |
| value | string | |
| id | string | |
| colour | string |
results(r: any, W: number, H: number, safe: any?) → any
| arg | type | description |
|---|---|---|
| r | any | |
| W | number | |
| H | number | |
| safe | any? |
row(id: string, name: any, score: number, lines: number, colour: string, won: boolean) → any
| arg | type | description |
|---|---|---|
| id | string | |
| name | any | |
| score | number | |
| lines | number | |
| colour | string | |
| won | boolean |
profile(view: any, looks: { any }, W: number, H: number, safe: any?) → any
| arg | type | description |
|---|---|---|
| view | any | |
| looks | { any } | |
| W | number | |
| H | number | |
| safe | any? |
stat(label: any, value: any) → any
| arg | type | description |
|---|---|---|
| label | any | |
| value | any |
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.
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.