▣
module · drop-in viewer
theme
The palette, the type scale and the layout metrics every screen of *First Light: Henter of the Glew* is measured from.
by·posted 1mo ago
What it does
theme
The palette, the type scale and the layout metrics every screen of First Light: Henter of the Glew is measured from.
local T = require("game.ui.theme")
local L = T.layout() -- read it fresh every frame
local W = T.layout({ width = 1920, height = 1080 }) -- ask about another shape
T.layout() derives every size from the LIVE ui.screenSize(): one scale
factor s taken from the short edge, a card width capped by both edges, a
touch target no smaller than a thumb, and compact / dense for a screen with
more width than height. Nothing here is a number chosen for one frame, which is
what lets the same screens read on a phone held either way, a laptop, and a
television.
T.color / T.wash | night blue, violet, mist, glew amber, ember, bone — solid and translucent |
T.font | display (EB Garamond) for the folk-tale voice, body (PT Serif) for what a player reads at speed |
T.layout(size?) | the metrics: s, pad, railW, cardW, touch, type.*, compact, dense |
T.label / T.svg / T.abs | the node shapes every screen repeats |
T.enter / T.breathe | a one-shot entrance and an idle glow |
Consumed by game.ui.hud, game.ui.cards and game.ui.Screens.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.