(3851196d8) Show the campaign disclaimer when entering the New Game or Tutorials tab for the first time.

This commit is contained in:
Joonas Rikkonen
2019-04-26 11:15:37 +03:00
parent e1924f517f
commit fa25735e9f
10 changed files with 85 additions and 21 deletions
@@ -1,4 +1,4 @@
/*using System.Collections.Generic;
using System.Collections.Generic;
using System.Xml.Linq;
using System;
using Microsoft.Xna.Framework;
@@ -9,11 +9,6 @@ namespace Barotrauma.Tutorials
{
class ContextualTutorial : Tutorial
{
public ContextualTutorial(XElement element) : base(element)
{
//Name = "ContextualTutorial";
}
public static bool Selected = false;
private Steering navConsole;
@@ -37,6 +32,11 @@ namespace Barotrauma.Tutorials
private float medicalTutorialTimer = 0.0f;
private const float medicalTutorialDelay = 2.0f;
public ContextualTutorial(XElement element) : base(element)
{
Name = "ContextualTutorial";
}
public override void Initialize()
{
base.Initialize();
@@ -517,4 +517,4 @@ namespace Barotrauma.Tutorials
Stop();
}
}
}*/
}
@@ -22,6 +22,9 @@ namespace Barotrauma.Tutorials
private Action infoBoxClosedCallback;
protected XElement configElement;
private enum TutorialType { None, Scenario, Contextual };
private TutorialType tutorialType = TutorialType.None;
protected VideoPlayer videoPlayer;
protected enum TutorialContentTypes { None = 0, Video = 1, ManualVideo = 2, TextOnly = 3 };
protected string playableContentPath;
@@ -161,6 +164,7 @@ namespace Barotrauma.Tutorials
configElement = element;
Name = element.GetAttributeString("name", "Unnamed");
completed = GameMain.Config.CompletedTutorialNames.Contains(Name);
Enum.TryParse(element.GetAttributeString("tutorialtype", "Scenario"), true, out tutorialType);
playableContentPath = element.GetAttributeString("playablecontentpath", "");
segments = new List<TutorialSegment>();