[Mod FF]: Added default gamepad settings reset menu. (#8)
This commit is contained in:
parent
67dff01ba1
commit
26bf2d7947
@ -39,6 +39,8 @@
|
|||||||
loadMenu { "ui/options_controls_main.menu" }
|
loadMenu { "ui/options_controls_main.menu" }
|
||||||
//Added 03.24.2023 (8:19 PM)
|
//Added 03.24.2023 (8:19 PM)
|
||||||
loadMenu { "ui/iw3sp_mod_settings_restart.menu" }
|
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/playerprofile.menu" }
|
||||||
loadMenu { "ui/briefing.menu" }
|
loadMenu { "ui/briefing.menu" }
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
close iw3sp_mod_gamepad_options;
|
close iw3sp_mod_gamepad_options;
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
close iw3sp_mod_gamepad_options;
|
close iw3sp_mod_gamepad_options;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@
|
|||||||
close iw3sp_mod_controls_pc_main;
|
close iw3sp_mod_controls_pc_main;
|
||||||
close iw3sp_mod_controls_pc_options;
|
close iw3sp_mod_controls_pc_options;
|
||||||
close iw3sp_mod_gamepad_settings;
|
close iw3sp_mod_gamepad_settings;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
setLocalVarBool ui_hideBack 1;
|
setLocalVarBool ui_hideBack 1;
|
||||||
}
|
}
|
||||||
|
68
iw3sp_mod_ff_src/raw/ui/options_gamepad_defaults.menu
Normal file
68
iw3sp_mod_ff_src/raw/ui/options_gamepad_defaults.menu
Normal file
@ -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; )
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -33,6 +33,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
close iw3sp_mod_controls_pc_main;
|
close iw3sp_mod_controls_pc_main;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
close iw3sp_mod_gamepad_options;
|
close iw3sp_mod_gamepad_options;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
setLocalVarBool ui_showApply 0;
|
setLocalVarBool ui_showApply 0;
|
||||||
setLocalVarBool ui_hideBack 1;
|
setLocalVarBool ui_hideBack 1;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
close iw3sp_mod_gamepad_options;
|
close iw3sp_mod_gamepad_options;
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
close iw3sp_mod_gamepad_options;
|
close iw3sp_mod_gamepad_options;
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
close iw3sp_mod_gamepad_options;
|
close iw3sp_mod_gamepad_options;
|
||||||
|
@ -48,6 +48,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
}
|
}
|
||||||
onESC
|
onESC
|
||||||
{
|
{
|
||||||
|
@ -32,6 +32,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
close iw3sp_mod_gamepad_options;
|
close iw3sp_mod_gamepad_options;
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
close options_graphics_defaults;
|
close options_graphics_defaults;
|
||||||
close options_graphics_texture;
|
close options_graphics_texture;
|
||||||
close options_control_defaults;
|
close options_control_defaults;
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
|
|
||||||
close iw3sp_mod_options;
|
close iw3sp_mod_options;
|
||||||
close iw3sp_mod_gamepad_options;
|
close iw3sp_mod_gamepad_options;
|
||||||
|
@ -16,22 +16,12 @@ CHOICE_MENU_TITLE( "@MENU_CONTROLS" )
|
|||||||
#undef CHOICE_VERTICAL_ALIGN
|
#undef CHOICE_VERTICAL_ALIGN
|
||||||
#define CHOICE_VERTICAL_ALIGN VERTICAL_ALIGN_TOP
|
#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(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_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_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_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) )
|
CHOICE_DBUTTON_VIS(4, "@IW3SP_MOD_LOC_MENU_GAMEPAD_RESET_DEFAULT_SETTINGS", when(dvarBool("gpad_enabled") == 0) )
|
||||||
|
|
||||||
|
|
||||||
#undef CHOICE_SIZE_X
|
#undef CHOICE_SIZE_X
|
||||||
#define CHOICE_SIZE_X 180
|
#define CHOICE_SIZE_X 180
|
||||||
|
|
||||||
|
@ -53,9 +53,11 @@
|
|||||||
close main_controls; \
|
close main_controls; \
|
||||||
close iw3sp_mod_options; \
|
close iw3sp_mod_options; \
|
||||||
close iw3sp_mod_gamepad_options; \
|
close iw3sp_mod_gamepad_options; \
|
||||||
|
close iw3sp_mod_gamepad_controls; \
|
||||||
close iw3sp_mod_gamepad_settings; \
|
close iw3sp_mod_gamepad_settings; \
|
||||||
close iw3sp_mod_controls_pc_main; \
|
close iw3sp_mod_controls_pc_main; \
|
||||||
close iw3sp_mod_controls_pc_options;
|
close iw3sp_mod_controls_pc_options; \
|
||||||
|
close iw3sp_mod_gamepad_default;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// disable the other positioning overrides
|
// disable the other positioning overrides
|
||||||
|
Loading…
x
Reference in New Issue
Block a user