4 [
Attribute(
"0", UIWidgets.CheckBox,
"Show difference of value")]
5 protected bool m_bShowValueDiff;
7 private TextWidget m_wInfoText2;
9 private IEntity m_Owner;
10 private bool m_bGaugeShown;
11 private float m_fLastValue = 0.0;
18 void EnableHUD(
bool enable )
28 m_bGaugeShown =
false;
33 override void CreateGauge(IEntity owner, out
bool bSuccess)
35 super.CreateGauge( owner, bSuccess);
37 m_wInfoText2 = TextWidget.Cast(
m_wRoot.FindAnyWidget(
"InfoText2"));
38 m_wInfoText2.SetVisible(
true);
39 m_wInfoText2.SetText(
"0");
43 override void UpdateGauge(IEntity owner,
float timeSlice,
float value)
45 super.UpdateGauge(owner, timeSlice, value);
47 if (m_fLastValue == 0)
50 value = Math.Round(m_fLastValue - value);
51 m_wInfoText2.SetText(value.ToString());