I have 26 buttons (A..Z in the alphabet).
I want to connect them to a function so that when any button is pressed, the value of the text of the button is added to an array. In other words, I press the A button and the "A" of the text value is added to an array.
This question is about connections and functions though.
So I've started a test with my first three buttons by doing this:
#make the button connections
get_node("Input/Button").connect("released", self, "_on_Button_released")
get_node("Input/Button1").connect("released", self, "_on_Button_released")
get_node("Input/Button2").connect("released", self, "_on_Button_released")
The function onButton_released is as such for now for testing purposes:
Currently the print outputs
[Node572] no matter which of the three buttons I press.
What I'm trying to do is to to pass the button ID (or some such identifier) to the function
_on_Button_released so that it can then process the text of that button.
Am I going about this the best way? I am new to it all and am a little stumped.
Thanks a tonne... Rob