Prevent "pressed"-signal of a button to trigger _input(event) ?

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

Hello,

i have some code in the _input(event) function which triggers a “change of direction” of the player when i click/touch anywhere on the screen.
Now i also have a connected TextureButton-Signal “pressed” to call an item-functionality.
Problem is now that when i want use the item (press button) i also change the direction, but i don’t want that to happen. :wink:

Is there a way that the “pressed”-signal of the TextureButton does not trigger the _input(event) function?

What i’ve tried and works somehow is that i abort the rest of the functionality in _input(event) when the event is in position of the TextureButton. (both event-types are unfortunately “InputEventMouseButton” when clicking anywhere on the screen or pressing Button)
Is there a cleaner way of doing this?

Thank you in advance!