Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
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())
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_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
sealed SCR_BaseEditorAttributeVar GetVariable(bool createWhenNull=false)
static SCR_BaseEditorAttributeVar CreateInt(int value)
Attribute base for Name, icon and float value for other attributes to inherent from.
ref array< ref SCR_EditorAttributeFloatStringValueHolder > m_aValues
void SetLensFlareType(CameraLensFlareSetType newLensFlare)
SCR_BaseManualCameraComponent FindCameraComponent(typename type)