IRC channel - server: waelisch.de channel: #wme (read more)
on "Keypress"{global AllowEscape;if(AllowEscape == null) { AllowEscape = true; } // on Esc or F1 keyif(AllowEscape == true && (Keyboard.KeyCode==VK_ESCAPE || Keyboard.KeyCode==VK_F1)) { // load and display the main menu window WinCaption.Visible = false; var WinMainMenu = Game.LoadWindow("interface\system\mainmenu.window"); WinMainMenu.Center(); WinMainMenu.GoSystemExclusive(); Game.UnloadObject(WinMainMenu); }}
var VK_F1 = 112;var VK_ESCAPE = 27;