Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TextsTaskManagerComponent.c
Go to the documentation of this file.
1[ComponentEditorProps(category: "GameScripted/Tasks", description: "")]
3{
4 [Attribute()]
5 protected ref array<ref SCR_TextsTaskManagerEntry> m_aEntries;
6
7 //------------------------------------------------------------------------------------------------
11 int GetTexts(ETaskTextType type, out notnull array<ref SCR_UIDescription> outInfos)
12 {
14 {
15 if (entry.m_TextType == type)
16 {
17 int count = entry.m_aTexts.Count();
18 for (int i; i < count; i++)
19 {
20 outInfos.Insert(entry.m_aTexts[i]);
21 }
22
23 return count;
24 }
25 }
26 return 0;
27 }
28
29 //------------------------------------------------------------------------------------------------
33 SCR_UIDescription GetText(ETaskTextType type, int index)
34 {
36 {
37 if (entry.m_TextType == type)
38 return entry.m_aTexts[index];
39 }
40
41 return null;
42 }
43}
44
46{
47 protected static SCR_TextsTaskManagerComponent s_Instance;
48
49 static const string TASK_AMOUNT_COMPLETED_TEXT = "#AR-Tasks_AmountCompleted";
50 static const string TASK_PROGRESS_TEXT = "#AR-Tasks_StatusProgress-UC";
51 static const string TASK_FINISHED_TEXT = "#AR-Tasks_StatusFinished-UC";
52 static const string TASK_AVAILABLE_TEXT = "#AR-Tasks_StatusNew-UC";
53 static const string TASK_HINT_TEXT = "#AR-Tasks_Hint";
54 static const string TASK_CANCELLED_TEXT = "#AR-Tasks_StatusCancelled-UC";
55 static const string TASK_COMPLETED_TEXT = "#AR-Tasks_StatusCompleted-UC";
56 static const string TASK_FAILED_TEXT = "#AR-Tasks_StatusFailed-UC";
57
58 //------------------------------------------------------------------------------------------------
61 static SCR_TextsTaskManagerComponent GetInstance()
62 {
63 return s_Instance;
64 }
65
66 //------------------------------------------------------------------------------------------------
71 int GetTexts(ETaskTextType type, out notnull array<ref SCR_UIDescription> outInfos)
72 {
74 if (prefabData)
75 return prefabData.GetTexts(type, outInfos);
76 else
77 return 0;
78 }
79
80 //------------------------------------------------------------------------------------------------
85 SCR_UIDescription GetText(ETaskTextType type, int index)
86 {
88 if (prefabData)
89 return prefabData.GetText(type, index);
90 else
91 return null;
92 }
93
94 //------------------------------------------------------------------------------------------------
96 {
97 if (!s_Instance)
98 s_Instance = this;
99 }
100
101 //------------------------------------------------------------------------------------------------
103 {
104 s_Instance = null;
105 }
106}
107
108[BaseContainerProps(), SCR_BaseContainerCustomTitleEnum(ETaskTextType, "m_TextType")]
110{
111 [Attribute(SCR_Enum.GetDefault(ETaskTextType.NONE), UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ETaskTextType))]
112 ETaskTextType m_TextType;
113
114 [Attribute()]
115 ref array<ref SCR_UIDescription> m_aTexts;
116}
117
118enum ETaskTextType
119{
124 ATTACK
125}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
enum EAIGroupCombatMode ComponentEditorProps(category:"GameScripted/AI", description:"Component for utility AI system for groups")
@ ATTACK
@ DEFEND
string GetText()
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
SCR_CharacterSoundComponentClass GetComponentData()
EDamageType type
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
void SCR_TextsTaskManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
void ~SCR_TextsTaskManagerComponent()
int GetTexts(ETaskTextType type, out notnull array< ref SCR_UIDescription > outInfos)
SCR_UIDescription GetText(ETaskTextType type, int index)
int GetTexts(ETaskTextType type, out notnull array< ref SCR_UIDescription > outInfos)
ref array< ref SCR_TextsTaskManagerEntry > m_aEntries
IEntity GetOwner()
Owner entity of the fuel tank.
@ NONE
When Shape is created and not initialized yet.
Definition ShapeType.c:15
SCR_FieldOfViewSettings Attribute
@ CUSTOM
Mesh created through MeshObject::Create.