7 protected static const ref array<string> m_aLanguages = {
25 override void OnTabHide()
31 playerController.SetGameUserSettings();
35 override void OnTabCreate(Widget menuRoot, ResourceName buttonsLayout,
int index)
37 super.OnTabCreate(menuRoot, buttonsLayout,
index);
39 m_aSettingsBindings.Clear();
48 m_aSettingsBindings.Insert(
new SCR_SettingBindingGameplay(
"SCR_GameplaySettings",
"m_bShowRadioProtocolText",
"RadioProtocolSubtitles"));
49 m_aSettingsBindings.Insert(
new SCR_SettingBindingGameplay(
"SCR_GameplaySettings",
"m_bMouseControlAircraft",
"MouseControlAircraft"));
50 m_aSettingsBindings.Insert(
new SCR_SettingBindingGameplay(
"SCR_GameplaySettings",
"m_eDrivingAssistance",
"DrivingAssistance"));
60 m_aSettingsBindings.Insert(
new SCR_SettingBindingEngine(
"UserInterfaceSettings",
"UseSoftwareCursor",
"CursorMode"));
65 BindSensitivitySettings();
69 #ifdef PLATFORM_CONSOLE
70 HideMenuItem(
"MouseY");
71 HideMenuItem(
"CursorMode");
72 HideMenuItem(
"AimMouse");
77 protected void HideMenuItem(
string widgetName)
85 protected void BindLanguage()
87 BaseContainer setting =
GetGame().GetEngineUserSettings().GetModule(
"UserInterfaceSettings");
92 setting.Get(
"LanguageCode", currentLang);
94 int i = m_aLanguages.Find(currentLang);
98 Widget w =
m_wRoot.FindAnyWidget(
"Language");
106 comp.SetCurrentItem(i);
107 comp.m_OnChanged.Insert(OnLanguageChange);
110 protected void BindFOVSettings()
114 if (chkboxMaximumZoomInADS)
115 chkboxMaximumZoomInADS.m_OnChanged.Insert(OnGameSettingsCheckboxChange);
118 if (playerController)
119 playerController.SetGameUserSettings();
122 protected void BindSensitivitySettings()
129 sliderMouse.GetOnChangedFinal().Insert(OnGameSettingsSliderChange);
132 sliderGamepad.GetOnChangedFinal().Insert(OnGameSettingsSliderChange);
135 sliderADS.GetOnChangedFinal().Insert(OnGameSettingsSliderChange);
138 if (playerController)
139 playerController.SetGameUserSettings();
145 BaseContainer setting =
GetGame().GetEngineUserSettings().GetModule(
"UserInterfaceSettings");
149 if (i >= m_aLanguages.Count())
153 setting.Set(
"LanguageCode", m_aLanguages[i]);
154 GetGame().UserSettingsChanged();
156 m_OnLanguageChanged.Invoke(
this);
163 if (playerController)
164 playerController.SetGameUserSettings();
171 if (playerController)
172 playerController.SetGameUserSettings();