Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TextsTaskManagerComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/Tasks", description: "")]
2 class SCR_TextsTaskManagerComponentClass : ScriptComponentClass
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  {
13  foreach (SCR_TextsTaskManagerEntry entry : m_aEntries)
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  {
35  foreach (SCR_TextsTaskManagerEntry entry : m_aEntries)
36  {
37  if (entry.m_TextType == type)
38  return entry.m_aTexts[index];
39  }
40 
41  return null;
42  }
43 }
44 
45 class SCR_TextsTaskManagerComponent : ScriptComponent
46 {
47  //------------------------------------------------------------------------------------------------
50  static SCR_TextsTaskManagerComponent GetInstance()
51  {
52  SCR_BaseTaskManager taskManager = GetTaskManager();
53  if (taskManager)
54  return SCR_TextsTaskManagerComponent.Cast(taskManager.FindComponent(SCR_TextsTaskManagerComponent));
55  else
56  return null;
57  }
58 
59  //------------------------------------------------------------------------------------------------
64  int GetTexts(ETaskTextType type, out notnull array<ref SCR_UIDescription> outInfos)
65  {
67  if (prefabData)
68  return prefabData.GetTexts(type, outInfos);
69  else
70  return 0;
71  }
72 
73  //------------------------------------------------------------------------------------------------
78  SCR_UIDescription GetText(ETaskTextType type, int index)
79  {
81  if (prefabData)
82  return prefabData.GetText(type, index);
83  else
84  return null;
85  }
86 }
87 
88 [BaseContainerProps(), SCR_BaseContainerCustomTitleEnum(ETaskTextType, "m_TextType")]
90 {
91  [Attribute(SCR_Enum.GetDefault(ETaskTextType.NONE), UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ETaskTextType))]
92  ETaskTextType m_TextType;
93 
94  [Attribute()]
95  ref array<ref SCR_UIDescription> m_aTexts;
96 }
97 
98 enum ETaskTextType
99 {
100  NONE,
101  CUSTOM,
102  MOVE,
103  DEFEND,
104  ATTACK
105 }
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
SCR_Enum
Definition: SCR_Enum.c:1
CUSTOM
class SCR_TextsTaskManagerEntry CUSTOM
ScriptComponent
SCR_SiteSlotEntityClass ScriptComponent
NONE
class SCR_TextsTaskManagerEntry NONE
SCR_BaseContainerCustomTitleEnum
class SCR_CampaignHintStorage SCR_BaseContainerCustomTitleEnum(EHint, "m_eHintId")
Definition: SCR_CampaignHintStorage.c:22
GetInstance
SCR_TextsTaskManagerComponentClass ScriptComponentClass GetInstance()
Definition: SCR_TextsTaskManagerComponent.c:50
DEFEND
class SCR_TextsTaskManagerEntry DEFEND
MOVE
class SCR_TextsTaskManagerEntry MOVE
m_aEntries
protected ref array< ref SCR_TextsTaskManagerEntry > m_aEntries
Definition: SCR_TextsTaskManagerComponent.c:3
Attribute
typedef Attribute
Post-process effect of scripted camera.
ATTACK
@ ATTACK
Definition: SCR_AIMessage.c:18
GetTaskManager
SCR_BaseTaskManager GetTaskManager()
Definition: SCR_BaseTaskManager.c:7
SCR_BaseTaskManager
Definition: SCR_BaseTaskManager.c:25
GetTexts
int GetTexts(ETaskTextType type, out notnull array< ref SCR_UIDescription > outInfos)
Definition: SCR_TextsTaskManagerComponent.c:9
GetOwner
IEntity GetOwner()
Owner entity of the fuel tank.
Definition: SCR_FuelNode.c:128
GetText
SCR_UIDescription GetText(ETaskTextType type, int index)
Definition: SCR_TextsTaskManagerComponent.c:31
index
SCR_DestructionSynchronizationComponentClass ScriptComponentClass int index
Definition: SCR_DestructionSynchronizationComponent.c:17
type
EDamageType type
Definition: SCR_DestructibleTreeV2.c:32
SCR_TextsTaskManagerComponentClass
Definition: SCR_TextsTaskManagerComponent.c:2
SCR_UIDescription
Definition: SCR_UIDescription.c:5
BaseContainerProps
SCR_AIGoalReaction_Follow BaseContainerProps
Handles insects that are supposed to be spawned around selected prefabs defined in prefab names array...
Definition: SCR_AIGoalReaction.c:468
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180
SCR_TextsTaskManagerEntry
Definition: SCR_TextsTaskManagerComponent.c:89