I've looked at many Ruby examples of getting the room states ( room states = gosu's windows ) to work properly but I don't know enough Ruby apparently to port it over to C++. I'm trying to do something like:
roomHandler->thisRoom = new titleScreen ( gameName );
But actually getting roomHandler and thisRoom set up properly to do this is giving me a headache. I mean, I kind of got it, but the way I have it only works when that "room" is closed via the window X button and then the right right comes up. The ruby examples simply show the room state being set to the wanted window and nothing more.
If you are speaking of states as in benko's game, then the states are *not* Gosu::Windows, they are just objects which implement the same callbacks (draw, update, button_down, button_up), and the object forwards these calls to the current state. I hope I'm not answering the wrong question :)
There is only one window class in Zombie Soccarrr, StateWindow. It delegates all callbacks either to a Game or TitleScreen state. State itself is not derived from anything and exists just for the sake of convenience, it provides empty methods for all callbacks :)
I finally got it working. The main problem was that I was trying to take a game framework that I made for another library and trying to port it for Gosu. I thought Gosu and this library would be the same in a sense but I was a bit off. :D
thanks again.
TopicGosu / Gosu Exchange / Oi. Need help in C++ with setting up room states.[ FIXED ]