DayZ 1.27
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 (GetGame() && GetGame().GetMission() && GetGame().GetMission().GetHud())
41 {
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 {
58 }
60 m_HintWidgetRoot.Unlink();
61 #endif
63 if (plugin)
64 plugin.OnScriptMenuOpened(false);
65
66 if (GetGame() && GetGame().GetMission())
67 {
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();
151
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 {
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();
295 return true;
296 }
297 else if (w == m_HintOkButton)
298 {
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 {
396 if (tab)
397 SelectTab(tab);
398 }
399
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
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;
609 protected ImageWidget m_HintWidgetBackground;
611
612 protected ref Timer m_Timer;
613
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
720
map
Определения ControlsXboxNew.c:4
ref Timer m_Timer
Определения DayZGame.c:705
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:316
ImageWidget m_HintWidgetBackground
Определения ScriptConsole.c:609
string GetMessage()
Определения ScriptConsole.c:694
Widget m_CurrentHoverWidget
Определения ScriptConsole.c:607
float m_HoverTime
Определения ScriptConsole.c:605
void HoverSuccess()
Определения ScriptConsole.c:699
RichTextWidget m_HintWidget
Определения ScriptConsole.c:610
class ScriptConsole extends UIScriptedMenu HintMessage
void HoverInterrupt()
Определения ScriptConsole.c:705
bool m_HoverSuccessTriggered
Определения ScriptConsole.c:606
Widget m_HintWidgetRoot
Определения ScriptConsole.c:608
void DisplayHint(string message)
Определения ScriptConsole.c:651
void HideHint()
Определения ScriptConsole.c:687
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
void Tick()
Определения SoundEvents.c:107
proto native UAInputAPI GetUApi()
proto native UIManager GetUIManager()
proto native WorkspaceWidget GetWorkspace()
proto native Mission GetMission()
Определения EnWidgets.c:354
void ShowQuickbarPlayer(bool show)
void ShowHudPlayer(bool show)
ref map< int, string > WidgetHintBindings
Определения ScriptConsole.c:718
Определения ScriptConsole.c:717
Определения EnMath.c:7
void AddActiveInputExcludes(array< string > excludes)
Hud GetHud()
Определения gameplay.c:721
void EnableAllInputs(bool bForceSupress=false)
void RemoveActiveInputExcludes(array< string > excludes, bool bForceSupress=false)
deprecated
Определения 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:651
Определения DayZPlayerImplement.c:63
bool Back()
Close top window on windows stack, returns true when any window is closed.
Определения UIManager.c:62
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:346
override void OnShow()
Определения ScriptConsole.c:492
Widget m_CurrentHoverWidget
Определения ScriptConsole.c:6
ButtonWidget m_HintCancelButton
Определения ScriptConsole.c:12
void SelectTabByButton(Widget button)
Определения ScriptConsole.c:400
ButtonWidget m_HintClearButton
Определения ScriptConsole.c:13
string GetMessage()
Определения ScriptConsole.c:177
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:228
override void OnRPCEx(int rpc_type, ParamsReadContext ctx)
Определения ScriptConsole.c:479
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:431
int GetWidgetCombinedHash(Widget w)
Определения ScriptConsole.c:163
Widget m_EditTooltipRoot
Определения ScriptConsole.c:9
override bool OnDoubleClick(Widget w, int x, int y, int button)
Определения ScriptConsole.c:323
void SelectTabByID(int id)
Определения ScriptConsole.c:393
override bool OnKeyPress(Widget w, int x, int y, int key)
Определения ScriptConsole.c:208
void HoverInterrupt()
Определения ScriptConsole.c:199
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:371
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
Определения ScriptConsole.c:333
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:218
override bool OnChange(Widget w, int x, int y, bool finished)
Определения ScriptConsole.c:361
override bool OnMouseButtonDown(Widget w, int x, int y, int button)
Определения ScriptConsole.c:276
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:193
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:407
ScriptConsoleTabBase GetTabHandler(typename tabType)
Определения ScriptConsole.c:381
ButtonWidget m_CloseConsoleButton
Определения HelpScreen.c:6
override bool OnClick(Widget w, int x, int y, int button)
Определения ScriptConsole.c:287
float m_HoverTime
Определения ScriptConsole.c:4
static const string HINTS_PATH_DEFAULT
Определения ScriptConsole.c:29
ScriptConsoleTabBase GetSelectedHandler()
Определения ScriptConsole.c:72
void HideHint()
Определения ScriptConsole.c:157
float m_PrevMouseX
Определения ScriptConsole.c:15
int m_Id
Определения ScriptConsole.c:19
void DisplayHint(string message)
Определения ScriptConsole.c:443
void SaveData()
Определения CameraToolsMenu.c:267
Определения DayZGame.c:64
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
Serializer ParamsReadContext
Определения gameplay.c:15
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
Определения 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
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.
bool OnMouseEnter(Widget w, int x, int y)
int ARGB(int a, int r, int g, int b)
Определения proto.c:322