Class UIHierarchyManager
Manages hierarchical relationships between UI elements in PGPSCN scenes
Inheritance
UIHierarchyManager
Assembly: PopcorningGuineaPig.Engine.dll
Syntax
public class UIHierarchyManager
Methods
|
Edit this page
View Source
Clear()
Clears all hierarchy nodes
Declaration
|
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
Returns
|
Edit this page
View Source
Draw()
Draws all UI elements in the hierarchy
Declaration
|
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
|
Edit this page
View Source
GetNode(string)
Declaration
public UIHierarchyNode? GetNode(string id)
Parameters
| Type |
Name |
Description |
| string |
id |
|
Returns
|
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 Parameters
|
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
|
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 |
|