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

Abstract base class for drag interactions in the UI Editor viewport window. More...

#include <ViewportDragInteraction.h>

Inherited by ViewportAddGuideInteraction, ViewportMoveGuideInteraction, and ViewportMoveInteraction.

Public Types

enum class  EndState {
  Inside , OutsideX , OutsideY , OutsideXY ,
  Canceled
}
 

Public Member Functions

 ViewportDragInteraction (const AZ::Vector2 &startMousePos)
 
virtual void Update (const AZ::Vector2 &mousePos)=0
 Update the interaction each time the mouse moves.
 
virtual void Render (Draw2dHelper &draw2d)
 Render any display desired during the interaction.
 
virtual void EndInteraction (EndState endState)
 End the interaction.
 

Protected Attributes

AZ::Vector2 m_startMousePos
 

Detailed Description

Abstract base class for drag interactions in the UI Editor viewport window.

Member Enumeration Documentation

◆ EndState

Enumerator
OutsideX 

Outside only on the X-axis.

OutsideY 

Outside only on the Y-axis.

OutsideXY 

Outside on both the X-axis and the Y-axis.

Member Function Documentation

◆ EndInteraction()

virtual void ViewportDragInteraction::EndInteraction ( EndState  endState)
virtual

End the interaction.

Reimplemented in ViewportAddGuideInteraction, and ViewportMoveGuideInteraction.

◆ Render()

virtual void ViewportDragInteraction::Render ( Draw2dHelper draw2d)
virtual

Render any display desired during the interaction.

Reimplemented in ViewportAddGuideInteraction, and ViewportMoveGuideInteraction.

◆ Update()

virtual void ViewportDragInteraction::Update ( const AZ::Vector2 &  mousePos)
pure virtual

Update the interaction each time the mouse moves.

Implemented in ViewportAddGuideInteraction, ViewportMoveGuideInteraction, and ViewportMoveInteraction.


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