flix

0.81.0

Screens

Drawing the cabinet, as opposed to drawing the game.

View.render knows how to draw one game and nothing else. This module decides which game is on screen and what to overlay on it -- the title, the invitation to press a key, the score table. It uses only the Canvas effect, so a test can record a whole title screen as data without a window.

Definitions

def attractPanelTop(): Float32§ Source

The top edge of the attract screen's panel.

Public because View has to stay clear of it. The demo plays behind this panel, so anything the game itself draws at the middle of the field -- the level banner between waves, most of all -- lands inside it and neither is readable.

def nerdLines(s: Session, w: World, telemetry: Stats): List[(String, String)]§ Source

What the overlay says, as label and value pairs.

Split out from the drawing so a test can read it. Everything here is a pure function of the session and the figures the runtime handed over.

def render(s: Session, telemetry: Stats): Unit \ Canvas§ Source

One frame of whatever the cabinet is showing.