Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TaskTextBaseEditorAttribute.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("#AR-Editor_Attribute_CustomTaskName_LocationPlaceholder", desc: "Param used in the SCR_DropdownWithParamAttributeUIComponent to indicate for the player what will be replaced with the location name", uiwidget: UIWidgets.LocaleEditBox)]
9
10 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
11 {
13 if (task && IsValidTaskType(task.GetTextType()))
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 {
20 if (!var)
21 return;
22
24 task.SetTextIndex(var.GetInt());
25 }
26
27 //------------------------------------------------------------------------------------------------
28 override int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
29 {
30 //~ First entry is always the param used in the UI
32
34 if (!textsComponent)
35 return 0;
36
37 array<ref SCR_UIDescription> infos = {};
38 int count = textsComponent.GetTexts(m_TextType, infos);
39 for (int i; i < count; i++)
40 {
41 outEntries.Insert(new SCR_BaseEditorAttributeEntryText(infos[i].GetName()));
42 }
43
44 return outEntries.Count();
45 }
46
47 protected bool IsValidTaskType(ETaskTextType taskType)
48 {
49 return taskType == m_TextType;
50 }
51}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
void SCR_BaseEditorAttributeEntryText(string text)
void SCR_EditableTaskComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
class SCR_KeyBindingFilter BaseContainerCustomTitleField("m_sBindString")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
void SCR_TextsTaskManagerComponent(IEntityComponentSource src, IEntity ent, IEntity parent)
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
static SCR_BaseEditorAttributeVar CreateInt(int value)
override int GetEntries(notnull array< ref SCR_BaseEditorAttributeEntry > outEntries)
override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
SCR_FieldOfViewSettings Attribute