Godot Version
4.2
Question
I want to trigger a function to call when the player mouses over the menu panel. I can do that by connection the panel to the mouse_entered() and mouse_exited() events. However, the mouse_exited() event fires when I mouse over a child node.
Here is my structure
Is there a way for only the panel to have the mouse_entered() and mouse_exited() events and it doesn’t trigger mouse_exited() when mousing over a child?
Can I place something invisible/transparent over the panel that will capture the mouse_entered mouse_exited calls but doesn’t interfere with the child node’s button presses?
Or will I have to just connect every child node to the mouse_entered and _exited and have it fire the function?
The issue of emitting mouse_exited
when hovering a child Control node was discussed and addressed in Make mouse enter/exit notifications match mouse events by kitbdev · Pull Request #84547 · godotengine/godot · GitHub which got included in 4.2.
Can you please post your exact Godot version number string?
Godot Engine v4.2.2.stable.official (c) 2007-present Juan Linietsky, Ariel Manzur & Godot Contributors
So from my understanding I should be connecting my TokenShop panel to gui_input event for the mouse over instead of mouse_entered() and moused_exited()? I am looking at Input Event and there is InputEventMouseMotion. Does that only fire when the mouse motion is over the TokenShop regardless of is it over a child of TokenShop? Do I need to somehow be testing it constantly to see if it is within the bounds of TokenShop?