Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_LensFlareEditorAttribute.c
Go to the documentation of this file.
1 
6 {
7  override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
8  {
9  int count = m_aValues.Count();
10  if (count <= 1)
11  return null;
12 
14  if (!cameraComponent)
15  return null;
16 
17  SCR_ManualCamera camera = cameraComponent.GetCamera();
18  if (!camera)
19  return null;
20 
22  if (!lensFlareComponent)
23  return null;
24 
25  for(int i = 0; i < count; i++)
26  {
27  if ((int)m_aValues[i].GetFloatValue() == lensFlareComponent.GetLensFlareType())
28  return SCR_BaseEditorAttributeVar.CreateInt(i);
29  }
30 
31  return null;
32  }
33 
34  override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
35  {
36  if (!var)
37  return;
38 
40  if (!cameraComponent)
41  return;
42 
43  SCR_ManualCamera camera = cameraComponent.GetCamera();
44  if (!camera)
45  return;
46 
48  if (!lensFlareComponent)
49  return;
50 
51  lensFlareComponent.SetLensFlareType((int)m_aValues[var.GetInt()].GetFloatValue());
52  }
53 
54  override void PreviewVariable(bool setPreview, SCR_AttributesManagerEditorComponent manager)
55  {
56  WriteVariable(null, GetVariable(), manager, -1);
57  }
58 };
SCR_ManualCamera
Definition: SCR_ManualCamera.c:16
m_aValues
SCR_BaseEditorAttributeEntryTimeSlider m_aValues
SCR_LensFlareEditorAttribute
Definition: SCR_LensFlareEditorAttribute.c:5
SCR_CameraEditorComponent
Definition: SCR_CameraEditorComponent.c:13
SCR_BaseEditorAttributeCustomTitle
Definition: SCR_BaseEditorAttribute.c:868
SCR_BaseEditorAttributeVar
Definition: SCR_BaseEditorAttributeVar.c:1
SCR_LensFlareManualCameraComponent
Controls lense flare for camera.
Definition: SCR_LensFlareManualCameraComponent.c:5
SCR_BaseFloatValueHolderEditorAttribute
Attribute base for Name, icon and float value for other attributes to inherent from.
Definition: SCR_BaseFloatValueHolderEditorAttribute.c:3
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