#Hover over menu error

1 messages · Page 1 of 1 (latest)

ripe hedge
#

Tried to add a menu when hover over icon, but when i tried to implement it, the icon flicker between itself and the menu in the video. How do I fix it?

timid coral
#

I think that happens because popupMenu is above the icon (TextureRect). Causing the hover to disable when popupMenu appears. You should allow popupMenu to be hovered as well and check if both the icon and the menu are not hovered to hide popupMenu.

#

You could also not use MouseEntered/MouseExited signals and check if the mouse position is inside the node rect instead.

var rect = control.get_global_rect()
var mouse_position = control.get_global_mouse_position()
if rect.has_point(mouse_position):
    print("mouse is inside control")
else:
    print("mouse is NOT inside control")