Add rawfile changes for controller support
parent
e6d42754d9
commit
403ef82a18
|
@ -0,0 +1,41 @@
|
|||
set gpad_buttonsConfig "buttons_default"
|
||||
|
||||
bind BUTTON_START togglemenu
|
||||
bind BUTTON_BACK +scores
|
||||
|
||||
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_RTRIG "+attack"
|
||||
bind BUTTON_LTRIG "+speed_throw"
|
||||
|
||||
bind BUTTON_RSHLDR "+frag"
|
||||
bind BUTTON_LSHLDR "+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"
|
|
@ -0,0 +1,41 @@
|
|||
set gpad_buttonsConfig "buttons_lefty"
|
||||
|
||||
bind BUTTON_START togglemenu
|
||||
bind BUTTON_BACK +scores
|
||||
|
||||
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_RTRIG "+speed_throw"
|
||||
bind BUTTON_LTRIG "+attack"
|
||||
|
||||
bind BUTTON_RSHLDR "+smoke"
|
||||
bind BUTTON_LSHLDR "+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"
|
|
@ -0,0 +1,41 @@
|
|||
set gpad_buttonsConfig "buttons_nomad"
|
||||
|
||||
bind BUTTON_START togglemenu
|
||||
bind BUTTON_BACK +scores
|
||||
|
||||
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_RTRIG "+attack"
|
||||
bind BUTTON_LTRIG "+toggleads_throw"
|
||||
|
||||
bind BUTTON_RSHLDR "+frag"
|
||||
bind BUTTON_LSHLDR "+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"
|
|
@ -0,0 +1,41 @@
|
|||
set gpad_buttonsConfig "buttons_tactical"
|
||||
|
||||
bind BUTTON_START togglemenu
|
||||
bind BUTTON_BACK +scores
|
||||
|
||||
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_RTRIG "+attack"
|
||||
bind BUTTON_LTRIG "+speed_throw"
|
||||
|
||||
bind BUTTON_RSHLDR "+frag"
|
||||
bind BUTTON_LSHLDR "+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"
|
|
@ -0,0 +1,52 @@
|
|||
//==========================================================================================
|
||||
// Associate real axis to virtual axis.
|
||||
// Real axis are : A_LSTICK_Y, A_LSTICK_X, A_RSTICK_X, A_RSTICK_Y, A_RTRIGGER, A_LTRIGGER
|
||||
// Virtual axis are : VA_SIDE, VA_FORWARD, VA_UP, VA_YAW, VA_PITCH, VA_ATTACK
|
||||
//==========================================================================================
|
||||
|
||||
set gpad_sticksConfig "thumbstick_default"
|
||||
set gpad_buttonsConfig "buttons_default"
|
||||
|
||||
bindaxis A_LSTICK_X VA_SIDE MAP_SQUARED
|
||||
bindaxis A_LSTICK_Y VA_FORWARD MAP_SQUARED
|
||||
|
||||
bindaxis A_RSTICK_X VA_YAW MAP_LINEAR
|
||||
bindaxis A_RSTICK_Y VA_PITCH MAP_LINEAR
|
||||
|
||||
|
||||
// Weapon Controls
|
||||
bind BUTTON_LSTICK "+breath_sprint"
|
||||
bind BUTTON_RTRIG "+attack"
|
||||
bind BUTTON_LTRIG "+speed_throw"
|
||||
bind BUTTON_RSTICK "+melee"
|
||||
|
||||
bind DPAD_UP "+actionslot 1" //Nightvision
|
||||
bind DPAD_DOWN "+actionslot 2" //
|
||||
bind DPAD_LEFT "+actionslot 3" //Grenade Launcher
|
||||
bind DPAD_RIGHT "+actionslot 4" //equipment (c4 + airsupport)
|
||||
|
||||
|
||||
// Weapon Slots
|
||||
bind BUTTON_Y "weapnext"
|
||||
|
||||
// Inventory
|
||||
bind BUTTON_RSHLDR "+frag"
|
||||
bind BUTTON_LSHLDR "+smoke"
|
||||
|
||||
// Interaction
|
||||
bind BUTTON_X "+usereload"
|
||||
bind BUTTON_BACK "+scores"
|
||||
|
||||
// Stance
|
||||
bind BUTTON_A "+gostand"
|
||||
bind BUTTON_B "+stance"
|
||||
|
||||
// Controller movement dvars
|
||||
//set sensitivity "5"
|
||||
|
||||
// Menus
|
||||
bind BUTTON_START "togglemenu"
|
||||
|
||||
// MULTIPLAYER CONTROLS
|
||||
//bind z "+talk"
|
||||
//bind x "openscriptmenu ingame changeweapon"
|
|
@ -62,4 +62,7 @@ bind y "chatmodeteam"
|
|||
//bind x "openscriptmenu ingame changeweapon"
|
||||
|
||||
// CLIENT ENVIRONMENT COMMANDS
|
||||
bind F12 "screenshotJPEG"
|
||||
bind F12 "screenshotJPEG"
|
||||
|
||||
// Default controller bindings
|
||||
exec default_mp_controller.cfg
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -985,4 +985,16 @@ LANG_ENGLISH "Juiced"
|
|||
REFERENCE SPLASHES_COMBATHIGH_DESC
|
||||
LANG_ENGLISH "Move faster for a few seconds after spawning."
|
||||
|
||||
REFERENCE MENU_GAMEPAD
|
||||
LANG_ENGLISH "Gamepad"
|
||||
|
||||
REFERENCE MENU_GAMEPAD_ENABLED
|
||||
LANG_ENGLISH "Gamepad enabled"
|
||||
|
||||
REFERENCE MPUI_DESC_GAMEPAD_ENABLED
|
||||
LANG_ENGLISH "Turn accepting inputs from gamepads on/off"
|
||||
|
||||
REFERENCE MPUI_DESC_LOOK_INVERSION
|
||||
LANG_ENGLISH "Inverts the gamepad pitch axis (up/down)"
|
||||
|
||||
ENDMARKER
|
|
@ -0,0 +1,10 @@
|
|||
//==========================================================================================
|
||||
// Associate real axis to virtual axis.
|
||||
// Real axis are : A_LSTICK_Y, A_LSTICK_X, A_RSTICK_X, A_RSTICK_Y, A_RTRIGGER, A_LTRIGGER
|
||||
// Virtual axis are : VA_SIDE, VA_FORWARD, VA_UP, VA_YAW, VA_PITCH, VA_ATTACK
|
||||
//==========================================================================================
|
||||
bindaxis A_LSTICK_X VA_SIDE MAP_SQUARED
|
||||
bindaxis A_LSTICK_Y VA_FORWARD MAP_SQUARED
|
||||
|
||||
bindaxis A_RSTICK_X VA_YAW MAP_LINEAR
|
||||
bindaxis A_RSTICK_Y VA_PITCH MAP_LINEAR
|
|
@ -0,0 +1,10 @@
|
|||
//==========================================================================================
|
||||
// Associate real axis to virtual axis.
|
||||
// Real axis are : A_LSTICK_Y, A_LSTICK_X, A_RSTICK_X, A_RSTICK_Y, A_RTRIGGER, A_LTRIGGER
|
||||
// Virtual axis are : VA_SIDE, VA_FORWARD, VA_UP, VA_YAW, VA_PITCH, VA_ATTACK
|
||||
//==========================================================================================
|
||||
bindaxis A_LSTICK_X VA_YAW MAP_LINEAR
|
||||
bindaxis A_LSTICK_Y VA_FORWARD MAP_SQUARED
|
||||
|
||||
bindaxis A_RSTICK_X VA_SIDE MAP_SQUARED
|
||||
bindaxis A_RSTICK_Y VA_PITCH MAP_LINEAR
|
|
@ -0,0 +1,10 @@
|
|||
//==========================================================================================
|
||||
// Associate real axis to virtual axis.
|
||||
// Real axis are : A_LSTICK_Y, A_LSTICK_X, A_RSTICK_X, A_RSTICK_Y, A_RTRIGGER, A_LTRIGGER
|
||||
// Virtual axis are : VA_SIDE, VA_FORWARD, VA_UP, VA_YAW, VA_PITCH, VA_ATTACK
|
||||
//==========================================================================================
|
||||
bindaxis A_RSTICK_X VA_YAW MAP_LINEAR
|
||||
bindaxis A_RSTICK_Y VA_FORWARD MAP_SQUARED
|
||||
|
||||
bindaxis A_LSTICK_X VA_SIDE MAP_SQUARED
|
||||
bindaxis A_LSTICK_Y VA_PITCH MAP_LINEAR
|
|
@ -0,0 +1,10 @@
|
|||
//==========================================================================================
|
||||
// Associate real axis to virtual axis.
|
||||
// Real axis are : A_LSTICK_Y, A_LSTICK_X, A_RSTICK_X, A_RSTICK_Y, A_RTRIGGER, A_LTRIGGER
|
||||
// Virtual axis are : VA_SIDE, VA_FORWARD, VA_UP, VA_YAW, VA_PITCH, VA_ATTACK
|
||||
//==========================================================================================
|
||||
bindaxis A_RSTICK_X VA_SIDE MAP_SQUARED
|
||||
bindaxis A_RSTICK_Y VA_FORWARD MAP_SQUARED
|
||||
|
||||
bindaxis A_LSTICK_X VA_YAW MAP_LINEAR
|
||||
bindaxis A_LSTICK_Y VA_PITCH MAP_LINEAR
|
|
@ -26,6 +26,7 @@
|
|||
close "pc_options_audio"; \
|
||||
close "pc_options_controls"; \
|
||||
close "pc_options_game"; \
|
||||
close "pc_options_gamepad"; \
|
||||
close "pc_options_look"; \
|
||||
close "pc_options_movement"; \
|
||||
close "pc_options_multi"; \
|
||||
|
@ -113,9 +114,10 @@ PC_OPTIONS_BUTTON(1, "buttonAudio", "@MENU_AUDIO", PC_OPTIONS_BUTTON_LEFT_ACTION
|
|||
PC_OPTIONS_BUTTON(2, "buttonControls", "@MENU_CONTROLS", PC_OPTIONS_BUTTON_LEFT_ACTION(open "pc_options_controls";))
|
||||
PC_OPTIONS_BUTTON(3, "buttonMulti", "@MENU_MULTIPLAYER", PC_OPTIONS_BUTTON_LEFT_ACTION(open "pc_options_multi";))
|
||||
PC_OPTIONS_BUTTON(4, "buttonGame", "@MENU_GAME", PC_OPTIONS_BUTTON_LEFT_ACTION(open "pc_options_game";))
|
||||
PC_OPTIONS_BUTTON(5, "buttonGamepad", "@MENU_GAMEPAD", PC_OPTIONS_BUTTON_LEFT_ACTION(open "pc_options_gamepad";))
|
||||
|
||||
MENU_CHOICE_HORIZONTAL_LINE(5)
|
||||
PC_OPTIONS_BUTTON_RAW(5, "buttonDefaults", "@MENU_RESET_SYSTEM_DEFAULTS", open "options_graphics_defaults";, "@NULL_EMPTY", when (dvarBool("cl_ingame") || dvarBool("sv_running") || inlobby()), 1)
|
||||
MENU_CHOICE_HORIZONTAL_LINE(6)
|
||||
PC_OPTIONS_BUTTON_RAW(6, "buttonDefaults", "@MENU_RESET_SYSTEM_DEFAULTS", open "options_graphics_defaults";, "@NULL_EMPTY", when (dvarBool("cl_ingame") || dvarBool("sv_running") || inlobby()), 1)
|
||||
|
||||
itemDef
|
||||
{
|
||||
|
|
|
@ -0,0 +1,100 @@
|
|||
#include "ui/menudef.h"
|
||||
#include "ui_mp/main.inc"
|
||||
#include "ui_mp/pc_options.inc"
|
||||
|
||||
#define MENU_NAME "pc_options_gamepad"
|
||||
#define MENU_TITLE "@MENU_GAMEPAD"
|
||||
|
||||
#undef CHOICE_GROUP
|
||||
#define CHOICE_GROUP MENU_NAME
|
||||
|
||||
#define CLOSE_MENUS \
|
||||
close "controls_multi"; \
|
||||
close "main_controls"; \
|
||||
close "main_options"; \
|
||||
close "options_control_defaults"; \
|
||||
close "options_graphics"; \
|
||||
close "options_graphics_defaults"; \
|
||||
close "options_graphics_texture"; \
|
||||
close "options_multi"; \
|
||||
close "options_voice"; \
|
||||
close "pc_options_actions"; \
|
||||
close "pc_options_advanced_video"; \
|
||||
close "pc_options_audio"; \
|
||||
close "pc_options_controls"; \
|
||||
close "pc_options_look"; \
|
||||
close "pc_options_movement"; \
|
||||
close "pc_options_multi"; \
|
||||
close "pc_options_video"; \
|
||||
close "pc_options_voice";
|
||||
|
||||
#define ON_MENU_OPEN \
|
||||
CLOSE_MENUS \
|
||||
exec "setfromdvar ui_name name"; \
|
||||
setLocalVarString ui_hint_text "@NULL_EMPTY"; \
|
||||
setLocalVarBool ui_hint_display 1; \
|
||||
execnow "profile_menuDvarsSetup; resetViewport"; \
|
||||
setFocus "buttonGamepad";
|
||||
|
||||
#define ON_MENU_ESC \
|
||||
close self; \
|
||||
if (!(menuisopen("pc_options_advanced_video") || menuisopen("pc_options_video") || menuisopen("pc_options_Audio") || menuisopen("pc_options_controls") || menuisopen("pc_options_voice") ) && localvarbool("ui_showPicApply") && !localvarbool("ui_showApply") && !localvarbool("ui_showAudioApply")) \
|
||||
{ \
|
||||
execnow "setfromdvar r_picmip ui_r_picmip"; \
|
||||
execnow "setfromdvar r_picmip_bump ui_r_picmip_bump"; \
|
||||
execnow "setfromdvar r_picmip_spec ui_r_picmip_spec"; \
|
||||
execnow "setfromdvar r_picmip_manual ui_r_picmip_manual"; \
|
||||
exec "wait; wait; r_applyPicmip"; \
|
||||
setLocalVarBool "ui_showPicApply" (0); \
|
||||
} \
|
||||
if (!(menuisopen("pc_options_advanced_video") || menuisopen("pc_options_video") || menuisopen("pc_options_Audio") || menuisopen("pc_options_controls") || menuisopen("pc_options_voice") ) && localvarbool("ui_showApply") || localvarbool("ui_showAudioApply")) \
|
||||
{ \
|
||||
open "all_restart_popmenu"; \
|
||||
} \
|
||||
execnow "profile_menuDvarsFinish; resetViewport"; \
|
||||
setLocalVarString ui_hint_text "@NULL_EMPTY";
|
||||
|
||||
#define ON_GPAD_ENABLED when(dvarBool("gpad_enabled") == 1)
|
||||
#define ON_GPAD_DISABLED when(dvarBool("gpad_enabled") == 0)
|
||||
|
||||
#define ON_GAMEPAD_ENABLED_TOGGLE \
|
||||
if (dvarbool("gpad_enabled") && dvarstring("gpad_sticksConfig") == "") \
|
||||
{ \
|
||||
setdvar gpad_sticksConfig "thumbstick_default"; \
|
||||
execnow "bindgpsticksconfigs"; \
|
||||
} \
|
||||
if (dvarbool("gpad_enabled") && dvarstring("gpad_buttonConfig") == "") \
|
||||
{ \
|
||||
setdvar gpad_buttonConfig "buttons_default"; \
|
||||
execnow "bindgpbuttonsconfigs"; \
|
||||
}
|
||||
|
||||
menuDef
|
||||
{
|
||||
name MENU_NAME
|
||||
rect 0 0 640 480
|
||||
foreColor CHOICE_TEXTCOLOR
|
||||
focusColor CHOICE_TEXTCOLOR
|
||||
blurWorld 7
|
||||
|
||||
MENU_ON_OPEN(ON_MENU_OPEN)
|
||||
MENU_ON_CLOSE(ON_MENU_CLOSE)
|
||||
MENU_ON_ESC(ON_MENU_ESC)
|
||||
|
||||
#define BACKGROUND_PC_OPTIONS
|
||||
#define BACKGROUND_IW4
|
||||
#define SIDEBAR_RIGHT
|
||||
#include "ui_mp/bg.inc"
|
||||
|
||||
#include "ui_mp/leftside_options.inc"
|
||||
|
||||
PC_OPTIONS_SECTION_TITLE(MENU_TITLE)
|
||||
|
||||
PC_OPTIONS_DVARYESNO_RAW(0, "@MENU_GAMEPAD_ENABLED", "gpad_enabled", ON_GAMEPAD_ENABLED_TOGGLE;, "@MPUI_DESC_GAMEPAD_ENABLED", when(0), 1)
|
||||
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_DVARSLIDER_RAW(4, "@MENU_LOOK_SENSITIVITY", "input_viewSensitivity", 0.5, 3, 1.0, ;, ;, ;, ON_GPAD_DISABLED, ON_GPAD_ENABLED, ON_GPAD_ENABLED)
|
||||
}
|
Binary file not shown.
Loading…
Reference in New Issue