#include "ui/menudef.h"
#include "ui/menumacros.h"
#define DEFAULT_TEXT_SCALE	0.25
#define ORIGIN_QUICKMESSAGE	10 10
#define QM_MENU_GRADIENT_START_OFFSET
#define QM_MENU_START( WINDOWNAME )																				\
																												\
menuDef {																										\
	name		WINDOWNAME																						\
	visible		0																								\
	fullscreen	0																								\
	rect		0 100 __WINDOW_WIDTH 380																		\
	onOpen		{ setCvar cl_bypassMouseInput "1" }																\
	onClose		{ setCvar cl_bypassMouseInput "0" }																\
	onEsc		{ closeAll }																					\
																												\
	itemDef {																									\
		name		"window"																					\
		rect		0 19 204 136																				\
		origin		ORIGIN_QUICKMESSAGE																			\
		style		WINDOW_STYLE_FILLED																			\
		backcolor	0 0 0 .75																					\
		border		WINDOW_BORDER_FULL																			\
		bordercolor	.5 .5 .5 .5																					\
		visible		1																							\
		decoration																								\
	}																											\
																												\
	itemDef {																									\
		name		"windowtitle"																				\
		rect		$evalfloat((0)+2) $evalfloat((19)+2) $evalfloat((204)-4) 12									\
		origin		ORIGIN_QUICKMESSAGE																			\
		text		_("MESSAGE")																				\
		textfont	UI_FONT_ARIBLK_16																			\
		textscale	.19																							\
		textalignx	3																							\
		textaligny	10																							\
		style		WINDOW_STYLE_FILLED																			\
		backcolor	.16 .2 .17 .8																				\
		forecolor	.6 .6 .6 1																					\
		visible		1																							\
		decoration																								\
	}

	#define QM_MENU_END }

	#define QM_MENU_ITEM( WINDOWTEXT, ACTION, KEY, POS )				\
    itemDef {															\
		name			"menuitem"##WINDOWTEXT							\
		rect			6 $evalfloat( 35 + ( 12 * POS )) 128 10			\
		origin			ORIGIN_QUICKMESSAGE								\
		type			ITEM_TYPE_TEXT									\
		text			WINDOWTEXT										\
		textfont		UI_FONT_COURBD_21								\
		textstyle		ITEM_TEXTSTYLE_SHADOWED							\
		textscale		.2												\
		textaligny		8												\
		forecolor		.6 .6 .6 1										\
		visible			1												\
		decoration														\
    }																	\
    execKey KEY { ACTION }

	#define QM_MENU_ITEM_TEAM( WINDOWTEXT, ACTION, KEY, POS )			\
    itemDef {															\
		name			"menuitem"##WINDOWTEXT							\
		rect			6 $evalfloat( 35 + ( 12 * POS )) 128 10			\
		origin			ORIGIN_QUICKMESSAGE								\
		type			ITEM_TYPE_TEXT									\
		text			WINDOWTEXT										\
		textfont		UI_FONT_COURBD_21								\
		textstyle		ITEM_TEXTSTYLE_SHADOWED							\
		textscale		.2												\
		textaligny		8												\
		forecolor		.6 .6 .6 1										\
		visible			1												\
		decoration														\
    }																	\
	execKey KEY { ACTION }

QM_MENU_START( "wm_quickmessageAlt" )

	QM_MENU_ITEM_TEAM( 	_("1. Statements"), 	close wm_quickmessageAlt; 	open wm_quickstatements_alt, 	"1", 0 )
	QM_MENU_ITEM_TEAM( 	_("2. Requests"), 		close wm_quickmessageAlt; 	open wm_quickrequests_alt, 		"2", 1 )
	QM_MENU_ITEM_TEAM( 	_("3. Commands"), 		close wm_quickmessageAlt; 	open wm_quickcommand_alt, 		"3", 2 )
	QM_MENU_ITEM_TEAM( 	_("4. Talk"),		 	close wm_quickmessageAlt; 	open wm_quickmisc_alt, 			"4", 3 )
	QM_MENU_ITEM( 		_("5. Global"),		 	close wm_quickmessageAlt; 	open wm_quickglobal_alt, 		"5", 4 )
	QM_MENU_ITEM_TEAM( 	_("6. Function"), 		exec "wm_sayPlayerClass"; 	close wm_quickmessageAlt,		"6", 5 )
	QM_MENU_ITEM_TEAM( 	_("7. Objectives"), 	close wm_quickmessageAlt; 	open wm_quickobjectives_alt, 	"7", 6 )

QM_MENU_END

QM_MENU_START( "wm_quickstatements_alt" )

	QM_MENU_ITEM_TEAM( _("1. Path Cleared."), 		exec "VoiceTeamChat PathCleared"; 		close wm_quickstatements_alt,	"1", 0 )
	QM_MENU_ITEM_TEAM( _("2. Enemy Weak!"), 		exec "VoiceTeamChat EnemyWeak"; 		close wm_quickstatements_alt, 	"2", 1 )
	QM_MENU_ITEM_TEAM( _("3. All Clear"), 			exec "VoiceTeamChat AllClear"; 			close wm_quickstatements_alt,	"3", 2 )
	QM_MENU_ITEM_TEAM( _("4. Incoming"), 			exec "VoiceTeamChat Incoming"; 			close wm_quickstatements_alt,	"4", 3 )
	QM_MENU_ITEM_TEAM( _("5. Fire In The Hole!"), 	exec "VoiceTeamChat FireInTheHole"; 	close wm_quickstatements_alt,	"5", 4 )
	QM_MENU_ITEM_TEAM( _("6. I'm Defending."), 		exec "VoiceTeamChat OnDefense"; 		close wm_quickstatements_alt,	"6", 5 )
	QM_MENU_ITEM_TEAM( _("7. I'm Attacking."), 		exec "VoiceTeamChat OnOffense"; 		close wm_quickstatements_alt,	"7", 6 )
	QM_MENU_ITEM_TEAM( _("8. Taking Fire!"), 		exec "VoiceTeamChat TakingFire"; 		close wm_quickstatements_alt,	"8", 7 )
	QM_MENU_ITEM_TEAM( _("9. Mines Cleared"), 		exec "VoiceTeamChat MinesCleared"; 		close wm_quickstatements_alt,	"9", 8 )
	QM_MENU_ITEM_TEAM( _("0. Enemy Disguised"), 	exec "VoiceTeamChat EnemyDisguised";	close wm_quickstatements_alt,	"0", 9 )

QM_MENU_END

QM_MENU_START( "wm_quickrequests_alt" )

	QM_MENU_ITEM_TEAM( _("1. Need Medic!"), 		exec "VoiceTeamChat Medic"; 		close wm_quickrequests_alt,	"1", 0 )
	QM_MENU_ITEM_TEAM( _("2. Need Ammo!"), 			exec "VoiceTeamChat NeedAmmo"; 		close wm_quickrequests_alt,	"2", 1 )
	QM_MENU_ITEM_TEAM( _("3. Need Backup!"), 		exec "VoiceTeamChat NeedBackup"; 	close wm_quickrequests_alt,	"3", 2 )
	QM_MENU_ITEM_TEAM( _("4. Need Engineer!"), 		exec "VoiceTeamChat NeedEngineer"; 	close wm_quickrequests_alt,	"4", 3 )
	QM_MENU_ITEM_TEAM( _("5. Cover Me!"), 			exec "VoiceTeamChat CoverMe"; 		close wm_quickrequests_alt,	"5", 4 )
	QM_MENU_ITEM_TEAM( _("6. Hold Fire!"),			exec "VoiceTeamChat HoldFire";	 	close wm_quickrequests_alt, "6", 5 )
	QM_MENU_ITEM_TEAM( _("7. Where To?"), 			exec "VoiceTeamChat WhereTo"; 		close wm_quickrequests_alt,	"7", 6 )
	QM_MENU_ITEM_TEAM( _("8. Need Covert Ops!"), 	exec "VoiceTeamChat NeedOps"; 		close wm_quickrequests_alt,	"8", 7 )

QM_MENU_END

QM_MENU_START( "wm_quickcommand_alt" )

	QM_MENU_ITEM_TEAM( _("1. Follow Me!"), 			exec "VoiceTeamChat FollowMe"; 			close wm_quickcommand_alt, 	"1", 0 )
	QM_MENU_ITEM_TEAM( _("2. Let's Go!"), 			exec "VoiceTeamChat LetsGo"; 			close wm_quickcommand_alt, 	"2", 1 )
	QM_MENU_ITEM_TEAM( _("3. Move!"), 				exec "VoiceTeamChat Move"; 				close wm_quickcommand_alt, 	"3", 2 )
	QM_MENU_ITEM_TEAM( _("4. Clear The Path!"), 	exec "VoiceTeamChat ClearPath"; 		close wm_quickcommand_alt, 	"4", 3 )
	QM_MENU_ITEM_TEAM( _("5. Defend Objective!"), 	exec "VoiceTeamChat DefendObjective"; 	close wm_quickcommand_alt, 	"5", 4 )
	QM_MENU_ITEM_TEAM( _("6. Disarm Dynamite!"), 	exec "VoiceTeamChat DisarmDynamite"; 	close wm_quickcommand_alt, 	"6", 5 )
	QM_MENU_ITEM_TEAM( _("7. Clear Mines!"), 		exec "VoiceTeamChat ClearMines"; 		close wm_quickcommand_alt, 	"7", 6 )
	QM_MENU_ITEM_TEAM( _("8. Reinforce Offense"), 	exec "VoiceTeamChat ReinforceOffense"; 	close wm_quickcommand_alt,	"8", 7 )
	QM_MENU_ITEM_TEAM( _("9. Reinforce Defense"), 	exec "VoiceTeamChat ReinforceDefense"; 	close wm_quickcommand_alt,	"9", 8 )

QM_MENU_END

QM_MENU_START( "wm_quickmisc_alt" )

	QM_MENU_ITEM_TEAM( _("1. Yes"),				exec "VoiceTeamChat Affirmative"; 	close wm_quickmisc_alt, "1", 0 )
	QM_MENU_ITEM_TEAM( _("2. No"),				exec "VoiceTeamChat Negative"; 		close wm_quickmisc_alt, "2", 1 )
	QM_MENU_ITEM_TEAM( _("3. Thanks"),			exec "VoiceTeamChat Thanks"; 		close wm_quickmisc_alt, "3", 2 )
	QM_MENU_ITEM_TEAM( _("4. Welcome"),			exec "VoiceTeamChat Welcome"; 		close wm_quickmisc_alt, "4", 3 )
	QM_MENU_ITEM_TEAM( _("5. Sorry"),			exec "VoiceTeamChat Sorry"; 		close wm_quickmisc_alt, "5", 4 )
	QM_MENU_ITEM_TEAM( _("6. Oops"), 			exec "VoiceTeamChat Oops"; 			close wm_quickmisc_alt, "6", 5 )

QM_MENU_END

QM_MENU_START( "wm_quickglobal_alt" )

	QM_MENU_ITEM( _("1. Yes"),				exec "VoiceChat Affirmative"; 	close wm_quickglobal_alt, 	"1", 0 )
	QM_MENU_ITEM( _("2. No"),				exec "VoiceChat Negative"; 		close wm_quickglobal_alt, 	"2", 1 )
	QM_MENU_ITEM( _("3. Enemy Weak"),		exec "VoiceChat EnemyWeak";		close wm_quickglobal_alt, 	"3", 2 )
	QM_MENU_ITEM( _("4. Hi"),				exec "VoiceChat Hi"; 			close wm_quickglobal_alt, 	"4", 3 )
	QM_MENU_ITEM( _("5. Bye"),				exec "VoiceChat Bye"; 			close wm_quickglobal_alt, 	"5", 4 )
	QM_MENU_ITEM( _("6. Great Shot"),		exec "VoiceChat GreatShot"; 	close wm_quickglobal_alt, 	"6", 5 )
	QM_MENU_ITEM( _("7. Cheer"),			exec "VoiceChat Cheer"; 		close wm_quickglobal_alt, 	"7", 6 )
	QM_MENU_ITEM( _("8. More Globals"),		close wm_quickglobal_alt;		open wm_quickglobal2_alt, 	"8", 7 )

QM_MENU_END

QM_MENU_START( "wm_quickglobal2_alt" )

	QM_MENU_ITEM( _("1. Thanks"),		exec "VoiceChat Thanks";	close wm_quickglobal2_alt, 	"1", 0 )
	QM_MENU_ITEM( _("2. Welcome"),		exec "VoiceChat Welcome"; 	close wm_quickglobal2_alt, 	"2", 1 )
	QM_MENU_ITEM( _("3. Oops"),			exec "VoiceChat Oops"; 		close wm_quickglobal2_alt, 	"3", 2 )
	QM_MENU_ITEM( _("4. Sorry"),		exec "VoiceChat Sorry"; 	close wm_quickglobal2_alt, 	"4", 3 )
	QM_MENU_ITEM( _("5. Hold Fire!"),	exec "VoiceChat HoldFire";	close wm_quickglobal2_alt, 	"5", 4 )
	QM_MENU_ITEM( _("6. Good Game"),	exec "VoiceChat GoodGame";	close wm_quickglobal2_alt, 	"6", 5 )

QM_MENU_END

QM_MENU_START( "wm_quickobjectives_alt" )

	QM_MENU_ITEM_TEAM( _("1. Command Acknowledged"),		exec "VoiceTeamChat CommandAcknowledged"; 		close wm_quickobjectives_alt, 	"1", 0 )
	QM_MENU_ITEM_TEAM( _("2. Command Declined"),			exec "VoiceTeamChat CommandDeclined";			close wm_quickobjectives_alt, 	"2", 1 )
	QM_MENU_ITEM_TEAM( _("3. Command Completed"),			exec "VoiceTeamChat CommandCompleted";			close wm_quickobjectives_alt, 	"3", 2 )
	QM_MENU_ITEM_TEAM( _("4. Destroy Primary Objective"),	exec "VoiceTeamChat DestroyPrimary"; 			close wm_quickobjectives_alt,	"4", 3 )
	QM_MENU_ITEM_TEAM( _("5. Destroy Secondary Objective"),	exec "VoiceTeamChat DestroySecondary";			close wm_quickobjectives_alt,	"5", 4 )
	QM_MENU_ITEM_TEAM( _("6. Destroy Construction"),		exec "VoiceTeamChat DestroyConstruction";		close wm_quickobjectives_alt,	"6", 5 )
	QM_MENU_ITEM_TEAM( _("7. Commencing Construction"),		exec "VoiceTeamChat ConstructionCommencing";	close wm_quickobjectives_alt, 	"7", 6 )
	QM_MENU_ITEM_TEAM( _("8. Repair Vehicle"),				exec "VoiceTeamChat RepairVehicle";				close wm_quickobjectives_alt,	"8", 7 )
	QM_MENU_ITEM_TEAM( _("9. Disable Vehicle"),				exec "VoiceTeamChat DestroyVehicle";			close wm_quickobjectives_alt,	"9", 8 )
	QM_MENU_ITEM_TEAM( _("0. Escort Vehicle"),				exec "VoiceTeamChat EscortVehicle";				close wm_quickobjectives_alt,	"0", 9 )

QM_MENU_END
