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_GroupHelperUI.c
Go to the documentation of this file.
1
class
SCR_GroupHelperUI
2
{
3
protected
const
string
CUSTOM_GROUP_NAME_FORMAT
=
"#AR-Player_Groups_CustomName_Format"
;
4
5
//------------------------------------------------------------------------------------------------
9
static
string
GetTranslatedGroupName
(notnull
SCR_AIGroup
group)
10
{
11
string
company, platoon, squad, character, format;
12
group.GetCallsigns(company, platoon, squad, character, format);
13
string
originalName =
WidgetManager
.Translate(format, company, platoon, squad, character);
14
15
PlayerController playerController =
GetGame
().GetPlayerController();
16
if
(!playerController)
17
return
originalName;
18
19
string
customName = group.GetCustomName();
20
if
(customName.IsEmpty())
21
return
originalName;
22
23
return
WidgetManager
.Translate(
CUSTOM_GROUP_NAME_FORMAT
, customName, originalName);
24
}
25
26
//------------------------------------------------------------------------------------------------
30
static
string
GetTranslatedGroupNameAndRoleName
(notnull
SCR_AIGroup
group)
31
{
32
string
groupRoleName = group.GetGroupRoleName();
33
if
(groupRoleName.IsEmpty() || group.GetGroupRole() ==
SCR_EGroupRole
.NONE)
34
return
GetTranslatedGroupName
(group);
35
36
return
WidgetManager
.Translate(
CUSTOM_GROUP_NAME_FORMAT
,
GetTranslatedGroupName
(group), groupRoleName);
37
}
38
39
//------------------------------------------------------------------------------------------------
42
static
string
GetRoleName
(notnull
SCR_AIGroup
group)
43
{
44
string
groupRoleName = group.GetGroupRoleName();
45
if
(group.GetGroupRole() ==
SCR_EGroupRole
.NONE)
46
return
string
.Empty;
47
48
return
groupRoleName;
49
}
50
}
GetGame
ArmaReforgerScripted GetGame()
Definition
game.c:1398
SCR_EGroupRole
SCR_EGroupRole
Group roles.
Definition
SCR_EGroupRole.c:3
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_GroupHelperUI
Definition
SCR_GroupHelperUI.c:2
SCR_GroupHelperUI::GetTranslatedGroupName
static string GetTranslatedGroupName(notnull SCR_AIGroup group)
Definition
SCR_GroupHelperUI.c:9
SCR_GroupHelperUI::GetRoleName
static string GetRoleName(notnull SCR_AIGroup group)
Definition
SCR_GroupHelperUI.c:42
SCR_GroupHelperUI::GetTranslatedGroupNameAndRoleName
static string GetTranslatedGroupNameAndRoleName(notnull SCR_AIGroup group)
Definition
SCR_GroupHelperUI.c:30
SCR_GroupHelperUI::CUSTOM_GROUP_NAME_FORMAT
const string CUSTOM_GROUP_NAME_FORMAT
Definition
SCR_GroupHelperUI.c:3
WidgetManager
Definition
WidgetManager.c:16
scripts
Game
UI
Menu
SCR_GroupHelperUI.c
Generated by
1.17.0