Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_TestEditorAttribute.c
Go to the documentation of this file.
1//#define ATTRIBUTES_DEBUG
3class SCR_TestEditorAttribute: SCR_BaseEditorAttribute
4{
5 [Attribute()];
6 private bool m_bRandomize;
7
8 [Attribute()];
9 private bool m_bIncompatible;
10
11 private bool m_Value;
12
13 override SCR_BaseEditorAttributeVar ReadVariable(Managed item, SCR_AttributesManagerEditorComponent manager)
14 {
15 #ifndef ATTRIBUTES_DEBUG
16 return null;
17 #endif
18 if (m_bIncompatible) return null;
19 Print(GetUIInfo().GetName() + ": Read " + m_Value.ToString(), LogLevel.DEBUG);
21 }
23 {
25 }
26
27 override void WriteVariable(Managed item, SCR_BaseEditorAttributeVar var, SCR_AttributesManagerEditorComponent manager, int playerID)
28 {
29 if (var) m_Value = var.GetInt();
30 Print(GetUIInfo().GetName() + ": Write " + m_Value.ToString(), LogLevel.DEBUG);
31 }
32 override void PreviewVariable(bool setPreview, SCR_AttributesManagerEditorComponent manager)
33 {
34 Print(GetUIInfo().GetName() + ": Preview", LogLevel.DEBUG);
35 }
36
37 void SCR_TestEditorAttribute()
38 {
39 if (m_bRandomize) m_Value = Math.RandomIntInclusive(0, 1);
40 }
41};
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
Definition Math.c:13
Base Attribute Script for other attributes to inherent from to get and set varriables in Editor Attri...
SCR_BaseEditorAttributeVar CreateDefaultVariable()
Create a default bool (false) variable.
SCR_EditorAttributeUIInfo GetUIInfo()
static SCR_BaseEditorAttributeVar CreateBool(bool value)
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
LogLevel
Enum with severity of the logging message.
Definition LogLevel.c:14
SCR_FieldOfViewSettings Attribute