Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class Link

    Inheritance
    object
    UIElementBase
    InteractiveUIElement
    Link
    Implements
    IUIElement
    Inherited Members
    InteractiveUIElement.IsEnabled
    InteractiveUIElement.LabelPosition
    InteractiveUIElement.HasLabel
    InteractiveUIElement.LabelSpacing
    InteractiveUIElement.GetTotalSizeWithLabel()
    InteractiveUIElement.GetLabelOffset()
    InteractiveUIElement.SetEnabled(bool)
    InteractiveUIElement.GetEnabled()
    InteractiveUIElement.SetLabel(string, LabelPosition, float)
    InteractiveUIElement.SetLabelLocalization(ILocalizationService, string, string)
    InteractiveUIElement.RemoveLabel()
    InteractiveUIElement.GetLabelText()
    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.Draw()
    UIElementBase.SetTooltip(string)
    UIElementBase.SetTooltipLocalizationKey(string, string)
    UIElementBase.SetTooltipText(string)
    UIElementBase.IsMouseOver()
    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 Link : InteractiveUIElement, IUIElement

    Constructors

    | Edit this page View Source

    Link(string, Vector2, Color, int, Font?)

    Declaration
    public Link(string text, Vector2 position, Color textColor, int fontSize = 16, Font? font = null)
    Parameters
    Type Name Description
    string text
    Vector2 position
    Color textColor
    int fontSize
    Font? font

    Properties

    | Edit this page View Source

    FocusHighlight

    Declaration
    public bool FocusHighlight { get; set; }
    Property Value
    Type Description
    bool
    | 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
    | Edit this page View Source

    TextColor

    Declaration
    public Color TextColor { get; set; }
    Property Value
    Type Description
    Color

    Methods

    | Edit this page View Source

    DrawSelf()

    Override DrawSelf to handle label drawing Derived classes should call base.DrawSelf() to ensure labels are drawn

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

    InvokeClick()

    Fire the click action (gamepad focus confirm).

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

    SetClickSound(IAudioSource)

    Declaration
    public void SetClickSound(IAudioSource sound)
    Parameters
    Type Name Description
    IAudioSource sound
    | Edit this page View Source

    SetColors(Color, Color, Color)

    Declaration
    public void SetColors(Color normal, Color hover, Color pressed)
    Parameters
    Type Name Description
    Color normal
    Color hover
    Color pressed
    | Edit this page View Source

    SetFont(Font)

    Declaration
    public void SetFont(Font font)
    Parameters
    Type Name Description
    Font font
    | Edit this page View Source

    SetHoverSound(IAudioSource)

    Declaration
    public void SetHoverSound(IAudioSource sound)
    Parameters
    Type Name Description
    IAudioSource sound
    | Edit this page View Source

    SetLocalizationKey(string, string?)

    Sets the localization key for automatic text updates when language changes.

    Declaration
    public void SetLocalizationKey(string localizationKey, string? fallbackText = null)
    Parameters
    Type Name Description
    string localizationKey

    The localization key (e.g., "WISHLIST")

    string fallbackText

    Text to use if translation fails

    | Edit this page View Source

    SetLocalizationService(ILocalizationService?)

    Sets the localization service to use for automatic font and text management.

    Declaration
    public override void SetLocalizationService(ILocalizationService? localizationService)
    Parameters
    Type Name Description
    ILocalizationService localizationService
    Overrides
    UIElementBase.SetLocalizationService(ILocalizationService?)
    | Edit this page View Source

    SetOnClick(Action)

    Declaration
    public void SetOnClick(Action action)
    Parameters
    Type Name Description
    Action action
    | Edit this page View Source

    SetPosition(Vector2)

    Declaration
    public void SetPosition(Vector2 position)
    Parameters
    Type Name Description
    Vector2 position
    | Edit this page View Source

    SetShowUnderline(bool)

    Declaration
    public void SetShowUnderline(bool showUnderline)
    Parameters
    Type Name Description
    bool showUnderline
    | Edit this page View Source

    SetText(string)

    Declaration
    public void SetText(string text)
    Parameters
    Type Name Description
    string text
    | Edit this page View Source

    SetTextProperties(int, Color)

    Declaration
    public void SetTextProperties(int fontSize, Color textColor)
    Parameters
    Type Name Description
    int fontSize
    Color textColor
    | Edit this page View Source

    UpdateSelf()

    Override UpdateSelf to provide common interactive element functionality Derived classes should call base.UpdateSelf() before their own update logic

    Declaration
    protected override void UpdateSelf()
    Overrides
    InteractiveUIElement.UpdateSelf()
    | Edit this page View Source

    UpdateTooltipFromLocalization()

    Updates the tooltip text from the localization service using the stored tooltip localization key.

    Declaration
    protected override void UpdateTooltipFromLocalization()
    Overrides
    UIElementBase.UpdateTooltipFromLocalization()

    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.