Godot Version
Question
The following function is called when the button is pressed:
func return_card_to_hand(card: TextureButton) -> void:
var new_card = card.duplicate()
cards.add_child(new_card)
new_card.visible = true
new_card.pressed.connect(new_card.dumb)
new_card.mouse_entered.connect(new_card._on_cards_mouse_entered)
new_card.mouse_exited.connect(new_card._on_cards_mouse_exited)
cards.cards_in_hand.append(new_card)
cards.redraw_cards()
print("is_connected:")
print(new_card.pressed.is_connected(new_card.dumb))
func dumb():
print("dumb")
The log says:
is_connected:
true
But “dumb” is not printed when the button is pressed.
It’s probably something, well, dumb.
But the problem is both _on_cards_mouse_entered() and _on_cards_mouse_exited() are connected and working properly.
And they seem to me identical…?
It’s driving me insane.
//Thanks for any help in advance.