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_RequestedTaskUIInfo.c
Go to the documentation of this file.
1
[
BaseContainerProps
()]
2
class
SCR_RequestedTaskUIInfo
:
SCR_TaskUIInfo
3
{
4
protected
int
m_iRequesterGroupId
;
5
6
//------------------------------------------------------------------------------------------------
7
void
SetRequesterGroupId
(
int
groupId)
8
{
9
m_iRequesterGroupId
= groupId;
10
}
11
12
//------------------------------------------------------------------------------------------------
13
override
bool
SetDescriptionTo
(
TextWidget
textWidget)
14
{
15
if
(!textWidget)
16
return
false
;
17
18
SCR_GroupsManagerComponent
groupsManager =
SCR_GroupsManagerComponent
.GetInstance();
19
if
(!groupsManager)
20
return
false
;
21
22
SCR_AIGroup
requesterGroup = groupsManager.FindGroup(
m_iRequesterGroupId
);
23
if
(!requesterGroup)
24
return
false
;
25
26
Faction
faction = requesterGroup.
GetFaction
();
27
if
(!faction)
28
return
false
;
29
30
string
company, platoon, squad, character, format;
31
requesterGroup.
GetCallsigns
(company, platoon, squad, character, format);
32
33
// This translate is used in UI menu SCR_TaskListEntryDescriptionUIComponent, where to change the language you need to close and open the shown menu, so it will be renewed.
34
string
translatedCallsign =
WidgetManager
.Translate(format, company, platoon, squad);
35
textWidget.SetTextFormat(
Description
, translatedCallsign);
36
37
return
true
;
38
}
39
40
//------------------------------------------------------------------------------------------------
50
static
SCR_RequestedTaskUIInfo
CreateRequestedTaskUIInfo
(
51
LocalizedString
name,
52
array<LocalizedString> nameParams,
53
LocalizedString
description,
54
array<LocalizedString> descParams,
55
ResourceName
icon =
ResourceName
.Empty,
56
string
iconSetName =
string
.Empty,
57
int
requesterGroupId = 0)
58
{
59
SCR_RequestedTaskUIInfo
info =
new
SCR_RequestedTaskUIInfo
();
60
info.Name = name;
61
info.Description = description;
62
info.Icon = icon;
63
info.IconSetName = iconSetName;
64
info.
m_iRequesterGroupId
= requesterGroupId;
65
66
if
(nameParams && !nameParams.IsEmpty())
67
{
68
info.m_aNameParameters = {};
69
info.m_aNameParameters.Copy(nameParams);
70
}
71
72
if
(descParams && !descParams.IsEmpty())
73
{
74
info.m_aDescriptionParameters = {};
75
info.m_aDescriptionParameters.Copy(descParams);
76
}
77
78
return
info;
79
}
80
}
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_GroupsManagerComponent
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition
SCR_GroupsManagerComponent.c:1747
Faction
Definition
Faction.c:13
LocalizedString
Definition
LocalizedString.c:22
ResourceName
Definition
ResourceName.c:13
SCR_AIGroup
Definition
SCR_AIGroup.c:75
SCR_AIGroup::GetCallsigns
void GetCallsigns(out string company, out string platoon, out string squad, out string character, out string format)
Definition
SCR_AIGroup.c:1546
SCR_AIGroup::GetFaction
Faction GetFaction()
Definition
SCR_AIGroup.c:2156
SCR_RequestedTaskUIInfo
Definition
SCR_RequestedTaskUIInfo.c:3
SCR_RequestedTaskUIInfo::m_iRequesterGroupId
int m_iRequesterGroupId
Definition
SCR_RequestedTaskUIInfo.c:4
SCR_RequestedTaskUIInfo::SetDescriptionTo
override bool SetDescriptionTo(TextWidget textWidget)
Definition
SCR_RequestedTaskUIInfo.c:13
SCR_RequestedTaskUIInfo::CreateRequestedTaskUIInfo
static SCR_RequestedTaskUIInfo CreateRequestedTaskUIInfo(LocalizedString name, array< LocalizedString > nameParams, LocalizedString description, array< LocalizedString > descParams, ResourceName icon=ResourceName.Empty, string iconSetName=string.Empty, int requesterGroupId=0)
Definition
SCR_RequestedTaskUIInfo.c:50
SCR_RequestedTaskUIInfo::SetRequesterGroupId
void SetRequesterGroupId(int groupId)
Definition
SCR_RequestedTaskUIInfo.c:7
SCR_TaskUIInfo
Definition
SCR_TaskUIInfo.c:3
SCR_UIDescription::Description
LocalizedString Description
Definition
SCR_UIDescription.c:8
TextWidget
Definition
TextWidget.c:16
WidgetManager
Definition
WidgetManager.c:16
scripts
Game
UI
SCR_RequestedTaskUIInfo.c
Generated by
1.17.0