Skip to main content

Module gizmo

Module gizmo 

Source
Expand description

The debug view’s shapes as the frame holds them (ADR-0085): a GizmoItem is Item::Gizmo, drawn over everything else, in a colour the debug skin picked from its GizmoRole. Screens never make these: they hand Gizmos in, and paint_gizmos turns them into items. Each item’s pixels come from shape’s integer rules, as runs (GizmoItem::for_each_run), so every renderer draws the same ones.

Structs§

GizmoItem
A gizmo in the frame: its channel’s id and role (for the snapshot), its shape, the colour the debug skin gave its role, and the part of the frame it is drawn in.
LabelText
A gizmo label’s text as the frame keeps it: printable ASCII, at most LABEL_MAX characters (longer text is cut, and anything else is ?). A fixed array, so an Item stays Copy.

Enums§

GizmoRole
What a gizmo shows, which picks its colour: the debug skin’s (color), never the game’s. More roles may come with later channels.
GizmoShape
A gizmo’s shape as the frame keeps it, in console pixels.

Constants§

LABEL_MAX
The most characters a LabelText keeps.