diff --git a/iw3sp_mod_ff_src/raw/ui/menus.txt b/iw3sp_mod_ff_src/raw/ui/menus.txt index 537a73f..4ac21d9 100644 --- a/iw3sp_mod_ff_src/raw/ui/menus.txt +++ b/iw3sp_mod_ff_src/raw/ui/menus.txt @@ -39,6 +39,8 @@ loadMenu { "ui/options_controls_main.menu" } //Added 03.24.2023 (8:19 PM) loadMenu { "ui/iw3sp_mod_settings_restart.menu" } + //Added 04.07.2024 (4:08 PM) + loadMenu { "ui/options_gamepad_defaults.menu" } loadMenu { "ui/playerprofile.menu" } loadMenu { "ui/briefing.menu" } diff --git a/iw3sp_mod_ff_src/raw/ui/options_controls_main.menu b/iw3sp_mod_ff_src/raw/ui/options_controls_main.menu index 46b8361..3f24d4e 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_controls_main.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_controls_main.menu @@ -30,6 +30,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; close iw3sp_mod_gamepad_options; diff --git a/iw3sp_mod_ff_src/raw/ui/options_controls_settings.menu b/iw3sp_mod_ff_src/raw/ui/options_controls_settings.menu index 5d21200..9266400 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_controls_settings.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_controls_settings.menu @@ -30,6 +30,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; close iw3sp_mod_gamepad_options; diff --git a/iw3sp_mod_ff_src/raw/ui/options_game_pc.menu b/iw3sp_mod_ff_src/raw/ui/options_game_pc.menu index 4642fd2..522bd3f 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_game_pc.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_game_pc.menu @@ -28,6 +28,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; diff --git a/iw3sp_mod_ff_src/raw/ui/options_gamepad_controls.menu b/iw3sp_mod_ff_src/raw/ui/options_gamepad_controls.menu index 9f97b58..b74f9e7 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_gamepad_controls.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_gamepad_controls.menu @@ -60,6 +60,7 @@ close iw3sp_mod_controls_pc_main; close iw3sp_mod_controls_pc_options; close iw3sp_mod_gamepad_settings; + close iw3sp_mod_gamepad_default; setLocalVarBool ui_hideBack 1; } diff --git a/iw3sp_mod_ff_src/raw/ui/options_gamepad_defaults.menu b/iw3sp_mod_ff_src/raw/ui/options_gamepad_defaults.menu new file mode 100644 index 0000000..df0887a --- /dev/null +++ b/iw3sp_mod_ff_src/raw/ui/options_gamepad_defaults.menu @@ -0,0 +1,68 @@ +#include "ui/menudef.h" +#include "ui_mp/common_macro.inc" +#define OPTIONS_STYLE 1 +#include "ui_mp/menustyle.inc" +#include "ui/choices_setup_common.menu" + +#undef CHOICE_SIZE_X +#define CHOICE_SIZE_X 220 + +{ + menuDef + { + name iw3sp_mod_gamepad_default + fullScreen 0 + rect 0 0 640 480 // Size and position of the menu + focusColor COLOR_FOCUSED // Menu focus color for text and items + soundloop "" + onOpen + { + setLocalVarBool ui_hideBack 1; + } + onClose + { + setLocalVarBool ui_hideBack 0; + } + onESC + { + close iw3sp_mod_gamepad_default; + } + + #include "ui_mp/leftside_controls_gamepad.inc" + + CHOICE_SECTION_TITLE( 21, "@MENU_SET_DEFAULT_CONTROLS" ) + + PREPROC_TEXT_DRAW_ALIGNED( CHOICE_ORIGIN( 23 ) 300 80 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN, 0 0, text "@MENU_RESTORE_EACH_SETTING", TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_CENTER, CHOICE_TEXTCOLOR autowrapped ) + + #define APPLY_GPAD_CONTROL \ + play "mouse_click"; \ + exec "set gpad_sticksConfig thumbstick_default"; \ + exec "set gpad_buttonConfig buttons_default"; \ + exec "reset input_viewSensitivity"; \ + exec "reset input_invertPitch"; \ + exec "reset gpad_aimassist"; \ + exec "reset gpad_style"; \ + exec "reset gpad_menu_scroll_delay_first"; \ + exec "reset gpad_menu_scroll_delay_rest"; \ + exec "reset gpad_stick_pressed_hysteresis"; \ + exec "reset gpad_stick_pressed"; \ + exec "reset gpad_stick_deadzone_min"; \ + exec "reset gpad_stick_deadzone_max"; \ + exec "reset gpad_button_deadzone"; \ + exec "reset gpad_button_lstick_deflect_max"; \ + exec "reset gpad_button_rstick_deflect_max"; \ + exec "reset gpad_use_hold_time"; \ + exec "reset gpad_lockon_enabled"; \ + exec "reset gpad_slowdown_enabled"; \ + exec "reset gpad_autoaim_enabled"; \ + exec "reset aim_aimAssistRangeScale"; \ + exec "reset aim_autoAimRangeScale"; \ + exec "reset aim_lockon_pitch_strength"; \ + exec "bindgpsticksconfigs"; \ + exec "bindgpbuttonsconfigs"; \ + + CHOICE_BUTTON( 26, "@MENU_YES", APPLY_GPAD_CONTROL; close self; open iw3sp_mod_gamepad_settings; ) + CHOICE_BUTTON( 27, "@MENU_NO", close self; open iw3sp_mod_gamepad_settings; ) + + } +} diff --git a/iw3sp_mod_ff_src/raw/ui/options_gamepad_settings.menu b/iw3sp_mod_ff_src/raw/ui/options_gamepad_settings.menu index ef90d81..ef3f155 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_gamepad_settings.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_gamepad_settings.menu @@ -33,6 +33,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; close iw3sp_mod_controls_pc_main; diff --git a/iw3sp_mod_ff_src/raw/ui/options_graphics_pc.menu b/iw3sp_mod_ff_src/raw/ui/options_graphics_pc.menu index 3b16b48..95c0db7 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_graphics_pc.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_graphics_pc.menu @@ -28,6 +28,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; close iw3sp_mod_gamepad_options; diff --git a/iw3sp_mod_ff_src/raw/ui/options_iw3sp_mod.menu b/iw3sp_mod_ff_src/raw/ui/options_iw3sp_mod.menu index a81040e..16a7181 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_iw3sp_mod.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_iw3sp_mod.menu @@ -28,6 +28,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; setLocalVarBool ui_showApply 0; setLocalVarBool ui_hideBack 1; diff --git a/iw3sp_mod_ff_src/raw/ui/options_look_pc.menu b/iw3sp_mod_ff_src/raw/ui/options_look_pc.menu index 3205166..2205abf 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_look_pc.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_look_pc.menu @@ -28,6 +28,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; close iw3sp_mod_gamepad_options; diff --git a/iw3sp_mod_ff_src/raw/ui/options_misc_pc.menu b/iw3sp_mod_ff_src/raw/ui/options_misc_pc.menu index 13bdd5e..7230c63 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_misc_pc.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_misc_pc.menu @@ -30,6 +30,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; close iw3sp_mod_gamepad_options; diff --git a/iw3sp_mod_ff_src/raw/ui/options_move_pc.menu b/iw3sp_mod_ff_src/raw/ui/options_move_pc.menu index d9d814e..5a58a3b 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_move_pc.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_move_pc.menu @@ -32,6 +32,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; close iw3sp_mod_gamepad_options; diff --git a/iw3sp_mod_ff_src/raw/ui/options_pc.menu b/iw3sp_mod_ff_src/raw/ui/options_pc.menu index 43f1d10..3936c3f 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_pc.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_pc.menu @@ -48,6 +48,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; } onESC { diff --git a/iw3sp_mod_ff_src/raw/ui/options_shoot_pc.menu b/iw3sp_mod_ff_src/raw/ui/options_shoot_pc.menu index ea1b812..2e92029 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_shoot_pc.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_shoot_pc.menu @@ -32,6 +32,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; close iw3sp_mod_gamepad_options; diff --git a/iw3sp_mod_ff_src/raw/ui/options_sound_pc.menu b/iw3sp_mod_ff_src/raw/ui/options_sound_pc.menu index b950704..0408186 100644 --- a/iw3sp_mod_ff_src/raw/ui/options_sound_pc.menu +++ b/iw3sp_mod_ff_src/raw/ui/options_sound_pc.menu @@ -28,6 +28,7 @@ close options_graphics_defaults; close options_graphics_texture; close options_control_defaults; + close iw3sp_mod_gamepad_default; close iw3sp_mod_options; close iw3sp_mod_gamepad_options; diff --git a/iw3sp_mod_ff_src/raw/ui_mp/leftside_controls_gamepad.inc b/iw3sp_mod_ff_src/raw/ui_mp/leftside_controls_gamepad.inc index 8979218..defe92b 100644 --- a/iw3sp_mod_ff_src/raw/ui_mp/leftside_controls_gamepad.inc +++ b/iw3sp_mod_ff_src/raw/ui_mp/leftside_controls_gamepad.inc @@ -16,22 +16,12 @@ CHOICE_MENU_TITLE( "@MENU_CONTROLS" ) #undef CHOICE_VERTICAL_ALIGN #define CHOICE_VERTICAL_ALIGN VERTICAL_ALIGN_TOP -//localize shit -/* -@IW3SP_MOD_LOC_MENU_GAMEPAD_BUTTONS_AND_STICKS_SETTINGS = "Gamepad Button/Sticks" -@IW3SP_MOD_LOC_MENU_GAMEPAD_BUTTONS_STICKS_SETTINGS = "Gamepad Setting" -@IW3SP_MOD_LOC_MENU_RESET_GAMEPAD_DEFAULT_SETTINGS = "Reset Default Gamepad Settings/Controls" -*/ - -//#define CHOICE_BUTTON_VIS( itemIndex, textArg, actionArg, visArg ) - CHOICE_BUTTON(2, "@IW3SP_MOD_LOC_MENU_GAMEPAD_MISC_SETTINGS", LOCAL_CLOSE_ALL open iw3sp_mod_gamepad_settings ) CHOICE_BUTTON_VIS( 3, "@IW3SP_MOD_LOC_MENU_GAMEPAD_BUTTONS_AND_STICKS_SETTINGS", LOCAL_CLOSE_ALL open iw3sp_mod_gamepad_controls, when(dvarBool("gpad_enabled") == 1) ) CHOICE_DBUTTON_VIS(3, "@IW3SP_MOD_LOC_MENU_GAMEPAD_BUTTONS_AND_STICKS_SETTINGS", when(dvarBool("gpad_enabled") == 0) ) CHOICE_BUTTON_VIS(4, "@IW3SP_MOD_LOC_MENU_GAMEPAD_RESET_DEFAULT_SETTINGS", LOCAL_CLOSE_ALL open iw3sp_mod_gamepad_default, when(dvarBool("gpad_enabled") == 1) ) CHOICE_DBUTTON_VIS(4, "@IW3SP_MOD_LOC_MENU_GAMEPAD_RESET_DEFAULT_SETTINGS", when(dvarBool("gpad_enabled") == 0) ) - #undef CHOICE_SIZE_X #define CHOICE_SIZE_X 180 diff --git a/iw3sp_mod_ff_src/raw/ui_mp/menustyle.inc b/iw3sp_mod_ff_src/raw/ui_mp/menustyle.inc index a7ab9f0..44cc3c6 100644 --- a/iw3sp_mod_ff_src/raw/ui_mp/menustyle.inc +++ b/iw3sp_mod_ff_src/raw/ui_mp/menustyle.inc @@ -53,9 +53,11 @@ close main_controls; \ close iw3sp_mod_options; \ close iw3sp_mod_gamepad_options; \ + close iw3sp_mod_gamepad_controls; \ close iw3sp_mod_gamepad_settings; \ close iw3sp_mod_controls_pc_main; \ - close iw3sp_mod_controls_pc_options; + close iw3sp_mod_controls_pc_options; \ + close iw3sp_mod_gamepad_default; #endif // disable the other positioning overrides