Topic was automatically imported from the old Question2Answer platform.
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() )
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.