I have a widget (Called ExitOptions_MENU) set to show on the screen when the player hits the ESCAPE key, that part works. If the user selects the OPTIONS button on that widget it then shows a separate widget (called BL_Widget). But if the user presses the ECAPE key again the EXIT_OPTIONS widget shows on top of the BL_Widget. So I added in a ESCAPE key command so if the user does press the ESCAPE key it will make the EXIT_OPTIONS widget HIDDEN. If I click the BACK button on the BL_Widget it then shows the EXIT_OPTIONS widget, which is fine. The problem is once I click the RESUME button on the EXIT_OPTIONS Widget and go back to the level if I press the ESCAPE key again the EXIT_OPTIONS widget doesnt show on screen.
I think you have the logic a little wrong. It comes from try to ‘patch’ the problem
Rather than using the ESC key to open a specific menu, maybe think of it as a ‘back’ button. To handle that, the ESC key needs an array of widgets.
When you press a menu button, the code closes ( or hides ) all widgets, and opens the next one, putting its reference on the end of the array.
When you use ESC, the code closes the current menu, and remove its reference. If the array is empty, go back to the game, otherwise show the next menu on the end of the array.
Like that…