+1 vote

I'm trying to create a special plugin node, and I have to show special options on the upper dock of the Editor so I can edit some of its features - something like the Path node, that adds some buttons on the Dock container to edit the path visually. Part of the question was answered here; problem is, I'm not able to make the added dock "disappear" when I don't click any node. The best I can do is to make the dock disappear only when I click another node that is not the node I'm adding with the plugin ("GodotTAN") - but when I click on an empty space (usually to "reset" the selected node), the dock is still there (the "handles" method only works when a node is selected by the user).

func edit(object):
    dock.show()
    current_object = object

func handles(object):
    dock.hide()
    return object extends GodotTANScript

I also tried some variations using forwardinputevent, but with no success. Is there a proper solution to this?

in Engine by (304 points)

I made a quickfix using forwardinputevent(); problem is there is some lag between the dock hiding/showing. I'm looking for a more elegant solution than this:
https://gist.github.com/henriquelalves/6ad4f74c43a16bb442ccbaf3bad190d7

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.