-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Expose a method to get hovered Control in Viewport #85966
Conversation
You need to add documentation for this new method as well, see here Also I think the name might need a discussion, the current name isn't very clear to me, maybe something |
I was trying to keep the naming convention as close to the underlying code as possible. I have tried to make it clear in the docs. |
The return type isn't always obvious from the name in for example autocomplete, but I think the name works, we'll see what others think 🙂 |
Tried to elaborate more in the docs but I did still use the term leaf node and the likely function a user would want to use with it. |
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.
LGTM, someone with detail knowledge of the mouse over system should look at the docs to check the wording and claims
Maybe control tree or stack is better than group 🤷 |
"Subtree" or "hierarchy" might be best, as they are pretty established |
CC @Sauermann If I'm not mistaken you've worked with the viewport input area |
Updated the title as the binding isn't exclusive to GDScript |
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.
Implementation looks correct, didn't test it however.
I would say that in this case our internal naming convention is not great and should be adjusted alongside your changes if we seek consistency, or can be left as is to avoid making this PR bigger than it needs to be. But the public method needs to have a subject in its name. Internal properties and methods don't always have good names for public API because they are never considered from this perspective. So something like Other than that, this seems fine, it's just exposing an existing value. Once you address the name and squash the commits this can be merged. |
696afb1
to
fe77252
Compare
Updated and rebased on your behalf. |
Thanks, and congrats on your first merged Godot contribution! |
Thanks for making the changes and merging work for busy. Yeah funny this one beat #83138 😂 But yeah this was actually simple 👍 |
Found myself needing this to resolve some UI stuff in a clean way.