56 for (
int i = 0; i <
m_Layouts.Count(); i++)
76 m_IDToTypeMap.Insert(EffectWidgetsTypes.BLEEDING_LAYER,GameplayEffectsDataBleeding);
82 RegisterLayouts(
"gui/layouts/gameplay/BleedingEffects.layout",{EffectWidgetsTypes.BLEEDING_LAYER});
96 InitWidgetSet(EffectWidgetsTypes.PUMPKIN_OCCLUDER,
false,EffectWidgetsTypes.NVG_OCCLUDER);
115 foreach (
int i : types)
144 protected void InitWidgetSet(
int type,
bool updating =
false,
int user_id_override = -1)
147 if (user_id_override != -1)
149 parent =
m_Layouts.Get(type).FindAnyWidgetById(user_id_override);
153 parent =
m_Layouts.Get(type).FindAnyWidgetById(type);
158 Print(
"InitWidgetSet | type: " + type +
" - parent not found!");
163 Widget w = parent.GetChildren();
176 if (parent.GetChildren())
185 if (ImageWidget.Cast(parent.GetChildren()))
217 ret.Insert(EffectWidgetsTypes.MASK_OCCLUDER);
218 ret.Insert(EffectWidgetsTypes.MASK_BREATH);
219 ret.Insert(EffectWidgetsTypes.HELMET_OCCLUDER);
220 ret.Insert(EffectWidgetsTypes.HELMET_BREATH);
221 ret.Insert(EffectWidgetsTypes.MOTO_OCCLUDER);
222 ret.Insert(EffectWidgetsTypes.MOTO_BREATH);
223 ret.Insert(EffectWidgetsTypes.COVER_FLASHBANG);
224 ret.Insert(EffectWidgetsTypes.NVG_OCCLUDER);
225 ret.Insert(EffectWidgetsTypes.PUMPKIN_OCCLUDER);
226 ret.Insert(EffectWidgetsTypes.EYEPATCH_OCCLUDER);
227 ret.Insert(EffectWidgetsTypes.HELMET2_OCCLUDER);
238 bool runningEffectsPresent = runningEffectCount > 0;
257 w.GetParent().Show(
false);
263 if (runningEffectsPresent)
266 for (i = 0; i < runningEffectCount; i++)
272 dta.m_LayoutRoot.Show(
true);
302 if (effects && effects.Count() > 0)
307 for (
int i = 0; i < effects.Count(); i++)
309 value = effects.Get(i);
322 if (effects && effects.Count() > 0)
326 int count = effects.Count();
329 for (
int i = 0; i < count; ++i)
331 value = effects.Get(i);
354 for (
int i = 0; i < count; i++)
404 if (type == EffectWidgetsTypes.ROOT)
410 int type_widgetset = 0;
421 dta.
Update(timeSlice,p,handle);
426 widget_set = dta.GetWidgetSet();
427 foreach (
Widget w : widget_set)
447 dta.
Update(timeSlice,p,handle);
452 widget_set = dta.GetWidgetSet();
453 foreach (
Widget w2 : widget_set)
480 case EffectWidgetsTypes.MOTO_BREATH:
481 case EffectWidgetsTypes.HELMET_BREATH:
482 case EffectWidgetsTypes.MASK_BREATH:
488 case EffectWidgetsTypes.MOTO_OCCLUDER:
489 case EffectWidgetsTypes.EYEPATCH_OCCLUDER:
490 case EffectWidgetsTypes.HELMET_OCCLUDER:
491 case EffectWidgetsTypes.HELMET2_OCCLUDER:
492 case EffectWidgetsTypes.MASK_OCCLUDER:
498 case EffectWidgetsTypes.COVER_FLASHBANG:
516 case EffectWidgetsTypes.MOTO_BREATH:
517 case EffectWidgetsTypes.HELMET_BREATH:
518 case EffectWidgetsTypes.MASK_BREATH:
524 case EffectWidgetsTypes.MOTO_OCCLUDER:
525 case EffectWidgetsTypes.EYEPATCH_OCCLUDER:
526 case EffectWidgetsTypes.HELMET_OCCLUDER:
527 case EffectWidgetsTypes.HELMET2_OCCLUDER:
528 case EffectWidgetsTypes.MASK_OCCLUDER:
534 case EffectWidgetsTypes.COVER_FLASHBANG:
560 float speed = timeSlice * modifier;
597 Param1<float> par = Param1<float>.Cast(p);
621 Param1<float> par = Param1<float>.Cast(p);
624 float alpha_mod =
Math.
Clamp(par.param1,0.0,1.0);
625 m_Root.SetAlpha(alpha_mod);
proto native WorkspaceWidget GetWorkspace()
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 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,...
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.