DayZ 1.24
Loading...
Searching...
No Matches
DebugMonitor Class Reference
Collaboration diagram for DebugMonitor:
[legend]

Private Member Functions

void DebugMonitor ()
 
void Init ()
 
void SetHealth (float value)
 
void SetBlood (float value)
 
void SetLastDamage (string value)
 
void SetPosition (vector value)
 
void Show ()
 
void Hide ()
 

Private Attributes

Widget m_WidgetRoot
 
TextWidget m_pWindowLabelText
 
TextListboxWidget m_pNamesListboxWidget
 
TextListboxWidget m_pValuesListboxWidget
 
MultilineTextWidget m_pModifiersMultiTextWidget
 

Detailed Description

Definition at line 1 of file DebugMonitor.c.

Constructor & Destructor Documentation

◆ DebugMonitor()

void DebugMonitor::DebugMonitor ( )
inlineprivate

Definition at line 9 of file DebugMonitor.c.

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 }
TextListboxWidget m_pNamesListboxWidget
Definition DebugMonitor.c:5
MultilineTextWidget m_pModifiersMultiTextWidget
Definition DebugMonitor.c:7
Widget m_WidgetRoot
Definition DebugMonitor.c:3
TextListboxWidget m_pValuesListboxWidget
Definition DebugMonitor.c:6
TextWidget m_pWindowLabelText
Definition DebugMonitor.c:4
proto native CGame GetGame()

References GetGame(), m_pModifiersMultiTextWidget, m_pNamesListboxWidget, m_pValuesListboxWidget, m_pWindowLabelText, and m_WidgetRoot.

Member Function Documentation

◆ Hide()

void DebugMonitor::Hide ( )
inlineprivate

Definition at line 75 of file DebugMonitor.c.

76 {
77 m_WidgetRoot.Show(false);
78 }

References m_WidgetRoot.

◆ Init()

void DebugMonitor::Init ( )
inlineprivate

Definition at line 20 of file DebugMonitor.c.

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 }

References m_pNamesListboxWidget, m_pValuesListboxWidget, and m_WidgetRoot.

◆ SetBlood()

void DebugMonitor::SetBlood ( float value)
inlineprivate

Definition at line 52 of file DebugMonitor.c.

53 {
54 string blood = string.Format(" %1", value.ToString());
55 m_pValuesListboxWidget.SetItem(1, blood, NULL, 0);
56 }

References m_pValuesListboxWidget.

◆ SetHealth()

void DebugMonitor::SetHealth ( float value)
inlineprivate

Definition at line 46 of file DebugMonitor.c.

47 {
48 string health = string.Format(" %1", value.ToString());
49 m_pValuesListboxWidget.SetItem(0, health, NULL, 0);
50 }

References m_pValuesListboxWidget.

◆ SetLastDamage()

void DebugMonitor::SetLastDamage ( string value)
inlineprivate

Definition at line 58 of file DebugMonitor.c.

59 {
60 string lastDamage = string.Format(" %1", value);
62 }

References m_pValuesListboxWidget.

◆ SetPosition()

void DebugMonitor::SetPosition ( vector value)
inlineprivate

Definition at line 64 of file DebugMonitor.c.

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 }
proto string ToString()

References m_pValuesListboxWidget, and ToString().

◆ Show()

void DebugMonitor::Show ( )
inlineprivate

Definition at line 70 of file DebugMonitor.c.

71 {
72 m_WidgetRoot.Show(true);
73 }

References m_WidgetRoot.

Member Data Documentation

◆ m_pModifiersMultiTextWidget

MultilineTextWidget DebugMonitor::m_pModifiersMultiTextWidget
private

Definition at line 7 of file DebugMonitor.c.

Referenced by DebugMonitor().

◆ m_pNamesListboxWidget

TextListboxWidget DebugMonitor::m_pNamesListboxWidget
private

Definition at line 5 of file DebugMonitor.c.

Referenced by DebugMonitor(), and Init().

◆ m_pValuesListboxWidget

TextListboxWidget DebugMonitor::m_pValuesListboxWidget
private

Definition at line 6 of file DebugMonitor.c.

Referenced by DebugMonitor(), Init(), SetBlood(), SetHealth(), SetLastDamage(), and SetPosition().

◆ m_pWindowLabelText

TextWidget DebugMonitor::m_pWindowLabelText
private

Definition at line 4 of file DebugMonitor.c.

Referenced by DebugMonitor().

◆ m_WidgetRoot

Widget DebugMonitor::m_WidgetRoot
private

Definition at line 3 of file DebugMonitor.c.

Referenced by DebugMonitor(), Hide(), Init(), and Show().


The documentation for this class was generated from the following file: