-
-
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
Move Control::accept_event
to Node::accept_event
#96989
base: master
Are you sure you want to change the base?
Move Control::accept_event
to Node::accept_event
#96989
Conversation
Control::accept_event
to Node
Control::accept_event
to Node
Control::accept_event
to Node::accept_event
00ee445
to
0dab014
Compare
You will need to add the following to the end of
|
26d25f2
to
4fa5762
Compare
You need to pull your upstream changes and then apply your new changes, you just erased the previous changes you had made (remember to push with |
4fa5762
to
0064559
Compare
<method name="accept_event"> | ||
<return type="void" /> | ||
<description> | ||
Stops the input from propagating further down the [SceneTree]. |
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.
Assuming it still is accurate, the new description is a bit too vague... or wrong? I noticed it's identical to Viewport's, but... hm. For example, I remember that the actual order is dependent on the current input step, it's not always "down".
Stops the input from propagating further down the [SceneTree]. | |
Stops the input event from propagating further in this node's viewport (see [method get_viewport]). This is equivalent to [method Viewport.set_input_as_handled] on this node's viewport. |
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.
Emm... I copy it from the Viewport::set_input_as_handled, since its behavior is the same as it. Is this means that the description in Viewport also need change?
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.
Doesn't have to be done in this PR
0064559
to
1ce9317
Compare
This comment was marked as resolved.
This comment was marked as resolved.
You used a merge commit to update your branch, please use rebase in the future instead, see here |
Since the method moves from a derived type ( I don't know if breaks compat for So if the compat method is not needed for C++ I'd just remove it. If the compat method is needed, we'll likely need to figure out a way to add it to cc @dsnopek |
It is needed and it is the way things have been done before, but there was several ones moved to the hashes in #96586 so might be worth doing that here too Edit: those were moved for different reasons though so unsure if it is valid here, and realized the cases I thought were moved were in fact changed differently, so don't know if we have any cases like this in the codebase at all |
4963a50
to
d6d2c4a
Compare
I remember a similar case in #68070, but it was merged for 4.0, so no compatibility functions were necessary. |
After #96867, the behavior of Control::accept_event and Viewport::set_input_as_handled will be the same. Control::accept_event could be a general way to handle input event, and replace get_viewport().set_input_as_handled() before in nodes except Control.