Class Label
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public class Label : UIElementBase, IUIElement
Constructors
|
Edit this page
View Source
Label(string, Vector2, int, Color, string?)
Declaration
public Label(string text, Vector2 position, int fontSize, Color color, string? fontPath = null)
Parameters
Properties
|
Edit this page
View Source
Color
Declaration
public Color Color { get; set; }
Property Value
|
Edit this page
View Source
FontSize
Declaration
public int FontSize { get; set; }
Property Value
|
Edit this page
View Source
Text
Declaration
public string Text { get; set; }
Property Value
Methods
|
Edit this page
View Source
Dispose()
Declaration
|
Edit this page
View Source
Draw()
Declaration
|
Edit this page
View Source
DrawSelf()
Override to implement element-specific drawing logic
Declaration
protected override void DrawSelf()
Overrides
|
Edit this page
View Source
MeasureText()
Declaration
public Vector2 MeasureText()
Returns
|
Edit this page
View Source
SetClearBackground(bool, Color?)
Declaration
public void SetClearBackground(bool enable, Color? bgColor = null)
Parameters
| Type |
Name |
Description |
| bool |
enable |
|
| Color? |
bgColor |
|
|
Edit this page
View Source
SetColor(Color)
Declaration
public void SetColor(Color newColor)
Parameters
| Type |
Name |
Description |
| Color |
newColor |
|
|
Edit this page
View Source
SetFontPath(string?)
Declaration
public void SetFontPath(string? newFontPath)
Parameters
| Type |
Name |
Description |
| string |
newFontPath |
|
|
Edit this page
View Source
SetFontSize(int)
Declaration
public void SetFontSize(int newFontSize)
Parameters
| Type |
Name |
Description |
| int |
newFontSize |
|
|
Edit this page
View Source
SetLocalizationKey(string, string?)
Declaration
public void SetLocalizationKey(string localizationKey, string? fallbackText = null)
Parameters
| Type |
Name |
Description |
| string |
localizationKey |
|
| string |
fallbackText |
|
|
Edit this page
View Source
SetLocalizationService(ILocalizationService?)
Sets the localization service to use for automatic font management.
Override this method in derived classes that display text to implement localization support.
Default implementation does nothing (for non-text UI elements).
Declaration
public override void SetLocalizationService(ILocalizationService? localizationService)
Parameters
| Type |
Name |
Description |
| ILocalizationService |
localizationService |
The localization service to use, or null to disable
|
Overrides
|
Edit this page
View Source
SetPosition(Vector2)
Declaration
public void SetPosition(Vector2 newPosition)
Parameters
| Type |
Name |
Description |
| Vector2 |
newPosition |
|
|
Edit this page
View Source
SetText(string)
Declaration
public void SetText(string newText)
Parameters
| Type |
Name |
Description |
| string |
newText |
|
Implements