The shapes a game's hud comes in, and one form every front end reads.
A hud is rows of runs — [row] drawn under the world — or %{left: [row], width: columns, bottom: [row]}, a column of rows beside the world and rows under both. A
row is [run] or {tag, [run]}, the tag naming the row for a front end that styles
or hides rows by name. A run is text, {text, colour} or {text, style}, colour
an {r, g, b} or nil and style a map with :fg (an {r, g, b} or a colour
name Linocut.Palette knows) and :bold.
Summary
Functions
A run's foreground as {r, g, b}, or nil.
The hud as a column of rows, its width in cells, and the rows under the world.
Every row in reading order: the column, then the rows under.
The runs of a row as {text, style} pairs.
A row's tag, or nil.
A row's text with no styling.
Types
Functions
A run's foreground as {r, g, b}, or nil.
@spec layout(t()) :: %{left: [row()], width: non_neg_integer(), bottom: [row()]}
The hud as a column of rows, its width in cells, and the rows under the world.
Every row in reading order: the column, then the rows under.
The runs of a row as {text, style} pairs.
A row's tag, or nil.
A row's text with no styling.