Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class TabControl

    Inheritance
    object
    UIElementBase
    InteractiveUIElement
    TabControl
    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.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 TabControl : InteractiveUIElement, IUIElement

    Constructors

    | Edit this page View Source

    TabControl(Vector2, Vector2, int)

    Declaration
    public TabControl(Vector2 position, Vector2 size, int tabHeight = 40)
    Parameters
    Type Name Description
    Vector2 position
    Vector2 size
    int tabHeight

    Properties

    | Edit this page View Source

    ContentArea

    Gets the content area rectangle for the tab control.

    Declaration
    public Rectangle ContentArea { get; }
    Property Value
    Type Description
    Rectangle

    Methods

    | Edit this page View Source

    AddContentToTab(int, IUIElement)

    Adds content to a specific tab.

    Declaration
    public void AddContentToTab(int tabIndex, IUIElement element)
    Parameters
    Type Name Description
    int tabIndex
    IUIElement element
    | Edit this page View Source

    AddTab(string, string?, string?)

    Adds a new tab to the tab control.

    Declaration
    public void AddTab(string title, string? localizationKey = null, string? fallbackText = null)
    Parameters
    Type Name Description
    string title
    string localizationKey
    string fallbackText
    | Edit this page View Source

    Draw()

    Draws this element and all children

    Declaration
    public override void Draw()
    Overrides
    UIElementBase.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

    GetActiveTab()

    Gets the current active tab index.

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

    GetElementFromActiveTab<T>(string)

    Gets a child element from the active tab by ID.

    Declaration
    public T? GetElementFromActiveTab<T>(string id) where T : class, IUIElement
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    GetElementFromAnyTab<T>(string)

    Gets a child element from any tab by ID.

    Declaration
    public T? GetElementFromAnyTab<T>(string id) where T : class, IUIElement
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T
    | Edit this page View Source

    GetTabCount()

    Gets the number of tabs.

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

    SetActiveTab(int)

    Sets the active tab.

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

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

    Sets the tab control colors.

    Declaration
    public void SetColors(Color background, Color tab, Color activeTab, Color hoverTab, Color text, Color activeText, Color border)
    Parameters
    Type Name Description
    Color background
    Color tab
    Color activeTab
    Color hoverTab
    Color text
    Color activeText
    Color border
    | Edit this page View Source

    SetFont(Font)

    Sets the font for tab headers.

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

    SetLocalizationService(ILocalizationService?)

    Sets the localization service for automatic text updates.

    Declaration
    public override void SetLocalizationService(ILocalizationService? localizationService)
    Parameters
    Type Name Description
    ILocalizationService localizationService
    Overrides
    UIElementBase.SetLocalizationService(ILocalizationService?)
    | 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.