|
Open 3D Engine LyShine Gem API Reference
23.05.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
|
#include <UiTextComponent.h>
Classes | |
| struct | OverflowInfo |
| Overflow information based on available width. Used for wrapping. More... | |
Public Types | |
| enum | Type { Text, Image } |
Public Member Functions | |
| Type | GetType () const |
| void | CalculateSize (const STextDrawContext &ctx, bool excludeTrailingSpace) |
| Calculate and store the size of the batch content. | |
| void | CalculateYOffset (float fontSize, float baseline) |
| Calculate and store the y offset of the batch from the text y position. | |
| int | GetNumChars () const |
| Get the number of characters that the batch contains. An image is considered to be one character. | |
| bool | GetOverflowInfo (const STextDrawContext &ctx, float availableWidth, bool skipFirstChar, OverflowInfo &overflowInfoOut) |
| Get overflow information based on the available width. Used for wrapping. | |
| void | Split (int atCharIndex, DrawBatch &newDrawBatchOut) |
| Split the batch at a specified character index. | |
| bool | IsClickable () const |
Public Attributes | |
| AZ::Vector3 | color |
| AZStd::string | text |
| AZStd::string | action |
| Only used for clickable text. Parsed from "action" attribute in anchor tag (markup). | |
| AZStd::string | data |
| Only used for clickable text. Parsed from "data" attribute in anchor tag (markup). | |
| IFFont * | font = nullptr |
| InlineImage * | image = nullptr |
| AZ::Vector2 | size |
| The size in pixels of the batch content. | |
| float | yOffset |
| int | clickableId = -1 |
Atomic unit of font "state" for drawing text in the renderer. A single line of text can be divided amongst multiple draw batches, allowing that line of text to be rendered with different font stylings, which is used to support FontFamily rendering.
| int UiTextComponent::DrawBatch::clickableId = -1 |
Only used for clickable text. Each parse anchor tag gets assigned a unique ID that's shared amongst all draw batches that belong to the anchor.
| float UiTextComponent::DrawBatch::yOffset |
While calculating, the yOffset is set to the offset from the text draw y position. Once all batches in the line are calculated, the yOffset will become the offset from the y draw position of the batch line