Skip to main content

Module glyph

Module glyph 

Source
Expand description

The glyph look of the debug screens: the debug menu (paint), the glyph sampler (sampler), the scene camera (paint_camera), the Debug key’s hint (paint_hint), the debug view’s screen (paint_view) and its gizmos over the frame (paint_gizmos).

Constants§

GLYPHS_PER_ROW
Glyphs per sampler row; each glyph is followed by a blank cell.
SWATCH_COLUMNS
Swatch columns across the console.
SWATCH_W
Width of one palette swatch column (██ name).

Functions§

paint
Paints the debug menu’s view over the whole of buf: the title, the menu centred under it and the help line at the bottom.
paint_camera
Paints the scene camera’s view over the whole of buf: the title, the zoom and the help line; the picture through the window in a frame, the caption over it and the text box over its corner.
paint_gizmos
Adds the debug view’s gizmos to buf (ADR-0085), in the order handed in, over everything drawn so far: each as an Item::Gizmo in its role’s engine colour from palette (GizmoRole::color), never the game’s own. A label prints its text into the cells from the one holding its pixel, keeping their backgrounds, and its item’s clip is those cells.
paint_hint
Prints hint (a screen’s view holds the hint) right-aligned on row y, one cell in from the edge, unless those cells or the one before them already hold text.
paint_view
Paints the “Debug view” screen’s view over the whole of buf, as the debug menu is painted: the title, the channels centred under it (or the line saying there are none) and the help line at the bottom.
palette_top
Row of the “Palette” heading: right after the glyph grid’s own title and rows, no blank row between. Computed from glyphs (rather than a fixed constant) so the bottom half doesn’t waste rows the top half didn’t use, however many glyphs the font ends up with.
panels_top
Row where the sample panels start, for palette‘s size and glyphs’ row count: the palette title, its swatch rows, then the sample sentence, with no blank rows between (every row here is scarce once the palette is large).
panels_top_for
panels_top for a palette of colours colours.
sampler
A buffer of a console of spec: the top half shows every glyph in glyphs in a grid; the bottom half shows every palette colour as a swatch plus its name, a line of sample text and the game’s panels.