Class TextElement
Inheritance
Implements
Inherited Members
Namespace: GTA.UI
Assembly: ScriptHookVDotNet3.dll
Syntax
public class TextElement : IElement
Constructors
| Name | Description |
|---|---|
| TextElement(String, PointF, Single) | Initializes a new instance of the TextElement class used for drawing text on the screen. |
| TextElement(String, PointF, Single, Color) | Initializes a new instance of the TextElement class used for drawing text on the screen. |
| TextElement(String, PointF, Single, Color, Font) | Initializes a new instance of the TextElement class used for drawing text on the screen. |
| TextElement(String, PointF, Single, Color, Font, Alignment) | Initializes a new instance of the TextElement class used for drawing text on the screen. |
| TextElement(String, PointF, Single, Color, Font, Alignment, Boolean, Boolean) | Initializes a new instance of the TextElement class used for drawing text on the screen. |
| TextElement(String, PointF, Single, Color, Font, Alignment, Boolean, Boolean, Single) | Initializes a new instance of the TextElement class used for drawing text on the screen. |
Properties
| Name | Description |
|---|---|
| Alignment | Gets or sets the alignment of this TextElement. |
| Caption | Gets or sets the text to draw in this TextElement. |
| Centered | Gets or sets a value indicating whether the alignment of this TextElement is centered. See Alignment |
| Color | Gets or sets the color of this TextElement. |
| Enabled | Gets or sets a value indicating whether this TextElement will be drawn. |
| Font | Gets or sets the font of this TextElement. |
| Outline | Gets or sets a value indicating whether this TextElement is drawn with an outline. |
| Position | Gets or sets the position of this TextElement. |
| Scale | Gets or sets the scale of this TextElement. |
| ScaledWidth | Measures how many pixels in the horizontal axis this TextElement will use when drawn against a ScaledWidth pixel base |
| Shadow | Gets or sets a value indicating whether this TextElement is drawn with a shadow effect. |
| Width | Measures how many pixels in the horizontal axis this TextElement will use when drawn against a 1280 pixel base |
| WrapWidth | Gets or sets the maximum size of the TextElement before it wraps to a new line. |
Methods
| Name | Description |
|---|---|
| Draw() | Draws the TextElement this frame. |
| Draw(SizeF) | Draws the TextElement this frame at the specified offset. |
| Finalize() | |
| GetScaledStringWidth(String, Font, Single) | Measures how many pixels in the horizontal axis the string will use when drawn |
| GetStringWidth(String, Font, Single) | Measures how many pixels in the horizontal axis the string will use when drawn |
| ScaledDraw() | Draws the TextElement this frame using the width returned in ScaledWidth. |
| ScaledDraw(SizeF) | Draws the TextElement this frame at the specified offset using the width returned in ScaledWidth. |