Screens
Puts every authored screen of *First Light: Vagant* 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: Vagant 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 |
|---|---|---|
fl-menu | 960 | whichever card the phase calls for |
fl-hud | 120 | dawn band, clock, pause pip, the seven standards, oil, wig |
fl-alert | 118 | the hunt vignette and the relight prompt |
fl-say | 980 | the subtitle line, above the cards |
The subtitle sits above the cards on purpose: a staged ending reads you your entry in the minute-book while the card is on the glass, and a line nobody can read is a line the game did not say.
What decides which card is up
fl.state.phase, which the loop slice owns.
| Phase | Card |
|---|---|
boot, title | the title card |
opening | none — a staged shot, with only the words over it |
play | none — the HUD |
paused | the pause card |
won / lost | first light, or the entry in the minute-book |
How to play is an overlay over whichever card opened it, not a phase.
When the player takes a line, this component emits uiRequest(action) —
"start", "pause", "resume", "restart", "title" — and waits. If
nothing has moved the phase after a moment it moves the phase itself, so the
game is reachable from its own title card whatever else is or is not listening.
Controls
ui.uimenu is activated the instant a card goes up and released the instant
the last comes down; it stands the player's own scheme down while it is live.
ui.uipause carries the one control that has to stay live during play.
- 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 brass ring, a lit edge marker and a diamond. - Choose on
confirm(Enter, Space, south), leave onback(Escape, right mouse, east), and an end card also answersrestart(R, north). - A pointer or a thumb takes a line by touching it. Doing so moves the ring to that line, so a player who mixes a mouse and a pad never loses their place.
- Each card shows the legend for the family actually in the player's hands,
read from
/runtime/input/device.
Public fields
menuMap: assetRef(inputMap)— the menu scheme. Defaultui.uimenu.pauseMap: assetRef(inputMap)— the pause control. Defaultui.uipause.
Methods
:repaint()— force the next tick to rebuild every screen. The screens are only repainted when their own inputs change, and a hot reload of a style module is not one of those inputs, so this is how an edit toui.fluireaches the glass without restarting anything.
Lifecycle
awake()— subscribes toline,caughtanddawn, activates the pause control, and paints the first frame.update(dt)/editorUpdate(dt)— one tick either way: reads the device, ages the subtitle, resolves the card the phase asks for, and repaints only the screens whose inputs changed.onDestroy()— drops every subscription, releases both schemes, and unregisters every screen it put up.
Scoped to this part · feeds back into the world's score.