Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MapMarkerConfig.c
Go to the documentation of this file.
1 //------------------------------------------------------------------------------------------------
6 {
7  UNSET = 0,
8  SIMPLE, // simple static marker entry
9  DYNAMIC_EXAMPLE, // example entry of a dynamic marker
10  PLACED_CUSTOM, // configurable placed static marker
11  PLACED_MILITARY, // placed static marker - predefined military symbol
12  SQUAD_LEADER // dynamic squad leader marker
13 }
14 
15 //------------------------------------------------------------------------------------------------
17 [BaseContainerProps(configRoot: true)]
18 class SCR_MapMarkerConfig
19 {
20  [Attribute("", UIWidgets.Object, "Definition of map marker types")]
21  protected ref array<ref SCR_MapMarkerEntryConfig> m_aMarkerEntryConfigs;
22 
23  //------------------------------------------------------------------------------------------------
25  array<ref SCR_MapMarkerEntryConfig> GetMarkerEntryConfigs()
26  {
27  return m_aMarkerEntryConfigs;
28  }
29 
30  //------------------------------------------------------------------------------------------------
32  SCR_MapMarkerEntryConfig GetMarkerEntryConfigByType(SCR_EMapMarkerType type)
33  {
34  if (!m_aMarkerEntryConfigs || m_aMarkerEntryConfigs.IsEmpty())
35  return null;
36 
37  foreach (SCR_MapMarkerEntryConfig cfg : m_aMarkerEntryConfigs)
38  {
39  if (cfg.GetMarkerType() == type)
40  return cfg;
41  }
42 
43  return null;
44  }
45 }
46 
47 //------------------------------------------------------------------------------------------------
51 {
52  [Attribute("{DD15734EB89D74E2}UI/layouts/Map/MapMarkerBase.layout", UIWidgets.ResourceNamePicker, desc: "Marker layout", params: "layout")]
53  protected ResourceName m_sMarkerLayout;
54 
55  //------------------------------------------------------------------------------------------------
57  SCR_EMapMarkerType GetMarkerType()
58  {
59  return SCR_EMapMarkerType.UNSET;
60  }
61 
62  //------------------------------------------------------------------------------------------------
63  ResourceName GetMarkerLayout()
64  {
65  return m_sMarkerLayout;
66  }
67 
68  //------------------------------------------------------------------------------------------------
71  void InitClientSettings(SCR_MapMarkerBase marker, SCR_MapMarkerWidgetComponent widgetComp)
72  {
73  int ownerID = marker.GetMarkerOwnerID();
74 
75  if (ownerID > 0)
76  {
77  if (GetGame().GetPlayerController().GetPlayerId() == ownerID)
78  widgetComp.SetModeIcon(true, marker.GetMarkerID() != -1);
79  else
80  widgetComp.SetAuthor("(" + GetGame().GetPlayerManager().GetPlayerName(ownerID) + ")");
81 
82  }
83  }
84 
85  //------------------------------------------------------------------------------------------------
88  void InitClientSettingsDynamic(notnull SCR_MapMarkerEntity marker, notnull SCR_MapMarkerDynamicWComponent widgetComp);
89 
90  //------------------------------------------------------------------------------------------------
92  void InitServerLogic();
93 
94  //------------------------------------------------------------------------------------------------
96  void InitClientLogic();
97 
98  //------------------------------------------------------------------------------------------------
100  void OnMapLayerChanged(notnull SCR_MapMarkerWidgetComponent widgetComp, int layerID);
101 
102  //------------------------------------------------------------------------------------------------
104  void OnMapLayerChangedDynamic(notnull SCR_MapMarkerDynamicWComponent widgetComp, int layerID);
105 
106  //------------------------------------------------------------------------------------------------
108  void OnMapInit(notnull SCR_MapEntity mapEnt, notnull SCR_MapMarkersUI markerUIComp);
109 
110  //------------------------------------------------------------------------------------------------
112  void OnMapOpen(notnull SCR_MapEntity mapEnt, notnull SCR_MapMarkersUI markerUIComp);
113 
114  //------------------------------------------------------------------------------------------------
116  void OnMapClose(notnull SCR_MapEntity mapEnt, notnull SCR_MapMarkersUI markerUIComp);
117 }
BaseContainerProps
enum SCR_EMapMarkerType BaseContainerProps(configRoot:true)
Map marker config root.
Definition: SCR_MapMarkerConfig.c:17
SIMPLE
SIMPLE
Definition: SCR_MapMarkerConfig.c:3
SCR_MapMarkerDynamicWComponent
Attached to root of marker dynamic base layout.
Definition: SCR_MapMarkerDynamicWComponent.c:2
SCR_MapMarkerBase
Definition: SCR_MapMarkerBase.c:3
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
SCR_MapMarkerTitle
Definition: SCR_MapMarkerEntryPlaced.c:189
SCR_MapMarkerEntryConfig
Base entry config.
Definition: SCR_MapMarkerConfig.c:50
GetPlayerController
proto external PlayerController GetPlayerController()
Definition: SCR_PlayerDeployMenuHandlerComponent.c:307
UNSET
UNSET
Definition: SCR_MapMarkerConfig.c:2
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_MapMarkerEntity
Definition: SCR_MapMarkerEntity.c:10
SQUAD_LEADER
SQUAD_LEADER
Definition: SCR_MapMarkerConfig.c:8
SCR_EMapMarkerType
SCR_EMapMarkerType
Definition: SCR_MapMarkerConfig.c:5
SCR_MapEntity
Map entity.
Definition: SCR_MapEntity.c:20
SCR_MapMarkersUI
Markers UI map component.
Definition: SCR_MapMarkersUI.c:6
PLACED_CUSTOM
PLACED_CUSTOM
Definition: SCR_MapMarkerConfig.c:5
PLACED_MILITARY
PLACED_MILITARY
Definition: SCR_MapMarkerConfig.c:6
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
DYNAMIC_EXAMPLE
DYNAMIC_EXAMPLE
Definition: SCR_MapMarkerConfig.c:4
params
Configs ServerBrowser KickDialogs params
Definition: SCR_NotificationSenderComponent.c:24
SCR_MapMarkerWidgetComponent
Definition: SCR_MapMarkerWidgetComponent.c:3
GetPlayerId
proto external int GetPlayerId()
Definition: SCR_SpawnRequestComponent.c:39