From 245ace6e2e8c81909bbeae3e6f191932ab24815b Mon Sep 17 00:00:00 2001 From: Saggi Mizrahi Date: Thu, 16 Mar 2017 18:52:50 +0200 Subject: Add the option to check if input was handled When working with a viewport you should call Viewport.input() to pass the input, but if the input was unhandled you might also want to call Viewport.unhandled_input() so that objects in the sub-scene can handle the event. This adds a way to check if the input was handled so that you know whether you should call Viewport.unhandled_input() or not. Signed-off-by: Saggi Mizrahi --- scene/main/scene_main_loop.h | 1 + 1 file changed, 1 insertion(+) (limited to 'scene/main/scene_main_loop.h') diff --git a/scene/main/scene_main_loop.h b/scene/main/scene_main_loop.h index fadf77e30f..47220b9b63 100644 --- a/scene/main/scene_main_loop.h +++ b/scene/main/scene_main_loop.h @@ -350,6 +350,7 @@ public: void quit(); void set_input_as_handled(); + bool is_input_handled(); _FORCE_INLINE_ float get_fixed_process_time() const { return fixed_process_time; } _FORCE_INLINE_ float get_idle_process_time() const { return idle_process_time; } -- cgit v1.2.3