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 Cancelledon_dragged
(OnDragDropMulticast): [Read-Write] On Draggedon_drop
(OnDragDropMulticast): [Read-Write] On Droppayload
(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.
- property default_drag_visual¶
[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.
- Type
(Widget)
- 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) –
- property offset¶
[Read-Write] A percentage offset (-1..+1) from the Pivot location, the percentage is of the desired size of the dragged visual.
- Type
(Vector2D)
- property on_drag_cancelled¶
[Read-Write] On Drag Cancelled
- Type
- property on_dragged¶
[Read-Write] On Dragged
- Type
- property on_drop¶
[Read-Write] On Drop
- Type
- property payload¶
[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.
- Type
(Object)
- property pivot¶
[Read-Write] Controls where the drag widget visual will appear when dragged relative to the pointer performing the drag operation.
- Type