coastline 0.0.4
Loading...
Searching...
No Matches
coastline::TextStyle Struct Reference

How a string of the menus is drawn. More...

#include <menutext.h>

Collaboration diagram for coastline::TextStyle:

Public Types

enum class  Align { Left , Center , Right }
 Where a string stands from its x. More...

Public Attributes

int size = 10
Align align = Align::Left
bool shadow = false
bool bold = false
bool doubled = true
 Whether the place and the size are of the 320 by 240 screen a frame of high resolution doubles, or of the 640 by 480 screen as they are, as the frames of a race of the PC release draw them.
int lineHeight = 0
 The distance between the baselines of two lines of a string with a newline, in the units of size, or 0 for size.
std::span< const int > lineGaps
 The distance from the baseline of each line to the next, in place of lineHeight, for a string of one line more than it lists.
std::optional< std::array< int, 6 > > colors
 The red, green, and blue of the bottom and then of the top of the gradient, if not default.

Detailed Description

How a string of the menus is drawn.

Member Enumeration Documentation

◆ Align

enum class coastline::TextStyle::Align
strong

Where a string stands from its x.

Enumerator
Left 

Position the string's left edge at the requested x coordinate.

Center 

Centre the string at the requested x coordinate.

Right 

Position the string's right edge at the requested x coordinate.

Member Data Documentation

◆ size

int coastline::TextStyle::size = 10

The height of the text, in pixels of the 320 by 240 screen.

◆ align

Align coastline::TextStyle::align = Align::Left

Where the string stands from its x.

◆ shadow

bool coastline::TextStyle::shadow = false

Whether the glyphs are coloured by the shadow gradient.

◆ bold

bool coastline::TextStyle::bold = false

Whether the default colours are those of bold text.

◆ doubled

bool coastline::TextStyle::doubled = true

Whether the place and the size are of the 320 by 240 screen a frame of high resolution doubles, or of the 640 by 480 screen as they are, as the frames of a race of the PC release draw them.

◆ lineHeight

int coastline::TextStyle::lineHeight = 0

The distance between the baselines of two lines of a string with a newline, in the units of size, or 0 for size.

◆ lineGaps

std::span<const int> coastline::TextStyle::lineGaps

The distance from the baseline of each line to the next, in place of lineHeight, for a string of one line more than it lists.

A string of another number of lines takes lineHeight.

◆ colors

std::optional<std::array<int, 6> > coastline::TextStyle::colors

The red, green, and blue of the bottom and then of the top of the gradient, if not default.


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