From 172c6c615e2a15a73ccbb1a8aa846513ab1010cb Mon Sep 17 00:00:00 2001 From: Mel Collins Date: Sun, 26 Aug 2018 15:09:20 +0200 Subject: [PATCH] Clarify direction of input event propagation (cherry picked from commit 2d0a55c86cc29b72d2055217218d6f2c8399a4ef) --- doc/classes/Control.xml | 2 +- doc/classes/Node.xml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 0f8367906a9..44b0aeb1078 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -32,7 +32,7 @@ - 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]. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 46112d75855..74f1cc69547 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -44,7 +44,7 @@ - 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. @@ -87,7 +87,7 @@ - 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. @@ -99,7 +99,7 @@ - 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.