Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ScenarioFrameworkActionMapPanZoom.c
Go to the documentation of this file.
3{
4 [Attribute(desc: "Position to pan to")]
6
7 [Attribute(defvalue: "0", desc: "Target Pix Per Unit", params: "0 inf 0.01")]
9
10 [Attribute(defvalue: "0.25", desc: "Zoom Time", params: "0 inf 0.01")]
12
13 [Attribute(defvalue: "1", desc: "If true, invoker will be used to perform panZoom even if map is closed. Otherwise, nothing will happen.")]
15
17
18 //------------------------------------------------------------------------------------------------
23
24 //------------------------------------------------------------------------------------------------
25 override void OnActivate(IEntity object)
26 {
27 if (!CanActivate())
28 return;
29
31 if (!mapEntity)
32 return;
33
34 IEntity entity;
35 if (!ValidateInputEntity(object, m_PositionGetter, entity))
36 return;
37
38 m_vPosition = entity.GetOrigin();
39
40 if (mapEntity.IsOpen())
41 {
43 return;
44 }
45
46 if (!m_bOnMapOpen)
47 return;
48
49 mapEntity.GetOnMapOpen().Insert(OnMapOpen);
50 }
51
52 //------------------------------------------------------------------------------------------------
53 protected void OnMapOpen(MapConfiguration config)
54 {
56 if (!mapEntity)
57 return;
58
59 mapEntity.GetOnMapOpen().Remove(OnMapOpen);
61 }
62}
SCR_AIAnimation_Loitering BaseContainerProps
Commanding menu commanding element class.
vector position
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
proto external vector GetOrigin()
bool IsOpen()
Check if the map is opened.
static ScriptInvokerBase< MapConfigurationInvoker > GetOnMapOpen()
Get on map open invoker.
void ZoomPanSmooth(float targetPixPerUnit, float worldX, float worldY, float zoomTime=0.25)
static SCR_MapEntity GetMapInstance()
Get map entity instance.
SCR_FieldOfViewSettings Attribute