I'm trying to populate a list of selectable classes for the player. Each is represented by data in a Resource. So far so good for displaying things.
But if I make the displays have a button, and want to "send" the displayed class via the pressed signal, I run into trouble. I found a handy template for how the syntax should work on StackExchange that goes like this:
object.signal_name.connect(method_name.bind([extra, arguments]))
But the ClassSelectMenu, who is populating the ClassDisplay buttons and assigning them a resource, does not HAVE the extra arguments. They will be coming from the ClassDisplay - so I run into an error. It seems to bind anything, I have to use a member of the script that's doing the binding, which isn't what I want. I want to tell the method connecting to pressed to expect an extra argument.
I'd appreciate if anyone can help me understand this.
Thank you for reading!