I am trying to pass a callback in a structure, how can I do this?
In my game I have a bunch of selectable items, each have different sets of actions that can be performed on them. I want a generic way for UI to gather this information and construct a button for each action present in the currently selected item.
I was hoping I could somehow use an array of structures that contain both: information how the button looks, and callback to the item itself to execute an event when that button is clicked.