cod5-sdk/raw/ui_mp/leaderboard_wins.menu
2008-11-20 00:00:00 +00:00

127 lines
3.9 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 34
#define CHOICE_SEP_1 3
#include "ui_mp/menustyle.inc"
#include "ui/choices_setup_common.menu"
#include "ui_mp/overlaybg.inc"
{
menuDef
{
name menu_leaderboard_wins
rect 0 0 640 470
focusColor COLOR_FOCUSED
style WINDOW_STYLE_FILLED
soundloop "music_mainmenu"
onOpen
{
setdvar lb_type "wins";
uiScript RefreshLeaderboards;
execnow "nosplitscreen";
setfocus leaderboard;
}
onEsc { close self; }
// ------------------ statics ------------------------
OVERLAY_BACKGROUND_VIS( !menuisopen( "menu_leaderboards" ) )
CHOICE_OVERLAY_TITLE_VIS( "@MENU_WINS_GLOBAL_CAP", when( dvarString( lb_filter ) == none ) )
CHOICE_OVERLAY_TITLE_VIS( "@MENU_WINS_FRIENDS_CAP", when( dvarString( lb_filter ) == friends ) )
CHOICE_OVERLAY_TITLE_VIS( "@MENU_WINS_PLAYERS_CAP", when( dvarString( lb_filter ) == lobbymembers ) )
itemDef
{
name gamemode_title
type ITEM_TYPE_TEXT
rect 22 75 100 100 HORIZONTAL_ALIGN_LEFT VERTICAL_ALIGN_TOP
forecolor COLOR_TITLE//COLOR_FOCUSED
ownerdraw UI_LEADERBOARD_GAMEMODE
textfont CHOICE_TEXTFONT
textscale CHOICE_TEXTSIZE
textstyle CHOICE_TEXTSTYLE
textalign ITEM_ALIGN_TOP_LEFT
visible 1
decoration
}
#define BUTTON_Y_FILTER 1
#define BUTTON_X_GOTOTOP 1
#define BUTTON_PGUP 1
#define BUTTON_PGDOWN 1
#define BUTTON_LT 1
#define BUTTON_RT 1
#define BUTTON_LSDR 1
#define BUTTON_RSDR 1
#define ALT_PANEL 1
#define BUTTON_ACCEPT 1
#include "ui_mp/navcontrols.inc"
#include "ui/safearea.menu"
PREPROC_SHADER_DRAW_ALIGNED( -304 80 612 18 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_TOP, 0 0, "line_horizontal", 0.9 0.9 0.925 0.5, 0, 0, 0 0 0 0 )
LEADERBOARD_COL_TITLE_VIS( COLUMN_TITLE_X COLUMN_TITLE_Y, "@MENU_RANK", ITEM_ALIGN_RIGHT, 1 )
LEADERBOARD_COL_TITLE_VIS( (COLUMN_TITLE_X+42) COLUMN_TITLE_Y, "@MENU_LEVEL", ITEM_ALIGN_LEFT, 1 )
LEADERBOARD_COL_TITLE_VIS( (COLUMN_TITLE_X+88) COLUMN_TITLE_Y, "@XBOXLIVE_PLAYER", ITEM_ALIGN_LEFT, 1 )
LEADERBOARD_COL_TITLE_VIS( (COLUMN_TITLE_X+300) COLUMN_TITLE_Y, "@MENU_WINS", ITEM_ALIGN_RIGHT, 1 )
LEADERBOARD_COL_TITLE_VIS( (COLUMN_TITLE_X+362) COLUMN_TITLE_Y, "@MENU_LOSSES", ITEM_ALIGN_RIGHT, 1 )
LEADERBOARD_COL_TITLE_VIS( (COLUMN_TITLE_X+418) COLUMN_TITLE_Y, "@MENU_RATIO", ITEM_ALIGN_RIGHT, 1 )
LEADERBOARD_COL_TITLE_VIS( (COLUMN_TITLE_X+474) COLUMN_TITLE_Y, "@MENU_STREAK", ITEM_ALIGN_RIGHT, 1 )
// LEADERBOARD LIST TEXT
itemDef
{
name leaderboard
rect 66 (113+22) 534 272
type ITEM_TYPE_LISTBOX
elementwidth 120
elementheight 18
textfont UI_FONT_NORMAL
textscale TEXTSIZE_SMALL
textstyle ITEM_TEXTSTYLE_SHADOWED
elementtype LISTBOX_TEXT
feeder FEEDER_LEADERBOARD
forecolor CHOICE_TEXTCOLOR
focusColor CHOICE_TEXTCOLOR
disableColor CHOICE_TEXTCOLOR
selectBorder 0.8 0.95 1 0
outlinecolor 1 0.97 0.72 0.5//HIGHLIGHT_COLOR
highlightTexture "menu_button_backing_highlight"
backcolor 0 0 0 0.7//.1 .1 .1 .5
backgroundItemListbox "menu_white_line_faded"
// numcols xpos xwidth textlen alignment
columns 8 10 30 10 ITEM_ALIGN_LEFT
70 20 10 ITEM_ALIGN_RIGHT
95 20 10 ITEM_ALIGN_LEFT
122 35 55 ITEM_ALIGN_LEFT
270 64 10 ITEM_ALIGN_RIGHT
330 64 10 ITEM_ALIGN_RIGHT
388 64 10 ITEM_ALIGN_RIGHT
458 48 10 ITEM_ALIGN_RIGHT
visible 1
usePaging
onListboxSelectionChange
{
play "mouse_over";
}
doubleClick
{
play "mouse_click"
uiScript ViewGamerCard
}
execKeyInt BUTTON_X
{
feederTop
}
}
#include "ui/safearea.menu"
}
}