Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
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 DOT_CIRCLE, // dotted circle - used in SF scenarios
14 PLACED_RECON, // placed static marker - predefined military and custom symbols
15 SQUAD_MEMBER, // dynamic squad member marker
16}
17
18//------------------------------------------------------------------------------------------------
20[BaseContainerProps(configRoot: true)]
21class SCR_MapMarkerConfig
22{
23 [Attribute("", UIWidgets.Object, "Definition of map marker types")]
24 protected ref array<ref SCR_MapMarkerEntryConfig> m_aMarkerEntryConfigs;
26 //------------------------------------------------------------------------------------------------
28 array<ref SCR_MapMarkerEntryConfig> GetMarkerEntryConfigs()
29 {
30 return m_aMarkerEntryConfigs;
31 }
32
33 //------------------------------------------------------------------------------------------------
35 SCR_MapMarkerEntryConfig GetMarkerEntryConfigByType(SCR_EMapMarkerType type)
36 {
37 if (!m_aMarkerEntryConfigs || m_aMarkerEntryConfigs.IsEmpty())
38 return null;
39
40 foreach (SCR_MapMarkerEntryConfig cfg : m_aMarkerEntryConfigs)
41 {
42 if (cfg.GetMarkerType() == type)
43 return cfg;
44 }
45
46 return null;
47 }
48}
49
50//------------------------------------------------------------------------------------------------
54{
55 [Attribute("{DD15734EB89D74E2}UI/layouts/Map/MapMarkerBase.layout", UIWidgets.ResourceNamePicker, desc: "Marker layout", params: "layout")]
57
58 //------------------------------------------------------------------------------------------------
64
65 //------------------------------------------------------------------------------------------------
70
71 //------------------------------------------------------------------------------------------------
74 void InitClientSettings(SCR_MapMarkerBase marker, SCR_MapMarkerWidgetComponent widgetComp, bool skipProfanityFilter = false)
75 {
76 int ownerID = marker.GetMarkerOwnerID();
77
78 if (ownerID > 0)
79 {
81 if (playerController)
82 playerController.SetPlatformImageToKind(GetGame().GetPlayerManager().GetPlatformKind(ownerID), widgetComp.GetAuthorPlatformIcon(), showOnPC: true, showOnXbox: true);
83
84 if (GetGame().GetPlayerController().GetPlayerId() == ownerID)
85 {
86 widgetComp.SetModeIcon(true, marker.GetMarkerID() != -1);
87 widgetComp.SetAuthorVisible(false);
88 }
89 else
90 {
91 widgetComp.SetAuthorVisible(true);
92 }
93
94 widgetComp.SetAuthor(SCR_PlayerNamesFilterCache.GetInstance().GetPlayerDisplayName(ownerID));
95 }
96 }
97
98 //------------------------------------------------------------------------------------------------
102
103 //------------------------------------------------------------------------------------------------
106
107 //------------------------------------------------------------------------------------------------
110
111 //------------------------------------------------------------------------------------------------
113 void OnMapLayerChanged(notnull SCR_MapMarkerWidgetComponent widgetComp, int layerID);
114
115 //------------------------------------------------------------------------------------------------
117 void OnMapLayerChangedDynamic(notnull SCR_MapMarkerDynamicWComponent widgetComp, int layerID);
118
119 //------------------------------------------------------------------------------------------------
121 void OnMapInit(notnull SCR_MapEntity mapEnt, notnull SCR_MapMarkersUI markerUIComp);
122
123 //------------------------------------------------------------------------------------------------
125 void OnMapOpen(notnull SCR_MapEntity mapEnt, notnull SCR_MapMarkersUI markerUIComp);
126
127 //------------------------------------------------------------------------------------------------
129 void OnMapClose(notnull SCR_MapEntity mapEnt, notnull SCR_MapMarkersUI markerUIComp);
130}
@ SQUAD_LEADER
Start with Squad leader, do not Go lower than 9000 always add new entries below.
ArmaReforgerScripted GetGame()
Definition game.c:1398
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
EDamageType type
PLACED_MILITARY
DYNAMIC_EXAMPLE
SCR_EMapMarkerType
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Attached to root of marker dynamic base layout.
Base entry config.
ResourceName m_sMarkerLayout
void OnMapLayerChanged(notnull SCR_MapMarkerWidgetComponent widgetComp, int layerID)
Override this to set up client side behavior for when map changes zoom layers.
void InitClientLogic()
Override this to set up logic & event behavior on client.
void OnMapClose(notnull SCR_MapEntity mapEnt, notnull SCR_MapMarkersUI markerUIComp)
Override this to set up client side behavior on map close.
SCR_EMapMarkerType GetMarkerType()
Override this in child classes with own config entries to define type.
ResourceName GetMarkerLayout()
void OnMapInit(notnull SCR_MapEntity mapEnt, notnull SCR_MapMarkersUI markerUIComp)
Override this to set up client side behavior on map init.
void InitClientSettingsDynamic(notnull SCR_MapMarkerEntity marker, notnull SCR_MapMarkerDynamicWComponent widgetComp)
void InitClientSettings(SCR_MapMarkerBase marker, SCR_MapMarkerWidgetComponent widgetComp, bool skipProfanityFilter=false)
void OnMapLayerChangedDynamic(notnull SCR_MapMarkerDynamicWComponent widgetComp, int layerID)
Override this to set up client side behavior for when map changes zoom layers.
void OnMapOpen(notnull SCR_MapEntity mapEnt, notnull SCR_MapMarkersUI markerUIComp)
Override this to set up client side behavior on map open.
void InitServerLogic()
Override this to set up server side logic & event behavior for dynamic markers.
void SetModeIcon(bool state, bool isPublic)
Markers UI map component.
SCR_FieldOfViewSettings Attribute
proto external PlayerController GetPlayerController()
proto external int GetPlayerId()