public override void HandleInput(bool receivedFocusInThisUpdate) { base.HandleInput(receivedFocusInThisUpdate); if (MyInput.Static.IsNewKeyPressed(MyKeys.Escape)) { MyGuiAudio.PlaySound(MyGuiSounds.HudMouseClick); MyGuiScreenMainMenu.AddMainMenu(); } }
public override void HandleInput(bool receivedFocusInThisUpdate) { base.HandleInput(receivedFocusInThisUpdate); if (MyInput.Static.IsNewKeyPressed(MyKeys.Escape)) { MyGuiAudio.PlaySound(MyGuiSounds.HudMouseClick); MyGuiSandbox.AddScreen(MyGuiSandbox.CreateScreen(MyPerGameSettings.GUI.MainMenu)); } }