Menu
Lumberyard
User Guide (Version 1.13)

UITextComponent

Controls the text and formatting of a text element.

UiTextBus

Services messages for the UiTextComponent.

GetColor

Returns the color to draw the text string.

Syntax

AZ::Color GetColor()

GetFont

Returns the pathname to the font.

Syntax

AZStd::string GetFont()

GetFontEffect

Returns the font effect.

Syntax

int GetFontEffect()

GetFontSize

Returns the size of the font in points.

Syntax

float GetFontSize()

GetHorizontalTextAlignment

Returns the horizontal text alignment.

Syntax

eUiHAlign GetHorizontalTextAlignment()

Following are possible values for eUiHAlign.

enum eUiHAlign { eUiHAlign_Left, eUiHAlign_Center, eUiHAlign_Right };

GetOverflowMode

Returns the overflow behavior of the text.

Syntax

eUiTextOverflowMode GetOverflowMode()

Following are possible values for eUiTextOverflowMode.

enum eUiTextOverflowMode { eUiTextOverflowMode_OverflowText, eUiTextOverflowMode_ClipText };

GetText

Returns the text string being displayed by the element.

Syntax

AZStd::string GetText()

GetVerticalTextAlignment

Returns the vertical text alignment.

Syntax

eUiVAlign GetVerticalTextAlignment()

Following are possible values for eUiVAlign.

enum eUiVAlign { eUiVAlign_Top, eUiVAlign_Center, eUiVAlign_Bottom };

GetWrapText

Returns whether text is wrapped.

Syntax

eUiTextWrapTextSetting GetWrapText()

Following are possible values for eUiTextWrapTextSetting.

enum eUiTextWrapTextSetting { eUiTextWrapTextSetting_NoWrap, eUiTextWrapTextSetting_Wrap };

SetColor

Sets the color to draw the text string.

Syntax

void SetColor(const AZ::Color& color)

SetFont

Sets the pathname to the font.

Syntax

void SetFont(const AZStd::string& fontPath)

SetFontEffect

Sets the font effect.

Syntax

void SetFontEffect(int effectIndex)

SetFontSize

Sets the size of the font in points.

Syntax

void SetFontSize(float size)

SetHorizontalTextAlignment

Sets the horizontal text alignment.

Syntax

void SetHorizontalTextAlignment(eUiHAlign alignment)

For possible values for eUiHAlign, see GetHorizontalTextAlignment.

SetOverflowMode

Sets the overflow behavior of the text.

Syntax

void SetOverflowMode(eUiTextOverflowMode overflowMode)

For possible values for eUiTextOverflowMode, see GetOverflowMode.

SetText

Sets the text string being displayed by the element.

Syntax

void SetText(const AZStd::string& text)

SetVerticalTextAlignment

Sets the vertical text alignment.

Syntax

void SetVerticalTextAlignment(eUiVAlign alignment)

For possible values for eUiVAlign, see GetVerticalTextAlignment.

SetWrapText

Sets whether text is wrapped.

Syntax

void SetWrapText(eUiTextWrapTextSetting wrapSetting)

For possible values for eUiTextWrapTextSetting, see GetWrapText.

On this page: