From 85d5af180b3d816c1826d33880f4778f55afe820 Mon Sep 17 00:00:00 2001 From: Serhii Snitsaruk Date: Sat, 10 Aug 2024 15:01:43 +0200 Subject: [PATCH] Clarify add_event_handler in docs --- doc/source/classes/class_limbostate.rst | 2 +- doc_classes/LimboState.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/classes/class_limbostate.rst b/doc/source/classes/class_limbostate.rst index ab66183..39ab51d 100644 --- a/doc/source/classes/class_limbostate.rst +++ b/doc/source/classes/class_limbostate.rst @@ -276,7 +276,7 @@ Registers a ``handler`` to be called when ``event`` is dispatched. The handler f func my_event_handler(cargo=null) -> bool: -Cargo is an optional parameter that can be passed to the handler. See also :ref:`dispatch`. +If the handler returns ``true``, the event will be consumed. Cargo is an optional parameter that can be passed to the handler. See also :ref:`dispatch`. .. rst-class:: classref-item-separator diff --git a/doc_classes/LimboState.xml b/doc_classes/LimboState.xml index a215d31..dee6f47 100644 --- a/doc_classes/LimboState.xml +++ b/doc_classes/LimboState.xml @@ -45,7 +45,7 @@ [codeblock] func my_event_handler(cargo=null) -> bool: [/codeblock] - Cargo is an optional parameter that can be passed to the handler. See also [method dispatch]. + If the handler returns [code]true[/code], the event will be consumed. Cargo is an optional parameter that can be passed to the handler. See also [method dispatch].