Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_MapMarkerMenuEntry.c
Go to the documentation of this file.
1//------------------------------------------------------------------------------------------------
4{
5 const string WIDGET_SYMBOL = "SymbolOverlay";
6
7 protected int m_iMarkerConfigID; // used to load proper config entry when placing from selection menu
10
11 protected ref Color m_Color = GUIColors.DEFAULT;
13
14
15 //------------------------------------------------------------------------------------------------
20
21 //------------------------------------------------------------------------------------------------
26
27 //------------------------------------------------------------------------------------------------
29 {
30 return m_iMarkerConfigID;
31 }
32
33 //------------------------------------------------------------------------------------------------
34 void SetMarkerConfigID(int id)
35 {
37 }
38
39 //------------------------------------------------------------------------------------------------
42 {
43 m_Color = color;
44
45 m_MilSymbol.SetIdentity(faction);
46 m_MilSymbol.SetDimension(dimension);
47 m_MilSymbol.SetIcons(iconFlag);
48 m_MilSymbol.SetAmplifier(amplifier);
49
50 // component will be created with entry layout, which is only done after category is entered from the menu
52 if (!entryComp)
53 return;
54
55 Widget symbolWidget = entryComp.GetRootWidget().FindAnyWidget(WIDGET_SYMBOL);
56 if (!symbolWidget)
57 return;
58
59 symbolWidget.SetColor(m_Color);
60
62 if (m_SymbolComp)
64 }
65
66 //------------------------------------------------------------------------------------------------
68 void SetLayout()
69 {
70 if (m_eMarkerType == SCR_EMapMarkerType.PLACED_MILITARY)
71 SetCustomLayout("{F328D6835DA3BCFC}UI/layouts/Common/RadialMenu/RadialMenuMarkerEntry.layout");
72 else
73 SetCustomLayout("{B7B4E9F530904414}UI/layouts/Common/RadialMenu/SelectionMenuEntryIcon.layout");
74 }
75
76 //------------------------------------------------------------------------------------------------
78 {
79 super.SetEntryComponent(entryComponent);
80
82 if (!entryComp)
83 return;
84
85 Widget symbolWidget = entryComp.GetRootWidget().FindAnyWidget(WIDGET_SYMBOL);
86 if (!symbolWidget)
87 return;
88
89 symbolWidget.SetColor(m_Color);
90
92 if (m_SymbolComp)
94 }
95
96 //------------------------------------------------------------------------------------------------
98 {
99 SetLayout();
100 }
101};
AddonBuildInfoTool id
EMilitarySymbolIdentity
EMilitarySymbolDimension
EMilitarySymbolIcon
EMilitarySymbolAmplifier
EDamageType type
SCR_EMapMarkerType
Definition Color.c:13
void SCR_MapMarkerMenuEntry()
SCR_MilitarySymbolUIComponent m_SymbolComp
void SetSymbolProps(EMilitarySymbolIdentity faction, Color color, EMilitarySymbolDimension dimension, EMilitarySymbolIcon iconFlag, EMilitarySymbolAmplifier amplifier)
Set military symbol properties.
ref Color m_Color
void SetMarkerType(SCR_EMapMarkerType type)
void SetMarkerConfigID(int id)
SCR_EMapMarkerType m_eMarkerType
void SetLayout()
Set custom layout based on marker type.
int m_iMarkerConfigID
override void SetEntryComponent(SCR_SelectionMenuEntryComponent entryComponent)
int GetMarkerConfigID()
ref SCR_MilitarySymbol m_MilSymbol
SCR_EMapMarkerType GetMarkerType()
void SCR_SelectionMenuEntry()
void SetCustomLayout(ResourceName layout)
ref SCR_SelectionMenuEntryComponent m_EntryComponent