I am currently working on tools needed for my project, And I need to create a drag n drop function for my tool. For example I want to able to drag a texture from FileSystem window to a let's say texture rect. I manage to get mouse entered to work. But when I do
instanced_creation_panel.get_node("VBoxContainer/Label").text = "pressed"
on_mouse_entered() Nothing works.
Another problem is that I don't know how to get what is being dragged. I am assuming it has something to do with
EditorInterface.get_selection()? I think I should check to see if left button is pressed , if it is then call 1geteditorinterface.getselection()` . But since I can't detect mouse button, I am at a loss here.
Edit : when I place
then I will get reponse from mouse button, however it only works when I clicked inside the texture rect. It will not work when I press mouse butotn outside the texturerect and then move the cursor into texturerect