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.
UiDraggableInterface Class Referenceabstract

Inherits AZ::ComponentBus.

Public Types

enum class  DragState { Normal , Valid , Invalid }
 States that the component can be in during a drag. Lua scripts can switch the state to alert the user.
 

Public Member Functions

virtual DragState GetDragState ()=0
 Get the state of the drag.
 
virtual void SetDragState (DragState dragState)=0
 
virtual void RedoDrag (AZ::Vector2 point)=0
 
virtual void SetAsProxy (AZ::EntityId originalDraggableId, AZ::Vector2 point)=0
 
virtual void ProxyDragEnd (AZ::Vector2 point)=0
 
virtual bool IsProxy ()=0
 Check if this draggable element is a proxy.
 
virtual AZ::EntityId GetOriginalFromProxy ()=0
 
virtual bool GetCanDropOnAnyCanvas ()=0
 Get the flag that indicates if this draggable can be dropped on any canvas.
 
virtual void SetCanDropOnAnyCanvas (bool anyCanvas)=0
 Set the flag that indicates if this draggable can be dropped on any canvas.
 

Static Public Attributes

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

Member Function Documentation

◆ GetOriginalFromProxy()

virtual AZ::EntityId UiDraggableInterface::GetOriginalFromProxy ( )
pure virtual

Get the original draggable element that this element is a proxy for Returns an invalid entity id if this is not a proxy

◆ ProxyDragEnd()

virtual void UiDraggableInterface::ProxyDragEnd ( AZ::Vector2  point)
pure virtual

Conclude the drag of a proxy. This should be called from the OnDragEnd callback of the proxy and will result in calling OnDragEnd on the draggable element that this is a proxy for

◆ RedoDrag()

virtual void UiDraggableInterface::RedoDrag ( AZ::Vector2  point)
pure virtual

Redo the drag, this is not usually needed but if a UiDraggableNotificationBus handler causes drop targets to move, and keyboard or console navigation is being used, it can be needed. In that case the handler should call this method after moving drop targets.

◆ SetAsProxy()

virtual void UiDraggableInterface::SetAsProxy ( AZ::EntityId  originalDraggableId,
AZ::Vector2  point 
)
pure virtual

Set this draggable element to be a proxy for another draggable element and start a drag on this draggable element at the specified point

◆ SetDragState()

virtual void UiDraggableInterface::SetDragState ( DragState  dragState)
pure virtual

Set the state of the drag. This is only relevant during a drag. The state affects the visual state of the draggable and can be used to indicate when it is over a valid drop target.


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