Damm i deleted an esential function lol.
when u look at my code i only explain the gui clearing for the game but i'm using a second scene manager for the menu as well and u can pause each one individualy and it will be stored in memory for fast access.
How are people implementing "pause" menus?
-
Quall.
I just created a state manager, simular to that on the previus page. However, I use pointers.
I have an abstract class a bunch derived from it. The class's have a "play", "pause", and "update" method.
I then have 2 pointers...lastState and currentState.
Whenever I change states..
I have an abstract class a bunch derived from it. The class's have a "play", "pause", and "update" method.
I then have 2 pointers...lastState and currentState.
Whenever I change states..
Code: Select all
changestate(State *t)
lastState=currentState;
currentState = t;
lastState->pause(); // pause the last state
currentState->update(); //update the scene to the screen before you unpause it.
currentState->play(); //play this state