Filtering click on gui and go. Event Propagation (SOLVED)

I have a game object with actions by click. In some places above GO I have a gui elements. How to stop event propogonation after detect clicking in gui? Or maybe some workarounds?

How this looks (i clicked to button and trees also react):

1 Like

You need to indicate that the input is consumed by returning true in the on_input() function that handles the action (in this case your button). Check the Input manual and the section named Consuming Input.

3 Likes

I missed this feature in docs, thank you!

1 Like

@sicher: We should make a note of this in the on_input() API reference

3 Likes

Yes, definitely!

2 Likes