Currently there is a maximum of 65536 UIObjects at any given time. These are statically allocated at startup.
struct UIObject
A 32 bit handle.
typedef enum UIInteractionMode{
UIInteractionMode_None,
UIInteractionMode_Button,
UIInteractionMode_Drag
}UIInteractionMode;
typedef enum UIObjectState{
UIObjectStateNull,
UIObjectStateEnabled,
UIObjectStateDisabled,
UIObjectStateDestroyed
}UIObjectState;
typedef enum UIAnchor{
UIAnchor_UpperLeft,
UIAnchor_UpperCenter,
UIAnchor_UpperRight,
UIAnchor_MiddleLeft,
UIAnchor_MiddleCenter,
UIAnchor_MiddleRight,
UIAnchor_LowerLeft,
UIAnchor_LowerCenter,
UIAnchor_LowerRight
}UIAnchor;
UIObject_Create(void) : UIObject
Create a new UIObject.
UIObject_CreateInactive(void) : UIObject
Create a new UIObject that is disabled.
UIObject_Instantiate( UIObject source ) : UIObject
Clone the UIObject at source recursively.
UIObject_Destroy( UIObject object ) : void
Destroy the UIObject, if it exists.
UIObject_Exists( UIObject object ) : bool
Returns true if the UIObject is non-null.
UIObject_Status( UIObject object ) : UIObjectState
Returns the state of this UIObject.
UIObject_ActiveSelf( UIObject object ) : bool
Returns the active status of the object independent of the hierarchy. Returns false if the UIObject is null.
UIObject_ActiveInHierarchy( UIObject object ) : bool
Returns the active status of the object taking the hierarchy into account. Returns false if the UIObject is null.
UIObject_Parent( UIObject object ) : UIObject
Returns the object’s parent. If the object is null, a warning is logged and a null object is returned.
UIObject_FirstChild( UIObject object ) : UIObject
Returns the object’s first child. If the object is null, a warning is logged and a null object is returned.
UIObject_NextSibling( UIObject object ) : UIObject
Returns the object’s next sibling. If the object is null, a warning is logged and a null object is returned.
UIObject_PreviousSibling( UIObject object ) : UIObject
Returns the object’s previous sibling. If the object is null, a warning is logged and a null object is returned.
UIObject_InteractiveMode( UIObject object ) : UIInteractionMode
Returns the interaction mode of the object.
UIObject_PixelPosition( UIObject object ) : Float2
Returns the pixel position of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_RelativePosition( UIObject object ) : Float2
Returns the parent relative position of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_WorldPosition( UIObject object ) : Float2
Returns the screen space position of this object, taking pixel and relative positioning into account (sum). If the object is null, a warning is logged and NaN is returned.
UIObject_Anchor( UIObject object ) : UIAnchor
UIObject_PixelSize( UIObject object ) : Float2
Returns the pixel size of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_RelativeSize( UIObject object ) : Float2
Returns the parent relative size of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_WorldSize( UIObject object ) : Float2
Returns the screen space size of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_LocalScale( UIObject object ) : float
Returns the local scale of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_WorldScale( UIObject object ) : float
Returns the total scale of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_LocalDepth( UIObject object ) : int
Returns the local depth of this object. If the object is null, a warning is logged and 0 is returned.
UIObject_WorldDepth( UIObject object ) : int
Returns the total depth of this object. If the object is null, a warning is logged and 0 is returned.
UIObject_LocalOpacity( UIObject object ) : float
Returns the local opacity of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_WorldOpacity( UIObject object ) : float
Returns the total opacity of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_LocalRotation( UIObject object ) : float
Returns the local rotation of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_WorldRotation( UIObject object ) : float
Returns the world rotation of this object. If the object is null, a warning is logged and NaN is returned.
UIObject_HitTest( UIObject object, Float2 point ) : bool
UIObject_LastModifiedFrame( UIObject object ) : uint64_t
UIObject_TransformMatrix( UIObject object) : Float4x4
Returns the matrix transforming points from local to world space. If the object is null, a warning is logged and NaN is returned.
UIObject_Activate( UIObject object ) : UIObjectState
Activates the object if possible and returns the state of the object. This will recursively update children.
UIObject_Deactivate( UIObject object ) : UIObjectState
Deactivates the object if possible and returns the state of the object. This will recursively update children.
UIObject_SetParent( UIObject object, UIObject parent ) : bool
Set the object’s parent. Returns true if the operation succeeds. Returns false if either object is null or destroyed, or the operation would create a cycle.
UIObject_MakeRoot( UIObject object ) : bool
Set the object to be a root. This will unparent the object from its parent, if it has one. Returns true if the operation succeeds. Returns false if the object is null or destroyed.
UIObject_SetInteractiveMode( UIObject object, UIInteractionMode interaction_mode ) : bool
Set the object’s interactivity mode. Returns false if the object is null or destroyed.
UIObject_SetPixelPosition( UIObject object, Float2 position ) : bool
Set the object’s local position and update the hierarchy. Returns false if the object is null.
UIObject_SetRelativePosition( UIObject object, Float2 position ) : bool
Set the object’s relative position and update the hierarchy. Returns false if the object is null.
UIObject_SetAnchor( UIObject object, UIAnchor anchor ) : bool
UIObject_SetPixelSize( UIObject object, Float2 size ) : bool
Set the object’s local size and update the hierarchy. Returns false if the object is null.
UIObject_SetRelativeSize( UIObject object, Float2 size ) : bool
Set the object’s relative size and update the hierarchy. Returns false if the object is null.
UIObject_SetLocalScale( UIObject object, float scale ) : bool
Set the object’s local scale and update the hierarchy. Returns false if the object is null.
UIObject_SetLocalDepth( UIObject object, int value ) : bool
Set the object’s local depth and update the hierarchy. Returns false if the object is null.
UIObject_SetLocalOpacity( UIObject object, float value ) : bool
Set the object’s local opacity and update the hierarchy. Returns false if the object is null.
UIObject_SetLocalRotation( UIObject object, float rotation ) : bool
Set the object’s local opacity and update the hierarchy. Returns false if the object is null.