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

Inherits AZ::ComponentBus.

Public Member Functions

virtual bool GetIsSnapEnabled ()=0
 Get the snap state.
 
virtual void SetIsSnapEnabled (bool enabled)=0
 Set the snap state.
 
virtual float GetSnapDistance ()=0
 Get the translation distance to snap to.
 
virtual void SetSnapDistance (float distance)=0
 Set the translation distance to snap to.
 
virtual float GetSnapRotationDegrees ()=0
 Get the degrees of rotation to snap to.
 
virtual void SetSnapRotationDegrees (float degrees)=0
 Set the degrees of rotation to snap to.
 
virtual AZStd::vector< float > GetHorizontalGuidePositions ()=0
 Get the positions of the horizontal guide lines (along y-axis in canvas pixels)
 
virtual void AddHorizontalGuide (float position)=0
 Add a horizontal guide line.
 
virtual void RemoveHorizontalGuide (int index)=0
 Remove the horizontal guide line at the given index.
 
virtual void SetHorizontalGuidePosition (int index, float position)=0
 Set the position of the horizontal guide line at the given index.
 
virtual AZStd::vector< float > GetVerticalGuidePositions ()=0
 Get the positions of the vertical guide lines (along x-axis in canvas pixels)
 
virtual void AddVerticalGuide (float position)=0
 Add a vertical guide line.
 
virtual void RemoveVerticalGuide (int index)=0
 Remove the vertical guide line at the given index.
 
virtual void SetVerticalGuidePosition (int index, float position)=0
 Set the position of the vertical guide line at the given index.
 
virtual void RemoveAllGuides ()=0
 Remove all of the guides.
 
virtual AZ::Color GetGuideColor ()=0
 Get the color to draw the guide lines on this canvas.
 
virtual void SetGuideColor (const AZ::Color &color)=0
 Set the color to draw the guide lines on this canvas.
 
virtual bool GetGuidesAreLocked ()=0
 Get whether the guides on this canvas are locked.
 
virtual void SetGuidesAreLocked (bool areLocked)=0
 Set whether the guides on this canvas are locked.
 
virtual bool CheckForOrphanedElements ()=0
 Check the canvas for any orphaned elements. These are elements not referenced as a child by the canvas or any of its descendant elements.
 
virtual void RecoverOrphanedElements ()=0
 Recover any orphaned elements in the canvas by placing them under a special top-level element.
 
virtual void RemoveOrphanedElements ()=0
 Remove any orphaned elements in the canvas.
 
virtual void UpdateCanvasInEditorViewport (float deltaTime, bool isInGame)=0
 
virtual void RenderCanvasInEditorViewport (bool isInGame, AZ::Vector2 viewportSize)=0
 

Static Public Attributes

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

Member Function Documentation

◆ RenderCanvasInEditorViewport()

virtual void UiEditorCanvasInterface::RenderCanvasInEditorViewport ( bool  isInGame,
AZ::Vector2  viewportSize 
)
pure virtual

Render the canvas in the UI Editor

Parameters
isInGame,trueif canvas being rendered in preview mode, false if being rendered in edit mode
viewportSize,thisis the size of the viewport that the canvas is being rendered to

◆ UpdateCanvasInEditorViewport()

virtual void UiEditorCanvasInterface::UpdateCanvasInEditorViewport ( float  deltaTime,
bool  isInGame 
)
pure virtual

Update the canvas from the UI Editor

Parameters
deltaTimethe amount of time in seconds since the last call to this function
isInGame,trueif canvas being updated in preview mode, false if being updated in edit mode

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