Godot Version
4.7.2
Question
I have an issue while trying to make a simple popup system. The goal is to close the popup if anywhere on the screen is clicked besides the visual popup itself.
I tried doing that my making the parent control take up the whole space and set it to Mouse → Filter → Pass and the visual container itself to stop the mouse inputs.
And I have a little script in the root of this scene that connects to the gui_input signal to try and catch that input outside of the visual popup.
func _on_gui_input(event: InputEvent) -> void:
print(event)
if Input.is_action_just_pressed("lmb_click"):
if self.visible:
self.visible = false
But with this setup, I basically get nothing. I don’t get anything printed out if I have the popup open, the only real thing happening is the visuals of the popup actually stopping the mouse input, but anything outside of it gets picked up by other GUI but doesn’t trigger gui_input. I also tried to do it via the _gui_input() function but it yielded the same results.
I am not sure what is causing this behavior or if I am misunderstanding how this should work, I have a vague feeling about this being related to Behavior Recursive option but playing around it didn’t yield much results, and I didn’t fully understand it from reading the docs.

