I have question about game UI. Im using only one Screen class in my game and for different "screens" Im using gamestates. My question is how to set stage with buttons (play button, pause button, restart button) with custom listeners for each state? for example my play button should have 2 different listeners. First of them start the game if gamestate = menu and second unpause game when gamestate = pause.
What should I do ? make one playButton with "if" operator for different game states? or make two different playButton? and what with table? add all the buttons to one table and clear table each time when game state is changing? or make a few tables?