Class GGDragonDropStrategy extends Resource

Encapsulates the drag-and-drop configuration and logic.

Provides base functionality for drag-and-drop behavior.

Extend this class with your custom logic.

# Members

## Whether the [member control] allows dragging.
var allow_drag: bool = true
## When [code]true[/code] allows for simple left-clicks to start dragging.
var use_force_drag: bool = false
## Whether the [member control] allows dropping.
var allow_drop: bool = true
## The script to use when creating drag data in [method _make_drag_data].
var drag_data_script: Script = <Object>
## The preview scene used while dragging. Assembled and populated in [method get_preview].
var preview_scene: PackedScene = <Object>

# Methods

func get_drag_data(component: GGDragonDropcontrol: Controlat_position: Vector2) -> GGDragonDropData
func can_drop_data(component: GGDragonDropcontrol: Controlat_position: Vector2data: GGDragonDropData) -> bool
func drop_data(component: GGDragonDropcontrol: Controlat_position: Vector2data: GGDragonDropData) -> void
## Process the [param control]'s [signal Control.gui_input] signal to handle force-dragging.
func gui_input(component: GGDragonDropcontrol: Controlevent: InputEvent) -> void
## Invoked from the [GGDragonHelper] to support right-click to cancel drag and modifier buttons. Override the [method _apply_modifier_key] method in your strategy.
func handle_modifier(component: GGDragonDropcontrol: Controlevent: InputEventdata: GGDragonDropData) -> void
## Update the preview. Should be called after a modifier updates the [param data] (e.g. via [method _apply_modifier_key]).
func update_preview(control: Controldata: GGDragonDropData) -> void
func get_preview(data: GGDragonDropData) -> Control