ControlSetDragForwarding Method |
Forwards the handling of this control's drag and drop to target control.
Forwarding can be implemented in the target control similar to the methods GetDragData(Vector2), CanDropData(Vector2, Object), and DropData(Vector2, Object) but with two differences:
1. The function name must be suffixed with _fw
2. The function must take an extra argument that is the control doing the forwarding
# ThisControl.gd extends Control func _ready(): set_drag_forwarding(target_control) # TargetControl.gd extends Control func can_drop_data_fw(position, data, from_control): return true func drop_data_fw(position, data, from_control): my_handle_data(data) func get_drag_data_fw(position, from_control): set_drag_preview(my_preview) return my_data()
Namespace: Godot
public void SetDragForwarding( Control target )
[Missing <param name="target"/> documentation for "M:Godot.Control.SetDragForwarding(Godot.Control)"]