(a13c74ce0) Fixed: Loading screen dismissable & escape usable when the game is not active

This commit is contained in:
Joonas Rikkonen
2019-05-23 15:10:38 +03:00
parent 1cd47a351e
commit 827f54fcff
2 changed files with 25 additions and 25 deletions
@@ -618,7 +618,7 @@ namespace Barotrauma
GameMain.ResetFrameTime();
if (TitleScreen.LoadState >= 100.0f &&
(!waitForKeyHit || PlayerInput.GetKeyboardState.GetPressedKeys().Length>0 || PlayerInput.LeftButtonClicked()))
(!waitForKeyHit || ((PlayerInput.GetKeyboardState.GetPressedKeys().Length > 0 || PlayerInput.LeftButtonClicked()) && WindowActive)))
{
loadingScreenOpen = false;
}
@@ -637,7 +637,7 @@ namespace Barotrauma
{
SoundPlayer.Update((float)Timing.Step);
if (PlayerInput.KeyHit(Keys.Escape))
if (PlayerInput.KeyHit(Keys.Escape) && WindowActive)
{
// Check if a text input is selected.
if (GUI.KeyboardDispatcher.Subscriber != null)