...but remember, making top layer visible will not deactivate what's beneath it. If you have some buttons or thing that can be pressed/activated by mouse or keyboard they will be still functional.
Saying this because i did that one time :/ and was wandering why all this crazy stuff going on while my "Game over" screen is visible... sad but true story ;)