Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_InventoryHitZonePointUI.c
Go to the documentation of this file.
1 class SCR_InventoryHitZonePointContainerUI : ScriptedWidgetComponent
2 {
3  [Attribute("Bleeding")]
4  protected string m_sBleedingHitZoneName;
5 
6  [Attribute("Damage")]
7  protected string m_sDamageHitZoneName;
8 
9  protected SCR_InventoryHitZonePointUI m_pDamageHandler;
10 
11  protected ref array<HitZone> m_aGroupHitZones = {};
12  protected SCR_CharacterBloodHitZone m_pBloodHitZone;
13  protected ECharacterHitZoneGroup m_eHitZoneGroup;
14  protected IEntity m_Player;
15  protected SCR_TourniquetStorageComponent m_TourniquetStorage;
16  SCR_CharacterDamageManagerComponent m_pCharDmgManager;
17  protected TNodeId m_iBoneIndex;
18 
19  protected Widget m_wRoot;
20  protected Widget m_wGlow;
21  protected SCR_InventoryMenuUI m_pInventoryMenu;
22  protected BaseInventoryStorageComponent m_pStorage;
23  protected ref SCR_InventoryHitZoneUI m_pStorageUI;
24 
25  protected bool m_bSelected;
26  protected bool m_bApplicableItemsShown;
27  static SCR_InventoryHitZonePointContainerUI s_pSelectedPoint;
28 
29  //------------------------------------------------------------------------------------------------
30  override void HandlerAttached(Widget w)
31  {
32  m_wRoot = w;
33 
34  m_wGlow = w.FindAnyWidget("Glow");
35  m_wGlow.SetVisible(false);
36 
37  Widget damageW = w.FindAnyWidget(m_sDamageHitZoneName);
38  m_pDamageHandler = SCR_InventoryHitZonePointUI.Cast(damageW.FindHandler(SCR_InventoryHitZonePointUI));
39  }
40 
41  override bool OnClick(Widget w, int x, int y, int button)
42  {
43  if (button == 0)
44  {
45  if (!m_bApplicableItemsShown)
46  ShowApplicableItems();
47  else
48  HideApplicableItems();
49  }
50 
51  return false;
52  }
53 
54  void RemoveTourniquetFromSlot()
55  {
56  if (m_TourniquetStorage)
57  m_TourniquetStorage.RemoveTourniquetFromSlot(m_eHitZoneGroup);
58  }
59 
60  override bool OnMouseEnter(Widget w, int x, int y)
61  {
62  Highlight(true);
63 
64  SCR_InventorySpinBoxComponent spinbox = m_pInventoryMenu.GetAttachmentSpinBoxComponent();
65  if (spinbox)
66  {
67  int id = spinbox.FindItem(GetHitZoneName());
68  if (id > -1)
69  spinbox.SetCurrentItem(id);
70  }
71 
72  m_pStorageUI.OnFocus(m_pStorageUI.GetRootWidget(), 0, 0);
73 
74  return false;
75  }
76 
77  override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
78  {
79  Highlight(false);
80 
81  m_pStorageUI.OnFocusLost(m_pStorageUI.GetRootWidget(), 0, 0);
82 
83  return false;
84  }
85 
86  protected void Highlight(bool highlight)
87  {
88  m_pDamageHandler.Highlight(highlight);
89  }
90 
91  void SetGlowVisible(bool visible)
92  {
93  m_wGlow.SetVisible(visible);
94  }
95 
96  void Select(bool select = true)
97  {
98  if (s_pSelectedPoint)
99  {
100  s_pSelectedPoint.m_bSelected = false;
101  s_pSelectedPoint.Highlight(false);
102  }
103 
104  m_bSelected = select;
105  Highlight(select);
106  if (select)
107  {
108  s_pSelectedPoint = this;
109  }
110  else
111  {
112  s_pSelectedPoint = null;
113  }
114  }
115 
116  //------------------------------------------------------------------------------------------------
117  void ShowApplicableItems()
118  {
119  m_bApplicableItemsShown = true;
120  Select(true);
121  SCR_ApplicableMedicalItemPredicate predicate = new SCR_ApplicableMedicalItemPredicate();
122  predicate.characterEntity = m_Player;
123  predicate.hitZoneGroup = m_eHitZoneGroup;
124  m_pInventoryMenu.ShowAttachmentStorage(predicate);
125  }
126 
127  void HideApplicableItems()
128  {
129  m_bApplicableItemsShown = false;
130  if (m_pInventoryMenu.GetAttachmentStorageUI())
131  {
132  m_pInventoryMenu.RemoveAttachmentStorage(m_pInventoryMenu.GetAttachmentStorageUI());
133  m_pStorageUI.GetRootWidget().SetVisible(false);
134  Select(false);
135  }
136  }
137 
138  //------------------------------------------------------------------------------------------------
139  ECharacterHitZoneGroup GetHitZoneGroup()
140  {
141  return m_eHitZoneGroup;
142  }
143 
144  //------------------------------------------------------------------------------------------------
145  string GetHitZoneName()
146  {
147  switch (m_eHitZoneGroup)
148  {
149  case ECharacterHitZoneGroup.HEAD:
150  {
151  return "#AR-Inventory_Head";
152  } break;
153 
154  case ECharacterHitZoneGroup.UPPERTORSO:
155  {
156  return "#AR-Inventory_Chest";
157  } break;
158 
159  case ECharacterHitZoneGroup.LOWERTORSO:
160  {
161  return "#AR-Inventory_Abdomen";
162  } break;
163 
164  case ECharacterHitZoneGroup.LEFTARM:
165  {
166  return "#AR-Inventory_LeftArm";
167  } break;
168 
169  case ECharacterHitZoneGroup.RIGHTARM:
170  {
171  return "#AR-Inventory_RightArm";
172  } break;
173 
174  case ECharacterHitZoneGroup.LEFTLEG:
175  {
176  return "#AR-Inventory_LeftLeg";
177  } break;
178 
179  case ECharacterHitZoneGroup.RIGHTLEG:
180  {
181  return "#AR-Inventory_RightLeg";
182  } break;
183  }
184 
185  return string.Empty;
186  }
187 
188  //------------------------------------------------------------------------------------------------
189  void InitializeHitZoneUI(BaseInventoryStorageComponent storage, SCR_InventoryMenuUI menuManager, int hitZoneId, IEntity player)
190  {
191  m_pStorage = storage;
192  m_pInventoryMenu = menuManager;
193  m_Player = player;
194 
195  m_TourniquetStorage = SCR_TourniquetStorageComponent.Cast(m_Player.FindComponent(SCR_TourniquetStorageComponent));
196  m_TourniquetStorage.GetOnTourniquetMoved().Insert(OnTourniquetMoved);
197 
198  m_pCharDmgManager = SCR_CharacterDamageManagerComponent.Cast(player.FindComponent(SCR_CharacterDamageManagerComponent));
199  if (!m_pCharDmgManager)
200  return;
201 
202  m_eHitZoneGroup = m_pCharDmgManager.LIMB_GROUPS.Get( hitZoneId );
203  m_pDamageHandler.SetParentContainer(this);
204 
205  m_pBloodHitZone = SCR_CharacterBloodHitZone.Cast(m_pCharDmgManager.GetBloodHitZone());
206  m_pBloodHitZone.GetOnDamageStateChanged().Insert(UpdateHitZoneState);
207  m_aGroupHitZones.Insert(m_pBloodHitZone);
208 
209  UpdateHitZoneState(m_pBloodHitZone);
210 
211  m_pCharDmgManager.GetOnDamageOverTimeAdded().Insert(UpdateHitZoneDOTAdded);
212  m_pCharDmgManager.GetOnDamageOverTimeRemoved().Insert(UpdateHitZoneDOTRemoved);
213  m_pCharDmgManager.GetHitZonesOfGroup(m_eHitZoneGroup, m_aGroupHitZones);
214  string boneName = m_pCharDmgManager.GetBoneName(m_eHitZoneGroup);
215  m_iBoneIndex = m_Player.GetAnimation().GetBoneIndex(boneName);
216 
217  foreach (HitZone hz : m_aGroupHitZones)
218  {
220  if (scrHZ)
221  {
222  scrHZ.GetOnDamageStateChanged().Insert(UpdateHitZoneState);
223  UpdateHitZoneState(scrHZ);
224  }
225  }
226 
227  bool tourniquetted = m_pCharDmgManager.GetGroupTourniquetted(m_eHitZoneGroup);
228  Widget newStorage = GetGame().GetWorkspace().CreateWidgets(m_pInventoryMenu.BACKPACK_STORAGE_LAYOUT, m_wRoot);
229  m_pStorageUI = new SCR_InventoryHitZoneUI(storage, null, menuManager, 0, null, this, tourniquetted);
230  newStorage.AddHandler(m_pStorageUI);
231  m_pStorageUI.GetRootWidget().SetVisible(false);
232  }
233 
234  protected void OnTourniquetMoved(int hzGroupId)
235  {
236  array<HitZone> hzs = {};
237  m_pCharDmgManager.GetHitZonesOfGroup(hzGroupId, hzs);
238  UpdateHitZoneState(SCR_HitZone.Cast(hzs[0]));
239 
240  }
241 
242  //------------------------------------------------------------------------------------------------
243  protected void UpdateHitZoneDOTAdded(EDamageType dType, float dps, HitZone hz = null)
244  {
245  UpdateHitZoneState(SCR_HitZone.Cast(hz));
246  }
247 
248  //------------------------------------------------------------------------------------------------
249  protected void UpdateHitZoneDOTRemoved(EDamageType dType, HitZone hz = null)
250  {
251  UpdateHitZoneState(SCR_HitZone.Cast(hz));
252  }
253 
254  //------------------------------------------------------------------------------------------------
255  protected void UpdateBleedingHitZone(EDamageType dType, float dps, HitZone hz = null)
256  {
257  if (dType != EDamageType.BLEEDING)
258  return;
259 
260  UpdateHitZoneState(SCR_HitZone.Cast(hz));
261  }
262 
263  //------------------------------------------------------------------------------------------------
264  protected void UpdateBleedingHitZoneRemoved(EDamageType dType, HitZone hz = null)
265  {
266  if (dType != EDamageType.BLEEDING)
267  return;
268 
269  UpdateHitZoneState(SCR_HitZone.Cast(hz));
270  }
271 
272  //------------------------------------------------------------------------------------------------
273  protected void UpdateHitZoneState(SCR_HitZone hz)
274  {
275  if (!hz || !m_aGroupHitZones.Contains(hz))
276  return;
277 
278  float health = m_pCharDmgManager.GetGroupHealthScaled(m_eHitZoneGroup);
279  float bleeding;
280 
281  foreach (HitZone groupHZ : m_aGroupHitZones)
282  {
283  if (groupHZ == m_pBloodHitZone)
284  continue;
285 
286  if (groupHZ.GetDamageOverTime(EDamageType.BLEEDING))
287  {
288  bleeding = m_pCharDmgManager.GetGroupDamageOverTime(m_eHitZoneGroup, EDamageType.BLEEDING);
289  break;
290  }
291  }
292 
293  float dotHealing = m_pCharDmgManager.GetGroupDamageOverTime(m_eHitZoneGroup, EDamageType.HEALING);
294  float dotRegen = m_pCharDmgManager.GetGroupDamageOverTime(m_eHitZoneGroup, EDamageType.REGENERATION);
295  float regen = (dotHealing + dotRegen);
296 
297  bool tourniquetted = m_pCharDmgManager.GetGroupTourniquetted(m_eHitZoneGroup);
298  bool salineBagged = m_pCharDmgManager.GetGroupSalineBagged(m_eHitZoneGroup);
299 
300  if (m_pStorageUI)
301  m_pStorageUI.SetTourniquetted(tourniquetted);
302 
303  bool bleedingVisible = (bleeding > 0 || tourniquetted || salineBagged);
304  bool damageVisible = (health < 1 && bleeding == 0);
305  m_pDamageHandler.GetRootWidget().SetVisible(damageVisible || bleedingVisible);
306  m_pDamageHandler.UpdateHitZoneState(health, bleeding, regen, tourniquetted, salineBagged);
307 
308  SetGlowVisible(bleedingVisible);
309 
310  if (!m_pInventoryMenu)
311  return;
312 
313  if (m_bSelected || m_pInventoryMenu.IsUsingGamepad())
314  ShowApplicableItems();
315 
316  if (bleeding > 0 || health < 1 || tourniquetted || salineBagged)
317  m_pInventoryMenu.AddItemToAttachmentSelection(GetHitZoneName(), this);
318  else
319  m_pInventoryMenu.RemoveItemFromAttachmentSelection(GetHitZoneName());
320  }
321 
322  void SetGlowColor(Color color)
323  {
324  if (m_wGlow)
325  m_wGlow.SetColor(color);
326  }
327 
328  //------------------------------------------------------------------------------------------------
329  Widget GetRootWidget()
330  {
331  return m_wRoot;
332  }
333 
334  TNodeId GetBoneIndex()
335  {
336  return m_iBoneIndex;
337  }
338 
339  SCR_InventoryMenuUI GetInventoryHandler()
340  {
341  return m_pInventoryMenu;
342  }
343 
344  SCR_InventoryHitZoneUI GetStorage()
345  {
346  return m_pStorageUI;
347  }
348 }
349 
350 //------------------------------------------------------------------------------------------------
351 class SCR_InventoryHitZonePointUI : ScriptedWidgetComponent
352 {
355 
356  [Attribute("1")]
357  protected bool m_bAllowHoverOver;
358 
359  [Attribute("0")]
360  protected bool m_bAllowProgressAnim;
361 
362  [Attribute("0")]
363  protected bool m_bBleedingHitZone;
364 
365  [Attribute()]
366  protected ref array<int> m_aDOTLevels;
367 
368  [Attribute("IconOverlay")]
369  protected string m_sIconOverlay;
370  protected Widget m_wIconOverlay;
371 
372  [Attribute("Icon")]
373  protected string m_sIcon;
374  protected ImageWidget m_wIcon;
375 
376  [Attribute("Outline")]
377  protected string m_sOutline;
378  protected ImageWidget m_wOutline;
379 
380  [Attribute("Background")]
381  protected string m_sBackground;
382  protected ImageWidget m_wBackground;
383 
384  [Attribute("Tourniquet")]
385  protected string m_sIconTourniquet;
386  protected ImageWidget m_wIconTourniquet;
387 
388  [Attribute("Saline")]
389  protected string m_sIconSalineBag;
390  protected ImageWidget m_wIconSalineBag;
391 
392  protected Widget m_wRoot;
393  protected ButtonWidget m_wButton;
394 
395  protected static SCR_InventoryHitZonePointUI s_pSelectedPoint;
396  protected bool m_bSelected;
397 
398  protected const float OPACITY_DEFAULT = 0.4;
399  protected const float OPACITY_BLOOD = 0.5;
400  protected const float OPACITY_SOLID = 1;
401 
402  //------------------------------------------------------------------------------------------------
404  protected ref array<HitZone> m_aGroupHitZones = {};
405 
406  protected string m_sSevereDamage = "#AR-DamageInfo_Damage_Severe";
407  protected string m_sHighDamage = "#AR-DamageInfo_Damage_High";
408  protected string m_sMediumDamage = "#AR-DamageInfo_Damage_Medium";
409  protected string m_sLowDamage = "#AR-DamageInfo_Damage_Low";
410 
411  protected string m_sSevereBleeding = "#AR-DamageInfo_Bleeding_Severe";
412  protected string m_sHighBleeding = "#AR-DamageInfo_Bleeding_High";
413  protected string m_sMediumBleeding = "#AR-DamageInfo_Bleeding_Medium";
414  protected string m_sLowBleeding = "#AR-DamageInfo_Bleeding_Low";
415 
416  protected string m_sSevereBloodLoss = "#AR-DamageInfo_Bloodloss_Severe";
417  protected string m_sHighBloodLoss = "#AR-DamageInfo_Bloodloss_High";
418  protected string m_sMediumBloodLoss = "#AR-DamageInfo_Bloodloss_Medium";
419  protected string m_sLowBloodLoss = "#AR-DamageInfo_Bloodloss_Low";
420 
421  protected const string DAMAGE_INFO = "{55AFA256E1C20FB2}UI/layouts/Menus/Inventory/InventoryDamageInfo.layout";
422 
425  float m_fLowDamageThreshold = 0.25;
431  float m_fLowBloodLossThreshold = 0.8125;
432 
433  protected IEntity m_Player;
436 
437  [Attribute("Anim")]
438  protected string m_sAnimWidgetName;
439  protected Widget m_wAnim;
441 
442  protected WidgetAnimationBase m_IconOpacityAnim;
443  protected WidgetAnimationBase m_IconSizeAnim;
444  protected WidgetAnimationBase m_IconOutlineAnim;
445  protected WidgetAnimationBase m_DamageIconOpacityAnim;
446 
447  protected bool m_bIsRegenAnim;
448  protected bool m_bIsBloodAnim;
449 
450  //------------------------------------------------------------------------------------------------
451  override void HandlerAttached(Widget w)
452  {
453  m_wRoot = w;
454 
455  float opacity = OPACITY_DEFAULT;
456  if (!m_bAllowHoverOver)
457  opacity = OPACITY_SOLID;
458 
459  m_wButton = ButtonWidget.Cast(w.FindAnyWidget("Btn"));
460  m_wIconOverlay = w.FindAnyWidget(m_sIconOverlay);
461  m_wIcon = ImageWidget.Cast(w.FindAnyWidget(m_sIcon));
462  m_wBackground = ImageWidget.Cast(w.FindAnyWidget(m_sBackground));
463  m_wOutline = ImageWidget.Cast(w.FindAnyWidget(m_sOutline));
464  m_wIconTourniquet = ImageWidget.Cast(w.FindAnyWidget(m_sIconTourniquet));
465  m_wIconSalineBag = ImageWidget.Cast(w.FindAnyWidget(m_sIconSalineBag));
466  m_wAnim = w.FindAnyWidget(m_sAnimWidgetName);
467 
468  Widget damageOverlay = w.FindAnyWidget("DamageOverlay");
469  if (damageOverlay)
470  {
473  m_DamageState = m_DamageStateUIComp.GetUiInfo();
474  }
475 
477  }
478 
479  override void HandlerDeattached(Widget w)
480  {
482  StopRegenAnim();
483  }
484 
485  //------------------------------------------------------------------------------------------------
486  override bool OnMouseEnter(Widget w, int x, int y)
487  {
488  if (w.GetName() == "BigBloodIcon")
489  ShowVirtualHZInfo(w, true, false);
490  else if (w.GetName() == "BigDamageIcon")
491  ShowVirtualHZInfo(w, false, true);
492 
493  return false;
494  }
495 
496  //------------------------------------------------------------------------------------------------
497  override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
498  {
499  if (w.GetName() == "BigBloodIcon")
501  else if (w.GetName() == "BigDamageIcon")
503 
504  return false;
505  }
506 
507  //------------------------------------------------------------------------------------------------
508  void Select(bool select)
509  {
510  if (s_pSelectedPoint)
511  {
512  s_pSelectedPoint.m_bSelected = false;
513  s_pSelectedPoint.Highlight(false);
514  }
515 
516  m_bSelected = select;
517  Highlight(select);
518  if (select)
519  s_pSelectedPoint = this;
520  else
521  s_pSelectedPoint = null;
522  }
523 
524  //------------------------------------------------------------------------------------------------
525  void Highlight(bool highlight)
526  {
527  ShowHitZoneInfo(highlight);
528 
529  if (!m_bAllowHoverOver)
530  return;
531 
532  float opacity = OPACITY_SOLID;
533  if (!highlight)
534  opacity = OPACITY_DEFAULT;
535 
536  if (m_wIconOverlay)
537  m_wIconOverlay.SetOpacity(opacity);
538  }
539 
540  //------------------------------------------------------------------------------------------------
542  {
543  SCR_InventoryMenuUI inventoryMenuUI = SCR_InventoryMenuUI.Cast(GetGame().GetMenuManager().FindMenuByPreset(ChimeraMenuPreset.Inventory20Menu));
544  if (!inventoryMenuUI)
545  return null;
546 
547  return inventoryMenuUI;
548  }
549 
550  //------------------------------------------------------------------------------------------------
552  protected void ShowVirtualHZInfo(Widget w, bool bloodIcon = false, bool fractureIcon = false)
553  {
554  if (!bloodIcon && !fractureIcon)
555  return;
556 
557  int groupDamageIntensity;
558  bool regenerating;
559  float bleedingRate, bloodHealth;
560  bool isTourniquetted, isSalineBagged, isMorphined, isArmFractured, isLegFractured;
561  string damageIntensity, damageIntensityText, bleedingIntensityText, bloodLevelText;
562 
563  GetHitZoneInfo(ECharacterHitZoneGroup.VIRTUAL, groupDamageIntensity, regenerating, bleedingRate, bloodHealth, isTourniquetted, isSalineBagged, isArmFractured, isLegFractured);
564  GetDamageInfoTexts(ECharacterHitZoneGroup.VIRTUAL, groupDamageIntensity, bleedingRate, damageIntensity, damageIntensityText, bleedingIntensityText);
565  GetBloodInfoText(bloodHealth, bloodLevelText);
566 
567  Widget localInfoWidget;
568  if (!m_DamageInfo)
569  {
570  SCR_InventoryMenuUI inventoryMenuUI = GetInventoryMenuUI();
571  if (!inventoryMenuUI)
572  return;
573 
574  localInfoWidget = GetGame().GetWorkspace().CreateWidgets(DAMAGE_INFO, inventoryMenuUI.GetRootWidget());
575  if (!localInfoWidget)
576  return;
577 
578  localInfoWidget.SetVisible(true);
579  localInfoWidget.SetOpacity(0);
580 
581  localInfoWidget.AddHandler(new SCR_InventoryDamageInfoUI());
582  m_DamageInfo = SCR_InventoryDamageInfoUI.Cast(localInfoWidget.FindHandler(SCR_InventoryDamageInfoUI));
583  }
584 
585  if (!m_DamageInfo)
586  return;
587 
588  m_DamageInfo.SetName("");
589  if (fractureIcon)
590  m_DamageInfo.SetFractureStateVisible(isArmFractured, isLegFractured);
591  else if (bloodIcon)
592  m_DamageInfo.SetBleedingStateVisible(bloodHealth < 1, bloodLevelText);
593 
594  //callLater is here because the widget needs to be created before size can be determined and location can be set
595  GetGame().GetCallqueue().CallLater(EnableVirtualHZInfoWidget, 300, false, localInfoWidget, w);
596  }
597 
598  //------------------------------------------------------------------------------------------------
600  protected void EnableVirtualHZInfoWidget(Widget localInfoWidget, Widget w)
601  {
602  if (!m_DamageInfo)
603  return;
604 
605  float x, y;
606  w.GetScreenPos(x, y);
607 
608  float width, height;
609  w.GetScreenSize(width, height);
610 
611  float screenSizeX, screenSizeY;
612  GetGame().GetWorkspace().GetScreenSize(screenSizeX, screenSizeY);
613 
614  localInfoWidget.SetOpacity(1);
615 
616  float infoWidth, infoHeight;
617  int iMouseX, iMouseY;
618 
619  localInfoWidget.GetScreenSize(infoWidth, infoHeight);
620  iMouseX = x;
621  iMouseY = y + height;
622  if (x + infoWidth > screenSizeX)
623  iMouseX = screenSizeX - infoWidth - width * 0.5; // offset info if it would go outside of the screen
624 
625  m_DamageInfo.Move( GetGame().GetWorkspace().DPIUnscale( iMouseX ) - infoWidth * 0.60, GetGame().GetWorkspace().DPIUnscale( iMouseY ) );
626  }
627 
628  protected void HideVirtualHZInfo()
629  {
630  if ( !m_DamageInfo )
631  return;
632  m_DamageInfo.Hide();
633  m_DamageInfo.Destroy();
634  }
635 
636  protected void ShowHitZoneInfo(bool show, bool virtualHZ = false)
637  {
638  if (!m_pParentContainer && !virtualHZ)
639  return;
640 
641  if (!show && !virtualHZ)
642  {
643  m_pParentContainer.GetInventoryHandler().HideDamageInfo();
644  return;
645  }
646 
648  if (!virtualHZ)
649  group = m_pParentContainer.GetHitZoneGroup();
650 
651  int groupDamageIntensity;
652  bool regenerating;
653  float bleedingRate, bloodHealth;
654  bool isTourniquetted, isSalineBagged, isMorphined, isArmFractured, isLegFractured;
655  string damageIntensity, damageIntensityText, bleedingIntensityText;
656 
657  GetHitZoneInfo(group, groupDamageIntensity, regenerating, bleedingRate, bloodHealth, isTourniquetted, isSalineBagged, isArmFractured, isLegFractured);
658  GetDamageInfoTexts(group, groupDamageIntensity, bleedingRate, damageIntensity, damageIntensityText, bleedingIntensityText);
659 
660  SCR_InventoryDamageUIInfo damageUIInfo;
661  damageUIInfo = new SCR_InventoryDamageUIInfo(
662  groupDamageIntensity != 0,
663  regenerating,
664  bleedingRate != 0,
665  isTourniquetted,
666  isSalineBagged,
667  isMorphined,
668  isArmFractured,
669  isLegFractured,
670  damageIntensity,
671  damageIntensityText,
672  bleedingIntensityText
673  );
674 
675  string name = "";
676  if (!virtualHZ)
677  name = m_pParentContainer.GetHitZoneName();
678 
679  m_pParentContainer.GetInventoryHandler().ShowDamageInfo(name, damageUIInfo);
680  }
681 
682  //------------------------------------------------------------------------------------------------
683  void GetDamageInfoTexts(EHitZoneGroup group, int groupDamageIntensity, float bleedingRate, out string damageIntensity, out string damageIntensityText, out string bleedingIntensityText)
684  {
685  if (groupDamageIntensity == 0)
686  {
687  damageIntensity = "";
688  damageIntensityText = "";
689  }
690  else if (groupDamageIntensity == 1)
691  {
692  damageIntensity = "Wound_1_UI";
693  damageIntensityText = m_sLowDamage;
694  }
695  else if (groupDamageIntensity == 2)
696  {
697  damageIntensity = "Wound_2_UI";
698  damageIntensityText = m_sMediumDamage;
699  }
700  else if (groupDamageIntensity == 3)
701  {
702  damageIntensity = "Wound_3_UI";
703  damageIntensityText = m_sHighDamage;
704  }
705  else if (groupDamageIntensity == 4)
706  {
707  damageIntensity = "Wound_4_UI";
708  damageIntensityText = m_sSevereDamage;
709  }
710 
711  if (bleedingRate < m_fLowBleedingThreshold)
712  bleedingIntensityText = m_sLowBleeding;
713  else if (bleedingRate >= m_fLowBleedingThreshold && bleedingRate < m_fMediumBleedingThreshold)
714  bleedingIntensityText = m_sMediumBleeding;
715  else if (bleedingRate >= m_fMediumBleedingThreshold && bleedingRate < m_fHighBleedingThreshold)
716  bleedingIntensityText = m_sHighBleeding;
717  else if (bleedingRate >= m_fHighBleedingThreshold)
718  bleedingIntensityText = m_sSevereBleeding;
719  }
720 
721  //------------------------------------------------------------------------------------------------
722  void GetBloodInfoText(float bloodHitZoneHealthScaled, out string bloodLossText)
723  {
724  if (bloodHitZoneHealthScaled > m_fLowBloodLossThreshold)
725  bloodLossText = m_sLowBloodLoss;
726  else if (bloodHitZoneHealthScaled > m_fMediumBloodLossThreshold)
727  bloodLossText = m_sMediumBloodLoss;
728  else if (bloodHitZoneHealthScaled > m_fHighBloodLossThreshold)
729  bloodLossText = m_sHighBloodLoss;
730  else
731  bloodLossText = m_sSevereBloodLoss;
732  }
733 
734  //------------------------------------------------------------------------------------------------
735  protected void GetHitZoneInfo(EHitZoneGroup group, out int groupDamageIntensity, out bool regenerating, out float bleedingRate, out float bloodHealth, out bool isTourniquetted, out bool isSalineBagged, out bool isArmFractured, out bool isLegFractured)
736  {
737  ChimeraCharacter character = ChimeraCharacter.Cast(GetGame().GetPlayerController().GetControlledEntity());
738  if (!character)
739  return;
740 
741  SCR_CharacterDamageManagerComponent damageMan = SCR_CharacterDamageManagerComponent.Cast( character.GetDamageManager() );
742  if (!damageMan)
743  return;
744 
745  float groupHealth = damageMan.GetGroupHealthScaled(group);
746  bleedingRate = damageMan.GetGroupDamageOverTime(group, EDamageType.BLEEDING);
747  isTourniquetted = damageMan.GetGroupTourniquetted(group);
748  isSalineBagged = damageMan.GetGroupSalineBagged(group);
749 
750  if (group == ECharacterHitZoneGroup.VIRTUAL)
751  {
752  isArmFractured = damageMan.GetAimingDamage() > 0;
753  isLegFractured = damageMan.GetMovementDamage() > 0;
754  SCR_CharacterBloodHitZone hz = SCR_CharacterBloodHitZone.Cast(damageMan.GetBloodHitZone());
755  if (!hz)
756  return;
757 
758  bleedingRate = hz.GetDamageOverTime(EDamageType.BLEEDING);
759  bloodHealth = hz.GetHealthScaled();
760  }
761 
762  if (group == ECharacterHitZoneGroup.LEFTARM || group == ECharacterHitZoneGroup.RIGHTARM)
763  isArmFractured = damageMan.GetAimingDamage() > 0;
764  else if (group == ECharacterHitZoneGroup.LEFTLEG || group == ECharacterHitZoneGroup.RIGHTLEG)
765  isLegFractured = damageMan.GetMovementDamage() > 0;
766 
767  if (damageMan.GetGroupDamageOverTime(group, EDamageType.HEALING) == 0 && damageMan.GetGroupDamageOverTime(group, EDamageType.REGENERATION) == 0)
768  regenerating = false;
769  else
770  regenerating = true;
771 
772  if (groupHealth == 1)
773  groupDamageIntensity = 0;
774  else if (groupHealth < m_fLowDamageThreshold)
775  groupDamageIntensity = 4;
776  else if (groupHealth >= m_fLowDamageThreshold && groupHealth < m_fMediumDamageThreshold)
777  groupDamageIntensity = 3;
778  else if (groupHealth >= m_fMediumDamageThreshold && groupHealth < m_fHighDamageThreshold)
779  groupDamageIntensity = 2;
780  else if (groupHealth >= m_fHighDamageThreshold)
781  groupDamageIntensity = 1;
782  }
783 
784  //------------------------------------------------------------------------------------------------
785  void UpdateHitZoneState(float health, float bleeding, float regen, bool tourniquetted, bool salineBagged)
786  {
788  return;
789 
790  if (bleeding > 0)
791  {
792  if (tourniquetted || salineBagged)
794  else
796  }
797  else
798  {
800  }
801 
802  int damageIntensity;
803  float bleedRate, bloodHealth;
804  bool regenerating;
805  bool isArmFractured, isLegFractured;
806  GetHitZoneInfo(m_eHitZoneGroup, damageIntensity, regenerating, bleedRate, bloodHealth, tourniquetted, salineBagged, isArmFractured, isLegFractured);
807  if (damageIntensity > 0)
808  m_DamageStateUIComp.SetVisuals(m_DamageState, damageIntensity-1);
809 
810  SetRegeneration(regen, bleeding);
811 
812  m_wIcon.SetVisible(!tourniquetted && !salineBagged);
813  if (m_wIconTourniquet)
814  m_wIconTourniquet.SetVisible(tourniquetted);
815  if (m_wIconSalineBag)
816  m_wIconSalineBag.SetVisible(salineBagged && !tourniquetted);
817  }
818 
819  protected void SetRegeneration(float regen, float bleeding)
820  {
821  if (!m_DamageState)
822  return;
823 
824  bool isRegen = (regen < 0);
825  float regenSpeed = Math.AbsFloat(regen);
826  if (regenSpeed < 0.3)
827  regenSpeed = 0.3;
828 
829  if (isRegen && !bleeding)
830  PlayRegenAnim(regenSpeed);
831  else
832  StopRegenAnim();
833 
834  Color bckg = m_DamageState.GetBackgroundColor();
835  Color outline = m_DamageState.GetOutlineColor();
836 
837  bool glow = true;
838  if (isRegen && bleeding == 0)
839  {
840  bckg = m_DamageState.GetBackgroundColorRegen();
841  outline = m_DamageState.GetOutlineColorRegen();
842  glow = false;
843  }
844 
845  m_pParentContainer.SetGlowVisible(!isRegen && glow);
846  m_wBackground.SetColor(bckg);
847  m_wOutline.SetColor(outline);
848  }
849 
850  protected void PlayRegenAnim(float regenSpeed = 1)
851  {
852  if (!m_DamageState)
853  return;
854 
856  {
857  m_IconOutlineAnim.SetSpeed(regenSpeed);
858  return;
859  }
860 
861  m_bIsRegenAnim = true;
862  m_IconOutlineAnim = AnimateWidget.Color(m_wOutline, m_DamageState.GetOutlineColorRegen(), regenSpeed);
863  if (m_IconOutlineAnim)
864  {
865  m_IconOutlineAnim.SetRepeat(true);
866  m_IconOutlineAnim.GetOnCycleCompleted().Insert(OnAnimCycleComplete);
867  }
868  }
869 
870  protected void StopRegenAnim()
871  {
872  if (!m_bIsRegenAnim)
873  return;
874 
875  m_bIsRegenAnim = false;
876  if (m_IconOutlineAnim)
877  {
878  m_IconOutlineAnim.GetOnCycleCompleted().Remove(OnAnimCycleComplete);
879  AnimateWidget.StopAnimation(m_IconOutlineAnim);
880  }
881  }
882 
883  protected void PlayBloodDropAnim(float speed = 1)
884  {
885  if (m_bIsBloodAnim)
886  {
887  m_IconOpacityAnim.SetSpeed(speed);
888  m_IconSizeAnim.SetSpeed(speed);
889  m_DamageIconOpacityAnim.SetSpeed(speed);
890  return;
891  }
892 
893  if (m_wAnim && !m_bIsBloodAnim)
894  {
895  m_wAnim.SetVisible(true);
896 
897  float targetOpacity = OPACITY_BLOOD;
898  float opacitySpeed = speed;
899  m_IconOpacityAnim = AnimateWidget.Opacity(m_wAnim, targetOpacity, opacitySpeed);
900  if (m_IconOpacityAnim)
901  {
902  m_IconOpacityAnim.SetRepeat(true);
903  m_IconOpacityAnim.GetOnCycleCompleted().Insert(OnAnimCycleComplete);
904  }
905 
906  float targetSize[2] = {32, 32};
907  m_IconSizeAnim = AnimateWidget.Size(m_wAnim, targetSize, speed);
908  if (m_IconSizeAnim)
909  {
910  m_IconSizeAnim.SetRepeat(true);
911  m_IconSizeAnim.GetOnCycleCompleted().Insert(OnAnimCycleComplete);
912  }
913 
914  m_bIsBloodAnim = true;
915 
916  m_wIcon.SetOpacity(0);
917  m_DamageIconOpacityAnim = AnimateWidget.Opacity(m_wIcon, 1, opacitySpeed);
919  {
920  m_DamageIconOpacityAnim.SetRepeat(true);
921  m_DamageIconOpacityAnim.GetOnCycleCompleted().Insert(OnAnimCycleComplete);
922  }
923  }
924  }
925 
926  protected void OnAnimCycleComplete(WidgetAnimationBase anim)
927  {
928  /*
929  DO NOT REMOVE OR YOU'LL BREAK ANIM REPEAT FUNCTIONALITY
930  WidgetAnimationBase.m_OnCycleCompleted needs to exist,
931  otherwise WidgetAnimationBase.OnUpdate will return false after the cycle is finished and stop animating
932  */
933  }
934 
935  protected void StopBloodDropAnim()
936  {
937  m_bIsBloodAnim = false;
938 
939  if (m_IconOpacityAnim)
940  m_IconOpacityAnim.GetOnCycleCompleted().Remove(OnAnimCycleComplete);
941  if (m_IconSizeAnim)
942  m_IconSizeAnim.GetOnCycleCompleted().Remove(OnAnimCycleComplete);
944  m_DamageIconOpacityAnim.GetOnCycleCompleted().Remove(OnAnimCycleComplete);
945 
946  AnimateWidget.StopAnimation(m_IconOpacityAnim);
947  AnimateWidget.StopAnimation(m_IconSizeAnim);
948  AnimateWidget.StopAnimation(m_DamageIconOpacityAnim);
949 
950  if (m_wIcon)
951  m_wIcon.SetOpacity(1);
952  if (m_wAnim)
953  m_wAnim.SetVisible(false);
954  }
955 
956  void SetBloodLevelProgress(float bloodLevel)
957  {
958  if (!m_bAllowProgressAnim || !m_wIcon)
959  return;
960 
961  float mask = Math.Lerp(0.25, 0.75, 1 - bloodLevel);
962  m_wIcon.SetMaskProgress(mask);
963  }
964 
965  Widget GetRootWidget()
966  {
967  return m_wRoot;
968  }
969 
971  {
972  m_pParentContainer = container;
973  m_eHitZoneGroup = container.GetHitZoneGroup();
974  }
975 };
SCR_InventoryDamageInfoUI
Definition: SCR_InventoryDamageInfoUI.c:5
m_IconSizeAnim
protected WidgetAnimationBase m_IconSizeAnim
Definition: SCR_InventoryHitZonePointUI.c:443
ECharacterHitZoneGroup
ECharacterHitZoneGroup
Definition: SCR_CharacterDamageManagerComponent.c:1
StopBloodDropAnim
protected void StopBloodDropAnim()
Definition: SCR_InventoryHitZonePointUI.c:935
OnMouseLeave
override bool OnMouseLeave(Widget w, Widget enterW, int x, int y)
Definition: SCR_InventoryHitZonePointUI.c:497
m_bAllowProgressAnim
protected bool m_bAllowProgressAnim
Definition: SCR_InventoryHitZonePointUI.c:360
OPACITY_SOLID
const protected float OPACITY_SOLID
Definition: SCR_InventoryHitZonePointUI.c:400
SetBloodLevelProgress
void SetBloodLevelProgress(float bloodLevel)
Definition: SCR_InventoryHitZonePointUI.c:956
m_fLowBloodLossThreshold
float m_fLowBloodLossThreshold
Definition: SCR_InventoryHitZonePointUI.c:431
SCR_DamageStateUIInfo
Definition: SCR_DamageStateUIInfo.c:2
GetDamageInfoTexts
void GetDamageInfoTexts(EHitZoneGroup group, int groupDamageIntensity, float bleedingRate, out string damageIntensity, out string damageIntensityText, out string bleedingIntensityText)
Definition: SCR_InventoryHitZonePointUI.c:683
m_eHitZoneGroup
protected ECharacterHitZoneGroup m_eHitZoneGroup
Definition: SCR_InventoryHitZonePointUI.c:403
m_wIcon
protected ImageWidget m_wIcon
Definition: SCR_InventoryHitZonePointUI.c:374
m_wAnim
protected Widget m_wAnim
Definition: SCR_InventoryHitZonePointUI.c:439
HideVirtualHZInfo
protected void HideVirtualHZInfo()
Definition: SCR_InventoryHitZonePointUI.c:628
m_wRoot
protected Widget m_wRoot
Definition: SCR_ScenarioFrameworkLayerTaskDefend.c:59
SCR_CharacterHitZone
Definition: SCR_CharacterHitZone.c:55
PlayRegenAnim
protected void PlayRegenAnim(float regenSpeed=1)
Definition: SCR_InventoryHitZonePointUI.c:850
PlayBloodDropAnim
protected void PlayBloodDropAnim(float speed=1)
Definition: SCR_InventoryHitZonePointUI.c:883
HitZone
Definition: HitZone.c:12
StopRegenAnim
protected void StopRegenAnim()
Definition: SCR_InventoryHitZonePointUI.c:870
GetRootWidget
Widget GetRootWidget()
Definition: SCR_InventoryHitZonePointUI.c:965
SCR_TourniquetStorageComponent
Definition: SCR_TourniquetStorageComponent.c:48
m_DamageInfo
protected SCR_InventoryDamageInfoUI m_DamageInfo
Definition: SCR_InventoryHitZonePointUI.c:440
Highlight
void Highlight(bool highlight)
Definition: SCR_InventoryHitZonePointUI.c:525
SCR_InventoryHitZoneUI
void SCR_InventoryHitZoneUI(BaseInventoryStorageComponent storage, LoadoutAreaType slotID=null, SCR_InventoryMenuUI menuManager=null, int iPage=0, array< BaseInventoryStorageComponent > aTraverseStorage=null, SCR_InventoryHitZonePointContainerUI parent=null, bool isTourniquetted=false)
Definition: SCR_InventoryHitZoneSlotUI.c:83
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
m_fHighBleedingThreshold
float m_fHighBleedingThreshold
Definition: SCR_InventoryHitZonePointUI.c:426
m_fMediumDamageThreshold
float m_fMediumDamageThreshold
Definition: SCR_InventoryHitZonePointUI.c:424
EnableVirtualHZInfoWidget
protected void EnableVirtualHZInfoWidget(Widget localInfoWidget, Widget w)
Determine size and location for the infowidget.
Definition: SCR_InventoryHitZonePointUI.c:600
m_DamageState
SCR_InventoryHitZonePointContainerUI m_DamageState
m_bBleedingHitZone
protected bool m_bBleedingHitZone
Definition: SCR_InventoryHitZonePointUI.c:363
SCR_InventoryDamageUIInfo
Definition: SCR_InventoryDamageUIInfo.c:2
m_fHighBloodLossThreshold
float m_fHighBloodLossThreshold
Definition: SCR_InventoryHitZonePointUI.c:429
OnAnimCycleComplete
protected void OnAnimCycleComplete(WidgetAnimationBase anim)
Definition: SCR_InventoryHitZonePointUI.c:926
UpdateHitZoneState
void UpdateHitZoneState(float health, float bleeding, float regen, bool tourniquetted, bool salineBagged)
Definition: SCR_InventoryHitZonePointUI.c:785
SCR_InventorySpinBoxComponent
Definition: SCR_InventorySpinBoxComponent.c:1
m_sMediumBleeding
protected string m_sMediumBleeding
Definition: SCR_InventoryHitZonePointUI.c:413
m_sMediumBloodLoss
protected string m_sMediumBloodLoss
Definition: SCR_InventoryHitZonePointUI.c:418
m_wOutline
protected ImageWidget m_wOutline
Definition: SCR_InventoryHitZonePointUI.c:378
m_pStorageHandler
protected ref SCR_InventoryHitZoneUI m_pStorageHandler
Definition: SCR_InventoryHitZonePointUI.c:434
GetPlayerController
proto external PlayerController GetPlayerController()
Definition: SCR_PlayerDeployMenuHandlerComponent.c:307
SCR_DamageStateUIComponent
Definition: SCR_DamageStateUIComponent.c:1
m_aGroupHitZones
protected ref array< HitZone > m_aGroupHitZones
Definition: SCR_InventoryHitZonePointUI.c:404
m_sHighBleeding
protected string m_sHighBleeding
Definition: SCR_InventoryHitZonePointUI.c:412
SCR_CharacterBloodHitZone
Blood - does not receive damage directly, only via scripted events.
Definition: SCR_CharacterHitZone.c:480
DAMAGE_INFO
const protected string DAMAGE_INFO
Definition: SCR_InventoryHitZonePointUI.c:421
m_wIconTourniquet
protected ImageWidget m_wIconTourniquet
Definition: SCR_InventoryHitZonePointUI.c:386
m_sIconTourniquet
protected string m_sIconTourniquet
Definition: SCR_InventoryHitZonePointUI.c:385
m_sSevereDamage
protected string m_sSevereDamage
Definition: SCR_InventoryHitZonePointUI.c:406
m_sLowBloodLoss
protected string m_sLowBloodLoss
Definition: SCR_InventoryHitZonePointUI.c:419
m_sHighDamage
protected string m_sHighDamage
Definition: SCR_InventoryHitZonePointUI.c:407
OPACITY_DEFAULT
const protected float OPACITY_DEFAULT
Definition: SCR_InventoryHitZonePointUI.c:398
Attribute
typedef Attribute
Post-process effect of scripted camera.
m_Player
protected ChimeraCharacter m_Player
Definition: SCR_CampaignTutorialComponentArland.c:40
m_sLowBleeding
protected string m_sLowBleeding
Definition: SCR_InventoryHitZonePointUI.c:414
m_sSevereBloodLoss
protected string m_sSevereBloodLoss
Definition: SCR_InventoryHitZonePointUI.c:416
m_fLowDamageThreshold
float m_fLowDamageThreshold
Definition: SCR_InventoryHitZonePointUI.c:425
HandlerDeattached
override void HandlerDeattached(Widget w)
Definition: SCR_InventoryHitZonePointUI.c:479
SCR_CharacterDamageManagerComponent
Definition: SCR_CharacterDamageManagerComponent.c:18
m_sIconOverlay
protected string m_sIconOverlay
Definition: SCR_InventoryHitZonePointUI.c:369
m_sLowDamage
protected string m_sLowDamage
Definition: SCR_InventoryHitZonePointUI.c:409
m_DamageStateUIComp
protected SCR_DamageStateUIComponent m_DamageStateUIComp
Definition: SCR_InventoryHitZonePointUI.c:354
OnMouseEnter
override bool OnMouseEnter(Widget w, int x, int y)
Definition: SCR_InventoryHitZonePointUI.c:486
GetBloodInfoText
void GetBloodInfoText(float bloodHitZoneHealthScaled, out string bloodLossText)
Definition: SCR_InventoryHitZonePointUI.c:722
m_sHighBloodLoss
protected string m_sHighBloodLoss
Definition: SCR_InventoryHitZonePointUI.c:417
m_wIconSalineBag
protected ImageWidget m_wIconSalineBag
Definition: SCR_InventoryHitZonePointUI.c:390
SCR_InventoryHitZoneUI
Definition: SCR_InventoryHitZoneSlotUI.c:1
m_IconOutlineAnim
protected WidgetAnimationBase m_IconOutlineAnim
Definition: SCR_InventoryHitZonePointUI.c:444
m_bIsRegenAnim
protected bool m_bIsRegenAnim
Definition: SCR_InventoryHitZonePointUI.c:447
m_sSevereBleeding
protected string m_sSevereBleeding
Definition: SCR_InventoryHitZonePointUI.c:411
SCR_InventoryMenuUI
Definition: SCR_InventoryMenuUI.c:247
m_aDOTLevels
protected ref array< int > m_aDOTLevels
Definition: SCR_InventoryHitZonePointUI.c:366
m_DamageIconOpacityAnim
protected WidgetAnimationBase m_DamageIconOpacityAnim
Definition: SCR_InventoryHitZonePointUI.c:445
Select
void Select(bool select)
Definition: SCR_InventoryHitZonePointUI.c:508
m_sAnimWidgetName
protected string m_sAnimWidgetName
Definition: SCR_InventoryHitZonePointUI.c:438
GetControlledEntity
SCR_EditableEntityComponent GetControlledEntity()
Returns the controlled entity or null if none.
Definition: SCR_EditablePlayerDelegateComponent.c:86
m_sMediumDamage
protected string m_sMediumDamage
Definition: SCR_InventoryHitZonePointUI.c:408
HandlerAttached
override void HandlerAttached(Widget w)
Definition: SCR_InventoryHitZonePointUI.c:451
SetRegeneration
protected void SetRegeneration(float regen, float bleeding)
Definition: SCR_InventoryHitZonePointUI.c:819
m_wBackground
protected ImageWidget m_wBackground
Definition: SCR_InventoryHitZonePointUI.c:382
SCR_HitZone
Definition: SCR_HitZone.c:1
OPACITY_BLOOD
const protected float OPACITY_BLOOD
Definition: SCR_InventoryHitZonePointUI.c:399
m_wIconOverlay
protected Widget m_wIconOverlay
Definition: SCR_InventoryHitZonePointUI.c:370
GetHitZoneInfo
protected void GetHitZoneInfo(EHitZoneGroup group, out int groupDamageIntensity, out bool regenerating, out float bleedingRate, out float bloodHealth, out bool isTourniquetted, out bool isSalineBagged, out bool isArmFractured, out bool isLegFractured)
Definition: SCR_InventoryHitZonePointUI.c:735
m_sIconSalineBag
protected string m_sIconSalineBag
Definition: SCR_InventoryHitZonePointUI.c:389
ChimeraMenuPreset
ChimeraMenuPreset
Menu presets.
Definition: ChimeraMenuBase.c:3
m_bAllowHoverOver
protected bool m_bAllowHoverOver
Definition: SCR_InventoryHitZonePointUI.c:357
m_fMediumBleedingThreshold
float m_fMediumBleedingThreshold
Definition: SCR_InventoryHitZonePointUI.c:427
m_bSelected
protected bool m_bSelected
Definition: SCR_InventoryHitZonePointUI.c:396
EDamageType
EDamageType
Definition: EDamageType.c:12
ShowVirtualHZInfo
protected void ShowVirtualHZInfo(Widget w, bool bloodIcon=false, bool fractureIcon=false)
Gather data for, and create, infowidget for virtual hitzones.
Definition: SCR_InventoryHitZonePointUI.c:552
ShowHitZoneInfo
protected void ShowHitZoneInfo(bool show, bool virtualHZ=false)
Definition: SCR_InventoryHitZonePointUI.c:636
m_wRoot
protected Widget m_wRoot
Definition: SCR_InventoryHitZonePointUI.c:392
m_sBackground
protected string m_sBackground
Definition: SCR_InventoryHitZonePointUI.c:381
m_bIsBloodAnim
protected bool m_bIsBloodAnim
Definition: SCR_InventoryHitZonePointUI.c:448
m_Player
protected IEntity m_Player
Definition: SCR_InventoryHitZonePointUI.c:433
m_sIcon
protected string m_sIcon
Definition: SCR_InventoryHitZonePointUI.c:373
m_fHighDamageThreshold
float m_fHighDamageThreshold
Definition: SCR_InventoryHitZonePointUI.c:423
SetParentContainer
void SetParentContainer(SCR_InventoryHitZonePointContainerUI container)
Definition: SCR_InventoryHitZonePointUI.c:970
m_sOutline
protected string m_sOutline
Definition: SCR_InventoryHitZonePointUI.c:377
m_IconOpacityAnim
protected WidgetAnimationBase m_IconOpacityAnim
Definition: SCR_InventoryHitZonePointUI.c:442
m_fMediumBloodLossThreshold
float m_fMediumBloodLossThreshold
Definition: SCR_InventoryHitZonePointUI.c:430
SCR_InventoryHitZonePointContainerUI
Definition: SCR_InventoryHitZonePointUI.c:1
m_pParentContainer
protected SCR_InventoryHitZonePointContainerUI m_pParentContainer
Definition: SCR_InventoryHitZonePointUI.c:435
m_fLowBleedingThreshold
float m_fLowBleedingThreshold
Definition: SCR_InventoryHitZonePointUI.c:428
m_wButton
protected ButtonWidget m_wButton
Definition: SCR_InventoryHitZonePointUI.c:393
GetInventoryMenuUI
protected SCR_InventoryMenuUI GetInventoryMenuUI()
Definition: SCR_InventoryHitZonePointUI.c:541