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_CustomReconMarkerEntry.c
Go to the documentation of this file.
1
[
BaseContainerProps
(), SCR_CustomReconMarkerEntryTitle()]
2
class
SCR_CustomReconMarkerEntry
:
SCR_BaseReconMarkerEntry
3
{
4
[
Attribute
(
desc
:
"Description in selection menu"
)]
5
protected
string
m_sMenuDescription
;
6
7
[
Attribute
(
desc
:
"Color name from Placed Marker Colors in MapMarkerConfig"
)]
8
protected
string
m_sColorName
;
9
10
[
Attribute
(
desc
:
"Imageset quad from Placed Marker Icons in MapMarkerConfig"
)]
11
protected
string
m_sIconImagesetQuad
;
12
13
protected
SCR_MapMarkerEntryPlaced
m_PlacedMarkerConfig
;
14
15
//------------------------------------------------------------------------------------------------
16
override
void
SetMenuEntry
(notnull
SCR_MapMarkerMenuEntry
entry)
17
{
18
super.SetMenuEntry(entry);
19
20
SCR_MapMarkerConfig markerConfig =
m_MarkerMgr
.GetMarkerConfig();
21
if
(!markerConfig)
22
return
;
23
24
m_PlacedMarkerConfig
=
SCR_MapMarkerEntryPlaced
.Cast(markerConfig.GetMarkerEntryConfigByType(
SCR_EMapMarkerType
.PLACED_CUSTOM));
25
if
(!
m_PlacedMarkerConfig
)
26
return
;
27
28
m_MenuEntry
.SetMarkerType(
SCR_EMapMarkerType
.PLACED_CUSTOM);
29
m_MenuEntry
.SetName(
m_sMenuDescription
);
30
31
int
iconIndex =
GetPlacedMarkerIconIndex
();
32
if
(iconIndex < 0)
33
return
;
34
35
string
imageset, imagesetGlow, imageQuad;
36
m_PlacedMarkerConfig
.GetIconEntry(iconIndex, imageset, imagesetGlow, imageQuad);
37
m_MenuEntry
.SetIcon(imageset, imageQuad);
38
}
39
40
//------------------------------------------------------------------------------------------------
41
protected
int
GetPlacedMarkerIconIndex
()
42
{
43
if
(!
m_PlacedMarkerConfig
)
44
return
-1;
45
46
array<ref SCR_MarkerIconEntry> iconsArr =
m_PlacedMarkerConfig
.GetIconEntries();
47
if
(!iconsArr)
48
return
-1;
49
50
string
imageset, imagesetGlow, imageQuad;
51
foreach
(
int
i, SCR_MarkerIconEntry iconEntry : iconsArr)
52
{
53
iconEntry.GetIconResource(imageset, imagesetGlow, imageQuad);
54
if
(imageQuad ==
m_sIconImagesetQuad
)
55
return
i;
56
}
57
58
return
-1;
59
}
60
61
//------------------------------------------------------------------------------------------------
62
override
void
OnEntryPerformed
(
SCR_SelectionMenuEntry
entry)
63
{
64
SCR_MapMarkerConfig markerConfig =
m_MarkerMgr
.GetMarkerConfig();
65
if
(!markerConfig)
66
return
;
67
68
m_PlacedMarkerConfig
=
SCR_MapMarkerEntryPlaced
.Cast(markerConfig.GetMarkerEntryConfigByType(
SCR_EMapMarkerType
.PLACED_CUSTOM));
69
if
(!
m_PlacedMarkerConfig
)
70
return
;
71
72
SCR_MapMarkerBase
marker =
new
SCR_MapMarkerBase
();
73
marker.
SetType
(
SCR_EMapMarkerType
.PLACED_CUSTOM);
74
75
int
iconIndex =
GetPlacedMarkerIconIndex
();
76
if
(iconIndex != -1)
77
marker.
SetIconEntry
(iconIndex);
78
79
int
colorIndex;
80
foreach
(
int
i, SCR_MarkerColorEntry colorEntry :
m_PlacedMarkerConfig
.GetColorEntries())
81
{
82
if
(colorEntry.GetName() ==
m_sColorName
)
83
{
84
colorIndex = i;
85
break
;
86
}
87
}
88
89
marker.
SetColorEntry
(colorIndex);
90
marker.
SetCustomText
(
m_sMenuDescription
);
91
92
float
wX, wY;
93
m_MapEntity
.GetMapCenterWorldPosition(wX, wY);
94
marker.
SetWorldPos
(wX, wY);
95
96
FactionManager factionManager =
GetGame
().GetFactionManager();
97
if
(factionManager)
98
{
99
Faction
markerOwnerFaction =
SCR_FactionManager
.SGetPlayerFaction(
GetGame
().
GetPlayerController
().
GetPlayerId
());
100
if
(markerOwnerFaction)
101
marker.
AddMarkerFactionFlags
(factionManager.GetFactionIndex(markerOwnerFaction));
102
}
103
104
m_MarkerMgr
.InsertStaticMarker(marker,
false
);
105
}
106
}
107
108
class
SCR_CustomReconMarkerEntryTitle :
BaseContainerCustomTitle
109
{
110
//------------------------------------------------------------------------------------------------
111
override
bool
_WB_GetCustomTitle
(BaseContainer source, out
string
title)
112
{
113
string
quad;
114
source.Get(
"m_sIconImagesetQuad"
, quad);
115
title = source.GetClassName() +
": "
+ quad;
116
117
return
true
;
118
}
119
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_FactionManager
void SCR_FactionManager(IEntitySource src, IEntity parent)
Definition
SCR_FactionManager.c:498
SCR_EMapMarkerType
SCR_EMapMarkerType
Definition
SCR_MapMarkerConfig.c:6
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition
SCR_RespawnBriefingComponent.c:17
BaseContainerCustomTitle
Definition
BaseContainerCustomTitle.c:35
Faction
Definition
Faction.c:13
SCR_BaseReconMarkerEntry::m_MapEntity
SCR_MapEntity m_MapEntity
Definition
SCR_BaseReconMarkerEntry.c:8
SCR_BaseReconMarkerEntry::m_MarkerMgr
SCR_MapMarkerManagerComponent m_MarkerMgr
Definition
SCR_BaseReconMarkerEntry.c:9
SCR_BaseReconMarkerEntry::m_MenuEntry
SCR_MapMarkerMenuEntry m_MenuEntry
Definition
SCR_BaseReconMarkerEntry.c:7
SCR_BaseReconMarkerEntry::SCR_BaseReconMarkerEntry
void SCR_BaseReconMarkerEntry()
Definition
SCR_BaseReconMarkerEntry.c:36
SCR_CustomReconMarkerEntry
Definition
SCR_CustomReconMarkerEntry.c:3
SCR_CustomReconMarkerEntry::m_PlacedMarkerConfig
SCR_MapMarkerEntryPlaced m_PlacedMarkerConfig
Definition
SCR_CustomReconMarkerEntry.c:13
SCR_CustomReconMarkerEntry::GetPlacedMarkerIconIndex
int GetPlacedMarkerIconIndex()
Definition
SCR_CustomReconMarkerEntry.c:41
SCR_CustomReconMarkerEntry::OnEntryPerformed
override void OnEntryPerformed(SCR_SelectionMenuEntry entry)
Definition
SCR_CustomReconMarkerEntry.c:62
SCR_CustomReconMarkerEntry::m_sIconImagesetQuad
string m_sIconImagesetQuad
Definition
SCR_CustomReconMarkerEntry.c:11
SCR_CustomReconMarkerEntry::m_sColorName
string m_sColorName
Definition
SCR_CustomReconMarkerEntry.c:8
SCR_CustomReconMarkerEntry::SetMenuEntry
override void SetMenuEntry(notnull SCR_MapMarkerMenuEntry entry)
Definition
SCR_CustomReconMarkerEntry.c:16
SCR_CustomReconMarkerEntry::m_sMenuDescription
string m_sMenuDescription
Definition
SCR_CustomReconMarkerEntry.c:5
SCR_MapMarkerBase
Definition
SCR_MapMarkerBase.c:4
SCR_MapMarkerBase::SetColorEntry
void SetColorEntry(int colorEntry)
Definition
SCR_MapMarkerBase.c:180
SCR_MapMarkerBase::AddMarkerFactionFlags
void AddMarkerFactionFlags(int flags)
Add faction index to flags which you can acquire by calling GetFactionIndex().
Definition
SCR_MapMarkerBase.c:115
SCR_MapMarkerBase::SetIconEntry
void SetIconEntry(int iconEntry)
Definition
SCR_MapMarkerBase.c:186
SCR_MapMarkerBase::SetCustomText
void SetCustomText(string text)
Definition
SCR_MapMarkerBase.c:198
SCR_MapMarkerBase::SetType
void SetType(SCR_EMapMarkerType type)
Definition
SCR_MapMarkerBase.c:53
SCR_MapMarkerBase::SetWorldPos
void SetWorldPos(int posX, int posY)
Definition
SCR_MapMarkerBase.c:149
SCR_MapMarkerEntryPlaced
Marker entry which can be placed through map.
Definition
SCR_MapMarkerEntryPlaced.c:5
SCR_MapMarkerMenuEntry
Base entry for marker selection menu.
Definition
SCR_MapMarkerMenuEntry.c:4
SCR_SelectionMenuEntry
Definition
SCR_SelectionMenuEntry.c:8
Attribute
SCR_FieldOfViewSettings Attribute
Definition
SendGoalMessage.c:170
GetPlayerController
proto external PlayerController GetPlayerController()
Definition
SCR_PlayerDeployMenuHandlerComponent.c:307
_WB_GetCustomTitle
class SCR_BaseManualCameraComponent _WB_GetCustomTitle(BaseContainer source, out string title)
Definition
SCR_BaseManualCameraComponent.c:141
GetPlayerId
proto external int GetPlayerId()
Definition
SCR_SpawnRequestComponent.c:39
scripts
Game
Map
Markers
Config
ReconMarker
SCR_CustomReconMarkerEntry.c
Generated by
1.17.0