coastline 0.0.4
Loading...
Searching...
No Matches
coastline::TextFont Class Reference

The texture of the 256 glyphs of the font and of the mouse pointer. More...

#include <textfont.h>

Public Member Functions

void Draw (SceneRenderer &renderer, const TextGrid &grid, std::optional< std::array< int, 2 > > pointer) const
 Draw every cell of the grid and its text cursor, and the pointer last over them.

Static Public Member Functions

static std::unique_ptr< TextFont > Create (SceneRenderer &renderer)
 Upload the glyphs of unscii-16 and the pointer.

Detailed Description

The texture of the 256 glyphs of the font and of the mouse pointer.

Member Function Documentation

◆ Create()

std::unique_ptr< TextFont > coastline::TextFont::Create ( SceneRenderer & renderer)
static

Upload the glyphs of unscii-16 and the pointer.

Parameters
rendererThe renderer that draws the grid.
Returns
The font, or nothing when an upload failed.

◆ Draw()

void coastline::TextFont::Draw ( SceneRenderer & renderer,
const TextGrid & grid,
std::optional< std::array< int, 2 > > pointer ) const

Draw every cell of the grid and its text cursor, and the pointer last over them.

Parameters
rendererThe renderer of the frame, between Begin() and End().
gridThe grid.
pointerThe tip of the pointer in pixels of the grid, or none to draw no pointer.

The documentation for this class was generated from the following file: