Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_GameModeHUDComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/GameMode", description: "Base UI Component for deathmatch game mode")]
2 class SCR_GameModeHUDComponentClass: ScriptComponentClass
3 {
4 };
5 
6 //------------------------------------------------------------------------------------------------
9 {
10  [Attribute("{5E5A12EF04688432}UI/layouts/HUD/Deathmatch/DeathmatchLayout.layout", UIWidgets.ResourceNamePicker, "layout", "")]
11  protected ResourceName m_sLayout;
12  protected Widget m_RootWidget;
13  protected bool m_bShow = true;
14 
15 
16  //------------------------------------------------------------------------------------------------
17  void Show(bool show)
18  {
19  m_bShow = show;
20  }
21 
22  //------------------------------------------------------------------------------------------------
23  void SCR_GameModeHUDComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
24  {
25  if (m_sLayout != string.Empty)
26  {
27  ArmaReforgerScripted game = GetGame();
28  if (game)
29  {
30  SCR_HUDManagerComponent manager = game.GetHUDManager();
31  if (manager)
32  {
33  m_RootWidget = manager.CreateLayout(m_sLayout,EHudLayers.LOW);
34  }
35  }
36  }
37 
38  if (m_RootWidget)
39  m_RootWidget.SetVisible(m_bShow);
40  }
41 
42  //------------------------------------------------------------------------------------------------
44  {
45  if (m_RootWidget)
46  m_RootWidget.RemoveFromHierarchy();
47 
48  m_RootWidget = null;
49  }
50 };
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
SCR_HUDManagerComponent
Definition: SCR_HUDManagerComponent.c:23
m_RootWidget
protected Widget m_RootWidget
Definition: SCR_BinocularsComponent.c:10
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_GameModeHUDComponent
Deathmatch HUD component. Expects to be attached onto SCR_GameModeDeathmatch entity.
Definition: SCR_GameModeHUDComponent.c:8
EHudLayers
EHudLayers
Definition: SCR_HUDManagerComponent.c:5
Attribute
typedef Attribute
Post-process effect of scripted camera.
m_sLayout
SCR_GMMenuEntry m_sLayout
SCR_GameModeHUDComponentClass
Definition: SCR_GameModeHUDComponent.c:2
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180