#include <UiTextComponent.h>
|
enum | Type { Text
, Image
} |
|
|
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 |
|
|
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.
◆ clickableId
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.
◆ yOffset
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
The documentation for this struct was generated from the following file:
- Gems/LyShine/Code/Source/UiTextComponent.h