+2 votes

Hello, I am trying to make a text appear upon hovering a button, but it keeps flickering, like so:

flicker

func _on_Level1_mouse_entered():
$Tooltip.show()
pass # Replace with function body.

func _on_Level1_mouse_exited():
$Tooltip.hide()
pass # Replace with function body.

The reason for this is because the hover effect has a panel that overlays the button, and when I hover the mouse over the button, it initially fires a "mouseentered" signal, and then fires a "mouseexited" signal because the panel overlays the button and the button thinks that the mouse exited (which is weird because the panel is child of the button, so it should register the panel as part of the button, but it doesn't) Could this be considered a bug? Because the panel is child of the button, but when the panel overlays the button it doesn't register the panel as part of the button.

Any ideas how to fix this?

Godot version 3.3.3.stable.mono
in Engine by (193 points)

1 Answer

+1 vote
Best answer

You need to let the mouseinput pass through the overlaying Control nodes.

Which you can pass through by setting the "Filter" option to Pass "instead" of "Stop" under the "Mouse" category of the overlay Control node

by (62 points)
selected by

Thanks a ton! This worked like a charm!

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.