DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено
GameplayEffectWidgets.c
См. документацию.
1/*
2TODO - doxygen formating
3*/
4
7{
8 protected ref Widget m_Root; //dummy parent node
10 protected ref set<ref Widget> m_UniqueLayouts;
12 protected ref set<int> m_RunningEffects;
13 protected ref set<int> m_RunningEffectsPrevious;
15 protected ref array<ref Widget> m_UpdatedWidgetsCheck; //to make sure widgets are not updated over and over (case of multiple IDs sharing same widget set)
16 protected ref array<int> m_UpdatedWidgetSetsCheck; //to make sure sets are not updated over and over (case of multiple IDs sharing same widget set)
17 protected ref set<int> m_SuspendRequests;
19
20 protected float m_TimeProgBreath;
21 protected float m_BreathMultStamina;
22 protected float m_BreathResidue;
23
24 //UserID's for widget containers that use something different from 'EffectWidgetsTypes' defaults
25 protected const int WIDGETSET_BREATH = 100;
26
27 //effect values
28 protected int m_BreathColor;
29 protected float m_BreathAlphaVal;
30 protected float m_FlashbangCoverAlphaVal;
31
33 {
34 m_Root = GetGame().GetWorkspace().CreateWidget(FrameWidgetTypeID,0,0,1.0,1.0,WidgetFlags.VISIBLE | WidgetFlags.HEXACTPOS | WidgetFlags.VEXACTPOS, 0xffffffff, 0);
36 m_UniqueLayouts = new set<ref Widget>;
38 m_RunningEffects = new set<int>;
39 m_RunningEffectsPrevious = new set<int>;
43 m_SuspendRequests = new set<int>;
45
46 m_TimeProgBreath = 0.0;
48
50
51 RegisterLayouts("gui/layouts/gameplay/CameraEffects.layout",CompileEffectListing());
52 RegisterLayouts("gui/layouts/gameplay/BleedingEffects.layout",{EffectWidgetsTypes.BLEEDING_LAYER});
53
54 InitWidgetSet(EffectWidgetsTypes.MASK_BREATH,true,WIDGETSET_BREATH);
55 InitWidgetSet(EffectWidgetsTypes.HELMET_BREATH,true,WIDGETSET_BREATH);
56 InitWidgetSet(EffectWidgetsTypes.MOTO_BREATH,true,WIDGETSET_BREATH);
57
58 InitWidgetSet(EffectWidgetsTypes.MASK_OCCLUDER,false,EffectWidgetsTypes.MASK_OCCLUDER);
59 InitWidgetSet(EffectWidgetsTypes.HELMET_OCCLUDER);
60 InitWidgetSet(EffectWidgetsTypes.HELMET2_OCCLUDER);
61 InitWidgetSet(EffectWidgetsTypes.MOTO_OCCLUDER);
62 InitWidgetSet(EffectWidgetsTypes.NVG_OCCLUDER,false,EffectWidgetsTypes.NVG_OCCLUDER);
63 InitWidgetSet(EffectWidgetsTypes.PUMPKIN_OCCLUDER,false,EffectWidgetsTypes.NVG_OCCLUDER);
64 InitWidgetSet(EffectWidgetsTypes.EYEPATCH_OCCLUDER);
65
66 InitWidgetSet(EffectWidgetsTypes.COVER_FLASHBANG);
67
68 InitWidgetSet(EffectWidgetsTypes.BLEEDING_LAYER,true);
69
71 }
72
74 {
75 for (int i = 0; i < m_Layouts.Count(); i++)
76 {
77 if (m_Layouts.GetElement(i))
78 m_Layouts.GetElement(i).Unlink();
79 }
80 }
81
86 protected void RegisterLayouts(string path, array<int> types)
87 {
89 m_UniqueLayouts.Insert(w);
90 w.Show(false);
91 foreach (int i : types)
92 {
93 m_Layouts.Set(i,w);
94 }
95 }
96
97 protected void PairIDToTypes()
98 {
99 m_IDToTypeMap.Insert(EffectWidgetsTypes.BLEEDING_LAYER,GameplayEffectsDataBleeding);
100 }
101
102 protected typename TranslateIDToType(int typeID)
103 {
104 return m_IDToTypeMap.Get(typeID);
105 }
106
107 override void RegisterGameplayEffectData(int id, Param p)
108 {
109 if (!m_WidgetDataMap.Get(id).DataInitialized())
110 {
111 m_WidgetDataMap.Get(id).RegisterData(p);
112 }
113 }
114
125 protected void InitWidgetSet(int type, bool updating = false, int user_id_override = -1)
126 {
127 Widget parent = null;
128 if (user_id_override != -1)
129 {
130 parent = m_Layouts.Get(type).FindAnyWidgetById(user_id_override);
131 }
132 else
133 {
134 parent = m_Layouts.Get(type).FindAnyWidgetById(type);
135 }
136
137 if (!parent)
138 {
139 Print("InitWidgetSet | type: " + type + " - parent not found!");
140 return;
141 }
142
143 array<ref Widget> output;
144 Widget w = parent.GetChildren();
145 if (w)
146 {
147 output = new array<ref Widget>;
148 while (w)
149 {
150 w.Update();
151 w.Show(false,true);
152 output.Insert(w);
153
154 w = w.GetSibling();
155 }
156
157 if (parent.GetChildren())
158 {
159 typename handled_type = TranslateIDToType(type);
160 if ( handled_type )
161 {
162 CreateHandledClass(handled_type,output,type,user_id_override);
163 }
164 else
165 {
166 if (ImageWidget.Cast(parent.GetChildren()))
167 {
168 m_WidgetDataMap.Set(type, new GameplayEffectsDataImage(output,type,user_id_override) );
169 }
170 else
171 {
172 m_WidgetDataMap.Set(type, new GameplayEffectsData(output,type,user_id_override) );
173 }
174 }
175 }
176
177 if (updating)
178 m_UpdatingEffects.Insert(type);
179 }
180 }
181
182 bool CreateHandledClass(typename handled_type, array<ref Widget> input, int type, int user_override)
183 {
184 if (handled_type)
185 {
186 GameplayEffectsData data = GameplayEffectsData.Cast(handled_type.Spawn());
187 data.Init(input,type,m_Layouts.Get(type),user_override);
188 m_WidgetDataMap.Set(type, data);
189 return true;
190 }
191 return false;
192 }
193
196 {
197 array<int> ret = new array<int>;
198 ret.Insert(EffectWidgetsTypes.MASK_OCCLUDER);
199 ret.Insert(EffectWidgetsTypes.MASK_BREATH);
200 ret.Insert(EffectWidgetsTypes.HELMET_OCCLUDER);
201 ret.Insert(EffectWidgetsTypes.HELMET_BREATH);
202 ret.Insert(EffectWidgetsTypes.MOTO_OCCLUDER);
203 ret.Insert(EffectWidgetsTypes.MOTO_BREATH);
204 ret.Insert(EffectWidgetsTypes.COVER_FLASHBANG);
205 ret.Insert(EffectWidgetsTypes.NVG_OCCLUDER);
206 ret.Insert(EffectWidgetsTypes.PUMPKIN_OCCLUDER);
207 ret.Insert(EffectWidgetsTypes.EYEPATCH_OCCLUDER);
208 ret.Insert(EffectWidgetsTypes.HELMET2_OCCLUDER);
209
210 return ret;
211 }
212
213 protected void UpdateVisibility()
214 {
215 Widget w;
216 //Hide diff
217 int value;
218 int runningEffectCount = m_RunningEffects.Count();
219 bool runningEffectsPresent = runningEffectCount > 0;
221 for (int i = 0; i < m_RunningEffectsPrevious.Count(); i++)
222 {
223 value = m_RunningEffectsPrevious.Get(i);
224 dta = m_WidgetDataMap.Get(value);
225 if (runningEffectCount < 1 || m_RunningEffects.Find(value) == -1)
226 {
227 if (dta.HasDefinedHandle())
228 {
229 dta.UpdateVisibility(false);
230 }
231 else
232 {
233 for (int j = 0; j < m_WidgetDataMap.Get(value).GetWidgetSet().Count(); j++)
234 {
235 w = m_WidgetDataMap.Get(value).GetWidgetSet().Get(j);
236 w.Show(false);
237 }
238 w.GetParent().Show(false);
239 }
240 }
241 }
242
243 //Show running effects
244 if (runningEffectsPresent)
245 {
246 value = 0;
247 for (i = 0; i < runningEffectCount; i++)
248 {
249 value = m_RunningEffects.Get(i);
250 dta = m_WidgetDataMap.Get(value);
251 if (dta.HasDefinedHandle())
252 {
253 dta.m_LayoutRoot.Show(true);
254 dta.UpdateVisibility(true);
255 }
256 else
257 {
258 for (j = 0; j < m_WidgetDataMap.Get(value).GetWidgetSet().Count(); j++)
259 {
260 w = m_WidgetDataMap.Get(value).GetWidgetSet().Get(j);
261 w.Update();
262 w.Show(true);
263 }
264
265 while (w) //dumb but necessary because of uncertain "visible" setting of the layout
266 {
267 w = w.GetParent();
268 if (w)
269 {
270 w.Show(true);
271 }
272 }
273 }
274 }
275 }
276
277 m_Root.Show(runningEffectsPresent && m_SuspendRequests.Count() < 1);
279 }
280
281 override void AddActiveEffects(array<int> effects)
282 {
283 if (effects && effects.Count() > 0)
284 {
286
287 int value;
288 for (int i = 0; i < effects.Count(); i++)
289 {
290 value = effects.Get(i);
291 m_RunningEffects.Insert(value);
292 }
293
294 if (m_RunningEffectsPrevious.Count() != m_RunningEffects.Count())
295 {
297 }
298 }
299 }
300
301 override void RemoveActiveEffects(array<int> effects)
302 {
303 if (effects && effects.Count() > 0)
304 {
306
307 int value;
308 int idx;
309 for (int i = 0; i < effects.Count(); i++)
310 {
311 value = effects.Get(i);
312 idx = m_RunningEffects.Find(value);
313 if (idx != -1)
314 {
315 m_RunningEffects.Remove(idx);
316 }
317 }
318
319 if (m_RunningEffectsPrevious.Count() != m_RunningEffects.Count())
320 {
322 }
323 }
324 }
325
326 override void StopAllEffects()
327 {
328 m_Root.Show(false); //to avoid visual 'peeling'
329
330 if (IsAnyEffectRunning())
331 {
332 int count = m_RunningEffects.Count();
334 for (int i = 0; i < count; i++) //iterates over running metadata, in case anything requires its own stop handling
335 {
336 data = m_WidgetDataMap.Get(m_RunningEffects[i]);
337 data.ForceStop();
338 }
339 }
340
342 m_RunningEffects.Clear();
344 }
345
346 override bool IsAnyEffectRunning()
347 {
348 return m_RunningEffects && m_RunningEffects.Count() > 0;
349 }
350
351 override void AddSuspendRequest(int request_id)
352 {
353 m_SuspendRequests.Insert(request_id);
355 }
356
357 override void RemoveSuspendRequest(int request_id)
358 {
359 int idx = m_SuspendRequests.Find(request_id);
360 if (idx != -1)
361 {
362 m_SuspendRequests.Remove(idx);
363 }
365 }
366
367 override void ClearSuspendRequests()
368 {
369 m_SuspendRequests.Clear();
371 }
372
374 {
375 return m_SuspendRequests.Count();
376 }
377
379 override void UpdateWidgets(int type = -1, float timeSlice = 0, Param p = null, int handle = -1)
380 {
382 array<ref Widget> widget_set;
383
384 if (type == EffectWidgetsTypes.ROOT)
385 {
386 HandleWidgetRoot(timeSlice,p,handle);
387 }
388 else if (type == -1) //update stuff from the m_UpdatingEffects
389 {
390 int type_widgetset = 0;
391 for (int i = 0; i < m_UpdatingEffects.Count(); i++)
392 {
393 if (m_RunningEffects.Find(m_UpdatingEffects.Get(i)) != -1)
394 {
395 type_widgetset = m_UpdatingEffects.Get(i);
396
397 dta = m_WidgetDataMap.Get(type_widgetset);
398
399 if (dta.HasDefinedHandle() && dta.DataInitialized())
400 {
401 dta.Update(timeSlice,p,handle); //calculate and apply
402 }
403 else
404 {
405 CalculateValues(type_widgetset,timeSlice,p,handle);
406 widget_set = dta.GetWidgetSet();
407 foreach (Widget w : widget_set)
408 {
409 if (w.IsVisibleHierarchy() && m_UpdatedWidgetsCheck.Find(w) == -1)
410 {
411 m_UpdatedWidgetsCheck.Insert(w);
412 ProcessWidgetUpdate(w,type_widgetset,timeSlice,p,handle);
413 }
414 }
415 }
416 }
417 }
418 }
419 else //update specific widget set
420 {
421 if (m_RunningEffects.Find(type) != -1) //only do if the effect is running (FPS stonks!)
422 {
423 dta = m_WidgetDataMap.Get(type);
424
425 if (dta.HasDefinedHandle() && dta.DataInitialized())
426 {
427 dta.Update(timeSlice,p,handle); //calculate and apply
428 }
429 else
430 {
431 CalculateValues(type,timeSlice,p,handle);
432 widget_set = dta.GetWidgetSet();
433 foreach (Widget w2 : widget_set)
434 {
435 if (w2.IsVisibleHierarchy() && m_UpdatedWidgetsCheck.Find(w2) == -1)
436 {
437 m_UpdatedWidgetsCheck.Insert(w2);
438 ProcessWidgetUpdate(w2,type,timeSlice,p,handle);
439 }
440 }
441 }
442 }
443 }
444
445 m_UpdatedWidgetsCheck.Clear();
447 }
448
450 protected void CalculateValues(int type = -1, float timeSlice = 0, Param p = null, int handle = -1)
451 {
452 if (m_UpdatedWidgetSetsCheck.Find(m_WidgetDataMap.Get(type).GetWidgetSetID()) != -1)
453 {
454 //Print("skipped updating set ID " + m_WidgetDataMap.Get(type).GetWidgetSetID() + " | effect: " + type);
455 return;
456 }
457
458 switch (type)
459 {
460 case EffectWidgetsTypes.MOTO_BREATH:
461 case EffectWidgetsTypes.HELMET_BREATH:
462 case EffectWidgetsTypes.MASK_BREATH:
463 {
464 CalculateBreathEffect(timeSlice);
465 }
466 break;
467
468 case EffectWidgetsTypes.MOTO_OCCLUDER:
469 case EffectWidgetsTypes.EYEPATCH_OCCLUDER:
470 case EffectWidgetsTypes.HELMET_OCCLUDER:
471 case EffectWidgetsTypes.HELMET2_OCCLUDER:
472 case EffectWidgetsTypes.MASK_OCCLUDER:
473 {
474 CalculateOccluderEffect(type,timeSlice,p,handle);
475 }
476 break;
477
478 case EffectWidgetsTypes.COVER_FLASHBANG:
479 {
480 CalculateFlashbangEffect(type,timeSlice,p,handle);
481 }
482 break;
483
484 default:
485 return; //no need to calculate anything
486 break;
487 }
488
489 m_UpdatedWidgetSetsCheck.Insert(m_WidgetDataMap.Get(type).GetWidgetSetID());
490 }
491
492 protected void ProcessWidgetUpdate(Widget w, int type, float timeSlice = 0, Param p = null, int handle = -1)
493 {
494 switch (type)
495 {
496 case EffectWidgetsTypes.MOTO_BREATH:
497 case EffectWidgetsTypes.HELMET_BREATH:
498 case EffectWidgetsTypes.MASK_BREATH:
499 {
500 UpdateBreathEffect(ImageWidget.Cast(w));
501 }
502 break;
503
504 case EffectWidgetsTypes.MOTO_OCCLUDER:
505 case EffectWidgetsTypes.EYEPATCH_OCCLUDER:
506 case EffectWidgetsTypes.HELMET_OCCLUDER:
507 case EffectWidgetsTypes.HELMET2_OCCLUDER:
508 case EffectWidgetsTypes.MASK_OCCLUDER:
509 {
510 UpdateOccluderEffect(ImageWidget.Cast(w),type,timeSlice,p,handle);
511 }
512 break;
513
514 case EffectWidgetsTypes.COVER_FLASHBANG:
515 {
516 UpdateFlashbangEffect(ImageWidget.Cast(w));
517 }
518 break;
519
520 default:
521 //Print("---invalid widget type to update---");
522 break;
523 }
524 }
525
526 //-----------------------------------------
527 //specific widget 'handlers'
528
529 const float BREATH_HDR_MIN = 0.005; //dusk?
530 const float BREATH_HDR_MAX = 1.0; //dark?
531 const float BREATH_COLOR_MULT_MIN = 0.5;
532 const float BREATH_COLOR_MULT_MAX = 0.8;
533
534 //-----------------------------------------
535 //Breath
536 //-----------------------------------------
537 protected void CalculateBreathEffect(float timeSlice = 0, int type = -1, Param p = null)
538 {
539 float modifier = Math.Lerp(0.25, 0.5, m_BreathResidue);
540 float speed = timeSlice * modifier;
541 m_BreathResidue -= speed;
543 float residue_final = Math.Lerp(0, 0.7, m_BreathResidue);
544
545 float hdr_mult;
546 hdr_mult = GetSceneHDRMul(0);
547 hdr_mult = Math.Clamp(hdr_mult,BREATH_HDR_MIN,BREATH_HDR_MAX);
548 hdr_mult = Math.InverseLerp(BREATH_HDR_MIN,BREATH_HDR_MAX,hdr_mult);
550 m_BreathColor = ARGBF(0.0,1.0 * hdr_mult,1.0 * hdr_mult,1.0 * hdr_mult); //grayscaling of the image
551
552
553 m_BreathAlphaVal = Math.Lerp(m_BreathAlphaVal, residue_final, timeSlice);
554 }
555
556 protected void UpdateBreathEffect(ImageWidget w)
557 {
558 w.SetColor(m_BreathColor);
559 w.SetAlpha(m_BreathAlphaVal);
560 }
561
562 //-----------------------------------------
563 //Occluders
564 //-----------------------------------------
565 protected void CalculateOccluderEffect(int type, float timeSlice, Param p, int handle)
566 {
567 }
568
569 protected void UpdateOccluderEffect(ImageWidget w, int type, float timeSlice, Param p, int handle)
570 {
571 }
572
573 //-----------------------------------------
574 //Flashbang
575 //-----------------------------------------
576 protected void CalculateFlashbangEffect(int type, float timeSlice, Param p, int handle)
577 {
578 Param1<float> par = Param1<float>.Cast(p);
579 m_FlashbangCoverAlphaVal = par.param1;
580
581 /*if (m_FlashbangCoverAlphaVal <= 0.0)
582 {
583 RemoveActiveEffects({EffectWidgetsTypes.COVER_FLASHBANG});
584 return;
585 }*/
586 }
587
588 protected void UpdateFlashbangEffect(ImageWidget w)
589 {
590 w.SetAlpha(1 - m_FlashbangCoverAlphaVal);
591 }
592
593 //-----------------------------------------
594 //root handling (generic 'Widget', so mainly alpha and hiding?)
595 //-----------------------------------------
596 protected void HandleWidgetRoot(float timeSlice = 0, Param p = null, int handle = -1)
597 {
598 switch (handle)
599 {
600 default:
601 {
602 Param1<float> par = Param1<float>.Cast(p);
603 if (par)
604 {
605 float alpha_mod = Math.Clamp(par.param1,0.0,1.0);
606 //Print(alpha_mod);
607 m_Root.SetAlpha(alpha_mod);
608 }
609 }
610 break;
611 }
612 }
613
614 //-----------------------------------------
616 override void Update(float timeSlice)
617 {
618 if (m_SuspendRequests.Count() > 0)
619 {
620 return;
621 }
622
623 UpdateWidgets(-1,timeSlice);
624 }
625
626 /*
627 override void SetBreathIntensityStamina(float stamina_cap, float stamina_current)
628 {
629 float stamina_normalized = Math.InverseLerp(0, stamina_cap, stamina_current);
630 stamina_normalized = Math.Clamp(stamina_normalized,0,1);
631
632 if ( stamina_normalized < STAMINA_SOUND_TR2 )
633 {
634 m_BreathMultStamina = 2.0;
635 }
636 else if ( stamina_normalized < STAMINA_SOUND_TR1 )
637 {
638 m_BreathMultStamina = 1.5;
639 }
640 else
641 {
642 m_BreathMultStamina = 1.0;
643 }
644 }
645 */
646 override void OnVoiceEvent(float breathing_resistance01)
647 {
648 m_BreathResidue += Math.Lerp(0,0.35,breathing_resistance01);
650 }
651}
map
Определения ControlsXboxNew.c:4
void GameplayEffectsDataImage(array< ref Widget > input, int type, int user_override=-1)
Определения GEWidgetsMetaData.c:77
map< int, ref GameplayEffectsData > GameplayEffectDataMap
Определения GEWidgetsMetaData.c:105
string path
Определения OptionSelectorMultistate.c:142
@ Count
Определения RandomGeneratorSyncManager.c:8
proto native WorkspaceWidget GetWorkspace()
const int WIDGETSET_BREATH
Определения GameplayEffectWidgets.c:25
override bool IsAnyEffectRunning()
Определения GameplayEffectWidgets.c:346
override void AddSuspendRequest(int request_id)
Определения GameplayEffectWidgets.c:351
ref array< int > m_UpdatedWidgetSetsCheck
Определения GameplayEffectWidgets.c:16
void ProcessWidgetUpdate(Widget w, int type, float timeSlice=0, Param p=null, int handle=-1)
Определения GameplayEffectWidgets.c:492
const float BREATH_HDR_MIN
Определения GameplayEffectWidgets.c:529
TranslateIDToType(int typeID)
Определения GameplayEffectWidgets.c:102
override void OnVoiceEvent(float breathing_resistance01)
Определения GameplayEffectWidgets.c:646
override void Update(float timeSlice)
Generic update, called on frame from the player.
Определения GameplayEffectWidgets.c:616
void CalculateFlashbangEffect(int type, float timeSlice, Param p, int handle)
Определения GameplayEffectWidgets.c:576
array< int > CompileEffectListing()
returns all vanilla effects, nested in a vanilla layout. If using different layouts for custom effect...
Определения GameplayEffectWidgets.c:195
void RegisterLayouts(string path, array< int > types)
Registers new layout and ties effect IDs to it.
Определения GameplayEffectWidgets.c:86
void UpdateBreathEffect(ImageWidget w)
Определения GameplayEffectWidgets.c:556
void HandleWidgetRoot(float timeSlice=0, Param p=null, int handle=-1)
Определения GameplayEffectWidgets.c:596
void ~GameplayEffectWidgets()
Определения GameplayEffectWidgets.c:73
override void RemoveSuspendRequest(int request_id)
Определения GameplayEffectWidgets.c:357
void UpdateFlashbangEffect(ImageWidget w)
Определения GameplayEffectWidgets.c:588
override void RemoveActiveEffects(array< int > effects)
Определения GameplayEffectWidgets.c:301
override void ClearSuspendRequests()
Определения GameplayEffectWidgets.c:367
ref map< int, typename > m_IDToTypeMap
Определения GameplayEffectWidgets.c:18
ref set< int > m_RunningEffects
Определения GameplayEffectWidgets.c:12
override int GetSuspendRequestCount()
Определения GameplayEffectWidgets.c:373
bool CreateHandledClass(typename handled_type, array< ref Widget > input, int type, int user_override)
Определения GameplayEffectWidgets.c:182
void CalculateValues(int type=-1, float timeSlice=0, Param p=null, int handle=-1)
Only one calculation per unique WidgetSet.
Определения GameplayEffectWidgets.c:450
ref GameplayEffectDataMap m_WidgetDataMap
Определения GameplayEffectWidgets.c:11
override void UpdateWidgets(int type=-1, float timeSlice=0, Param p=null, int handle=-1)
Usually called in course of an OnFrame update, can be manually called from elsewhere with parameters.
Определения GameplayEffectWidgets.c:379
void CalculateBreathEffect(float timeSlice=0, int type=-1, Param p=null)
Определения GameplayEffectWidgets.c:537
float m_FlashbangCoverAlphaVal
Определения GameplayEffectWidgets.c:30
ref set< int > m_RunningEffectsPrevious
Определения GameplayEffectWidgets.c:13
ref set< ref Widget > m_UniqueLayouts
Определения GameplayEffectWidgets.c:10
ref array< int > m_UpdatingEffects
Определения GameplayEffectWidgets.c:14
void GameplayEffectWidgets()
Определения GameplayEffectWidgets.c:32
void InitWidgetSet(int type, bool updating=false, int user_id_override=-1)
InitWidgetSet.
Определения GameplayEffectWidgets.c:125
const float BREATH_COLOR_MULT_MAX
Определения GameplayEffectWidgets.c:532
ref set< int > m_SuspendRequests
Определения GameplayEffectWidgets.c:17
ref map< int, ref Widget > m_Layouts
Определения GameplayEffectWidgets.c:9
void UpdateOccluderEffect(ImageWidget w, int type, float timeSlice, Param p, int handle)
Определения GameplayEffectWidgets.c:569
const float BREATH_HDR_MAX
Определения GameplayEffectWidgets.c:530
ref array< ref Widget > m_UpdatedWidgetsCheck
Определения GameplayEffectWidgets.c:15
const float BREATH_COLOR_MULT_MIN
Определения GameplayEffectWidgets.c:531
override void RegisterGameplayEffectData(int id, Param p)
Определения GameplayEffectWidgets.c:107
override void StopAllEffects()
Определения GameplayEffectWidgets.c:326
override void AddActiveEffects(array< int > effects)
Определения GameplayEffectWidgets.c:281
ref Widget m_Root
Определения GameplayEffectWidgets.c:8
void CalculateOccluderEffect(int type, float timeSlice, Param p, int handle)
Определения GameplayEffectWidgets.c:565
grouped gameplay effect widgets and their handling
Определения GameplayEffectWidgets.c:7
override bool DataInitialized()
Определения GEWidgetsMetaDataBleeding.c:49
override void Init(array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
Определения GEWidgetsMetaDataBleeding.c:26
override void ForceStop()
stops and re-sets indicators and images even out of sequence. Should still be tied to the 'player' up...
Определения GEWidgetsMetaDataBleeding.c:210
override void Update(float timeSlice=0, Param p=null, int handle=-1)
Определения GEWidgetsMetaDataBleeding.c:154
override void UpdateVisibility(bool state)
Определения GEWidgetsMetaDataBleeding.c:197
override bool HasDefinedHandle()
Определения GEWidgetsMetaDataBleeding.c:44
Manages all bleeding indicators and their updates.
Определения GEWidgetsMetaDataBleeding.c:4
Определения EnMath.c:7
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Определения param.c:12
Определения EnWidgets.c:190
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
proto native CGame GetGame()
proto void Print(void var)
Prints content of variable to console/log.
proto native float GetSceneHDRMul(int camera)
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
static proto float Clamp(float value, float min, float max)
Clamps 'value' to 'min' if it is lower than 'min', or to 'max' if it is higher than 'max'.
static proto float InverseLerp(float a, float b, float value)
Calculates the linear value that produces the interpolant value within the range [a,...
WidgetFlags
Определения EnWidgets.c:58
proto native external Widget CreateWidgets(string layout, Widget parentWidget=NULL, bool immedUpdate=true)
Create widgets from *.layout file.
proto native external Widget CreateWidget(WidgetType type, int left, int top, int width, int height, WidgetFlags flags, int color, int sort, Widget parentWidget=NULL)
Create widgets by WidgetType.
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.
Определения proto.c:332