Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class Label

    Inheritance
    object
    UIElementBase
    Label
    Implements
    IUIElement
    Inherited Members
    UIElementBase._children
    UIElementBase.Tooltip
    UIElementBase.TooltipLocalizationKey
    UIElementBase.TooltipFallbackText
    UIElementBase.Id
    UIElementBase.Position
    UIElementBase.Size
    UIElementBase.Visible
    UIElementBase.Opacity
    UIElementBase.Parent
    UIElementBase.Children
    UIElementBase.AddChild(IUIElement)
    UIElementBase.RemoveChild(IUIElement)
    UIElementBase.RemoveFromParent()
    UIElementBase.GetWorldPosition()
    UIElementBase.GetLocalPosition()
    UIElementBase.Update()
    UIElementBase.SetTooltip(string)
    UIElementBase.SetTooltipLocalizationKey(string, string)
    UIElementBase.UpdateTooltipFromLocalization()
    UIElementBase.SetTooltipText(string)
    UIElementBase.IsMouseOver()
    UIElementBase.UpdateSelf()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: PopcorningGuineaPig.Engine.UI
    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
    Type Name Description
    string text
    Vector2 position
    int fontSize
    Color color
    string fontPath

    Properties

    | Edit this page View Source

    Color

    Declaration
    public Color Color { get; set; }
    Property Value
    Type Description
    Color
    | Edit this page View Source

    FontSize

    Declaration
    public int FontSize { get; set; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Text

    Declaration
    public string Text { get; set; }
    Property Value
    Type Description
    string

    Methods

    | Edit this page View Source

    Dispose()

    Declaration
    public void Dispose()
    | Edit this page View Source

    Draw()

    Declaration
    public void Draw()
    | Edit this page View Source

    DrawSelf()

    Override to implement element-specific drawing logic

    Declaration
    protected override void DrawSelf()
    Overrides
    UIElementBase.DrawSelf()
    | Edit this page View Source

    MeasureText()

    Declaration
    public Vector2 MeasureText()
    Returns
    Type Description
    Vector2
    | 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
    UIElementBase.SetLocalizationService(ILocalizationService?)
    | 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

    IUIElement
    • Edit this page
    • View Source
    In this article
    Back to top © 2024 Popcorning Guinea Pig Game Engine. A custom C# game engine for indie developers.