Hopefully someone has a more elegant solution to this problem other than the kind of hack I currently have in mind
The default behaviour on use of the escape key is to bring up the "mainmenu" - this works fine, and I am able to adjust it where necessary, specifically during window operations where I can change the mode of the window to exclusive to trap the escape keystroke.
However I have this situation. The game is making extensive use of windows to provide specific interfaces within scenes. So I have the circumstance where I load an ingame window and if I then press escape, I bring up the main menu all well and good, including if I select resume the ingame window is then revealed. However the mainmenu has an option which is tutorial - this takes user to a new scene - and the ingame is revealed.
The use of the exclusive attribute is an option, but the problem with this is that it does not allow for the interaction with scene objects.
Given that there could be n number of ingame windows the option of testing to see where the window is active and de-activating prior to the tutorial load is not one I really want to follow.
So my thoughts are as follows
1. To amend the escape key code so that windows are unloaded as part of that sequence or alternatively creating a routine which is able to test any number of windows and if they don't meet certain conditions unload them.
2. Anyone has any better ideas - they would be gratefully received