Navigation
API > API/Plugins > API/Plugins/CommonUI
Analog cursor preprocessor that tastefully hijacks things a bit to support controller navigation by moving a hidden cursor around based on focus.
Introduces a separate focus-driven mode of operation, wherein the cursor is made invisible and automatically updated to be centered over whatever widget is currently focused (except the game viewport - we completely hide it then)
| Name | FCommonAnalogCursor |
| Type | class |
| Header File | /Engine/Plugins/Runtime/CommonUI/Source/CommonUI/Public/Input/CommonAnalogCursor.h |
| Include Path | #include "Input/CommonAnalogCursor.h" |
Syntax
class FCommonAnalogCursor :
public FAnalogCursor ,
public FGCObject
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → FAnalogCursor → FCommonAnalogCursor
- FGCObject → FCommonAnalogCursor
Implements Interfaces
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FCommonAnalogCursor
(
const UCommonUIActionRouterBase& InActionRouter |
Input/CommonAnalogCursor.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ActiveKeyUpEvent | TOptional< FKeyEvent > | Input/CommonAnalogCursor.h | ||
| bDefaultVirtualPointerLoadFailed | bool | Set when the configured class fails to resolve so we don't keep firing async loads every frame. | Input/CommonAnalogCursor.h | |
| bIgnoreNextMouseMove | bool | Swallow the synthetic mouse-move that follows our SetCursorPosition. | Input/CommonAnalogCursor.h | |
| bLastBroadcastVirtualPointerEnabled | bool | Input/CommonAnalogCursor.h | ||
| bLastCursorInputWasGamepad | bool | UE-380247: was the last cursor input a gamepad stick? | Input/CommonAnalogCursor.h | |
| bShowVirtualPointer | bool | Input/CommonAnalogCursor.h | ||
| bVirtualAcceptDown | bool | Input/CommonAnalogCursor.h | ||
| CurrentVirtualPointerVisualState | ECursorVisualState | Input/CommonAnalogCursor.h | ||
| DefaultVirtualPointerLoadHandle | TSharedPtr< FStreamableHandle > | In-flight async load handle for the default virtual pointer class. | Input/CommonAnalogCursor.h | |
| DefaultVirtualPointerWidget | TObjectPtr< UUserWidget > | Input/CommonAnalogCursor.h | ||
| HoldElapsedTime | float | Input/CommonAnalogCursor.h | ||
| LastAppliedSoftwareCursorWidget | TWeakObjectPtr< UUserWidget > | Skips per-tick UUserWidget::TakeWidget() rebuilds in RefreshCursorVisibility when unchanged. | Input/CommonAnalogCursor.h | |
| LastCursorTarget | TWeakPtr< SWidget > | Input/CommonAnalogCursor.h | ||
| LastCursorTargetTransform | FSlateRenderTransform | Input/CommonAnalogCursor.h | ||
| PointerButtonDownKeys | TSet< FKey > | The current set of pointer buttons being used as keys. | Input/CommonAnalogCursor.h | |
| ShoulderButtonStatus | int32 | Input/CommonAnalogCursor.h | ||
| TimeUntilScrollUpdate | float | Input/CommonAnalogCursor.h | ||
| VirtualPointerWidget | TObjectPtr< UUserWidget > | Input/CommonAnalogCursor.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Input/CommonAnalogCursor.h | |||
FVirtualPointerEnabledChanged & GetOnVirtualPointerEnabledChanged() |
Input/CommonAnalogCursor.h | ||
bool IsUsingFakeTouch() |
Input/CommonAnalogCursor.h | ||
bool IsUsingVirtualPointer() |
Input/CommonAnalogCursor.h | ||
bool IsVirtualPointerEnabled() |
Input/CommonAnalogCursor.h | ||
void OnVirtualAcceptHoldCanceled() |
Input/CommonAnalogCursor.h | ||
void SetCursorMovementStick
(
EAnalogStick InCursorMovementStick |
Input/CommonAnalogCursor.h | ||
void SetVirtualPointerVisibility
(
bool bVisible |
Input/CommonAnalogCursor.h |
Public Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanReleaseMouseCapture() |
Input/CommonAnalogCursor.h | ||
virtual void Deinitialize() |
Input/CommonAnalogCursor.h | ||
virtual bool IsAnalogMovementEnabled() |
Input/CommonAnalogCursor.h | ||
virtual void ShouldHandleRightAnalog
(
bool bInShouldHandleRightAnalog |
Input/CommonAnalogCursor.h | ||
virtual bool ShouldVirtualAcceptSimulateMouseButton
(
const FKeyEvent& InKeyEvent, |
Input/CommonAnalogCursor.h |
Overridden from FAnalogCursor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 GetOwnerUserIndex() |
Input/CommonAnalogCursor.h |
Overridden from IInputProcessor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool HandleAnalogInputEvent
(
FSlateApplication& SlateApp, |
Input/CommonAnalogCursor.h | ||
virtual bool HandleKeyDownEvent
(
FSlateApplication& SlateApp, |
Input/CommonAnalogCursor.h | ||
virtual bool HandleKeyUpEvent
(
FSlateApplication& SlateApp, |
Input/CommonAnalogCursor.h | ||
virtual bool HandleMouseButtonDownEvent
(
FSlateApplication& SlateApp, |
Input/CommonAnalogCursor.h | ||
virtual bool HandleMouseButtonUpEvent
(
FSlateApplication& SlateApp, |
Input/CommonAnalogCursor.h | ||
virtual bool HandleMouseMoveEvent
(
FSlateApplication& SlateApp, |
Input/CommonAnalogCursor.h | ||
virtual void Tick
(
const float DeltaTime, |
Input/CommonAnalogCursor.h |
Overridden from FGCObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void AddReferencedObjects
(
FReferenceCollector& Collector |
Input/CommonAnalogCursor.h | ||
virtual FString GetReferencerName() |
Input/CommonAnalogCursor.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVector2D ClampPositionToViewport
(
const FVector2D& InPosition |
Input/CommonAnalogCursor.h | ||
UGameViewportClient * GetViewportClient() |
Input/CommonAnalogCursor.h | ||
void HideCursor() |
Input/CommonAnalogCursor.h | ||
| A ridiculous function name, but we have this exact question in a few places. | Input/CommonAnalogCursor.h | ||
bool IsInViewport
(
const FVector2D& Position |
Input/CommonAnalogCursor.h | ||
bool IsUsingGamepad() |
Input/CommonAnalogCursor.h | ||
void SetNormalizedCursorPosition
(
const FVector2D& RelativeNewPosition |
Input/CommonAnalogCursor.h | ||
bool ShouldHideCursor() |
Input/CommonAnalogCursor.h |
Protected Virtual
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual EOrientation DetermineScrollOrientation
(
const UWidget& Widget |
Input/CommonAnalogCursor.h | ||
virtual void HandleInputMethodChanged
(
ECommonInputType NewInputMethod |
Input/CommonAnalogCursor.h | ||
virtual void Initialize() |
Input/CommonAnalogCursor.h | ||
virtual void RefreshCursorSettings() |
Input/CommonAnalogCursor.h | ||
virtual void RefreshCursorVisibility() |
Input/CommonAnalogCursor.h |
Overridden from FAnalogCursor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsRelevantInput
(
const FKeyEvent& KeyEvent |
Input/CommonAnalogCursor.h | ||
virtual bool IsRelevantInput
(
const FAnalogInputEvent& AnalogInputEvent |
Input/CommonAnalogCursor.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static TSharedRef< AnalogCursorT > CreateAnalogCursor
(
const UCommonUIActionRouterBase& InActionRouter |
Input/CommonAnalogCursor.h |