Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | kdominik |
Hello,
I have a Node2D as root with the following nodes as children:
- TextureButton A
- TextureButton B (positioned in the center of the screen)
- Area2D (with Sprite and CollisionShape2D as children)
If TextureButton A gets pressed, the Area2D is set to visible and gets drawn on top of the TextureButton B. But if I click on the center of the Area2D the TextureButton B below still gets triggered. I want to prevent this and just can’t figure out how to do this properly.
I have a script attached to the root node of the scene and could easily disable this button, if the TextureButton B gets pressed, but I believe there is a better method.
I would be very grateful, if anyone could give me a hint.
Thank you very much.