Fixed messageboxes opened by the mp campaign setup UI not being shown until the UI is closed (e.g. shuttle & incompatible content package warnings), renamed MultiplayerCampaign -> MultiPlayerCampaign for consistency. See #315
This commit is contained in:
@@ -57,6 +57,7 @@ namespace Barotrauma
|
||||
private GUITickBox shuttleTickBox;
|
||||
|
||||
private CampaignUI campaignUI;
|
||||
private GUIComponent campaignSetupUI;
|
||||
|
||||
private Sprite backgroundSprite;
|
||||
|
||||
@@ -1111,7 +1112,11 @@ namespace Barotrauma
|
||||
{
|
||||
base.AddToGUIUpdateList();
|
||||
|
||||
if (jobInfoFrame != null)
|
||||
if (campaignSetupUI != null)
|
||||
{
|
||||
campaignSetupUI.AddToGUIUpdateList();
|
||||
}
|
||||
else if (jobInfoFrame != null)
|
||||
{
|
||||
jobInfoFrame.AddToGUIUpdateList();
|
||||
}
|
||||
@@ -1155,10 +1160,21 @@ namespace Barotrauma
|
||||
|
||||
if (campaignContainer.Visible && campaignUI != null)
|
||||
{
|
||||
//campaignContainer.Update((float)deltaTime);
|
||||
campaignUI.Update((float)deltaTime);
|
||||
}
|
||||
|
||||
if (campaignSetupUI != null)
|
||||
{
|
||||
if (!campaignSetupUI.Visible)
|
||||
{
|
||||
campaignSetupUI = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
campaignSetupUI.Update((float)deltaTime);
|
||||
}
|
||||
}
|
||||
|
||||
if (autoRestartTimer != 0.0f && autoRestartBox.Selected)
|
||||
{
|
||||
autoRestartTimer = Math.Max(autoRestartTimer - (float)deltaTime, 0.0f);
|
||||
@@ -1186,6 +1202,11 @@ namespace Barotrauma
|
||||
campaignUI.Draw(spriteBatch);
|
||||
}
|
||||
|
||||
if (campaignSetupUI != null)
|
||||
{
|
||||
campaignSetupUI.Draw(spriteBatch);
|
||||
}
|
||||
|
||||
if (playerFrame != null) playerFrame.Draw(spriteBatch);
|
||||
|
||||
GUI.Draw((float)deltaTime, spriteBatch, null);
|
||||
@@ -1254,7 +1275,7 @@ namespace Barotrauma
|
||||
{
|
||||
if (GameMain.Server != null)
|
||||
{
|
||||
MultiplayerCampaign.StartCampaignSetup();
|
||||
campaignSetupUI = MultiPlayerCampaign.StartCampaignSetup();
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1282,7 +1303,7 @@ namespace Barotrauma
|
||||
// -> don't select the mode yet and start campaign setup
|
||||
if (GameMain.Server != null && !campaignContainer.Visible)
|
||||
{
|
||||
MultiplayerCampaign.StartCampaignSetup();
|
||||
campaignSetupUI = MultiPlayerCampaign.StartCampaignSetup();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user