3 private UIScriptedMenu m_mainmenu;
4 private CreditsMenu m_CreditsMenu;
5 private ref DayZIntroScenePC m_IntroScenePC;
6 private ref DayZIntroSceneXbox m_IntroSceneXbox;
19 #ifdef PLATFORM_CONSOLE
20 if (
g_Game.GetGameState() != DayZGameState.PARTY )
25 m_mainmenu = UIScriptedMenu.Cast(
g_Game.GetUIManager().EnterScriptedMenu(
MENU_MAIN, null ) );
34 #ifdef PLATFORM_CONSOLE
35 delete m_IntroSceneXbox;
37 delete m_IntroScenePC;
46 DayZIntroScenePC GetIntroScenePC()
48 #ifdef PLATFORM_CONSOLE
49 Error(
"missionMainMenu->GetIntroScenePC on PLATFORM_CONSOLE is not implemented!");
52 return m_IntroScenePC;
56 DayZIntroSceneXbox GetIntroSceneXbox()
58 #ifdef PLATFORM_CONSOLE
59 return m_IntroSceneXbox;
61 Error(
"missionMainMenu->GetIntroScenePC on PLATFORM_PC is not implemented!");
66 void CreateIntroScene()
68#ifdef PLATFORM_CONSOLE
69 m_IntroSceneXbox =
new DayZIntroSceneXbox;
71 m_IntroScenePC =
new DayZIntroScenePC;
75 override void UpdateInputDevicesAvailability()
77 super.UpdateInputDevicesAvailability();
79 g_Game.GetInput().UpdateConnectedInputDeviceList();
80 g_Game.UpdateInputDeviceDisconnectWarning();
85 g_Game.GetUIManager().ShowUICursor(
true);
86 g_Game.SetMissionState(DayZGame.MISSION_STATE_MAINMENU);
90 ProgressAsync.DestroyAllPendingProgresses();
93 override void OnMissionFinish()
97 g_Game.GetUIManager().CloseAll();
100 m_IntroScenePC = null;
101 m_IntroSceneXbox = null;
102 m_CreditsMenu = null;
103#ifndef FEATURE_CURSOR
104 g_Game.GetUIManager().ShowUICursor(
false);
108 override void OnUpdate(
float timeslice)
110 super.OnUpdate(timeslice);
113 UpdateInputDeviceDiag();
123 m_IntroScenePC.Update();
127 void OnMenuEnter(
int menu_id)
133 m_CreditsMenu = CreditsMenu.Cast(
g_Game.GetUIManager().GetMenu());
142 m_CreditsMenu.UpdateInfoPanelText(device);
146 int SortedInsert( array<int> list,
int number )
148 int find_number = number;
150 int index_max = list.Count() - 1;
151 int target_index = Math.Floor( index_max / 2 );
153 if ( index_max == -1 )
155 list.Insert( number );
161 int target_value = list[target_index];
163 if ( find_number == target_value || ((index_max - index_min) <= 1) )
165 for (
int i = index_min; i <= index_max; i++ )
167 if ( find_number <= list[i] )
169 list.InsertAt( find_number, i );
175 list.InsertAt( find_number, index_max );
178 else if ( find_number < target_value )
180 index_max = target_index;
181 target_index = Math.Floor( target_index / 2 );
183 else if ( find_number > target_value )
185 index_min = target_index;
186 target_index += Math.Floor( (index_max - index_min) / 2 );
204 SoundObject soundObject = soundBuilder.BuildSoundObject();
205 soundObject.SetKind(
WaveKind.WAVEMUSIC );
206 m_MenuMusic =
g_Game.GetSoundScene().Play2D(soundObject, soundBuilder);
207 m_MenuMusic.Loop(
true );
void OnInputDeviceChanged(EInputDeviceType pInputDeviceType)
override void OnMissionStart()
EDynamicMusicPlayerCategory
void Error(string err)
Messagebox with error message.
class AbstractSoundScene SoundObjectBuilder(SoundParams soundParams)
void SoundObject(SoundParams soundParams)
class SoundObject SoundParams(string name)