	#include "ui/menudef.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 640 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_quickmessage" )

	QM_MENU_ITEM_TEAM( 	"S. Statements", 	close wm_quickmessage; 		open wm_quickstatements, 	"s", 0 )
	QM_MENU_ITEM_TEAM( 	"R. Requests", 		close wm_quickmessage; 		open wm_quickrequests, 		"r", 1 )
	QM_MENU_ITEM_TEAM( 	"C. Commands", 		close wm_quickmessage; 		open wm_quickcommand, 		"c", 2 )
	QM_MENU_ITEM_TEAM( 	"T. Talk",		 	close wm_quickmessage;	 	open wm_quickmisc, 			"t", 3 )
	QM_MENU_ITEM( 		"G. Global",	 	close wm_quickmessage; 		open wm_quickglobal, 		"g", 4 )
	QM_MENU_ITEM_TEAM( 	"F. Function", 		exec "wm_sayPlayerClass"; 	close wm_quickmessage,		"f", 5 )
	QM_MENU_ITEM_TEAM( 	"O. Objectives", 	close wm_quickmessage; 		open wm_quickobjectives, 	"o", 6 )

QM_MENU_END

QM_MENU_START( "wm_quickstatements" )

	QM_MENU_ITEM_TEAM( "P. Path Cleared.", 		exec "VoiceTeamChat PathCleared"; 		close wm_quickstatements,	"p", 0 )
	QM_MENU_ITEM_TEAM( "W. Enemy Weak!", 		exec "VoiceTeamChat EnemyWeak"; 		close wm_quickstatements, 	"w", 1 )
	QM_MENU_ITEM_TEAM( "C. All Clear", 			exec "VoiceTeamChat AllClear"; 			close wm_quickstatements,	"c", 2 )
	QM_MENU_ITEM_TEAM( "I. Incoming", 			exec "VoiceTeamChat Incoming"; 			close wm_quickstatements,	"i", 3 )
	QM_MENU_ITEM_TEAM( "F. Fire In The Hole!", 	exec "VoiceTeamChat FireInTheHole";		 close wm_quickstatements,	"f", 4 )
	QM_MENU_ITEM_TEAM( "D. I'm Defending.", 	exec "VoiceTeamChat OnDefense"; 		close wm_quickstatements,	"d", 5 )
	QM_MENU_ITEM_TEAM( "A. I'm Attacking.", 	exec "VoiceTeamChat OnOffense"; 		close wm_quickstatements,	"a", 6 )
	QM_MENU_ITEM_TEAM( "T. Taking Fire!", 		exec "VoiceTeamChat TakingFire"; 		close wm_quickstatements,	"t", 7 )
	QM_MENU_ITEM_TEAM( "M. Mines Cleared", 		exec "VoiceTeamChat MinesCleared"; 		close wm_quickstatements,	"m", 8 )
	QM_MENU_ITEM_TEAM( "E. Enemy Disguised", 	exec "VoiceTeamChat EnemyDisguised";	close wm_quickstatements,	"e", 9 )

QM_MENU_END

QM_MENU_START( "wm_quickrequests" )

	QM_MENU_ITEM_TEAM( "M. Need Medic!", 		exec "VoiceTeamChat Medic"; 		close wm_quickrequests,	"m", 0 )
	QM_MENU_ITEM_TEAM( "A. Need Ammo!", 		exec "VoiceTeamChat NeedAmmo"; 		close wm_quickrequests,	"a", 1 )
	QM_MENU_ITEM_TEAM( "B. Need Backup!", 		exec "VoiceTeamChat NeedBackup"; 	close wm_quickrequests,	"b", 2 )
	QM_MENU_ITEM_TEAM( "E. Need Engineer!", 	exec "VoiceTeamChat NeedEngineer"; 	close wm_quickrequests,	"e", 3 )
	QM_MENU_ITEM_TEAM( "C. Cover Me!", 			exec "VoiceTeamChat CoverMe"; 		close wm_quickrequests,	"c", 4 )
	QM_MENU_ITEM_TEAM( "H. Hold Fire!",			exec "VoiceTeamChat HoldFire";	 	close wm_quickrequests, "h", 5 )
	QM_MENU_ITEM_TEAM( "W. Where To?", 			exec "VoiceTeamChat WhereTo"; 		close wm_quickrequests,	"w", 6 )
	QM_MENU_ITEM_TEAM( "O. Need Covert Ops!", 	exec "VoiceTeamChat NeedOps"; 		close wm_quickrequests,	"o", 7 )

QM_MENU_END

QM_MENU_START( "wm_quickcommand" )

	QM_MENU_ITEM_TEAM( "F. Follow Me!", 		exec "VoiceTeamChat FollowMe"; 			close wm_quickcommand, 	"f", 0 )
	QM_MENU_ITEM_TEAM( "G. Let's Go!", 			exec "VoiceTeamChat LetsGo"; 			close wm_quickcommand, 	"g", 1 )
	QM_MENU_ITEM_TEAM( "M. Move!", 				exec "VoiceTeamChat Move"; 				close wm_quickcommand, 	"m", 2 )
	QM_MENU_ITEM_TEAM( "C. Clear The Path!", 	exec "VoiceTeamChat ClearPath"; 		close wm_quickcommand, 	"c", 3 )
	QM_MENU_ITEM_TEAM( "O. Defend Objective!", 	exec "VoiceTeamChat DefendObjective"; 	close wm_quickcommand, 	"o", 4 )
	QM_MENU_ITEM_TEAM( "D. Disarm Dynamite!", 	exec "VoiceTeamChat DisarmDynamite"; 	close wm_quickcommand, 	"d", 5 )
	QM_MENU_ITEM_TEAM( "N. Clear Mines!", 		exec "VoiceTeamChat ClearMines"; 		close wm_quickcommand, 	"n", 6 )
	QM_MENU_ITEM_TEAM( "R. Reinforce Offense", 	exec "VoiceTeamChat ReinforceOffense"; 	close wm_quickcommand,	"r", 7 )
	QM_MENU_ITEM_TEAM( "E. Reinforce Defense", 	exec "VoiceTeamChat ReinforceDefense"; 	close wm_quickcommand,	"e", 8 )

QM_MENU_END

QM_MENU_START( "wm_quickmisc" )

	QM_MENU_ITEM_TEAM( "Y. Yes",			exec "VoiceTeamChat Affirmative"; 	close wm_quickmisc, "y", 0 )
	QM_MENU_ITEM_TEAM( "N. No",				exec "VoiceTeamChat Negative"; 		close wm_quickmisc, "n", 1 )
	QM_MENU_ITEM_TEAM( "T. Thanks",			exec "VoiceTeamChat Thanks"; 		close wm_quickmisc, "t", 2 )
	QM_MENU_ITEM_TEAM( "W. Welcome",		exec "VoiceTeamChat Welcome"; 		close wm_quickmisc, "w", 3 )
	QM_MENU_ITEM_TEAM( "S. Sorry",			exec "VoiceTeamChat Sorry"; 		close wm_quickmisc, "s", 4 )
	QM_MENU_ITEM_TEAM( "O. Oops", 			exec "VoiceTeamChat Oops"; 			close wm_quickmisc, "o", 5 )

QM_MENU_END

QM_MENU_START( "wm_quickglobal" )

	QM_MENU_ITEM( "Y. Yes",				exec "VoiceChat Affirmative"; 	close wm_quickglobal, 	"y", 0 )
	QM_MENU_ITEM( "N. No",				exec "VoiceChat Negative"; 		close wm_quickglobal, 	"n", 1 )
	QM_MENU_ITEM( "W. Enemy Weak",		exec "VoiceChat EnemyWeak";		close wm_quickglobal, 	"w", 2 )
	QM_MENU_ITEM( "H. Hi",				exec "VoiceChat Hi"; 			close wm_quickglobal, 	"h", 3 )
	QM_MENU_ITEM( "B. Bye",				exec "VoiceChat Bye"; 			close wm_quickglobal, 	"b", 4 )
	QM_MENU_ITEM( "S. Great Shot",		exec "VoiceChat GreatShot"; 	close wm_quickglobal, 	"s", 5 )
	QM_MENU_ITEM( "C. Cheer",			exec "VoiceChat Cheer"; 		close wm_quickglobal, 	"c", 6 )
	QM_MENU_ITEM( "G. More Globals",	close wm_quickglobal;			open wm_quickglobal2, 	"g", 7 )

QM_MENU_END

QM_MENU_START( "wm_quickglobal2" )

	QM_MENU_ITEM( "T. Thanks",		exec "VoiceChat Thanks";	close wm_quickglobal2, 	"t", 0 )
	QM_MENU_ITEM( "W. Welcome",		exec "VoiceChat Welcome"; 	close wm_quickglobal2, 	"w", 1 )
	QM_MENU_ITEM( "O. Oops",		exec "VoiceChat Oops"; 		close wm_quickglobal2, 	"o", 2 )
	QM_MENU_ITEM( "S. Sorry",		exec "VoiceChat Sorry"; 	close wm_quickglobal2, 	"s", 3 )
	QM_MENU_ITEM( "H. Hold Fire!",	exec "VoiceChat HoldFire";	close wm_quickglobal2, 	"h", 4 )
	QM_MENU_ITEM( "G. Good Game",	exec "VoiceChat GoodGame";	close wm_quickglobal2, 	"g", 5 )

QM_MENU_END

QM_MENU_START( "wm_quickobjectives" )

	QM_MENU_ITEM_TEAM( "A. Command Acknowledged",		exec "VoiceTeamChat CommandAcknowledged"; 		close wm_quickobjectives,	"a", 0 )
	QM_MENU_ITEM_TEAM( "D. Command Declined",			exec "VoiceTeamChat CommandDeclined";			close wm_quickobjectives,	"d", 1 )
	QM_MENU_ITEM_TEAM( "C. Command Completed",			exec "VoiceTeamChat CommandCompleted";			close wm_quickobjectives,	"c", 2 )
	QM_MENU_ITEM_TEAM( "P. Destroy Primary Objective",	exec "VoiceTeamChat DestroyPrimary"; 			close wm_quickobjectives,	"p", 3 )
	QM_MENU_ITEM_TEAM( "S. Destroy Secondary Objective",	exec "VoiceTeamChat DestroySecondary";		close wm_quickobjectives,	"s", 4 )
	QM_MENU_ITEM_TEAM( "X. Destroy Construction",		exec "VoiceTeamChat DestroyConstruction";		close wm_quickobjectives,	"x", 5 )
	QM_MENU_ITEM_TEAM( "M. Commencing Construction",	exec "VoiceTeamChat ConstructionCommencing";	close wm_quickobjectives, 	"m", 6 )
	QM_MENU_ITEM_TEAM( "R. Repair Vehicle",				exec "VoiceTeamChat RepairVehicle";				close wm_quickobjectives,	"r", 7 )
	QM_MENU_ITEM_TEAM( "V. Disable Vehicle",			exec "VoiceTeamChat DestroyVehicle";			close wm_quickobjectives,	"v", 8 )
	QM_MENU_ITEM_TEAM( "E. Escort Vehicle",				exec "VoiceTeamChat EscortVehicle";				close wm_quickobjectives,	"e", 9 )

QM_MENU_END
