Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MapMarkerEntryRecon.c
Go to the documentation of this file.
1
4{
5 [Attribute("AR-MapMarker_Military", desc: "Description in selection menu")]
6 protected string m_sMenuDescription;
7
8 [Attribute("{3262679C50EF4F01}UI/Textures/Icons/icons_wrapperUI.imageset", uiwidget: UIWidgets.ResourcePickerThumbnail, desc: "Imageset resource", params: "imageset")]
10
11 [Attribute("unknown_faction", desc: "Imageset icon")]
12 protected string m_sMenuIcon;
13
14 [Attribute(desc:"Faction recon marker entries, for setting the recon markers for each faction individually")]
15 protected ref array<ref SCR_FactionReconMarkerEntry> m_aFactionReconMarkerEntries;
16
17 //------------------------------------------------------------------------------------------------
19 {
20 return SCR_EMapMarkerType.PLACED_RECON;
21 }
22
23 //------------------------------------------------------------------------------------------------
26 {
27 return m_sMenuDescription;
28 }
29
30 //------------------------------------------------------------------------------------------------
36
37 //------------------------------------------------------------------------------------------------
39 string GetMenuIcon()
40 {
41 return m_sMenuIcon;
42 }
43
44 //------------------------------------------------------------------------------------------------
48 void CreateEntries(notnull SCR_MapRadialUI radialUI, notnull SCR_SelectionMenuCategoryEntry parent = null)
49 {
50 SCR_Faction faction = SCR_Faction.Cast(SCR_FactionManager.SGetLocalPlayerFaction());
51 if (!faction)
52 return;
53
54 SCR_MapMarkerMenuEntry menuEntry;
55 array<ref SCR_BaseReconMarkerEntry> reconMarkerEntries;
56 foreach (SCR_FactionReconMarkerEntry factionReconMarkerEntry : m_aFactionReconMarkerEntries)
57 {
58 // if faction is not set in entry, markers are used for all factions
59 if (!factionReconMarkerEntry.GetFactionKey().IsEmpty() && factionReconMarkerEntry.GetFactionKey() != faction.GetFactionKey())
60 continue;
61
62 reconMarkerEntries = factionReconMarkerEntry.GetReconMarkerEntries();
63 if (!reconMarkerEntries)
64 continue;
65
66 foreach (SCR_BaseReconMarkerEntry entry : reconMarkerEntries)
67 {
68 if (!entry || !entry.IsEnabled())
69 continue;
70
71 menuEntry = new SCR_MapMarkerMenuEntry();
72 menuEntry.GetOnPerform().Insert(OnEntryPerformed);
73
74 radialUI.InsertCustomRadialEntry(menuEntry, parent);
75 entry.SetMenuEntry(menuEntry);
76 }
77 }
78 }
79
80 //------------------------------------------------------------------------------------------------
81 protected void OnEntryPerformed(SCR_SelectionMenuEntry perfomedEntry)
82 {
83 array<ref SCR_BaseReconMarkerEntry> reconMarkerEntries;
84 foreach (SCR_FactionReconMarkerEntry factionReconMarkerEntry : m_aFactionReconMarkerEntries)
85 {
86 reconMarkerEntries = factionReconMarkerEntry.GetReconMarkerEntries();
87 if (!reconMarkerEntries)
88 continue;
89
90 foreach (SCR_BaseReconMarkerEntry entry : reconMarkerEntries)
91 {
92 if (entry.GetMenuEntry() == perfomedEntry)
93 {
94 entry.OnEntryPerformed(perfomedEntry);
95 break;
96 }
97 }
98 }
99 }
100}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void SCR_FactionManager(IEntitySource src, IEntity parent)
SCR_EMapMarkerType
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Base entry config.
Marker recon symbol entry - combination of military and custom symbols.
ResourceName GetMenuImageset()
string m_sMenuIcon
string m_sMenuDescription
override SCR_EMapMarkerType GetMarkerType()
string GetMenuDescription()
string GetMenuIcon()
ref array< ref SCR_FactionReconMarkerEntry > m_aFactionReconMarkerEntries
void CreateEntries(notnull SCR_MapRadialUI radialUI, notnull SCR_SelectionMenuCategoryEntry parent=null)
void OnEntryPerformed(SCR_SelectionMenuEntry perfomedEntry)
ResourceName m_sMenuImageset
Base entry for marker selection menu.
2D map radial menu UI
SCR_FieldOfViewSettings Attribute