FAnalogCursor

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

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Slate

Header

/Engine/Source/Runtime/Slate/Public/Framework/Application/AnalogCursor.h

Include

#include "Framework/Application/AnalogCursor.h"

Syntax

class FAnalogCursor :
    public IInputProcessor,
    public TSharedFromThis< FAnalogCursor >

Remarks

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

Variables

Name Description

Protected variable

float

 

Acceleration

Current settings

Protected variable

FVector2D

 

CurrentOffset

Current sub-pixel offset

Protected variable

FVector2D

 

CurrentSpeed

Current speed of the cursor

Protected variable

float

 

DeadZone

Protected variable

float

 

MaxSpeed

Protected variable

AnalogCursorMod...

 

Mode

Protected variable

float

 

StickySlowdown

Constructors

Name Description

Public function

FAnalogCursor()

Destructors

Name Description

Public function Virtual

~FAnalogCursor()

Dtor

Functions

Name Description

Protected function

void

 

ClearAnalogValues()

Set the cached analog stick declinations to 0

Protected function Const

const FVecto...

 

GetAnalogValues

(
    EAnalogStick Stick
)

Getter

Public function Virtual Const

int32

 

GetOwnerUserIndex()

Protected function Virtual Const

bool

 

IsRelevantInput

(
    const FPointerEvent& MouseEvent
)

Protected function Virtual Const

bool

 

IsRelevantInput

(
    const FAnalogInputEvent& AnalogInp...
)

Protected function Virtual Const

bool

 

IsRelevantInput

(
    const FKeyEvent& KeyEvent
)

Protected function Virtual Const

bool

 

IsRelevantInput

(
    const FInputEvent& InputEvent
)

Public function

void

 

SetAcceleration

(
    float NewAcceleration
)

Public function

void

 

SetDeadZone

(
    float NewDeadZone
)

Public function

void

 

SetMaxSpeed

(
    float NewMaxSpeed
)

Public function

void

 

SetMode

(
    AnalogCursorMode::Type NewMode
)

Public function

void

 

SetStickySlowdown

(
    float NewStickySlowdown
)

Protected function Virtual

void

 

UpdateCursorPosition

(
    FSlateApplication& SlateApp,
    TSharedRef< FSlateUser > SlateUser,
    const FVector2D& NewPosition,
    bool bForce
)

Overridden from IInputProcessor

Name Description

Public function Virtual Const

const TCHAR ...

 

GetDebugName()

Debug name for logging purposes

Public function Virtual

bool

 

HandleAnalogInputEvent

(
    FSlateApplication& SlateApp,
    const FAnalogInputEvent& InAnalogI...
)

Analog axis input

Public function Virtual

bool

 

HandleKeyDownEvent

(
    FSlateApplication& SlateApp,
    const FKeyEvent& InKeyEvent
)

Key down input

Public function Virtual

bool

 

HandleKeyUpEvent

(
    FSlateApplication& SlateApp,
    const FKeyEvent& InKeyEvent
)

Key up input

Public function Virtual

bool

 

HandleMouseMoveEvent

(
    FSlateApplication& SlateApp,
    const FPointerEvent& MouseEvent
)

Mouse movement input

Public function Virtual

void

 

Tick

(
    const float DeltaTime,
    FSlateApplication& SlateApp,
    TSharedRef< ICursor > Cursor
)

Deprecated Functions

Name Description

Protected function Virtual

void

 

UpdateCursorPosition

(
    FSlateApplication& SlateApp,
    TSharedRef< ICursor > Cursor,
    const FVector2D& NewPosition,
    bool bForce
)

FAnalogCursor now updates cursor position based on user, not the hardware cursor specifically.

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss