Moved some UI element updates from draw to update
This commit is contained in:
@@ -472,12 +472,12 @@ namespace Barotrauma
|
|||||||
{
|
{
|
||||||
if (pauseMenuOpen)
|
if (pauseMenuOpen)
|
||||||
{
|
{
|
||||||
pauseMenu.Update(0.016f);
|
pauseMenu.Update(deltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (settingsMenuOpen)
|
if (settingsMenuOpen)
|
||||||
{
|
{
|
||||||
GameMain.Config.SettingsFrame.Update(0.016f);
|
GameMain.Config.SettingsFrame.Update(deltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GUIMessageBox.MessageBoxes.Count > 0)
|
if (GUIMessageBox.MessageBoxes.Count > 0)
|
||||||
|
|||||||
@@ -317,19 +317,15 @@ namespace Barotrauma
|
|||||||
|
|
||||||
if (gameMode != null) gameMode.Update(deltaTime);
|
if (gameMode != null) gameMode.Update(deltaTime);
|
||||||
if (Mission != null) Mission.Update(deltaTime);
|
if (Mission != null) Mission.Update(deltaTime);
|
||||||
|
if (infoFrame != null) infoFrame.Update(deltaTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Draw(SpriteBatch spriteBatch)
|
public void Draw(SpriteBatch spriteBatch)
|
||||||
{
|
{
|
||||||
//guiRoot.Draw(spriteBatch);
|
|
||||||
infoButton.Draw(spriteBatch);
|
infoButton.Draw(spriteBatch);
|
||||||
|
|
||||||
if (gameMode != null) gameMode.Draw(spriteBatch);
|
if (gameMode != null) gameMode.Draw(spriteBatch);
|
||||||
if (infoFrame != null)
|
if (infoFrame != null) infoFrame.Draw(spriteBatch);
|
||||||
{
|
|
||||||
infoFrame.Update(0.016f);
|
|
||||||
infoFrame.Draw(spriteBatch);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Save(string filePath)
|
public void Save(string filePath)
|
||||||
|
|||||||
@@ -284,6 +284,8 @@ namespace Barotrauma.Networking
|
|||||||
{
|
{
|
||||||
if (ShowNetStats) netStats.Update(deltaTime);
|
if (ShowNetStats) netStats.Update(deltaTime);
|
||||||
if (settingsFrame != null) settingsFrame.Update(deltaTime);
|
if (settingsFrame != null) settingsFrame.Update(deltaTime);
|
||||||
|
if (log.LogFrame != null) log.LogFrame.Update(deltaTime);
|
||||||
|
|
||||||
|
|
||||||
if (!started) return;
|
if (!started) return;
|
||||||
|
|
||||||
@@ -1316,7 +1318,6 @@ namespace Barotrauma.Networking
|
|||||||
}
|
}
|
||||||
else if (log.LogFrame!=null)
|
else if (log.LogFrame!=null)
|
||||||
{
|
{
|
||||||
log.LogFrame.Update(0.016f);
|
|
||||||
log.LogFrame.Draw(spriteBatch);
|
log.LogFrame.Draw(spriteBatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user