Is the pause menu a separate layout then? If the pause menu loads in front of the current layout then you're already on it so I'm going to assume the pause menu loads on a different layout. Just give each layout a 'key' or global variable so level 1 is 1, level 2 is 2. Every time you pause it sets the key depending on what level you're playing. Then when you unpause it checks the key variable and if it is 1, it returns to level 1 etc. So in short : use a global variable : P