![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | liss22 |
I found drag file to godot program change mouse shape (with plus)
is there any listener for that?
![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | liss22 |
I found drag file to godot program change mouse shape (with plus)
is there any listener for that?
![]() |
Reply From: | rainlizard |
func _ready():
get_tree().connect("files_dropped", self, "_on_files_dropped")
func _on_files_dropped(files, screen):
print(files)
“files” is a PoolStringArray containing strings of all the files you’re dragging, so use files[0]
if you only need one.
WOW, Awesome !
Thank you, rainlizard !
liss22 | 2021-03-22 02:01
![]() |
Reply From: | iwanofu |
For Godot 4:
func _ready():
get_tree().get_root().files_dropped.connect(_on_files_dropped)
func _on_files_dropped(files):
print(files)