game.ui.screens.screenkit — the herbarium type case.
The colour language, the type scale, the ornaments and the box shapes every
authored screen in Verdigris Cloister is built from. Owned by the `screens`
slice; the screens themselves are in `game.ui.screens.pages`, and the
botanical figures are in `game.ui.screens.plates`.
The screen is 1080 x 1440 — PORTRAIT. Everything here stacks down. There is
no two-column anything and no wide bar: the tall axis carries every
composition, and the numbers below are written against that canvas.
Two registers, deliberately different, so the campaign has range:
FIELD — deep green and gold leaf, an illuminated page. The title, the
briefing and the end cards live here.
PLATE — aged vellum and printed ink, a herbarium sheet. The seed
catalogue and the codex live here.
css(rgb: { number }) → string
Derived from Core.PALETTE, written as CSS because that is what the style
table speaks. Anything the palette already names is quoted from it rather
than invented here.
| arg | type | description |
|---|
| rgb | { number } | |
alpha(hex: string, a: number) → string
--!desc A colour with an alpha channel, as CSS.
--!arg hex A "#rrggbb" string.
--!arg a Alpha 0..1.
--!return A "#rrggbbaa" string.
--!example kit.alpha(kit.C.gold, 0.3)
| arg | type | description |
|---|
| hex | string | |
| a | number | |
text(text: string, style: any?) → any
--!desc A text node.
--!arg text What it says.
--!arg style Its style table.
--!return A label widget node.
--!example kit.text("Hold the line", { fontSize = 30 })
| arg | type | description |
|---|
| text | string | |
| style | any? | |
para(text: string, style: any?) → any
--!desc A paragraph that wraps. The width belongs to the container, never to
--! the label, so this returns the label already carrying `wrap`.
--!arg text The paragraph.
--!arg style Its style table.
--!return A wrapping label widget node.
--!example kit.para("Nobody has pruned this hall...", { fontSize = 23 })
| arg | type | description |
|---|
| text | string | |
| style | any? | |
gap(h: number) → any
--!desc An empty box of a given height — the vertical rhythm's spacer.
--!arg h Height in canvas pixels.
--!return A widget node.
--!example kit.gap(24)
| arg | type | description |
|---|
| h | number | |
box(style: any, children: { any }?) → any
--!desc A box. The workhorse: a vertical container with a style.
--!arg style Its style table.
--!arg children Its children.
--!return A vertical widget node.
--!example kit.box({ padding = 20 }, { kit.text("hi") })
| arg | type | description |
|---|
| style | any | |
| children | { any }? | |
row(style: any, children: { any }?) → any
--!desc A row.
--!arg style Its style table.
--!arg children Its children.
--!return A horizontal widget node.
--!example kit.row({ gap = 12 }, { a, b })
| arg | type | description |
|---|
| style | any | |
| children | { any }? | |
kicker(text: string, color: string?, size: number?) → any
--!desc A small-caps kicker: tracked, uppercase, quiet. What a printed sheet
--! puts above a heading.
--!arg text The words.
--!arg color Its colour.
--!arg size Its size (default kit.T.micro).
--!return A label widget node.
--!example kit.kicker("Room the second", kit.C.brass)
| arg | type | description |
|---|
| text | string | |
| color | string? | |
| size | number? | |
rule(color: string?, ornament: string?, width: any?) → any
--!desc A hairline rule with a printer's flower set in the middle of it.
--!arg color The rule's colour.
--!arg ornament A glyph from kit.O, or nil for a plain rule.
--!arg width The rule's width (default "100%").
--!return A horizontal widget node.
--!example kit.rule(kit.C.gold, kit.O.fleuronLeft)
| arg | type | description |
|---|
| color | string? | |
| ornament | string? | |
| width | any? | |
doubleRule(color: string?) → any
--!desc A double rule — a thick line over a hairline, the way a title page
--! is set.
--!arg color The rule's colour.
--!return A vertical widget node.
--!example kit.doubleRule(kit.C.gold)
| arg | type | description |
|---|
| color | string? | |
dropCap(letter: string, opts: any?) → any
--!desc An illuminated initial: the drop cap that opens a briefing.
--!arg letter One character.
--!arg opts { size, fg, bg, edge }
--!return A vertical widget node.
--!example kit.dropCap("N", { fg = kit.C.field, bg = kit.C.gold })
| arg | type | description |
|---|
| letter | string | |
| opts | any? | |
illuminated(children: { any }, opts: any?) → any
--!desc The illuminated border every field-register screen sits inside: a
--! gold hairline frame with a flower at each corner.
--!arg children What goes inside it.
--!arg opts { color, background, padding, gap, flex }
--!return A vertical widget node.
--!example kit.illuminated({ kit.text("hi") })
| arg | type | description |
|---|
| children | { any } | |
| opts | any? | |
sheet(children: { any }, opts: any?) → any
--!desc A herbarium sheet: aged vellum, a letterpress border, and the fibre
--! of the paper under it. The plate register's ground.
--!arg children What is printed on it.
--!arg opts { padding, gap, flex, tone }
--!return A vertical widget node.
--!example kit.sheet({ kit.text("Creepvine") })
| arg | type | description |
|---|
| children | { any } | |
| opts | any? | |
button(id: string, label: string, opts: any?) → any
--!desc A manuscript button. Reads as a pressed brass plate on the field
--! register and as a printed slug on the plate register.
--!arg id The callback id fired on click.
--!arg label What it says.
--!arg opts { variant = "primary"|"ghost"|"print", note, width, enabled }
--!return A vertical widget node carrying onClick.
--!example kit.button("screens:start", "Begin", { variant = "primary" })
| arg | type | description |
|---|
| id | string | |
| label | string | |
| opts | any? | |
fieldRoot(children: { any }, opts: any?) → any
--!desc The full-screen ground of a field-register screen: deep green, a
--! warm shaft from above, a vignette, and paper grain over all of it.
--!arg children What sits on it.
--!arg opts { padding, gap, justify, align }
--!return A vertical widget node sized to the whole canvas.
--!example kit.fieldRoot({ kit.text("Verdigris Cloister") })
| arg | type | description |
|---|
| children | { any } | |
| opts | any? | |
plateRoot(children: { any }, opts: any?) → any
--!desc The full-screen ground of a plate-register screen: the dark press
--! bed the herbarium sheets are laid on.
--!arg children What sits on it.
--!arg opts { padding, gap }
--!return A vertical widget node sized to the whole canvas.
--!example kit.plateRoot({ sheet })
| arg | type | description |
|---|
| children | { any } | |
| opts | any? | |
setMotion(on: boolean) → void
--!desc Turn the screens' entrance and idle animation on or off. Off is
--! what edit mode wants, because time is paused there and an entrance
--! would hold its first (invisible) keyframe.
--!arg on Whether animations are produced.
--!example kit.setMotion(engine.mode == "play")
| arg | type | description |
|---|
| on | boolean | |
riseIn(delay: number?, rise: number?) → any
--!desc A staggered entrance: fade up from below.
--!arg delay Seconds before it starts.
--!arg rise How far below it starts, in pixels (default 18).
--!return An animation table for a style.
--!example style.animation = kit.riseIn(0.15)
| arg | type | description |
|---|
| delay | number? | |
| rise | number? | |
settleIn(delay: number?) → any
--!desc A slow settle from slightly too large — for a title.
--!arg delay Seconds before it starts.
--!return An animation table for a style.
--!example style.animation = kit.settleIn(0.1)
| arg | type | description |
|---|
| delay | number? | |
breathe(period: number?) → any
--!desc A breathing glow, for gold that should look lit rather than printed.
--!arg period Seconds for one breath (default 4.5).
--!return An animation table for a style.
--!example style.animation = kit.breathe()
| arg | type | description |
|---|
| period | number? | |
drift(period: number, dx: number, dy: number) → any
--!desc A very slow drift, for a spore or a mote of dust.
--!arg period Seconds for one pass.
--!arg dx How far it travels sideways.
--!arg dy How far it travels up.
--!return An animation table for a style.
--!example style.animation = kit.drift(11, 20, -60)
| arg | type | description |
|---|
| period | number | |
| dx | number | |
| dy | number | |
motes(n: number, color: string?) → void
--!desc Motes of light drifting up through the frame, absolutely positioned
--! inside a `position = "relative"` parent. Cosmetic only.
--!arg n How many.
--!arg color Their colour.
--!return An array of widget nodes.
--!example for _, m in ipairs(kit.motes(14)) do table.insert(kids, m) end
| arg | type | description |
|---|
| n | number | |
| color | string? | |
pips(filled: number, total: number, opts: any?) → any
--!desc A pip row — filled and empty marks, the way a catalogue shows a
--! count without a number.
--!arg filled How many are filled.
--!arg total How many there are.
--!arg opts { on, off, size }
--!return A horizontal widget node.
--!example kit.pips(2, 4, { on = kit.C.gold })
| arg | type | description |
|---|
| filled | number | |
| total | number | |
| opts | any? | |
stat(value: string, label: string, opts: any?) → any
--!desc A labelled statistic, set the way a printed sheet sets one: the
--! value large, the name tracked and small underneath.
--!arg value The number or word.
--!arg label What it is.
--!arg opts { color, labelColor, size }
--!return A vertical widget node.
--!example kit.stat("6", "rounds")
| arg | type | description |
|---|
| value | string | |
| label | string | |
| opts | any? | |