How to forward all input events? Or Multiplex them?

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

I’d like to get all the input events from a Control node, and pass them to another Node.

I’d like to avoid the X Y Problem (http://xyproblem.info), so here’s more specifically what I want:

A grid where each square is clickable, but also have the entire map able to be panned around. In addition, a GUI above this which intercepts clicks, but does not disallow dragging of the aforementioned grid while the cursor is above it (the GUI).

My attempted solution:
Put a Control node above the grid, which resizes with the grid. Grab all the events and pass them to the grid, but also “past” the grid (hence “multiplex” in the title), so the camera script can do panning (via _unhandled_event() )

Here is my current project: GitHub - voxelv/azr: godot test repo

in zip: https://github.com/voxelv/azr/archive/master.zip

:bust_in_silhouette: Reply From: volzhs

I presume that you use Control nodes to consist screen.
then, try to set Mouse > Filter to Pass instead of Stop

What do you mean by “consist screen”?

I’ve tried “Pass”, but it doesn’t seem to have any effect different from “Stop”.

voxelv | 2018-07-10 05:01

can you share a sample project, or show scene tree?

volzhs | 2018-07-10 06:34

Here is my current project: GitHub - voxelv/azr: godot test repo

in zip: https://github.com/voxelv/azr/archive/master.zip

to see my problem, try zooming with the mouse wheel while over the grid of white boxes. Also, the area can be panned with Middle Mouse dragging, but that also doesn’t work while over the grid of white boxes. Also, the big “TEST BUTTON IN GAME AREA” button does the same thing.

voxelv | 2018-07-13 06:21