Introduce Viewport
functions for keeping the mouse over state consistent
#99890
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
InputEventMouseMotion
in_gui_input
#89757Viewport
inTextureRect
#89868Some users had problems with forwarding input events to
SubViewport
since #88992, which adjusted a default value and in effect prevented callinggui_input
when used without changes.I still believe, that this change makes mouse-handling more consistent. But this change makes it necessary to give users tools and instructions about how to deal with this new situation.
Previously I did believe, that sending
NOTIFICATION_VP_MOUSE_ENTER
andNOTIFICATION_VP_MOUSE_EXIT
was sufficient (see godotengine/godot-demo-projects#1139), but the MRP of #98003 demonstrates, that this approach still leaves some situations unresolved.So I want to introduce with this PR two functions, that allow users to notify viewports about the mouse-over state. These two functions take care of all internal state-adjustments.
I discarded #90444 as a solution, because while it automatically handles the mouse-enter-part, users still have no solution for the mouse-exit-part.
I discarded #89868 as a solution, because it is restricted to
TextureRect
and doesn't provide a generic solution for all potential relevant nodes.The introduction of these two function with their descriptions could be seen as either a partial or a total fix of issue #97267.