56 for (
int i = 0; i <
m_Layouts.Count(); i++)
76 m_IDToTypeMap.Insert(EffectWidgetsTypes.BLEEDING_LAYER, GameplayEffectsDataBleeding);
84 RegisterLayouts(
"gui/layouts/gameplay/BleedingEffects.layout", {EffectWidgetsTypes.BLEEDING_LAYER});
85 RegisterLayouts(
"gui/layouts/gameplay/EyeVeinsEffects.layout", {EffectWidgetsTypes.EYE_VEINS});
86 RegisterLayouts(
"gui/layouts/gameplay/EyeSquintEffects.layout", {EffectWidgetsTypes.SQUINTING});
100 InitWidgetSet(EffectWidgetsTypes.PUMPKIN_OCCLUDER,
false,EffectWidgetsTypes.NVG_OCCLUDER);
121 foreach (
int i : types)
150 protected void InitWidgetSet(
int type,
bool updating =
false,
int user_id_override = -1)
153 if (user_id_override != -1)
155 parent =
m_Layouts.Get(type).FindAnyWidgetById(user_id_override);
159 parent =
m_Layouts.Get(type).FindAnyWidgetById(type);
164 Print(
"InitWidgetSet | type: " + type +
" - parent not found!");
169 Widget w = parent.GetChildren();
182 if (parent.GetChildren())
191 if (ImageWidget.Cast(parent.GetChildren()))
223 ret.Insert(EffectWidgetsTypes.MASK_OCCLUDER);
224 ret.Insert(EffectWidgetsTypes.MASK_BREATH);
225 ret.Insert(EffectWidgetsTypes.HELMET_OCCLUDER);
226 ret.Insert(EffectWidgetsTypes.HELMET_BREATH);
227 ret.Insert(EffectWidgetsTypes.MOTO_OCCLUDER);
228 ret.Insert(EffectWidgetsTypes.MOTO_BREATH);
229 ret.Insert(EffectWidgetsTypes.COVER_FLASHBANG);
230 ret.Insert(EffectWidgetsTypes.NVG_OCCLUDER);
231 ret.Insert(EffectWidgetsTypes.PUMPKIN_OCCLUDER);
232 ret.Insert(EffectWidgetsTypes.EYEPATCH_OCCLUDER);
233 ret.Insert(EffectWidgetsTypes.HELMET2_OCCLUDER);
244 bool runningEffectsPresent = runningEffectCount > 0;
263 w.GetParent().Show(
false);
269 if (runningEffectsPresent)
272 for (i = 0; i < runningEffectCount; i++)
278 dta.m_LayoutRoot.Show(
true);
308 if (effects && effects.Count() > 0)
313 for (
int i = 0; i < effects.Count(); i++)
315 value = effects.Get(i);
328 if (effects && effects.Count() > 0)
332 int count = effects.Count();
335 for (
int i = 0; i < count; ++i)
337 value = effects.Get(i);
360 for (
int i = 0; i < count; i++)
410 if (type == EffectWidgetsTypes.ROOT)
416 int type_widgetset = 0;
427 dta.
Update(timeSlice,p,handle);
432 widget_set = dta.GetWidgetSet();
433 foreach (
Widget w : widget_set)
453 dta.
Update(timeSlice,p,handle);
458 widget_set = dta.GetWidgetSet();
459 foreach (
Widget w2 : widget_set)
486 case EffectWidgetsTypes.MOTO_BREATH:
487 case EffectWidgetsTypes.HELMET_BREATH:
488 case EffectWidgetsTypes.MASK_BREATH:
494 case EffectWidgetsTypes.MOTO_OCCLUDER:
495 case EffectWidgetsTypes.EYEPATCH_OCCLUDER:
496 case EffectWidgetsTypes.HELMET_OCCLUDER:
497 case EffectWidgetsTypes.HELMET2_OCCLUDER:
498 case EffectWidgetsTypes.MASK_OCCLUDER:
504 case EffectWidgetsTypes.COVER_FLASHBANG:
522 case EffectWidgetsTypes.MOTO_BREATH:
523 case EffectWidgetsTypes.HELMET_BREATH:
524 case EffectWidgetsTypes.MASK_BREATH:
530 case EffectWidgetsTypes.MOTO_OCCLUDER:
531 case EffectWidgetsTypes.EYEPATCH_OCCLUDER:
532 case EffectWidgetsTypes.HELMET_OCCLUDER:
533 case EffectWidgetsTypes.HELMET2_OCCLUDER:
534 case EffectWidgetsTypes.MASK_OCCLUDER:
540 case EffectWidgetsTypes.COVER_FLASHBANG:
566 float speed = timeSlice * modifier;
603 Param1<float> par = Param1<float>.Cast(p);
627 Param1<float> par = Param1<float>.Cast(p);
630 float alpha_mod =
Math.
Clamp(par.param1,0.0,1.0);
631 m_Root.SetAlpha(alpha_mod);
override bool DataInitialized()
override void Init(array< ref Widget > input, int type, Widget layout_root, int user_override=-1)
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)
override void UpdateVisibility(bool state)
override bool HasDefinedHandle()
Manages all bleeding indicators and their updates.
Base Param Class with no parameters. Used as general purpose parameter overloaded with Param1 to Para...
Result for an object found in CGame.IsBoxCollidingGeometryProxy.
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,...
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.