From 06995347cb86291fd75acbd9302e0c7926fa6f90 Mon Sep 17 00:00:00 2001 From: Jan Date: Wed, 8 Sep 2021 17:41:08 +0200 Subject: [PATCH] Add controller alt button layouts that swap triggers and shoulders --- iw4x/iw4x_00/buttons_default_alt.cfg | 41 ++++++++++++++++++++++ iw4x/iw4x_00/buttons_lefty_alt.cfg | 41 ++++++++++++++++++++++ iw4x/iw4x_00/buttons_nomad_alt.cfg | 41 ++++++++++++++++++++++ iw4x/iw4x_00/buttons_tactical_alt.cfg | 41 ++++++++++++++++++++++ iw4x/iw4x_00/ui_mp/pc_options_gamepad.menu | 16 +++++++-- 5 files changed, 178 insertions(+), 2 deletions(-) create mode 100644 iw4x/iw4x_00/buttons_default_alt.cfg create mode 100644 iw4x/iw4x_00/buttons_lefty_alt.cfg create mode 100644 iw4x/iw4x_00/buttons_nomad_alt.cfg create mode 100644 iw4x/iw4x_00/buttons_tactical_alt.cfg diff --git a/iw4x/iw4x_00/buttons_default_alt.cfg b/iw4x/iw4x_00/buttons_default_alt.cfg new file mode 100644 index 0000000..9fcb798 --- /dev/null +++ b/iw4x/iw4x_00/buttons_default_alt.cfg @@ -0,0 +1,41 @@ +set gpad_buttonsConfig "buttons_default" + +bind BUTTON_START togglemenu +bind BUTTON_BACK togglescores + +unbind BUTTON_RSHLDR +unbind BUTTON_LSHLDR +unbind BUTTON_RTRIG +unbind BUTTON_LTRIG +unbind BUTTON_RSTICK +unbind BUTTON_LSTICK +unbind BUTTON_A +unbind BUTTON_B +unbind BUTTON_X +unbind BUTTON_Y +unbind DPAD_UP +unbind DPAD_DOWN +unbind DPAD_LEFT +unbind DPAD_RIGHT + +bind BUTTON_RSHLDR "+attack" +bind BUTTON_LSHLDR "+speed_throw" + +bind BUTTON_RTRIG "+frag" +bind BUTTON_LTRIG "+smoke" + +bind BUTTON_RSTICK "+melee" +bind BUTTON_LSTICK "+breath_sprint" + +set gpad_button_rstick_deflect_max 1.0 +set gpad_button_lstick_deflect_max 1.0 + +bind BUTTON_A "+gostand" +bind BUTTON_B "+stance" +bind BUTTON_X "+usereload" +bind BUTTON_Y "weapnext" + +bind DPAD_UP "+actionslot 1" +bind DPAD_DOWN "+actionslot 2" +bind DPAD_LEFT "+actionslot 3" +bind DPAD_RIGHT "+actionslot 4" \ No newline at end of file diff --git a/iw4x/iw4x_00/buttons_lefty_alt.cfg b/iw4x/iw4x_00/buttons_lefty_alt.cfg new file mode 100644 index 0000000..8059a85 --- /dev/null +++ b/iw4x/iw4x_00/buttons_lefty_alt.cfg @@ -0,0 +1,41 @@ +set gpad_buttonsConfig "buttons_lefty" + +bind BUTTON_START togglemenu +bind BUTTON_BACK togglescores + +unbind BUTTON_RSHLDR +unbind BUTTON_LSHLDR +unbind BUTTON_RTRIG +unbind BUTTON_LTRIG +unbind BUTTON_RSTICK +unbind BUTTON_LSTICK +unbind BUTTON_A +unbind BUTTON_B +unbind BUTTON_X +unbind BUTTON_Y +unbind DPAD_UP +unbind DPAD_DOWN +unbind DPAD_LEFT +unbind DPAD_RIGHT + +bind BUTTON_RSHLDR "+speed_throw" +bind BUTTON_LSHLDR "+attack" + +bind BUTTON_RTRIG "+smoke" +bind BUTTON_LTRIG "+frag" + +bind BUTTON_RSTICK "+breath_sprint" +bind BUTTON_LSTICK "+melee" + +set gpad_button_rstick_deflect_max 1.0 +set gpad_button_lstick_deflect_max 1.0 + +bind BUTTON_A "+gostand" +bind BUTTON_B "+stance" +bind BUTTON_X "+usereload" +bind BUTTON_Y "weapnext" + +bind DPAD_UP "+actionslot 1" +bind DPAD_DOWN "+actionslot 2" +bind DPAD_LEFT "+actionslot 3" +bind DPAD_RIGHT "+actionslot 4" \ No newline at end of file diff --git a/iw4x/iw4x_00/buttons_nomad_alt.cfg b/iw4x/iw4x_00/buttons_nomad_alt.cfg new file mode 100644 index 0000000..9d25814 --- /dev/null +++ b/iw4x/iw4x_00/buttons_nomad_alt.cfg @@ -0,0 +1,41 @@ +set gpad_buttonsConfig "buttons_nomad" + +bind BUTTON_START togglemenu +bind BUTTON_BACK togglescores + +unbind BUTTON_RSHLDR +unbind BUTTON_LSHLDR +unbind BUTTON_RTRIG +unbind BUTTON_LTRIG +unbind BUTTON_RSTICK +unbind BUTTON_LSTICK +unbind BUTTON_A +unbind BUTTON_B +unbind BUTTON_X +unbind BUTTON_Y +unbind DPAD_UP +unbind DPAD_DOWN +unbind DPAD_LEFT +unbind DPAD_RIGHT + +bind BUTTON_RSHLDR "+attack" +bind BUTTON_LSHLDR "+toggleads_throw" + +bind BUTTON_RTRIG "+frag" +bind BUTTON_LTRIG "+smoke" + +bind BUTTON_RSTICK "+stance" +bind BUTTON_LSTICK "+breath_sprint" + +set gpad_button_rstick_deflect_max 1.0 +set gpad_button_lstick_deflect_max 1.0 + +bind BUTTON_A "+gostand" +bind BUTTON_B "+melee" +bind BUTTON_X "+usereload" +bind BUTTON_Y "weapnext" + +bind DPAD_UP "+actionslot 1" +bind DPAD_DOWN "+actionslot 2" +bind DPAD_LEFT "+actionslot 3" +bind DPAD_RIGHT "+actionslot 4" \ No newline at end of file diff --git a/iw4x/iw4x_00/buttons_tactical_alt.cfg b/iw4x/iw4x_00/buttons_tactical_alt.cfg new file mode 100644 index 0000000..e695f34 --- /dev/null +++ b/iw4x/iw4x_00/buttons_tactical_alt.cfg @@ -0,0 +1,41 @@ +set gpad_buttonsConfig "buttons_tactical" + +bind BUTTON_START togglemenu +bind BUTTON_BACK togglescores + +unbind BUTTON_RSHLDR +unbind BUTTON_LSHLDR +unbind BUTTON_RTRIG +unbind BUTTON_LTRIG +unbind BUTTON_RSTICK +unbind BUTTON_LSTICK +unbind BUTTON_A +unbind BUTTON_B +unbind BUTTON_X +unbind BUTTON_Y +unbind DPAD_UP +unbind DPAD_DOWN +unbind DPAD_LEFT +unbind DPAD_RIGHT + +bind BUTTON_RSHLDR "+attack" +bind BUTTON_LSHLDR "+speed_throw" + +bind BUTTON_RTRIG "+frag" +bind BUTTON_LTRIG "+smoke" + +bind BUTTON_RSTICK "+stance" +bind BUTTON_LSTICK "+breath_sprint" + +set gpad_button_rstick_deflect_max 1.0 +set gpad_button_lstick_deflect_max 1.0 + +bind BUTTON_A "+gostand" +bind BUTTON_B "+melee" +bind BUTTON_X "+usereload" +bind BUTTON_Y "weapnext" + +bind DPAD_UP "+actionslot 1" +bind DPAD_DOWN "+actionslot 2" +bind DPAD_LEFT "+actionslot 3" +bind DPAD_RIGHT "+actionslot 4" \ No newline at end of file diff --git a/iw4x/iw4x_00/ui_mp/pc_options_gamepad.menu b/iw4x/iw4x_00/ui_mp/pc_options_gamepad.menu index 68bcffc..1e89639 100644 --- a/iw4x/iw4x_00/ui_mp/pc_options_gamepad.menu +++ b/iw4x/iw4x_00/ui_mp/pc_options_gamepad.menu @@ -105,8 +105,20 @@ menuDef PC_OPTIONS_SEPERATOR(0) PC_OPTIONS_DVARYESNO_RAW(1, "@MENU_LOOK_INVERSION", "input_invertPitch", ;, "@MPUI_DESC_LOOK_INVERSION", ON_GPAD_DISABLED, ON_GPAD_ENABLED) - PC_OPTIONS_STRLIST_RAW(2, "@MENU_THUMBSTICK_LAYOUT", "gpad_sticksConfig", {"@MENU_DEFAULT"; "thumbstick_default"; "@MENU_SOUTHPAW"; "thumbstick_southpaw"; "@MENU_LEGACY"; "thumbstick_legacy"; "@MENU_LEGACY_SOUTHPAW"; "thumbstick_legacysouthpaw"}, execNow "bindgpsticksconfigs";, ;, ON_GPAD_DISABLED, ON_GPAD_ENABLED) - PC_OPTIONS_STRLIST_RAW(3, "@MENU_BUTTON_LAYOUT", "gpad_buttonConfig", {"@MENU_DEFAULT"; "buttons_default"; "@MENU_TACTICAL"; "buttons_tactical"; "@MENU_LEFTY"; "buttons_lefty"; "@MENU_NOMAD"; "buttons_nomad"}, execNow "bindgpbuttonsconfigs";, ;, ON_GPAD_DISABLED, ON_GPAD_ENABLED) + PC_OPTIONS_STRLIST_RAW(2, "@MENU_THUMBSTICK_LAYOUT", "gpad_sticksConfig", + {"@MENU_DEFAULT"; "thumbstick_default"; + "@MENU_SOUTHPAW"; "thumbstick_southpaw"; + "@MENU_LEGACY"; "thumbstick_legacy"; + "@MENU_LEGACY_SOUTHPAW"; "thumbstick_legacysouthpaw"}, execNow "bindgpsticksconfigs";, ;, ON_GPAD_DISABLED, ON_GPAD_ENABLED) + PC_OPTIONS_STRLIST_RAW(3, "@MENU_BUTTON_LAYOUT", "gpad_buttonConfig", + {"@MENU_DEFAULT"; "buttons_default"; + "@MENU_TACTICAL"; "buttons_tactical"; + "@MENU_LEFTY"; "buttons_lefty"; + "@MENU_NOMAD"; "buttons_nomad"; + "@MENU_DEFAULT_ALT"; "buttons_default_alt"; + "@MENU_TACTICAL_ALT"; "buttons_tactical_alt"; + "@MENU_LEFTY_ALT"; "buttons_lefty_alt"; + "@MENU_NOMAD_ALT"; "buttons_nomad_alt"}, execNow "bindgpbuttonsconfigs";, ;, ON_GPAD_DISABLED, ON_GPAD_ENABLED) PC_OPTIONS_DVARYESNO_RAW(4, "@MENU_SLOWDOWN_ENABLED", "gpad_slowdown_enabled", ;, "@MPUI_DESC_SLOWDOWN_ENABLED", ON_GPAD_DISABLED, ON_GPAD_ENABLED) PC_OPTIONS_DVARYESNO_RAW(5, "@MENU_LOCKON_ENABLED", "gpad_lockon_enabled", ;, "@MPUI_DESC_LOCKON_ENABLED", ON_GPAD_DISABLED, ON_GPAD_ENABLED) PC_OPTIONS_SEPERATOR(5)