-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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 way to get the topmost Control node under the mouse #84909
Conversation
You'd also need to add documentation for these methods (in |
Thanks, I'll go back and do that. |
I seem to have messed up the set of files changed here when I tried to rebase and push the updated Viewport,xml file. The only files I changed and committed were viewport.h, viewport.cpp, and Viewport.xml. I seem to have somehow pulled in some other changes into my branch when I did the rebase and amended commit, and I'm not really sure how to unwind that. Can I just recreate my set of changes on a new, clean pull request and then close this one with a comment pointing to the new one? |
You've indeed included several fixes, to fix this use |
No need to open a new PR, you can fix it in here. See the docs for how to rebase (I suggest reading the whole page if you haven't already). Note that a single commit is preferred per PR anyway. Looking at the current commits you'd just need to |
92e1cd2
to
bdd609c
Compare
You've erased existing changes, please remove unrelated reverting commits |
Sorry, I obviously need to go back and learn how to do git rebases properly. I believe I have my local branch fixed up properly now and will attempt to push that back up. If this doesn't do it right, I believe we should probably close this current pull request until I go back and learn to use git properly. |
bdd609c
to
8b1c65c
Compare
… mouse cursor or at a specific point by adding binding for gui_find_control and adding a new method for gui_get_mouse_over.
8b1c65c
to
7b0bfe0
Compare
Alright, I think everything is in order now. It's now showing up as a single commit with only my changes, and I ran --doctool and updated the documentation entries in Viewport.xml. |
It looks like another change has now been merged in that exposes a method to get the mouse_over control. That was the main purpose of this pull request, so I'm going to withdraw this pull request and reconsider submitting the remaining changes to get a control at specific coordinates. |
Ah, sorry about that. Indeed, your PR was accidentally superseded by #85966. Thanks for your contribution nevertheless! |
Thanks. Here's the gamepad controlled cursor I was working on with regards
to using this:
https://github.com/Vortex-Basis-LLC/Godot-VBG-Samples-GamepadCursor
It 99% works with the new ability to get the Control under the cursor. The
last remaining issue I'm seeing is if you start with the cursor outside of
the game window and move the mouse over the game window with the gamepad,
then the cursor will not update until you move the cursor with the mouse
(then the gamepad movement and cursors work as expected). If you move
outside the game window and then back into the game window again, then the
same behavior is seen. This has only been tested on a Mac (M1) so for.
If someone is able to point me in the right direction on that, it would be
most appreciated (I assume I need to go look for where mouse events are
being handled to start with).
I resubmitted the other change for gui_find_control() as a pull request
here:
#86343
Thanks,
Caleb
…On Tue, Dec 19, 2023 at 6:26 AM Yuri Sizov ***@***.***> wrote:
Ah, sorry about that. Indeed, your PR was accidentally superseded by
#85966 <#85966>. Thanks for your
contribution nevertheless!
—
Reply to this email directly, view it on GitHub
<#84909 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ATYQEVYPZF3ZZ3PR76QVPDLYKF2WPAVCNFSM6AAAAAA7LMV7PKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRSGU4DKMZSHA>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
I've exposed a way to get Viewport::gui.mouse_over and call Viewport::gui_find_control to GDScript to facilitate being able to implement the following features:
From GDScript, the following can now be done to get the control under the mouse cursor (or possibly at another location):