How to use unhandled input with UI overlay

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By RoniPerson

I use a texturerect as semi transparent overlay for my game. It is nested inside of a MarginContainer. I also use a singelton with _unhandled_input to detect swipe. The problem is that _unhandled_input don’t fire when the overlay is active. Is there a option for not handling input in ui ellements?

Is there a reason your singleton uses _unhandled_input instead of _input?

Bernard Cloutier | 2020-10-07 17:09

I would assume it’s so that the game doesn’t respond to inputs that other nodes should have handled.

exuin | 2020-10-08 03:23

:bust_in_silhouette: Reply From: exuin

Set mouse_filter to ignore on the control nodes that you don’t want eating the inputs.