widgets
missionScreens.widgets: builders every style shares: text and boxes, focusable buttons (48px, 54px big) with focus rings, choice chips with selected / locked / free states, a portrait that falls back to a drawn silhouette, a debrief line, a number ticker, a stamp slam animation,…
missionScreens.widgets: builders every style shares: text and boxes, focusable buttons (48px, 54px big) with focus rings, choice chips with selected / locked / free states, a portrait that falls back to a drawn silhouette, a debrief line, a number ticker, a stamp slam animation, an entrance fade, stars, points in the player's number format, accent-aware upper case and the button id prefix (setPrefix, id).
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2strict
setPrefix(p: string) → void
Button ids are PREFIX .. name ("ms_btn_ready"); a game may set its own prefix (Sealed Orders uses "so_btn_").
| arg | type | description |
|---|---|---|
| p | string |
prefix( ) → string return ST
id(name: string) → string return ST
| arg | type | description |
|---|---|---|
| name | string |
upper(s: string) → string
Upper case that also lifts accented Latin letters (á -> Á, ç -> Ç), so Portuguese headings read right.
| arg | type | description |
|---|---|---|
| s | string |
xpLine(mr: any, sep: string?) → string
The mastery progress line: "+2,860 xp · 5,560 / 7,000" (or "· max").
| arg | type | description |
|---|---|---|
| mr | any | |
| sep | string? |
num(n: number) → string return
| arg | type | description |
|---|---|---|
| n | number |
text(t: string, style: any?, id: string?) → any
| arg | type | description |
|---|---|---|
| t | string | |
| style | any? | |
| id | string? |
box(dir: string, style: any, children: { any }, id: string?) → any
| arg | type | description |
|---|---|---|
| dir | string | |
| style | any | |
| children | { any } | |
| id | string? |
spacer( ) → any return
merge(a: any, b: any?) → any
| arg | type | description |
|---|---|---|
| a | any | |
| b | any? |
abs(x: number, y: number, style: any, children: { any }?) → any
An absolutely placed plain box.
| arg | type | description |
|---|---|---|
| x | number | |
| y | number | |
| style | any | |
| children | { any }? |
ellipsePoly(n: number, fromDeg: number?, toDeg: number?, close: { string }?) → string
circles and ovals as clip polygons: they survive a rotated parent, where borderRadius does not
| arg | type | description |
|---|---|---|
| n | number | |
| fromDeg | number? | |
| toDeg | number? | |
| close | { string }? |
enter(delay: number, from: string?, dur: number?) → any
A one-shot entrance: fade (and optionally slide) in after `delay`; reduced motion shows it at once.
| arg | type | description |
|---|---|---|
| delay | number | |
| from | string? | |
| dur | number? |
src(s: string?) → string
Texture paths: a contract may name `captain/portraits/x.texture`; the image widget resolves `/source/...`.
| arg | type | description |
|---|---|---|
| s | string? |
silhouette(w: number, h: number, pal: any) → any
The drawn likeness for a target with no picture: a lit backdrop, head, neck and coat collar. Safe to rotate.
| arg | type | description |
|---|---|---|
| w | number | |
| h | number | |
| pal | any |
portrait(src: string?, size: number, pal: any, h: number?) → any
A portrait: the target's picture, or a drawn silhouette on a tinted plate when there is none. pal.portraitClip clips it (e.g. W.CIRCLE for an oval).
| arg | type | description |
|---|---|---|
| src | string? | |
| size | number | |
| pal | any | |
| h | number? |
focusRing(pal: any, radius: any?) → any
| arg | type | description |
|---|---|---|
| pal | any | |
| radius | any? |
button(id: string, label: string, onClick: string, pal: any, opts: any?) → any
A focusable button. pal = { bg, fg, border, hoverBg?, font? }; big = taller touch target.
| arg | type | description |
|---|---|---|
| id | string | |
| label | string | |
| onClick | string | |
| pal | any | |
| opts | any? |
chip(kind: string, row: any, selected: boolean, ctx: any, pal: any, lex: any) → any
A choice chip for a start, outfit or gear row: selected (filled, ticked), locked (dimmed, "needs level N"), or free; focus draws a ring outside it.
| arg | type | description |
|---|---|---|
| kind | string | |
| row | any | |
| selected | boolean | |
| ctx | any | |
| pal | any | |
| lex | any |
points(n: number, unit: string?) → string
| arg | type | description |
|---|---|---|
| n | number | |
| unit | string? |
ticker(total: number, unit: string?, style: any, delay: number, dur: number, steps: number?) → any
A number that ticks up from 0 to `total` over `dur` seconds after `delay`: stacked labels shown in turn (no Luau per frame). Reduced motion shows the total.
| arg | type | description |
|---|---|---|
| total | number | |
| unit | string? | |
| style | any | |
| delay | number | |
| dur | number | |
| steps | number? |
slam(rot: number, delay: number, dur: number?) → any
A stamp or seal landing: starts big and faint, slams down past its size, settles; `rot` keeps its tilt.
| arg | type | description |
|---|---|---|
| rot | number | |
| delay | number | |
| dur | number? |
line(l: any, pal: any, unit: string?, compact: boolean?, i: number?, delay0: number?) → any
One debrief line: label, value, points; coloured by bonus / penalty / info. `i` staggers it in after `delay0`.
| arg | type | description |
|---|---|---|
| l | any | |
| pal | any | |
| unit | string? | |
| compact | boolean? | |
| i | number? | |
| delay0 | number? |
stars(n: number, max: number) → string
Stars as text: ★★★☆☆.
| arg | type | description |
|---|---|---|
| n | number | |
| max | 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.
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.