DayZ 1.24
Loading...
Searching...
No Matches
DebugMonitor.c
Go to the documentation of this file.
2{
8
10 {
11 m_WidgetRoot = GetGame().GetWorkspace().CreateWidgets("gui/layouts/debug/day_z_debug_monitor.layout");
12 m_WidgetRoot.Show(false);
13
14 m_pWindowLabelText = TextWidget.Cast(m_WidgetRoot.FindAnyWidget("WindowLabel"));
15 m_pNamesListboxWidget = TextListboxWidget.Cast(m_WidgetRoot.FindAnyWidget("NamesListboxWidget"));
16 m_pValuesListboxWidget = TextListboxWidget.Cast(m_WidgetRoot.FindAnyWidget("ValuesListboxWidget"));
17 m_pModifiersMultiTextWidget = MultilineTextWidget.Cast(m_WidgetRoot.FindAnyWidget("ModifiersMultilineTextWidget"));
18 }
19
20 void Init()
21 {
22 m_pNamesListboxWidget.AddItem("HEALTH:", NULL, 0);
23 m_pValuesListboxWidget.AddItem("", NULL, 0);
24
25 m_pNamesListboxWidget.AddItem("BLOOD:", NULL, 0);
26 m_pValuesListboxWidget.AddItem("", NULL, 0);
27
28 /*m_pNamesListboxWidget.AddItem("BODY TEMP:", NULL, 0);
29 m_pValuesListboxWidget.AddItem("", NULL, 0);*/
30
31 m_pNamesListboxWidget.AddItem("LAST DAMAGE:", NULL, 0);
32 m_pValuesListboxWidget.AddItem("", NULL, 0);
33
34 m_pNamesListboxWidget.AddItem("POSITION:", NULL, 0);
35 m_pValuesListboxWidget.AddItem("", NULL, 0);
36
37 /*m_pNamesListboxWidget.AddItem("MODIFIERS:", NULL, 0);
38 m_pValuesListboxWidget.AddItem("", NULL, 0);*/
39
40 //m_DebugFloatsListWidget.AddItem(key,NULL,0);
41 //m_DebugFloatsListWidget.SetItem(i,value.ToString(),NULL,1);
42
43 m_WidgetRoot.Show(true);
44 }
45
46 void SetHealth(float value)
47 {
48 string health = string.Format(" %1", value.ToString());
49 m_pValuesListboxWidget.SetItem(0, health, NULL, 0);
50 }
51
52 void SetBlood(float value)
53 {
54 string blood = string.Format(" %1", value.ToString());
55 m_pValuesListboxWidget.SetItem(1, blood, NULL, 0);
56 }
57
58 void SetLastDamage(string value)
59 {
60 string lastDamage = string.Format(" %1", value);
62 }
63
65 {
66 string position = string.Format(" %1 %2 %3", value[0].ToString(), value[1].ToString(), value[2].ToString());
67 m_pValuesListboxWidget.SetItem(3, position, NULL, 0);
68 }
69
70 void Show()
71 {
72 m_WidgetRoot.Show(true);
73 }
74
75 void Hide()
76 {
77 m_WidgetRoot.Show(false);
78 }
79};
80
proto string ToString()
TextListboxWidget m_pNamesListboxWidget
Definition DebugMonitor.c:5
void SetLastDamage(string value)
void SetBlood(float value)
void SetHealth(float value)
MultilineTextWidget m_pModifiersMultiTextWidget
Definition DebugMonitor.c:7
Widget m_WidgetRoot
Definition DebugMonitor.c:3
void SetPosition(vector value)
TextListboxWidget m_pValuesListboxWidget
Definition DebugMonitor.c:6
void DebugMonitor()
Definition DebugMonitor.c:9
TextWidget m_pWindowLabelText
Definition DebugMonitor.c:4
proto native CGame GetGame()