UKismetInputLibrary::PointerEvent_GetGestureType
#include "Kismet/KismetInputLibrary.h"
Access: public
Specifiers: staticBlueprintPure
Description
Returns the type of trackpad/touch gesture — Scroll, Magnify, Swipe, Rotate, or LongPress — associated with this pointer event.
Caveats & Gotchas
- • Returns ESlateGesture::None for ordinary mouse/touch move and click events — only populated for gesture-recognizer events on supported platforms such as macOS trackpads.
- • Gesture support and which gesture types are actually raised varies significantly by platform and input device.
Signature
static ESlateGesture PointerEvent_GetGestureType(const FPointerEvent& Input); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| Input | const FPointerEvent& | The pointer event to read the gesture type from. | — |
Return Type
ESlateGesture Example
Handle a pinch-to-zoom gesture C++
FReply UMyWidget::NativeOnTouchGesture(const FGeometry& InGeometry, const FPointerEvent& InGestureEvent)
{
const ESlateGesture Gesture = UKismetInputLibrary::PointerEvent_GetGestureType(InGestureEvent);
if (Gesture == ESlateGesture::Magnify)
{
ApplyPinchZoom(UKismetInputLibrary::PointerEvent_GetGestureDelta(InGestureEvent));
}
return FReply::Handled();
} See Also
Tags
Version History
Introduced in: unknown
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?