Control.getDragData

Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns null if there is no data to drag. Controls that want to receive drop data should implement canDropData and dropData. position is local to this control. Drag may be forced with forceDrag. A preview that will follow the mouse that should represent the data can be set with setDragPreview. A good time to set the preview is in this method.

More...
struct Control
@nogc nothrow
Variant
getDragData
(
in Vector2 position
)

Detailed Description

func get_drag_data(position): var mydata = make_data() set_drag_preview(make_preview(mydata)) return mydata

Meta