#include "ui/menudef.h" #include "ui_mp/main.inc" #include "ui_mp/pc_options.inc" #define MENU_NAME "gpad_controls" #define MENU_TITLE "Controller" #undef CHOICE_GROUP #define CHOICE_GROUP MENU_NAME #define CLOSE_MENUS \ close "controller_options"; \ 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_game"; \ close "pc_options_look"; \ close "pc_options_multi"; \ close "pc_options_video"; \ close "pc_options_voice"; #define ON_MENU_OPEN \ CLOSE_MENUS \ setLocalVarBool "ui_hideBack" (1); \ setLocalVarBool ui_hint_display 0; #define ON_MENU_CLOSE \ setLocalVarBool "ui_hideBack" (0); \ open "pc_options_controls"; #define ON_MENU_ESC \ close self; 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 DISABLE_SIDEBAR #define BACKGROUND_FULL #include "ui_mp/bg.inc" PC_OPTIONS_SECTION_TITLE(MENU_TITLE) PC_OPTIONS_DVARYESNO_RAW(0, "Enable Controller", "gpad_enabled", ;, "Whether or not controller support is enabled", when(0), 1) PC_OPTIONS_FLOATLIST_RAW(1, "Sensitivity", "input_viewSensitivity", {"1 (Low)" 0.6 "2 (Medium)" 1.0 "3" 1.4 "4 (High)" 1.8 "5" 2.0 "6" 2.2 "7 (Very High)" 2.6 "8" 3.0 "9" 3.5 "10 (Insane)" 4.0}, ;, "Controller view sensitivity", when( !dvarBool( "gpad_enabled" ) ), 1) PC_OPTIONS_STRLIST_RAW(2, "Button Layout", "gpad_buttonsConfig", {"Default" gamepad_default "Default Flipped" gamepad_default_alt "Tactical" gamepad_tactical "Tactical Flipped" gamepad_tactical_alt "Lefty" gamepad_lefty "Lefty Flipped" gamepad_lefty_alt}, exec "bindgpbuttonsconfigs";, "Controller button layout", when( !dvarBool( "gpad_enabled" ) ), 1) PC_OPTIONS_STRLIST_RAW(3, "Stick Layout", "gpad_sticksConfig", {"Default" thumbstick_default "Legacy" thumbstick_legacy "Legacy Southpaw" thumbstick_legacysouthpaw "Southpaw" thumbstick_southpaw}, exec "bindgpsticksconfigs";, "Controller stick layout", when( !dvarBool( "gpad_enabled" ) ), 1) PC_OPTIONS_SEPERATOR(3) PC_OPTIONS_DVARYESNO_RAW(4, "Look Inversion", "input_invertPitch", ;, "Whether or not to invert pitch on the right stick", when( !dvarBool( "gpad_enabled" ) ), 1) PC_OPTIONS_DVARYESNO_RAW(5, "Use PS3 Icons", "ui_controllericons", ;, "Whether or not the button icons are PS3 or Xbox", when( !dvarBool( "gpad_enabled" ) ), 1) ITEM_BUTTON_BACK(ON_MENU_ESC) itemDef { name "controller_credits" rect 150 0 500 240 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_BOTTOM style WINDOW_STYLE_FILLED forecolor 0.65 0.65 0.65 1 type ITEM_TYPE_TEXT textAlign ITEM_ALIGN_CENTER textscale CHOICE_TEXTSIZE visible 1 text "Controller Support by ImJtagModz & Matrix" } ITEM_BUTTON_BACK(ON_MENU_ESC) }