Class HudNodeBase
- Namespace
- RichHudFramework.UI
- Assembly
- RichHudClient.dll
Abstract base for hud elements that can be parented to other elements.
public abstract class HudNodeBase : HudParentBase, IReadOnlyHudNode, IReadOnlyHudParent
- Inheritance
-
HudNodeBase
- Implements
- Derived
- Inherited Members
Remarks
HudNodeBase extends the functionality of HudParentBase by adding the capability to register as a child of another node. This class represents the minimal implementation required for an object to exist within the UI hierarchy, providing essential properties such as Parent, Registered, and ZOffset, alongside methods for registration and unregistration.
This class is principally designed for logic-only UI components that require access to the update loop but do not need definite screen dimensions, such as BindInputElement. It also serves as the base for more specialized nodes, like implementations of IReadOnlyHudSpaceNode, and the common HudElementBase.
Constructors
HudNodeBase(HudParentBase)
public HudNodeBase(HudParentBase parent)
Parameters
parentHudParentBase
Properties
OverlayOffset
Specialized ZOffset range used for creating windows.
protected byte OverlayOffset { get; set; }
Property Value
Parent
Parent object of the node.
public HudParentBase Parent { get; }
Property Value
Registered
Returns true if the node has been registered to a parent. Does not necessarilly indicate that the parent is registered or that the node is active.
public bool Registered { get; }
Property Value
Methods
Register(HudParentBase)
Registers the element to the given parent object.
public virtual bool Register(HudParentBase newParent)
Parameters
newParentHudParentBase
Returns
Unregister()
Unregisters the element from its parent, if it has one.
public virtual bool Unregister()
Returns
Explicit Interface Implementations
IReadOnlyHudNode.Parent
Read-only reference to the node's parent
IReadOnlyHudParent IReadOnlyHudNode.Parent { get; }