5 protected Widget m_SettingsRoot;
6 protected Widget m_DetailsRoot;
7 protected Widget m_DetailsBodyDefault;
8 protected Widget m_DetailsBodyConnectivity;
9 #ifdef PLATFORM_CONSOLE
10 protected bool m_MaKOptionAvailable;
11 protected Widget m_ConsoleControllerSensitivityWidget;
12 protected Widget m_ConsoleMouseSensitivityWidget;
16 protected GridSpacerWidget m_Keybindings;
19 protected OptionsMenu
m_Menu;
22 protected ref SwitchOptionsAccess m_KeyboardOption;
23 protected ref SwitchOptionsAccess m_AimHelperOption;
26 protected ref OptionSelectorMultistate m_KeyboardSelector;
27 protected ref OptionSelectorMultistate m_AimHelperSelector;
30 protected ref SwitchOptionsAccess m_Mouse_InvertOption;
31 protected ref NumericOptionsAccess m_Mouse_VSensitivityOption;
32 protected ref NumericOptionsAccess m_Mouse_HSensitivityOption;
33 protected ref NumericOptionsAccess m_Mouse_AimMod_VSensitivityOption;
34 protected ref NumericOptionsAccess m_Mouse_AimMod_HSensitivityOption;
37 protected ref OptionSelectorMultistate m_Mouse_InvertSelector;
38 protected ref OptionSelectorSlider m_Mouse_VSensitivitySelector;
39 protected ref OptionSelectorSlider m_Mouse_HSensitivitySelector;
40 protected ref OptionSelectorSlider m_Mouse_AimMod_VSensitivitySelector;
41 protected ref OptionSelectorSlider m_Mouse_AimMod_HSensitivitySelector;
44 protected ref NumericOptionsAccess m_ControllerLS_VSensitivityOption;
45 protected ref NumericOptionsAccess m_ControllerLS_HSensitivityOption;
46 protected ref NumericOptionsAccess m_ControllerLS_VehicleMod_HSensitivityOption;
47 protected ref SwitchOptionsAccess m_ControllerRS_InvertOption;
48 protected ref NumericOptionsAccess m_ControllerRS_VSensitivityOption;
49 protected ref NumericOptionsAccess m_ControllerRS_HSensitivityOption;
50 protected ref NumericOptionsAccess m_ControllerRS_CurvatureOption;
51 protected ref NumericOptionsAccess m_ControllerRS_AimMod_VSensitivityOption;
52 protected ref NumericOptionsAccess m_ControllerRS_AimMod_HSensitivityOption;
53 protected ref NumericOptionsAccess m_ControllerRS_AimMod_CurvatureOption;
56 protected ref OptionSelectorSlider m_ControllerLS_VSensitivitySelector;
57 protected ref OptionSelectorSlider m_ControllerLS_HSensitivitySelector;
58 protected ref OptionSelectorSlider m_ControllerLS_VehicleMod_HSensitivitySelector;
59 protected ref OptionSelectorMultistate m_ControllerRS_InvertSelector;
60 protected ref OptionSelectorSlider m_ControllerRS_VSensitivitySelector;
61 protected ref OptionSelectorSlider m_ControllerRS_HSensitivitySelector;
62 protected ref OptionSelectorSlider m_ControllerRS_CurvatureSelector;
63 protected ref OptionSelectorSlider m_ControllerRS_AimMod_VSensitivitySelector;
64 protected ref OptionSelectorSlider m_ControllerRS_AimMod_HSensitivitySelector;
65 protected ref OptionSelectorSlider m_ControllerRS_AimMod_CurvatureSelector;
69 static const float SLIDER_STEP = 0.025;
73 array<string> opt = {
"#options_controls_disabled",
"#options_controls_enabled" };
75 m_Root =
GetGame().GetWorkspace().CreateWidgets( GetLayoutName(), parent );
79 m_DetailsRoot = details_root;
80 m_DetailsBodyDefault = m_DetailsRoot.FindAnyWidget(
"settings_details_body");
81 m_DetailsBodyConnectivity = m_DetailsRoot.FindAnyWidget(
"settings_details_body_connectivity");
82 m_DetailsLabel =
TextWidget.Cast( m_DetailsRoot.FindAnyWidget(
"details_label" ) );
83 m_DetailsText =
RichTextWidget.Cast( m_DetailsRoot.FindAnyWidget(
"details_content" ) );
84 m_Keybindings = GridSpacerWidget.Cast(
m_Root.FindAnyWidget(
"keyboard_settings_content" ) );
86 m_Keybindings.SetUserID( 777 );
88 SetOptions( options );
91 Widget mouse_InvertSettingOption =
m_Root.FindAnyWidget(
"mouse_invert_setting_option" );
92 Widget mouse_VSensitivitySettingOption =
m_Root.FindAnyWidget(
"mouse_vsensitivity_setting_option" );
93 Widget mouse_HSensitivitySettingOption =
m_Root.FindAnyWidget(
"mouse_hsensitivity_setting_option" );
94 Widget mouse_AimMod_VSensitivitySettingOption =
m_Root.FindAnyWidget(
"mouse_aimmod_vsensitivity_setting_option" );
95 Widget mouse_AimMod_HSensitivitySettingOption =
m_Root.FindAnyWidget(
"mouse_aimmod_hsensitivity_setting_option" );
97 mouse_InvertSettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_MOUSE_YAXIS_INVERTED );
98 mouse_VSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_MOUSE_YAXIS );
99 mouse_HSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_MOUSE_XAXIS );
100 mouse_AimMod_VSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_MOUSE_YAXIS_AIM_MOD );
101 mouse_AimMod_HSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_MOUSE_XAXIS_AIM_MOD );
103 m_Mouse_InvertSelector =
new OptionSelectorMultistate( mouse_InvertSettingOption, m_Mouse_InvertOption.GetIndex(),
this,
false, opt );
104 m_Mouse_VSensitivitySelector =
new OptionSelectorSlider( mouse_VSensitivitySettingOption, m_Mouse_VSensitivityOption.ReadValue(),
this,
false, m_Mouse_VSensitivityOption.GetMin(), m_Mouse_VSensitivityOption.GetMax() );
105 m_Mouse_VSensitivitySelector.SetStep(SLIDER_STEP);
106 m_Mouse_HSensitivitySelector =
new OptionSelectorSlider( mouse_HSensitivitySettingOption, m_Mouse_HSensitivityOption.ReadValue(),
this,
false, m_Mouse_HSensitivityOption.GetMin(), m_Mouse_HSensitivityOption.GetMax() );
107 m_Mouse_HSensitivitySelector.SetStep(SLIDER_STEP);
108 m_Mouse_AimMod_VSensitivitySelector =
new OptionSelectorSlider( mouse_AimMod_VSensitivitySettingOption, m_Mouse_AimMod_VSensitivityOption.ReadValue(),
this,
false, m_Mouse_AimMod_VSensitivityOption.GetMin(), m_Mouse_AimMod_VSensitivityOption.GetMax() );
109 m_Mouse_AimMod_VSensitivitySelector.SetStep(SLIDER_STEP);
110 m_Mouse_AimMod_HSensitivitySelector =
new OptionSelectorSlider( mouse_AimMod_HSensitivitySettingOption, m_Mouse_AimMod_HSensitivityOption.ReadValue(),
this,
false, m_Mouse_AimMod_HSensitivityOption.GetMin(), m_Mouse_AimMod_HSensitivityOption.GetMax() );
111 m_Mouse_AimMod_HSensitivitySelector.SetStep(SLIDER_STEP);
113 m_Mouse_InvertSelector.m_OptionChanged.Insert( UpdateMouseInvertView );
114 m_Mouse_VSensitivitySelector.m_OptionChanged.Insert( UpdateMouseVSensitivity );
115 m_Mouse_HSensitivitySelector.m_OptionChanged.Insert( UpdateMouseHSensitivity );
116 m_Mouse_AimMod_VSensitivitySelector.m_OptionChanged.Insert( UpdateMouseAimModVSensitivity );
117 m_Mouse_AimMod_HSensitivitySelector.m_OptionChanged.Insert( UpdateMouseAimModHSensitivity );
120 #ifdef PLATFORM_CONSOLE
121 m_MaKOptionAvailable =
g_Game.GetGameState() != DayZGameState.IN_GAME ||
GetGame().GetWorld().IsMouseAndKeyboardEnabledOnServer();
122 m_ConsoleControllerSensitivityWidget =
m_Root.FindAnyWidget(
"controller_settings_root" );
123 m_ConsoleMouseSensitivityWidget =
m_Root.FindAnyWidget(
"mouse_settings_root" );
125 Widget keyboardSettingOption =
m_Root.FindAnyWidget(
"keyboard_setting_option" );
126 Widget aimHelperSettingOption =
m_Root.FindAnyWidget(
"aimhelper_setting_option" );
128 Widget controllerLS_VSensitivitySettingOption =
m_Root.FindAnyWidget(
"controller_ls_vsensitivity_setting_option");
129 Widget controllerLS_HSensitivitySettingOption =
m_Root.FindAnyWidget(
"controller_ls_hsensitivity_setting_option");
130 Widget controllerLS_VehicleMod_HSensitivitySettingOption =
m_Root.FindAnyWidget(
"controller_ls_vehicle_sensitivity_setting_option");
131 Widget controllerRS_InvertSettingOption =
m_Root.FindAnyWidget(
"controller_rs_invert_setting_option");
132 Widget controllerRS_VSensitivitySettingOption =
m_Root.FindAnyWidget(
"controller_rs_vsensitivity_setting_option");
133 Widget controllerRS_HSensitivitySettingOption =
m_Root.FindAnyWidget(
"controller_rs_hsensitivity_setting_option");
134 Widget controllerRS_CurvatureSettingOption =
m_Root.FindAnyWidget(
"controller_rs_curvature_setting_option");
135 Widget controllerRS_AimMod_VSensitivitySettingOption =
m_Root.FindAnyWidget(
"controller_rs_aimmod_vsensitivity_setting_option");
136 Widget controllerRS_AimMod_HSensitivitySettingOption =
m_Root.FindAnyWidget(
"controller_rs_aimmod_hsensitivity_setting_option");
137 Widget controllerRS_AimMod_CurvatureSettingOption =
m_Root.FindAnyWidget(
"controller_rs_aimmod_curvature_setting_option");
139 keyboardSettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_MOUSE_AND_KEYBOARD );
142 controllerLS_VSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_LS_YAXIS );
143 controllerLS_HSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_LS_XAXIS );
144 controllerLS_VehicleMod_HSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_LS_XAXIS_VEHICLE_MOD );
145 controllerRS_InvertSettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_YAXIS_INVERTED );
146 controllerRS_VSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_YAXIS );
147 controllerRS_HSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_XAXIS );
148 controllerRS_CurvatureSettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_CURVATURE );
149 controllerRS_AimMod_VSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_YAXIS_AIM_MOD );
150 controllerRS_AimMod_HSensitivitySettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_XAXIS_AIM_MOD );
151 controllerRS_AimMod_CurvatureSettingOption.SetUserID(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_CURVATURE_AIM_MOD );
153 m_KeyboardSelector =
new OptionSelectorMultistate( keyboardSettingOption, m_KeyboardOption.GetIndex(),
this, !m_MaKOptionAvailable, opt );
154 m_AimHelperSelector =
new OptionSelectorMultistate( aimHelperSettingOption, m_AimHelperOption.GetIndex(),
this,
false, opt );
156 m_ControllerLS_VSensitivitySelector =
new OptionSelectorSlider( controllerLS_VSensitivitySettingOption, m_ControllerLS_VSensitivityOption.ReadValue(),
this,
false, m_ControllerLS_VSensitivityOption.GetMin(), m_ControllerLS_VSensitivityOption.GetMax() );
157 m_ControllerLS_VSensitivitySelector.SetStep(SLIDER_STEP);
158 m_ControllerLS_HSensitivitySelector =
new OptionSelectorSlider( controllerLS_HSensitivitySettingOption, m_ControllerLS_HSensitivityOption.ReadValue(),
this,
false, m_ControllerLS_HSensitivityOption.GetMin(), m_ControllerLS_HSensitivityOption.GetMax() );
159 m_ControllerLS_HSensitivitySelector.SetStep(SLIDER_STEP);
160 m_ControllerLS_VehicleMod_HSensitivitySelector =
new OptionSelectorSlider( controllerLS_VehicleMod_HSensitivitySettingOption, m_ControllerLS_VehicleMod_HSensitivityOption.ReadValue(),
this,
false, m_ControllerLS_VehicleMod_HSensitivityOption.GetMin(), m_ControllerLS_VehicleMod_HSensitivityOption.GetMax() );
161 m_ControllerLS_VehicleMod_HSensitivitySelector.SetStep(SLIDER_STEP);
162 m_ControllerRS_InvertSelector =
new OptionSelectorMultistate( controllerRS_InvertSettingOption, m_ControllerRS_InvertOption.GetIndex(),
this,
false, opt );
163 m_ControllerRS_VSensitivitySelector =
new OptionSelectorSlider( controllerRS_VSensitivitySettingOption, m_ControllerRS_VSensitivityOption.ReadValue(),
this,
false, m_ControllerRS_VSensitivityOption.GetMin(), m_ControllerRS_VSensitivityOption.GetMax() );
164 m_ControllerRS_VSensitivitySelector.SetStep(SLIDER_STEP);
165 m_ControllerRS_HSensitivitySelector =
new OptionSelectorSlider( controllerRS_HSensitivitySettingOption, m_ControllerRS_HSensitivityOption.ReadValue(),
this,
false, m_ControllerRS_HSensitivityOption.GetMin(), m_ControllerRS_HSensitivityOption.GetMax() );
166 m_ControllerRS_HSensitivitySelector.SetStep(SLIDER_STEP);
167 m_ControllerRS_CurvatureSelector =
new OptionSelectorSlider( controllerRS_CurvatureSettingOption, m_ControllerRS_CurvatureOption.ReadValue(),
this,
false, m_ControllerRS_CurvatureOption.GetMin(), m_ControllerRS_CurvatureOption.GetMax() );
168 m_ControllerRS_CurvatureSelector.SetStep(SLIDER_STEP);
169 m_ControllerRS_AimMod_VSensitivitySelector =
new OptionSelectorSlider( controllerRS_AimMod_VSensitivitySettingOption, m_ControllerRS_AimMod_VSensitivityOption.ReadValue(),
this,
false, m_ControllerRS_AimMod_VSensitivityOption.GetMin(), m_ControllerRS_AimMod_VSensitivityOption.GetMax() );
170 m_ControllerRS_AimMod_VSensitivitySelector.SetStep(SLIDER_STEP);
171 m_ControllerRS_AimMod_HSensitivitySelector =
new OptionSelectorSlider( controllerRS_AimMod_HSensitivitySettingOption, m_ControllerRS_AimMod_HSensitivityOption.ReadValue(),
this,
false, m_ControllerRS_AimMod_HSensitivityOption.GetMin(), m_ControllerRS_AimMod_HSensitivityOption.GetMax() );
172 m_ControllerRS_AimMod_HSensitivitySelector.SetStep(SLIDER_STEP);
173 m_ControllerRS_AimMod_CurvatureSelector =
new OptionSelectorSlider( controllerRS_AimMod_CurvatureSettingOption, m_ControllerRS_AimMod_CurvatureOption.ReadValue(),
this,
false, m_ControllerRS_AimMod_CurvatureOption.GetMin(), m_ControllerRS_AimMod_CurvatureOption.GetMax() );
174 m_ControllerRS_AimMod_CurvatureSelector.SetStep(SLIDER_STEP);
176 m_KeyboardSelector.m_OptionChanged.Insert( UpdateKeyboard );
177 m_AimHelperSelector.m_OptionChanged.Insert( UpdateAimHelper );
179 m_ControllerLS_VSensitivitySelector.m_OptionChanged.Insert( UpdateControllerLS_VSensitivity );
180 m_ControllerLS_HSensitivitySelector.m_OptionChanged.Insert( UpdateControllerLS_HSensitivity );
181 m_ControllerLS_VehicleMod_HSensitivitySelector.m_OptionChanged.Insert( UpdateControllerLS_VehicleMod_HSensitivity );
182 m_ControllerRS_InvertSelector.m_OptionChanged.Insert( UpdateControllerRS_InvertView );
183 m_ControllerRS_VSensitivitySelector.m_OptionChanged.Insert( UpdateControllerRS_VSensitivity );
184 m_ControllerRS_HSensitivitySelector.m_OptionChanged.Insert( UpdateControllerRS_HSensitivity );
185 m_ControllerRS_CurvatureSelector.m_OptionChanged.Insert( UpdateControllerRS_Curvature );
186 m_ControllerRS_AimMod_VSensitivitySelector.m_OptionChanged.Insert( UpdateControllerRS_AimMod_VSensitivity );
187 m_ControllerRS_AimMod_HSensitivitySelector.m_OptionChanged.Insert( UpdateControllerRS_AimMod_HSensitivity );
188 m_ControllerRS_AimMod_CurvatureSelector.m_OptionChanged.Insert( UpdateControllerRS_AimMod_Curvature );
190 ShowConsoleSensitivityOptions(m_KeyboardOption.GetIndex());
192 bool MaKState = m_KeyboardSelector.IsEnabled() &&
GetGame().GetInput().IsEnabledMouseAndKeyboardEvenOnServer();
199 m_Root.FindAnyWidget(
"controls_settings_scroll" ).GetScreenSize(
x,
y );
200 m_Root.FindAnyWidget(
"controls_settings_root" ).GetScreenSize(
x, y2 );
202 m_Root.FindAnyWidget(
"controls_settings_scroll" ).SetAlpha( f );
204 m_Root.SetHandler(
this );
207 string GetLayoutName()
209 #ifdef PLATFORM_CONSOLE
210 return "gui/layouts/new_ui/options/xbox/controls_tab.layout";
212 return "gui/layouts/new_ui/options/pc/controls_tab.layout";
216 void EnterKeybindingMenu()
224 #ifdef PLATFORM_CONSOLE
225 if (m_KeyboardSelector && m_KeyboardSelector.IsSelectorEnabled())
227 m_KeyboardSelector.Focus();
229 else if (m_AimHelperSelector)
231 m_AimHelperSelector.Focus();
238 if ( w && w.IsInherited( ScrollWidget ) )
243 m_Menu.ColorHighlight( w );
250 if ( w && w.IsInherited( ScrollWidget ) )
263 #ifndef PLATFORM_CONSOLE
264 if( w == m_Keybindings )
266 EnterKeybindingMenu();
276 OptionsMenu menu = OptionsMenu.Cast(
GetGame().GetUIManager().GetMenu() );
279 menu.OnFocus( w,
x,
y );
284 if (TextMapUpdateWidget(w.GetUserID()))
289 if( w.IsInherited( SliderWidget ) )
303 m_DetailsRoot.Show(
false );
305 return ( w !=
null );
312 ColorWhite( w,
null );
323 bool TextMapUpdateWidget(
int key)
325 bool connectivityInfoShown = key ==
OptionIDsScript.OPTION_CONNECTIVITY_INFO;
327 Param tmp = m_TextMap.Get(key);
329 m_DetailsBodyDefault.Show(!connectivityInfoShown);
330 m_DetailsBodyConnectivity.Show(connectivityInfoShown);
332 if (
Class.CastTo(p,tmp))
334 m_DetailsRoot.Show(
true);
335 m_DetailsText.Show(
true);
336 m_DetailsLabel.SetText(p.param1);
337 m_DetailsText.SetText(p.param2);
339 m_DetailsText.Update();
340 m_DetailsLabel.Update();
341 m_DetailsRoot.Update();
342 m_DetailsBodyConnectivity.Update();
350 #ifdef PLATFORM_CONSOLE
351 return ( ( m_KeyboardSelector.IsEnabled() && m_KeyboardOption.GetIndex() == 0 ) || ( !m_KeyboardSelector.IsEnabled() && m_KeyboardOption.GetIndex() == 1 ) );
359 #ifdef PLATFORM_CONSOLE
360 bool changed =
false;
361 if (m_MaKOptionAvailable)
364 if ((m_KeyboardSelector.IsEnabled() && m_KeyboardOption.GetIndex() == 0) || (!m_KeyboardSelector.IsEnabled() && m_KeyboardOption.GetIndex() == 1))
366 m_KeyboardOption.Switch();
372 GetGame().GetUIManager().ShowUICursor( m_MaKOptionAvailable && m_KeyboardOption.GetIndex() );
374 g_Game.UpdateInputDeviceDisconnectWarning();
382 if( m_Mouse_InvertSelector )
383 m_Mouse_InvertSelector.SetValue( m_Mouse_InvertOption.GetIndex(),
true );
384 if( m_Mouse_VSensitivitySelector )
385 m_Mouse_VSensitivitySelector.SetValue( m_Mouse_VSensitivityOption.ReadValue(),
true );
386 if( m_Mouse_HSensitivitySelector )
387 m_Mouse_HSensitivitySelector.SetValue( m_Mouse_HSensitivityOption.ReadValue(),
true );
388 if( m_Mouse_AimMod_VSensitivitySelector )
389 m_Mouse_AimMod_VSensitivitySelector.SetValue( m_Mouse_AimMod_VSensitivityOption.ReadValue(),
true );
390 if( m_Mouse_AimMod_HSensitivitySelector )
391 m_Mouse_AimMod_HSensitivitySelector.SetValue( m_Mouse_AimMod_HSensitivityOption.ReadValue(),
true );
394 #ifdef PLATFORM_CONSOLE
395 if( m_KeyboardSelector )
396 m_KeyboardSelector.SetValue( m_KeyboardOption.GetIndex(),
true );
397 if( m_AimHelperSelector )
398 m_AimHelperSelector.SetValue( m_AimHelperOption.GetIndex(),
true );
400 if( m_ControllerLS_VSensitivitySelector )
401 m_ControllerLS_VSensitivitySelector.SetValue( m_ControllerLS_VSensitivityOption.ReadValue(),
true );
402 if( m_ControllerLS_HSensitivitySelector )
403 m_ControllerLS_HSensitivitySelector.SetValue( m_ControllerLS_HSensitivityOption.ReadValue(),
true );
404 if( m_ControllerLS_VehicleMod_HSensitivitySelector )
405 m_ControllerLS_VehicleMod_HSensitivitySelector.SetValue( m_ControllerLS_VehicleMod_HSensitivityOption.ReadValue(),
true );
406 if( m_ControllerRS_InvertSelector )
407 m_ControllerRS_InvertSelector.SetValue( m_ControllerRS_InvertOption.GetIndex(),
true );
408 if( m_ControllerRS_VSensitivitySelector )
409 m_ControllerRS_VSensitivitySelector.SetValue( m_ControllerRS_VSensitivityOption.ReadValue(),
true );
410 if( m_ControllerRS_HSensitivitySelector )
411 m_ControllerRS_HSensitivitySelector.SetValue( m_ControllerRS_HSensitivityOption.ReadValue(),
true );
412 if( m_ControllerRS_CurvatureSelector )
413 m_ControllerRS_CurvatureSelector.SetValue( m_ControllerRS_CurvatureOption.ReadValue(),
true );
414 if( m_ControllerRS_AimMod_VSensitivitySelector )
415 m_ControllerRS_AimMod_VSensitivitySelector.SetValue( m_ControllerRS_AimMod_VSensitivityOption.ReadValue(),
true );
416 if( m_ControllerRS_AimMod_HSensitivitySelector )
417 m_ControllerRS_AimMod_HSensitivitySelector.SetValue( m_ControllerRS_AimMod_HSensitivityOption.ReadValue(),
true );
418 if( m_ControllerRS_AimMod_CurvatureSelector )
419 m_ControllerRS_AimMod_CurvatureSelector.SetValue( m_ControllerRS_AimMod_CurvatureOption.ReadValue(),
true );
425 if( m_Mouse_InvertSelector )
426 m_Mouse_InvertSelector.SetValue( m_Mouse_InvertOption.GetDefaultIndex(),
true );
427 if( m_Mouse_VSensitivitySelector )
428 m_Mouse_VSensitivitySelector.SetValue( m_Mouse_VSensitivityOption.GetDefault(),
true );
429 if( m_Mouse_HSensitivitySelector )
430 m_Mouse_HSensitivitySelector.SetValue( m_Mouse_HSensitivityOption.GetDefault(),
true );
431 if( m_Mouse_AimMod_VSensitivitySelector )
432 m_Mouse_AimMod_VSensitivitySelector.SetValue( m_Mouse_AimMod_VSensitivityOption.GetDefault(),
true );
433 if( m_Mouse_AimMod_HSensitivitySelector )
434 m_Mouse_AimMod_HSensitivitySelector.SetValue( m_Mouse_AimMod_HSensitivityOption.GetDefault(),
true );
436 #ifdef PLATFORM_CONSOLE
437 if( m_KeyboardSelector )
438 m_KeyboardSelector.SetValue( m_KeyboardOption.GetDefaultIndex(),
true );
439 if( m_AimHelperSelector )
440 m_AimHelperSelector.SetValue( m_AimHelperOption.GetDefaultIndex(),
true );
442 if( m_ControllerLS_VSensitivitySelector )
443 m_ControllerLS_VSensitivitySelector.SetValue( m_ControllerLS_VSensitivityOption.GetDefault(),
true );
444 if( m_ControllerLS_HSensitivitySelector )
445 m_ControllerLS_HSensitivitySelector.SetValue( m_ControllerLS_HSensitivityOption.GetDefault(),
true );
446 if( m_ControllerLS_VehicleMod_HSensitivitySelector )
447 m_ControllerLS_VehicleMod_HSensitivitySelector.SetValue( m_ControllerLS_VehicleMod_HSensitivityOption.GetDefault(),
true );
448 if( m_ControllerRS_InvertSelector )
449 m_ControllerRS_InvertSelector.SetValue( m_ControllerRS_InvertOption.GetDefaultIndex(),
true );
450 if( m_ControllerRS_VSensitivitySelector )
451 m_ControllerRS_VSensitivitySelector.SetValue( m_ControllerRS_VSensitivityOption.GetDefault(),
true );
452 if( m_ControllerRS_HSensitivitySelector )
453 m_ControllerRS_HSensitivitySelector.SetValue( m_ControllerRS_HSensitivityOption.GetDefault(),
true );
454 if( m_ControllerRS_CurvatureSelector )
455 m_ControllerRS_CurvatureSelector.SetValue( m_ControllerRS_CurvatureOption.GetDefault(),
true );
456 if( m_ControllerRS_AimMod_VSensitivitySelector )
457 m_ControllerRS_AimMod_VSensitivitySelector.SetValue( m_ControllerRS_AimMod_VSensitivityOption.GetDefault(),
true );
458 if( m_ControllerRS_AimMod_HSensitivitySelector )
459 m_ControllerRS_AimMod_HSensitivitySelector.SetValue( m_ControllerRS_AimMod_HSensitivityOption.GetDefault(),
true );
460 if( m_ControllerRS_AimMod_CurvatureSelector )
461 m_ControllerRS_AimMod_CurvatureSelector.SetValue( m_ControllerRS_AimMod_CurvatureOption.GetDefault(),
true );
468 #ifdef PLATFORM_CONSOLE
469 void ShowConsoleSensitivityOptions(
int index)
471 m_ConsoleMouseSensitivityWidget.Show(index == 1 && m_MaKOptionAvailable);
474 void UpdateKeyboard(
int index )
477 ShowConsoleSensitivityOptions(index);
482 void UpdateAimHelper(
int index )
484 if ( m_AimHelperOption.GetIndex() != index )
486 m_AimHelperOption.Switch();
491 void UpdateControllerLS_VSensitivity(
float value )
493 m_ControllerLS_VSensitivityOption.WriteValue( value );
497 void UpdateControllerLS_HSensitivity(
float value )
499 m_ControllerLS_HSensitivityOption.WriteValue( value );
503 void UpdateControllerLS_VehicleMod_HSensitivity(
float value )
505 m_ControllerLS_VehicleMod_HSensitivityOption.WriteValue( value );
509 void UpdateControllerRS_InvertView(
int index )
511 if ( m_ControllerRS_InvertOption.GetIndex() != index )
513 m_ControllerRS_InvertOption.Switch();
518 void UpdateControllerRS_VSensitivity(
float value )
520 m_ControllerRS_VSensitivityOption.WriteValue( value );
524 void UpdateControllerRS_HSensitivity(
float value )
526 m_ControllerRS_HSensitivityOption.WriteValue( value );
530 void UpdateControllerRS_Curvature(
float value )
532 m_ControllerRS_CurvatureOption.WriteValue( value );
536 void UpdateControllerRS_AimMod_VSensitivity(
float value )
538 m_ControllerRS_AimMod_VSensitivityOption.WriteValue( value );
542 void UpdateControllerRS_AimMod_HSensitivity(
float value )
544 m_ControllerRS_AimMod_HSensitivityOption.WriteValue( value );
548 void UpdateControllerRS_AimMod_Curvature(
float value )
550 m_ControllerRS_AimMod_CurvatureOption.WriteValue( value );
555 void UpdateMouseInvertView(
int index )
557 if ( m_Mouse_InvertOption.GetIndex() != index )
559 m_Mouse_InvertOption.Switch();
564 void UpdateMouseVSensitivity(
float value )
566 m_Mouse_VSensitivityOption.WriteValue( value );
570 void UpdateMouseHSensitivity(
float value )
572 m_Mouse_HSensitivityOption.WriteValue( value );
576 void UpdateMouseAimModVSensitivity(
float value )
578 m_Mouse_AimMod_VSensitivityOption.WriteValue( value );
582 void UpdateMouseAimModHSensitivity(
float value )
584 m_Mouse_AimMod_HSensitivityOption.WriteValue( value );
598 m_Mouse_InvertOption = SwitchOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_MOUSE_YAXIS_INVERTED ) );
599 m_Mouse_VSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_MOUSE_YAXIS ) );
600 m_Mouse_HSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_MOUSE_XAXIS ) );
601 m_Mouse_AimMod_VSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_MOUSE_YAXIS_AIM_MOD ) );
602 m_Mouse_AimMod_HSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_MOUSE_XAXIS_AIM_MOD ) );
605 #ifdef PLATFORM_CONSOLE
606 m_KeyboardOption = SwitchOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_MOUSE_AND_KEYBOARD ) );
607 m_AimHelperOption = SwitchOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_AIM_HELPER ) );
609 m_ControllerLS_VSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_LS_YAXIS ) );
610 m_ControllerLS_HSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_LS_XAXIS ) );
611 m_ControllerLS_VehicleMod_HSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_LS_XAXIS_VEHICLE_MOD ) );
612 m_ControllerRS_InvertOption = SwitchOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_YAXIS_INVERTED ) );
613 m_ControllerRS_VSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_YAXIS ) );
614 m_ControllerRS_HSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_XAXIS ) );
615 m_ControllerRS_CurvatureOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_CURVATURE ) );
616 m_ControllerRS_AimMod_VSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_YAXIS_AIM_MOD ) );
617 m_ControllerRS_AimMod_HSensitivityOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_XAXIS_AIM_MOD ) );
618 m_ControllerRS_AimMod_CurvatureOption = NumericOptionsAccess.Cast( m_Options.GetOptionByType(
OptionAccessType.AT_OPTIONS_CONTROLLER_RS_CURVATURE_AIM_MOD ) );
624 void ToggleDependentOptions(
int mode,
bool state)
628 void InitDependentOptionsVisibility()
641 #ifdef PLATFORM_CONSOLE
647 m_TextMap.Insert(
OptionAccessType.AT_OPTIONS_CONTROLLER_LS_XAXIS_VEHICLE_MOD,
new Param2<string, string>(
"#STR_Movement_Vehicle_Sensitivity_tip_header",
"#STR_Movement_Vehicle_Sensitivity_tip" ) );
663 if (
Class.CastTo(button,w))
665 button.SetTextColor(
ARGB( 255, 255, 0, 0 ) );
666 button.SetAlpha( 0.9 );
673 if (
Class.CastTo(button,w))
675 button.SetTextColor(
ARGB( 255, 255, 255, 255 ) );
676 button.SetAlpha( 0.0 );