Merge pull request #952 from mnemotic/mnemotic-gui-events

Make a note about GUI events bubbling up
This commit is contained in:
Rémi Verschelde
2018-01-08 14:08:16 +01:00
committed by GitHub
2 changed files with 6 additions and 1 deletions
+1
View File
@@ -5,6 +5,7 @@ __pycache__
*.pyc
*~
.directory
.vscode/
# Finder (MacOS) makes these automatically.
.DS_Store
+5 -1
View File
@@ -41,7 +41,11 @@ received input, in order:
"input_event" will be emitted (this function is re-implementable by
script by inheriting from it). If the control wants to "consume" the
event, it will call :ref:`Control.accept_event() <class_Control_accept_event>` and the event will
not spread any more.
not spread any more. Events that are not consumed will propagate **up**,
to :ref:`Control <class_Control>`'s ancestors. Use :ref:`Control.mouse_filter <class_Control_mouse_filter>`
property to control whether a :ref:`Control <class_Control>` is notified
of mouse events via :ref:`Control._gui_input() <class_Control__gui_input>`
callback, and whether these events are propagated further.
3. If so far no one consumed the event, the unhandled input callback
will be called if overriden (and not disabled with
:ref:`Node.set_process_unhandled_input() <class_Node_set_process_unhandled_input>`).