Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_MenuOverlayEditorAttribute.c
Go to the documentation of this file.
3 {
4  [Attribute(defvalue: "1", uiwidget: UIWidgets.ComboBox, enums: ParamEnumArray.FromEnum(EEditorMenuOverlayLayer))]
5  private EEditorMenuOverlayLayer m_Layer;
6 
7  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
8  {
9  if (!item.IsInherited(SCR_CameraBase)) return null;
10 
12  if (!menuOverlaysManager) return null;
13 
14  SCR_EditorMenuOverlayLayer layer = menuOverlaysManager.GetOverlayLayer(m_Layer);
15  if (!layer) return null;
16 
17  return SCR_BaseEditorAttributeVar.CreateInt(layer.GetCurrentOverlayIndex());
18  }
19  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
20  {
21  if (!var)
22  return;
23 
25  if (!menuOverlaysManager) return;
26 
27  SCR_EditorMenuOverlayLayer layer = menuOverlaysManager.GetOverlayLayer(m_Layer);
28  if (!layer) return;
29 
30  layer.SetCurrentOverlay(var.GetInt());
31  }
32  override void PreviewVariable(bool setPreview, SCR_AttributesManagerEditorComponent manager)
33  {
34  WriteVariable(null, GetVariable(), manager, -1);
35  }
36  override int GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
37  {
38  outEntries.Clear();
39 
41  if (!menuOverlaysManager) return 0;
42 
43  SCR_EditorMenuOverlayLayer layer = menuOverlaysManager.GetOverlayLayer(m_Layer);
44  if (!layer) return 0;
45 
46  array<SCR_EditorMenuOverlay> overlays = new array<SCR_EditorMenuOverlay>;
47  int overlaysCount = layer.GetOverlays(overlays);
48  if (overlaysCount == 0) return 0;
49 
50  for (int i = 0; i < overlaysCount; i++)
51  {
52  outEntries.Insert(new SCR_BaseEditorAttributeEntryText(overlays[i].GetDisplayName()));
53  }
54  return overlaysCount;
55  }
56 };
SCR_BaseDuplicatableEditorAttribute
Definition: SCR_BaseDuplicatableEditorAttribute.c:5
SCR_MenuOverlaysEditorComponent
Definition: SCR_MenuOverlaysEditorComponent.c:16
EEditorMenuOverlayLayer
EEditorMenuOverlayLayer
Overlay layer.
Definition: EEditorMenuOverlayLayer.c:5
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_CameraBase
Definition: SCR_CameraBase.c:9
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_EditorMenuOverlayLayer
Definition: SCR_MenuOverlaysEditorComponent.c:95
SCR_BaseEditorAttributeEntryText
void SCR_BaseEditorAttributeEntryText(string text)
Definition: SCR_BaseEditorAttribute.c:486
SCR_MenuOverlayEditorAttribute
Definition: SCR_MenuOverlayEditorAttribute.c:2
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