Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class Dropdown<T>

    Inheritance
    object
    UIElementBase
    InteractiveUIElement
    Dropdown<T>
    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.SetTooltip(string)
    UIElementBase.SetTooltipLocalizationKey(string, string)
    UIElementBase.UpdateTooltipFromLocalization()
    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 Dropdown<T> : InteractiveUIElement, IUIElement
    Type Parameters
    Name Description
    T

    Constructors

    | Edit this page View Source

    Dropdown(Vector2, Vector2, List<T>, int)

    Declaration
    public Dropdown(Vector2 position, Vector2 size, List<T> options, int initialSelectedIndex = 0)
    Parameters
    Type Name Description
    Vector2 position
    Vector2 size
    List<T> options
    int initialSelectedIndex

    Properties

    | Edit this page View Source

    SelectedIndex

    Declaration
    public int SelectedIndex { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Draw()

    Declaration
    public void Draw()
    | 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

    GetOptions()

    Declaration
    public List<T> GetOptions()
    Returns
    Type Description
    List<T>
    | Edit this page View Source

    GetSelectedOption()

    Declaration
    public T GetSelectedOption()
    Returns
    Type Description
    T
    | Edit this page View Source

    SetColors(Color, Color, Color, Color)

    Declaration
    public void SetColors(Color backgroundColor, Color textColor, Color borderColor, Color highlightColor)
    Parameters
    Type Name Description
    Color backgroundColor
    Color textColor
    Color borderColor
    Color highlightColor
    | Edit this page View Source

    SetFontSize(int)

    Declaration
    public void SetFontSize(int fontSize)
    Parameters
    Type Name Description
    int fontSize
    | Edit this page View Source

    SetLocalizationService(ILocalizationService?)

    Sets the localization service to use for automatic font management.

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

    SetMaxVisibleItems(int)

    Declaration
    public void SetMaxVisibleItems(int maxItems)
    Parameters
    Type Name Description
    int maxItems
    | Edit this page View Source

    SetOnSelectionChanged(Action<T>)

    Declaration
    public void SetOnSelectionChanged(Action<T> callback)
    Parameters
    Type Name Description
    Action<T> callback
    | Edit this page View Source

    SetOptions(List<T>, int)

    Declaration
    public void SetOptions(List<T> newOptions, int initialSelectedIndex = 0)
    Parameters
    Type Name Description
    List<T> newOptions
    int initialSelectedIndex
    | Edit this page View Source

    SetSelectedIndex(int)

    Declaration
    public void SetSelectedIndex(int index)
    Parameters
    Type Name Description
    int index
    | Edit this page View Source

    SetSelectedOption(T)

    Declaration
    public void SetSelectedOption(T value)
    Parameters
    Type Name Description
    T value
    | Edit this page View Source

    Update()

    Declaration
    public void Update()
    | 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()

    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.