cod4-sdk/raw/ui_mp/game_options.inc

205 lines
8.6 KiB
PHP
Raw Permalink Normal View History

2008-01-19 00:00:00 +00:00
#define CHOICE_SIZE_X 150//250
#define CHOICE_SIZE_Y 22
// safe area
#ifdef PC
#define CHOICE_X_START 48
#define CHOICE_Y_START 56
#else
#define CHOICE_X_START 48
#define CHOICE_Y_START 34
#endif
#define STYLE2_NOPOSITION
#include "ui_mp/menustyle.inc"
#undef CHOICE_TEXTSIZE
#define CHOICE_TEXTSIZE TEXTSIZE_SMALL
#define CHOICE_TEXTALIGN ITEM_ALIGN_MIDDLE_RIGHT //ITEM_ALIGN_MIDDLE_LEFT
#define CHOICE_TEXT_OFFSET_X (-(4+CHOICE_SIZE_Y)) //22
#define CHOICE_Y_COUNT 14
#define CHOICE_SIDENAV 1
#ifndef A_BUTTON_OFFSET_X
#define A_BUTTON_OFFSET_X (-4)//(CHOICE_SIZE_X-20)
#define CHOICE_X_SPACING 280
#undef CHOICE_HORIZONTAL_ALIGN
#define CHOICE_DVAR_OFFSET_X (CHOICE_SIZE_X+20)
#define CHOICE_DVAR_TEXTALIGN ITEM_ALIGN_MIDDLE_LEFT
#define CHOICE_DVAR_WIDTH_OFFSET 120
#include "ui/choices_setup_common.menu"
#define POPUP_ITEM_HEIGHT 15
#define POPUP_ITEM_OFFSET 150
#ifdef CHOICE1_POPUP
PREPROC_DVAR_POPUP2( 2, CHOICE1_TEXT, CHOICE1_NUMVALS, CHOICE1_DVAR, CHOICE1_STR1, CHOICE1_STR2, CHOICE1_STR3, CHOICE1_STR4, CHOICE1_STR5, CHOICE1_STR6, CHOICE1_VAL1, CHOICE1_VAL2, CHOICE1_VAL3, CHOICE1_VAL4, CHOICE1_VAL5, CHOICE1_VAL6, POPUP_ITEM_OFFSET )
#endif
#ifdef CHOICE2_POPUP
PREPROC_DVAR_POPUP2( 3, CHOICE2_TEXT, CHOICE2_NUMVALS, CHOICE2_DVAR, CHOICE2_STR1, CHOICE2_STR2, CHOICE2_STR3, CHOICE2_STR4, CHOICE2_STR5, CHOICE2_STR6, CHOICE2_VAL1, CHOICE2_VAL2, CHOICE2_VAL3, CHOICE2_VAL4, CHOICE2_VAL5, CHOICE2_VAL6, POPUP_ITEM_OFFSET )
#endif
#ifdef CHOICE3_POPUP
PREPROC_DVAR_POPUP2( 4, CHOICE3_TEXT, CHOICE3_NUMVALS, CHOICE3_DVAR, CHOICE3_STR1, CHOICE3_STR2, CHOICE3_STR3, CHOICE3_STR4, CHOICE3_STR5, CHOICE3_STR6, CHOICE3_VAL1, CHOICE3_VAL2, CHOICE3_VAL3, CHOICE3_VAL4, CHOICE3_VAL5, CHOICE3_VAL6, POPUP_ITEM_OFFSET )
#endif
#ifdef CHOICE4_POPUP
PREPROC_DVAR_POPUP2( 5, CHOICE4_TEXT, CHOICE4_NUMVALS, CHOICE4_DVAR, CHOICE4_STR1, CHOICE4_STR2, CHOICE4_STR3, CHOICE4_STR4, CHOICE4_STR5, CHOICE4_STR6, CHOICE4_VAL1, CHOICE4_VAL2, CHOICE4_VAL3, CHOICE4_VAL4, CHOICE4_VAL5, CHOICE4_VAL6, POPUP_ITEM_OFFSET )
#endif
#ifdef CHOICE5_POPUP
PREPROC_DVAR_POPUP2( 6, CHOICE5_TEXT, CHOICE5_NUMVALS, CHOICE5_DVAR, CHOICE5_STR1, CHOICE5_STR2, CHOICE5_STR3, CHOICE5_STR4, CHOICE5_STR5, CHOICE5_STR6, CHOICE5_VAL1, CHOICE5_VAL2, CHOICE5_VAL3, CHOICE5_VAL4, CHOICE5_VAL5, CHOICE5_VAL6, POPUP_ITEM_OFFSET )
#endif
#ifdef CHOICE6_POPUP
PREPROC_DVAR_POPUP2( 7, CHOICE6_TEXT, CHOICE6_NUMVALS, CHOICE6_DVAR, CHOICE6_STR1, CHOICE6_STR2, CHOICE6_STR3, CHOICE6_STR4, CHOICE6_STR5, CHOICE6_STR6, CHOICE6_VAL1, CHOICE6_VAL2, CHOICE6_VAL3, CHOICE6_VAL4, CHOICE6_VAL5, CHOICE6_VAL6, POPUP_ITEM_OFFSET )
#endif
#ifdef CHOICE7_POPUP
PREPROC_DVAR_POPUP2( 8, CHOICE7_TEXT, CHOICE7_NUMVALS, CHOICE7_DVAR, CHOICE7_STR1, CHOICE7_STR2, CHOICE7_STR3, CHOICE7_STR4, CHOICE7_STR5, CHOICE7_STR6, CHOICE7_VAL1, CHOICE7_VAL2, CHOICE7_VAL3, CHOICE7_VAL4, CHOICE7_VAL5, CHOICE7_VAL6, POPUP_ITEM_OFFSET )
#endif
#ifdef CHOICE8_POPUP
PREPROC_DVAR_POPUP2( 9, CHOICE8_TEXT, CHOICE8_NUMVALS, CHOICE8_DVAR, CHOICE8_STR1, CHOICE8_STR2, CHOICE8_STR3, CHOICE8_STR4, CHOICE8_STR5, CHOICE8_STR6, CHOICE8_VAL1, CHOICE8_VAL2, CHOICE8_VAL3, CHOICE8_VAL4, CHOICE8_VAL5, CHOICE8_VAL6, POPUP_ITEM_OFFSET )
#endif
menuDef {
name GAME_OPTIONS_MENU_NAME
fullscreen 1
rect 0 0 640 480
focuscolor COLOR_FOCUSED
style WINDOW_STYLE_FILLED
soundloop "music_mainmenu_mp"
border 0
onOpen { focusFirst; }
onEsc
{
close GAME_OPTIONS_MENU_NAME;
}
#include "ui/blurredbg.inc"
#ifdef PC
CHOICE_MENU_TITLE( "@MENU_GAME_TYPE_SETTINGS" )
#else
CHOICE_MENU_TITLE( "@MPUI_GAME_RULES_CAP" )
#endif
// -----------------------------------------
#ifdef PC
#define BACK_OPEN ;
#endif
#include "ui_mp/navcontrols.inc"
itemDef
{
name reset_to_default
text "@MENU_RESET_TO_DEFAULT"
type 1
style WINDOW_STYLE_FILLED
textstyle ITEM_TEXTSTYLE_SHADOWED
rect 140 -26 100 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_BOTTOM
textfont UI_FONT_NORMAL
textalign ITEM_ALIGN_LEFT
textscale TEXTSIZE_SMALL
textaligny 18
visible when( 1 );
mouseEnter { play "mouse_over"; }
action
{
play "mouse_click";
open reset_gamesettings
}
}
// -----------------------------------------
#undef TEXTSIZE_TITLE
#define TEXTSIZE_TITLE TEXTSIZE_DEFAULT
#define CHOICE_LEFTNAV( itemIndex, leftfocus ) \
name "sidenav_button_"itemIndex \
execkeyint DPAD_LEFT { setfocus "sidenav_button_"leftfocus; } \
execkeyint APAD_LEFT { setfocus "sidenav_button_"leftfocus; }
#define CHOICE_RIGHTNAV( itemIndex, rightfocus ) \
name "sidenav_button_"itemIndex \
execkeyint DPAD_RIGHT { setfocus "sidenav_button_"rightfocus; } \
execkeyint APAD_RIGHT { setfocus "sidenav_button_"rightfocus; }
#define RNAV1 CHOICE_RIGHTNAV( "1", "15" )
#define RNAV2 CHOICE_RIGHTNAV( "2", "16" )
#define RNAV3 CHOICE_RIGHTNAV( "3", "17" )
#define RNAV4 CHOICE_RIGHTNAV( "4", "18" )
#define RNAV5 CHOICE_RIGHTNAV( "5", "19" )
#define RNAV6 CHOICE_RIGHTNAV( "6", "20" )
#define RNAV7 CHOICE_RIGHTNAV( "7", "21" )
#define RNAV8 CHOICE_RIGHTNAV( "8", "22" )
#define RNAV9 CHOICE_RIGHTNAV( "9", "23" )
#define RNAV10 CHOICE_RIGHTNAV( "10", "24" )
#define RNAV11 CHOICE_RIGHTNAV( "11", "25" )
#define RNAV12 CHOICE_RIGHTNAV( "12", "26" )
#define RNAV13 CHOICE_RIGHTNAV( "13", "27" )
#define RNAV14 CHOICE_RIGHTNAV( "14", "28" )
#define LNAV15 CHOICE_LEFTNAV( "15", "1" )
#define LNAV16 CHOICE_LEFTNAV( "16", "2" )
#define LNAV17 CHOICE_LEFTNAV( "17", "3" )
#define LNAV18 CHOICE_LEFTNAV( "18", "4" )
#define LNAV19 CHOICE_LEFTNAV( "19", "5" )
#define LNAV20 CHOICE_LEFTNAV( "20", "6" )
#define LNAV21 CHOICE_LEFTNAV( "21", "7" )
#define LNAV22 CHOICE_LEFTNAV( "22", "8" )
#define LNAV23 CHOICE_LEFTNAV( "23", "9" )
#define LNAV24 CHOICE_LEFTNAV( "24", "10" )
#define LNAV25 CHOICE_LEFTNAV( "25", "11" )
#define LNAV26 CHOICE_LEFTNAV( "26", "12" )
#define LNAV27 CHOICE_LEFTNAV( "27", "13" )
#define LNAV28 CHOICE_LEFTNAV( "28", "14" )
// gametype options
// =====================================================================
CHOICE_SECTION_TITLE( 1, GAMETYPE_OPTIONS )
CHOICE_DVARFLOATLIST( 2, CHOICE1_TEXT, CHOICE1_DVAR RNAV2, CHOICE1_STRLIST, CHOICE1_EXEC )
#ifdef CHOICE2_SHOW
CHOICE_DVARFLOATLIST( 3, CHOICE2_TEXT, CHOICE2_DVAR RNAV3, CHOICE2_STRLIST, CHOICE2_EXEC )
#endif
#ifdef CHOICE3_SHOW
CHOICE_DVARFLOATLIST( 4, CHOICE3_TEXT, CHOICE3_DVAR RNAV4, CHOICE3_STRLIST, CHOICE3_EXEC )
#endif
#ifdef CHOICE4_SHOW
CHOICE_DVARFLOATLIST( 5, CHOICE4_TEXT, CHOICE4_DVAR RNAV5, CHOICE4_STRLIST, CHOICE4_EXEC )
#endif
#ifdef CHOICE5_SHOW
CHOICE_DVARFLOATLIST( 6, CHOICE5_TEXT, CHOICE5_DVAR RNAV6, CHOICE5_STRLIST, CHOICE5_EXEC )
#endif
#ifdef CHOICE6_SHOW
CHOICE_DVARFLOATLIST( 7, CHOICE6_TEXT, CHOICE6_DVAR RNAV7, CHOICE6_STRLIST, CHOICE6_EXEC )
#endif
#ifdef CHOICE7_SHOW
CHOICE_DVARFLOATLIST( 8, CHOICE7_TEXT, CHOICE7_DVAR RNAV8, CHOICE7_STRLIST, CHOICE7_EXEC )
#endif
// gameplay options
// =====================================================================
CHOICE_SECTION_TITLE( 15, "@MPUI_RULES_GAMEPLAY_OPTIONS" )
CHOICE_DVARFLOATLIST( 16, CHOICE_OLDSCHOOL_TEXT, CHOICE_OLDSCHOOL_DVAR LNAV16, CHOICE_OLDSCHOOL_STRLIST, CHOICE_OLDSCHOOL_EXEC )
CHOICE_DVARFLOATLIST( 17, CHOICE_HARDCORE_TEXT, CHOICE_HARDCORE_DVAR LNAV17, CHOICE_HARDCORE_STRLIST, CHOICE_HARDCORE_EXEC )
CHOICE_DVARFLOATLIST( 18, CHOICE_SPECTATE_TEXT, CHOICE_SPECTATE_DVAR LNAV18, CHOICE_SPECTATE_STRLIST, CHOICE_SPECTATE_EXEC )
CHOICE_DVARFLOATLIST( 19, CHOICE_KILLCAM_TEXT, CHOICE_KILLCAM_DVAR LNAV19, CHOICE_KILLCAM_STRLIST, CHOICE_KILLCAM_EXEC )
#ifdef TEAMBASED
CHOICE_DVARFLOATLIST( 20, CHOICE_FRIENDLYFIRE_TEXT, CHOICE_FRIENDLYFIRE_DVAR LNAV20, CHOICE_FRIENDLYFIRE_STRLIST, CHOICE_FRIENDLYFIRE_EXEC )
#endif
}
PREPROC_DVAR_POPUP2( 18, CHOICE_SPECTATE_TEXT, CHOICE_SPECTATE_NUMVALS, CHOICE_SPECTATE_DVAR, CHOICE_SPECTATE_STR1, CHOICE_SPECTATE_STR2, CHOICE_SPECTATE_STR3, CHOICE_SPECTATE_STR4, CHOICE_SPECTATE_STR5, CHOICE_SPECTATE_STR6, CHOICE_SPECTATE_VAL1, CHOICE_SPECTATE_VAL2, CHOICE_SPECTATE_VAL3, CHOICE_SPECTATE_VAL4, CHOICE_SPECTATE_VAL5, CHOICE_SPECTATE_VAL6, POPUP_ITEM_OFFSET )
#ifdef TEAMBASED
PREPROC_DVAR_POPUP2( 20, CHOICE_FRIENDLYFIRE_TEXT, CHOICE_FRIENDLYFIRE_NUMVALS, CHOICE_FRIENDLYFIRE_DVAR, CHOICE_FRIENDLYFIRE_STR1, CHOICE_FRIENDLYFIRE_STR2, CHOICE_FRIENDLYFIRE_STR3, CHOICE_FRIENDLYFIRE_STR4, CHOICE_FRIENDLYFIRE_STR5, CHOICE_FRIENDLYFIRE_STR6, CHOICE_FRIENDLYFIRE_VAL1, CHOICE_FRIENDLYFIRE_VAL2, CHOICE_FRIENDLYFIRE_VAL3, CHOICE_FRIENDLYFIRE_VAL4, CHOICE_FRIENDLYFIRE_VAL5, CHOICE_FRIENDLYFIRE_VAL6, POPUP_ITEM_OFFSET )
#endif