Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_MapMarkerEntryPlaced.c
Go to the documentation of this file.
1
//------------------------------------------------------------------------------------------------
3
[
BaseContainerProps
(),
SCR_MapMarkerTitle
()]
4
class
SCR_MapMarkerEntryPlaced
:
SCR_MapMarkerEntryConfig
5
{
6
[
Attribute
(
"#AR-MapMarker_CustomHint"
,
desc
:
"Description in selection menu"
)]
7
protected
string
m_sMenuDescription
;
8
9
[
Attribute
(
"{3262679C50EF4F01}UI/Textures/Icons/icons_wrapperUI.imageset"
,
UIWidgets
.ResourcePickerThumbnail,
desc
:
"Imageset resource"
,
params
:
"imageset"
)]
10
protected
ResourceName
m_sMenuImageset
;
11
12
[
Attribute
(
"settings"
,
desc
:
"Imageset icon"
)]
13
protected
string
m_sMenuIcon
;
14
15
[
Attribute
(
""
,
UIWidgets
.Object,
"Categories of marker icons for sorting"
)]
16
protected
ref array<ref SCR_MarkerIconCategory>
m_aPlacedMarkerIconCategories
;
17
18
[
Attribute
(
""
,
UIWidgets
.Object,
"Icons which can be chosen when placing a custom marker"
)]
19
protected
ref array<ref SCR_MarkerIconEntry>
m_aPlacedMarkerIcons
;
20
21
[
Attribute
(
""
,
UIWidgets
.Object,
"Colors which can be chosen when placing a custom marker"
)]
22
protected
ref array<ref SCR_MarkerColorEntry>
m_aPlacedMarkerColors
;
23
24
//------------------------------------------------------------------------------------------------
25
string
GetMenuDescription
()
26
{
27
return
m_sMenuDescription
;
28
}
29
30
//------------------------------------------------------------------------------------------------
31
ResourceName
GetMenuImageset
()
32
{
33
return
m_sMenuImageset
;
34
}
35
36
//------------------------------------------------------------------------------------------------
37
string
GetMenuIcon
()
38
{
39
return
m_sMenuIcon
;
40
}
41
42
//------------------------------------------------------------------------------------------------
43
Color
GetColorEntry
(
int
i)
44
{
45
if
(!
m_aPlacedMarkerColors
.IsIndexValid(i))
46
return
Color
.FromInt(
Color
.WHITE);
47
48
return
m_aPlacedMarkerColors
[i].GetColor();
49
}
50
51
//------------------------------------------------------------------------------------------------
52
bool
GetIconEntry
(
int
i, out
ResourceName
imageset, out
ResourceName
imagesetGlow, out
string
imageQuad)
53
{
54
if
(!
m_aPlacedMarkerIcons
.IsIndexValid(i))
55
return
false
;
56
57
m_aPlacedMarkerIcons
[i].GetIconResource(imageset, imagesetGlow, imageQuad);
58
59
return
true
;
60
}
61
62
//------------------------------------------------------------------------------------------------
63
int
GetIconCategoryID
(
int
iconID)
64
{
65
if
(!
m_aPlacedMarkerIcons
.IsIndexValid(iconID))
66
return
0;
67
68
string
identifier =
m_aPlacedMarkerIcons
[iconID].m_sCategoryIdentifier;
69
70
foreach
(
int
i,
SCR_MarkerIconCategory
category
:
m_aPlacedMarkerIconCategories
)
71
{
72
if
(identifier ==
category
.m_sIdentifier)
73
return
i;
74
}
75
76
return
0;
77
}
78
79
//------------------------------------------------------------------------------------------------
80
array<ref SCR_MarkerColorEntry>
GetColorEntries
()
81
{
82
return
m_aPlacedMarkerColors
;
83
}
84
85
//------------------------------------------------------------------------------------------------
86
array<ref SCR_MarkerIconEntry>
GetIconEntries
()
87
{
88
return
m_aPlacedMarkerIcons
;
89
}
90
91
//------------------------------------------------------------------------------------------------
92
array<ref SCR_MarkerIconCategory>
GetIconCategories
()
93
{
94
return
m_aPlacedMarkerIconCategories
;
95
}
96
97
//------------------------------------------------------------------------------------------------
98
override
SCR_EMapMarkerType
GetMarkerType
()
99
{
100
return
SCR_EMapMarkerType
.PLACED_CUSTOM;
101
}
102
103
//------------------------------------------------------------------------------------------------
104
override
void
InitClientSettings
(
SCR_MapMarkerBase
marker,
SCR_MapMarkerWidgetComponent
widgetComp,
bool
skipProfanityFilter =
false
)
105
{
106
super.InitClientSettings(marker, widgetComp);
107
108
ResourceName
imageset, imagesetGlow;
109
string
quad;
110
GetIconEntry
(marker.
GetIconEntry
(), imageset, imagesetGlow, quad);
111
widgetComp.
SetImage
(imageset, quad);
112
widgetComp.
SetText
(marker.
GetCustomText
(), skipProfanityFilter);
113
widgetComp.
SetColor
(
GetColorEntry
(marker.
GetColorEntry
()));
114
if
(imagesetGlow)
115
widgetComp.
SetGlowImage
(imagesetGlow, quad);
116
117
widgetComp.
SetEventListening
(
true
);
118
}
119
120
//------------------------------------------------------------------------------------------------
121
override
void
OnMapLayerChanged
(notnull
SCR_MapMarkerWidgetComponent
widgetComp,
int
layerID)
122
{
123
if
(layerID > 1)
124
{
125
widgetComp.SetTextVisible(
false
);
126
}
127
else
128
{
129
widgetComp.SetTextVisible(
true
);
130
}
131
}
132
}
133
134
//------------------------------------------------------------------------------------------------
136
[
BaseContainerProps
()]
137
class
SCR_MarkerColorEntry
138
{
139
[
Attribute
(
"1.0 1.0 1.0 1.0"
)]
140
protected
ref
Color
m_Color
;
141
142
[
Attribute
(
desc
:
"Color name, used for pairing settings with predefined markers"
)]
143
protected
string
m_sName
;
144
145
//------------------------------------------------------------------------------------------------
146
Color
GetColor
()
147
{
148
return
Color
.FromInt(
m_Color
.PackToInt());
149
}
150
151
//------------------------------------------------------------------------------------------------
153
string
GetName
()
154
{
155
return
m_sName
;
156
}
157
158
}
159
160
//------------------------------------------------------------------------------------------------
162
[
BaseContainerProps
()]
163
class
SCR_MarkerIconCategory
164
{
165
[
Attribute
(
""
,
desc
:
"Set this wihin the icon to link it to this category"
)]
166
string
m_sIdentifier;
167
168
[
Attribute
(
""
,
desc
:
"Name of the category"
)]
169
string
m_sName
;
170
}
171
172
//------------------------------------------------------------------------------------------------
174
[
BaseContainerProps
(),
SCR_MapMarkerIconEntryTitle
()]
175
class
SCR_MarkerIconEntry
176
{
177
[
Attribute
(
"general"
,
desc
:
"Category tab within marker dialog"
)]
178
string
m_sCategoryIdentifier;
179
180
[
Attribute
(
"{E23427CAC80DA8B7}UI/Textures/Icons/icons_mapMarkersUI.imageset"
,
UIWidgets
.ResourcePickerThumbnail,
desc
:
"Image resource"
,
params
:
"imageset"
)]
181
protected
ResourceName
m_sIconImageset;
182
183
[
Attribute
(
"{67B3A6DC2D712B52}UI/Textures/Icons/icons_mapMarkersUI-glow.imageset"
,
UIWidgets
.ResourcePickerThumbnail,
desc
:
"Image resource"
,
params
:
"imageset"
)]
184
protected
ResourceName
m_sIconGlowImageset;
185
186
[
Attribute
(
""
,
desc
:
"Imageset quad"
)]
187
protected
string
m_sIconImagesetQuad
;
188
189
//------------------------------------------------------------------------------------------------
190
void
GetIconResource(out
ResourceName
imageset, out
ResourceName
imagesetGlow, out
string
imageQuad)
191
{
192
imageset = m_sIconImageset;
193
imagesetGlow = m_sIconGlowImageset;
194
imageQuad =
m_sIconImagesetQuad
;
195
}
196
}
197
198
//------------------------------------------------------------------------------------------------
199
class
SCR_MapMarkerTitle
:
BaseContainerCustomTitle
200
{
201
//------------------------------------------------------------------------------------------------
202
override
bool
_WB_GetCustomTitle(
BaseContainer
source, out
string
title)
203
{
204
typename
tName = source.GetClassName().ToType();
205
SCR_MapMarkerEntryConfig
cfg =
SCR_MapMarkerEntryConfig
.Cast(tName.Spawn());
206
if
(cfg)
207
title = source.GetClassName() +
": "
+
typename
.EnumToString(
SCR_EMapMarkerType
, cfg.
GetMarkerType
());
208
209
return
true
;
210
}
211
}
212
213
//------------------------------------------------------------------------------------------------
214
class
SCR_MapMarkerIconEntryTitle
:
BaseContainerCustomTitle
215
{
216
//------------------------------------------------------------------------------------------------
217
override
bool
_WB_GetCustomTitle
(
BaseContainer
source, out
string
title)
218
{
219
string
quad, identifier;
220
source.Get(
"m_sCategoryIdentifier"
, identifier);
221
source.Get(
"m_sIconImagesetQuad"
, quad);
222
223
title = identifier +
": "
+ quad;
224
225
return
true
;
226
}
227
}
m_sIconImagesetQuad
string m_sIconImagesetQuad
Definition
SCR_CustomReconMarkerEntry.c:119
GetColor
Color GetColor()
Definition
SCR_EditableCommentComponent.c:52
m_Color
ref Color m_Color
Definition
SCR_GeneratorBaseEntity.c:25
m_sName
LocalizedString m_sName
Definition
SCR_GroupIdentityComponent.c:19
SCR_EMapMarkerType
SCR_EMapMarkerType
Definition
SCR_MapMarkerConfig.c:6
SCR_MapMarkerIconEntryTitle
class SCR_MarkerIconCategory SCR_MapMarkerIconEntryTitle()] class SCR_MarkerIconEntry
Definition
SCR_MapMarkerEntryPlaced.c:174
BaseContainerProps
SCR_MapMarkerEntryPlaced SCR_MapMarkerEntryConfig BaseContainerProps()] class SCR_MarkerColorEntry
Placed marker color entry.
Definition
SCR_MapMarkerEntryPlaced.c:136
GetName
string GetName()
Definition
SCR_NotificationSenderComponent.c:15
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
params
category params
Definition
SCR_SpherePointGeneratorPreviewComponent.c:21
category
params category
Definition
SCR_VehicleDamageManagerComponent.c:302
BaseContainerCustomTitle
Definition
BaseContainerCustomTitle.c:35
BaseContainer
Definition
BaseContainer.c:13
Color
Definition
Color.c:13
ResourceName
Definition
ResourceName.c:13
SCR_MapMarkerBase
Definition
SCR_MapMarkerBase.c:4
SCR_MapMarkerBase::GetIconEntry
int GetIconEntry()
Definition
SCR_MapMarkerBase.c:174
SCR_MapMarkerBase::GetColorEntry
int GetColorEntry()
Definition
SCR_MapMarkerBase.c:168
SCR_MapMarkerBase::GetCustomText
string GetCustomText()
Definition
SCR_MapMarkerBase.c:192
SCR_MapMarkerEntryConfig
Base entry config.
Definition
SCR_MapMarkerConfig.c:54
SCR_MapMarkerEntryConfig::GetMarkerType
SCR_EMapMarkerType GetMarkerType()
Override this in child classes with own config entries to define type.
Definition
SCR_MapMarkerConfig.c:60
SCR_MapMarkerEntryPlaced
Marker entry which can be placed through map.
Definition
SCR_MapMarkerEntryPlaced.c:5
SCR_MapMarkerEntryPlaced::GetMenuIcon
string GetMenuIcon()
Definition
SCR_MapMarkerEntryPlaced.c:37
SCR_MapMarkerEntryPlaced::GetMarkerType
override SCR_EMapMarkerType GetMarkerType()
Definition
SCR_MapMarkerEntryPlaced.c:98
SCR_MapMarkerEntryPlaced::GetIconEntry
bool GetIconEntry(int i, out ResourceName imageset, out ResourceName imagesetGlow, out string imageQuad)
Definition
SCR_MapMarkerEntryPlaced.c:52
SCR_MapMarkerEntryPlaced::GetIconCategoryID
int GetIconCategoryID(int iconID)
Definition
SCR_MapMarkerEntryPlaced.c:63
SCR_MapMarkerEntryPlaced::GetMenuImageset
ResourceName GetMenuImageset()
Definition
SCR_MapMarkerEntryPlaced.c:31
SCR_MapMarkerEntryPlaced::m_aPlacedMarkerIcons
ref array< ref SCR_MarkerIconEntry > m_aPlacedMarkerIcons
Definition
SCR_MapMarkerEntryPlaced.c:19
SCR_MapMarkerEntryPlaced::m_sMenuIcon
string m_sMenuIcon
Definition
SCR_MapMarkerEntryPlaced.c:13
SCR_MapMarkerEntryPlaced::GetColorEntries
array< ref SCR_MarkerColorEntry > GetColorEntries()
Definition
SCR_MapMarkerEntryPlaced.c:80
SCR_MapMarkerEntryPlaced::OnMapLayerChanged
override void OnMapLayerChanged(notnull SCR_MapMarkerWidgetComponent widgetComp, int layerID)
Definition
SCR_MapMarkerEntryPlaced.c:121
SCR_MapMarkerEntryPlaced::InitClientSettings
override void InitClientSettings(SCR_MapMarkerBase marker, SCR_MapMarkerWidgetComponent widgetComp, bool skipProfanityFilter=false)
Definition
SCR_MapMarkerEntryPlaced.c:104
SCR_MapMarkerEntryPlaced::GetIconCategories
array< ref SCR_MarkerIconCategory > GetIconCategories()
Definition
SCR_MapMarkerEntryPlaced.c:92
SCR_MapMarkerEntryPlaced::GetIconEntries
array< ref SCR_MarkerIconEntry > GetIconEntries()
Definition
SCR_MapMarkerEntryPlaced.c:86
SCR_MapMarkerEntryPlaced::m_sMenuImageset
ResourceName m_sMenuImageset
Definition
SCR_MapMarkerEntryPlaced.c:10
SCR_MapMarkerEntryPlaced::m_aPlacedMarkerColors
ref array< ref SCR_MarkerColorEntry > m_aPlacedMarkerColors
Definition
SCR_MapMarkerEntryPlaced.c:22
SCR_MapMarkerEntryPlaced::GetMenuDescription
string GetMenuDescription()
Definition
SCR_MapMarkerEntryPlaced.c:25
SCR_MapMarkerEntryPlaced::m_aPlacedMarkerIconCategories
ref array< ref SCR_MarkerIconCategory > m_aPlacedMarkerIconCategories
Definition
SCR_MapMarkerEntryPlaced.c:16
SCR_MapMarkerEntryPlaced::m_sMenuDescription
string m_sMenuDescription
Definition
SCR_MapMarkerEntryPlaced.c:7
SCR_MapMarkerEntryPlaced::GetColorEntry
Color GetColorEntry(int i)
Definition
SCR_MapMarkerEntryPlaced.c:43
SCR_MapMarkerTitle
Definition
SCR_MapMarkerEntryPlaced.c:200
SCR_MapMarkerWidgetComponent
Definition
SCR_MapMarkerWidgetComponent.c:4
SCR_MapMarkerWidgetComponent::SetText
void SetText(string text, bool skipProfanityFilter=false)
Definition
SCR_MapMarkerWidgetComponent.c:127
SCR_MapMarkerWidgetComponent::SetGlowImage
void SetGlowImage(ResourceName icon, string quad)
Definition
SCR_MapMarkerWidgetComponent.c:88
SCR_MapMarkerWidgetComponent::SetColor
void SetColor(Color color)
Definition
SCR_MapMarkerWidgetComponent.c:240
SCR_MapMarkerWidgetComponent::SetImage
void SetImage(ResourceName icon, string quad, float aspectRatio=1)
Definition
SCR_MapMarkerWidgetComponent.c:75
SCR_MapMarkerWidgetComponent::SetEventListening
void SetEventListening(bool state)
Definition
SCR_MapMarkerWidgetComponent.c:109
SCR_MarkerIconCategory
Placed marker icon category.
Definition
SCR_MapMarkerEntryPlaced.c:164
UIWidgets
Definition
attributes.c:40
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
_WB_GetCustomTitle
class SCR_BaseManualCameraComponent _WB_GetCustomTitle(BaseContainer source, out string title)
Definition
SCR_BaseManualCameraComponent.c:141
scripts
Game
Map
Markers
Config
SCR_MapMarkerEntryPlaced.c
Generated by
1.17.0