Welcome to the forums @gargoyd!
How are the signals connected? Depending on how you have the signals connected, you may be able to "ignore" the signal if you triggered it manually through code.
For example, if the signal is connected to the button itself, you could try code like this in the button:
extends TexturedButton
var ignore_signal = false
func _ready():
connect("pressed", self, "on_button_pressed")
func on_button_pressed():
if (ignore_signal == true):
return
# do whatever needs to be done here!
print ("Button pressed")
Then in the script that makes the buttons toggled/pressed, you just need to do something like this:
# we'll assume the buttons are in variables named button_number
# (button_1, button_2, etc)
# we will assume button 2 was pressed
# first, we need to ignore any signals from the buttons
# so we can change them without extra code being called
button_1.ignore_signal = true
button_2.ignore_signal = true
button_3.ignore_signal = true
# process/change pressed as needed
button_1.pressed = true
button_2.pressed = false
button_3.pressed = true
# enable the signals again for the buttons
button_1.ignore_signal = false
button_2.ignore_signal = false
button_3.ignore_signal = false
That is one way you can handle it. Again, depending on how the signals are connected you may need to use a different method, but hopefully the code above gives an idea on how you may be able to selectively ignore the signal so you can change the properties manually.