Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class ListBox<T>

    Inheritance
    object
    UIElementBase
    InteractiveUIElement
    ListBox<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.Update()
    UIElementBase.Draw()
    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 ListBox<T> : InteractiveUIElement, IUIElement
    Type Parameters
    Name Description
    T

    Constructors

    | Edit this page View Source

    ListBox(Vector2, Vector2)

    Declaration
    public ListBox(Vector2 position, Vector2 size)
    Parameters
    Type Name Description
    Vector2 position
    Vector2 size

    Methods

    | Edit this page View Source

    AddItem(T)

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

    ClearItems()

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

    EnsureItemVisible(int)

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

    GetPlaceholderText()

    Declaration
    public string GetPlaceholderText()
    Returns
    Type Description
    string
    | Edit this page View Source

    GetSelectedIndex()

    Declaration
    public int GetSelectedIndex()
    Returns
    Type Description
    int
    | Edit this page View Source

    GetSelectedItem()

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

    IsFocused()

    Declaration
    public bool IsFocused()
    Returns
    Type Description
    bool
    | Edit this page View Source

    RemoveItem(T)

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

    SetColors(Color, Color, Color, Color, Color, Color)

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

    SetCustomItemRenderer(Action<T, Rectangle, bool>?)

    Declaration
    public void SetCustomItemRenderer(Action<T, Rectangle, bool>? renderer)
    Parameters
    Type Name Description
    Action<T, Rectangle, bool> renderer
    | Edit this page View Source

    SetFontSize(int)

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

    SetItemHeight(int)

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

    SetItems(List<T>)

    Declaration
    public void SetItems(List<T> newItems)
    Parameters
    Type Name Description
    List<T> newItems
    | 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

    SetOnSelectionChanged(Action<T>)

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

    SetPlaceholderText(string)

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

    SetSelectedIndex(int)

    Declaration
    public void SetSelectedIndex(int index)
    Parameters
    Type Name Description
    int index
    | 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.