5 const string LOADING_SCREEN_LAYOUT =
"{4C8B29889444BDA3}UI/layouts/Menus/LoadingScreen/ScenarioLoadingScreen.layout";
7 static protected bool s_bOpened;
8 static ref ScriptInvoker s_OnEnterLoadingScreen =
new ScriptInvoker();
9 static ref ScriptInvoker m_onExitLoadingScreen =
new ScriptInvoker();
16 GetGame().m_OnMissionSetInvoker.Insert(OnMissionSet);
22 #ifdef DEBUG_LOADING_SCREENS
23 PrintFormat(
">> %1 >> Load",
this);
26 m_wRoot = m_WorkspaceWidget.CreateWidgets(LOADING_SCREEN_LAYOUT, m_WorkspaceWidget);
29 m_wRoot.AddHandler(m_LayoutComponent);
31 SplashScreen.s_iSplashShown++;
35 override void Update(
float timeSlice,
float progress,
float minDurationRatio)
37 #ifdef DEBUG_SPLASH_SCREENS
44 m_LayoutComponent.Update(timeSlice, progress, minDurationRatio);
50 #ifdef DEBUG_LOADING_SCREENS
51 PrintFormat(
">> %1 >> Show",
this);
60 WidgetManager.SetCursor(12);
62 s_OnEnterLoadingScreen.Invoke();
68 #ifdef DEBUG_LOADING_SCREENS
69 PrintFormat(
">> %1 >> Hide",
this);
76 m_onExitLoadingScreen.Invoke();
78 if (m_LayoutComponent)
79 m_LayoutComponent.OnHide();
81 WidgetManager.SetCursor(0);
87 void EnableSounds(
bool enable)
89 AudioSystem.SetMasterVolume(AudioSystem.SFX, enable);
90 AudioSystem.SetMasterVolume(AudioSystem.VoiceChat, enable);
91 AudioSystem.SetMasterVolume(AudioSystem.Dialog, enable);
92 AudioSystem.SetMasterVolume(AudioSystem.Music, enable);
93 AudioSystem.SetMasterVolume(AudioSystem.UI, enable);
105 if (m_LayoutComponent)
106 m_LayoutComponent.OnMissionDataRetrieved(header);
110 void SetJoiningCrossPlay(
bool isCrossPlay)
112 #ifdef DEBUG_LOADING_SCREENS
113 PrintFormat(
">> SetJoiningCrossPlay | isCrossPlay: %1", isCrossPlay);
116 if (m_LayoutComponent)
117 m_LayoutComponent.SetJoiningCrossPlay(isCrossPlay);
121 void SetLoadingModded(
bool isModded)
123 #ifdef DEBUG_LOADING_SCREENS
124 PrintFormat(
">> SetLoadingModded | isModded: %1", isModded);
127 if (m_LayoutComponent)
128 m_LayoutComponent.SetLoadingModded(isModded);