Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_HintSequenceToolbarAction.c
Go to the documentation of this file.
3 {
4  protected SCR_HintSequenceComponent m_Sequence;
5 
6  protected void OnSequenceChange(bool isActive)
7  {
8  Toggle(isActive, isActive);
9  }
10  protected SCR_HintSequenceComponent GetSequence()
11  {
12  SCR_EditorModeEntity currentMode = SCR_EditorModeEntity.GetInstance();
13  if (currentMode)
14  return SCR_HintSequenceComponent.Cast(currentMode.FindComponent(SCR_HintSequenceComponent));
15  else
16  return null;
17  }
18 
19  override bool IsServer()
20  {
21  return false;
22  }
23  override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
24  {
25  SCR_HintSequenceComponent sequence = GetSequence();
26  return sequence != null;
27  }
28  override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
29  {
30  SCR_HintSequenceComponent sequence = GetSequence();
31  if (sequence)
32  sequence.ToggleSequence();
33  }
34  override void Track()
35  {
36  m_Sequence= GetSequence();
37  if (m_Sequence)
38  m_Sequence.GetOnSequenceChange().Insert(OnSequenceChange);
39  }
40  override void Untrack()
41  {
42  if (m_Sequence)
43  {
44  m_Sequence.GetOnSequenceChange().Remove(OnSequenceChange);
45  m_Sequence.StopSequence();
46  }
47  }
48 };
SCR_EditorModeEntity
Definition: SCR_EditorModeEntity.c:22
SCR_HintSequenceToolbarAction
Definition: SCR_HintSequenceToolbarAction.c:2
Toggle
void Toggle()
Toggle hint. Hide it if it's shown, and open it again if it's hidden.
Definition: SCR_HintManagerComponent.c:216
SCR_BaseToggleToolbarAction
Definition: SCR_BaseToggleToolbarAction.c:3
SCR_EditableEntityComponent
Definition: SCR_EditableEntityComponent.c:13
SCR_BaseContainerCustomTitleUIInfo
void SCR_BaseContainerCustomTitleUIInfo(string propertyName, string format="%1")
Definition: Attributes.c:788
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