DayZ 1.29
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
ScriptConsole.c
См. документацию.
1class ScriptConsole extends UIScriptedMenu
2{
3 protected bool m_HintEditMode;
4 protected float m_HoverTime;
5 protected bool m_HoverSuccessTriggered;
8 protected ImageWidget m_HintWidgetBackground;
11 protected ButtonWidget m_HintOkButton;
12 protected ButtonWidget m_HintCancelButton;
13 protected ButtonWidget m_HintClearButton;
15 protected float m_PrevMouseX;
16 protected float m_PrevMouseY;
19 protected int m_Id;
20
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 (g_Game && g_Game.GetMission() && g_Game.GetMission().GetHud())
41 {
42 g_Game.GetMission().GetHud().ShowHudPlayer(false);
43 g_Game.GetMission().GetHud().ShowQuickbarPlayer(false);
44 }
45 #endif
47 if (plugin)
48 plugin.OnScriptMenuOpened(true);
49 }
50
52 {
53 #ifndef SERVER
54 if (g_Game && g_Game.GetMission() && g_Game.GetMission().GetHud())
55 {
56 g_Game.GetMission().GetHud().ShowHudPlayer(true);
57 g_Game.GetMission().GetHud().ShowQuickbarPlayer(true);
58 }
60 m_HintWidgetRoot.Unlink();
61 #endif
63 if (plugin)
64 plugin.OnScriptMenuOpened(false);
65
66 if (g_Game && g_Game.GetMission())
67 {
68 g_Game.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 = g_Game.GetWorkspace().CreateWidgets("gui/layouts/script_console/script_console.layout");
125 m_EditTooltipRoot = g_Game.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 if (!g_Game.IsDedicatedServer()) // TODO(kumarjac): actually hide the panel - not important though since this is an internal tool
143 RegisterTab(new ScriptConsoleSoundsTab(layoutRoot.FindAnyWidget("SoundsPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("SoundsWidget"))));
144 RegisterTab(new ScriptConsoleWeatherTab(layoutRoot.FindAnyWidget("WeatherPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("WeatherButtonWidget"))));
145 if (!g_Game.IsDedicatedServer()) // TODO(kumarjac): actually hide the panel - not important though since this is an internal tool
146 RegisterTab(new ScriptConsoleCameraTab(layoutRoot.FindAnyWidget("CameraPanel"),this,ButtonWidget.Cast(layoutRoot.FindAnyWidget("CameraButtonWidget"))));
147
148 m_CloseConsoleButton = ButtonWidget.Cast(layoutRoot.FindAnyWidget("CloseConsoleButtonWidget"));
149
150 // load data from profile
151 m_SelectedTab = m_ConfigDebugProfile.GetTabSelected();
153
155
156 return layoutRoot;
157 }
158
159 protected void HideHint()
160 {
162 m_HintWidgetRoot.Unlink();
163 }
164
166 {
167 string nameThis = w.GetName();
168 string nameParent = "";
169
170 if (w.GetParent())
171 {
172 nameParent = w.GetParent().GetName();
173 }
174
175 string namesCombined = nameThis + nameParent;
176 return namesCombined.Hash();
177 }
178
179 protected string GetMessage()
180 {
182
183 if (m_JsonData && m_JsonData.WidgetHintBindings)
184 {
185 if (m_JsonData.WidgetHintBindings.Contains(hash))
186 {
187 return m_JsonData.WidgetHintBindings.Get(hash);
188 }
189 }
190 //return "";
191 //return "No hint" + hash.ToString();
192 return NO_HINT_TEXT;
193 }
194
195 protected void HoverSuccess()
196 {
199 }
200
201 protected void HoverInterrupt()
202 {
204
205 m_HoverTime = 0;
206 m_HintEditMode = false;
207 HideHint();
208 }
209
210 override void OnHide()
211 {
212 super.OnHide();
213
215 }
216
217 override bool OnKeyPress(Widget w, int x, int y, int key)
218 {
219 super.OnKeyPress(w, x, y, key);
220
221 if (m_SelectedHandler.OnKeyPress(w,x,y,key))
222 return true;
223 return false;
224
225 }
226
227 override bool OnKeyDown(Widget w, int x, int y, int key)
228 {
229 super.OnKeyDown(w, x, y, key);
230
231 if (m_SelectedHandler.OnKeyDown(w,x,y,key))
232 return true;
233 return false;
234
235 }
236
237 override void Update(float timeslice)
238 {
239 super.Update(timeslice);
240
241 int mouseX, mouseY;
242 GetMousePos(mouseX,mouseY);
243 float dist = Math.Sqrt(Math.AbsFloat(mouseX - m_PrevMouseX) + Math.AbsFloat(mouseY - m_PrevMouseY));
244 m_PrevMouseX = mouseX;
245 m_PrevMouseY = mouseY;
246
248 {
249 m_HoverTime += timeslice;
250 if (m_HoverTime > 1)
251 {
252 HoverSuccess();
253 }
254 }
255
256 if(dist > 1 && m_HoverSuccessTriggered)
258
259 if (g_Game && GetUApi().GetInputByID(UAUIBack).LocalPress())
260 {
261 g_Game.GetUIManager().Back();
262 return;
263 }
264
265 if (!g_Game.IsMultiplayer() && KeyState(KeyCode.KC_RCONTROL) && KeyState(KeyCode.KC_NUMPAD0) && m_HintWidgetRoot && m_HintWidgetRoot.IsVisible())
266 {
267 ClearKey(KeyCode.KC_NUMPAD0);
268 m_EditTooltipRoot.Show(true);
269 string text = GetMessage();
270 if (text == NO_HINT_TEXT)
271 text = "";
272 m_HintInputText.SetText(text);
273
274 }
275
276 foreach (ScriptConsoleTabBase handler: m_TabHandlers)
277 {
278 if (handler.IsSelected())
279 {
280 handler.Update(timeslice);
281 }
282 }
283 }
284
285 override bool OnMouseButtonDown(Widget w, int x, int y, int button)
286 {
287 super.OnMouseButtonDown(w,x,y,button);
288
289 if (m_SelectedHandler.OnMouseButtonDown(w,x,y,button))
290 return true;
291
292 return false;
293 }
294
295
296 override bool OnClick(Widget w, int x, int y, int button)
297 {
298 super.OnClick(w, x, y, button);
299
300 if (w == m_CloseConsoleButton)
301 {
302 Close();
303 g_Game.GetMission().EnableAllInputs(true);
304 return true;
305 }
306 else if (w == m_HintOkButton)
307 {
310 m_EditTooltipRoot.Show(false);
311 SaveData();
312 }
313 else if (w == m_HintCancelButton)
314 {
316 m_EditTooltipRoot.Show(false);
317
318 }
319 else if (w == m_HintClearButton)
320 {
321 m_HintInputText.SetText("");
322
323 }
324
326
327 if (m_SelectedHandler.OnClick(w,x,y,button))
328 return true;
329 return false;
330 }
331
332 override bool OnDoubleClick(Widget w, int x, int y, int button)
333 {
334 super.OnDoubleClick(w, x, y, button);
335
336 if (m_SelectedHandler.OnDoubleClick(w,x,y,button))
337 return true;
338
339 return false;
340 }
341
342 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
343 {
344 super.OnMouseLeave(w, enterW, x, y);
345
346 if (!m_EditTooltipRoot.IsVisible())
348
349 if (m_SelectedHandler.OnMouseLeave(w, enterW, x, y))
350 return true;
351
352 return false;
353 }
354
355 override bool OnMouseEnter(Widget w, int x, int y)
356 {
357 super.OnMouseEnter(w, x, y);
358 if (!m_EditTooltipRoot.IsVisible())
360
361 if (m_SelectedHandler.OnMouseEnter(w ,x, y))
362 return true;
363
364 #ifdef PLATFORM_CONSOLE
365 return false;
366 #endif
367 return true;
368 }
369
370 override bool OnChange(Widget w, int x, int y, bool finished)
371 {
372 super.OnChange(w, x, y, finished);
373
374 if (m_SelectedHandler.OnChange(w,x,y,finished))
375 return true;
376
377 return false;
378 }
379
380 override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
381 {
382 super.OnItemSelected(w, x, y, row, column, oldRow, oldColumn);
383
384 if (m_SelectedHandler.OnItemSelected(w, x, y, row, column,oldRow, oldColumn))
385 return true;
386
387 return false;
388 }
389
391 {
392 foreach (ScriptConsoleTabBase handler: m_TabHandlers)
393 {
394 if (tabType == handler.Type())
395 {
396 return handler;
397 }
398 }
399 return null;
400 }
401
402 void SelectTabByID(int id)
403 {
405 if (tab)
406 SelectTab(tab);
407 }
408
410 {
411 ScriptConsoleTabBase tab = m_TabHandlers.Get(button);
412 if (tab)
413 SelectTab(tab);
414 }
415
416 void SelectTab(ScriptConsoleTabBase selectedHandler)
417 {
418 foreach (ScriptConsoleTabBase handler:m_TabHandlers)
419 {
420 handler.Select(handler == selectedHandler, selectedHandler);
421 }
422
423 if (ScriptConsoleCameraTab.Cast(selectedHandler))
424 {
425 // Remove alpha background for camera tab
426 ShowMenuBackground(false);
427 g_Game.GetMission().RemoveActiveInputExcludes({"movement"}, true);
428 }
429 else
430 {
431 // Add back alpha background
432 ShowMenuBackground(true);
433 g_Game.GetMission().AddActiveInputExcludes({"movement"});
434 }
435
436 m_SelectedHandler = selectedHandler;
437 m_ConfigDebugProfile.SetTabSelected(selectedHandler.GetID());
438 }
439
440 void ShowMenuBackground(bool state)
441 {
442 if (!state)
443 {
444 GetLayoutRoot().FindAnyWidget("MenuWindow").SetColor(ARGB(0, 0, 0, 0));
445 }
446 else
447 {
448 GetLayoutRoot().FindAnyWidget("MenuWindow").SetColor(ARGB(128, 0, 0, 0));
449 }
450 }
451
452 protected void DisplayHint(string message)
453 {
454 if (message)
455 {
456 m_HintWidgetRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/script_console/script_console_hint.layout");
457 m_HintWidgetBackground = ImageWidget.Cast(m_HintWidgetRoot.FindAnyWidget("Background"));
458 m_HintWidget = RichTextWidget.Cast(m_HintWidgetRoot.FindAnyWidget("HintText"));
459
460 m_HintWidgetRoot.Show(true);
461 m_HintWidget.SetText(message);
462
463 int offsetX = 0;
464 int offsetY = 10;
465
466 int screenW, screenH;
467 GetScreenSize(screenW, screenH);
468
469 int mouseX, mouseY;
470 GetMousePos(mouseX,mouseY);
471
472 float relativeX = mouseX / screenW;
473 float relativeY = mouseY / screenH;
474
475 int width, height;
476 m_HintWidget.GetTextSize(width, height);
477 if (relativeX > 0.8)
478 offsetX = -width - offsetX;
479 if (relativeY > 0.8)
480 offsetY = -height - offsetY;
481
482 m_HintWidgetRoot.SetPos(mouseX + offsetX ,mouseY + offsetY);
483 m_HintWidgetBackground.SetScreenSize(width + 5, height + 5);
484
485 }
486 }
487
488 override void OnRPCEx(int rpc_type, ParamsReadContext ctx)
489 {
490 super.OnRPCEx(rpc_type, ctx);
491 #ifdef DIAG_DEVELOPER
492
493 foreach (ScriptConsoleTabBase handler:m_TabHandlers)
494 {
495 handler.OnRPCEx(rpc_type,ctx);
496 }
497 #endif
498
499 }
500
501 override void OnShow()
502 {
503 super.OnShow();
504
505 // Inputs excluded when in script console menu
506 array<string> inputExcludes = {
507 // Menu
508 "movement",
509 "aiming",
510 "gestures",
511 "stances",
512 "optics",
513 "actions",
514 "hotkey",
515 "UAGear",
516 "UAVoiceLevel",
517 "UAVoiceModifierHelper",
518 "UAVoiceDistanceUp",
519 "UAVoiceDistanceDown",
520 "UAVoiceOverNet",
521 "UAVoiceOverNetToggle",
522 "UAVoiceOverNetMute",
523 // Inventory
524 "gestures",
525 "stances",
526 "optics",
527 "actions",
528 // Buldozer
529 "UABuldResetCamera",
530 "UABuldTurbo",
531 "UABuldSlow",
532 "UABuldRunScript",
533 "UABuldSelectToggle",
534 "UABuldFreeLook",
535 "UABuldSelect",
536 "UABuldSelectAddMod",
537 "UABuldSelectRemoveMod",
538 "UABuldModifySelected",
539 "UABuldCycleMod",
540 "UABuldRotationXAxisMod",
541 "UABuldRotationZAxisMod",
542 "UABuldCoordModCycle",
543 "UABuldSampleTerrainHeight",
544 "UABuldSetTerrainHeight",
545 "UABuldScaleMod",
546 "UABuldElevateMod",
547 "UABuldSmoothMod",
548 "UABuldFlattenMod",
549 "UABuldBrushRatioUp",
550 "UABuldBrushRatioDown",
551 "UABuldBrushOuterUp",
552 "UABuldBrushOuterDown",
553 "UABuldBrushStrengthUp",
554 "UABuldBrushStrengthDown",
555 "UABuldToggleNearestObjectArrow",
556 "UABuldCycleBrushMod",
557 "UABuldSelectionType",
558 "UABuldCreateLastSelectedObject",
559 "UABuldDuplicateSelection",
560 "UABuldDeleteSelection",
561 "UABuldUndo",
562 "UABuldRedo",
563 "UABuldMoveLeft",
564 "UABuldMoveRight",
565 "UABuldMoveForward",
566 "UABuldMoveBack",
567 "UABuldMoveUp",
568 "UABuldMoveDown",
569 "UABuldLeft",
570 "UABuldRight",
571 "UABuldForward",
572 "UABuldBack",
573 "UABuldLookLeft",
574 "UABuldLookRight",
575 "UABuldLookUp",
576 "UABuldLookDown",
577 "UABuldZoomIn",
578 "UABuldZoomOut",
579 "UABuldTextureInfo",
580 "UABuldViewerMoveForward",
581 "UABuldViewerMoveBack",
582 "UABuldViewerMoveLeft",
583 "UABuldViewerMoveRight",
584 "UABuldViewerMoveUp",
585 "UABuldViewerMoveDown",
586 "UABuldObjectRotateLeft",
587 "UABuldObjectRotateRight",
588 "UABuldObjectRotateForward",
589 "UABuldObjectRotateBack",
590 "UABuldPreviousAnimation",
591 "UABuldNextAnimation",
592 "UABuldRecedeAnimation",
593 "UABuldAdvanceAnimation"
594 };
595
597 {
598 inputExcludes.Remove(0);
599 }
600
601 g_Game.GetMission().AddActiveInputExcludes(inputExcludes);
602 }
603
605}
606
607
608class ScriptConsoleToolTipEventHandler : ScriptedWidgetEventHandler
609{
610 reference string HintMessage;
611 protected Widget m_Root;
612
613
614 protected float m_HoverTime;
618 protected ImageWidget m_HintWidgetBackground;
620
621 protected ref Timer m_Timer;
622
624 {
625 m_Root = w;
626 m_Root.SetHandler(this);
627 m_Root.SetFlags(WidgetFlags.VEXACTPOS);
628 }
629
630 override bool OnMouseEnter(Widget w, int x, int y)
631 {
632 m_Timer = new Timer();
633 m_Timer.Run(0.1, this, "Tick", NULL, true);
634
636 return true;
637 }
638
639 override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
640 {
642 return true;
643 }
644
645 protected bool Tick()
646 {
647 if (!m_Root.IsVisibleHierarchy())
650 {
651 m_HoverTime += 0.1;
652 if (m_HoverTime > 1)
653 {
654 HoverSuccess();
655 }
656 }
657 return true;
658 }
659
660 protected void DisplayHint(string message)
661 {
662 if (message)
663 {
664 m_HintWidgetRoot = g_Game.GetWorkspace().CreateWidgets("gui/layouts/script_console/script_console_hint.layout");
665 m_HintWidgetBackground = ImageWidget.Cast(m_HintWidgetRoot.FindAnyWidget("Background"));
666 m_HintWidget = RichTextWidget.Cast(m_HintWidgetRoot.FindAnyWidget("HintText"));
667
668 m_HintWidgetRoot.Show(true);
669 m_HintWidget.SetText(message);
670
671 int offsetX = 0;
672 int offsetY = 10;
673
674 int screenW, screenH;
675 GetScreenSize(screenW, screenH);
676
677 int mouseX, mouseY;
678 GetMousePos(mouseX,mouseY);
679
680 float relativeX = mouseX / screenW;
681 float relativeY = mouseY / screenH;
682
683 int width, height;
684 m_HintWidget.GetTextSize(width, height);
685 if (relativeX > 0.8)
686 offsetX = -width - offsetX;
687 if (relativeY > 0.8)
688 offsetY = -height - offsetY;
689
690 m_HintWidgetRoot.SetPos(mouseX + offsetX ,mouseY + offsetY);
691 m_HintWidgetBackground.SetScreenSize(width + 5, height + 5);
692
693 }
694 }
695
696 protected void HideHint()
697 {
699 m_HintWidgetRoot.Show(false);
700 }
701
702
703 protected string GetMessage()
704 {
705 return HintMessage;
706 }
707
708 protected void HoverSuccess()
709 {
712 }
713
714 protected void HoverInterrupt()
715 {
716 m_Timer = null;
719 m_HoverTime = 0;
720 HideHint();
721 }
722}
723
724
729
override void Tick()
Определения ContaminatedArea_Dynamic.c:106
DayZGame g_Game
Определения DayZGame.c:3942
ref Timer m_Timer
Определения DayZGame.c:707
Icon x
Icon y
void Close()
string path
Определения OptionSelectorMultistate.c:142
PluginConfigDebugProfile m_ConfigDebugProfile
Определения PluginItemDiagnostic.c:58
void PluginItemDiagnostic()
Определения PluginItemDiagnostic.c:74
PluginBase GetPlugin(typename plugin_type)
Определения PluginManager.c:325
ImageWidget m_HintWidgetBackground
Определения ScriptConsole.c:618
string GetMessage()
Определения ScriptConsole.c:703
Widget m_CurrentHoverWidget
Определения ScriptConsole.c:616
float m_HoverTime
Определения ScriptConsole.c:614
void HoverSuccess()
Определения ScriptConsole.c:708
RichTextWidget m_HintWidget
Определения ScriptConsole.c:619
class ScriptConsole extends UIScriptedMenu HintMessage
void HoverInterrupt()
Определения ScriptConsole.c:714
bool m_HoverSuccessTriggered
Определения ScriptConsole.c:615
Widget m_HintWidgetRoot
Определения ScriptConsole.c:617
void DisplayHint(string message)
Определения ScriptConsole.c:660
void HideHint()
Определения ScriptConsole.c:696
void ScriptConsoleEnfScriptTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
Определения ScriptConsoleEnfScriptTab.c:282
void ScriptConsoleWeatherTab(Widget root, ScriptConsole console, Widget button, ScriptConsoleTabBase parent=null)
Определения ScriptConsoleWeatherTab.c:237
Widget m_Root
Определения SizeToChild.c:91
proto native UAInputAPI GetUApi()
Определения EnWidgets.c:354
ref map< int, string > WidgetHintBindings
Определения ScriptConsole.c:727
Определения ScriptConsole.c:726
Определения EnMath.c:7
Определения gameplay.c:317
void Init(int id)
Определения ScriptConsoleTabBase.c:27
Widget GetButton()
Определения ScriptConsoleTabBase.c:69
void OnWidgetScriptInit(Widget w)
Определения SizeToChild.c:14
map: item x vector(index, width, height)
Определения EnWidgets.c:657
Определения DayZPlayerImplement.c:39
static ref array< ref MapMarker > m_MarkedEntities
Определения ScriptConsole.c:21
void ScriptConsole()
Определения ScriptConsole.c:37
void SetHintText(string text, Widget w)
Определения ScriptConsole.c:101
override bool OnMouseEnter(Widget w, int x, int y)
Определения ScriptConsole.c:355
override void OnShow()
Определения ScriptConsole.c:501
Widget m_CurrentHoverWidget
Определения ScriptConsole.c:6
ButtonWidget m_HintCancelButton
Определения ScriptConsole.c:12
void SelectTabByButton(Widget button)
Определения ScriptConsole.c:409
ButtonWidget m_HintClearButton
Определения ScriptConsole.c:13
string GetMessage()
Определения ScriptConsole.c:179
PluginConfigDebugProfile m_ConfigDebugProfile
Определения SceneEditorMenu.c:1129
EditBoxWidget m_HintInputText
Определения ScriptConsole.c:14
int m_SelectedTab
Определения ScriptConsole.c:22
override void Update(float timeslice)
Определения ScriptConsole.c:237
override void OnRPCEx(int rpc_type, ParamsReadContext ctx)
Определения ScriptConsole.c:488
void ~ScriptConsole()
Определения ScriptConsole.c:51
static ref JsonHintsData m_JsonData
Определения ScriptConsole.c:32
Widget m_ButtonsWindowWidget
Определения ScriptConsole.c:17
const string NO_HINT_TEXT
Определения ScriptConsole.c:34
void ShowMenuBackground(bool state)
Определения ScriptConsole.c:440
int GetWidgetCombinedHash(Widget w)
Определения ScriptConsole.c:165
Widget m_EditTooltipRoot
Определения ScriptConsole.c:9
override bool OnDoubleClick(Widget w, int x, int y, int button)
Определения ScriptConsole.c:332
void SelectTabByID(int id)
Определения ScriptConsole.c:402
override bool OnKeyPress(Widget w, int x, int y, int key)
Определения ScriptConsole.c:217
override void OnHide()
Определения ScriptConsole.c:210
void HoverInterrupt()
Определения ScriptConsole.c:201
ref map< Widget, ref ScriptConsoleTabBase > m_TabHandlers
Определения ScriptConsole.c:23
override bool OnItemSelected(Widget w, int x, int y, int row, int column, int oldRow, int oldColumn)
Определения ScriptConsole.c:380
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
Определения ScriptConsole.c:342
static const string HINTS_PATH_OPTIONAL
Определения ScriptConsole.c:30
static JsonHintsData GetData()
Определения ScriptConsole.c:84
void RegisterTab(ScriptConsoleTabBase handler)
Определения ScriptConsole.c:112
float m_PrevMouseY
Определения ScriptConsole.c:16
RichTextWidget m_HintWidget
Определения ScriptConsole.c:10
override bool OnKeyDown(Widget w, int x, int y, int key)
Определения ScriptConsole.c:227
override bool OnChange(Widget w, int x, int y, bool finished)
Определения ScriptConsole.c:370
override bool OnMouseButtonDown(Widget w, int x, int y, int button)
Определения ScriptConsole.c:285
ScriptConsoleTabBase m_SelectedHandler
Определения ScriptConsole.c:18
ref map< int, ref ScriptConsoleTabBase > m_TabHandlersByID
Определения ScriptConsole.c:24
static void SaveData()
Определения ScriptConsole.c:77
ButtonWidget m_HintOkButton
Определения ScriptConsole.c:11
bool m_HintEditMode
Определения ScriptConsole.c:3
void HoverSuccess()
Определения ScriptConsole.c:195
Widget m_HintWidgetRoot
Определения ScriptConsole.c:7
bool m_HoverSuccessTriggered
Определения ScriptConsole.c:5
override Widget Init()
Определения ScriptConsole.c:120
ImageWidget m_HintWidgetBackground
Определения ScriptConsole.c:8
void SelectTab(ScriptConsoleTabBase selectedHandler)
Определения ScriptConsole.c:416
ScriptConsoleTabBase GetTabHandler(typename tabType)
Определения ScriptConsole.c:390
ButtonWidget m_CloseConsoleButton
Определения HelpScreen.c:6
override bool OnClick(Widget w, int x, int y, int button)
Определения ScriptConsole.c:296
float m_HoverTime
Определения ScriptConsole.c:4
static const string HINTS_PATH_DEFAULT
Определения ScriptConsole.c:29
ScriptConsoleTabBase GetSelectedHandler()
Определения ScriptConsole.c:72
void HideHint()
Определения ScriptConsole.c:159
float m_PrevMouseX
Определения ScriptConsole.c:15
int m_Id
Определения ScriptConsole.c:19
void DisplayHint(string message)
Определения ScriptConsole.c:452
void SaveData()
Определения CameraToolsMenu.c:267
Определения DayZGame.c:64
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Определения CachedEquipmentStorage.c:4
Serializer ParamsReadContext
Определения gameplay.c:15
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
Определения EnSystem.c:157
proto native int KeyState(KeyCode key)
static proto float Sqrt(float val)
Returns square root.
static proto float AbsFloat(float f)
Returns absolute value.
proto void GetScreenSize(out int x, out int y)
proto void GetMousePos(out int x, out int y)
proto native int Hash()
Returns hash of string.
bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
WidgetFlags
Определения EnWidgets.c:58
bool OnMouseEnter(Widget w, int x, int y)
int ARGB(int a, int r, int g, int b)
Определения proto.c:322