Navigation
API > API/Runtime > API/Runtime/SlateCore
FPointerEvent describes a mouse or touch action (e.g. Press, Release, Move, etc). It is passed to event handlers dealing with pointer-based input.
| Name | FPointerEvent |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Input/Events.h |
| Include Path | #include "Input/Events.h" |
Syntax
USTRUCT (BlueprintType )
struct FPointerEvent : public FInputEvent
Inheritance Hierarchy
- FInputEvent → FPointerEvent
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FPointerEvent
(
FInputDeviceId InDeviceId, |
Input/Events.h | ||
FPointerEvent
(
uint32 InUserIndex, |
Input/Events.h | ||
FPointerEvent
(
const UE::Slate::FDeprecateVector2DParameter& InScreenSpacePosition, |
A constructor for gesture events | Input/Events.h | |
FPointerEvent
(
uint32 InUserIndex, |
Input/Events.h | ||
FPointerEvent
(
uint32 InPointerIndex, |
Events are immutable once constructed. | Input/Events.h | |
FPointerEvent
(
uint32 InPointerIndex, |
A constructor for raw mouse events | Input/Events.h | |
FPointerEvent
(
const FPointerEvent& Other, |
A constructor to alter cursor positions | Input/Events.h | |
| UStruct Constructor. Not meant for normal usage. | Input/Events.h | ||
FPointerEvent
(
uint32 InUserIndex, |
Input/Events.h | ||
FPointerEvent
(
FInputDeviceId InDeviceId, |
Input/Events.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FPointerEvent() |
Input/Events.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bIsDirectionInvertedFromDevice | bool | Input/Events.h | ||
| bIsTouchEvent | bool | Input/Events.h | ||
| bIsTouchFirstMove | bool | Input/Events.h | ||
| bIsTouchForceChanged | bool | Input/Events.h | ||
| CursorDelta | UE::Slate::FDeprecateVector2DResult | Input/Events.h | ||
| EffectingButton | FKey | Input/Events.h | ||
| Force | float | Input/Events.h | ||
| GestureType | EGestureEvent | Input/Events.h | ||
| LastScreenSpacePosition | UE::Slate::FDeprecateVector2DResult | Input/Events.h | ||
| PointerIndex | uint32 | Input/Events.h | ||
| PressedButtons | const TSet< FKey > * | Input/Events.h | ||
| ScreenSpacePosition | UE::Slate::FDeprecateVector2DResult | Input/Events.h | ||
| TouchpadIndex | uint32 | Input/Events.h | ||
| WheelOrGestureDelta | UE::Slate::FDeprecateVector2DResult | Input/Events.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const UE::Slate::FDeprecateVector2DResult & GetCursorDelta() |
Returns the distance the mouse traveled since the last event was handled. | Input/Events.h | |
FKey GetEffectingButton() |
Mouse button that caused this event to be raised (possibly FKey::Invalid) | Input/Events.h | |
const UE::Slate::FDeprecateVector2DResult & GetGestureDelta() |
Returns the change in gesture value since the last gesture event of the same type. | Input/Events.h | |
EGestureEvent GetGestureType() |
Returns the type of touch gesture | Input/Events.h | |
const UE::Slate::FDeprecateVector2DResult & GetLastScreenSpacePosition() |
Returns the position of the cursor in screen space last time we handled an input event | Input/Events.h | |
uint32 GetPointerIndex() |
Returns the unique identifier of the pointer (e.g., finger index) | Input/Events.h | |
| Returns the full set of pressed buttons | Input/Events.h | ||
const UE::Slate::FDeprecateVector2DResult & GetScreenSpacePosition() |
Returns The position of the cursor in screen space | Input/Events.h | |
float GetTouchForce() |
Returns the force of a touch (1.0f is mapped to an general touch force, < 1 is "light", > 1 is "heavy", and 10 is the max force possible) | Input/Events.h | |
uint32 GetTouchpadIndex() |
Returns the index of the touch pad that generated this event (for platforms with multiple touch pads per user) | Input/Events.h | |
float GetWheelDelta() |
How much did the mouse wheel turn since the last mouse event | Input/Events.h | |
bool IsDirectionInvertedFromDevice() |
Is the gesture delta inverted | Input/Events.h | |
bool IsMouseButtonDown
(
FKey MouseButton |
Mouse buttons that are currently pressed | Input/Events.h | |
bool IsTouchEvent() |
Is this event a result from a touch (as opposed to a mouse) | Input/Events.h | |
bool IsTouchFirstMoveEvent() |
Is this event a special first-move touch event | Input/Events.h | |
bool IsTouchForceChangedEvent() |
Is this event a special force-change touch event | Input/Events.h |
Overridden from FInputEvent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsPointerEvent() |
Is this event a pointer event (touch or cursor). | Input/Events.h | |
virtual FText ToText() |
Input/Events.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static PointerEventType MakeTranslatedEvent
(
const PointerEventType& InPointerEvent, |
Input/Events.h |