Class Label
Represents a label widget in the UI.
Inherited Members
Namespace: Genesis.UI
Assembly: Genesis.dll
Syntax
public class Label : Widget
Constructors
Label(string, Vec3, string, Font, Color)
Create a new instance of the label
Declaration
public Label(string name, Vec3 location, string text, Font font, Color color)
Parameters
Type | Name | Description |
---|---|---|
string | name | |
Vec3 | location | |
string | text | |
Font | font | |
Color | color |
Properties
Font
Gets or sets the font used for the label.
Declaration
public Font Font { get; set; }
Property Value
Type | Description |
---|---|
Font |
FontSize
Gets or sets the font size of the label.
Declaration
public float FontSize { get; set; }
Property Value
Type | Description |
---|---|
float |
Text
Gets or sets the text content of the label.
Declaration
public string Text { get; set; }
Property Value
Type | Description |
---|---|
string |
TextColor
Gets or sets the color of the text in the label.
Declaration
public Color TextColor { get; set; }
Property Value
Type | Description |
---|---|
Color |
Methods
OnRender(Game, IRenderDevice, Scene, Canvas)
Renders the label
Declaration
public override void OnRender(Game game, IRenderDevice renderDevice, Scene scene, Canvas canvas)
Parameters
Type | Name | Description |
---|---|---|
Game | game | |
IRenderDevice | renderDevice | |
Scene | scene | |
Canvas | canvas |