diff --git a/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs b/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs index 08468d81f..0e32aa346 100644 --- a/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs +++ b/Barotrauma/BarotraumaClient/Source/GUI/GUI.cs @@ -1,4 +1,4 @@ -using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Content; using Microsoft.Xna.Framework.Graphics; using System; @@ -427,12 +427,15 @@ namespace Barotrauma ScreenOverlayColor, true); } - if (GameMain.DebugDraw) + if (GameMain.ShowFPS || GameMain.DebugDraw) { - DrawString(spriteBatch, new Vector2(10, 10), + DrawString(spriteBatch, new Vector2(10, 10), "FPS: " + (int)GameMain.FrameCounter.AverageFramesPerSecond, Color.White, Color.Black * 0.5f, 0, SmallFont); + } + if (GameMain.DebugDraw) + { DrawString(spriteBatch, new Vector2(10, 25), "Physics: " + GameMain.World.UpdateTime, Color.White, Color.Black * 0.5f, 0, SmallFont); diff --git a/Barotrauma/BarotraumaClient/Source/GameMain.cs b/Barotrauma/BarotraumaClient/Source/GameMain.cs index 16dbcd0c8..2e6deadeb 100644 --- a/Barotrauma/BarotraumaClient/Source/GameMain.cs +++ b/Barotrauma/BarotraumaClient/Source/GameMain.cs @@ -1,4 +1,4 @@ -using Barotrauma.Networking; +using Barotrauma.Networking; using Barotrauma.Particles; using FarseerPhysics; using FarseerPhysics.Dynamics; @@ -14,6 +14,7 @@ namespace Barotrauma { class GameMain : Game { + public static bool ShowFPS = true; public static bool DebugDraw; public static FrameCounter FrameCounter;