Can anyone show me the correct way to Pause/Resume and Application and Reset it, all from within the App?
I thought this was the way to Reset:
But that did not work for me. If Panda has no true Pause and Resume functionality, then I guess you would have to create your own Pause and Resume. That would take some work because you would have to freeze the state of everything as is, then allow it all to flow again.
You can’t just drop the frame rate to 0; wouldn’t that also stop key strokes from registering?
I just define a ‘pause’ class to drop into when the pause key is pressed. This class dims the screen and just loops until the pause key is hit again.
Might not be the best way to do this though.
Is there a way to store the App’s fps in a varable without show or displaying the fps?
I just need to get the current fps value.
I figured this out. I just had to land on the right API reference page for it.
You have to take care of pause and resume yourself.
I do the job by having a DirectOject for everything that moves things around or recieves keys. When pause is invoked, I iterate through all those DOs and remove all tasks storing them in a list for reactivation. Keystrokes can be deactivated as easy as DO.ignoreAll()
Alternatively you can play around with task chains and framebudget=0. Search the forums for that keywords and you should find something usable.
What about restarting the Appliction from codes…? Or do you have to do it the painful way of cleaning up everything and restoring all variables and so one…bringing the App to a restart state?