Arma Reforger Explorer  1.1.0.42
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
SCR_SettingsManualCameraComponent.c
Go to the documentation of this file.
1 
4 [BaseContainerProps(), SCR_BaseManualCameraComponentTitle()]
6 {
7  [Attribute("", UIWidgets.Flags, enums: ParamEnumArray.FromEnum(EManualCameraFlag), category: "Manual Camera")]
8  protected EManualCameraFlag m_Flags;
9 
10  [Attribute(desc: "When enabled, the cursor will be hidden when rotation with modifier is disabled.")]
11  protected bool m_bCanHideCursor;
12 
13  protected float m_Multiplier = 1;
14 
15  //------------------------------------------------------------------------------------------------
16  protected void LoadSettings()
17  {
19  BaseContainerTools.WriteToInstance(settings, GetGame().GetGameUserSettings().GetModule("SCR_ManualCameraSettings"));
20 
21  m_Multiplier = settings.m_fCameraSpeedCoef;
22  if (m_Multiplier == 0)
23  m_Multiplier = 1;
24 
25  if (settings.m_bCameraMoveATL)
26  {
27  m_Flags = m_Flags | EManualCameraFlag.MOVE_ATL;
28 
29  if (settings.m_bCameraSpeedATL)
30  m_Flags = m_Flags | EManualCameraFlag.SPEED_ATL;
31  else
32  m_Flags = m_Flags & ~EManualCameraFlag.SPEED_ATL;
33  }
34  else
35  {
36  m_Flags = m_Flags & ~EManualCameraFlag.MOVE_ATL;
37  m_Flags = m_Flags & ~EManualCameraFlag.SPEED_ATL;
38  }
39 
40  if (settings.m_bCameraRotateWithModifier)
41  m_Flags = m_Flags | EManualCameraFlag.ROTATE_MODIFIER;
42  else
43  m_Flags = m_Flags & ~EManualCameraFlag.ROTATE_MODIFIER;
44 
45  if (settings.m_bCameraAboveTerrain)
46  m_Flags = m_Flags | EManualCameraFlag.ABOVE_TERRAIN;
47  else
48  m_Flags = m_Flags & ~EManualCameraFlag.ABOVE_TERRAIN;
49  }
50 
51  //------------------------------------------------------------------------------------------------
52  override void EOnCameraFrame(SCR_ManualCameraParam param)
53  {
54  param.multiplier *= m_Multiplier;
55  param.flag = param.flag | m_Flags;
56 
57 // // use InputManager! instead of ShowCursor
58 // if (m_bCanHideCursor)
59 // ShowCursor(!param.isManualInputEnabled || (param.flag & EManualCameraFlag.ROTATE_MODIFIER));
60  }
61 
62  //------------------------------------------------------------------------------------------------
63  override bool EOnCameraInit()
64  {
65  LoadSettings();
66  GetGame().OnUserSettingsChangedInvoker().Insert(LoadSettings);
67  return true;
68  }
69 
70  //------------------------------------------------------------------------------------------------
71  override void EOnCameraExit()
72  {
73  GetGame().OnUserSettingsChangedInvoker().Remove(LoadSettings);
74  }
75 }
SCR_BaseManualCameraComponent
Parent class from which all SCR_ManualCamera components inherit.
Definition: SCR_BaseManualCameraComponent.c:5
GetGame
ArmaReforgerScripted GetGame()
Definition: game.c:1424
SCR_SettingsManualCameraComponent
Load global settings.
Definition: SCR_SettingsManualCameraComponent.c:5
desc
UI Textures DeployMenu Briefing conflict_HintBanner_1_UI desc
Definition: SCR_RespawnBriefingComponent.c:17
EManualCameraFlag
EManualCameraFlag
Definition: EManualCameraFlag.c:7
Attribute
typedef Attribute
Post-process effect of scripted camera.
SCR_ManualCameraParam
Parameter for carrying information between individual camera components.
Definition: SCR_ManualCameraParam.c:5
SCR_ManualCameraSettings
Definition: SCR_ManualCameraSettings.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
category
params category
Definition: SCR_VehicleDamageManagerComponent.c:180