Navigation
API > API/Runtime > API/Runtime/UMG > API/Runtime/UMG/UWidgetBlueprintLibrary
Description
Given the pointer event, emit the DetectDrag reply if the provided key was pressed. If the DragKey is a touch key, that will also automatically work.
| Name | DetectDragIfPressed |
| Type | function |
| Header File | /Engine/Source/Runtime/UMG/Public/Blueprint/WidgetBlueprintLibrary.h |
| Include Path | #include "Blueprint/WidgetBlueprintLibrary.h" |
| Source | /Engine/Source/Runtime/UMG/Private/WidgetBlueprintLibrary.cpp |
UFUNCTION (BlueprintCallable,
Meta=(HidePin="WidgetDetectingDrag", DefaultToSelf="WidgetDetectingDrag"),
Category="Widget|Drag and Drop|Event Reply")
static FEventReply DetectDragIfPressed
(
const FPointerEvent & PointerEvent,
UWidget * WidgetDetectingDrag,
FKey DragKey
)
Parameters
| Name | Remarks |
|---|---|
| PointerEvent | The pointer device event coming in. |
| WidgetDetectingDrag | Detect dragging in this widget. |
| DragKey | This button should be pressed to detect the drag, won't emit the DetectDrag FEventReply unless this is pressed. |