(e4064088d) Close in-game interfaces when pressing esc. Currently only registered when the mouse is over the interface. Originally I intended to make it so that pressing esc always closes the open interface. But let's test this.

This commit is contained in:
Joonas Rikkonen
2019-03-29 17:23:05 +02:00
parent 817a6100d7
commit ce2131df42
2 changed files with 5 additions and 1 deletions
@@ -601,8 +601,9 @@ namespace Barotrauma
{
((GUIMessageBox)GUIMessageBox.VisibleBox).Close();
}
else // Otherwise toggle pausing.
else if (GUI.MouseOn == null && Inventory.SelectedSlot == null && CharacterHealth.OpenHealthWindow == null)
{
// Otherwise toggle pausing, unless another window/interface is open.
GUI.TogglePauseMenu();
}
}