-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Remove useless Viewport::gui.key_input_accepted
#96867
Remove useless Viewport::gui.key_input_accepted
#96867
Conversation
f67895e
to
4788f54
Compare
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.
I believe, that this simplification is beneficial and that the behavioral changes are very minor, so that nearly no user will not notice these changes.
Please have a look at my other comments, which seem to be easily resolvable.
Also make sure, to squash the commits together as mentioned in the docs: https://docs.godotengine.org/en/latest/contributing/workflow/pr_workflow.html#the-interactive-rebase
8a24c62
to
8714414
Compare
8714414
to
ccc6e5d
Compare
Already fixed. Just careless mistakes. |
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.
I did a code review and these changes make sense to me. I have not tested the PR though.
These changes are beneficial, because they consolidate the different behavior of Viewport.set_input_as_handled()
and Control.accept_event()
, which could be considered a bug.
While this is a change in behavior, I believe, that it is a minor change, that will not interfere with nearly all users.
Since it touches a core class, this PR would benefit from merging early in the dev cycle to get enough testing.
While the |
441b788
to
8e34520
Compare
8e34520
to
3249cd6
Compare
3249cd6
to
918b638
Compare
Moving a method up in the hierarchy can be a bit complicated and might need compatibility code, we'll see when CI has finished |
Control::accept_event
to Node
You will need to register compatibility methods, see here for instructions |
918b638
to
6da3069
Compare
OK. And why the PR's title is changed? Move this method is not the main thing this PR do. |
My recommendation would be to keep the two changes in two different pull requests. The change of moving |
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.
You also need to add to the API validation file
The move is the method is by far the most impactful change of this, it shouldn't be a footnote |
b686073
to
ccc6e5d
Compare
Control::accept_event
to Node
Viewport::gui.key_input_accepted
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 PR is again in its previous state, that I already had reviewed yesterday.
Viewport::gui.key_input_accepted
Viewport::gui.key_input_accepted
Thanks! And congrats for your first merged Godot contribution 🎉 |
Yay! |
Viewport::gui.key_input_accepted seems could be replaced by set_input_as_handled and is_input_handled, since all detections gui.key_event_accepted end up being set_input_as_handled