#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			204//180

#define CHOICE_SEP_OFFSET_Y		-2

#define CHOICE_SEP_1			3

#include "ui_mp/menustyle.inc"
#include "ui_mp/choices_setup_teams.menu"

{
	menuDef
	{
		name			"shoutcast"
		rect			0 0 640 480
		focuscolor		COLOR_FOCUSED
		style			WINDOW_STYLE_EMPTY
		blurWorld		7.0
		legacySplitScreenScale
		onEsc
		{
			scriptMenuResponse "back";
			//close "team_marinesopfor";
		}
		onOpen
		{
			//focusFirst;
			setfocus "auto_assign";
		}
		
		#ifndef PC
		execkeyint BUTTON_START
		{
			close self;
		}
		#endif
		
		// background overlay
		itemDef	{
			style			WINDOW_STYLE_FILLED
			rect			0 0 640 480 HORIZONTAL_ALIGN_FULLSCREEN VERTICAL_ALIGN_FULLSCREEN
			backcolor		0 0 0 0.75 //0 0.05 0.15 0.5
			visible			1
			decoration
		}
		// gradient_top
		itemDef	{
			style			WINDOW_STYLE_SHADER
			rect			0 0 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0
			background		"gradient_top"
			visible			1
			decoration
		}
		// gradient_bottom
		itemDef	{
			style			WINDOW_STYLE_SHADER
			rect			0 405 854 75 HORIZONTAL_ALIGN_FULLSCREEN 0
			background		"gradient_bottom"
			visible			1
			decoration
		}

		CHOICE_MENU_TITLE( "Shoutcast" )

		#define BACK_OPEN	;
		#include "ui_mp/navcontrols.inc"

		#include "ui_mp/teamicon.inc"

		#ifdef PC
			#undef  CHOICE_X_START
			#define CHOICE_X_START	-320
			
			#undef	CHOICE_HORIZONTAL_ALIGN
			#define CHOICE_HORIZONTAL_ALIGN HORIZONTAL_ALIGN_CENTER
		#endif

		CHOICE_HIGHLIGHT( 1, 1 )
		CHOICE_BUTTON_VIS_NOHI( 1, "Spectate", play "mouse_click"; close shoutcast, 1 )

		CHOICE_HIGHLIGHT( 2, 1 )
		CHOICE_BUTTON_VIS_NOHI( 2, "Shoutcast Setup", play "mouse_click"; close shoutcast; open shoutcast_setup, 1 )

		CHOICE_HIGHLIGHT( 3, 1 )
		CHOICE_BUTTON_VIS_NOHI( 3, "Overview Map", play "mouse_click"; close shoutcast; open shoutcast_map, 1 )

		CHOICE_HIGHLIGHT( 4, 1 )
		CHOICE_BUTTON_VIS_NOHI( 4, "Promod Graphics", open quickpromodgfx, 1 )

		CHOICE_HIGHLIGHT( 5, 1 )
		CHOICE_BUTTON_VIS_NOHI( 5, "Change Team", scriptmenuresponse "changeteam";, 1 )

		CHOICE_HIGHLIGHT( 6, 1 )
		CHOICE_BUTTON_VIS_NOHI( 6, "Controls", close self; open main_controls, 1 )

		CHOICE_HIGHLIGHT( 7, 1 )
		CHOICE_BUTTON_VIS_NOHI( 7, "Options", close self; open main_options, 1 )

		CHOICE_HIGHLIGHT( 8, 1 )
		CHOICE_BUTTON_VIS_NOHI( 8, "Leave Game", open popup_endgame, when( dvarbool( sv_running ) ) )
		CHOICE_BUTTON_VIS_NOHI( 8, "Leave Game", open popup_leavegame, when( !dvarbool( sv_running ) ) )
	}
}