Swap action controls menu bind fields to better suit gamepad controller whenever gamepad is in use (#19)

pull/3/head
Jan 2022-05-05 22:32:17 +02:00 committed by GitHub
parent c72b7af7bc
commit 886a1d6d52
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 3 deletions

View File

@ -40,6 +40,9 @@
#define ON_MENU_ESC \
close self;
#define ON_GPAD_USED when(dvarBool("gpad_in_use") == 1)
#define ON_GPAD_UNUSED when(dvarBool("gpad_in_use") == 0)
menuDef
{
name MENU_NAME
@ -65,10 +68,11 @@ menuDef
PC_OPTIONS_KEYBINDING(2, "@MENU_HOLD_AIM_DOWN_SIGHT", "+speed_throw")
PC_OPTIONS_KEYBINDING(3, "@MENU_LEAN_LEFT", "+leanleft")
PC_OPTIONS_KEYBINDING(4, "@MENU_LEAN_RIGHT", "+leanright")
PC_OPTIONS_KEYBINDING(5, "@MENU_RELOAD_WEAPON", "+reload")
PC_OPTIONS_KEYBINDING_RAW(5, "@MENU_USE_RELOAD", "+usereload", ON_GPAD_USED)
PC_OPTIONS_KEYBINDING_RAW(5, "@MENU_RELOAD_WEAPON", "+reload", ON_GPAD_UNUSED)
PC_OPTIONS_KEYBINDING(6, "@MENU_SWITCH_WEAPON", "weapnext")
PC_OPTIONS_KEYBINDING(7, "@MENU_MELEE_ATTACK", "+melee")
PC_OPTIONS_KEYBINDING(8, "@MENU_USE", "+activate")
PC_OPTIONS_KEYBINDING_RAW(8, "@MENU_USE", "+activate", ON_GPAD_UNUSED)
PC_OPTIONS_KEYBINDING(9, "@MENU_FRAG_EQUIPMENT", "+frag")
PC_OPTIONS_KEYBINDING(10, "@MENU_THROW_SPECIAL_GRENADE", "+smoke")
PC_OPTIONS_KEYBINDING(11, "@MENU_WEAPON_ATTACHMENT", "+actionslot 3")
@ -78,7 +82,8 @@ menuDef
PC_OPTIONS_SEPERATOR(14)
PC_OPTIONS_KEYBINDING(15, "@MENU_SHOW_OBJECTIVES_SCORES", "+scores")
PC_OPTIONS_KEYBINDING_RAW(15, "@MENU_SHOW_OBJECTIVES_SCORES", "togglescores", ON_GPAD_USED)
PC_OPTIONS_KEYBINDING_RAW(15, "@MENU_SHOW_OBJECTIVES_SCORES", "+scores", ON_GPAD_UNUSED)
PC_OPTIONS_KEYBINDSTATUS