Arma Reforger Explorer
1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Toggle main menu visibility
Loading...
Searching...
No Matches
SCR_CameraParticleEditorAttribute.c
Go to the documentation of this file.
1
4
[
BaseContainerProps
(),
SCR_BaseEditorAttributeCustomTitle
()]
5
class
SCR_CameraParticleEditorAttribute
:
SCR_BaseEditorAttribute
6
{
7
//------------------------------------------------------------------------------------------------
8
override
SCR_BaseEditorAttributeVar
ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
9
{
10
if
(!item.IsInherited(
SCR_CameraBase
))
return
null;
11
12
SCR_CameraParticlesEditorComponent
cameraParticlesManager =
SCR_CameraParticlesEditorComponent
.Cast(
SCR_CameraParticlesEditorComponent
.GetInstance(
SCR_CameraParticlesEditorComponent
));
13
if
(!cameraParticlesManager)
return
null;
14
15
return
SCR_BaseEditorAttributeVar
.
CreateInt
(cameraParticlesManager.GetCurrentEffect());
16
}
17
18
//------------------------------------------------------------------------------------------------
19
override
void
WriteVariable(Managed item,
SCR_BaseEditorAttributeVar
var, SCR_AttributesManagerEditorComponent manager,
int
playerID)
20
{
21
SCR_CameraParticlesEditorComponent
cameraParticlesManager =
SCR_CameraParticlesEditorComponent
.Cast(
SCR_CameraParticlesEditorComponent
.GetInstance(
SCR_CameraParticlesEditorComponent
));
22
if
(!cameraParticlesManager)
return
;
23
24
if
(var) cameraParticlesManager.SetCurrentEffect(var.
GetInt
());
25
}
26
27
//------------------------------------------------------------------------------------------------
28
override
void
PreviewVariable(
bool
setPreview, SCR_AttributesManagerEditorComponent manager)
29
{
30
WriteVariable(null,
GetVariable
(), manager, -1);
31
}
32
33
//---- REFACTOR NOTE START: Loop might not be save? ----
34
35
//------------------------------------------------------------------------------------------------
36
override
int
GetEntries(notnull array<ref SCR_BaseEditorAttributeEntry> outEntries)
37
{
38
outEntries.Clear();
39
40
SCR_CameraParticlesEditorComponent
cameraParticlesManager =
SCR_CameraParticlesEditorComponent
.Cast(
SCR_CameraParticlesEditorComponent
.GetInstance(
SCR_CameraParticlesEditorComponent
));
41
if
(!cameraParticlesManager)
return
0;
42
43
array<SCR_CameraParticleEditor> effects =
new
array<SCR_CameraParticleEditor>;
44
int
effectsCount = cameraParticlesManager.GetEffects(effects);
45
if
(effectsCount == 0)
return
0;
46
47
for
(
int
i = 0; i < effectsCount; i++)
48
{
49
outEntries.Insert(
new
SCR_BaseEditorAttributeEntryText
(effects[i].GetDisplayName()));
50
}
51
return
effectsCount;
52
}
53
54
//---- REFACTOR NOTE END ----
55
};
BaseContainerProps
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition
SCR_AIAnimationWaypoint.c:14
SCR_BaseEditorAttributeEntryText
void SCR_BaseEditorAttributeEntryText(string text)
Definition
SCR_BaseEditorAttribute.c:494
SCR_BaseEditorAttributeCustomTitle
Definition
SCR_BaseEditorAttribute.c:876
SCR_BaseEditorAttribute
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
Definition
SCR_BaseEditorAttribute.c:4
SCR_BaseEditorAttribute::GetVariable
sealed SCR_BaseEditorAttributeVar GetVariable(bool createWhenNull=false)
Definition
SCR_BaseEditorAttribute.c:307
SCR_BaseEditorAttributeVar
Definition
SCR_BaseEditorAttributeVar.c:2
SCR_BaseEditorAttributeVar::CreateInt
static SCR_BaseEditorAttributeVar CreateInt(int value)
Definition
SCR_BaseEditorAttributeVar.c:107
SCR_BaseEditorAttributeVar::GetInt
int GetInt()
Definition
SCR_BaseEditorAttributeVar.c:20
SCR_CameraBase
Definition
SCR_CameraBase.c:10
SCR_CameraParticleEditorAttribute
Definition
SCR_CameraParticleEditorAttribute.c:6
SCR_CameraParticlesEditorComponent
Definition
SCR_CameraParticlesEditorComponent.c:29
scripts
Game
Editor
Containers
Attributes
SCR_CameraParticleEditorAttribute.c
Generated by
1.17.0