4 [
Attribute(
"", UIWidgets.EditBox,
"Gauge custom needle texture. If not selected, default is used.")]
5 protected string m_sCustomNeedle2;
7 protected ImageWidget m_wNeedle2;
8 protected ImageWidget m_wNeedle2Shadow;
10 override void CreateGauge(IEntity owner, out
bool bSuccess)
12 super.CreateGauge(owner, bSuccess);
15 m_wNeedle2 = ImageWidget.Cast(
m_wRoot.FindAnyWidget(
"Needle2"));
16 m_wNeedle2Shadow = ImageWidget.Cast(
m_wRoot.FindAnyWidget(
"Needle2Shadow"));
17 bSuccess = CreateGaugeNeedle(owner, m_wNeedle2, m_wNeedle2Shadow, m_sCustomNeedle2);
23 override void UpdateGauge(IEntity owner,
float timeSlice,
float value)
26 float fValuePerc = (value - m_fValueMin) / m_fValueRange;
28 UpdateGaugeNeedle(owner, timeSlice, m_wNeedle, m_wNeedleShadow, fValuePerc, 1,
false);
29 UpdateGaugeNeedle(owner, timeSlice, m_wNeedle2, m_wNeedle2Shadow, fValuePerc, 0.1,
false);