(d5ea3c7d5) Merge branch 'dev' of https://github.com/Regalis11/Barotrauma-development into dev
This commit is contained in:
@@ -56,7 +56,7 @@ namespace Barotrauma
|
||||
private static List<GUIMessage> messages = new List<GUIMessage>();
|
||||
private static Sound[] sounds;
|
||||
private static bool pauseMenuOpen, settingsMenuOpen;
|
||||
private static GUIFrame pauseMenu;
|
||||
public static GUIFrame PauseMenu { get; private set; }
|
||||
private static Sprite arrow, lockIcon, checkmarkIcon, timerIcon;
|
||||
|
||||
public static KeyboardDispatcher KeyboardDispatcher { get; set; }
|
||||
@@ -561,7 +561,7 @@ namespace Barotrauma
|
||||
|
||||
if (pauseMenuOpen)
|
||||
{
|
||||
pauseMenu.AddToGUIUpdateList();
|
||||
PauseMenu.AddToGUIUpdateList();
|
||||
}
|
||||
if (settingsMenuOpen)
|
||||
{
|
||||
@@ -1420,9 +1420,9 @@ namespace Barotrauma
|
||||
|
||||
if (pauseMenuOpen)
|
||||
{
|
||||
pauseMenu = new GUIFrame(new RectTransform(Vector2.One, Canvas), style: null, color: Color.Black * 0.5f);
|
||||
PauseMenu = new GUIFrame(new RectTransform(Vector2.One, Canvas), style: null, color: Color.Black * 0.5f);
|
||||
|
||||
var pauseMenuInner = new GUIFrame(new RectTransform(new Vector2(0.13f, 0.3f), pauseMenu.RectTransform, Anchor.Center) { MinSize = new Point(200, 300) });
|
||||
var pauseMenuInner = new GUIFrame(new RectTransform(new Vector2(0.13f, 0.3f), PauseMenu.RectTransform, Anchor.Center) { MinSize = new Point(200, 300) });
|
||||
|
||||
var buttonContainer = new GUILayoutGroup(new RectTransform(new Vector2(0.85f, 0.85f), pauseMenuInner.RectTransform, Anchor.Center))
|
||||
{
|
||||
|
||||
@@ -200,6 +200,9 @@ namespace Barotrauma
|
||||
{
|
||||
public static bool CloseHUD(Rectangle rect)
|
||||
{
|
||||
// Always close when hitting escape
|
||||
if (PlayerInput.KeyHit(Microsoft.Xna.Framework.Input.Keys.Escape)) { return true; }
|
||||
|
||||
//don't close when the cursor is on a UI element
|
||||
if (GUI.MouseOn != null) return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user