diff --git a/addons/pandora/ui/components/resource_picker/resource_picker.gd b/addons/pandora/ui/components/resource_picker/resource_picker.gd index 110d3a69..6be79741 100644 --- a/addons/pandora/ui/components/resource_picker/resource_picker.gd +++ b/addons/pandora/ui/components/resource_picker/resource_picker.gd @@ -34,3 +34,13 @@ func _path_changed(new_path:String) -> void: resource_changed.emit(new_path) else: line_edit.text = resource_path + +func _can_drop_data(_pos, data): + if data.type == "files": + return true + return false + +func _drop_data(_pos, data): + if data.type == "files": + var path = data.files[0] + _path_changed(path) diff --git a/addons/pandora/ui/components/resource_picker/resource_picker.tscn b/addons/pandora/ui/components/resource_picker/resource_picker.tscn index b2ce5844..353210bd 100644 --- a/addons/pandora/ui/components/resource_picker/resource_picker.tscn +++ b/addons/pandora/ui/components/resource_picker/resource_picker.tscn @@ -11,6 +11,7 @@ script = ExtResource("1_hjkiw") [node name="LineEdit" type="LineEdit" parent="."] layout_mode = 2 size_flags_horizontal = 3 +mouse_filter = 1 [node name="LoadFileButton" type="Button" parent="."] layout_mode = 2