Is it possible not to stop the propagation of input event when gui catches it?

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

Currently I’m making a live2D software. I use a VSeparator to manage my ui panels. And I use Area2D nodes to make interactive vertices ,edges and faces of the mesh. While the problem is, if I want the VSeparator node to work, it must catch input in the gui input stage. But since it takes the whole screen area, it stops the input propagation at this stage, even if I set mouse filter to pass(I guess that pass mode passes input events only at gui stage, but will eventually be stopped at the end of this stage, even if no other Control nodes stops it). And the Area2D nodes, which process input at the collision stage later, will not receive any inputs then.

I tried to solve it by set VSeparator mouse filter to ignore, and it acctually works. But VSeparator can not be dragged anymore. I wonder if there’s a way to not stop the input event as well as catch it in the gui nodes.

SOLUTION:
Finally I find a solution. Not in an efficient way but easy and works perfectly. I attached script as below to the HSplitContainer( which I mistakenly wrote as VSeparator above. sorry for that). In the _input method. If it finds the input not touching its separator handle(equivalent to touching any of its child), neither it’s being dragged, it sets mouse filter to ignore. Otherwise it sets to stop.

:bust_in_silhouette: Reply From: Inces

mouse filter Pass should definetely work. Make sure all children of Vspeparator and their subscenes all have mouse filter to pass. Ensure You dont set input as handled anywhere in GUI code. If You can’t find what is blocking input, You always can use normal Input_event for your operator, instead of _unhandled_input

The input was blocked when I set mouse filter to pass, and passed through when I simply change it to ignore. Also I don’t find any other node blocks the input. It’s wired. The reason I can’t use normal _input method is that I’m dealing with collision objects. They catch mouse event in _input_event method which, as far as I know, always called in the end.

SanSeiU | 2022-02-23 07:16

Ah I see, this input is consumed all the time by GUI. You could parse_input_event()i guess, using duplicated input consumed by GUI. But I believe it would be better to design some conditions when GUI is focused and can be dragged, and when user can concentrate on interaction with program. Like some small handle for dragging. I don’t know how You imagine whole system to work, but I have intuition, that user may have trouble controlling both fullscreen drag and mesh with similar mouse motion.

Inces | 2022-02-23 10:19

OK, I finally figured out a solution. I added a script to the HSplitContainer(I mistakenly called it VSeparator). There’s a separator handle between the children panels. Now it will ignore inputs when the mouse only on its children, which could be considered as a condition you mentioned above. parse_input_event() causes stack overflow, because I don’t know how to duplicate an event that escapes gui’s capture. The final gui design may have a blender-like style.

Thank you for answering.

SanSeiU | 2022-02-23 15:33