TextRendererComponent
Declaration
public class Strawberry.Components.Rendering.TextRendererComponent
A component that renders text through a SpriteLayer.
Inherits: Strawberry.Core.BaseComponent
Properties
Layer
Gets or sets the sprite layer used for rendering the text.
SpriteLayer Layer { get set }
Font
Gets or sets the font used to draw the text.
Font Font { get set }
Text
Gets or sets the text string to render.
string Text { get set }
Color
Gets or sets the text color.
Color Color { get set }
Size
Gets or sets the font size used for rendering.
float Size { get set }
TextAlign
Gets or sets the alignment of the text. Default is left.
TextAlign TextAlign { get set }
TextDirection
Gets or sets the direction in which text is rendered. Default is left-to-right.
TextDirection TextDirection { get set }
ForcePersianDigits
Whether the numbers should be forced to rendered as persian, Default is false
bool ForcePersianDigits { get set }
Visible
Whether the text should be visible or not. Default is true
bool Visible { get set }
Methods
OnComponentAdded override
void OnComponentAdded(BaseComponent component)
Parameters:
| Name | Type | Description |
|---|---|---|
component |
Strawberry.Core.BaseComponent |
OnRender override
void OnRender()