DayZ Scripts
v1.21.156300 ยท Jun 20, 2023
 
Loading...
Searching...
No Matches
GameplayEffectWidgets.c
Go to the documentation of this file.
1/*
2TODO - doxygen formating
3*/
4
6class GameplayEffectWidgets extends GameplayEffectWidgets_base
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);
35 m_Layouts = new map<int,ref Widget>;
36 m_UniqueLayouts = new set<ref Widget>;
37 m_WidgetDataMap = new GameplayEffectDataMap;
38 m_RunningEffects = new set<int>;
39 m_RunningEffectsPrevious = new set<int>;
40 m_UpdatingEffects = new array<int>;
41 m_UpdatedWidgetsCheck = new array<ref Widget>;
42 m_UpdatedWidgetSetsCheck = new array<int>;
43 m_SuspendRequests = new set<int>;
44 m_IDToTypeMap = new map<int,typename>;
45
46 m_TimeProgBreath = 0.0;
47 m_BreathMultStamina = 1.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);
278 m_RunningEffectsPrevious.Clear();
279 }
280
281 override void AddActiveEffects(array<int> effects)
282 {
283 if (effects && effects.Count() > 0)
284 {
285 m_RunningEffectsPrevious.Copy(m_RunningEffects);
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 {
305 m_RunningEffectsPrevious.Copy(m_RunningEffects);
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
341 m_RunningEffectsPrevious.Copy(m_RunningEffects);
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();
446 m_UpdatedWidgetSetsCheck.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;
542 m_BreathResidue = Math.Clamp(m_BreathResidue,0,1);
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);
549 hdr_mult = Math.Lerp(BREATH_COLOR_MULT_MAX,BREATH_COLOR_MULT_MIN,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);
649 m_BreathResidue = Math.Clamp(m_BreathResidue,0,1);
650 }
651}
void GameplayEffectsDataImage(array< ref Widget > input, int type, int user_override=-1)
map< int, ref GameplayEffectsData > GameplayEffectDataMap
protected Widget m_Root
Definition SizeToChild.c:91
proto native WorkspaceWidget GetWorkspace()
grouped gameplay effect widgets and their handling
protected ref set< int > m_RunningEffectsPrevious
protected ref array< int > m_UpdatedWidgetSetsCheck
protected ref map< int, ref Widget > m_Layouts
protected ref set< int > m_SuspendRequests
protected void UpdateOccluderEffect(ImageWidget w, int type, float timeSlice, Param p, int handle)
override void RemoveActiveEffects(array< int > effects)
protected void CalculateValues(int type=-1, float timeSlice=0, Param p=null, int handle=-1)
Only one calculation per unique WidgetSet.
protected void RegisterLayouts(string path, array< int > types)
Registers new layout and ties effect IDs to it.
protected ref array< ref Widget > m_UpdatedWidgetsCheck
protected void CalculateOccluderEffect(int type, float timeSlice, Param p, int handle)
protected void UpdateBreathEffect(ImageWidget w)
override void AddActiveEffects(array< int > effects)
protected void InitWidgetSet(int type, bool updating=false, int user_id_override=-1)
InitWidgetSet.
protected ref map< int, typename > m_IDToTypeMap
array< int > CompileEffectListing()
returns all vanilla effects, nested in a vanilla layout. If using different layouts for custom effect...
override void RemoveSuspendRequest(int request_id)
protected void CalculateBreathEffect(float timeSlice=0, int type=-1, Param p=null)
protected ref array< int > m_UpdatingEffects
override void AddSuspendRequest(int request_id)
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.
protected void ProcessWidgetUpdate(Widget w, int type, float timeSlice=0, Param p=null, int handle=-1)
protected ref set< int > m_RunningEffects
override void OnVoiceEvent(float breathing_resistance01)
protected void CalculateFlashbangEffect(int type, float timeSlice, Param p, int handle)
bool CreateHandledClass(typename handled_type, array< ref Widget > input, int type, int user_override)
protected TranslateIDToType(int typeID)
protected void HandleWidgetRoot(float timeSlice=0, Param p=null, int handle=-1)
protected void UpdateFlashbangEffect(ImageWidget w)
override void RegisterGameplayEffectData(int id, Param p)
protected ref set< ref Widget > m_UniqueLayouts
protected ref GameplayEffectDataMap m_WidgetDataMap
override void Update(float timeSlice)
Generic update, called on frame from the player.
Manages all bleeding indicators and their updates.
override void Init(array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
override void UpdateVisibility(bool state)
override void ForceStop()
stops and re-sets indicators and images even out of sequence. Should still be tied to the 'player' up...
override void Update(float timeSlice=0, Param p=null, int handle=-1)
Definition EnMath.c:7
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Definition param.c:12
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 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,...
static proto float Lerp(float a, float b, float time)
Linearly interpolates between 'a' and 'b' given 'time'.
WidgetFlags
Definition EnWidgets.c:57
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.
proto native void Clear()
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.
Definition proto.c:332