Screens
Puts every authored screen of *First Light: Luteway* on the glass and drives them. It is mounted once, on `mount_screens`, and needs nothing else on that entity.
Screens
Puts every authored screen of First Light: Luteway on the glass and drives
them. It is mounted once, on mount_screens, and needs nothing else on that
entity.
What it draws
| Screen | Layer | What it is |
|---|---|---|
lw-menu | 960 | whichever card the phase calls for |
lw-hud | 120 | the height and dawn readout, the lute gauge, the cliff rail, the pause pip, the sea warning |
The HUD is two vertical rails down the left edge with the readout above them and the pause pip opposite. Nothing spans the frame: the game films at 1080x1440, and the engine's own touch overlay lives in a band on the right, so a bar across the top would fit neither.
What decides which card is up
LW.state.phase, which the climb slice's Game.component owns.
| Phase | Card |
|---|---|
title | the title card |
opening | none — the staged crane, with the frame to itself |
play | none — the HUD |
paused | the pause card |
won / lost | first light, or the sea |
How to play is an overlay over whichever card opened it, not a phase, so it reads the same from the title card and from the pause card.
When the player takes a line, this component emits uiRequest(action) —
"start", "pause", "resume", "restart", "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 uiRequest, that fallback stops firing on its own.
Controls
uimenu is activated the instant a card goes up and released the instant the
last one comes down; it stands down climb, player and uipause while it is
live. uipause stays live through play and carries the control that opens the
pause card.
- Focus moves on
navigate(arrow keys / d-pad) andnavigateStick(left stick), wraps at both ends, and lands on something the instant a card opens. The focused line carries a crest-yellow 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), and an end card also answersrestart(R, north). - A pointer or a thumb takes a line by touching it, which also moves the ring there, so a player who mixes a mouse and a pad never loses their place.
- Each card carries the legend for the family in the player's hands, read from
/runtime/input/deviceand published asLW.state.device. The how-to card redraws its whole control table for that family.
Public fields
menuMap: assetRef(inputMap)— the menu scheme. Defaultuimenu.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 oflwuiis 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 how-to card are drawn for;nilhands it back to the device counters.
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 menu scheme, 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.