#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_OFFSET_Y		-2

#include "ui_mp/menustyle.inc"
#include "ui/choices_setup_common.menu"

#define MENU_LOCKED_COLOR		0.25 0.25 0.25 1

#define ORIGIN_BUTTON_BACK			52 438
#define ORIGIN_MENU_TREE			54 64
#define ORIGIN_MENU_TITLE_MARINES	178 64
#define ORIGIN_MENU_TITLE_OPFOR		170 64
#define TREE_COLOR					1 1 1 0.5
#define LABEL_TEXT_COLOR		0.7 0.75 0.75 1

{
	menuDef
	{
		name			"changeclass_opfor_mw"
		rect			0 0 640 480
		focuscolor		COLOR_FOCUSED
		style			WINDOW_STYLE_EMPTY
		blurWorld		7.0
		onOpen
		{
			setLocalVarString ui_team "opfor"
		}
		onEsc 
		{
			scriptMenuResponse "back";
		}
		
		// 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( "CHOOSE CLASS" )

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

		#include "ui_mp/teamicon.inc"
		CHOICE_HIGHLIGHT( 1, 1 )
		CHOICE_BUTTON_VIS_NOHI( 1, "1. Assault", scriptMenuResponse "assault";, when( dvarBool( axis_allow_assault ) || dvarString( loadout_curclass ) == "assault" ) )
		CHOICE_DBUTTON_VIS_NOHI( 1, "1. Assault", when( !dvarBool( axis_allow_assault ) && dvarString( loadout_curclass ) != "assault" ) )

		CHOICE_HIGHLIGHT( 2, 1 )		
		CHOICE_BUTTON_VIS_NOHI( 2, "2. Spec Ops", scriptMenuResponse "specops";, when( dvarBool( axis_allow_specops ) || dvarString( loadout_curclass ) == "specops" ) )
		CHOICE_DBUTTON_VIS_NOHI( 2, "2. Spec Ops", when( !dvarBool( axis_allow_specops ) && dvarString( loadout_curclass ) != "specops" ) )

		CHOICE_HIGHLIGHT( 3, 1 )		
		CHOICE_BUTTON_VIS_NOHI( 3, "3. Demolitions", scriptMenuResponse "demolitions";, when( dvarBool( axis_allow_demolitions ) || dvarString( loadout_curclass ) == "demolitions" ) )
		CHOICE_DBUTTON_VIS_NOHI( 3, "3. Demolitions", when( !dvarBool( axis_allow_demolitions ) && dvarString( loadout_curclass ) != "demolitions" ) )

		CHOICE_HIGHLIGHT( 4, 1 )		
		CHOICE_BUTTON_VIS_NOHI( 4, "4. Sniper", scriptMenuResponse "sniper";, when( dvarBool( axis_allow_sniper ) || dvarString( loadout_curclass ) == "sniper" ) )
		CHOICE_DBUTTON_VIS_NOHI( 4, "4. Sniper", when( !dvarBool( axis_allow_sniper ) && dvarString( loadout_curclass ) != "sniper" ) )

		CHOICE_HIGHLIGHT( 6, 1 )		
		CHOICE_BUTTON_VIS_NOHI( 6, "5. Spectate Team", scriptMenuResponse "killspec";, 1 )
		CHOICE_HIGHLIGHT( 7, 1 )	
		CHOICE_DVARFLOATLIST(7 , "^1Max FPS", com_maxfps, { "100 FPS" 100 "125 FPS" 125 "200 FPS" 200 "250 FPS" 250 }, ;		)

		CHOICE_HIGHLIGHT( 8, 1 )
		CHOICE_DVARFLOATLIST( 8, "^1FOV", cg_fov, { "65" 65 "71.1111" 71.1111 "80" 80 }, ; )
		
		CHOICE_HIGHLIGHT ( 9, 1 )
		CHOICE_DVARFLOATLIST( 9, "^1FOV/SCALE", cg_fovScale, { "1.25" 1.25 "1.125" 1.125 }, ; )


		execKey "1" { scriptMenuResponse "assault"}
		execKey "2" { scriptMenuResponse "specops"}
		execKey "3" { scriptMenuResponse "demolition"}
		execKey "4" { scriptMenuResponse "sniper"}
		execKey "5" { scriptMenuResponse "killspec"}

		#include "ui/safearea.menu"
	}
}
