Screens
Puts every authored screen of *First Light: Lucina* on the glass and drives them. Mounted once, on `mount_screens`; it needs nothing else on that entity.
Screens
Puts every authored screen of First Light: Lucina on the glass and drives
them. Mounted once, on mount_screens; it needs nothing else on that entity.
What it draws
| Screen | Layer | What it is |
|---|---|---|
lu-menu | 960 | whichever card the phase calls for |
lu-hud | 120 | the dawn rail, the dose rail, the plate readout, the tray hint, the pause pip and the Keeper's line |
lu-speech | 980 | the Keeper's line alone, wherever no HUD is carrying it |
The HUD is two vertical rails — dawn down the left edge, dose down the right —
with the plate's readout above the plate and the pause pip in the top-left
corner. Nothing spans the frame: the game films at 1080x1440, and every anchor
is a fraction of the live ui.screenSize(), so the same arrangement holds on a
television and on a phone held either way.
What decides which card is up
Core.state.phase, which the rules slice's Game.component owns.
| Phase | Card |
|---|---|
title | the title card |
opening / play / fixing | none — the HUD |
paused | the pause card |
result | the result card: the plate as it was fixed, and its match |
won / lost | the two end cards |
How to play is an overlay over whichever card opened it, not a phase, so it reads the same from the title card, the pause card and a failed result.
When the player takes a line this component emits uiRequest(action) —
"start", "pause", "resume", "restart", "next", "title" — and waits.
If nothing has moved the phase within a moment it moves the phase itself, so
the game is reachable from its own title card whatever else is loaded. The
moment Game answers a uiRequest, that fallback stops firing on its own.
Controls
ui is activated the instant a card goes up and released the instant the last
one comes down; it stands down player and uipause while it is live.
uipause is live through play alone and carries the one control that opens
the pause card.
- Focus moves on
navigate(arrows / d-pad) andnavigateStick(left stick), wraps at both ends, and lands on a line the instant a card opens. The focused line carries a brass ring, a lit edge marker and a diamond, and shifts a few points to the right. - Choose on
confirm(Enter, Space, south), leave onback(Escape, Backspace, right mouse, east); a result or end card also answersrestart(R, north). - A pointer or a thumb takes a line by touching it, which also moves the ring there, so mixing a mouse and a pad never loses the player's place.
- Each card carries the legend for the family in the player's hands, read from
/runtime/input/deviceand published asCore.state.device. The instruction page redraws its whole control table for that family.
Public fields
menuMap: assetRef(inputMap)— the card scheme. Defaultui.pauseMap: assetRef(inputMap)— the pause control. Defaultuipause.
Methods
:repaint()— force the next tick to rebuild every screen. The screens are repainted only when their own inputs change, and a hot reload ofthemeis not one of those inputs, so this is how an edit to the design system reaches the glass without restarting anything.:focus()—{ card, id, device }: the card that is up, the line the ring is on, and the family being drawn for.:setDevice(name?)— pin the family the legends and the instruction page are drawn for;nilhands it back to the device counters.:choose()— take the focused line, as if the player had chosen it.:move(delta)— move the focus ring bydeltalines, wrapping.
Lifecycle
awake()— paints the first frame.update(dt)/editorUpdate(dt)— one tick either way: reads the device, resolves the card the phase asks for, activates or releases the schemes, and repaints only the screens whose inputs changed.onDestroy()— releases both schemes and unregisters every screen it put up.
Scoped to this part · feeds back into the world's score.