A helper struct for rendering and positioning text using content, font, position, scale etc...
More...
|
| vxUIText (string text, SpriteFont font) |
| Create a UI Text element.
|
|
| vxUIText (string text, SpriteFont font, Vector2 position) |
| Create a UI Text element at the specified position.
|
|
| vxUIText (string text, SpriteFont font, Rectangle bounds, vxLayoutJustification layoutJustification) |
| Create a UI Text element anchored within the specified bounds.
|
|
| vxUIText (string text, SpriteFont font, Rectangle bounds, vxLayoutJustification layoutJustification, Vector2 padding) |
| Create a UI Text element anchored within the specified bounds with padding.
|
|
void | AnchorWithinBounds (Rectangle bounds, vxLayoutJustification layoutJustification) |
| Anchors the UI text within a point in the bounds.
|
|
void | AnchorWithinBounds (Rectangle bounds, vxLayoutJustification layoutJustification, Vector2 padding) |
| Anchors the UI text within a point in the bounds with padding.
|
|
void | ClearScale () |
| Clears the scale and resets it back to Vector2.One.
|
|
void | DrawText (Color textColor) |
| Draws the vxUIText with a shadow.
|
|
void | DrawText (Color textColor, float shadowTint, Vector2 shadowOffset) |
| Draws the vxUIText with a shadow.
|
|
void | DrawText (Color textColor, Color shadowColour, Vector2 shadowOffset) |
| Draws the vxUIText with a shadow.
|
|
|
string | Text [get, set] |
|
SpriteFont | Font [get, set] |
|
Vector2 | Position [get, set] |
|
Vector2 | Size [get] |
| The size of the text for the given font.
|
|
Vector2 | Scale [get, set] |
| Scale of the UI Element. This defaults to vxLayout.Scale. Call ClearScale() to reset to 1.
|
|
Rectangle | Bounds [get] |
| The bounds of the text for the given font, size and position.
|
|
vxLayoutJustification | Justification [get, set] |
| Get or Set the Text Justification, such as Top Left, Middle Center, Bottom Right etc..
|
|
A helper struct for rendering and positioning text using content, font, position, scale etc...
◆ vxUIText() [1/4]
VerticesEngine.UI.vxUIText.vxUIText |
( |
string | text, |
|
|
SpriteFont | font ) |
Create a UI Text element.
- Parameters
-
◆ vxUIText() [2/4]
VerticesEngine.UI.vxUIText.vxUIText |
( |
string | text, |
|
|
SpriteFont | font, |
|
|
Vector2 | position ) |
Create a UI Text element at the specified position.
- Parameters
-
◆ vxUIText() [3/4]
VerticesEngine.UI.vxUIText.vxUIText |
( |
string | text, |
|
|
SpriteFont | font, |
|
|
Rectangle | bounds, |
|
|
vxLayoutJustification | layoutJustification ) |
Create a UI Text element anchored within the specified bounds.
- Parameters
-
text | |
font | |
bounds | |
layoutJustification | |
◆ vxUIText() [4/4]
VerticesEngine.UI.vxUIText.vxUIText |
( |
string | text, |
|
|
SpriteFont | font, |
|
|
Rectangle | bounds, |
|
|
vxLayoutJustification | layoutJustification, |
|
|
Vector2 | padding ) |
Create a UI Text element anchored within the specified bounds with padding.
- Parameters
-
text | |
font | |
bounds | |
layoutJustification | |
padding | |
◆ AnchorWithinBounds()
void VerticesEngine.UI.vxUIText.AnchorWithinBounds |
( |
Rectangle | bounds, |
|
|
vxLayoutJustification | layoutJustification, |
|
|
Vector2 | padding ) |
Anchors the UI text within a point in the bounds with padding.
- Parameters
-
bounds | |
layoutJustification | |
padding | |
◆ DrawText() [1/3]
void VerticesEngine.UI.vxUIText.DrawText |
( |
Color | textColor | ) |
|
Draws the vxUIText with a shadow.
- Parameters
-
textColor | Text colour to draw the text to the screen with |
◆ DrawText() [2/3]
void VerticesEngine.UI.vxUIText.DrawText |
( |
Color | textColor, |
|
|
Color | shadowColour, |
|
|
Vector2 | shadowOffset ) |
Draws the vxUIText with a shadow.
- Parameters
-
textColor | Text colour to draw the text to the screen with |
shadowColour | Text shadow colour to draw the text to the screen with |
shadowOffset | Drop shadow offset |
◆ DrawText() [3/3]
void VerticesEngine.UI.vxUIText.DrawText |
( |
Color | textColor, |
|
|
float | shadowTint, |
|
|
Vector2 | shadowOffset ) |
Draws the vxUIText with a shadow.
- Parameters
-
textColor | Text colour to draw the text to the screen with |
shadowTint | Text shadow tint to draw the text to the screen with. This assumes the shadow is Color.Black |
shadowOffset | Drop shadow offset |
The documentation for this struct was generated from the following file:
- /github/workspace/src/VerticesEngine/src.shared/UI/Controls/vxUIText.cs