DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс Backlit

Backlit effect class. Подробнее...

Закрытые члены

void OnInit (DayZGame game)
 
void LoadingAnim ()
 
void MainMenu_OnShow ()
 
void MainMenu_OnHide ()
 
void OnEnterCar ()
 
void OnLeaveCar ()
 
void OnSwimmingStart ()
 
void OnSwimmingStop ()
 
void HintClear ()
 
void HintShow (UAInput action)
 
void KeybindingClear ()
 
void KeybindingShow (int keyHash)
 
void VisualiseHealth (int iLevel)
 
void VisualiseBlood (int iLevel)
 
void SetHealth (float fHealth)
 
void SetBlood (float fBlood)
 
void UpdatePlayer (bool bForce)
 
void RefreshVehicleLayout (int iGear, bool bCEL)
 

Закрытые данные

bool m_BacklitActive
 
int m_HealthBefore = -1
 
int m_BloodBefore = -1
 
int m_HealthNew = 0
 
int m_BloodNew = 0
 
int m_GearBefore = 0
 
bool m_CELBefore = false
 

Подробное описание

Backlit effect class.

Методы

◆ HintClear()

void HintClear ( )
inlineprivate
212 {
213 if( !m_BacklitActive )
214 return; // always return when backlit not present!
215
216 // remove previous backlit
217 GetUApi().Backlit_Remove(EUABLAYER_HINTKEY);
218 }
const int EUABLAYER_HINTKEY
Definition Backlit.c:13
proto native UAInputAPI GetUApi()
bool m_BacklitActive
Definition Backlit.c:108

Перекрестные ссылки EUABLAYER_HINTKEY, GetUApi() и m_BacklitActive.

◆ HintShow()

void HintShow ( UAInput action)
inlineprivate
222 {
223 if( !m_BacklitActive )
224 return; // always return when backlit not present!
225
226 action.Backlit_Override(EUABLAYER_HINTKEY,0xffafafff);
227 }
Definition EntityAI.c:95

Перекрестные ссылки EUABLAYER_HINTKEY и m_BacklitActive.

◆ KeybindingClear()

void KeybindingClear ( )
inlineprivate
231 {
232 if( !m_BacklitActive )
233 return; // always return when backlit not present!
234
235 GetUApi().Backlit_Remove(EUABLAYER_ALL);
236 }
const int EUABLAYER_ALL
Input layer type.
Definition Backlit.c:12

Перекрестные ссылки EUABLAYER_ALL, GetUApi() и m_BacklitActive.

◆ KeybindingShow()

void KeybindingShow ( int keyHash)
inlineprivate
240 {
241 if( !m_BacklitActive )
242 return; // always return when backlit not present!
243
244 GetUApi().Backlit_KeyByHash(keyHash,EUABLAYER_VISKEY,EUABACKLIT_FADEOUT_SLOW,0xff0000ff);
245 }
const int EUABLAYER_VISKEY
Definition Backlit.c:14
const int EUABACKLIT_FADEOUT_SLOW
Definition Backlit.c:30

Перекрестные ссылки EUABACKLIT_FADEOUT_SLOW, EUABLAYER_VISKEY, GetUApi() и m_BacklitActive.

◆ LoadingAnim()

void LoadingAnim ( )
inlineprivate
122 {
123 if( !m_BacklitActive )
124 return; // always return when backlit not present!
125
126 // lighten up your desktop
127 GetUApi().Backlit_KeyByName("kD",EUABLAYER_LOADING,EUABACKLIT_ON,0xffff0000);
128 GetUApi().Backlit_KeyByName("kA",EUABLAYER_LOADING,EUABACKLIT_ON,0xffcf0000);
129 GetUApi().Backlit_KeyByName("kY",EUABLAYER_LOADING,EUABACKLIT_ON,0xffaf0000);
130 GetUApi().Backlit_KeyByName("kZ",EUABLAYER_LOADING,EUABACKLIT_ON,0xff8f0000);
131 GetUApi().Backlit_Animation("Loading/",2,0xffc8c8c8,0xff080808);
132 GetUApi().Backlit_ForceUpdate();
133 }
const int EUABLAYER_LOADING
Definition Backlit.c:20
const int EUABACKLIT_ON
Definition Backlit.c:27

Перекрестные ссылки EUABACKLIT_ON, EUABLAYER_LOADING, GetUApi() и m_BacklitActive.

◆ MainMenu_OnHide()

void MainMenu_OnHide ( )
inlineprivate
149 {
150 if( !m_BacklitActive )
151 return; // always return when backlit not present!
152
153 GetUApi().Backlit_Remove(EUABLAYER_ALL);
154 GetUApi().Backlit_Background(0,0xff220000,0xff222222);
155 }

Перекрестные ссылки EUABLAYER_ALL, GetUApi() и m_BacklitActive.

◆ MainMenu_OnShow()

void MainMenu_OnShow ( )
inlineprivate
137 {
138 if( !m_BacklitActive )
139 return; // always return when backlit not present!
140
141 // lighten up your desktop
142 GetUApi().Backlit_Remove(EUABLAYER_ALL);
143 GetUApi().Backlit_Animation("MainMenu/",2,0xffff0000,0xff080000);
144 GetUApi().Backlit_ForceUpdate();
145 }

Перекрестные ссылки EUABLAYER_ALL, GetUApi() и m_BacklitActive.

◆ OnEnterCar()

void OnEnterCar ( )
inlineprivate
159 {
160 if( !m_BacklitActive )
161 return; // always return when backlit not present!
162
163 GetUApi().Backlit_Remove(EUABLAYER_ALL);
164 GetUApi().Backlit_Background(0,0xff211202,0xff110800);
165 }

Перекрестные ссылки EUABLAYER_ALL, GetUApi() и m_BacklitActive.

◆ OnInit()

void OnInit ( DayZGame game)
inlineprivate
111 {
112 // enable only on client/ standalone!
113 if( game.IsClient() || !game.IsMultiplayer() )
114 m_BacklitActive = true;
115
116 if( m_BacklitActive )
117 Print("... Backlit Effects Enabled");
118 }
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки m_BacklitActive и Print().

◆ OnLeaveCar()

void OnLeaveCar ( )
inlineprivate
169 {
170 if( !m_BacklitActive )
171 return; // always return when backlit not present!
172
173 // force update player
174 if( GetGame().GetMission().GetHud() )
175 {
176 GetUApi().Backlit_Remove(EUABLAYER_ALL);
177 GetUApi().Backlit_Background(0,0xff220000,0xff222222);
178
179 UpdatePlayer(true);
180 }
181 }
void UpdatePlayer(bool bForce)
Definition Backlit.c:342
proto native CGame GetGame()

Перекрестные ссылки EUABLAYER_ALL, GetGame(), GetUApi(), m_BacklitActive и UpdatePlayer().

◆ OnSwimmingStart()

void OnSwimmingStart ( )
inlineprivate
185 {
186 if( !m_BacklitActive )
187 return; // always return when backlit not present!
188
189 // reset queue
190 GetUApi().Backlit_EmptyQueue();
191 // play hit animation
192 GetUApi().Backlit_Animation("Water/",0,0xff00ffff,0xffffffff);
193 }

Перекрестные ссылки GetUApi() и m_BacklitActive.

◆ OnSwimmingStop()

void OnSwimmingStop ( )
inlineprivate
197 {
198 if( !m_BacklitActive )
199 return; // always return when backlit not present!
200
201 if( GetGame().GetMission().GetHud() )
202 {
203 // enqueue background
204 GetUApi().Backlit_Background(0,0xff220000,0xff222222);
205 // force update player
206 UpdatePlayer(true);
207 }
208 }

Перекрестные ссылки GetGame(), GetUApi(), m_BacklitActive и UpdatePlayer().

◆ RefreshVehicleLayout()

void RefreshVehicleLayout ( int iGear,
bool bCEL )
inlineprivate
391 {
392 if( !m_BacklitActive )
393 return; // always return when backlit not present!
394
396
397 if( m_GearBefore != iGear )
398 {
400
401 int activeColor = 0xff3fff3f;
402 int dimmColor = 0xff0f3f0f;
403
404 if( iGear == CarGear.REVERSE )
405 ua_api.Backlit_KeyByName("kR",EUABLAYER_CAR,EUABACKLIT_ON,activeColor);
406 else
407 ua_api.Backlit_KeyByName("kR",EUABLAYER_CAR,EUABACKLIT_ON,dimmColor);
408
409 if( iGear == CarGear.NEUTRAL )
410 ua_api.Backlit_KeyByName("kN",EUABLAYER_CAR,EUABACKLIT_ON,activeColor);
411 else
412 ua_api.Backlit_KeyByName("kN",EUABLAYER_CAR,EUABACKLIT_ON,dimmColor);
413
414 if( iGear == CarGear.FIRST )
415 ua_api.Backlit_KeyByName("k1",EUABLAYER_CAR,EUABACKLIT_ON,activeColor);
416 else
417 ua_api.Backlit_KeyByName("k1",EUABLAYER_CAR,EUABACKLIT_ON,dimmColor);
418
419 if( iGear == CarGear.SECOND )
420 ua_api.Backlit_KeyByName("k2",EUABLAYER_CAR,EUABACKLIT_ON,activeColor);
421 else
422 ua_api.Backlit_KeyByName("k2",EUABLAYER_CAR,EUABACKLIT_ON,dimmColor);
423
424 if( iGear == CarGear.THIRD )
425 ua_api.Backlit_KeyByName("k3",EUABLAYER_CAR,EUABACKLIT_ON,activeColor);
426 else
427 ua_api.Backlit_KeyByName("k3",EUABLAYER_CAR,EUABACKLIT_ON,dimmColor);
428
429 if( iGear == CarGear.FOURTH )
430 ua_api.Backlit_KeyByName("k4",EUABLAYER_CAR,EUABACKLIT_ON,activeColor);
431 else
432 ua_api.Backlit_KeyByName("k4",EUABLAYER_CAR,EUABACKLIT_ON,dimmColor);
433
434 if( iGear == CarGear.FIFTH )
435 ua_api.Backlit_KeyByName("k5",EUABLAYER_CAR,EUABACKLIT_ON,activeColor);
436 else
437 ua_api.Backlit_KeyByName("k5",EUABLAYER_CAR,EUABACKLIT_ON,dimmColor);
438
439 }
440
441 if( bCEL != m_CELBefore )
442 {
444
445 if( bCEL )
446 ua_api.Backlit_KeyByName("kC",EUABLAYER_CAR,EUABACKLIT_ON,0xffff0f0f);
447 else
448 ua_api.Backlit_KeyByName("kC",EUABLAYER_CAR,EUABACKLIT_NONE,0xff000000);
449 }
450
451 }
const int EUABACKLIT_NONE
Input backlit type.
Definition Backlit.c:26
const int EUABLAYER_CAR
Definition Backlit.c:16
int m_GearBefore
Definition Backlit.c:387
bool m_CELBefore
Definition Backlit.c:388
Definition UAInput.c:165

Перекрестные ссылки EUABACKLIT_NONE, EUABACKLIT_ON, EUABLAYER_CAR, GetUApi(), m_BacklitActive, m_CELBefore и m_GearBefore.

◆ SetBlood()

void SetBlood ( float fBlood)
inlineprivate
337 {
338 float blood = fBlood * 0.0002; // div 5000
339 m_BloodNew = blood*4; // 4 stages
340 }
int m_BloodNew
Definition Backlit.c:328

Перекрестные ссылки m_BloodNew.

◆ SetHealth()

void SetHealth ( float fHealth)
inlineprivate
331 {
332 float health = fHealth * 0.01; // div 100
333 m_HealthNew = health*4; // 4 stages
334 }
int m_HealthNew
Definition Backlit.c:327

Перекрестные ссылки m_HealthNew.

◆ UpdatePlayer()

void UpdatePlayer ( bool bForce)
inlineprivate
343 {
344 if( !m_BacklitActive )
345 return; // always return when backlit not present!
346
347 // force update
348 if( bForce )
349 {
350 m_HealthBefore = -1;
351 m_BloodBefore = -1;
352 }
353
354 // do not update
356 return;
357
358 // remove previous layers
359 GetUApi().Backlit_Remove(EUABLAYER_ALL);
360
361 // set keys to layer CUSTOM
362 GetUApi().Backlit_KeyByName("kW",EUABLAYER_CUSTOM,EUABACKLIT_ON,0xff0000ff);
363 GetUApi().Backlit_KeyByName("kA",EUABLAYER_CUSTOM,EUABACKLIT_ON,0xff0000cf);
364 GetUApi().Backlit_KeyByName("kS",EUABLAYER_CUSTOM,EUABACKLIT_ON,0xff0000af);
365 GetUApi().Backlit_KeyByName("kD",EUABLAYER_CUSTOM,EUABACKLIT_ON,0xff00008f);
366
367 GetUApi().Backlit_KeyByName("kX",EUABLAYER_CUSTOM,EUABACKLIT_ON,0xff3f3f3f);
368 GetUApi().Backlit_KeyByName("kC",EUABLAYER_CUSTOM,EUABACKLIT_ON,0xff3f3f3f);
369
370 GetUApi().Backlit_KeyByName("kQ",EUABLAYER_CUSTOM,EUABACKLIT_ON,0xff7f7f0f);
371 GetUApi().Backlit_KeyByName("kE",EUABLAYER_CUSTOM,EUABACKLIT_ON,0xff7f7f0f);
372
373 // health
375 // blood
377
378 // animation
379 GetUApi().Backlit_Background(0,0xff220000,0xff222222);
380
381 // save level
384 }
const int EUABLAYER_CUSTOM
Definition Backlit.c:19
void VisualiseHealth(int iLevel)
Definition Backlit.c:248
void VisualiseBlood(int iLevel)
Definition Backlit.c:286
int m_HealthBefore
Definition Backlit.c:324
int m_BloodBefore
Definition Backlit.c:325

Перекрестные ссылки EUABACKLIT_ON, EUABLAYER_ALL, EUABLAYER_CUSTOM, GetUApi(), m_BacklitActive, m_BloodBefore, m_BloodNew, m_HealthBefore, m_HealthNew, VisualiseBlood() и VisualiseHealth().

Используется в OnLeaveCar() и OnSwimmingStop().

◆ VisualiseBlood()

void VisualiseBlood ( int iLevel)
inlineprivate
287 {
289
290 int aColor = 0xffff1f1f;
291 int dColor = 0xff1f0000;
292
293 if( iLevel > 0 )
294 ua_api.Backlit_KeyByName("kF5",EUABLAYER_HUMAN,EUABACKLIT_ON,aColor);
295 else
296 ua_api.Backlit_KeyByName("kF5",EUABLAYER_HUMAN,EUABACKLIT_ON,dColor );
297 if( iLevel > 1 )
298 ua_api.Backlit_KeyByName("kF6",EUABLAYER_HUMAN,EUABACKLIT_ON,aColor);
299 else
300 ua_api.Backlit_KeyByName("kF6",EUABLAYER_HUMAN,EUABACKLIT_ON,dColor );
301 if( iLevel > 2 )
302 ua_api.Backlit_KeyByName("kF7",EUABLAYER_HUMAN,EUABACKLIT_ON,aColor);
303 else
304 ua_api.Backlit_KeyByName("kF7",EUABLAYER_HUMAN,EUABACKLIT_ON,dColor );
305 if( iLevel > 3 )
306 ua_api.Backlit_KeyByName("kF8",EUABLAYER_HUMAN,EUABACKLIT_ON,aColor);
307 else
308 ua_api.Backlit_KeyByName("kF8",EUABLAYER_HUMAN,EUABACKLIT_ON,dColor );
309
310/* int lc = 0xff1f0000;
311 if( iLevel > 0 )
312 lc = 0xff3f0000;
313 else if( iLevel > 1 )
314 lc = 0xff7f0000;
315 else if( iLevel > 2 )
316 lc = 0xffaf0000;
317 else if( iLevel > 3 )
318 lc = iLevel;
319
320 ua_api.Backlit_KeyByName("mBRight",EUABLAYER_HUMAN,EUABACKLIT_ON,lc);*/
321
322 }
const int EUABLAYER_HUMAN
Definition Backlit.c:17

Перекрестные ссылки EUABACKLIT_ON, EUABLAYER_HUMAN и GetUApi().

Используется в UpdatePlayer().

◆ VisualiseHealth()

void VisualiseHealth ( int iLevel)
inlineprivate
249 {
251
252 int aColor = 0xff1fff1f;
253 int dColor = 0xff001f00;
254
255 if( iLevel > 0 )
256 ua_api.Backlit_KeyByName("kF1",EUABLAYER_HUMAN,EUABACKLIT_ON,aColor);
257 else
258 ua_api.Backlit_KeyByName("kF1",EUABLAYER_HUMAN,EUABACKLIT_ON,dColor );
259 if( iLevel > 1 )
260 ua_api.Backlit_KeyByName("kF2",EUABLAYER_HUMAN,EUABACKLIT_ON,aColor);
261 else
262 ua_api.Backlit_KeyByName("kF2",EUABLAYER_HUMAN,EUABACKLIT_ON,dColor );
263 if( iLevel> 2 )
264 ua_api.Backlit_KeyByName("kF3",EUABLAYER_HUMAN,EUABACKLIT_ON,aColor);
265 else
266 ua_api.Backlit_KeyByName("kF3",EUABLAYER_HUMAN,EUABACKLIT_ON,dColor );
267 if( iLevel > 3 )
268 ua_api.Backlit_KeyByName("kF4",EUABLAYER_HUMAN,EUABACKLIT_ON,aColor);
269 else
270 ua_api.Backlit_KeyByName("kF4",EUABLAYER_HUMAN,EUABACKLIT_ON,dColor );
271
272/* int lc = 0xff001f00;
273 if( iLevel > 0 )
274 lc = 0xff003f00;
275 else if( iLevel > 1 )
276 lc = 0xff007f00;
277 else if( iLevel > 2 )
278 lc = 0xff00af00;
279 else if( iLevel > 3 )
280 lc = 0xff00ff00;
281
282 ua_api.Backlit_KeyByName("mBMiddle",EUABLAYER_HUMAN,EUABACKLIT_ON,lc);*/
283
284 }

Перекрестные ссылки EUABACKLIT_ON, EUABLAYER_HUMAN и GetUApi().

Используется в UpdatePlayer().

Поля

◆ m_BacklitActive

◆ m_BloodBefore

int m_BloodBefore = -1
private

Используется в UpdatePlayer().

◆ m_BloodNew

int m_BloodNew = 0
private

Используется в SetBlood() и UpdatePlayer().

◆ m_CELBefore

bool m_CELBefore = false
private

Используется в RefreshVehicleLayout().

◆ m_GearBefore

int m_GearBefore = 0
private

Используется в RefreshVehicleLayout().

◆ m_HealthBefore

int m_HealthBefore = -1
private

Используется в UpdatePlayer().

◆ m_HealthNew

int m_HealthNew = 0
private

Используется в SetHealth() и UpdatePlayer().


Объявления и описания членов класса находятся в файле: