Hello All,
I’m fleshing out the basics of my current game project. It’s an RTS style game and I want to have the GUI have buttons for the actions the player can perform. As the game progresses, or unit selections change, different actions will be available at any given moment.
I want to display the actions, as a small image and action name, in a grid pattern. If this were swing, I’d just use panels of equal width, and a flow layout and add them, the flow layout would then fill the top row first and move down a row when it was full. Is there a way to do this with Nifty, or will I have to make a new panel element for every full row and lay it out myself?
Also is there a way to pass an object through to an element? I need a way to get the action from the button that the player clicks, At the moment I plan to use the name of the action to look up the action, but if there’s a way to attach the action directly I would prefer it.