Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_EditorAttributesHintCondition.c
Go to the documentation of this file.
1[BaseContainerProps(), SCR_BaseContainerHintCondition()]
3{
4 [Attribute(uiwidget: UIWidgets.ComboBox, enums: { new ParamEnum("Game Mode", "0"), new ParamEnum("Camera", "1"), new ParamEnum("Editable Entity", "2") })]
5 protected int m_iItemType;
6
7 //------------------------------------------------------------------------------------------------
8 protected void OnAttributesStart()
9 {
10 SCR_AttributesManagerEditorComponent attributesManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
11 if (attributesManager)
12 {
13 array<Managed> items = {};
14 if (attributesManager.GetEditedItems(items) == 0 || !items[0])
15 return;
16
17 typename type;
18 switch (m_iItemType)
19 {
20 case 0: type = SCR_BaseGameMode; break;
21 case 1: type = SCR_ManualCamera; break;
22 case 2: type = SCR_EditableEntityComponent; break;
23 }
24
25 if (items[0].Type().IsInherited(type))
26 Activate();
27 }
28 }
29
30 //------------------------------------------------------------------------------------------------
31 override protected void OnInitConditionEditor(SCR_EditorManagerEntity editorManager)
32 {
33 SCR_AttributesManagerEditorComponent attributesManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
34 if (attributesManager)
35 {
36 attributesManager.GetOnAttributesStart().Insert(OnAttributesStart);
37 attributesManager.GetOnAttributesConfirm().Insert(Deactivate);
38 attributesManager.GetOnAttributesCancel().Insert(Deactivate);
39 }
40 }
41
42 //------------------------------------------------------------------------------------------------
43 override protected void OnExitConditionEditor(SCR_EditorManagerEntity editorManager)
44 {
45 SCR_AttributesManagerEditorComponent attributesManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
46 if (attributesManager)
47 {
48 attributesManager.GetOnAttributesStart().Remove(OnAttributesStart);
49 attributesManager.GetOnAttributesConfirm().Remove(Deactivate);
50 attributesManager.GetOnAttributesCancel().Remove(Deactivate);
51 }
52 }
53}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
EDamageType type
void SCR_EditorManagerEntity(IEntitySource src, IEntity parent)
int Type
proto native external bool IsInherited(typename type)
void OnInitConditionEditor(SCR_EditorManagerEntity editorManager)
void OnExitConditionEditor(SCR_EditorManagerEntity editorManager)
SCR_FieldOfViewSettings Attribute