(8015dd67d) Show a language selection prompt when launching the game for the first time (WIP)

This commit is contained in:
Joonas Rikkonen
2019-05-16 05:41:09 +03:00
parent 3c11bc2fca
commit 79d01822d2
84 changed files with 1843 additions and 1773 deletions
+11 -5
View File
@@ -178,7 +178,6 @@ namespace Barotrauma
GUI.KeyboardDispatcher = new EventInput.KeyboardDispatcher(Window);
PerformanceCounter = new PerformanceCounter();
IsFixedTimeStep = false;
@@ -267,8 +266,12 @@ namespace Barotrauma
spriteBatch = new SpriteBatch(GraphicsDevice);
TextureLoader.Init(GraphicsDevice);
//do this here because we need it for the loading screen
WaterRenderer.Instance = new WaterRenderer(base.GraphicsDevice, Content);
loadingScreenOpen = true;
TitleScreen = new LoadingScreen(GraphicsDevice);
TitleScreen.WaitForLanguageSelection = Config.ShowLanguageSelectionPrompt;
bool canLoadInSeparateThread = false;
#if WINDOWS
@@ -318,6 +321,11 @@ namespace Barotrauma
DebugConsole.NewMessage("LOADING COROUTINE", Color.Lime);
}
while (TitleScreen.WaitForLanguageSelection)
{
yield return CoroutineStatus.Running;
}
SoundManager = new Sounds.SoundManager();
SoundManager.SetCategoryGainMultiplier("default", Config.SoundVolume);
SoundManager.SetCategoryGainMultiplier("ui", Config.SoundVolume);
@@ -366,11 +374,9 @@ namespace Barotrauma
InitUserStats();
yield return CoroutineStatus.Running;
LightManager = new Lights.LightManager(base.GraphicsDevice, Content);
WaterRenderer.Instance = new WaterRenderer(base.GraphicsDevice, Content);
TitleScreen.LoadState = 1.0f;
yield return CoroutineStatus.Running;
@@ -521,7 +527,7 @@ namespace Barotrauma
protected override void UnloadContent()
{
Video.Close();
SoundManager.Dispose();
SoundManager?.Dispose();
}
/// <summary>