For future reference
Tbh, I’d approach the whole thing slightly differently. I’d make it less rigid, more modular.
Consider the following:
- create a new widget that has a button and text inside
- each pawn creates and stores a reference to its own button widget
- when the game starts, pawns add their buttons to a panel (bottom right corner)
The reasoning behind this appraoch:
- this way each Pawn has direct access to its own button and each button can talk back directly to the Pawn
- if you ever want to modify the way the buttons look or behave, you do not need to do it 12 times (since the button is a separate widget now)
- you can have as many or as few Pawns as you want
- each button can have a fancy animation / additional functionality if needed