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_NotificationPlayerTargetPlayer.c
Go to the documentation of this file.
1
9
[
BaseContainerProps
(),
SCR_BaseContainerCustomTitleEnum
(
ENotification
,
"m_NotificationKey"
)]
10
class
SCR_NotificationPlayerTargetPlayer
:
SCR_NotificationDisplayData
11
{
12
override
string
GetText
(
SCR_NotificationData
data
)
13
{
14
int
playerID, playerTargetID;
15
data
.GetParams(playerID, playerTargetID);
16
17
string
playerName, playerTargetName;
18
data
.GetNotificationTextEntries(playerName, playerTargetName);
19
if
(!
GetPlayerName
(playerID, playerName) || !
GetPlayerName
(playerTargetID, playerTargetName))
20
return
string
.Empty;
21
22
data
.SetNotificationTextEntries(playerName, playerTargetName);
23
return
super.GetText(
data
);
24
}
25
26
override
void
SetPosition(
SCR_NotificationData
data
)
27
{
28
if
(!
CanSetPosition
(
data
))
29
return
;
30
31
int
playerID, playerTargetID;
32
data
.GetParams(playerID, playerTargetID);
33
34
SetPositionDataEditablePlayer
(playerTargetID,
data
);
35
}
36
37
override
void
SetFactionRelatedColor(
SCR_NotificationData
data
)
38
{
39
int
playerID, playerTargetID;
40
data
.GetParams(playerID, playerTargetID);
41
data
.SetFactionRelatedColor(
GetFactionRelatedColorPlayer
(playerTargetID,
m_info
.GetNotificationColor()));
42
43
//Split notification sets faction colors of left and right texts taking player ids, Text color var set the faction color of the target entity
44
SCR_SplitNotificationUIInfo
splitNotificationUIInfo =
SCR_SplitNotificationUIInfo
.Cast(
m_info
);
45
SCR_ColoredTextNotificationUIInfo
coloredTextUiInfo =
SCR_ColoredTextNotificationUIInfo
.Cast(
m_info
);
46
47
if
(splitNotificationUIInfo)
48
{
49
ENotificationColor
leftColor, rightColor;
50
51
rightColor =
GetFactionRelatedColorPlayer
(playerTargetID, splitNotificationUIInfo.
GetRightTextColor
());
52
53
//Check if left color should be the same as right color
54
if
(splitNotificationUIInfo.
ShouldReplaceLeftColorWithRightColorIfAlly
() &&
AreEntitiesFriendly
(playerID,
true
, playerTargetID,
true
))
55
leftColor = rightColor;
56
else
57
leftColor =
GetFactionRelatedColorPlayer
(playerID, splitNotificationUIInfo.
GetLeftTextColor
());
58
59
data
.SetSplitFactionRelatedColor(leftColor, rightColor);
60
}
61
else
if
(coloredTextUiInfo)
62
{
63
data
.SetFactionRelatedTextColor(
GetFactionRelatedColorPlayer
(playerTargetID, coloredTextUiInfo.
GetNotificationTextColor
()));
64
}
65
}
66
};
ENotification
ENotification
Definition
ENotification.c:5
ENotificationColor
ENotificationColor
Definition
ENotificationColor.c:5
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
GetText
string GetText()
Definition
SCR_BaseEditorAttribute.c:488
SCR_BaseContainerCustomTitleEnum
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Definition
SCR_CampaignHintStorage.c:22
data
Get all prefabs that have the spawner data
Definition
SCR_EntityCatalogManagerComponent.c:320
SCR_ColoredTextNotificationUIInfo
Definition
SCR_ColoredTextNotificationUIInfo.c:3
SCR_ColoredTextNotificationUIInfo::GetNotificationTextColor
ENotificationColor GetNotificationTextColor()
Definition
SCR_ColoredTextNotificationUIInfo.c:10
SCR_NotificationData
Definition
SCR_NotificationData.c:7
SCR_NotificationDisplayData
Definition
SCR_NotificationDisplayData.c:8
SCR_NotificationDisplayData::SetPositionDataEditablePlayer
void SetPositionDataEditablePlayer(int playerID, SCR_NotificationData data)
Definition
SCR_NotificationDisplayData.c:516
SCR_NotificationDisplayData::m_info
ref SCR_UINotificationInfo m_info
Definition
SCR_NotificationDisplayData.c:19
SCR_NotificationDisplayData::GetPlayerName
bool GetPlayerName(int playerID, out string playerName)
Definition
SCR_NotificationDisplayData.c:160
SCR_NotificationDisplayData::AreEntitiesFriendly
bool AreEntitiesFriendly(int entity1ID, bool entity1IsPlayer, int entity2ID, bool entity2IsPlayer)
Definition
SCR_NotificationDisplayData.c:695
SCR_NotificationDisplayData::CanSetPosition
bool CanSetPosition(SCR_NotificationData data)
Definition
SCR_NotificationDisplayData.c:506
SCR_NotificationDisplayData::GetFactionRelatedColorPlayer
ENotificationColor GetFactionRelatedColorPlayer(int notificationPlayerID, ENotificationColor colorType)
Definition
SCR_NotificationDisplayData.c:561
SCR_NotificationPlayerTargetPlayer
Definition
SCR_NotificationPlayerTargetPlayer.c:11
SCR_SplitNotificationUIInfo
Definition
SCR_SplitNotificationUIInfo.c:3
SCR_SplitNotificationUIInfo::GetLeftTextColor
ENotificationColor GetLeftTextColor()
Definition
SCR_SplitNotificationUIInfo.c:27
SCR_SplitNotificationUIInfo::ShouldReplaceLeftColorWithRightColorIfAlly
bool ShouldReplaceLeftColorWithRightColorIfAlly()
Definition
SCR_SplitNotificationUIInfo.c:46
SCR_SplitNotificationUIInfo::GetRightTextColor
ENotificationColor GetRightTextColor()
Definition
SCR_SplitNotificationUIInfo.c:35
scripts
Game
Network
Notifications
NotificationDisplayData
SCR_NotificationPlayerTargetPlayer.c
Generated by
1.17.0