Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_TaskTextEditorAttribute.c
Go to the documentation of this file.
3 {
4  [Attribute(SCR_Enum.GetDefault(ETaskTextType.NONE), UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(ETaskTextType))]
5  protected ETaskTextType m_TextType;
6 
7  [Attribute(uiwidget: UIWidgets.LocaleEditBox)]
8  protected LocalizedString m_sLocationNamePlaceholder;
9 
10  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
11  {
13  if (task && task.GetTextType() == m_TextType)
14  return SCR_BaseEditorAttributeVar.CreateInt(task.GetTextIndex());
15  else
16  return null;
17  }
18  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
19  {
21  task.SetTextIndex(var.GetInt());
22  }
23  override int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
24  {
25  SCR_TextsTaskManagerComponent textsComponent = SCR_TextsTaskManagerComponent.GetInstance();
26  if (!textsComponent)
27  return 0;
28 
29  array<ref SCR_UIDescription> infos = {};
30  int count = textsComponent.GetTexts(m_TextType, infos);
31  string text;
32  for (int i; i < count; i++)
33  {
34  text = string.Format(infos[i].GetName(), m_sLocationNamePlaceholder);
35  outEntries.Insert( new SCR_BaseEditorAttributeEntryText(text) );
36  }
37  return count;
38  }
39 };
SCR_TaskTextEditorAttribute
Definition: SCR_TaskTextEditorAttribute.c:2
SCR_Enum
Definition: SCR_Enum.c:1
GetName
string GetName()
Definition: SCR_ScenarioFrameworkLayerBase.c:85
BaseContainerCustomTitleField
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
Definition: SCR_KeyBindingMenuConfig.c:113
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition: SCR_BaseEditorAttribute.c:3
SCR_BaseEditorAttributeEntryText
void SCR_BaseEditorAttributeEntryText(string text)
Definition: SCR_BaseEditorAttribute.c:486
SCR_EditableTaskComponent
void SCR_EditableTaskComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Definition: SCR_EditableTaskComponent.c:223
LocalizedString
Definition: LocalizedString.c:21
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