Text

class UI.Text

A text label. See UI.Panel.add_text().

rect_transform: UI.RectTransform

The rect transform for the text.

Attribute:

Read-only, cannot be set

Return type:

UI.RectTransform

visible: boolean

Whether the UI object is visible.

Attribute:

Can be read or written

Return type:

boolean

content: string

The text string

Attribute:

Can be read or written

Return type:

string

font: string

Name of the font

Attribute:

Can be read or written

Return type:

string

available_fonts: List

A list of all available fonts.

Attribute:

Read-only, cannot be set

Return type:

List

size: number

Font size.

Attribute:

Can be read or written

Return type:

number

style: UI.FontStyle

Font style.

Attribute:

Can be read or written

Return type:

UI.FontStyle

color: Tuple

Set the color

Attribute:

Can be read or written

Return type:

Tuple

alignment: UI.TextAnchor

Alignment.

Attribute:

Can be read or written

Return type:

UI.TextAnchor

line_spacing: number

Line spacing.

Attribute:

Can be read or written

Return type:

number

remove()

Remove the UI object.

class UI.FontStyle

Font style.

normal

Normal.

bold

Bold.

italic

Italic.

bold_and_italic

Bold and italic.

class UI.TextAlignment

Text alignment.

left

Left aligned.

right

Right aligned.

center

Center aligned.

class UI.TextAnchor

Text alignment.

lower_center

Lower center.

lower_left

Lower left.

lower_right

Lower right.

middle_center

Middle center.

middle_left

Middle left.

middle_right

Middle right.

upper_center

Upper center.

upper_left

Upper left.

upper_right

Upper right.