Button hover text problem

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By JorensM

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 “mouse_entered” signal, and then fires a “mouse_exited” 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?

:bust_in_silhouette: Reply From: Skunky

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

Thanks a ton! This worked like a charm!

JorensM | 2021-09-24 11:21