Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_RewindToolbarAction.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "When enabled, the action will delete the rewind point instead of loading it.")]
5 protected bool m_bIsDelete;
6
8
9 //---------------------------------------------------------------------------------------------
10 override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition, int flags)
11 {
12 SCR_RewindComponent rewindManager = SCR_RewindComponent.GetInstance();
13 return rewindManager && rewindManager.HasRewindPoint();
14 }
15
16 //---------------------------------------------------------------------------------------------
17 override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set<SCR_EditableEntityComponent> selectedEntities, vector cursorWorldPosition,int flags, int param = -1)
18 {
19 if (m_bIsDelete)
20 {
21 SCR_RewindComponent rewindManager = SCR_RewindComponent.GetInstance();
22 rewindManager.DeleteRewindPoint();
23 return;
24 }
25
26 new SCR_RewindDialog();
27 }
28
29 //---------------------------------------------------------------------------------------------
30 override void OnInit(SCR_ActionsToolbarEditorUIComponent toolbar)
31 {
32 m_Toolbar = toolbar;
33 SCR_RewindComponent rewindManager = SCR_RewindComponent.GetInstance();
34 if (rewindManager)
35 rewindManager.GetOnRewindPointChanged().Insert(OnRewindPointChanged);
36 }
37
38 //---------------------------------------------------------------------------------------------
39 override void OnExit(SCR_ActionsToolbarEditorUIComponent toolbar)
40 {
41 SCR_RewindComponent rewindManager = SCR_RewindComponent.GetInstance();
42 if (rewindManager)
43 rewindManager.GetOnRewindPointChanged().Remove(OnRewindPointChanged);
44 }
45
46 //---------------------------------------------------------------------------------------------
47 protected void OnRewindPointChanged()
48 {
49 if (m_Toolbar)
50 m_Toolbar.MarkForRefresh();
51 }
52}
SCR_EAIThreatSectorFlags flags
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
class SCR_ArsenalGameModeUIDataHolder SCR_BaseContainerCustomTitleUIInfo("m_UIInfo")
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
override void Perform(SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags, int param=-1)
override void OnExit(SCR_ActionsToolbarEditorUIComponent toolbar)
SCR_BaseToolbarEditorUIComponent m_Toolbar
override bool CanBeShown(SCR_EditableEntityComponent hoveredEntity, notnull set< SCR_EditableEntityComponent > selectedEntities, vector cursorWorldPosition, int flags)
override void OnInit(SCR_ActionsToolbarEditorUIComponent toolbar)
SCR_FieldOfViewSettings Attribute