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 )
164 GetUApi().Backlit_Background(0,0xff211202,0xff110800);
170 if( !m_BacklitActive )
174 if(
GetGame().GetMission().GetHud() )
177 GetUApi().Backlit_Background(0,0xff220000,0xff222222);
184 void OnSwimmingStart()
186 if( !m_BacklitActive )
190 GetUApi().Backlit_EmptyQueue();
192 GetUApi().Backlit_Animation(
"Water/",0,0xff00ffff,0xffffffff);
196 void OnSwimmingStop()
198 if( !m_BacklitActive )
201 if(
GetGame().GetMission().GetHud() )
204 GetUApi().Backlit_Background(0,0xff220000,0xff222222);
213 if( !m_BacklitActive )
221 void HintShow(
UAInput action )
223 if( !m_BacklitActive )
230 void KeybindingClear( )
232 if( !m_BacklitActive )
239 void KeybindingShow(
int keyHash )
241 if( !m_BacklitActive )
248 void VisualiseHealth(
int iLevel )
252 int aColor = 0xff1fff1f;
253 int dColor = 0xff001f00;
286 void VisualiseBlood(
int iLevel )
290 int aColor = 0xffff1f1f;
291 int dColor = 0xff1f0000;
324 int m_HealthBefore = -1;
325 int m_BloodBefore = -1;
330 void SetHealth(
float fHealth )
332 float health = fHealth * 0.01;
333 m_HealthNew = health*4;
336 void SetBlood(
float fBlood )
338 float blood = fBlood * 0.0002;
339 m_BloodNew = blood*4;
342 void UpdatePlayer(
bool bForce )
344 if( !m_BacklitActive )
355 if( m_HealthNew == m_HealthBefore && m_BloodNew == m_BloodBefore )
374 VisualiseHealth(m_HealthNew);
376 VisualiseBlood(m_BloodNew);
379 GetUApi().Backlit_Background(0,0xff220000,0xff222222);
382 m_BloodBefore = m_BloodNew;
383 m_HealthBefore = m_HealthNew;
387 int m_GearBefore = 0;
388 bool m_CELBefore =
false;
390 void RefreshVehicleLayout(
int iGear,
bool bCEL )
392 if( !m_BacklitActive )
397 if( m_GearBefore != iGear )
399 m_GearBefore = iGear;
401 int activeColor = 0xff3fff3f;
402 int dimmColor = 0xff0f3f0f;
404 if( iGear == CarGear.REVERSE )
409 if( iGear == CarGear.NEUTRAL )
414 if( iGear == CarGear.FIRST )
419 if( iGear == CarGear.SECOND )
424 if( iGear == CarGear.THIRD )
429 if( iGear == CarGear.FOURTH )
434 if( iGear == CarGear.FIFTH )
441 if( bCEL != m_CELBefore )