public override void LoadContent() { MyMwcLog.WriteLine("MyGuiScreenLoading.LoadContent - START"); MyMwcLog.IncreaseIndent(); AppCode.Game.Render.MyRender.GetRenderProfiler().StartProfilingBlock("MyGuiScreenLoading::LoadContent"); // We must stop XACT sounds here, not in the background thread, because on Windows XP is safer if only // main thread uses XACT. If we do it from background thread, we won't probably hear no sound. if (MyAudio.GetMusicState() != MyMusicState.Stopped) { MyAudio.Stop(); } m_backgroundScreenTexture = m_backgroundTextureFromConstructor ?? MyTextureManager.GetTexture <MyTexture2D>(GetRandomBackgroundTexture(), flags: TextureFlags.IgnoreQuality); m_minerWarsLogoTexture = MyTextureManager.GetTexture <MyTexture2D>("Textures\\GUI\\MinerWarsLogoLarge", null, LoadingMode.Immediate, flags: TextureFlags.IgnoreQuality); //m_minerWarsActorsTexture = MyTextureManager.GetTexture<MyTexture2D>("Textures\\GUI\\MinerWarsActors", flags: TextureFlags.IgnoreQuality); if (m_screenToUnload != null) { // If there is existing screen we are trying to replace (e.g. gameplay screen), we will mark this one as unloaded, so // then remove screen method won't try to unload it and we can do it in our thread. This is also the reason why we do it // here, becasue changing IsLoaded in paralel thread can't tell us when it happens - and this must be serial. m_screenToUnload.IsLoaded = false; m_screenToUnload.CloseScreenNow(); } m_currentQuoteOfTheDay = MyQuoteOfTheDay.GetRandomQuote(); // Base load content must be called after child's load content base.LoadContent(); if (m_screenToLoad != null && !m_loadInDrawFinished && m_loadFinished) { m_screenToLoad.SetState(MyGuiScreenState.OPENING); m_screenToLoad.LoadContent(); } else { m_loadFinished = false; } AppCode.Game.Render.MyRender.GetRenderProfiler().EndProfilingBlock(); MyMwcLog.DecreaseIndent(); MyMwcLog.WriteLine("MyGuiScreenLoading.LoadContent - END"); }