unreal.DragDropOperation

class unreal.DragDropOperation(outer=None, name='None')

Bases: unreal.Object

This class is the base drag drop operation for UMG, extend it to add additional data and add new functionality.

C++ Source:

  • Module: UMG
  • File: DragDropOperation.h

Editor Properties: (see get_editor_property/set_editor_property)

  • default_drag_visual (Widget): [Read-Write] The Drag Visual is the widget to display when dragging the item. Normally people create a new widget to represent the temporary drag.
  • offset (Vector2D): [Read-Write] A percentage offset (-1..+1) from the Pivot location, the percentage is of the desired size of the dragged visual.
  • on_drag_cancelled (OnDragDropMulticast): [Read-Write] On Drag Cancelled
  • on_dragged (OnDragDropMulticast): [Read-Write] On Dragged
  • on_drop (OnDragDropMulticast): [Read-Write] On Drop
  • payload (Object): [Read-Write] The payload of the drag operation. This can be any UObject that you want to pass along as dragged data. If you were building an inventory screen this would be the UObject representing the item being moved to another slot.
  • pivot (DragPivot): [Read-Write] Controls where the drag widget visual will appear when dragged relative to the pointer performing the drag operation.
  • tag (str): [Read-Write] A simple string tag you can optionally use to provide extra metadata about the operation.
default_drag_visual

(Widget) – [Read-Only] The Drag Visual is the widget to display when dragging the item. Normally people create a new widget to represent the temporary drag.

drag_cancelled(pointer_event) → None

Drag Cancelled

Parameters:pointer_event (PointerEvent) –
dragged(pointer_event) → None

Dragged

Parameters:pointer_event (PointerEvent) –
drop(pointer_event) → None

Drop

Parameters:pointer_event (PointerEvent) –
offset

(Vector2D) – [Read-Write] A percentage offset (-1..+1) from the Pivot location, the percentage is of the desired size of the dragged visual.

on_drag_cancelled

(OnDragDropMulticast) – [Read-Write] On Drag Cancelled

on_dragged

(OnDragDropMulticast) – [Read-Write] On Dragged

on_drop

(OnDragDropMulticast) – [Read-Write] On Drop

payload

(Object) – [Read-Write] The payload of the drag operation. This can be any UObject that you want to pass along as dragged data. If you were building an inventory screen this would be the UObject representing the item being moved to another slot.

pivot

(DragPivot) – [Read-Write] Controls where the drag widget visual will appear when dragged relative to the pointer performing the drag operation.

tag

(str) – [Read-Write] A simple string tag you can optionally use to provide extra metadata about the operation.