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

311 lines
11 KiB
Text

#include "ui/menudef.h"
#include "ui_mp/common_macro.inc"
#define CHOICE_X_START 0
#define CHOICE_Y_START 34
#define CHOICE_SEP_OFFSET_Y -2
#define CHOICE_GROUP "xboxlive"
#define CHOICE_SEP_1 2
#include "ui_mp/menustyle.inc"
#include "ui/choices_setup_common.menu"
#include "ui_mp/stats_info.inc"
#define ORIGIN_DESCRIPTION (CHOICE_X_START + 15) 190
#define COLOR_DESC_TEXT 1 1 1 0.7
#define ORIGIN_BUTTON_BACK 52 438
#define ORIGIN_BUTTON_INVITE 390 86
#define ORIGIN_BUTTON_KICK 529 98
#define MENU_FONT_SIZE TEXTSIZE_DEFAULT
#define HIGHLIGHT_SIZE 142 22
#define MENU_FONT_COLOR 1 1 1 0.5
#define MENU_LOCKED_COLOR 0.25 0.25 0.25 1
#define PLAYERLIST_WIDTH 270
#define ORIGIN_PLAYERLIST (- (PLAYERLIST_WIDTH - RIGHTITEM_OFFSET)) 38
//------------------popup----------------
#define ORIGIN_POPUPTITLE 320 160
#define PAD_LEFT \
execKeyInt DPAD_LEFT { \
focusFirst; \
show selection_left; \
hide selection_right; \
} \
execKeyInt APAD_LEFT { \
focusFirst; \
show selection_left; \
hide selection_right; \
}
#define PAD_RIGHT \
execKeyInt DPAD_RIGHT { \
setFocus partyList; \
execNow "set ui_hint_text @MPUI_DESC_PLAYER_OPTIONS" \
} \
execKeyInt APAD_RIGHT { \
setFocus partyList; \
execNow "set ui_hint_text @MPUI_DESC_PLAYER_OPTIONS" \
}
{
menuDef {
name menu_systemlink_party
fullscreen 1
rect 0 0 640 480
focuscolor COLOR_FOCUSED
style WINDOW_STYLE_FILLED
soundloop "music_mainmenu"
onOpen {
// show game summary
uiScript openMenuOnDvar "ui_lobbypopup" promotion "popup_unlock";
uiScript openMenuOnDvar "ui_lobbypopup" summary "popup_unlock";
exec "set ui_lobbypopup_text summary";
execondvarstringvalue ui_lobbypopup promotion "set ui_lobbypopup_text promotion";
exec "set ui_lobbypopup none";
execnow "AcceptInputFromActiveControl";
/*
// resetting customclass names
statGetInDvarUsingTable( 200, ui_reset_customclass );
exec "statset 200 0"; // clears reset
execondvarintvalue ui_reset_customclass 1 "setFromLocString customclass1 @CLASS_SLOT1;setFromLocString customclass2 @CLASS_SLOT2;setFromLocString customclass3 @CLASS_SLOT3;setFromLocString customclass4 @CLASS_SLOT4;setFromLocString customclass5 @CLASS_SLOT5; updategamerprofile";
*/
show dpad_left;
show selection_left;
hide dpad_right;
hide selection_right;
hide view_gamerprofile;
focusFirst;
}
onEsc {
close popup_gettingdata;
close popup_findgame;
}
PAD_RIGHT
#define LOCAL_ACCEPT_LEAVE \
play "mouse_click"; \
exec "systemlink 0"; \
exec "xstopprivateparty"; \
exec "xstopparty"; \
exec "splitscreencontrols"; \
close menu_systemlink_party;
itemDef
{
text ""
textfont UI_FONT_NORMAL
textscale TEXTSIZE_DEFAULT
origin 0 0
visible when ( inprivateparty() && !aloneinparty() );
decoration
execKeyInt BUTTON_B
{
LOCAL_ACCEPT_LEAVE
}
}
itemDef
{
text ""
textfont UI_FONT_NORMAL
textscale TEXTSIZE_DEFAULT
origin 0 0
visible when ( ( !inprivateparty() || ( privatepartyhost() && aloneinparty() ) ) && !menuisopen(menu_xboxlive_party) );
decoration
execKeyInt BUTTON_B
{
LOCAL_ACCEPT_LEAVE
}
}
// ------------------ statics ------------------------
#include "ui/blurredbg.inc"
CHOICE_MENU_TITLE( "@PLATFORM_SYSTEM_LINK" )
// --------------------- party info and host name -----------------------
itemDef {
type ITEM_TYPE_TEXT
rect 0 -4 PLAYERLIST_WIDTH 0 RIGHTITEM_ALIGN VERTICAL_ALIGN_TOP
origin ORIGIN_PLAYERLIST
forecolor CHOICE_TEXTCOLOR
dvar "party_partyPlayerCount"
textfont UI_FONT_DEFAULT
textscale TEXTSIZE_SMALL
textaligny -6
textalign ITEM_ALIGN_RIGHT
visible 1
decoration
}
// ----------------- BEGIN Message of the day ------------------------
// size version 1: 248 126
#define INFO_TEXT dvarString( "motd" )
#define INFO_TITLE "@MPUI_MOTD"
#include "ui_mp/info_box.inc"
// ----------------- END Message of the day --------------------------
#include "ui/navcontrols.inc"
//=========================================================
//===================== MENU SELECTION ====================
//=========================================================
#define SETUP_EXTRA_FIRST \
execKeyInt DPAD_UP { \
setfocus last_in_list; } \
execKeyInt APAD_UP { \
setfocus last_in_list; }
#define SETUP_EXTRA_LAST \
name last_in_list \
execkeyint DPAD_DOWN{ \
focusFirst; \
} \
execkeyint APAD_DOWN{ \
focusFirst; \
}
#define CLEARUIHINT exec "set ui_hint_text @NULL_EMPTY"
#define SETUP_ACTION_FINDGAME \
exec "xblive_privatematch 1"; \
/*exec "xstartpartyhost";*/ \
open "menu_systemlink"; \
close self;
#define SETUP_ACTION_FINDGAME_PCLAN \
exec "xblive_privatematch 1"; \
/*exec "xstartpartyhost";*/ \
open "pc_join_unranked"; \
close self;
#define SETUP_ACTION_PRIVATEMATCH \
exec "exec "SYSTEMLINK_MP_CFG; \
exec "xblive_rankedmatch 0"; \
exec "ui_enumeratesaved"; \
exec "party_timerVisible 0"; \
exec "xblive_privatematch 1"; \
exec "xstartpartyhost"; \
open menu_systemlink_lobby; \
close self;
/* #ifdef XENON
CHOICE_BUTTON_FOCUS_VIS_EX_ADV( 1, "@MPUI_FIND_MATCH", SETUP_ACTION_FINDGAME, exec "set ui_hint_text @MPUI_DESC_FIND_GAME", CLEARUIHINT, when(!inprivateparty() || privatepartyhost()), SETUP_EXTRA_FIRST, !inprivateparty() || privatepartyhost() )
CHOICE_DBUTTON_VIS( 1, "@MPUI_FIND_MATCH", when(inprivateparty() && !privatepartyhost()) )
#else
CHOICE_BUTTON_FOCUS_VIS_EX_ADV( 1, "@MPUI_FIND_GAME", SETUP_ACTION_FINDGAME, exec "set ui_hint_text @MPUI_DESC_FIND_GAME", CLEARUIHINT, when(!inprivateparty() || privatepartyhost()), SETUP_EXTRA_FIRST, !inprivateparty() || privatepartyhost() )
CHOICE_DBUTTON_VIS( 1, "@MPUI_FIND_GAME", when(inprivateparty() && !privatepartyhost()) )
#endif
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( 1, "", ;, exec "set ui_hint_text @MPUI_DESC_FIND_GAME_LOCKED", CLEARUIHINT, when(inprivateparty() && !privatepartyhost()), SETUP_EXTRA_FIRST )
CHOICE_BUTTON_FOCUS_VIS_ADV( 2, "@MENU_CREATE_GAME", SETUP_ACTION_PRIVATEMATCH, exec "set ui_hint_text @MPUI_DESC_PRIVATE_MATCH", CLEARUIHINT, when(!inprivateparty() || privatepartyhost()), !inprivateparty() || privatepartyhost() )
CHOICE_BUTTON_FOCUS_VIS_NOHI( 2, "", ;, exec "set ui_hint_text @MPUI_DESC_PRIVATE_MATCH_LOCKED", CLEARUIHINT, when(inprivateparty() && !privatepartyhost()) )
CHOICE_DBUTTON_VIS( 2, "@MENU_CREATE_GAME", when(inprivateparty() && !privatepartyhost()) )
*/
// CHOICE_SEPARATOR( CHOICE_SEP_1 )
// CHOICE_BUTTON_FOCUS_VIS_ADV( 3, "@MPUI_CREATE_A_CLASS", SETUP_ACTION_CREATEACLASS, exec "set ui_hint_text @MPUI_DESC_CREATE_A_CLASS", CLEARUIHINT, when( stat( 260 ) >= 1 ), stat( 260 ) >= 1 )
// CHOICE_BUTTON_FOCUS_VIS_NOHI( 3, "", ;, exec "set ui_hint_text @MPUI_DESC_CREATE_A_CLASS_LOCKED", CLEARUIHINT, when( stat( 260 ) < 1 ) )
// CHOICE_DBUTTON_VIS( 3, "@MPUI_CREATE_A_CLASS", when( stat( 260 ) < 1 ) )
// CHOICE_NEWICON_VIS( 3, "specialty_new", when( ANY_NEW_CAC ) )
// CHOICE_BUTTON_FOCUS_VIS( 4, "@MPUI_BARRACKS", SETUP_ACTION_BARRACKS, exec "set ui_hint_text @MPUI_DESC_BARRACKS", CLEARUIHINT, when(1) )
// CHOICE_NEWICON_VIS( 4, "specialty_new", when( stat( 263 ) > 1 || stat( 261 ) > 1 || ( PRESTIGE_AVAIL && stat( 267 )==0 ) ); )
// CHOICE_BUTTON_FOCUS_VIS_EX( 5, "@MPUI_PARTY_INVITE", SETUP_ACTION_INVITE, exec "set ui_hint_text @MPUI_DESC_PARTY_INVITE", CLEARUIHINT, when(1), SETUP_EXTRA_LAST )
// ---------------------- player list -------------------------
// player list UI elements
#define PLAYERLIST_SCOREVIS 0
#define PLAYERLIST_SELECTED_ACTIONS \
doubleClick { \
open player_popup; \
} \
PAD_LEFT
#define PARTY_THEME 1
#define SHOW_PRIVATE_PARTY_HOST 1
#include "ui/playerlist.inc"
#include "ui/safearea.menu"
#include "ui/popup_background.inc"
}
#include "ui_mp/popupstyle.inc"
#include "ui/choices_setup_popmenu.menu"
// ---------- system link popup to choose create or find game ----------
menuDef
{
CENTER_POPUP_SETUP( menu_systemlink_popmenu, 2, SETUP_ACTION_SYSTEMLINK_LOBBY, 1 )
onEsc{setdvar systemlink 0; CLEARUIHINT; close self}
CHOICE_POPMENU_TITLE( "@PLATFORM_SYSTEM_LINK" )
#ifdef PC
CHOICE_BUTTON_FOCUS_VIS_EX_ADV( 1, "@MPUI_FIND_MATCH", SETUP_ACTION_FINDGAME_PCLAN, exec "set ui_hint_text @MPUI_DESC_FIND_GAME", CLEARUIHINT, when(!inprivateparty() || privatepartyhost()), SETUP_EXTRA_FIRST, !inprivateparty() || privatepartyhost() )
CHOICE_DBUTTON_VIS( 1, "@MPUI_FIND_MATCH", when(inprivateparty() && !privatepartyhost()) )
#else // #ifdef PC
#ifdef XENON
CHOICE_BUTTON_FOCUS_VIS_EX_ADV( 1, "@MENU_JOIN_GAME", SETUP_ACTION_FINDGAME, exec "set ui_hint_text @MPUI_DESC_FIND_GAME", CLEARUIHINT, when(!inprivateparty() || privatepartyhost()), SETUP_EXTRA_FIRST, !inprivateparty() || privatepartyhost() )
CHOICE_DBUTTON_VIS( 1, "@MENU_JOIN_GAME", when(inprivateparty() && !privatepartyhost()) )
#else
CHOICE_BUTTON_FOCUS_VIS_EX_ADV( 1, "@MENU_JOIN_GAME", SETUP_ACTION_FINDGAME, exec "set ui_hint_text @MPUI_DESC_FIND_GAME", CLEARUIHINT, when(!inprivateparty() || privatepartyhost()), SETUP_EXTRA_FIRST, !inprivateparty() || privatepartyhost() )
CHOICE_DBUTTON_VIS( 1, "@MENU_JOIN_GAME", when(inprivateparty() && !privatepartyhost()) )
#endif
#endif // #else // #ifdef PC
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( 1, "", ;, exec "set ui_hint_text @MPUI_DESC_FIND_GAME_LOCKED", CLEARUIHINT, when(inprivateparty() && !privatepartyhost()), SETUP_EXTRA_FIRST )
CHOICE_BUTTON_FOCUS_VIS_EX_ADV( 2, "@MENU_CREATE_GAME", SETUP_ACTION_PRIVATEMATCH, exec "set ui_hint_text @MPUI_DESC_CUSTOM_MATCH", CLEARUIHINT, when(!inprivateparty() || privatepartyhost()), SETUP_EXTRA_LAST, !inprivateparty() || privatepartyhost() )
CHOICE_BUTTON_FOCUS_VIS_NOHI_EX( 2, "", ;, exec "set ui_hint_text @MPUI_DESC_CUSTOM_MATCH_LOCKED", CLEARUIHINT, when(inprivateparty() && !privatepartyhost()), SETUP_EXTRA_LAST )
CHOICE_DBUTTON_VIS( 2, "@MENU_CREATE_GAME", when(inprivateparty() && !privatepartyhost()) )
}
#undef CHOICE_SIZE_X
#define CHOICE_SIZE_X 216
#define FINDGAME_POPUP_X (0)
#define FINDGAME_POPUP_Y (22)
#define CAC_POPUP_X (0)
#define CAC_POPUP_Y (80)
// set new status position ---
#undef NEW_X_OFFSET
#define NEW_X_OFFSET (0-CHOICE_SIZE_X)
#undef NEW_Y_OFFSET
#define NEW_Y_OFFSET (0-2)
// restore new status position ---
#undef NEW_X_OFFSET
#define NEW_X_OFFSET 0
#undef NEW_Y_OFFSET
#define NEW_Y_OFFSET 0
#undef CHOICE_SIZE_X
#define CHOICE_SIZE_X 180
#undef CHOICE_HORIZONTAL_ALIGN
#define CHOICE_HORIZONTAL_ALIGN HORIZONTAL_ALIGN_CENTER
#undef CHOICE_VERTICAL_ALIGN
#define CHOICE_VERTICAL_ALIGN VERTICAL_ALIGN_CENTER
#undef CHOICE_POPUP_TITLE_HEIGHT
#define CHOICE_POPUP_TITLE_HEIGHT 24
}