summaryrefslogtreecommitdiff
path: root/TrayItem.gd
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2024-05-17 17:43:29 +0200
committerDaniel Weipert <git@mail.dweipert.de>2024-05-17 17:43:56 +0200
commit3e94dd0704d7b4005f17c1086796afdbbe36b1f5 (patch)
tree5183ca775f02a450bbc493193183a06fa3dbc778 /TrayItem.gd
parent07f373ef408f7701b8bfa543ab3c189465f1eed9 (diff)
export and more dragging
Diffstat (limited to 'TrayItem.gd')
-rw-r--r--TrayItem.gd2
1 files changed, 2 insertions, 0 deletions
diff --git a/TrayItem.gd b/TrayItem.gd
index a6ffcaa..2cdb5f2 100644
--- a/TrayItem.gd
+++ b/TrayItem.gd
@@ -19,9 +19,11 @@ func _ready():
func _on_gui_input(event: InputEvent):
if event.is_action_pressed("drag_start"):
+ get_tree().current_scene.can_drag = false
preview = object.duplicate()
preview.drag_start()
get_tree().current_scene.get_node("%DropTarget").add_child(preview)
if event.is_action_released("drag_start"):
+ get_tree().current_scene.can_drag = true
preview.drag_end()
preview = null