Open 3D Engine LyShine Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
UiTransform2dInterface Class Referenceabstract

Inherits AZ::ComponentBus.

Classes

struct  Anchors
 
struct  Offsets
 

Public Member Functions

virtual Anchors GetAnchors ()=0
 Get the anchors for the element.
 
virtual void SetAnchors (Anchors anchors, bool adjustOffsets, bool allowPush)=0
 
virtual Offsets GetOffsets ()=0
 Get the offsets for the element.
 
virtual void SetOffsets (Offsets offsets)=0
 Set the offsets for the element.
 
virtual void SetPivotAndAdjustOffsets (AZ::Vector2 pivot)=0
 Set the pivot and adjust the offsets to stay in same place.
 
virtual void SetLocalWidth (float width)=0
 Modify left and right offsets relative the element's anchors.
 
virtual float GetLocalWidth ()=0
 Get the height of the element based off it's offsets.
 
virtual void SetLocalHeight (float height)=0
 Modify top and bottom offsets relative the element's anchors.
 
virtual float GetLocalHeight ()=0
 Get the height of the element based off it's offsets.
 

Static Public Attributes

static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single
 Only one component on a entity can implement the events.
 

Member Function Documentation

◆ SetAnchors()

virtual void UiTransform2dInterface::SetAnchors ( Anchors  anchors,
bool  adjustOffsets,
bool  allowPush 
)
pure virtual

Set the anchors for the element

Parameters
adjustOffsetsIf true the offsets are adjusted to keep the rect in the same position
allowPushOnly has effect if the anchors are invalid. If true changing an anchor

The documentation for this class was generated from the following file: