The Godot Q&A is currently undergoing maintenance!

Your ability to ask and answer questions is temporarily disabled. You can browse existing threads in read-only mode.

We are working on bringing this community platform back to its full functionality, stay tuned for updates. | Twitter

+2 votes

I've been playing around, trying to implement a satisfying draggable window system for my UI and after getting it to work, I've noticed a problem; my tooltips don't display correctly.

enter image description here

I'm using canvas layers along with Window Dialogs to achieve the intuitive layering of windows when the player tries to drag them (after researching how Godot handles layers, it seems to be the only sane way to handle layering), but unfortunately the layer also applies to the tooltip inside the Window Dialog. How could I go about trying to fix it, so that the tooltip is always on top?

Godot version 3.3.stable
in Engine by (31 points)

1 Answer

+1 vote
Best answer

I believe the default tooltip isn't really accessible through current methods in Godot. You can alter it, but you can't change the layer on which appears. You might want to instead implement your own tooltip.

by (8,550 points)
selected by

Yep,I scoured the documentation and unfortunately came to the same conclusion. It's really a shame we're not able to access the tooltip object - it's a really handy built-in feature, but essentially useless when you're trying to do something a little more complex, because of its protected status.

Maybe you can request for it to be more accessible on GitHub?

Actually, I found out that _make_custom_tooltip(value) allows you to really easily implement custom tooltips - I simply created a custom node with a canvas layer and a label. Unfortunately, it took me a really long time to find, plus I was initially afraid that it'll require a lot of additional work, forcing me to re-implement the tooltip system from scratch, but turns out Godot lets you intercept the tooltip object, it just does it in a roundabout way. Currently, it works exactly as I originally intended: enter image description here

Oh that's nice. I thought that since the node had to be a control you couldn't put a canvas layer on it.

Oh, my apologies, I miss-wrote. I created a Canvas Layer and a Label, but they were separate - I'm simply making the tooltip the child of a special Canvas Layer, specifically reserved for tooltips, when instancing it.

Oh alright thanks for clarifying

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 Frequently asked questions and 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 [email protected] with your username.