Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_RequestedTaskUIInfo.c
Go to the documentation of this file.
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 //------------------------------------------------------------------------------------------------
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 {
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}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void SCR_GroupsManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void GetCallsigns(out string company, out string platoon, out string squad, out string character, out string format)
Faction GetFaction()
override bool SetDescriptionTo(TextWidget textWidget)
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)
void SetRequesterGroupId(int groupId)
LocalizedString Description