Text

Introduction

Text objects have a Text property which controls the displayed text. By default this value is set to "Hello".

Changing Text

The Text property can be changed in the multi-line edit window.

Text will wrap according to the Text object's Width.

The enter key can be used to add new lines to text.

Using BBCode for Inline Styling

Gum text supports inline styling using BBCode-like syntax. To add inline styling, surround text with variable assignment tags as shown in the following screenshot:

The following table shows the available variables that can be used for inline styling:

TagExampleResult

Color

This is [Color=orange]orange[/Color] text.

Red Green Blue

This is [Red=0][Green=128][Blue=255]light blue[/Red][/Green][/Blue] text.

FontScale

This is [FontScale=2]big[/FontScale] text.

IsBold

This is [IsBold=true]bold[/IsBold] text.

IsItalic

This is [IsItalic=true]italic[/IsItalic] text.

Font

This is [Font=Papyrus]Papyrus[/Font] text.

FontSize

This is [FontSize=36]bigger[/FontSize] text.

OutlineThickness

This is [OutlineThickness=2]outlined[/OutlineThickness] text.

Note that changing Font and FontSize results in new Fonts created in the Font Cache.

BBCode can span multiple lines, whether the newlines happen due to line wrapping or through the addition of newlines in the text.

Multiple tags can overlap each other allowing you to combine tags for a single piece of text. For example, the following sets text to both bold and orange:

This is [Color=Orange][IsBold=true]bold and orange[/Color][/IsBold] text.

Styles can contain other styles as many levels deep as necessary.

This [Color=Orange]is orange, [IsBold=true]bold[/IsBold], and [IsItalic=true]italic[/IsItalic][/Color] text.    

Last updated