UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAnalogCursor Class Reference

#include <AnalogCursor.h>

+ Inheritance diagram for FAnalogCursor:

Public Member Functions

SLATE_API FAnalogCursor ()
 
SLATE_API FAnalogCursor (const FAnalogCursor &)
 
virtual SLATE_API ~FAnalogCursor ()
 
virtual SLATE_API void Tick (const float DeltaTime, FSlateApplication &SlateApp, TSharedRef< ICursor > Cursor) override
 
virtual SLATE_API bool HandleKeyDownEvent (FSlateApplication &SlateApp, const FKeyEvent &InKeyEvent) override
 
virtual SLATE_API bool HandleKeyUpEvent (FSlateApplication &SlateApp, const FKeyEvent &InKeyEvent) override
 
virtual SLATE_API bool HandleAnalogInputEvent (FSlateApplication &SlateApp, const FAnalogInputEvent &InAnalogInputEvent) override
 
virtual SLATE_API bool HandleMouseMoveEvent (FSlateApplication &SlateApp, const FPointerEvent &MouseEvent) override
 
virtual const TCHARGetDebugName () const override
 
virtual int32 GetOwnerUserIndex () const
 
SLATE_API void SetAcceleration (float NewAcceleration)
 
SLATE_API void SetMaxSpeed (float NewMaxSpeed)
 
SLATE_API void SetStickySlowdown (float NewStickySlowdown)
 
SLATE_API void SetDeadZone (float NewDeadZone)
 
SLATE_API void SetMode (AnalogCursorMode::Type NewMode)
 
- Public Member Functions inherited from IInputProcessor
 IInputProcessor ()
 
virtual ~IInputProcessor ()
 
virtual bool HandleMouseButtonDownEvent (FSlateApplication &SlateApp, const FPointerEvent &MouseEvent)
 
virtual bool HandleMouseButtonUpEvent (FSlateApplication &SlateApp, const FPointerEvent &MouseEvent)
 
virtual bool HandleMouseButtonDoubleClickEvent (FSlateApplication &SlateApp, const FPointerEvent &MouseEvent)
 
virtual bool HandleMouseWheelOrGestureEvent (FSlateApplication &SlateApp, const FPointerEvent &InWheelEvent, const FPointerEvent *InGestureEvent)
 
virtual bool HandleMotionDetectedEvent (FSlateApplication &SlateApp, const FMotionEvent &MotionEvent)
 
- Public Member Functions inherited from TSharedFromThis< FAnalogCursor >
TSharedRef< FAnalogCursor, Mode > AsShared ()
 
TSharedRef< FAnalogCursor const, Mode > AsShared () const
 
TSharedRef< SubobjectType, Mode > AsSharedSubobject (SubobjectType *SubobjectPtr) const
 
TWeakPtr< FAnalogCursor, Mode > AsWeak ()
 
TWeakPtr< FAnalogCursor const, Mode > AsWeak () const
 
TWeakPtr< SubobjectType, Mode > AsWeakSubobject (SubobjectType *SubobjectPtr) const
 
void UpdateWeakReferenceInternal (TSharedPtr< SharedPtrType, SharedPtrMode > const *InSharedPtr, OtherType *InObject) const
 
void UpdateWeakReferenceInternal (TSharedRef< SharedRefType, SharedPtrMode > const *InSharedRef, OtherType *InObject) const
 
UE_FORCEINLINE_HINT bool DoesSharedInstanceExist () const
 

Protected Member Functions

virtual SLATE_API bool IsRelevantInput (const FInputEvent &InputEvent) const
 
virtual SLATE_API bool IsRelevantInput (const FKeyEvent &KeyEvent) const
 
virtual SLATE_API bool IsRelevantInput (const FAnalogInputEvent &AnalogInputEvent) const
 
virtual SLATE_API bool IsRelevantInput (const FPointerEvent &MouseEvent) const
 
const FVector2DGetAnalogValues (EAnalogStick Stick=EAnalogStick::Left) const
 
SLATE_API void ClearAnalogValues ()
 
virtual SLATE_API void UpdateCursorPosition (FSlateApplication &SlateApp, TSharedRef< ICursor > Cursor, const FVector2D &NewPosition, bool bForce=false)
 
virtual SLATE_API void UpdateCursorPosition (FSlateApplication &SlateApp, TSharedRef< FSlateUser > SlateUser, const FVector2D &NewPosition, bool bForce=false)
 
virtual SLATE_API FVector2D CalculateTickedCursorPosition (const float DeltaTime, FSlateApplication &SlateApp, TSharedPtr< FSlateUser > SlateUser)
 
- Protected Member Functions inherited from TSharedFromThis< FAnalogCursor >
 TSharedFromThis ()
 
 TSharedFromThis (TSharedFromThis const &)
 
UE_FORCEINLINE_HINT TSharedFromThisoperator= (TSharedFromThis const &)
 
 ~TSharedFromThis ()
 

Protected Attributes

FVector2D CurrentSpeed
 
FVector2D CurrentOffset
 
float Acceleration
 
float MaxSpeed
 
float StickySlowdown
 
float DeadZone
 
AnalogCursorMode::Type Mode
 

Additional Inherited Members

- Static Protected Member Functions inherited from TSharedFromThis< FAnalogCursor >
static UE_FORCEINLINE_HINT TSharedRef< OtherType, Mode > SharedThis (OtherType *ThisPtr)
 
static UE_FORCEINLINE_HINT TSharedRef< OtherType const, Mode > SharedThis (const OtherType *ThisPtr)
 

Detailed Description

A class that simulates a cursor driven by an analog stick.

Constructor & Destructor Documentation

◆ FAnalogCursor() [1/2]

FAnalogCursor::FAnalogCursor ( )

◆ FAnalogCursor() [2/2]

FAnalogCursor::FAnalogCursor ( const FAnalogCursor )
default

◆ ~FAnalogCursor()

FAnalogCursor::~FAnalogCursor ( )
virtualdefault

Dtor

Member Function Documentation

◆ CalculateTickedCursorPosition()

FVector2D FAnalogCursor::CalculateTickedCursorPosition ( const float  DeltaTime,
FSlateApplication SlateApp,
TSharedPtr< FSlateUser SlateUser 
)
protectedvirtual

◆ ClearAnalogValues()

void FAnalogCursor::ClearAnalogValues ( )
protected

Set the cached analog stick declinations to 0

◆ GetAnalogValues()

const FVector2D & FAnalogCursor::GetAnalogValues ( EAnalogStick  Stick = EAnalogStick::Left) const
inlineprotected

Getter

◆ GetDebugName()

virtual const TCHAR * FAnalogCursor::GetDebugName ( ) const
inlineoverridevirtual

Debug name for logging purposes

Reimplemented from IInputProcessor.

◆ GetOwnerUserIndex()

virtual int32 FAnalogCursor::GetOwnerUserIndex ( ) const
inlinevirtual

◆ HandleAnalogInputEvent()

bool FAnalogCursor::HandleAnalogInputEvent ( FSlateApplication SlateApp,
const FAnalogInputEvent InAnalogInputEvent 
)
overridevirtual

Analog axis input

Reimplemented from IInputProcessor.

◆ HandleKeyDownEvent()

bool FAnalogCursor::HandleKeyDownEvent ( FSlateApplication SlateApp,
const FKeyEvent InKeyEvent 
)
overridevirtual

Key down input

Reimplemented from IInputProcessor.

◆ HandleKeyUpEvent()

bool FAnalogCursor::HandleKeyUpEvent ( FSlateApplication SlateApp,
const FKeyEvent InKeyEvent 
)
overridevirtual

Key up input

Reimplemented from IInputProcessor.

◆ HandleMouseMoveEvent()

bool FAnalogCursor::HandleMouseMoveEvent ( FSlateApplication SlateApp,
const FPointerEvent MouseEvent 
)
overridevirtual

Mouse movement input

Reimplemented from IInputProcessor.

◆ IsRelevantInput() [1/4]

bool FAnalogCursor::IsRelevantInput ( const FAnalogInputEvent AnalogInputEvent) const
protectedvirtual

◆ IsRelevantInput() [2/4]

bool FAnalogCursor::IsRelevantInput ( const FInputEvent InputEvent) const
protectedvirtual

◆ IsRelevantInput() [3/4]

bool FAnalogCursor::IsRelevantInput ( const FKeyEvent KeyEvent) const
protectedvirtual

◆ IsRelevantInput() [4/4]

bool FAnalogCursor::IsRelevantInput ( const FPointerEvent MouseEvent) const
protectedvirtual

◆ SetAcceleration()

void FAnalogCursor::SetAcceleration ( float  NewAcceleration)

◆ SetDeadZone()

void FAnalogCursor::SetDeadZone ( float  NewDeadZone)

◆ SetMaxSpeed()

void FAnalogCursor::SetMaxSpeed ( float  NewMaxSpeed)

◆ SetMode()

void FAnalogCursor::SetMode ( AnalogCursorMode::Type  NewMode)

◆ SetStickySlowdown()

void FAnalogCursor::SetStickySlowdown ( float  NewStickySlowdown)

◆ Tick()

void FAnalogCursor::Tick ( const float  DeltaTime,
FSlateApplication SlateApp,
TSharedRef< ICursor Cursor 
)
overridevirtual

Implements IInputProcessor.

◆ UpdateCursorPosition() [1/2]

void FAnalogCursor::UpdateCursorPosition ( FSlateApplication SlateApp,
TSharedRef< FSlateUser SlateUser,
const FVector2D NewPosition,
bool  bForce = false 
)
protectedvirtual

◆ UpdateCursorPosition() [2/2]

void FAnalogCursor::UpdateCursorPosition ( FSlateApplication SlateApp,
TSharedRef< ICursor Cursor,
const FVector2D NewPosition,
bool  bForce = false 
)
protectedvirtual

Handles updating the cursor position and processing a Mouse Move Event

Member Data Documentation

◆ Acceleration

float FAnalogCursor::Acceleration
protected

Current settings

◆ CurrentOffset

FVector2D FAnalogCursor::CurrentOffset
protected

Current sub-pixel offset

◆ CurrentSpeed

FVector2D FAnalogCursor::CurrentSpeed
protected

Current speed of the cursor

◆ DeadZone

float FAnalogCursor::DeadZone
protected

◆ MaxSpeed

float FAnalogCursor::MaxSpeed
protected

◆ Mode

AnalogCursorMode::Type FAnalogCursor::Mode
protected

◆ StickySlowdown

float FAnalogCursor::StickySlowdown
protected

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