Click or drag to resize

ControlDropData Method

Godot calls this method to pass you the data from a control's GetDragData(Vector2) result. Godot first calls CanDropData(Vector2, Object) to test if data is allowed to drop at position where position is local to this control.

func can_drop_data(position, data):
    return typeof(data) == TYPE_DICTIONARY and data.has("color")

func drop_data(position, data):
    color = data["color"]

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public virtual void DropData(
	Vector2 position,
	Object data
)

Parameters

position
Type: GodotVector2

[Missing <param name="position"/> documentation for "M:Godot.Control.DropData(Godot.Vector2,System.Object)"]

data
Type: SystemObject

[Missing <param name="data"/> documentation for "M:Godot.Control.DropData(Godot.Vector2,System.Object)"]

See Also