(3bb856c81) Open the pause menu when the window loses focus instead of just temporarily pausing the game

This commit is contained in:
Joonas Rikkonen
2019-05-06 11:35:12 +03:00
parent 192159811c
commit 7559fc3d7c
4 changed files with 300 additions and 55 deletions
@@ -647,9 +647,10 @@ namespace Barotrauma
paused = (DebugConsole.IsOpen || GUI.PauseMenuOpen || GUI.SettingsMenuOpen || Tutorial.ContentRunning) &&
(NetworkMember == null || !NetworkMember.GameStarted);
#if !DEBUG
if (NetworkMember == null && !WindowActive && Config.PauseOnFocusLost)
#if !DEBUG || true
if (NetworkMember == null && !WindowActive && !paused && true && Screen.Selected != MainMenuScreen)
{
GUI.TogglePauseMenu();
paused = true;
}
#endif