Dayz Explorer 1.28.160049
Loading...
Searching...
No Matches
scriptconsole.c
Go to the documentation of this file.
1class ScriptConsole extends UIScriptedMenu
2{
3 protected bool m_HintEditMode;
4 protected float m_HoverTime;
5 protected bool m_HoverSuccessTriggered;
6 protected Widget m_CurrentHoverWidget;
7 protected Widget m_HintWidgetRoot;
8 protected ImageWidget m_HintWidgetBackground;
9 protected Widget m_EditTooltipRoot;
11 protected ButtonWidget m_HintOkButton;
12 protected ButtonWidget m_HintCancelButton;
13 protected ButtonWidget m_HintClearButton;
14 protected EditBoxWidget m_HintInputText;
15 protected float m_PrevMouseX;
16 protected float m_PrevMouseY;
19 protected int m_Id;
20
21 static ref array<ref MapMarker> m_MarkedEntities = new array<ref MapMarker>();
25
26 ButtonWidget m_CloseConsoleButton;
27
28
29 protected static const string HINTS_PATH_DEFAULT = "scripts/data/internal/script_console_hints.json";
30 protected static const string HINTS_PATH_OPTIONAL = "$mission:script_console_hints.json";
31
33
34 const string NO_HINT_TEXT = "No hint";
35
36
38 {
39 #ifndef SERVER
40 if (GetGame() && GetGame().GetMission() && GetGame().GetMission().GetHud())
41 {
42 GetGame().GetMission().GetHud().ShowHudPlayer(false);
43 GetGame().GetMission().GetHud().ShowQuickbarPlayer(false);
44 }
45 #endif
47 if (plugin)
48 plugin.OnScriptMenuOpened(true);
49 }
50
52 {
53 #ifndef SERVER
54 if (GetGame() && GetGame().GetMission() && GetGame().GetMission().GetHud())
55 {
56 GetGame().GetMission().GetHud().ShowHudPlayer(true);
57 GetGame().GetMission().GetHud().ShowQuickbarPlayer(true);
58 }
60 m_HintWidgetRoot.Unlink();
61 #endif
63 if (plugin)
64 plugin.OnScriptMenuOpened(false);
65
66 if (GetGame() && GetGame().GetMission())
67 {
68 GetGame().GetMission().EnableAllInputs(true);
69 }
70 }
71
76
77 static void SaveData()
78 {
79 string errorMessage;
80 if (!JsonFileLoader<JsonHintsData>.SaveFile(HINTS_PATH_OPTIONAL, m_JsonData, errorMessage))
81 ErrorEx(errorMessage);
82 }
83
84 protected static JsonHintsData GetData()
85 {
87 if (!FileExist(path))
88 {
90 //ErrorEx(string.Format("Using default hints file: %1", path), ErrorExSeverity.INFO);
91 }
92
93 string errorMessage;
94 JsonHintsData data;
95 if (!JsonFileLoader<JsonHintsData>.LoadFile(path, data, errorMessage))
96 ErrorEx(errorMessage);
97
98 return data;
99 }
100
101 void SetHintText(string text, Widget w)
102 {
103 if (m_JsonData && m_JsonData.WidgetHintBindings && w)
104 {
105 int hash = GetWidgetCombinedHash(w);
106 m_JsonData.WidgetHintBindings.Set(hash, text);
107 Print("setting: " + text);
108 }
110 }
111
113 {
114 m_TabHandlers.Insert(handler.GetButton(), handler);
115 m_TabHandlersByID.Insert(m_Id, handler);
116 handler.Init(m_Id);
117 m_Id++;
118 }
119
120 override Widget Init()
121 {
123
124 layoutRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/script_console/script_console.layout");
125 m_EditTooltipRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/script_console/script_console_tooltip_edit.layout", layoutRoot);
126 m_EditTooltipRoot.Show(false);
127 m_HintOkButton = ButtonWidget.Cast(m_EditTooltipRoot.FindAnyWidget("ButtonOk"));
128 m_HintCancelButton = ButtonWidget.Cast(m_EditTooltipRoot.FindAnyWidget("ButtonCancel"));
129 m_HintClearButton = ButtonWidget.Cast(m_EditTooltipRoot.FindAnyWidget("ButtonClear"));
130 m_HintInputText = EditBoxWidget.Cast(m_EditTooltipRoot.FindAnyWidget("InputText"));
131
132 m_ButtonsWindowWidget = layoutRoot.FindAnyWidget("TabButtons");
133 m_ButtonsWindowWidget.Show(true);
134 //(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent = null)
135 RegisterTab(new ScriptConsoleItemsTab(layoutRoot.FindAnyWidget("ItemsPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("ItemsButtonWidget"))));
136 RegisterTab(new ScriptConsoleConfigTab(layoutRoot.FindAnyWidget("ConfigsPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("ConfigsButtonWidget"))));
137 RegisterTab(new ScriptConsoleEnfScriptTab(layoutRoot.FindAnyWidget("EnScriptPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("EnScriptButtonWidget"))));
138 RegisterTab(new ScriptConsoleEnfScriptServerTab(layoutRoot.FindAnyWidget("EnScriptPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("EnScriptButtonWidgetServer"))));
139 RegisterTab(new ScriptConsoleGeneralTab(layoutRoot.FindAnyWidget("GeneralPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("GeneralButtonWidget"))));
140 RegisterTab(new ScriptConsoleOutputTab(layoutRoot.FindAnyWidget("OutputPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("OutputButtonWidget"))));
141 RegisterTab(new ScriptConsoleVicinityTab(layoutRoot.FindAnyWidget("VicinityPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("VicinityWidget"))));
142 RegisterTab(new ScriptConsoleSoundsTab(layoutRoot.FindAnyWidget("SoundsPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("SoundsWidget"))));
143 RegisterTab(new ScriptConsoleWeatherTab(layoutRoot.FindAnyWidget("WeatherPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("WeatherButtonWidget"))));
144 RegisterTab(new ScriptConsoleCameraTab(layoutRoot.FindAnyWidget("CameraPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("CameraButtonWidget"))));
145
146 m_CloseConsoleButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("CloseConsoleButtonWidget"));
147
148 // load data from profile
149 m_SelectedTab = m_ConfigDebugProfile.GetTabSelected();
150 SelectTabByID(m_SelectedTab);
151
152 m_JsonData = GetData();
153
154 return layoutRoot;
155 }
156
157 protected void HideHint()
158 {
160 m_HintWidgetRoot.Unlink();
161 }
162
164 {
165 string nameThis = w.GetName();
166 string nameParent = "";
167
168 if (w.GetParent())
169 {
170 nameParent = w.GetParent().GetName();
171 }
172
173 string namesCombined = nameThis + nameParent;
174 return namesCombined.Hash();
175 }
176
177 protected string GetMessage()
178 {
180
181 if (m_JsonData && m_JsonData.WidgetHintBindings)
182 {
183 if (m_JsonData.WidgetHintBindings.Contains(hash))
184 {
185 return m_JsonData.WidgetHintBindings.Get(hash);
186 }
187 }
188 //return "";
189 //return "No hint" + hash.ToString();
190 return NO_HINT_TEXT;
191 }
192
193 protected void HoverSuccess()
194 {
197 }
198
199 protected void HoverInterrupt()
200 {
202
203 m_HoverTime = 0;
204 m_HintEditMode = false;
205 HideHint();
206 }
207
208 override bool OnKeyPress(Widget w, int x, int y, int key)
209 {
210 super.OnKeyPress(w, x, y, key);
211
212 if (m_SelectedHandler.OnKeyPress(w,x,y,key))
213 return true;
214 return false;
215
216 }
217
218 override bool OnKeyDown(Widget w, int x, int y, int key)
219 {
220 super.OnKeyDown(w, x, y, key);
221
222 if (m_SelectedHandler.OnKeyDown(w,x,y,key))
223 return true;
224 return false;
225
226 }
227
228 override void Update(float timeslice)
229 {
230 super.Update(timeslice);
231
232 int mouseX, mouseY;
233 GetMousePos(mouseX,mouseY);
234 float dist = Math.Sqrt(Math.AbsFloat(mouseX - m_PrevMouseX) + Math.AbsFloat(mouseY - m_PrevMouseY));
235 m_PrevMouseX = mouseX;
236 m_PrevMouseY = mouseY;
237
239 {
240 m_HoverTime += timeslice;
241 if (m_HoverTime > 1)
242 {
243 HoverSuccess();
244 }
245 }
246
247 if(dist > 1 && m_HoverSuccessTriggered)
249
250 if (GetGame() && GetUApi().GetInputByID(UAUIBack).LocalPress())
251 {
252 GetGame().GetUIManager().Back();
253 return;
254 }
255
256 if (!GetGame().IsMultiplayer() && KeyState(KeyCode.KC_RCONTROL) && KeyState(KeyCode.KC_NUMPAD0) && m_HintWidgetRoot && m_HintWidgetRoot.IsVisible())
257 {
258 ClearKey(KeyCode.KC_NUMPAD0);
259 m_EditTooltipRoot.Show(true);
260 string text = GetMessage();
261 if (text == NO_HINT_TEXT)
262 text = "";
263 m_HintInputText.SetText(text);
264
265 }
266
267 foreach (ScriptConsoleTabBase handler: m_TabHandlers)
268 {
269 if (handler.IsSelected())
270 {
271 handler.Update(timeslice);
272 }
273 }
274 }
275
276 override bool OnMouseButtonDown(Widget w, int x, int y, int button)
277 {
278 super.OnMouseButtonDown(w,x,y,button);
279
280 if (m_SelectedHandler.OnMouseButtonDown(w,x,y,button))
281 return true;
282
283 return false;
284 }
285
286
287 override bool OnClick(Widget w, int x, int y, int button)
288 {
289 super.OnClick(w, x, y, button);
290
291 if (w == m_CloseConsoleButton)
292 {
293 Close();
294 GetGame().GetMission().EnableAllInputs(true);
295 return true;
296 }
297 else if (w == m_HintOkButton)
298 {
299 SetHintText(m_HintInputText.GetText(), m_CurrentHoverWidget);
301 m_EditTooltipRoot.Show(false);
302 SaveData();
303 }
304 else if (w == m_HintCancelButton)
305 {
307 m_EditTooltipRoot.Show(false);
308
309 }
310 else if (w == m_HintClearButton)
311 {
312 m_HintInputText.SetText("");
313
314 }
315
317
318 if (m_SelectedHandler.OnClick(w,x,y,button))
319 return true;
320 return false;
321 }
322
323 override bool OnDoubleClick(Widget w, int x, int y, int button)
324 {
325 super.OnDoubleClick(w, x, y, button);
326
327 if (m_SelectedHandler.OnDoubleClick(w,x,y,button))
328 return true;
329
330 return false;
331 }
332
333 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
334 {
335 super.OnMouseLeave(w, enterW, x, y);
336
337 if (!m_EditTooltipRoot.IsVisible())
339
340 if (m_SelectedHandler.OnMouseLeave(w, enterW, x, y))
341 return true;
342
343 return false;
344 }
345
346 override bool OnMouseEnter(Widget w, int x, int y)
347 {
348 super.OnMouseEnter(w, x, y);
349 if (!m_EditTooltipRoot.IsVisible())
351
352 if (m_SelectedHandler.OnMouseEnter(w ,x, y))
353 return true;
354
355 #ifdef PLATFORM_CONSOLE
356 return false;
357 #endif
358 return true;
359 }
360
361 override bool OnChange(Widget w, int x, int y, bool finished)
362 {
363 super.OnChange(w, x, y, finished);
364
365 if (m_SelectedHandler.OnChange(w,x,y,finished))
366 return true;
367
368 return false;
369 }
370
371 override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
372 {
373 super.OnItemSelected(w, x, y, row, column, oldRow, oldColumn);
374
375 if (m_SelectedHandler.OnItemSelected(w, x, y, row, column,oldRow, oldColumn))
376 return true;
377
378 return false;
379 }
380
382 {
383 foreach (ScriptConsoleTabBase handler: m_TabHandlers)
384 {
385 if (tabType == handler.Type())
386 {
387 return handler;
388 }
389 }
390 return null;
391 }
392
393 void SelectTabByID(int id)
394 {
395 ScriptConsoleTabBase tab = m_TabHandlersByID.Get(id);
396 if (tab)
397 SelectTab(tab);
398 }
399
400 void SelectTabByButton(Widget button)
401 {
402 ScriptConsoleTabBase tab = m_TabHandlers.Get(button);
403 if (tab)
404 SelectTab(tab);
405 }
406
407 void SelectTab(ScriptConsoleTabBase selectedHandler)
408 {
409 foreach (ScriptConsoleTabBase handler:m_TabHandlers)
410 {
411 handler.Select(handler == selectedHandler, selectedHandler);
412 }
413
414 if (ScriptConsoleCameraTab.Cast(selectedHandler))
415 {
416 // Remove alpha background for camera tab
417 ShowMenuBackground(false);
418 GetGame().GetMission().RemoveActiveInputExcludes({"movement"}, true);
419 }
420 else
421 {
422 // Add back alpha background
423 ShowMenuBackground(true);
424 GetGame().GetMission().AddActiveInputExcludes({"movement"});
425 }
426
427 m_SelectedHandler = selectedHandler;
428 m_ConfigDebugProfile.SetTabSelected(selectedHandler.GetID());
429 }
430
431 void ShowMenuBackground(bool state)
432 {
433 if (!state)
434 {
435 GetLayoutRoot().FindAnyWidget("MenuWindow").SetColor(ARGB(0, 0, 0, 0));
436 }
437 else
438 {
439 GetLayoutRoot().FindAnyWidget("MenuWindow").SetColor(ARGB(128, 0, 0, 0));
440 }
441 }
442
443 protected void DisplayHint(string message)
444 {
445 if (message)
446 {
447 m_HintWidgetRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/script_console/script_console_hint.layout");
448 m_HintWidgetBackground = ImageWidget.Cast(m_HintWidgetRoot.FindAnyWidget("Background"));
449 m_HintWidget = RichTextWidget.Cast(m_HintWidgetRoot.FindAnyWidget("HintText"));
450
451 m_HintWidgetRoot.Show(true);
452 m_HintWidget.SetText(message);
453
454 int offsetX = 0;
455 int offsetY = 10;
456
457 int screenW, screenH;
458 GetScreenSize(screenW, screenH);
459
460 int mouseX, mouseY;
461 GetMousePos(mouseX,mouseY);
462
463 float relativeX = mouseX / screenW;
464 float relativeY = mouseY / screenH;
465
466 int width, height;
467 m_HintWidget.GetTextSize(width, height);
468 if (relativeX > 0.8)
469 offsetX = -width - offsetX;
470 if (relativeY > 0.8)
471 offsetY = -height - offsetY;
472
473 m_HintWidgetRoot.SetPos(mouseX + offsetX ,mouseY + offsetY);
474 m_HintWidgetBackground.SetScreenSize(width + 5, height + 5);
475
476 }
477 }
478
479 override void OnRPCEx(int rpc_type, ParamsReadContext ctx)
480 {
481 super.OnRPCEx(rpc_type, ctx);
482 #ifdef DIAG_DEVELOPER
483
484 foreach (ScriptConsoleTabBase handler:m_TabHandlers)
485 {
486 handler.OnRPCEx(rpc_type,ctx);
487 }
488 #endif
489
490 }
491
492 override void OnShow()
493 {
494 super.OnShow();
495
496 // Inputs excluded when in script console menu
497 array<string> inputExcludes = {
498 // Menu
499 "movement",
500 "aiming",
501 "gestures",
502 "stances",
503 "optics",
504 "actions",
505 "hotkey",
506 "UAGear",
507 "UAVoiceLevel",
508 "UAVoiceModifierHelper",
509 "UAVoiceDistanceUp",
510 "UAVoiceDistanceDown",
511 "UAVoiceOverNet",
512 "UAVoiceOverNetToggle",
513 "UAVoiceOverNetMute",
514 // Inventory
515 "gestures",
516 "stances",
517 "optics",
518 "actions",
519 // Buldozer
520 "UABuldResetCamera",
521 "UABuldTurbo",
522 "UABuldSlow",
523 "UABuldRunScript",
524 "UABuldSelectToggle",
525 "UABuldFreeLook",
526 "UABuldSelect",
527 "UABuldSelectAddMod",
528 "UABuldSelectRemoveMod",
529 "UABuldModifySelected",
530 "UABuldCycleMod",
531 "UABuldRotationXAxisMod",
532 "UABuldRotationZAxisMod",
533 "UABuldCoordModCycle",
534 "UABuldSampleTerrainHeight",
535 "UABuldSetTerrainHeight",
536 "UABuldScaleMod",
537 "UABuldElevateMod",
538 "UABuldSmoothMod",
539 "UABuldFlattenMod",
540 "UABuldBrushRatioUp",
541 "UABuldBrushRatioDown",
542 "UABuldBrushOuterUp",
543 "UABuldBrushOuterDown",
544 "UABuldBrushStrengthUp",
545 "UABuldBrushStrengthDown",
546 "UABuldToggleNearestObjectArrow",
547 "UABuldCycleBrushMod",
548 "UABuldSelectionType",
549 "UABuldCreateLastSelectedObject",
550 "UABuldDuplicateSelection",
551 "UABuldDeleteSelection",
552 "UABuldUndo",
553 "UABuldRedo",
554 "UABuldMoveLeft",
555 "UABuldMoveRight",
556 "UABuldMoveForward",
557 "UABuldMoveBack",
558 "UABuldMoveUp",
559 "UABuldMoveDown",
560 "UABuldLeft",
561 "UABuldRight",
562 "UABuldForward",
563 "UABuldBack",
564 "UABuldLookLeft",
565 "UABuldLookRight",
566 "UABuldLookUp",
567 "UABuldLookDown",
568 "UABuldZoomIn",
569 "UABuldZoomOut",
570 "UABuldTextureInfo",
571 "UABuldViewerMoveForward",
572 "UABuldViewerMoveBack",
573 "UABuldViewerMoveLeft",
574 "UABuldViewerMoveRight",
575 "UABuldViewerMoveUp",
576 "UABuldViewerMoveDown",
577 "UABuldObjectRotateLeft",
578 "UABuldObjectRotateRight",
579 "UABuldObjectRotateForward",
580 "UABuldObjectRotateBack",
581 "UABuldPreviousAnimation",
582 "UABuldNextAnimation",
583 "UABuldRecedeAnimation",
584 "UABuldAdvanceAnimation"
585 };
586
587 if (m_SelectedHandler && ScriptConsoleCameraTab.Cast(m_SelectedHandler))
588 {
589 inputExcludes.Remove(0);
590 }
591
592 GetGame().GetMission().AddActiveInputExcludes(inputExcludes);
593 }
594
596}
597
598
599class ScriptConsoleToolTipEventHandler : ScriptedWidgetEventHandler
600{
601 reference string HintMessage;
602 protected Widget m_Root;
603
604
605 protected float m_HoverTime;
607 protected Widget m_CurrentHoverWidget;
608 protected Widget m_HintWidgetRoot;
609 protected ImageWidget m_HintWidgetBackground;
611
612 protected ref Timer m_Timer;
613
614 void OnWidgetScriptInit(Widget w)
615 {
616 m_Root = w;
617 m_Root.SetHandler(this);
618 m_Root.SetFlags(WidgetFlags.VEXACTPOS);
619 }
620
621 override bool OnMouseEnter(Widget w, int x, int y)
622 {
623 m_Timer = new Timer();
624 m_Timer.Run(0.1, this, "Tick", NULL, true);
625
627 return true;
628 }
629
630 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
631 {
633 return true;
634 }
635
636 protected bool Tick()
637 {
638 if (!m_Root.IsVisibleHierarchy())
641 {
642 m_HoverTime += 0.1;
643 if (m_HoverTime > 1)
644 {
645 HoverSuccess();
646 }
647 }
648 return true;
649 }
650
651 protected void DisplayHint(string message)
652 {
653 if (message)
654 {
655 m_HintWidgetRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/script_console/script_console_hint.layout");
656 m_HintWidgetBackground = ImageWidget.Cast(m_HintWidgetRoot.FindAnyWidget("Background"));
657 m_HintWidget = RichTextWidget.Cast(m_HintWidgetRoot.FindAnyWidget("HintText"));
658
659 m_HintWidgetRoot.Show(true);
660 m_HintWidget.SetText(message);
661
662 int offsetX = 0;
663 int offsetY = 10;
664
665 int screenW, screenH;
666 GetScreenSize(screenW, screenH);
667
668 int mouseX, mouseY;
669 GetMousePos(mouseX,mouseY);
670
671 float relativeX = mouseX / screenW;
672 float relativeY = mouseY / screenH;
673
674 int width, height;
675 m_HintWidget.GetTextSize(width, height);
676 if (relativeX > 0.8)
677 offsetX = -width - offsetX;
678 if (relativeY > 0.8)
679 offsetY = -height - offsetY;
680
681 m_HintWidgetRoot.SetPos(mouseX + offsetX ,mouseY + offsetY);
682 m_HintWidgetBackground.SetScreenSize(width + 5, height + 5);
683
684 }
685 }
686
687 protected void HideHint()
688 {
690 m_HintWidgetRoot.Show(false);
691 }
692
693
694 protected string GetMessage()
695 {
696 return HintMessage;
697 }
698
699 protected void HoverSuccess()
700 {
703 }
704
705 protected void HoverInterrupt()
706 {
707 m_Timer = null;
710 m_HoverTime = 0;
711 HideHint();
712 }
713}
714
715
717{
718 ref map<int, string> WidgetHintBindings;
719}
720
override bool OnMouseEnter(Widget w, int x, int y)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
class ServerBrowserHelperFunctions m_Id
Definition enmath.c:7
bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
bool OnKeyDown(Widget w, int x, int y, int key)
bool OnDoubleClick(Widget w, int x, int y, int button)
bool OnMouseButtonDown(Widget w, int x, int y, int button)
bool OnMouseEnter(Widget w, int x, int y)
bool OnKeyPress(Widget w, int x, int y, int key)
bool OnChange(Widget w, int x, int y, bool finished)
bool OnClick(Widget w, int x, int y, int button)
Serialization general interface. Serializer API works with:
Definition serializer.c:56
void SetHintText(string text, Widget w)
override bool OnMouseEnter(Widget w, int x, int y)
override void OnShow()
Widget m_CurrentHoverWidget
ButtonWidget m_HintCancelButton
void SelectTabByButton(Widget button)
ButtonWidget m_HintClearButton
string GetMessage()
PluginConfigDebugProfile m_ConfigDebugProfile
EditBoxWidget m_HintInputText
override void Update(float timeslice)
override void OnRPCEx(int rpc_type, ParamsReadContext ctx)
void ~ScriptConsole()
static ref JsonHintsData m_JsonData
Widget m_ButtonsWindowWidget
const string NO_HINT_TEXT
void ShowMenuBackground(bool state)
int GetWidgetCombinedHash(Widget w)
Widget m_EditTooltipRoot
override bool OnDoubleClick(Widget w, int x, int y, int button)
void SelectTabByID(int id)
override bool OnKeyPress(Widget w, int x, int y, int key)
override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
static const string HINTS_PATH_OPTIONAL
static JsonHintsData GetData()
void RegisterTab(ScriptConsoleTabBase handler)
RichTextWidget m_HintWidget
override bool OnKeyDown(Widget w, int x, int y, int key)
override bool OnChange(Widget w, int x, int y, bool finished)
override bool OnMouseButtonDown(Widget w, int x, int y, int button)
ScriptConsoleTabBase m_SelectedHandler
static void SaveData()
ButtonWidget m_HintOkButton
Widget m_HintWidgetRoot
bool m_HoverSuccessTriggered
override Widget Init()
ImageWidget m_HintWidgetBackground
void SelectTab(ScriptConsoleTabBase selectedHandler)
ScriptConsoleTabBase GetTabHandler(typename tabType)
override bool OnClick(Widget w, int x, int y, int button)
static const string HINTS_PATH_DEFAULT
ScriptConsoleTabBase GetSelectedHandler()
void DisplayHint(string message)
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
override void Tick()
ref Timer m_Timer
Definition dayzgame.c:705
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
enum ShapeType ErrorEx
proto bool FileExist(string name)
Check existence of file.
proto native void ClearKey(KeyCode key)
KeyCode
Definition ensystem.c:157
proto native int KeyState(KeyCode key)
proto void GetScreenSize(out int x, out int y)
proto void GetMousePos(out int x, out int y)
WidgetFlags
Definition enwidgets.c:58
Icon x
Icon y
void Close()
PluginConfigDebugProfile m_ConfigDebugProfile
void PluginItemDiagnostic()
PluginBase GetPlugin(typename plugin_type)
int ARGB(int a, int r, int g, int b)
Definition proto.c:322
ImageWidget m_HintWidgetBackground
string GetMessage()
Widget m_CurrentHoverWidget
float m_HoverTime
void HoverSuccess()
RichTextWidget m_HintWidget
class ScriptConsole extends UIScriptedMenu HintMessage
void HoverInterrupt()
bool m_HoverSuccessTriggered
Widget m_HintWidgetRoot
void DisplayHint(string message)
void HideHint()
void ScriptConsoleEnfScriptTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
void ScriptConsoleWeatherTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
Widget m_Root
Definition sizetochild.c:91
void OnWidgetScriptInit(Widget w)
Definition sizetochild.c:94
proto native UAInputAPI GetUApi()