3 PluginDeveloper m_ModuleDeveloper;
4 PluginKeyBinding m_ModuleKeyBinding
5 PluginAdditionalInfo m_ModuleServerInfo;
13 autoptr ObjectSnapCallback m_InventoryDropCallback;
28 m_ModuleServerInfo = PluginAdditionalInfo.Cast(
GetPlugin(PluginAdditionalInfo) );
34 InitialiseWorldData();
38 GetDayZGame().GetAnalyticsClient().RegisterEvents();
42 GetOnInputDeviceConnected().Insert(UpdateInputDevicesAvailability);
43 GetOnInputDeviceDisconnected().Insert(UpdateInputDevicesAvailability);
56 GetDayZGame().GetAnalyticsClient().UnregisterEvents();
61 override ObjectSnapCallback GetInventoryDropCallback()
63 return m_InventoryDropCallback;
66 void InitialiseWorldData()
68 string worldName =
"empty";
69 GetGame().GetWorldName(worldName);
75 m_WorldData =
new ChernarusPlusData();
79 m_WorldData =
new EnochData();
82 #ifdef PLATFORM_CONSOLE
83 case "mainmenuscenexbox":
84 m_WorldData =
new MainMenuWorldData();
89 m_WorldData =
new ChernarusPlusData();
96 return m_WorldLighting;
111 #ifdef PLATFORM_CONSOLE
112 menu =
new MainMenuConsole;
118 #ifdef PLATFORM_CONSOLE
119 menu =
new InGameMenuXbox;
121 menu =
new InGameMenu;
125 menu =
new CharacterCreationMenu;
128 menu =
new OptionsMenu;
131 menu =
new StartupMenu;
134 menu =
new LoadingMenu;
140 menu =
new InspectMenuNew;
143 menu =
new EarlyAccessMenu;
146 menu =
new ScriptConsole;
149 menu =
new ScriptConsoleNewPresetDialog;
152 menu =
new ScriptConsoleRenamePresetDialog;
155 menu =
new ScriptConsoleUniversalInfoDialog;
158 menu =
new ChatInputMenu;
161 menu =
new PresetsMenu;
173 menu =
new SceneEditorMenu;
176 menu =
new HelpScreen;
179 menu =
new GesturesMenu;
182 menu =
new LogoutMenu;
185 menu =
new TitleScreenMenu;
188 menu =
new ControlsXboxNew;
191 menu =
new RadialQuickbarMenu;
194 menu =
new ServerBrowserMenuNew;
203 menu =
new CameraToolsMenu;
206 menu =
new MainMenuVideo;
209 menu =
new KeybindingsMenu;
212 menu =
new TutorialsMenu;
215 menu =
new CreditsMenu;
218 menu =
new InviteMenu;
221 menu =
new ItemDropWarningMenu;
224 menu =
new InputDeviceDisconnectWarningMenu;
230 menu =
new RespawnDialogue;
236 menu =
new ScriptConsoleAddLocation;
239 menu =
new MissionLoader;
253 void UpdateInputDevicesAvailability()
255 g_Game.RefreshMouseCursorVisibility();
258 override void OnKeyPress(
int key)
260 super.OnKeyPress(key);
262 #ifdef DIAG_DEVELOPER
263 if ( PluginKeyBinding.instance )
265 PluginKeyBinding.instance.OnKeyPress(key);
271 int m_WidgetsInvisible;
273 void DumpCurrentUILayout()
279 Widget widget_root = current_menu.GetLayoutRoot();
284 m_WidgetsInvisible = 0;
286 Print( widget_root.GetName() +
" ("+ widget_root.GetTypeName() +
")");
288 DumpWidget(widget_root.GetChildren(), 1);
290 Print(
"Widgets TOTAL: "+ m_WidgetsTotal.ToString() +
" INVISIBLE: "+ m_WidgetsInvisible.ToString() +
" VISIBLE: "+ (m_WidgetsTotal - m_WidgetsInvisible).ToString() );
295 void DumpWidget(
Widget w,
int tabs)
305 for (
int i = 0; i < tabs; i++)
310 string invisible =
"";
312 if ( !w.IsVisibleHierarchy() )
314 invisible =
"[invisible]";
315 m_WidgetsInvisible++;
318 Print( tmp +
"- "+ w.GetName() +
" ("+ w.GetTypeName() +
") "+ invisible );
320 bool collapse =
false;
321 if ( w.GetChildren() )
327 DumpWidget(w.GetChildren(), tabs + 1);
334 DumpWidget(w.GetSibling(), tabs);
337 override void OnKeyRelease(
int key)
339 super.OnKeyRelease(key);
343 if ( PluginKeyBinding.instance != NULL )
345 PluginKeyBinding.instance.OnKeyRelease(key);
350 override void OnMouseButtonPress(
int button)
352 super.OnMouseButtonPress(button);
356 if ( PluginKeyBinding.instance != NULL )
358 PluginKeyBinding.instance.OnMouseButtonPress(button);
363 override void OnMouseButtonRelease(
int button)
365 super.OnMouseButtonRelease(button);
369 if ( PluginKeyBinding.instance != NULL )
371 PluginKeyBinding.instance.OnMouseButtonRelease(button);
376 void OnLog(
string msg_log)
378 if ( PluginDeveloper.GetInstance() )
382 PluginDeveloper.GetInstance().PrintLogClient(msg_log);
386 PluginDeveloper.GetInstance().PrintLogClient(msg_log);
391 void UpdateDummyScheduler()
393 for(
int i = 0; i < m_DummyPlayers.Count(); i++)
395 if (m_DummyPlayers.Get(i))
397 m_DummyPlayers.Get(i).OnTick();
402 override void AddDummyPlayerToScheduler(Man player)
404 m_DummyPlayers.Insert(
PlayerBase.Cast( player ));
407 #ifdef DIAG_DEVELOPER
408 void UpdateInputDeviceDiag()
413 void DisplayInputDebug(
bool show)
415 DbgUI.BeginCleanupScope();
416 DbgUI.Begin(
"InputDeviceDebug", 60, 60);
420 DbgUI.Text(
"Gamepad: " +
g_Game.GetInput().IsActiveGamepadSelected());
421 DbgUI.Text(
"Mouse: " +
g_Game.GetInput().IsMouseConnected());
422 DbgUI.Text(
"Keyboard: " +
g_Game.GetInput().IsKeyboardConnected());
426 DbgUI.EndCleanupScope();