Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_OpenAttributeWindowContextAction.c
Go to the documentation of this file.
3 {
4  override bool IsServer()
5  {
6  return false;
7  }
8  override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
9  {
10  return hoveredEntity && !hoveredEntity.HasEntityFlag(EEditableEntityFlag.NON_INTERACTIVE) && !selectedEntities.IsEmpty();
11  }
12 
13  override bool CanBePerformed(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
14  {
15  return hoveredEntity && !hoveredEntity.HasEntityFlag(EEditableEntityFlag.NON_INTERACTIVE) && !selectedEntities.IsEmpty();
16  }
17 
18  override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
19  {
20  if (DidCursorMoveDuringDoubleClick())
21  return;
22 
23  SCR_AttributesManagerEditorComponent attributesManager = SCR_AttributesManagerEditorComponent.Cast(SCR_AttributesManagerEditorComponent.GetInstance(SCR_AttributesManagerEditorComponent));
24  if (attributesManager)
25  {
26  array<Managed> editedEntities = new array<Managed>; //--- Must be 'array', not 'set', otherwise it will confuse the attribute system
27  foreach (SCR_EditableEntityComponent entity: selectedEntities) editedEntities.Insert(entity);
28  attributesManager.StartEditing(editedEntities);
29  }
30  }
31 };
EEditableEntityFlag
EEditableEntityFlag
Unique flags of the entity.
Definition: EEditableEntityFlag.c:5
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_OpenAttributeWindowContextAction
Definition: SCR_OpenAttributeWindowContextAction.c:2
SCR_BaseContainerCustomTitleUIInfo
void SCR_BaseContainerCustomTitleUIInfo(string propertyName, string format="%1")
Definition: Attributes.c:788
SCR_DoubleClickAction
Definition: SCR_DoubleClickAction.c:1
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