I am having a strange issue with a pause function I created, I uploaded a quick MFA I made to show this problem if anyone could help me figure this one out!
The main frame contains a sub app which is where the entire game would be played (done to implement integer scaling based on user's resolution and screen size to keep the pixel art looking crisp).
So there is a flag, on an active in the main frame called "Pauser". When the flag is set, the sub app pauses and hides, and layer 2 of the main frame (would be the pause menu) appears. When the flag is not set, the sub app resumes and shows itself again, and layer 2 hides.
It's working fine but...
There is a delay in resuming the sub app when after pausing and unpausing (flag = 0), which lasts for exactly the amount of time the game is paused (flag = 1).
If you check out the MFA, run it with f8 not f7. G pauses, 1-4 sets window size.
So in this case, I push G, the pause screen happens. If I leave it on there for 5 seconds, then push G to unpause, there is a 5 second wait until the sub app resumes. I added a moving object to observe this delay.
I can't see a reason for this, but maybe one of you guys can.
Thanks for any advice!