108 bool m_BacklitActive;
110 void OnInit( DayZGame game )
113 if( game.IsClient() || !game.IsMultiplayer() )
114 m_BacklitActive =
true;
116 if( m_BacklitActive )
117 Print(
"... Backlit Effects Enabled");
123 if( !m_BacklitActive )
131 GetUApi().Backlit_Animation(
"Loading/",2,0xffc8c8c8,0xff080808);
132 GetUApi().Backlit_ForceUpdate();
136 void MainMenu_OnShow()
138 if( !m_BacklitActive )
143 GetUApi().Backlit_Animation(
"MainMenu/",2,0xffff0000,0xff080000);
144 GetUApi().Backlit_ForceUpdate();
148 void MainMenu_OnHide()
150 if( !m_BacklitActive )
154 GetUApi().Backlit_Background(0,0xff220000,0xff222222);
160 if( !m_BacklitActive )
165 api.Backlit_Background(0,0xff211202,0xff110800);
171 if( !m_BacklitActive )
175 if(
g_Game.GetMission().GetHud() )
179 api.Backlit_Background(0,0xff220000,0xff222222);
186 void OnSwimmingStart()
188 if( !m_BacklitActive )
193 api.Backlit_EmptyQueue();
195 api.Backlit_Animation(
"Water/",0,0xff00ffff,0xffffffff);
199 void OnSwimmingStop()
201 if( !m_BacklitActive )
204 if(
g_Game.GetMission().GetHud() )
207 GetUApi().Backlit_Background(0,0xff220000,0xff222222);
216 if( !m_BacklitActive )
224 void HintShow(
UAInput action )
226 if( !m_BacklitActive )
233 void KeybindingClear( )
235 if( !m_BacklitActive )
242 void KeybindingShow(
int keyHash )
244 if( !m_BacklitActive )
251 void VisualiseHealth(
int iLevel )
255 int aColor = 0xff1fff1f;
256 int dColor = 0xff001f00;
289 void VisualiseBlood(
int iLevel )
293 int aColor = 0xffff1f1f;
294 int dColor = 0xff1f0000;
327 int m_HealthBefore = -1;
328 int m_BloodBefore = -1;
333 void SetHealth(
float fHealth )
335 float health = fHealth * 0.01;
336 m_HealthNew = health*4;
339 void SetBlood(
float fBlood )
341 float blood = fBlood * 0.0002;
342 m_BloodNew = blood*4;
345 void UpdatePlayer(
bool bForce )
347 if( !m_BacklitActive )
358 if( m_HealthNew == m_HealthBefore && m_BloodNew == m_BloodBefore )
378 VisualiseHealth(m_HealthNew);
380 VisualiseBlood(m_BloodNew);
383 api.Backlit_Background(0,0xff220000,0xff222222);
386 m_BloodBefore = m_BloodNew;
387 m_HealthBefore = m_HealthNew;
391 int m_GearBefore = 0;
392 bool m_CELBefore =
false;
394 void RefreshVehicleLayout(
int iGear,
bool bCEL )
396 if( !m_BacklitActive )
401 if( m_GearBefore != iGear )
403 m_GearBefore = iGear;
405 int activeColor = 0xff3fff3f;
406 int dimmColor = 0xff0f3f0f;
408 if( iGear == CarGear.REVERSE )
413 if( iGear == CarGear.NEUTRAL )
418 if( iGear == CarGear.FIRST )
423 if( iGear == CarGear.SECOND )
428 if( iGear == CarGear.THIRD )
433 if( iGear == CarGear.FOURTH )
438 if( iGear == CarGear.FIFTH )
445 if( bCEL != m_CELBefore )