Theme — the look of every screen in FIRST LIGHT: RESOWN.
One place holds the colours, the type scale, the surfaces and the drawn
marks, so the title card, the HUD and the end cards read as one printed
object: the previous keeper's almanac, opened over the hillside.
Every size is a fraction of the SHORTER screen edge (`FL.sz`), read live,
so a card composed on the filmed 1080x1440 frame holds its proportions on
a wide monitor and on a phone held either way. Nothing here is a pixel
number chosen for one shape.
local T = require("game.ui.Theme")
{ type = "label", props = { text = "DAWN" }, style = T.text("eyebrow") }
hex(rgb: { number }, mul: number?, alpha: number?) → string
Colour. The palette is FL.PALETTE; this turns it into CSS and adds the
tints and washes the screens need on top of it.
A palette triple as a CSS colour, optionally scaled in value by `mul`
and given an alpha.
| arg | type | description |
|---|
| rgb | { number } | |
| mul | number? | |
| alpha | number? | |
ch(v: number) → number
| arg | type | description |
|---|
| v | number | |
phaseColor(phase: string) → string
The colour a phase is signed with — the HUD's phase word, the sun arc's
fill and the phase banner all take it from here so they agree.
| arg | type | description |
|---|
| phase | string | |
size(name: string) → number
A size from the scale, in the live canvas's units.
| arg | type | description |
|---|
| name | string | |
text(role: string) → void
A ready style table for a named text role.
| arg | type | description |
|---|
| role | string | |
scrim( ) → void
Surfaces.
The dimmed, frosted wash a card lies on. Covers the whole viewport.
card(maxWidthPx: number?) → void
A page of the almanac: warm paper, a foxed edge, a lit top rim.
`maxWidthPx` is an absolute measure in the live canvas's units, because
how wide a page may be is decided against BOTH screen edges — the short
one sets the type, the long one sets how far a line may run.
| arg | type | description |
|---|
| maxWidthPx | number? | |
pane( ) → void
A HUD cluster: smoked glass with a lit edge, so numbers stay legible
over both the indigo night and the amber dawn.
rule(width: string?) → void
The bronze hairline that separates the parts of a card.
| arg | type | description |
|---|
| width | string? | |
rowStyle(focused: boolean) → void
A menu row's style. Every row is a real tap target and a focus stop: the
finger taps it, the mouse clicks it, the pad lights it — and the lit one
carries a ring a player can see across the room.
| arg | type | description |
|---|
| focused | boolean | |
riseIn(delay: number, distance: number?) → void
Motion.
A card, its rows or a banner arriving. `delay` staggers siblings.
| arg | type | description |
|---|
| delay | number | |
| distance | number? | |
breathe(color: string) → void
A slow breath, for the one thing on screen that must not be ignored.
| arg | type | description |
|---|
| color | string | |
bannerIn( ) → void
The phase banner: in, hold, out — one shot on a phase change.
svg(lines: { string }) → string
The drawn marks. Inline SVG, so they stay crisp at any size and take
their colour from the palette above. Each is assembled a line at a time:
an interpolated string is one line, so the document is a joined list.
| arg | type | description |
|---|
| lines | { string } | |
n2(v: number) → string
| arg | type | description |
|---|
| v | number | |
plateSvg(glow: number) → string
The bronze face-plate: the thing the Facer holds and the game's emblem.
`glow` 0..1 opens the rays and lights the boss.
| arg | type | description |
|---|
| glow | number | |
sunArcSvg(h: number, tint: string) → string
The sun's track over the valley, with the sun on it. `h` is
FL.state.sunHeight, -1..1: the arc is the horizon and above, and a sun
still under it sits dim and low.
| arg | type | description |
|---|
| h | number | |
| tint | string | |
seedSvg( ) → string
A grain of seed — the economy's unit, drawn beside the count.
shrineSvg(tint: string) → string
The shrine at the top of the hill — the thing being defended.
| arg | type | description |
|---|
| tint | string | |
zymeSvg( ) → string
The ferment's mark — a froth of bubbles, on the threat meter.
hillSvg( ) → string
A terraced hillside in one mark — the title card's and the how-to's
motif: six terraces, the shrine lit at the top, the bloom at the foot.