3 private Widget m_WidgetRoot;
5 private TextListboxWidget m_pNamesListboxWidget;
6 private TextListboxWidget m_pValuesListboxWidget;
7 private MultilineTextWidget m_pModifiersMultiTextWidget;
11 m_WidgetRoot =
GetGame().GetWorkspace().CreateWidgets(
"gui/layouts/debug/day_z_debug_monitor.layout");
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") );
22 m_pNamesListboxWidget.AddItem(
"HEALTH:", NULL, 0);
23 m_pValuesListboxWidget.AddItem(
"", NULL, 0);
25 m_pNamesListboxWidget.AddItem(
"BLOOD:", NULL, 0);
26 m_pValuesListboxWidget.AddItem(
"", NULL, 0);
31 m_pNamesListboxWidget.AddItem(
"LAST DAMAGE:", NULL, 0);
32 m_pValuesListboxWidget.AddItem(
"", NULL, 0);
34 m_pNamesListboxWidget.AddItem(
"POSITION:", NULL, 0);
35 m_pValuesListboxWidget.AddItem(
"", NULL, 0);
46 void SetHealth(
float value)
48 string health =
string.Format(
" %1", value.ToString());
49 m_pValuesListboxWidget.SetItem(0, health, NULL, 0);
52 void SetBlood(
float value)
54 string blood =
string.Format(
" %1", value.ToString());
55 m_pValuesListboxWidget.SetItem(1, blood, NULL, 0);
58 void SetLastDamage(
string value)
60 string lastDamage =
string.Format(
" %1", value);
61 m_pValuesListboxWidget.SetItem(2, lastDamage, NULL, 0);
64 void SetPosition(
vector value)
67 m_pValuesListboxWidget.SetItem(3, position, NULL, 0);