Table of Contents

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

parent HudParentBase

Properties

OverlayOffset

Specialized ZOffset range used for creating windows.

protected byte OverlayOffset { get; set; }

Property Value

byte

Parent

Parent object of the node.

public HudParentBase Parent { get; }

Property Value

HudParentBase

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

bool

Methods

Register(HudParentBase)

Registers the element to the given parent object.

public virtual bool Register(HudParentBase newParent)

Parameters

newParent HudParentBase

Returns

bool

Unregister()

Unregisters the element from its parent, if it has one.

public virtual bool Unregister()

Returns

bool

Explicit Interface Implementations

IReadOnlyHudNode.Parent

Read-only reference to the node's parent

IReadOnlyHudParent IReadOnlyHudNode.Parent { get; }

Returns

IReadOnlyHudParent