Text#

class Text#

A text label. Added to a Canvas or a Panel.

Base class: Object

Inherited Members

string Content { get; set; }#

The text string

Game Scenes:

All

bool WordWrap { get; set; }#

Whether the text wraps onto further lines when it is wider than the space it has. Text that does not wrap carries on past the edge, and its preferred size is that of a single line, so a changing value leaves a layout in place.

Game Scenes:

All

string Font { get; set; }#

Name of the font

Game Scenes:

All

Note

Empty if the game provided no font to draw the text with, in which case it is not drawn. See Text.AvailableFonts for the names that can be set.

IList<string> AvailableFonts { get; }#

A list of all available fonts.

Game Scenes:

All

int Size { get; set; }#

Font size.

Game Scenes:

All

FontStyle Style { get; set; }#

Font style.

Game Scenes:

All

StdLib.ColorRGBA Color { get; set; }#

The color the text is drawn in.

Game Scenes:

All

TextAnchor Alignment { get; set; }#

Alignment.

Game Scenes:

All

float LineSpacing { get; set; }#

Line spacing.

Game Scenes:

All

enum FontStyle#

Font style.

Normal#

Normal.

Bold#

Bold.

Italic#

Italic.

BoldAndItalic#

Bold and italic.

enum TextAlignment#

Text alignment.

Left#

Left aligned.

Right#

Right aligned.

Center#

Center aligned.

enum TextAnchor#

Text alignment.

LowerCenter#

Lower center.

LowerLeft#

Lower left.

LowerRight#

Lower right.

MiddleCenter#

Middle center.

MiddleLeft#

Middle left.

MiddleRight#

Middle right.

UpperCenter#

Upper center.

UpperLeft#

Upper left.

UpperRight#

Upper right.