cod5-sdk/raw/ui/popup_leavegame.menu

417 lines
12 KiB
Text
Raw Normal View History

2008-11-20 00:00:00 +00:00
#include "ui/menudef.h"
#define CHOICE_SIZE_X 180
#define CHOICE_SIZE_Y 22
#define CHOICE_X_START 78
#define CHOICE_Y_START 230
#define CHOICE_SEP_OFFSET_Y -2
#define CHOICE_GROUP "xboxlive_lobby"
#define CHOICE_SEP_1 3
#include "ui_mp/menustyle.inc"
#include "ui/choices_setup_common.menu"
#ifdef CONSOLE
#define ORIGIN_POPUPTITLE 320 160
#define ORIGIN_POPUPTITLE2 320 220
#define ORIGIN_YES 234 260
#define ORIGIN_NO 310 260
#define ORIGIN_POPUPCHOICE1 180 200
#define ORIGIN_POPUPCHOICE2 180 220
#endif
{
#include "ui_mp/popupstyle.inc"
#include "ui/choices_setup_popmenu.menu"
menuDef
{
CENTER_POPUP_SETUP_ONOPEN( popup_leavegame, 3, ;, setfocus cancel_button, 1 )
#define LOCAL_ACCEPT_LEAVEGAME \
play "mouse_click"; \
close popup_leavegame; \
exec "disconnect"
CHOICE_POPMENU_TITLE( "@MPUI_LEAVE_GAME1")
CHOICE_BUTTON( 2, "@MENU_YES", LOCAL_ACCEPT_LEAVEGAME )
CHOICE_BUTTON_EX( 3, "@MENU_NO", close self, name cancel_button )
}
menuDef
{
CENTER_POPUP_SETUP_ONOPEN( popup_leavegameandparty, 2, ;, setfocus cancel_button, 1 )
#define LOCAL_ACCEPT_LEAVEGAMEANDPARTY \
play "mouse_click"; \
close popup_leavegameandparty; \
exec "disconnect; xstopprivateparty; xstopparty"; \
exec "xblive_privatematch 0"; \
exec "xstartprivateparty";
CHOICE_POPMENU_TITLE( "@MENU_LEAVE_GAME_AND_PARTY" )
CHOICE_BUTTON( 1, "@MENU_YES", LOCAL_ACCEPT_LEAVEGAMEANDPARTY )
CHOICE_BUTTON_EX( 2, "@MENU_NO", close self, name cancel_button )
}
menuDef
{
CENTER_POPUP_SETUP_ONOPEN( popup_endgame, 3, ;, setfocus cancel_button, 1 )
visible when ( dvarbool( onlineunrankedgameandhost ) == 1 || dvarbool( sv_running ) == 1 );
#define LOCAL_ACCEPT_ENDGAME \
play "mouse_click"; \
close popup_endgame; \
scriptMenuResponse "endround";
CHOICE_POPMENU_TITLE( "@MPUI_END_GAME2")
CHOICE_BUTTON( 2, "@MENU_YES", LOCAL_ACCEPT_ENDGAME )
CHOICE_BUTTON_EX( 3, "@MENU_NO", close self, name cancel_button )
}
menuDef
{
CENTER_POPUP_SETUP_ONOPEN( popup_systemlink_leavegame, 3, ;, setfocus cancel_button, 1 )
#define LOCAL_ACCEPT_SYSTEMLINK_LEAVEGAME \
play "mouse_click"; \
close popup_systemlink_leavegame; \
exec "disconnect"
CHOICE_POPMENU_TITLE( "@MPUI_LEAVE_GAME1")
CHOICE_BUTTON( 2, "@MENU_YES", LOCAL_ACCEPT_SYSTEMLINK_LEAVEGAME )
CHOICE_BUTTON_EX( 3, "@MENU_NO", close self, name cancel_button )
}
menuDef
{
CENTER_POPUP_SETUP_ONOPEN( popup_systemlink_endgame, 3, ;, setfocus cancel_button, 1 )
visible when ( dvarbool( systemlinkpartyandhost ) == 1 || dvarbool( sv_running ) == 1 );
#define LOCAL_ACCEPT_SYSTEMLINK_ENDGAME \
play "mouse_click"; \
close popup_systemlink_endgame; \
scriptMenuResponse "endround";
CHOICE_POPMENU_TITLE( "@MPUI_END_GAME2")
CHOICE_BUTTON( 2, "@MENU_YES", LOCAL_ACCEPT_SYSTEMLINK_ENDGAME )
CHOICE_BUTTON_EX( 3, "@MENU_NO", close self, name cancel_button )
}
#ifdef PC
#undef CHOICE_Y_START
#define CHOICE_Y_START 230
#else
#undef CHOICE_Y_START
#define CHOICE_Y_START 200
#endif //#ifdef PC
menuDef
{
CENTER_POPUP_SETUP_ONOPEN( popup_leavegame_ranked, 3, ;, setfocus cancel_button, 1 )
#define LOCAL_ACCEPT_LEAVEGAME_RANKED \
play "mouse_click"; \
close popup_leavegame; \
exec "disconnect"
CHOICE_POPMENU_TITLE( "@MPUI_LEAVE_GAME1")
CHOICE_POPMENU_SUBTITLE( "@MENU_LEAVE_GAME_RANKED" );
CHOICE_BUTTON( 2, "@MENU_YES", LOCAL_ACCEPT_LEAVEGAME_RANKED )
CHOICE_BUTTON_EX( 3, "@MENU_NO", close self, name cancel_button )
}
menuDef
{
CENTER_POPUP_SETUP_ONOPEN( popup_endgame_ranked, 3, ;, setfocus cancel_button, 1 )
visible when ( dvarbool( onlineunrankedgameandhost ) == 1 );
#define LOCAL_ACCEPT_ENDGAME_RANKED \
play "mouse_click"; \
close popup_endgame; \
exec "xpartydisbandafterround"; \
scriptMenuResponse "endround";
CHOICE_POPMENU_TITLE( "@MPUI_LEAVE_GAME1")
CHOICE_POPMENU_SUBTITLE( "@MENU_LEAVE_GAME_RANKED" );
CHOICE_BUTTON( 2, "@MENU_YES", LOCAL_ACCEPT_ENDGAME_RANKED )
CHOICE_BUTTON_EX( 3, "@MENU_NO", close self, name cancel_button )
}
menuDef
{
CENTER_POPUP_SETUP_ONOPEN( popup_leavegameandparty_ranked, 3, ;, setfocus cancel_button, 1 )
#define LOCAL_ACCEPT_LEAVEGAMEANDPARTY_RANKED \
play "mouse_click"; \
close popup_leavegameandparty; \
exec "disconnect; xstopprivateparty; xstopparty"; \
exec "xblive_privatematch 0"; \
exec "xstartprivateparty";
CHOICE_POPMENU_TITLE( "@MENU_LEAVE_GAME_AND_PARTY" )
CHOICE_POPMENU_SUBTITLE( "@MENU_LEAVE_GAME_RANKED" );
CHOICE_BUTTON( 2, "@MENU_YES", LOCAL_ACCEPT_LEAVEGAMEANDPARTY_RANKED )
CHOICE_BUTTON_EX( 3, "@MENU_NO", close self, name cancel_button )
}
// COOP & SP Pop Menus for Leave Game
menuDef
{
blurWorld 4.8
CENTER_POPUP_SETUP_ONOPEN( popup_leavegame_coop, 3, ;, setfocus cancel_button, 1 )
#define LOCAL_ACCEPT_LEAVEGAME_COOP \
play "mouse_click"; \
close self; \
exec "disconnect"
CHOICE_POPMENU_TITLE( "@MENU_LEAVE_GAME" )
CHOICE_POPMENU_SUBTITLE( "@MENU_LEAVE_GAME_DESC" )
CHOICE_BUTTON_FOCUS( 2, "@MENU_YES", LOCAL_ACCEPT_LEAVEGAME_COOP, play "mouse_over";, ; )
CHOICE_BUTTON_FOCUS_VIS_EX( 3, "@MENU_NO", close self;, play "mouse_over";, ;, 1, name cancel_button )
}
menuDef
{
blurWorld 4.8
CENTER_POPUP_SETUP_ONOPEN( popup_leavegameandparty_coop, 3, ;, setfocus cancel_button, 1 )
#define LOCAL_ACCEPT_LEAVEGAMEANDPARTY_COOP \
play "mouse_click"; \
close self; \
exec "disconnect; xstopprivateparty; xstopparty"; \
exec "xblive_privatematch 0"; \
exec "xstartprivateparty";
CHOICE_POPMENU_TITLE( "@MENU_LEAVE_GAME_AND_PARTY" )
CHOICE_POPMENU_SUBTITLE( "@MENU_LEAVE_GAME_AND_PARTY_DESC" );
CHOICE_BUTTON_FOCUS( 2, "@MENU_YES", LOCAL_ACCEPT_LEAVEGAMEANDPARTY_COOP, play "mouse_over";, ; )
CHOICE_BUTTON_FOCUS_VIS_EX( 3, "@MENU_NO", close self;, play "mouse_over";, ;, 1, name cancel_button )
}
menuDef
{
blurWorld 4.8
CENTER_POPUP_SETUP_ONOPEN( popup_coop_client_quit, 3, close self; open "pausedmenu";, setfocus resume_game, 1 )
#define ACTION_COOP_CLIENT_RESUME \
play "mouse_click"; \
close self; \
close "pausedmenu";
#define ACTION_COOP_CLIENT_QUIT \
play "mouse_click"; \
close self; \
exec "disconnect";
CHOICE_POPMENU_TITLE( "@MENU_QUIT_WARNING")
CHOICE_POPMENU_SUBTITLE( "@MENU_CLIENT_QUIT_WARNING_DESC" )
CHOICE_BUTTON_FOCUS_VIS_EX( 2, "@MENU_RESUMEGAME_CAP", ACTION_COOP_CLIENT_RESUME, play "mouse_over";, ;, 1, name resume_game )
CHOICE_BUTTON_FOCUS( 3, "@PLATFORM_QUIT_CAP", ACTION_COOP_CLIENT_QUIT, play "mouse_over";, ; )
}
menuDef
{
blurWorld 4.8
#ifndef PC
#define COOP_QUIT_ONOPEN \
setfocus resume_game; \
exec "fullscreenview";
#else // #ifndef PC
#define COOP_QUIT_ONOPEN \
setfocus resume_game;
#endif // #ifndef PC
CENTER_POPUP_SETUP_ONOPEN( popup_coop_host_quit, 3, close self; open "pausedmenu";, COOP_QUIT_ONOPEN, 1 )
#ifndef PC
#define ACTION_COOP_QUIT_RESUME \
play "mouse_click"; \
exec "splitscreenview"; \
close self; \
close "pausedmenu";
#define ACTION_COOP_QUIT \
play "mouse_click"; \
exec "splitscreenview"; \
close self; \
scriptMenuResponse "endround";
#else // #ifndef PC
#define ACTION_COOP_QUIT_RESUME \
play "mouse_click"; \
close self; \
close "pausedmenu";
#define ACTION_COOP_QUIT \
play "mouse_click"; \
close self; \
scriptMenuResponse "endround";
#endif // #ifndef PC
CHOICE_POPMENU_TITLE( "@MENU_QUIT_WARNING")
CHOICE_POPMENU_SUBTITLE( "@MENU_HOST_QUIT_WARNING_DESC" );
CHOICE_BUTTON_FOCUS_VIS_EX( 2, "@MENU_RESUMEGAME_CAP", ACTION_COOP_QUIT_RESUME, play "mouse_over";, ;, 1, name resume_game )
CHOICE_BUTTON_FOCUS( 3, "@PLATFORM_QUIT_CAP", ACTION_COOP_QUIT, play "mouse_over";, ; )
}
menuDef
{
blurWorld 4.8
CENTER_POPUP_SETUP_ONOPEN( popup_coop_host_quit_clone, 2, ;, setfocus cancel_button, 1 )
#define LOCAL_ACCEPT_HOST_LEAVEGAME_COOP \
play "mouse_click"; \
close self; \
scriptMenuResponse "endround";
CHOICE_POPMENU_TITLE( "@MENU_LEAVE_GAME" )
CHOICE_POPMENU_SUBTITLE( "@MENU_LEAVE_GAME_DESC" )
CHOICE_BUTTON_FOCUS( 1, "@MENU_YES", LOCAL_ACCEPT_HOST_LEAVEGAME_COOP, play "mouse_over";, ; )
CHOICE_BUTTON_FOCUS_VIS_EX( 2, "@MENU_NO", close self;, play "mouse_over";, ;, 1, name cancel_button )
}
menuDef
{
blurWorld 4.8
CENTER_POPUP_SETUP_ONOPEN( popup_noprofile_quit, 3, close self; open "pausedmenu";, setfocus resume_game, 1 )
#define ACTION_NO_PROFILE_RESUME \
play "mouse_click"; \
close self; \
close "pausedmenu";
#define ACTION_NO_PROFILE_QUIT \
play "mouse_click"; \
close self; \
exec "disconnect";
CHOICE_POPMENU_TITLE( "@MENU_QUIT_WARNING")
#ifdef CONSOLE
CHOICE_POPMENU_SUBTITLE( "@MENU_NOPROFILE_QUIT_WARNING_DESC" );
#endif
CHOICE_BUTTON_FOCUS_VIS_EX( 2, "@MENU_RESUMEGAME_CAP", ACTION_NO_PROFILE_RESUME, play "mouse_over";, ;, 1, name resume_game )
CHOICE_BUTTON_FOCUS( 3, "@PLATFORM_QUIT_CAP", ACTION_NO_PROFILE_QUIT, play "mouse_over";, ; )
}
menuDef
{
blurWorld 4.8
CENTER_POPUP_SETUP_ONOPEN( popup_storage_quit, 3, close self; open "pausedmenu";, setfocus resume_game, 1 )
#define ACTION_STORAGE_RESUME \
play "mouse_click"; \
close self; \
close "pausedmenu";
#define ACTION_STORAGE_QUIT \
play "mouse_click"; \
close self; \
setdvar ui_skipMainLockout "0"; \
exec "disconnect";
CHOICE_POPMENU_TITLE( "@MENU_QUIT_WARNING")
CHOICE_POPMENU_SUBTITLE( "@MENU_QUIT_WARNING_DESC" );
CHOICE_BUTTON_FOCUS_VIS_EX( 2, "@MENU_RESUMEGAME_CAP", ACTION_STORAGE_RESUME, play "mouse_over";, ;, 1, name resume_game )
CHOICE_BUTTON_FOCUS( 3, "@PLATFORM_QUIT_CAP", ACTION_STORAGE_QUIT, play "mouse_over";, ; )
}
menuDef
{
blurWorld 4.8
CENTER_POPUP_SETUP_ONOPEN( popup_nosave_quit, 3, close self; open "pausedmenu";, setfocus resume_game, 1 )
#define ACTION_NOSAVE_RESUME \
play "mouse_click"; \
close self; \
close "pausedmenu";
#define ACTION_NOSAVE_QUIT \
play "mouse_click"; \
close self; \
setdvar ui_skipMainLockout "1"; \
exec "disconnect";
CHOICE_POPMENU_TITLE( "@MENU_QUIT_WARNING")
CHOICE_POPMENU_SUBTITLE( "@MENU_QUIT_WARNING_DESC" );
CHOICE_BUTTON_FOCUS_VIS_EX( 2, "@MENU_RESUMEGAME_CAP", ACTION_NOSAVE_RESUME, play "mouse_over";, ;, 1, name resume_game )
CHOICE_BUTTON_FOCUS( 3, "@PLATFORM_QUIT_CAP", ACTION_NOSAVE_QUIT, play "mouse_over";, ; )
}
#ifdef PC
#undef CHOICE_Y_START
#define CHOICE_Y_START 230
#else
#undef CHOICE_Y_START
#define CHOICE_Y_START 140
#endif //#ifdef PC
menuDef
{
blurWorld 4.8
CENTER_POPUP_SETUP_ONOPEN( popup_general_quit, 3, close self; open "pausedmenu";, setfocus resume_game, 1 )
#define ACTION_GENERAL_RESUME \
play "mouse_click"; \
close self; \
close "pausedmenu";
#define ACTION_GENERAL_QUIT \
play "mouse_click"; \
close self; \
setdvar ui_skipMainLockout "1"; \
exec "disconnect";
CHOICE_POPMENU_TITLE( "@MENU_QUIT_WARNING")
CHOICE_BUTTON_FOCUS_VIS_EX( 2, "@MENU_RESUMEGAME_CAP", ACTION_GENERAL_RESUME, play "mouse_over";, ;, 1, name resume_game )
CHOICE_BUTTON_FOCUS( 3, "@PLATFORM_QUIT_CAP", ACTION_GENERAL_QUIT, play "mouse_over";, ; )
}
}