ControlGetDragData Method |
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(Vector2, Object) and DropData(Vector2, Object). position is local to this control. Drag may be forced with ForceDrag(Object, Control).
A preview that will follow the mouse that should represent the data can be set with SetDragPreview(Control). A good time to set the preview is in this method.
func get_drag_data(position): var mydata = make_data() set_drag_preview(make_preview(mydata)) return mydata
Namespace: Godot
public virtual Object GetDragData( Vector2 position )
[Missing <param name="position"/> documentation for "M:Godot.Control.GetDragData(Godot.Vector2)"]
[Missing <returns> documentation for "M:Godot.Control.GetDragData(Godot.Vector2)"]