cod5-sdk/raw/ui/game_summary.menu
2008-11-20 00:00:00 +00:00

380 lines
No EOL
23 KiB
Text

//======================================
// End of Game Summary & Unlocks
// EOG
//======================================
#include "ui/menudef.h"
#include "ui_mp/common_macro.inc"
#include "ui_mp/menustyle.inc"
#include "ui/choices_setup_common.menu"
{
// ANIMATION SPEEDS
#define POPUP_MOVE_SPEED 400 //milliseconds
#define PROGRESS_BAR_SPEED 1000 //milliseconds
#define ANIMATE_DISTANCE 400 //units
// top bar position/size
#define WIDTH_TOPBAR 540
#define HEIGHT_TOPBAR 34
#define ORIGIN_TOPBAR_X 0 //(-(WIDTH_TOPBAR/2))
#define ORIGIN_TOPBAR_Y 0 //80
#define ORIGIN_TOPBAR ORIGIN_TOPBAR_X ORIGIN_TOPBAR_Y
#define RECT_TOPBAR ORIGIN_TOPBAR WIDTH_TOPBAR HEIGHT_TOPBAR
#define RECT_TOPBAR_ALIGNED RECT_TOPBAR HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP
// main frame position/size
#define WIDTH_MAINFRAME WIDTH_TOPBAR
#define HEIGHT_MAINFRAME 300
#define ORIGIN_MAINFRAME_X ORIGIN_TOPBAR_X
#define ORIGIN_MAINFRAME_Y (ORIGIN_TOPBAR_Y+HEIGHT_TOPBAR+6)
#define ORIGIN_MAINFRAME ORIGIN_MAINFRAME_X ORIGIN_MAINFRAME_Y
#define RECT_MAINFRAME ORIGIN_MAINFRAME WIDTH_MAINFRAME HEIGHT_MAINFRAME
#define RECT_MAINFRAME_ALIGNED RECT_MAINFRAME HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP
// Rank frame position/size
#define ORIGIN_RANK_FRAME_X 256
#define ORIGIN_RANK_FRAME_Y (ORIGIN_TOPBAR_Y+HEIGHT_TOPBAR+6)
#define ORIGIN_RANK_FRAME ORIGIN_RANK_FRAME_X ORIGIN_RANK_FRAME_Y
#define WIDTH_RANK_FRAME WIDTH_TOPBAR - ORIGIN_RANK_FRAME_X
#define HEIGHT_RANK_FRAME 300
#define RECT_RANK_FRAME ORIGIN_RANK_FRAME WIDTH_RANK_FRAME HEIGHT_RANK_FRAME
#define RECT_RANK_FRAME_ALIGNED RECT_RANK_FRAME HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP
//Next Rank position/size
#define WIDTH_NEXT_RANK_FRAME (WIDTH_RANK_FRAME-148)
#define HEIGHT_NEXT_RANK_FRAME (HEIGHT_RANK_FRAME-179)
#define ORIGIN_NEXT_RANK_FRAME_X (ORIGIN_RANK_FRAME_X+WIDTH_NEXT_RANK_FRAME)
#define ORIGIN_NEXT_RANK_FRAME_Y ORIGIN_RANK_FRAME_Y
#define ORIGIN_NEXT_RANK_FRAME ORIGIN_NEXT_RANK_FRAME_X ORIGIN_RANK_FRAME_Y
// summary content positioning
#define ORIGIN_XP_SLOT1 14 162
#define ORIGIN_XP_SLOT2 14 178//186
#define ORIGIN_XP_SLOT3 14 194//210
#define ORIGIN_XP_SLOT4 14 (210+5)//238
// Nemesis content positioning
#define ORIGIN_NEMISIS_SLOT1 14 256//9 238
#define ORIGIN_NEMISIS_SLOT2 14 281
#define ORIGIN_NEMISIS_SLOT3 14 297
//#define ORIGIN_NEMISIS_SLOT4 14 238
// player content positioning
#define ORIGIN_PLAYER_SLOT1 14 (34+10)
#define ORIGIN_PLAYER_SLOT2 14 (48+10)
#define ORIGIN_PLAYER_SLOT3 14 (64+10)
#define ORIGIN_PLAYER_SLOT4 14 (80+10)
#define ORIGIN_PLAYER_SLOT5 14 (98+10)
#define ORIGIN_PLAYER_SLOT6 14 (116+10)
#define ORIGIN_PLAYER_SLOT7 14 (145+10)
#define ORIGIN_PLAYER_SLOT8 14 (175+10)
#define ORIGIN_PLAYER_SLOT9 14 (205+10)
// colors/border
#define EOG_BASE_COLOR 0.25 0.25 0.27 1
#define EOG_BG_COLOR 0.1 0.1 0.12 0.85
#define EOG_SHINE_COLOR 0.9 0.9 0.9 0.45
#define EOG_BORDER_SIZE 1
#define EOG_BORDER_COLOR 0.35 0.35 0.37 1
#define EOG_BORDER WINDOW_BORDER_RAISED
#define EOG_TEXT_COLOR 0.7 0.7 0.72 1
#define EOG_TEXT_COLOR_LOSE 1.0 0.0 0.0 1
#define EOG_TEXT_COLOR_WIN 0.0 1.0 0.0 1
#define EOG_TITLE_COLOR COLOR_TITLE
#define EOG_INNER_COLOR 0 0 0 0.3
#define TITLE_BG_COLOR_OFF 1 1 1 0.075
#define TITLE_BG_COLOR_ON 1 0.8 0.4 0.6 //0.95 0.80 0.3 0.6
#define ZERO_TO_ONE milliseconds()-dvarInt(ui_time_marker)
#define UNIT_GROWTH sin( sin( min( ZERO_TO_ONE, POPUP_MOVE_SPEED )*(1.5707/POPUP_MOVE_SPEED) )*1.5707 )
#define FRAME_ANIMATE( offset ) \
offset-offset*UNIT_GROWTH
#define PC_NEXT_BUTTON( prect1, prect2, visArg )\
FRAMING_VIS( prect1, visArg )\
FRAMING_VIS( prect2, !(visArg) )\
PREPROC_TEXT_DRAW( prect1, 0 0, exp text("@MENU_GOTO_NEXT"), TEXTSIZE_DEFAULT, 0, 1, ITEM_ALIGN_MIDDLE_CENTER, 1 1 1 0.15 textfont UI_FONT_OBJECTIVE visible when( visArg ); )\
PREPROC_TEXT_DRAW( prect2, 0 -2, exp text("@MENU_GOTO_NEXT"), TEXTSIZE_DEFAULT, 0, 1, ITEM_ALIGN_MIDDLE_CENTER, 1 1 1 0.15 textfont UI_FONT_OBJECTIVE visible when( !(visArg) ); )\
PREPROC_TEXT_DRAW( prect1, 0 0, exp text("@MENU_GOTO_NEXT"), TEXTSIZE_DEFAULT, 0, 1, ITEM_ALIGN_MIDDLE_CENTER, COLOR_TITLE textfont UI_FONT_OBJECTIVE visible when( visArg ); name highlighted_next )\
PREPROC_TEXT_DRAW( prect2, 0 -2, exp text("@MENU_GOTO_NEXT"), TEXTSIZE_DEFAULT, 0, 1, ITEM_ALIGN_MIDDLE_CENTER, COLOR_TITLE textfont UI_FONT_OBJECTIVE visible when( !(visArg) ); name highlighted_next )\
itemDef { \
type ITEM_TYPE_BUTTON \
rect prect1 0 0\
text ""\
textfont UI_FONT_NORMAL \
textAlign ITEM_ALIGN_MIDDLE_CENTER \
visible when( visArg );\
onfocus { show highlighted_next; }\
leavefocus { hide highlighted_next; }\
mouseEnter { play "mouse_over"; }\
action { play "mouse_click"; close self; } }\
itemDef { \
type ITEM_TYPE_BUTTON \
rect prect2 0 0\
text ""\
textfont UI_FONT_NORMAL \
textAlign ITEM_ALIGN_MIDDLE_CENTER \
visible when( !(visArg) );\
onfocus { show highlighted_next; }\
leavefocus { hide highlighted_next; }\
mouseEnter { play "mouse_over"; }\
action { play "mouse_click"; close self; }\
}
menuDef
{
name "popup_summary"
rect (-(WIDTH_TOPBAR/2)) HEIGHT_TOPBAR WIDTH_TOPBAR (HEIGHT_TOPBAR+HEIGHT_MAINFRAME) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP
focusColor COLOR_FOCUSED
style WINDOW_STYLE_FILLED
onOpen
{
open "popup_summary_body"; // open child popup page
play "mp_ingame_summary";
exec "setdvartotime ui_time_marker"; // animation start marker
}
onESC
{
close self;
}
onClose
{ ; }
// Fullscreen darkened backdrop
PREPROC_SHADER_DRAW( -800 -800 2000 2000, 0 0, "white", 0 0 0 0.6, 0, 0, 0 0 0 0 )
// ==================== TOP BAR ===================
// Top bar frame
#define FRAMING( prect ) \
FRAMING_VIS( prect, 1 )
#define FRAMING_VIS( prect, visArg ) \
PREPROC_SHADER_DRAW( prect, 0 0, "white", EOG_BASE_COLOR, EOG_BORDER, EOG_BORDER_SIZE, 0 0 0 0 visible when(visArg) )\
PREPROC_SHADER_DRAW( prect, 0 0, "white", EOG_BG_COLOR, EOG_BORDER, EOG_BORDER_SIZE, EOG_BORDER_COLOR visible when(visArg) )\
PREPROC_SHADER_DRAW( prect, 0 0, "line_horizontal", EOG_SHINE_COLOR, EOG_BORDER, EOG_BORDER_SIZE, 0 0 0 0 visible when(visArg) )
#define FRAMING_NEW( px, py, pw, ph ) \
FRAMING_NEW_VIS( px, py, pw, ph, 1 )
#define FRAMING_NEW_VIS( px, py, pw, ph, visArg ) \
PREPROC_GRADIENT_DRAW_ALIGNED_VIS( px, py, pw, ph, 0, 0, 0 0, "menu_white_line_faded", 0.1 0.1 0.1 0.9, visArg )
//PREPROC_SHADER_DRAW( prect, 0 0, "white", EOG_BASE_COLOR, EOG_BORDER, EOG_BORDER_SIZE, 0 0 0 0 visible when(visArg) )\
//PREPROC_SHADER_DRAW( prect, 0 0, "white", EOG_BG_COLOR, EOG_BORDER, EOG_BORDER_SIZE, EOG_BORDER_COLOR visible when(visArg) )\
//PREPROC_SHADER_DRAW( prect, 0 0, "line_horizontal", EOG_SHINE_COLOR, EOG_BORDER, EOG_BORDER_SIZE, 0 0 0 0 visible when(visArg) )
FRAMING( RECT_TOPBAR )
// Top bar perforations
PREPROC_GRADIENT_DRAW_ALIGNED_VIS( ORIGIN_TOPBAR_X, ORIGIN_TOPBAR_Y, WIDTH_TOPBAR, HEIGHT_TOPBAR, 0, 0, 0 0, "menu_white_line_faded", 0.1 0.1 0.1 0.9, 1 )
//FRAMING_NEW( ORIGIN_TOPBAR_X, ORIGIN_TOPBAR_Y, WIDTH_TOPBAR, HEIGHT_TOPBAR )
// Top bar title
PREPROC_TEXT_DRAW( RECT_TOPBAR, 0 0, exp text("@MPUI_GAME_SUMMARY"), TEXTSIZE_DEFAULT, 0, 1, ITEM_ALIGN_MIDDLE_CENTER, EOG_TITLE_COLOR visible when( dvarString(ui_lobbypopup_text) != "promotion" ); )
PREPROC_TEXT_DRAW( RECT_TOPBAR, 0 0, exp text("@RANK_PROMOTED"), TEXTSIZE_DEFAULT, 0, 1, ITEM_ALIGN_MIDDLE_CENTER, EOG_TITLE_COLOR visible when( dvarString(ui_lobbypopup_text) == "promotion" ); )
}
#ifdef PC
#define PREPROC_CANCEL_OVERLAY \
itemDef { \
type ITEM_TYPE_BUTTON \
rect -300 -400 3000 3000 0 0 \
text "" \
textfont UI_FONT_NORMAL \
visible 1 \
action{ close self; } \
}\
itemDef { \
type ITEM_TYPE_BUTTON \
rect 0 0 WIDTH_TOPBAR (HEIGHT_TOPBAR+HEIGHT_MAINFRAME+HEIGHT_TOPBAR) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP \
text "" \
textfont UI_FONT_NORMAL \
visible 1 \
action{ ; } \
}
#endif
menuDef
{
name "popup_summary_body"
exp rect X (-(WIDTH_TOPBAR/2))
#ifdef PC
exp rect Y (HEIGHT_TOPBAR+FRAME_ANIMATE(ANIMATE_DISTANCE))
#else
exp rect Y (HEIGHT_TOPBAR)
#endif
rect 0 0 WIDTH_TOPBAR (HEIGHT_TOPBAR+HEIGHT_MAINFRAME+HEIGHT_TOPBAR) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP
focusColor COLOR_FOCUSED
style WINDOW_STYLE_FILLED
onOpen { ; }
execkeyint BUTTON_A { close self; }
onESC
{
close self;
}
onClose
{
close "popup_summary";
}
#ifdef PC
PREPROC_CANCEL_OVERLAY
popup
#endif
// ==================== SUMMARY FRAME ====================
// Summary frame
FRAMING( RECT_MAINFRAME )
//FRAMING_NEW( ORIGIN_MAINFRAME_X, ORIGIN_MAINFRAME_Y, WIDTH_MAINFRAME, HEIGHT_MAINFRAME )
FRAMING( ORIGIN_TOPBAR_X (ORIGIN_TOPBAR_X+HEIGHT_TOPBAR) WIDTH_TOPBAR 6 )
PREPROC_GRADIENT_DRAW_ALIGNED_VIS( ORIGIN_TOPBAR_X, (ORIGIN_TOPBAR_X+HEIGHT_TOPBAR), WIDTH_TOPBAR, 6, 0, 0, 0 0, "menu_white_line_faded", 0.1 0.1 0.1 0.9, 1 )
//FRAMING_NEW( ORIGIN_TOPBAR_X, (ORIGIN_TOPBAR_X+HEIGHT_TOPBAR), WIDTH_TOPBAR, 6 )
PREPROC_SHADER_DRAW( ORIGIN_TOPBAR_X (ORIGIN_TOPBAR_X+HEIGHT_TOPBAR) WIDTH_TOPBAR 6, 0 0, "white", 1 1 1 0.15, EOG_BORDER, EOG_BORDER_SIZE, 0 0 0 0 )
#define ALIGNED_IN_X (ORIGIN_RANK_FRAME_X+WIDTH_NEXT_RANK_FRAME-78)
#define ALIGNED_IN_Y 8
#define ALIGNED_IN_X_NEXT (ORIGIN_RANK_FRAME_X+WIDTH_NEXT_RANK_FRAME+78)
#define ALIGNED_IN_X_XP 12
#define ALIGNED_IN_Y_XP 180
#define ALIGNED_IN_X_KILLSTREAK 14
#define ALIGNED_IN_Y_KILLSTREAK (108+10)
#define ALIGNED_IN_X_PLAYER_STATS (WIDTH_RANK_FRAME-60)
#define BAR_FIXED 253*((stat(2301)-int(tablelookup( "mp/ranktable.csv", 0, string(stat(252)), 2)))/int(tablelookup("mp/ranktable.csv",0,stat(252),3)))
#define ANIMATE_BAR min( BAR_FIXED, BAR_FIXED*((milliseconds()-dvarInt(ui_time_marker))/PROGRESS_BAR_SPEED) )
#define REQUIRED_XP int(stat(2301)-int(tablelookup( "mp/ranktable.csv", 0, string(stat(252)), 2)))
#define ANIMATE_NUM int(min( REQUIRED_XP, REQUIRED_XP*((milliseconds()-dvarInt(ui_time_marker))/PROGRESS_BAR_SPEED) ))
#define REQUIRED_XP_STRING string(int(tablelookup( "mp/ranktable.csv", 0, string(stat(252)), 3 ))-ANIMATE_NUM) //locString( "@MPUI_X_SLASH_Y", ANIMATE_NUM, int(tablelookup( "mp/ranktable.csv", 0, string(stat(252)), 3 )) )
PREPROC_SHADER_DRAW( ORIGIN_RANK_FRAME WIDTH_NEXT_RANK_FRAME HEIGHT_NEXT_RANK_FRAME, 6 7, "white", EOG_INNER_COLOR, WINDOW_BORDER_SUNKEN, 1, EOG_BORDER_COLOR )
PREPROC_SHADER_DRAW( ORIGIN_NEXT_RANK_FRAME WIDTH_NEXT_RANK_FRAME HEIGHT_NEXT_RANK_FRAME, 6 7, "white", EOG_INNER_COLOR, WINDOW_BORDER_SUNKEN, 1, EOG_BORDER_COLOR )
// rank
PREPROC_TEXT_DRAW( ORIGIN_MAINFRAME 0 0, (ALIGNED_IN_X-45) (ALIGNED_IN_Y+20), text "@MPUI_RANK_PRE", TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR )
PREPROC_SHADER_DRAW( ORIGIN_MAINFRAME 56 56, (ALIGNED_IN_X-10) (ALIGNED_IN_Y+23), tablelookup( "mp/rankIconTable.csv", 0, stat(252), stat(2326)+1 ), 1 1 1 1, 0, 2, 0.6 0.55 0.45 1 )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, (ALIGNED_IN_X-45) (ALIGNED_IN_Y+100), exp text( "@"+tablelookup( "mp/ranktable.csv", 0, stat(252), 5 ) ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, (ALIGNED_IN_X-45) (ALIGNED_IN_Y+115), exp text(locString( "@MPUI_LEVEL_N", int(tablelookup("mp/ranktable.csv",0,stat(252),14)))), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR )
// next rank
/* rank icon */
PREPROC_SHADER_DRAW( ORIGIN_MAINFRAME 56 56, (ALIGNED_IN_X_NEXT-30) (ALIGNED_IN_Y+23), tablelookup( "mp/rankIconTable.csv", 0, stat(252)+1, stat(2326)+1 ), 1 1 1 1, 0, 2, 0.6 0.55 0.45 1 visible when( CAN_RANK_UP && PRESTIGE_NEXT==0 ); )
PREPROC_SHADER_DRAW( ORIGIN_MAINFRAME 56 56, (ALIGNED_IN_X_NEXT-30) (ALIGNED_IN_Y+23), tablelookup( "mp/rankIconTable.csv", 0, 0, stat(2326)+2 ), 1 1 1 1, 0, 2, 0.6 0.55 0.45 1 visible when( CAN_RANK_UP && PRESTIGE_NEXT ); )
/* rank label */
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, (ALIGNED_IN_X_NEXT-60) (ALIGNED_IN_Y+20), exp text( "@MPUI_NEXT_RANK_PRE" ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR )
/* rank level */
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, (ALIGNED_IN_X_NEXT-60) (ALIGNED_IN_Y+115), exp text( locString( "@MPUI_LEVEL_N", int(tablelookup("mp/ranktable.csv",0,stat(252)+1,14)))), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( stat(252) < MAX_RANK ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, (ALIGNED_IN_X_NEXT-60) (ALIGNED_IN_Y+115), exp text( locString( "@MPUI_LEVEL_N", 1 )), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( CAN_RANK_UP && PRESTIGE_NEXT ) )
/* rank name */
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, (ALIGNED_IN_X_NEXT-60) (ALIGNED_IN_Y+100), exp text( "@"+tablelookup( "mp/ranktable.csv", 0, string(stat(252)+1), 5 ) ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( CAN_RANK_UP && PRESTIGE_NEXT==0 ); )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, (ALIGNED_IN_X_NEXT-60) (ALIGNED_IN_Y+100), exp text( "@MPUI_PRESTIGE" ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( CAN_RANK_UP && PRESTIGE_NEXT ); )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, (ALIGNED_IN_X_NEXT-60) (ALIGNED_IN_Y+100), exp text( "@MPUI_NONE" ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( CAN_RANK_UP==0 ); )
// xp bar meter markers
//PREPROC_SHADER_DRAW( ORIGIN_RANK_FRAME 1 8 , (ALIGNED_IN_X_XP+46) (ALIGNED_IN_Y_XP+86), "line_vertical", 0.5 1.5 0.6 0.8, 0, 0, EOG_BORDER_COLOR visible when( ( stat(252) < MAX_RANK ) && ( !dvarBool( xblive_privatematch ) ) ); )
//PREPROC_SHADER_DRAW( ORIGIN_RANK_FRAME 1 16 , (ALIGNED_IN_X_XP+92) (ALIGNED_IN_Y_XP+82), "line_vertical", 0.5 1.5 0.6 0.75, 0, 0, EOG_BORDER_COLOR visible when( ( stat(252) < MAX_RANK ) && ( !dvarBool( xblive_privatematch ) ) ); )
//PREPROC_SHADER_DRAW( ORIGIN_RANK_FRAME 1 8 , (ALIGNED_IN_X_XP+136) (ALIGNED_IN_Y_XP+86), "line_vertical", 0.5 1.5 0.6 0.8, 0, 0, EOG_BORDER_COLOR visible when( ( stat(252) < MAX_RANK ) && ( !dvarBool( xblive_privatematch ) ) ); )
// xp gained
//PREPROC_SHADER_DRAW( ORIGIN_RANK_FRAME (WIDTH_RANK_FRAME-14) 28, 8 206, "white", 1 1 1 0.075, 0, 0, 0 0 0 0 )
PREPROC_SHADER_DRAW( ORIGIN_RANK_FRAME (WIDTH_RANK_FRAME-12) (HEIGHT_RANK_FRAME-136), 6 130, "white", EOG_INNER_COLOR, WINDOW_BORDER_SUNKEN, 1, EOG_BORDER_COLOR )
PREPROC_TEXT_DRAW_EXP( ORIGIN_RANK_FRAME 0 0, ORIGIN_XP_SLOT1, exp text( "@MPUI_SCORE_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, COLOR_TITLE )
PREPROC_TEXT_DRAW_EXP( ORIGIN_RANK_FRAME 0 0, ORIGIN_XP_SLOT2, exp text( "@MPUI_CHALLENGES_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR )
PREPROC_TEXT_DRAW_EXP( ORIGIN_RANK_FRAME 0 0, ORIGIN_XP_SLOT4, exp text( "@MPUI_TOTALXP_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, COLOR_INFO_YELLOW )
PREPROC_TEXT_DRAW_EXP( ORIGIN_RANK_FRAME 0 0, ORIGIN_XP_SLOT1, exp text( dvarString( pss ) ), TEXTSIZE_SMALL, ((WIDTH_RANK_FRAME)-30), -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( ( dvarString( pss ) != "" ) ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_RANK_FRAME 0 0, ORIGIN_XP_SLOT2, exp text( dvarString( psc ) + " XP" ), TEXTSIZE_SMALL, ((WIDTH_RANK_FRAME)-30), -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( ( dvarString( psc ) != "" ) ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_RANK_FRAME 0 0, ORIGIN_XP_SLOT4, exp text( dvarString( psx ) ), TEXTSIZE_SMALL, ((WIDTH_RANK_FRAME)-30), -10, ITEM_ALIGN_RIGHT, COLOR_INFO_YELLOW )
//Player stats
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT1, exp text( dvarString( "psn" ) ), TEXTSIZE_SMALL, 0, -15, ITEM_ALIGN_LEFT, COLOR_TITLE )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT2, exp text( "@MPUI_KILLS_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT2, exp text( dvarInt( psk ) + dvarInt( psh ) ), TEXTSIZE_SMALL, ALIGNED_IN_X_PLAYER_STATS, -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR )
//Stats with Assists
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT3, exp text( "@MPUI_ASSISTS_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) != zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT3, exp text( dvarString( psa ) ), TEXTSIZE_SMALL, ALIGNED_IN_X_PLAYER_STATS, -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) != zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT4, exp text( "@MPUI_HEADSHOTS_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) != zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT4, exp text( dvarString( psh ) ), TEXTSIZE_SMALL, ALIGNED_IN_X_PLAYER_STATS, -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) != zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT5, exp text( "@MPUI_DOWNS_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) != zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT5, exp text( dvarString( psd ) ), TEXTSIZE_SMALL, ALIGNED_IN_X_PLAYER_STATS, -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) != zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT6, exp text( "@MPUI_REVIVES_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) != zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT6, exp text( dvarString( psr ) ), TEXTSIZE_SMALL, ALIGNED_IN_X_PLAYER_STATS, -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) != zom ) )
//Stats without Assists for Zombie mode
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT3, exp text( "@MPUI_HEADSHOTS_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) == zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT3, exp text( dvarString( psh ) ), TEXTSIZE_SMALL, ALIGNED_IN_X_PLAYER_STATS, -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) == zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT4, exp text( "@MPUI_DOWNS_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) == zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT4, exp text( dvarString( psd ) ), TEXTSIZE_SMALL, ALIGNED_IN_X_PLAYER_STATS, -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) == zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT5, exp text( "@MPUI_REVIVES_PRE" ), TEXTSIZE_SMALL, 0, -10, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) == zom ) )
PREPROC_TEXT_DRAW_EXP( ORIGIN_MAINFRAME 0 0, ORIGIN_PLAYER_SLOT5, exp text( dvarString( psr ) ), TEXTSIZE_SMALL, ALIGNED_IN_X_PLAYER_STATS, -10, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( dvarString( ui_gametype ) == zom ) )
/* xp required*/
PREPROC_TEXT_DRAW_EXP( ORIGIN_RANK_FRAME 0 0, (ALIGNED_IN_X_XP+258) (ALIGNED_IN_Y_XP+78), exp text( REQUIRED_XP_STRING ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_RIGHT, EOG_TEXT_COLOR visible when( ( CAN_RANK_UP ) ); )
PREPROC_TEXT_DRAW_EXP( ORIGIN_RANK_FRAME 0 0, ALIGNED_IN_X_XP (ALIGNED_IN_Y_XP+78), exp text( "@MPUI_XP_NEEDED" ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, EOG_TEXT_COLOR visible when( ( CAN_RANK_UP ) ); )
PREPROC_SHADER_DRAW( ORIGIN_RANK_FRAME 255 14 , (ALIGNED_IN_X_XP) (ALIGNED_IN_Y_XP+82), "white", 0.2 0.2 0.2 0.8, WINDOW_BORDER_SUNKEN, 1, EOG_BORDER_COLOR visible when( ( CAN_RANK_UP ) ); )
/* xp filling bar*/
PREPROC_SHADER_DRAW_ADV( (ORIGIN_RANK_FRAME_X+ALIGNED_IN_X_XP+2), (ORIGIN_RANK_FRAME_Y+ALIGNED_IN_Y_XP+84), ANIMATE_BAR, 12, "white", 1 0.9 0.5 0.6, 0, 1, 1 1 1 1 visible when( ( CAN_RANK_UP ) ); )
#ifdef PC
// @param: prect1, prect2, visArg :: visArg->prect1||prect2
PC_NEXT_BUTTON( ORIGIN_TOPBAR_X (ORIGIN_TOPBAR_Y+HEIGHT_TOPBAR+6+HEIGHT_MAINFRAME) WIDTH_TOPBAR HEIGHT_TOPBAR, 0 0 0 0, 1 )
#endif
}
#define VIS_WEAPON dvarInt(player_unlockweapons)!=0
#define VIS_PERKS dvarInt(player_unlockperks)!=0
menuDef
{
name "popup_unlock"
rect (-(WIDTH_TOPBAR/2)) 68 WIDTH_TOPBAR (HEIGHT_TOPBAR+HEIGHT_MAINFRAME) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP
focusColor COLOR_FOCUSED
style WINDOW_STYLE_FILLED
onOpen
{
play "mp_ingame_summary";
exec "setdvartotime ui_time_marker"; // animation start marker
#ifdef CONSOLE
execnow "set ui_keep_unlock_open 0";
#else // #ifdef CONSOLE
setdvar ui_keep_unlock_open "0";
#endif // #else // #ifdef CONSOLE
uiScript openMenuOnDvar player_unlock_page "1" popup_unlock_page1; // unlock page 1 only
uiScript openMenuOnDvar player_unlock_page "2" popup_unlock_page2; // unlock page 2 only
uiScript openMenuOnDvar player_unlock_page "3" popup_unlock_page1; // both pages visible
#ifdef PC
hide highlighted_next;
#endif
uiScript closeMenuOnDvar ui_keep_unlock_open "0" popup_unlock;
}
onESC { close self; }
execkeyint BUTTON_A { close self; }
onClose
{
open popup_summary; // when last child page closes this parent topbar, we continue to game summary menu
}
// Fullscreen darkened backdrop
PREPROC_SHADER_DRAW( -800 -800 2000 2000, 0 0, "white", 0 0 0 0.6, 0, 0, 0 0 0 0 )
// ==================== TOP BAR ===================
FRAMING( RECT_TOPBAR )
PREPROC_GRADIENT_DRAW_ALIGNED_VIS( ORIGIN_TOPBAR_X, ORIGIN_TOPBAR_Y, WIDTH_TOPBAR, HEIGHT_TOPBAR, 0, 0, 0 0, "menu_white_line_faded", 0.1 0.1 0.1 0.9, 1 )
//FRAMING_NEW( ORIGIN_TOPBAR_X, ORIGIN_TOPBAR_Y, WIDTH_TOPBAR, HEIGHT_TOPBAR )
// Top bar perforations
//PREPROC_PERFORATION( (ORIGIN_TOPBAR_X+2), (ORIGIN_TOPBAR_Y+2), 64, 16, 0, 0, 0, 0 )
//PREPROC_PERFORATION( (ORIGIN_TOPBAR_X+2), (ORIGIN_TOPBAR_Y+2), 64, 16, 0, 16, 0, 0 )
//PREPROC_PERFORATION( (ORIGIN_TOPBAR_X+WIDTH_TOPBAR-64), (ORIGIN_TOPBAR_Y+2), -64, 16, 0, 0, 0, 0 )
//PREPROC_PERFORATION( (ORIGIN_TOPBAR_X+WIDTH_TOPBAR-64), (ORIGIN_TOPBAR_Y+2), -64, 16, 0, 16, 0, 0 )
// Top bar title
PREPROC_TEXT_DRAW( RECT_TOPBAR, 0 0, exp text("@MPUI_UNLOCKED"), TEXTSIZE_DEFAULT, 0, 1, ITEM_ALIGN_MIDDLE_CENTER, EOG_TITLE_COLOR )
}
}