-
Notifications
You must be signed in to change notification settings - Fork 0
Label
Namespace: Electron2D
Provides the Electron2D control for drawing a single line of plain text.
public class Electron2D.Label : Electron2D.ControlLabel uses the font and font_size theme overrides from
Electron2D.Control and submits text through Electron2D.CanvasItem.DrawString(Electron2D.Font,Electron2D.Vector2,System.String,Electron2D.HorizontalAlignment,System.Single,System.Int32,System.Nullable{Electron2D.Color}).
Multiline wrapping, clipping, overrun behavior, language-specific shaping
and label settings are planned later UI/text tasks.
This type is not synchronized. Create and mutate labels on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.ControlElectron2D.Font
| Member | Kind | Summary |
|---|---|---|
HorizontalAlignment |
Property | Gets or sets the horizontal alignment used when drawing text inside Electron2D.Control.Size. |
Text |
Property | Gets or sets the plain text drawn by this label. |
Uppercase |
Property | Gets or sets whether text is converted to invariant uppercase before drawing. |
VerticalAlignment |
Property | Gets or sets the vertical alignment used when drawing text inside Electron2D.Control.Size. |
Electron2D.Label() |
Constructor | Initializes a new instance of the Label type. |
_Draw() |
Method | Draws the label text when the control is redrawn. |
_Process(System.Double) |
Method | Queues a redraw when the translation state changes. |
Kind: Property
public Electron2D.HorizontalAlignment HorizontalAlignment { get; set; }Gets or sets the horizontal alignment used when drawing text inside Electron2D.Control.Size.
This property follows the validation and lifetime rules of its declaring type.
The current horizontal alignment value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Label
Kind: Property
public System.String Text { get; set; }Gets or sets the plain text drawn by this label.
This property follows the validation and lifetime rules of its declaring type.
The current text value.
-
System.ArgumentNullException: Thrown when the assigned value isnull.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Label
Kind: Property
public System.Boolean Uppercase { get; set; }Gets or sets whether text is converted to invariant uppercase before drawing.
This property follows the validation and lifetime rules of its declaring type.
The current uppercase value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Label
Kind: Property
public Electron2D.VerticalAlignment VerticalAlignment { get; set; }Gets or sets the vertical alignment used when drawing text inside Electron2D.Control.Size.
This property follows the validation and lifetime rules of its declaring type.
The current vertical alignment value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Label
Kind: Constructor
public Electron2D.Label()Initializes a new instance of the Label type.
The new instance follows the lifetime and validation rules of its declaring type.
This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.
This API is available since Electron2D 0.1.0 Preview.
Electron2D.Label
Kind: Method
public System.Void _Draw()()Draws the label text when the control is redrawn.
The method reads the font and font_size theme overrides. If no
font override exists, no draw command is submitted.
This callback is invoked on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Label
Kind: Method
public System.Void _Process(System.Double)(System.Double delta)Queues a redraw when the translation state changes.
Labels draw Electron2D.Label.Text through Electron2D.Object.Tr(System.String,System.String).
This callback observes locale and translation registry changes so cached
draw commands are refreshed on the next processed frame.
-
delta: The elapsed frame time in seconds.
This callback is invoked on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Label
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.