flui
The look of *First Light: The Three Fires* — one place for the palette, the type scale, the ornament and the small composed pieces every card and the HUD are built out of.
flui
The look of First Light: The Three Fires — one place for the palette, the type scale, the ornament and the small composed pieces every card and the HUD are built out of.
local U = require("game.ui.flui")
local m = U.metrics()
U.slab(m, { U.wingedDisc(m, 300), U.display(m, "First Light", 66) })
Metrics
U.metrics() reads ui.screenSize() and returns { w, h, k, portrait, cardW, gutter }. Every size in this module comes out of it: k is a type scale that
rides the SHORTER edge of the screen, so a tall phone and a wide monitor get
type of the same physical weight, and the boxes are fractions with a ceiling —
a card is 88% of the width but never wider than about 680. U.px(m, n) scales
and rounds a design value to whole logical pixels.
What is in it
| Group | |
|---|---|
| Palette | NIGHT STONE INK DIM FAINT BRONZE EMBER GOLD ASH BLOOD GREEN, and SERIF / SERIF_I / MONO |
| Ornament | wingedDisc (the sun between two wings, the sign over an Arsacid gate), rule (a hairline with a lozenge), flame (lit or the cold outline of one), censerGlyph, sunrise |
| Type | display eyebrow body |
| Boxes | backdrop (a dimmed, frosted full-glass field with an optional watermark), slab (the sandstone card), choice (a row a player picks), controlHint, gauge, ring |
Every glyph is drawn as inline SVG from a template rather than imported, so it takes the colour it is asked for — a flame in each fire's own tint, ornament in bronze or in an ending's accent.
Two rules the layout depends on
- A wrapping label's width goes on its CONTAINER, and that container must not
centre its children. A
wrap = truelabel inside a box carryingalignItems = "center"collapses to one glyph per line, mid-word, however definite the box's width is.U.bodyis the shape that works; centre the text withtextAlign. - A row of cells is given an explicit width, never
flex = 1alone. Cells that only grow are pushed wider than the card by the longest label in them, and a card does not clip what overflows it.
Scoped to this part · feeds back into the world's score.