Dayz 1.25
Dayz Code Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс GameplayEffectWidgets_base

grouped gameplay effect widgets and their handling Подробнее...

Защищенные члены

void GameplayEffectWidgets ()
 
void ~GameplayEffectWidgets ()
 
void RegisterLayouts (string path, array< int > types)
 Registers new layout and ties effect IDs to it.
 
void PairIDToTypes ()
 
 TranslateIDToType (int typeID)
 
override void RegisterGameplayEffectData (int id, Param p)
 
void InitWidgetSet (int type, bool updating=false, int user_id_override=-1)
 InitWidgetSet.
 
bool CreateHandledClass (typename handled_type, array< ref Widget > input, int type, int user_override)
 
array< intCompileEffectListing ()
 returns all vanilla effects, nested in a vanilla layout. If using different layouts for custom effects, please register and link separately
 
void UpdateVisibility ()
 
override void AddActiveEffects (array< int > effects)
 
override void RemoveActiveEffects (array< int > effects)
 
override void StopAllEffects ()
 
override bool IsAnyEffectRunning ()
 
override void AddSuspendRequest (int request_id)
 
override void RemoveSuspendRequest (int request_id)
 
override void ClearSuspendRequests ()
 
override int GetSuspendRequestCount ()
 
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.
 
void CalculateValues (int type=-1, float timeSlice=0, Param p=null, int handle=-1)
 Only one calculation per unique WidgetSet.
 
void ProcessWidgetUpdate (Widget w, int type, float timeSlice=0, Param p=null, int handle=-1)
 
void CalculateBreathEffect (float timeSlice=0, int type=-1, Param p=null)
 
void UpdateBreathEffect (ImageWidget w)
 
void CalculateOccluderEffect (int type, float timeSlice, Param p, int handle)
 
void UpdateOccluderEffect (ImageWidget w, int type, float timeSlice, Param p, int handle)
 
void CalculateFlashbangEffect (int type, float timeSlice, Param p, int handle)
 
void UpdateFlashbangEffect (ImageWidget w)
 
void HandleWidgetRoot (float timeSlice=0, Param p=null, int handle=-1)
 
override void Update (float timeSlice)
 Generic update, called on frame from the player.
 
override void OnVoiceEvent (float breathing_resistance01)
 

Защищенные данные

ref Widget m_Root
 
ref map< int, ref Widgetm_Layouts
 
ref set< ref Widgetm_UniqueLayouts
 
ref GameplayEffectDataMap m_WidgetDataMap
 
ref set< intm_RunningEffects
 
ref set< intm_RunningEffectsPrevious
 
ref array< intm_UpdatingEffects
 
ref array< ref Widgetm_UpdatedWidgetsCheck
 
ref array< intm_UpdatedWidgetSetsCheck
 
ref set< intm_SuspendRequests
 
ref map< int, typenamem_IDToTypeMap
 
float m_TimeProgBreath
 
float m_BreathMultStamina
 
float m_BreathResidue
 
const int WIDGETSET_BREATH = 100
 
int m_BreathColor
 
float m_BreathAlphaVal
 
float m_FlashbangCoverAlphaVal
 
const float BREATH_HDR_MIN = 0.005
 
const float BREATH_HDR_MAX = 1.0
 
const float BREATH_COLOR_MULT_MIN = 0.5
 
const float BREATH_COLOR_MULT_MAX = 0.8
 

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

grouped gameplay effect widgets and their handling

Конструктор(ы)

◆ ~GameplayEffectWidgets()

void ~GameplayEffectWidgets ( )
inlineprotected
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 }
ref map< int, ref Widget > m_Layouts
Definition GameplayEffectWidgets.c:9
Definition EntityAI.c:95

Методы

◆ AddActiveEffects()

override void AddActiveEffects ( array< int > effects)
inlineprotected
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 }
ref set< int > m_RunningEffectsPrevious
Definition GameplayEffectWidgets.c:13
void UpdateVisibility()
Definition GameplayEffectWidgets.c:213
ref set< int > m_RunningEffects
Definition GameplayEffectWidgets.c:12

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

Используется в ManBase::OnCommandHandlerTick().

◆ AddSuspendRequest()

override void AddSuspendRequest ( int request_id)
inlineprotected
352 {
355 }
ref set< int > m_SuspendRequests
Definition GameplayEffectWidgets.c:17

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

Используется в ManBase::OnUnconsciousStart().

◆ CalculateBreathEffect()

void CalculateBreathEffect ( float timeSlice = 0,
int type = -1,
Param p = null )
inlineprotected
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;
550 m_BreathColor = ARGBF(0.0,1.0 * hdr_mult,1.0 * hdr_mult,1.0 * hdr_mult); //grayscaling of the image
551
552
554 }
float m_BreathResidue
Definition GameplayEffectWidgets.c:22
int m_BreathColor
Definition GameplayEffectWidgets.c:28
const float BREATH_HDR_MAX
Definition GameplayEffectWidgets.c:530
const float BREATH_HDR_MIN
Definition GameplayEffectWidgets.c:529
const float BREATH_COLOR_MULT_MIN
Definition GameplayEffectWidgets.c:531
float m_BreathAlphaVal
Definition GameplayEffectWidgets.c:29
const float BREATH_COLOR_MULT_MAX
Definition GameplayEffectWidgets.c:532
Definition EnMath.c:7
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'.
int ARGBF(float fa, float fr, float fg, float fb)
Converts <0.0, 1.0> ARGB into color.
Definition proto.c:332

Перекрестные ссылки ARGBF(), Math::Clamp(), GetSceneHDRMul(), Math::InverseLerp() и Math::Lerp().

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

◆ CalculateFlashbangEffect()

void CalculateFlashbangEffect ( int type,
float timeSlice,
Param p,
int handle )
inlineprotected
577 {
580
581 /*if (m_FlashbangCoverAlphaVal <= 0.0)
582 {
583 RemoveActiveEffects({EffectWidgetsTypes.COVER_FLASHBANG});
584 return;
585 }*/
586 }
float m_FlashbangCoverAlphaVal
Definition GameplayEffectWidgets.c:30

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

◆ CalculateOccluderEffect()

void CalculateOccluderEffect ( int type,
float timeSlice,
Param p,
int handle )
inlineprotected
566 {
567 }

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

◆ CalculateValues()

void CalculateValues ( int type = -1,
float timeSlice = 0,
Param p = null,
int handle = -1 )
inlineprotected

Only one calculation per unique WidgetSet.

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 {
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 {
475 }
476 break;
477
478 case EffectWidgetsTypes.COVER_FLASHBANG:
479 {
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 }
ref array< int > m_UpdatedWidgetSetsCheck
Definition GameplayEffectWidgets.c:16
ref GameplayEffectDataMap m_WidgetDataMap
Definition GameplayEffectWidgets.c:11
void CalculateOccluderEffect(int type, float timeSlice, Param p, int handle)
Definition GameplayEffectWidgets.c:565
void CalculateBreathEffect(float timeSlice=0, int type=-1, Param p=null)
Definition GameplayEffectWidgets.c:537
void CalculateFlashbangEffect(int type, float timeSlice, Param p, int handle)
Definition GameplayEffectWidgets.c:576

Перекрестные ссылки CalculateBreathEffect(), CalculateFlashbangEffect() и CalculateOccluderEffect().

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

◆ ClearSuspendRequests()

override void ClearSuspendRequests ( )
inlineprotected
368 {
369 m_SuspendRequests.Clear();
371 }

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

Используется в ManBase::SimulateDeath().

◆ CompileEffectListing()

array< int > CompileEffectListing ( )
inlineprotected

returns all vanilla effects, nested in a vanilla layout. If using different layouts for custom effects, please register and link separately

196 {
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 }

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

◆ CreateHandledClass()

bool CreateHandledClass ( typename handled_type ,
array< ref Widget > input,
int type,
int user_override )
inlineprotected
183 {
184 if (handled_type)
185 {
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 }
Manages all bleeding indicators and their updates.
Definition GEWidgetsMetaDataBleeding.c:4

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

◆ GameplayEffectWidgets()

void GameplayEffectWidgets ( )
inlineprotected
33 {
34 m_Root = GetGame().GetWorkspace().CreateWidget(FrameWidgetTypeID,0,0,1.0,1.0,WidgetFlags.VISIBLE | WidgetFlags.HEXACTPOS | WidgetFlags.VEXACTPOS, 0xffffffff, 0);
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
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 }
map< int, ref GameplayEffectsData > GameplayEffectDataMap
Definition GEWidgetsMetaData.c:105
void InitWidgetSet(int type, bool updating=false, int user_id_override=-1)
InitWidgetSet.
Definition GameplayEffectWidgets.c:125
ref set< ref Widget > m_UniqueLayouts
Definition GameplayEffectWidgets.c:10
const int WIDGETSET_BREATH
Definition GameplayEffectWidgets.c:25
ref array< ref Widget > m_UpdatedWidgetsCheck
Definition GameplayEffectWidgets.c:15
array< int > CompileEffectListing()
returns all vanilla effects, nested in a vanilla layout. If using different layouts for custom effect...
Definition GameplayEffectWidgets.c:195
ref map< int, typename > m_IDToTypeMap
Definition GameplayEffectWidgets.c:18
float m_TimeProgBreath
Definition GameplayEffectWidgets.c:20
ref Widget m_Root
Definition GameplayEffectWidgets.c:8
ref array< int > m_UpdatingEffects
Definition GameplayEffectWidgets.c:14
void RegisterLayouts(string path, array< int > types)
Registers new layout and ties effect IDs to it.
Definition GameplayEffectWidgets.c:86
float m_BreathMultStamina
Definition GameplayEffectWidgets.c:21
void PairIDToTypes()
Definition GameplayEffectWidgets.c:97
proto native CGame GetGame()
WidgetFlags
Definition EnWidgets.c:58

Перекрестные ссылки CompileEffectListing(), GetGame(), InitWidgetSet(), m_Root, PairIDToTypes(), RegisterLayouts() и UpdateVisibility().

◆ GetSuspendRequestCount()

override int GetSuspendRequestCount ( )
inlineprotected
374 {
375 return m_SuspendRequests.Count();
376 }

◆ HandleWidgetRoot()

void HandleWidgetRoot ( float timeSlice = 0,
Param p = null,
int handle = -1 )
inlineprotected
597 {
598 switch (handle)
599 {
600 default:
601 {
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 }

Перекрестные ссылки Math::Clamp() и m_Root.

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

◆ InitWidgetSet()

void InitWidgetSet ( int type,
bool updating = false,
int user_id_override = -1 )
inlineprotected

InitWidgetSet.

Аргументы
typeint ID of effect widget type
updatingbool Marks widgets for 'PlayerBase.EOnFrame' updating
user_id_overrideint UserID of a widget to be used instead (allows multiple types to use single widget)
Заметки
All child widgets MUST be of the same type if special functionality is required (ImageWidget etc.)
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
144 Widget w = parent.GetChildren();
145 if (w)
146 {
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 {
163 }
164 else
165 {
166 if (ImageWidget.Cast(parent.GetChildren()))
167 {
169 }
170 else
171 {
173 }
174 }
175 }
176
177 if (updating)
178 m_UpdatingEffects.Insert(type);
179 }
180 }
void GameplayEffectsDataImage(array< ref Widget > input, int type, int user_override=-1)
Definition GEWidgetsMetaData.c:77
TranslateIDToType(int typeID)
Definition GameplayEffectWidgets.c:102
bool CreateHandledClass(typename handled_type, array< ref Widget > input, int type, int user_override)
Definition GameplayEffectWidgets.c:182
Definition EnWidgets.c:190
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки CreateHandledClass(), GameplayEffectsDataImage(), Print() и TranslateIDToType().

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

◆ IsAnyEffectRunning()

override bool IsAnyEffectRunning ( )
inlineprotected
347 {
348 return m_RunningEffects && m_RunningEffects.Count() > 0;
349 }

Используется в ManBase::EOnFrame() и StopAllEffects().

◆ OnVoiceEvent()

override void OnVoiceEvent ( float breathing_resistance01)
inlineprotected

Перекрестные ссылки Math::Clamp() и Math::Lerp().

Используется в ManBase::UpdateMaskBreathWidget().

◆ PairIDToTypes()

void PairIDToTypes ( )
inlineprotected
98 {
99 m_IDToTypeMap.Insert(EffectWidgetsTypes.BLEEDING_LAYER,GameplayEffectsDataBleeding);
100 }

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

◆ ProcessWidgetUpdate()

void ProcessWidgetUpdate ( Widget w,
int type,
float timeSlice = 0,
Param p = null,
int handle = -1 )
inlineprotected
493 {
494 switch (type)
495 {
496 case EffectWidgetsTypes.MOTO_BREATH:
497 case EffectWidgetsTypes.HELMET_BREATH:
498 case EffectWidgetsTypes.MASK_BREATH:
499 {
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 {
517 }
518 break;
519
520 default:
521 //Print("---invalid widget type to update---");
522 break;
523 }
524 }
void UpdateOccluderEffect(ImageWidget w, int type, float timeSlice, Param p, int handle)
Definition GameplayEffectWidgets.c:569
void UpdateFlashbangEffect(ImageWidget w)
Definition GameplayEffectWidgets.c:588
void UpdateBreathEffect(ImageWidget w)
Definition GameplayEffectWidgets.c:556

Перекрестные ссылки UpdateBreathEffect(), UpdateFlashbangEffect() и UpdateOccluderEffect().

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

◆ RegisterGameplayEffectData()

override void RegisterGameplayEffectData ( int id,
Param p )
inlineprotected
108 {
109 if (!m_WidgetDataMap.Get(id).DataInitialized())
110 {
111 m_WidgetDataMap.Get(id).RegisterData(p);
112 }
113 }

◆ RegisterLayouts()

void RegisterLayouts ( string path,
array< int > types )
inlineprotected

Registers new layout and ties effect IDs to it.

Заметки
Order of layout creation matters, they get layered on top of each other. Within a single layout, widget priorities govern the widget order.
87 {
88 Widget w = GetGame().GetWorkspace().CreateWidgets(path,m_Root,false);
89 m_UniqueLayouts.Insert(w);
90 w.Show(false);
91 foreach (int i : types)
92 {
93 m_Layouts.Set(i,w);
94 }
95 }
string path
Definition OptionSelectorMultistate.c:135

Перекрестные ссылки GetGame(), m_Root и path.

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

◆ RemoveActiveEffects()

override void RemoveActiveEffects ( array< int > effects)
inlineprotected
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 }

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

Используется в ManBase::OnCommandHandlerTick().

◆ RemoveSuspendRequest()

override void RemoveSuspendRequest ( int request_id)
inlineprotected
358 {
359 int idx = m_SuspendRequests.Find(request_id);
360 if (idx != -1)
361 {
362 m_SuspendRequests.Remove(idx);
363 }
365 }

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

Используется в ManBase::OnUnconsciousStop().

◆ StopAllEffects()

override void StopAllEffects ( )
inlineprotected
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 {
337 data.ForceStop();
338 }
339 }
340
342 m_RunningEffects.Clear();
344 }
override bool IsAnyEffectRunning()
Definition GameplayEffectWidgets.c:346

Перекрестные ссылки IsAnyEffectRunning(), m_Root и UpdateVisibility().

Используется в ManBase::SimulateDeath().

◆ TranslateIDToType()

TranslateIDToType ( int typeID)
inlineprotected
103 {
104 return m_IDToTypeMap.Get(typeID);
105 }

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

◆ Update()

override void Update ( float timeSlice)
inlineprotected

Generic update, called on frame from the player.

617 {
618 if (m_SuspendRequests.Count() > 0)
619 {
620 return;
621 }
622
624 }
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.
Definition GameplayEffectWidgets.c:379

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

Используется в ManBase::EOnFrame().

◆ UpdateBreathEffect()

void UpdateBreathEffect ( ImageWidget w)
inlineprotected
557 {
558 w.SetColor(m_BreathColor);
559 w.SetAlpha(m_BreathAlphaVal);
560 }

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

◆ UpdateFlashbangEffect()

void UpdateFlashbangEffect ( ImageWidget w)
inlineprotected
589 {
590 w.SetAlpha(1 - m_FlashbangCoverAlphaVal);
591 }

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

◆ UpdateOccluderEffect()

void UpdateOccluderEffect ( ImageWidget w,
int type,
float timeSlice,
Param p,
int handle )
inlineprotected
570 {
571 }

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

◆ UpdateVisibility()

void UpdateVisibility ( )
inlineprotected
214 {
215 Widget w;
216 //Hide diff
217 int value;
221 for (int i = 0; i < m_RunningEffectsPrevious.Count(); i++)
222 {
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
245 {
246 value = 0;
247 for (i = 0; i < runningEffectCount; i++)
248 {
249 value = m_RunningEffects.Get(i);
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
279 }
@ Count
Definition RandomGeneratorSyncManager.c:7

Перекрестные ссылки Count и m_Root.

Используется в AddActiveEffects(), AddSuspendRequest(), ClearSuspendRequests(), GameplayEffectWidgets(), RemoveActiveEffects(), RemoveSuspendRequest() и StopAllEffects().

◆ UpdateWidgets()

override void UpdateWidgets ( int type = -1,
float timeSlice = 0,
Param p = null,
int handle = -1 )
inlineprotected

Usually called in course of an OnFrame update, can be manually called from elsewhere with parameters.

380 {
383
384 if (type == EffectWidgetsTypes.ROOT)
385 {
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 {
396
398
399 if (dta.HasDefinedHandle() && dta.DataInitialized())
400 {
401 dta.Update(timeSlice,p,handle); //calculate and apply
402 }
403 else
404 {
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);
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 {
438 ProcessWidgetUpdate(w2,type,timeSlice,p,handle);
439 }
440 }
441 }
442 }
443 }
444
445 m_UpdatedWidgetsCheck.Clear();
447 }
void CalculateValues(int type=-1, float timeSlice=0, Param p=null, int handle=-1)
Only one calculation per unique WidgetSet.
Definition GameplayEffectWidgets.c:450
void ProcessWidgetUpdate(Widget w, int type, float timeSlice=0, Param p=null, int handle=-1)
Definition GameplayEffectWidgets.c:492
void HandleWidgetRoot(float timeSlice=0, Param p=null, int handle=-1)
Definition GameplayEffectWidgets.c:596

Перекрестные ссылки CalculateValues(), HandleWidgetRoot() и ProcessWidgetUpdate().

Используется в ScriptedWidgetEventHandler::OnBleedingIndicationChanged() и Update().

Поля

◆ BREATH_COLOR_MULT_MAX

const float BREATH_COLOR_MULT_MAX = 0.8
protected

◆ BREATH_COLOR_MULT_MIN

const float BREATH_COLOR_MULT_MIN = 0.5
protected

◆ BREATH_HDR_MAX

const float BREATH_HDR_MAX = 1.0
protected

◆ BREATH_HDR_MIN

const float BREATH_HDR_MIN = 0.005
protected

◆ m_BreathAlphaVal

float m_BreathAlphaVal
protected

◆ m_BreathColor

int m_BreathColor
protected

◆ m_BreathMultStamina

float m_BreathMultStamina
protected

◆ m_BreathResidue

float m_BreathResidue
protected

◆ m_FlashbangCoverAlphaVal

float m_FlashbangCoverAlphaVal
protected

◆ m_IDToTypeMap

ref map<int,typename> m_IDToTypeMap
protected

◆ m_Layouts

ref map<int,ref Widget> m_Layouts
protected

◆ m_Root

ref Widget m_Root
protected

◆ m_RunningEffects

ref set<int> m_RunningEffects
protected

◆ m_RunningEffectsPrevious

ref set<int> m_RunningEffectsPrevious
protected

◆ m_SuspendRequests

ref set<int> m_SuspendRequests
protected

◆ m_TimeProgBreath

float m_TimeProgBreath
protected

◆ m_UniqueLayouts

ref set<ref Widget> m_UniqueLayouts
protected

◆ m_UpdatedWidgetsCheck

ref array<ref Widget> m_UpdatedWidgetsCheck
protected

◆ m_UpdatedWidgetSetsCheck

ref array<int> m_UpdatedWidgetSetsCheck
protected

◆ m_UpdatingEffects

ref array<int> m_UpdatingEffects
protected

◆ m_WidgetDataMap

ref GameplayEffectDataMap m_WidgetDataMap
protected

◆ WIDGETSET_BREATH

const int WIDGETSET_BREATH = 100
protected

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