Can nodes/scenes be interacted with inside a control container?

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

I’m currently building a top down world, and I thought it would be a nice feature to drag and drop buildings from within a GUI onto a tilemap. However it appears that whenever my mouse is within a control, be it the general class, or any variant, It seems to block _on_Area2D_input_events. On the face of things it kinda makes sense, Your “GUI” should be in front of everything, chaos would reign if you were also interacting with a bunch of stuff you couldn’t even see behind the buttons you’re clicking. But I would’ve thought layers would take care of that, even when I fill a control container with nodes, I don’t seem to be able to interact with anything but control objects. This seems to completely throw out any possibility of… let’s say drag something out of an inventory and throw it on the floor.

Is there any way to make something like this work? Or should these two systems never mix?

:bust_in_silhouette: Reply From: sash-rc

For GUI elements there’s a mouse_filter property which affects a mouse capture mode for every control.

Ewww, after tinkering around with that I can definitely verify that setting it to ignore will allow you to interact with area2D, but it seems like that field solely acts on what control fields are overlapping the area2D you’re trying to click on.

What I’m trying to do is if I have a tree like this

— scroll container
------ container
-------- building (Node I want to drag out of the container)

I’m looking for a way to interact with “building” but not with any other buildings that may be outside of that tree.

Cody Sass | 2020-12-30 01:49