311 lines
11 KiB
Text
311 lines
11 KiB
Text
#include "ui/menudef.h"
|
|
#include "ui_mp/common_macro.inc"
|
|
|
|
#define CHOICE_SIZE_X 150
|
|
#define CHOICE_SIZE_Y 22
|
|
|
|
#define CHOICE_X_START 0
|
|
#define CHOICE_Y_START 65//45//34
|
|
|
|
//#define CHOICE_GROUP "xboxlive_privatematch"
|
|
|
|
#define CHOICE_SEP_1 3
|
|
|
|
#include "ui_mp/menustyle.inc"
|
|
#include "ui/choices_setup_common.menu"
|
|
#include "ui_mp/stats_info.inc"
|
|
|
|
#define PLAYERLIST_WIDTH 270
|
|
#define ORIGIN_STATUS (- (PLAYERLIST_WIDTH - RIGHTITEM_OFFSET)) 0
|
|
|
|
#define ORIGIN_DESCRIPTION (CHOICE_X_START + 15) 180
|
|
#define STATUS_START_X (CHOICE_X_START + 12)
|
|
#define STATUS_START_Y 230//215
|
|
#define COLOR_DESC_TEXT 1 1 1 0.7
|
|
|
|
#define MENU_FONT_SIZE TEXTSIZE_DEFAULT
|
|
#define HIGHLIGHT_SIZE 142 22
|
|
#define MENU_FONT_COLOR 1 1 1 0.5
|
|
#define MENU_FONT_COLOR2 1 1 1 0.5
|
|
#define MENU_LOCKED_COLOR 0.25 0.25 0.25 1
|
|
|
|
#define ORIGIN_BUTTON_BACK 52 438
|
|
#define ORIGIN_BUTTON_INVITE 390 86
|
|
|
|
#undef NEW_X_OFFSET
|
|
#define NEW_X_OFFSET (-CHOICE_SIZE_Y)
|
|
|
|
#define PREPROC_HIGHLIGHT( pname, porigin ) \
|
|
itemDef { \
|
|
name pname \
|
|
style WINDOW_STYLE_SHADER \
|
|
rect porigin HIGHLIGHT_SIZE 0 0 \
|
|
background HIGHLIGHT_SHADER \
|
|
forecolor HIGHLIGHT_COLOR \
|
|
border HIGHLIGHT_BORDER \
|
|
bordersize 1 \
|
|
bordercolor HIGHLIGHT_BORDER_COLOR \
|
|
visible 1 \
|
|
decoration \
|
|
}
|
|
|
|
#define PREPROC_A_BUTTON( pname, porigin ) \
|
|
itemDef { \
|
|
name pname \
|
|
text "@XBOXLIVE_SELECTBUTTON" \
|
|
textfont UI_FONT_NORMAL \
|
|
textscale A_BUTTON_SIZE \
|
|
origin porigin \
|
|
forecolor A_BUTTON_COLOR \
|
|
visible 1 \
|
|
decoration \
|
|
}
|
|
|
|
#define INDEX_TIME_PLAYED_OTHER 2313
|
|
#define STATTODVAR_TIME_PLAYED_OTHER execNow "statGetInDvar 2313 ui_stat_time_played_other"
|
|
#define INDEX_TIME_PLAYED_OPFOR 2312
|
|
#define STATTODVAR_TIME_PLAYED_OPFOR execNow "statGetInDvar 2312 ui_stat_time_played_opfor"
|
|
#define INDEX_TIME_PLAYED_ALLIES 2311
|
|
#define STATTODVAR_TIME_PLAYED_ALLIES execNow "statGetInDvar 2311 ui_stat_time_played_allies"
|
|
#define INDEX_SUICIDES 2310
|
|
#define STATTODVAR_SUICIDES execNow "statGetInDvar 2310 ui_stat_suicides"
|
|
#define INDEX_TEAMKILLS 2309
|
|
#define STATTODVAR_TEAMKILLS execNow "statGetInDvar 2309 ui_stat_teamkills"
|
|
#define INDEX_HEADSHOTS 2308
|
|
#define STATTODVAR_HEADSHOTS execNow "statGetInDvar 2308 ui_stat_headshots"
|
|
#define INDEX_ASSISTS 2307
|
|
#define STATTODVAR_ASSISTS execNow "statGetInDvar 2307 ui_stat_assists"
|
|
#define INDEX_DEATH_STREAK 2306
|
|
#define STATTODVAR_DEATH_STREAK execNow "statGetInDvar 2306 ui_stat_death_streak"
|
|
#define INDEX_DEATHS 2305
|
|
#define STATTODVAR_DEATHS execNow "statGetInDvar 2305 ui_stat_deaths"
|
|
#define INDEX_KILL_STREAK 2304
|
|
#define STATTODVAR_KILL_STREAK execNow "statGetInDvar 2304 ui_stat_kill_streak"
|
|
#define INDEX_KILLS 2303
|
|
#define STATTODVAR_KILLS execNow "statGetInDvar 2303 ui_stat_kills"
|
|
#define INDEX_SCORE 2302
|
|
#define STATTODVAR_SCORE execNow "statGetInDvar 2302 ui_stat_score"
|
|
#define INDEX_RANKXP 2301
|
|
#define STATTODVAR_RANKXP execNow "statGetInDvar 2301 ui_stat_rankxp"
|
|
|
|
#define STAT_UPDATE \
|
|
STATTODVAR_TIME_PLAYED_OTHER; \
|
|
STATTODVAR_TIME_PLAYED_OPFOR; \
|
|
STATTODVAR_TIME_PLAYED_ALLIES; \
|
|
STATTODVAR_TEAMKILLS; \
|
|
STATTODVAR_HEADSHOTS; \
|
|
STATTODVAR_ASSISTS; \
|
|
STATTODVAR_DEATH_STREAK; \
|
|
STATTODVAR_DEATHS; \
|
|
STATTODVAR_KILL_STREAK; \
|
|
STATTODVAR_KILLS; \
|
|
STATTODVAR_SCORE; \
|
|
STATTODVAR_RANKXP;
|
|
|
|
{
|
|
menuDef{
|
|
name menu_xboxlive_barracks
|
|
rect 0 0 640 470 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN//480
|
|
focuscolor COLOR_FOCUSED
|
|
style WINDOW_STYLE_FILLED
|
|
border 0
|
|
soundloop "music_mainmenu"
|
|
onOpen { STAT_UPDATE; focusFirst; setdvar invite_visible "0"; }
|
|
onFocus { setdvar invite_visible "0"; }
|
|
onEsc { close self; exec "set ui_hint_text @NULL_EMPTY; set ui_show_arrow 0"; }
|
|
onClose { setdvar invite_visible "1"; }
|
|
|
|
// ------------------ statics ------------------------
|
|
#include "ui_mp/overlaybg.inc"
|
|
OVERLAY_BACKGROUND
|
|
|
|
CHOICE_OVERLAY_TITLE( "@MPUI_BARRACKS_CAP" )
|
|
// ------------------------ lobby status ----------------------------
|
|
//itemDef
|
|
//{
|
|
// type ITEM_TYPE_TEXT
|
|
// rect 0 0 0 0 RIGHTITEM_ALIGN VERTICAL_ALIGN_TOP
|
|
// origin ORIGIN_STATUS
|
|
// textaligny 12
|
|
// textalign ITEM_ALIGN_LEFT
|
|
// forecolor MENU_FONT_COLOR2
|
|
// textfont CHOICE_TEXTFONT
|
|
// textscale CHOICE_TEXTSIZE
|
|
// ownerdraw UI_PARTYSTATUS
|
|
// decoration
|
|
// visible when ( dvarint( party_timerVisible ) == 0 && !menuIsOpen( menu_xboxlive_privatelobby ) );
|
|
//}
|
|
//itemDef
|
|
//{
|
|
// type ITEM_TYPE_TEXT
|
|
// rect 0 10 0 0 RIGHTITEM_ALIGN VERTICAL_ALIGN_TOP
|
|
// origin ORIGIN_STATUS
|
|
// textaligny 12
|
|
// textalign ITEM_ALIGN_LEFT
|
|
// forecolor MENU_FONT_COLOR2
|
|
// text "@MENU_MATCH_BEGINNING_IN"
|
|
// textfont CHOICE_TEXTFONT
|
|
// textscale CHOICE_TEXTSIZE
|
|
// decoration
|
|
// visible when ( dvarint( party_timerVisible ) == 1 && !menuIsOpen( menu_xboxlive_privatelobby ) );
|
|
//}
|
|
//itemDef
|
|
//{
|
|
// type ITEM_TYPE_TEXT
|
|
// rect 140 10 0 0 RIGHTITEM_ALIGN VERTICAL_ALIGN_TOP
|
|
// origin ORIGIN_STATUS
|
|
// textaligny 12
|
|
// textalign ITEM_ALIGN_LEFT
|
|
// forecolor MENU_FONT_COLOR2
|
|
// dvar "party_timer"
|
|
// textfont CHOICE_TEXTFONT
|
|
// textscale CHOICE_TEXTSIZE
|
|
// decoration
|
|
// visible when ( dvarint( party_timerVisible ) == 1 && !menuIsOpen( menu_xboxlive_privatelobby ) );
|
|
//}
|
|
|
|
#include "ui_mp/navcontrols.inc"
|
|
PREPROC_SHADER_DRAW_ALIGNED_VIS( (STATUS_START_X) (STATUS_START_Y-12) 10 10 CHOICE_HORIZONTAL_ALIGN VERTICAL_ALIGN_TOP, 0 0, "ui_arrow_right", 1 1 1 0.4, 0, 1, 1 1 1 1, when( dvarBool( ui_show_arrow ) ) )
|
|
PREPROC_TEXT_DRAW_ALIGNED_EXP( (STATUS_START_X+13) (STATUS_START_Y) 210 36 CHOICE_HORIZONTAL_ALIGN VERTICAL_ALIGN_TOP, 0 0, dvarString( ui_hint_text ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, COLOR_BODY_TEXT )
|
|
|
|
//=========================================================
|
|
//===================== MENU SELECTION ====================
|
|
//=========================================================
|
|
|
|
#define CLEARUIHINT exec "set ui_hint_text @NULL_EMPTY; set ui_show_arrow 0";
|
|
|
|
#define SETUP_ACTION_LEADERBOARDS \
|
|
open menu_leaderboards;
|
|
|
|
#define SETUP_ACTION_CHALLENGES \
|
|
execnow "statset 263 1"; \
|
|
/*exec "uploadstats";*/ \
|
|
open menu_challenges
|
|
|
|
#define SETUP_ACTION_CLANTAG \
|
|
execnow "statset 261 1"; \
|
|
/*exec "uploadstats";*/ \
|
|
execnow "editclanname";
|
|
//exec "updategamerprofile";
|
|
|
|
#define SETUP_ACTION_PRESTIGEMODE \
|
|
open prestige_reset1
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 1, "@MPUI_LEADERBOARDS", SETUP_ACTION_LEADERBOARDS, ;, CLEARUIHINT, 1 )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 2, "@MPUI_CHALLENGES", SETUP_ACTION_CHALLENGES, ;, CLEARUIHINT, when( stat( 263 ) >= 1 ) )
|
|
CHOICE_BUTTON_FOCUS_VIS_NOHI( 2, "", ;, exec "set ui_hint_text @MPUI_DESC_CHALLENGES2; set ui_show_arrow 1", CLEARUIHINT, when( stat( 263 ) < 1 ) )
|
|
CHOICE_DBUTTON_VIS( 2, "@MPUI_CHALLENGES", when( stat( 263 ) < 1 ) )
|
|
CHOICE_NEWICON_VIS( 2, "specialty_new", when( ANY_NEW_CHALLENGES ) )
|
|
CHOICE_LOCKEDICON_VIS( 2, "specialty_locked", when( stat( 263 ) < 1 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 3, "@MPUI_CLAN_TAG", SETUP_ACTION_CLANTAG, ;, CLEARUIHINT, when( stat( 261 ) >= 1 ) )
|
|
CHOICE_BUTTON_FOCUS_VIS_NOHI( 3, "", ;, exec "set ui_hint_text @MPUI_DESC_CLANTAG2; set ui_show_arrow 1", CLEARUIHINT, when( stat( 261 ) < 1 ) )
|
|
CHOICE_DBUTTON_VIS( 3, "@MPUI_CLAN_TAG", when( stat( 261 ) < 1 ) )
|
|
CHOICE_NEWICON_VIS( 3, "specialty_new", when( stat( 261 ) > 1 ) )
|
|
CHOICE_LOCKEDICON_VIS( 3, "specialty_locked", when( stat( 261 ) < 1 ) )
|
|
|
|
CHOICE_BUTTON_FOCUS_VIS( 4, "@MPUI_PRESTIGE_MODE", SETUP_ACTION_PRESTIGEMODE, ;, exec "statset 267 1"; CLEARUIHINT, when( PRESTIGE_AVAIL ) )
|
|
CHOICE_BUTTON_FOCUS_VIS_NOHI( 4, "", ;, exec "set ui_hint_text @MPUI_DESC_PRESTIGE2; set ui_show_arrow 1", CLEARUIHINT, when( PRESTIGE_AVAIL==0 && PRESTIGE_FINISH==0 ) )
|
|
CHOICE_DBUTTON_VIS( 4, "@MPUI_PRESTIGE_MODE", when( PRESTIGE_AVAIL == 0 && PRESTIGE_FINISH == 0 ) )
|
|
CHOICE_NEWICON_VIS( 4, "specialty_new", when( PRESTIGE_AVAIL && stat( 267 )==0 ) )
|
|
CHOICE_LOCKEDICON_VIS( 4, "specialty_locked", when( PRESTIGE_AVAIL == 0 && PRESTIGE_FINISH == 0 ) )
|
|
|
|
#ifdef CONSOLE
|
|
CHOICE_BUTTON_FOCUS( 5, "@MPUI_WEBSTATS", open menu_show_webtoken, ;, CLEARUIHINT )
|
|
#endif //#ifdef CONSOLE
|
|
|
|
// player stat section
|
|
#include "ui_mp/player_info.inc"
|
|
|
|
#include "ui/popup_background.inc"
|
|
#include "ui/safearea.menu"
|
|
}
|
|
|
|
|
|
#include "ui_mp/popupstyle.inc"
|
|
#include "ui/choices_setup_popmenu.menu"
|
|
|
|
// -------------------- first prestige warning --------------------
|
|
#ifdef PC
|
|
#undef CHOICE_Y_START
|
|
#define CHOICE_Y_START 235
|
|
#else
|
|
#undef CHOICE_Y_START
|
|
#define CHOICE_Y_START 200
|
|
#endif //#ifdef PC
|
|
menuDef
|
|
{
|
|
CENTER_POPUP_SETUP_ONOPEN( prestige_reset1, 2, ;, setfocus cancel_button, 1 )
|
|
|
|
CHOICE_POPMENU_TITLE( "@MENU_PRESTIGE_RESET_TITLE1" )
|
|
CHOICE_POPMENU_SUBTITLE( "@MENU_PRESTIGE_RESET_WARNING1" )
|
|
|
|
CHOICE_BUTTON( 1, "@MENU_PRESTIGE_RESET_TITLE2", close prestige_reset1; open prestige_reset2 )
|
|
CHOICE_BUTTON_EX( 2, "@MENU_CANCEL", close prestige_reset1, name cancel_button )
|
|
}
|
|
|
|
// -------------------- second prestige warning --------------------
|
|
#ifdef PC
|
|
#undef CHOICE_Y_START
|
|
#define CHOICE_Y_START 270
|
|
#else
|
|
#undef CHOICE_Y_START
|
|
#define CHOICE_Y_START 235
|
|
#endif //#ifdef PC
|
|
menuDef
|
|
{
|
|
CENTER_POPUP_SETUP_ONOPEN( prestige_reset2, 2, ;, setfocus cancel_button, 1 )
|
|
|
|
CHOICE_POPMENU_TITLE( "@MENU_PRESTIGE_RESET_TITLE2" )
|
|
CHOICE_POPMENU_SUBTITLE( "@MENU_PRESTIGE_RESET_WARNING2" )
|
|
|
|
CHOICE_BUTTON( 1, "@MENU_CONTINUE", close prestige_reset2; open prestige_reset3 )
|
|
CHOICE_BUTTON_EX( 2, "@MENU_CANCEL", close prestige_reset2, name cancel_button )
|
|
}
|
|
|
|
// -------------------- third prestige warning --------------------
|
|
#define PRESTIGE_RESET \
|
|
exec "statGetInDvar 2326 prestige_level";/*current prestige level*/ \
|
|
exec "exec mp/prestige_reset.cfg"; \
|
|
exec "statAdd 2326 1"; \
|
|
play "enter_prestige"; \
|
|
execNow "updategamerprofile"; \
|
|
STATTODVAR_RANKXP
|
|
|
|
#ifdef PC
|
|
#undef CHOICE_Y_START
|
|
#define CHOICE_Y_START 235
|
|
#else
|
|
#undef CHOICE_Y_START
|
|
#define CHOICE_Y_START 200
|
|
#endif //#ifdef PC
|
|
menuDef
|
|
{
|
|
CENTER_POPUP_SETUP_ONOPEN( prestige_reset3, 2, ;, setfocus cancel_button, 1 )
|
|
|
|
CHOICE_POPMENU_TITLE( "@MENU_PRESTIGE_RESET_TITLE3" )
|
|
CHOICE_POPMENU_SUBTITLE( "@MENU_PRESTIGE_RESET_WARNING3" )
|
|
|
|
CHOICE_BUTTON( 1, "@MENU_PRESTIGE_ENTER", PRESTIGE_RESET; close prestige_reset3; )
|
|
CHOICE_BUTTON_EX( 2, "@MENU_CANCEL", close prestige_reset3;, name cancel_button )
|
|
}
|
|
}
|
|
// WEBSTATS
|
|
#define WEBSTATS_X 57
|
|
#define WEBSTATS_Y 130
|
|
#define WEBSTATS_ORIGIN WEBSTATS_X WEBSTATS_Y
|
|
menuDef
|
|
{
|
|
CENTER_POPUP_SETUP_HEIGHT( menu_show_webtoken, 4, close self, 1, 50 )
|
|
//CENTER_POPUP_SETUP( menu_show_webtoken, 4, close menu_show_webtoken;, 1 )
|
|
|
|
CHOICE_POPMENU_TITLE( "@MPUI_WEBSTATS" )
|
|
CHOICE_POPMENU_SUBTITLE_VIS( dvarString( stats_spacedwebtoken ), 1 exp rect Y(280) )
|
|
|
|
PREPROC_TEXT_DRAW_ALIGNED_EXP( 0 0 450 25 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN, WEBSTATS_ORIGIN, "@MPUI_WEBSTATS_DESC1", CHOICE_TEXTSIZE, 0, 0, ITEM_ALIGN_MIDDLE_LEFT, CHOICE_TEXTCOLOR )
|
|
PREPROC_TEXT_DRAW_ALIGNED_EXP( 20 55 400 25 CHOICE_HORIZONTAL_ALIGN CHOICE_VERTICAL_ALIGN, WEBSTATS_ORIGIN, "@MPUI_WEBSTATS_DESC2", CHOICE_TEXTSIZE, 0, 0, ITEM_ALIGN_MIDDLE_LEFT, CHOICE_TEXTCOLOR )
|
|
|
|
CHOICE_BUTTON( 5, "@MENU_OK", close self; )
|
|
}
|
|
}
|