-
-
Notifications
You must be signed in to change notification settings - Fork 23.5k
Introduce Viewport functions for keeping the mouse over state consistent
#99890
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introduce Viewport functions for keeping the mouse over state consistent
#99890
Conversation
6537252 to
8ce663f
Compare
8ce663f to
8e00035
Compare
|
@eviltrout @SubSage @rakkarage @krdluzni Would some of you be able to test and confirm that this PR would satisfyingly resolve your linked issues? Note that this requires modifying the project code slightly to use those new methods. |
|
thanks. with this pr, adding: fixes the scroll bar not being highlighted while buttons are in 3d. |
|
This does not fix #89757, but over time I have been convinced it's an edge case that most people will not be concerned with, plus there is a workaround that works well. I have closed my issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The methods work correctly.
Probably needs better documentation on how to apply them, but it might be out of scope for class reference. Also the official GUI 3D can be updated to call the new methods and adjusted in a way that makes them useful.
|
Thanks! |
InputEventMouseMotionin_gui_input#89757ViewportinTextureRect#89868Some users had problems with forwarding input events to
SubViewportsince #88992, which adjusted a default value and in effect prevented callinggui_inputwhen 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_ENTERandNOTIFICATION_VP_MOUSE_EXITwas 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
TextureRectand 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.