Beginner Question About Button Layering
Posted: Wed Nov 15, 2023 4:25 am
Hi,
I have a simple test scene (image attached) -- some parent nodes and two touch screen buttons.
I have one large touchscreen button (the highlighted green block taking up almost entire viewport - just as a test) and a smaller touch screen button on top (in red with the icon svg image).
What I want to happen is when you click the smaller (red) button (layered on top) I do not want the click to pass thru to the larger (green) button (layered underneath) but you can see in the output both buttons fire off anytime I only click on the smaller button.
I already tried setting the "Mouse > Filter > Stop" to prevent propagation on both buttons but nothing is working.
Just to give you more background on this simple scene - I am connecting both touchscreen buttons using "pressed" signals (top right side Node tab - next to the inspector tab) to methods that target the main control node (at the very top of the scene tree).
I swear I tried looking this up online and in the help docs but I found nothing.
any help would be greatly appreciated.
kind regards,
SF
I have a simple test scene (image attached) -- some parent nodes and two touch screen buttons.
I have one large touchscreen button (the highlighted green block taking up almost entire viewport - just as a test) and a smaller touch screen button on top (in red with the icon svg image).
What I want to happen is when you click the smaller (red) button (layered on top) I do not want the click to pass thru to the larger (green) button (layered underneath) but you can see in the output both buttons fire off anytime I only click on the smaller button.
I already tried setting the "Mouse > Filter > Stop" to prevent propagation on both buttons but nothing is working.
Just to give you more background on this simple scene - I am connecting both touchscreen buttons using "pressed" signals (top right side Node tab - next to the inspector tab) to methods that target the main control node (at the very top of the scene tree).
I swear I tried looking this up online and in the help docs but I found nothing.
any help would be greatly appreciated.
kind regards,
SF