Popcorning Guinea Pig
Search Results for

    Show / Hide Table of Contents

    Class UIHierarchyManager

    Manages hierarchical relationships between UI elements in PGPSCN scenes

    Inheritance
    object
    UIHierarchyManager
    Inherited Members
    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 UIHierarchyManager

    Methods

    | Edit this page View Source

    Clear()

    Clears all hierarchy nodes

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

    CreateNode(string, object, Vector2, Vector2, int)

    Creates a hierarchy node for a UI element

    Declaration
    public UIHierarchyNode CreateNode(string id, object uiElement, Vector2 position, Vector2 size, int zIndex = 0)
    Parameters
    Type Name Description
    string id
    object uiElement
    Vector2 position
    Vector2 size
    int zIndex
    Returns
    Type Description
    UIHierarchyNode
    | Edit this page View Source

    Draw()

    Draws all UI elements in the hierarchy

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

    GetAllUIElements()

    Gets all nodes as a flat dictionary (for backward compatibility with existing Scene.GetElement)

    Declaration
    public Dictionary<string, object> GetAllUIElements()
    Returns
    Type Description
    Dictionary<string, object>
    | Edit this page View Source

    GetNode(string)

    Gets a node by ID

    Declaration
    public UIHierarchyNode? GetNode(string id)
    Parameters
    Type Name Description
    string id
    Returns
    Type Description
    UIHierarchyNode
    | Edit this page View Source

    GetUIElement<T>(string)

    Gets the underlying UI element by ID

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

    SetParent(string, string)

    Establishes a parent-child relationship between two nodes

    Declaration
    public void SetParent(string childId, string parentId)
    Parameters
    Type Name Description
    string childId
    string parentId
    | Edit this page View Source

    Update(double)

    Updates all UI elements in the hierarchy

    Declaration
    public void Update(double deltaTime)
    Parameters
    Type Name Description
    double deltaTime
    • 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.