Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_ToolbarActionsEditorComponent.c
Go to the documentation of this file.
1 [ComponentEditorProps(category: "GameScripted/Editor", description: "Manager of ability actions in editor", icon: "WBData/ComponentEditorProps/componentEditor.png")]
3 {
4 };
5 
6 class SCR_ToolbarActionsEditorComponent : SCR_BaseActionsEditorComponent
7 {
8  void OnFilterChange(EEditableEntityState state, set<SCR_EditableEntityComponent> entitiesInsert, set<SCR_EditableEntityComponent> entitiesRemove)
9  {
10  ValidateSelection(false);
11  }
12 
13  override bool ActionCanBeShown(SCR_BaseEditorAction action, vector cursorWorldPosition, int flags)
14  {
15  return action.GetInfo() && action.CanBeShown(m_HoveredEntity, m_SelectedEntities, cursorWorldPosition, flags);
16  }
17 
18  override bool ActionCanBePerformed(SCR_BaseEditorAction action, vector cursorWorldPosition, int flags)
19  {
20  return action.CanBePerformed(m_HoveredEntity, m_SelectedEntities, cursorWorldPosition, flags);
21  }
22 
23  override void EOnEditorActivate()
24  {
25  super.EOnEditorActivate();
26 
28  {
29  m_SelectedManager.GetOnChanged().Insert(OnFilterChange);
30  }
31  if (m_HoverManager)
32  {
33  m_HoverManager.GetOnChanged().Insert(OnFilterChange);
34  }
35  }
36 
37  override void EOnEditorDeactivate()
38  {
39  super.EOnEditorDeactivate();
40 
42  {
43  m_SelectedManager.GetOnChanged().Remove(OnFilterChange);
44  }
45  if (m_HoverManager)
46  {
47  m_HoverManager.GetOnChanged().Remove(OnFilterChange);
48  }
49  }
50 };
ComponentEditorProps
SCR_FragmentEntityClass ComponentEditorProps
SCR_BaseEditorAction
Definition: SCR_BaseEditorAction.c:24
EEditableEntityState
EEditableEntityState
Definition: EEditableEntityState.c:37
SCR_ToolbarActionsEditorComponentClass
Definition: SCR_ToolbarActionsEditorComponent.c:2
SCR_ToolbarActionsEditorComponent
Definition: SCR_ToolbarActionsEditorComponent.c:6
SCR_BaseActionsEditorComponentClass
Definition: SCR_BaseActionsEditorComponent.c:20
m_HoverManager
SCR_BaseActionsEditorComponentClass m_HoverManager
m_HoveredEntity
protected SCR_EditableEntityComponent m_HoveredEntity
Definition: SCR_BaseActionsEditorComponent.c:154
m_SelectedManager
protected SCR_BaseEditableEntityFilter m_SelectedManager
Definition: SCR_BaseActionsEditorComponent.c:151
ValidateSelection
protected int ValidateSelection(bool isInstant)
Definition: SCR_BaseActionsEditorComponent.c:220
m_SelectedEntities
protected ref set< SCR_EditableEntityComponent > m_SelectedEntities
Definition: SCR_BaseActionsEditorComponent.c:155
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180