mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 03:18:37 +08:00
Clarify direction of input event propagation
This commit is contained in:
parent
8c435a343e
commit
2d0a55c86c
@ -38,7 +38,7 @@
|
||||
<argument index="0" name="event" type="InputEvent">
|
||||
</argument>
|
||||
<description>
|
||||
The node's parent forwards input events to this method. Use it to process and accept inputs on UI elements. See [method accept_event].
|
||||
Use this method to process and accept inputs on UI elements. See [method accept_event].
|
||||
Replaces Godot 2's [code]_input_event[/code].
|
||||
</description>
|
||||
</method>
|
||||
|
@ -50,7 +50,7 @@
|
||||
<argument index="0" name="event" type="InputEvent">
|
||||
</argument>
|
||||
<description>
|
||||
Called when there is an input event. The input event propagates through the node tree until a node consumes it.
|
||||
Called when there is an input event. The input event propagates up through the node tree until a node consumes it.
|
||||
It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input].
|
||||
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
|
||||
For gameplay input, [method _unhandled_input] and [method _unhandled_key_input] are usually a better fit as they allow the GUI to intercept the events first.
|
||||
@ -93,7 +93,7 @@
|
||||
<argument index="0" name="event" type="InputEvent">
|
||||
</argument>
|
||||
<description>
|
||||
Propagated to all nodes when the previous [InputEvent] is not consumed by any nodes.
|
||||
Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
|
||||
It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input].
|
||||
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
|
||||
For gameplay input, this and [method _unhandled_key_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
|
||||
@ -105,7 +105,7 @@
|
||||
<argument index="0" name="event" type="InputEventKey">
|
||||
</argument>
|
||||
<description>
|
||||
Propagated to all nodes when the previous [InputEventKey] is not consumed by any nodes.
|
||||
Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it.
|
||||
It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input].
|
||||
To consume the input event and stop it propagating further to other nodes, [method SceneTree.set_input_as_handled] can be called.
|
||||
For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first.
|
||||
|
Loading…
Reference in New Issue
Block a user