//#include "ui/menudef.h"
//#include "ui_mp/common_macro.inc"

/*
#define CHOICE_X_START			0
#define CHOICE_Y_START			34

#define CHOICE_SEP_OFFSET_Y		-2
*/
//#define CHOICE_GROUP			"items"


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

// generic text draw
#define TEXT_DRAW_ALIGNED_EXP( prect, porigin, ptext, psize, palignx, paligny, palign, pcolor, visArg ) \
itemDef { \
	rect			prect \
	origin 			porigin \
	textalignx		palignx textaligny paligny \
	textstyle		ITEM_TEXTSTYLE_SHADOWED \
	textalign		palign \
	textscale		psize \
	forecolor		pcolor \
	exp				text( ptext ); \
	visible			visArg decoration autowrapped }

#define LOCAL_ITEM_FRAME \
	UI_EDGE_REVERSE( GAMEINFO_ORIGIN,HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0, 0, 0.1 0.1 0.1 1 ) \
	UI_EDGE_REVERSE( GAMEINFO_ORIGIN,HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0, 0, 0.9 0.95 1 0.4 )\
	PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN GAMEINFO_WIDTH 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 5 0, "white", 0.1 0.1 0.1 1, 0, 0, 0 0 0 0 )\
	PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN (-(GAMEINFO_WIDTH)) 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 5 0, "gradient_fadein", 0.9 0.95 1 0.4, 0, 0, 0 0 0 0 )\	
	PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN -80 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, (GAMEINFO_WIDTH-76) 0, "ui_perforation", 1 1 1 1, 0, 0, 0 0 0 0 )\
	PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 16 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 20, "gradient_top", 0 0 0 .75, 0, 0, 0 0 0 0 )\
	PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 16 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 (GAMEINFO_HEIGHT-22), "gradient_bottom", 0 0 0 .75, 0, 0, 0 0 0 0 )

#define LOCAL_ITEM_FRAME_BG \
	PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 92 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 (GAMEINFO_HEIGHT-6), "white", 0 0 0 0.4, 0, 0, 0 0 0 0 )\

// macros for the item display info
#define LOCAL_ITEM_SHOW( p_mapname, p_mapname2, offset ) \
	hide "map_image_group"; \
	hide "map_name_group"; \
	hide "map_desc_group"; \
	show "image_"p_mapname; \
	show "name_"p_mapname; \
	show "desc_"p_mapname;

#define rank (stat(2350)+1)
#define SPRAY_TABLE "mp/sprayTable.csv"
#define CHARACTER_TABLE "mp/characterTable.csv"
#define ITEM_TABLE "mp/itemTable.csv"

#define LOCAL_SPRAY_UNLOCKED( itemNum, p_itemname, id, response, offset, page )\
	CHOICE_BUTTON_FOCUS_VIS( itemNum, dvarString(tableLookup(SPRAY_TABLE, 0, id, 5)), scriptMenuResponse response; close self;, LOCAL_ITEM_SHOW( p_itemname, dvarString(tableLookup(SPRAY_TABLE, 0, id, 5)), offset ), ;, when(rank >= tableLookup(SPRAY_TABLE, 0, id, 2) && dvarString("ui_sprays_page") == page) )\
	TEXT_DRAW_ALIGNED_EXP( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-8) GAMEINFO_HEIGHT2 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 (GAMEINFO_HEIGHT+12), dvarString(tableLookup(SPRAY_TABLE, 0, id, 6)), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, 1 1 1 1 name "desc_"p_itemname group "map_desc_group" autowrapped, when(rank >= tableLookup(SPRAY_TABLE, 0, id, 2) && dvarString("ui_sprays_page") == page) )\
	PREPROC_SHADER_DRAW_ALIGNED_VIS( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_WIDTH2-8) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 5, tableLookup(SPRAY_TABLE, 0, id, 3), 1 1 1 1, 0, 0, 0 0 0 0 name "image_"p_itemname group "map_image_group", when(rank >= tableLookup(SPRAY_TABLE, 0, id, 2) && dvarString("ui_sprays_page") == page) ) 

#define LOCAL_SPRAY_LOCKED( itemNum, p_itemname, id, offset, page )\
	CHOICE_BUTTON_FOCUS_VIS( itemNum, ("^0"+dvarString(tableLookup(SPRAY_TABLE, 0, id, 5))), ;, LOCAL_ITEM_SHOW( p_itemname, ("^0"+dvarString(tableLookup(SPRAY_TABLE, 0, id, 5))), offset ), ;, when(rank < tableLookup(SPRAY_TABLE, 0, id, 2) && dvarString("ui_sprays_page") == page) )\
	TEXT_DRAW_ALIGNED_EXP( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-8) GAMEINFO_HEIGHT2 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 (GAMEINFO_HEIGHT+12), ( "Unlocked at level ^3"+tableLookup(SPRAY_TABLE, 0, id, 2)+"^7." ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, 1 1 1 1 name "desc_"p_itemname group "map_desc_group" autowrapped, when(rank < tableLookup(SPRAY_TABLE, 0, id, 2) && dvarString("ui_sprays_page") == page) )\
	PREPROC_SHADER_DRAW_ALIGNED_VIS( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_WIDTH2-8) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 5, tableLookup(SPRAY_TABLE, 0, id, 3), 1 1 1 1, 0, 0, 0 0 0 0 name "image_"p_itemname group "map_image_group", when(rank < tableLookup(SPRAY_TABLE, 0, id, 2) && dvarString("ui_sprays_page") == page) ) 

#define LOCAL_SPRAY_SELECTION( itemNum, p_itemname, id, response, offset, page )\
	LOCAL_SPRAY_LOCKED( itemNum, p_itemname, id, offset, page )\
	LOCAL_SPRAY_UNLOCKED( itemNum, p_itemname, id, response, offset, page )



#define LOCAL_CHARACTER_UNLOCKED( itemNum, p_itemname, id, response, offset )\
	CHOICE_BUTTON_FOCUS_VIS( itemNum,tableLookup(CHARACTER_TABLE, 0, id, 5), scriptMenuResponse response; close self;, LOCAL_ITEM_SHOW( p_itemname, tableLookup(CHARACTER_TABLE, 0, id, 5), offset ), ;, when(rank >= tableLookup(CHARACTER_TABLE, 0, id, 2)) )\
	TEXT_DRAW_ALIGNED_EXP( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-8) GAMEINFO_HEIGHT2 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 (GAMEINFO_HEIGHT+12), tableLookup(CHARACTER_TABLE, 0, id, 6), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, 1 1 1 1 name "desc_"p_itemname group "map_desc_group" autowrapped, when(rank >= tableLookup(CHARACTER_TABLE, 0, id, 2)) )\
	PREPROC_SHADER_DRAW_ALIGNED_VIS( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_WIDTH2-8) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 5, tableLookup(CHARACTER_TABLE, 0, id, 3), 1 1 1 1, 0, 0, 0 0 0 0 name "image_"p_itemname group "map_image_group", when(rank >= tableLookup(CHARACTER_TABLE, 0, id, 2) ) ) 

#define LOCAL_CHARACTER_LOCKED( itemNum, p_itemname, id, offset )\
	CHOICE_BUTTON_FOCUS_VIS( itemNum, ("^0"+tableLookup(CHARACTER_TABLE, 0, id, 5)), ;, LOCAL_ITEM_SHOW( p_itemname, ("^0"+tableLookup(CHARACTER_TABLE, 0, id, 5)), offset ), ;, when(rank < tableLookup(CHARACTER_TABLE, 0, id, 2)) )\
	TEXT_DRAW_ALIGNED_EXP( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-8) GAMEINFO_HEIGHT2 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 (GAMEINFO_HEIGHT+12), ( "Unlocked at level ^3"+tableLookup(CHARACTER_TABLE, 0, id, 2)+"^7." ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, 1 1 1 1 name "desc_"p_itemname group "map_desc_group" autowrapped, when(rank < tableLookup(CHARACTER_TABLE, 0, id, 2)) )\
	PREPROC_SHADER_DRAW_ALIGNED_VIS( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_WIDTH2-8) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 5, tableLookup(CHARACTER_TABLE, 0, id, 3), 1 1 1 1, 0, 0, 0 0 0 0 name "image_"p_itemname group "map_image_group", when( rank < tableLookup(CHARACTER_TABLE, 0, id, 2)) ) 

#define LOCAL_CHARACTER_SELECTION( itemNum, p_itemname, id, response, offset)\
	LOCAL_CHARACTER_LOCKED( itemNum, p_itemname, id, offset )\
	LOCAL_CHARACTER_UNLOCKED( itemNum, p_itemname, id, response, offset )



#define LOCAL_ITEM_UNLOCKED( itemNum, p_itemname, id, response, offset )\
	CHOICE_BUTTON_FOCUS_VIS( itemNum,tableLookup(ITEM_TABLE, 0, id, 5), scriptMenuResponse response; close self;, LOCAL_ITEM_SHOW( p_itemname, tableLookup(ITEM_TABLE, 0, id, 5), offset ), ;, when(rank >= tableLookup(ITEM_TABLE, 0, id, 2)) )\
	TEXT_DRAW_ALIGNED_EXP( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-8) GAMEINFO_HEIGHT2 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 (GAMEINFO_HEIGHT+12), tableLookup(ITEM_TABLE, 0, id, 6), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, 1 1 1 1 name "desc_"p_itemname group "map_desc_group" autowrapped, when(rank >= tableLookup(ITEM_TABLE, 0, id, 2)) )\
	PREPROC_SHADER_DRAW_ALIGNED_VIS( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_WIDTH2-8) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 5, tableLookup(ITEM_TABLE, 0, id, 3), 1 1 1 1, 0, 0, 0 0 0 0 name "image_"p_itemname group "map_image_group", when(rank >= tableLookup(ITEM_TABLE, 0, id, 2) ) ) 

#define LOCAL_ITEM_LOCKED( itemNum, p_itemname, id, offset )\
	CHOICE_BUTTON_FOCUS_VIS( itemNum, ("^0"+tableLookup(ITEM_TABLE, 0, id, 5)), ;, LOCAL_ITEM_SHOW( p_itemname, ("^0"+tableLookup(ITEM_TABLE, 0, id, 5)), offset ), ;, when(rank < tableLookup(ITEM_TABLE, 0, id, 2)) )\
	TEXT_DRAW_ALIGNED_EXP( GAMEINFO_ORIGIN (GAMEINFO_WIDTH-8) GAMEINFO_HEIGHT2 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 4 (GAMEINFO_HEIGHT+12), ( "Unlocked at level ^3"+tableLookup(ITEM_TABLE, 0, id, 2)+"^7." ), TEXTSIZE_SMALL, 0, 0, ITEM_ALIGN_LEFT, 1 1 1 1 name "desc_"p_itemname group "map_desc_group" autowrapped, when(rank < tableLookup(ITEM_TABLE, 0, id, 2)) )\
	PREPROC_SHADER_DRAW_ALIGNED_VIS( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_WIDTH2-8) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 5, tableLookup(ITEM_TABLE, 0, id, 3), 1 1 1 1, 0, 0, 0 0 0 0 name "image_"p_itemname group "map_image_group", when( rank < tableLookup(ITEM_TABLE, 0, id, 2)) ) 

#define LOCAL_ITEM_SELECTION( itemNum, p_itemname, id, response, offset)\
	LOCAL_ITEM_LOCKED( itemNum, p_itemname, id, offset )\
	LOCAL_ITEM_UNLOCKED( itemNum, p_itemname, id, response, offset )


#define LOCAL_GROUP_IMAGE(pname, pimage) \
	PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_WIDTH2-8) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 5, pimage, 1 1 1 1, 0, 0, 0 0 0 0 name pname group act_group )

{
	menuDef
	{
		name			"character_stuff"
		rect			0 0 640 480
		focuscolor		COLOR_FOCUSED
		style			WINDOW_STYLE_EMPTY
		blurWorld		7.0
		legacySplitScreenScale
		//soundloop 		"music_mainmenu_mp"
		onOpen
		{
			//hide act_group;
			setLocalVarInt ui_hide_act_button 0;		
			show character;
		}
		onEsc			{	close "character_stuff";	}
		onClose			{}
		#include "ui/blurredbg.inc"
		//#include "ui_mp/navcontrols.inc"
		
		CHOICE_MENU_TITLE( "Customize Character" )
					
		/*#ifdef PC
			PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 (GAMEINFO_WIDTH2-8) HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 5, "brax_logo", 1 1 1 1, 0, 0, 0 0 0 0 )
		#endif*/
			
		LOCAL_GROUP_IMAGE( "character", "character_sas" )
		LOCAL_GROUP_IMAGE( "spray", "spray0_menu" )
		LOCAL_GROUP_IMAGE( "item", "weapon_m9beretta" )

		
		UI_EDGE_REVERSE( GAMEINFO_ORIGIN,HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0, 0, 0.1 0.1 0.1 1 ) 
		UI_EDGE_REVERSE( GAMEINFO_ORIGIN,HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0, 0, 0.9 0.95 1 0.4 )
		PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN GAMEINFO_WIDTH 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 5 0, "white", 0.1 0.1 0.1 1, 0, 0, 0 0 0 0 )
		PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN (-(GAMEINFO_WIDTH)) 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 5 0, "gradient_fadein", 0.9 0.95 1 0.4, 0, 0, 0 0 0 0 )
		PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN -80 20 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, (GAMEINFO_WIDTH-76) 0, "ui_perforation", 1 1 1 1, 0, 0, 0 0 0 0 )
		
		PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 16 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 20, "gradient_top", 0 0 0 .75, 0, 0, 0 0 0 0 )
		PREPROC_SHADER_DRAW_ALIGNED( GAMEINFO_ORIGIN GAMEINFO_WIDTH2 16 HORIZONTAL_ALIGN_CENTER VERTICAL_ALIGN_CENTER, 0 (GAMEINFO_HEIGHT-22), "gradient_bottom", 0 0 0 .75, 0, 0, 0 0 0 0 )	
		
		CHOICE_BUTTON_FOCUS_VIS( 1, "Characters", hide character; hide spray; hide item; open "characters", hide act_group; hide spray; show character;, ;, when( localVarInt( ui_hide_act_button ) == 0 ); )
		CHOICE_BUTTON_FOCUS_VIS( 2, "Sprays", hide spray; hide character;  hide item; open "sprays1", hide act_group; hide character; show spray;, ;, when( localVarInt( ui_hide_act_button ) == 0 ); )
		CHOICE_BUTTON_FOCUS_VIS( 3, "Weapons", hide spray; hide character; hide item; open "items", hide act_group; hide character; show spray;, ;, when( localVarInt( ui_hide_act_button ) == 0 ); )
		CHOICE_BUTTON_FOCUS_VIS( 4, "Abilities ^1(NOT IMPLEMENTED)", ;, hide act_group;, ;, when( localVarInt( ui_hide_act_button ) == 0 ); )		

		CHOICE_BUTTON_FOCUS_VIS( 6, "Challenges", open menu_challenges;, hide act_group;, ;, when( localVarInt( ui_hide_act_button ) == 0 ); )		
		CHOICE_BUTTON_FOCUS_VIS( 7, "Enter Prestige ^1(NOT IMPLEMENTED)", ;, hide act_group;, ;, when( localVarInt( ui_hide_act_button ) == 0 ); )		
		
		CHOICE_BUTTON_FOCUS_VIS( 9, "Done", close "character_stuff"; open "team_select";, hide act_group;, ;, when( localVarInt( ui_hide_act_button ) == 0 ); )		
				
		#undef GAMEINFO_HEIGHT
		#undef GAMEINFO_HEIGHT2
		#define GAMEINFO_HEIGHT			258
		#define GAMEINFO_HEIGHT2		(86+PC_OFFSET_Y)
	}

	menuDef
	{
		name			"characters"
		rect			0 0 640 480
		exp				rect X(0)
		exp				rect Y(0)
		focuscolor		COLOR_FOCUSED
		style			WINDOW_STYLE_FILLED
		onOpen			{ setLocalVarInt ui_hide_act_button 1; hide spray; }
		onClose			{ setLocalVarInt ui_hide_act_button 0; }
		onESC			{ close self; }
		ACT_BG( "Select Character", character )
			
		LOCAL_ITEM_FRAME_BG
		LOCAL_ITEM_FRAME

		//LOCAL_CHARACTER_SELECTION(Num,name, p_itemname, pdesc, action, offset, visArg )
		
		LOCAL_CHARACTER_SELECTION( 1, "c1", 1, "0", 0 )
		LOCAL_CHARACTER_SELECTION( 2, "c2", 2, "1", 0 )
		LOCAL_CHARACTER_SELECTION( 3, "c3", 3, "2", 0 )
		LOCAL_CHARACTER_SELECTION( 4, "c4", 4, "3", 0 )
		LOCAL_CHARACTER_SELECTION( 5, "c5", 5, "4", 0 )
		LOCAL_CHARACTER_SELECTION( 6, "c6", 6, "5", 0 )
		LOCAL_CHARACTER_SELECTION( 7, "c7", 7, "6", 0 )
		LOCAL_CHARACTER_SELECTION( 8, "c8", 8, "7", 0 )
		LOCAL_CHARACTER_SELECTION( 9, "c9", 9, "8", 0 )
		LOCAL_CHARACTER_SELECTION( 10, "c10", 10, "9", 0 )
		LOCAL_CHARACTER_SELECTION( 11, "c11", 11, "10", 0 )
		
		/*LOCAL_CHARACTER_SELECTION( 1, "SAS","sas","SAS Marine.", scriptMenuResponse "character_sas"; close "characters";, 0, 1 )

		LOCAL_CHARACTER_SELECTION( 2, "Gangster",   "gangster"		,"Gangster.", scriptMenuResponse "character_gangster"; close "characters";, 1, when(rank >= 2) )
		LOCAL_CHARACTER_SELECTION( 3, "Farmer",   	"farmer" 		,"Fat Farmer.", scriptMenuResponse "character_farmer"; close "characters";,2, when(rank >= 5) )
		LOCAL_CHARACTER_SELECTION( 4, "Zoey",   	"zoey" 			,"Zoey - the woman ^^.", scriptMenuResponse "character_zoey"; close "characters";, 3, when(rank >= 8) )
		LOCAL_CHARACTER_SELECTION( 5, "General Shepherd"			,"shepherd", "US Army General Shepherd.", scriptMenuResponse "character_shepherd"; close "characters";, 3, when(rank >= 11) )
		LOCAL_CHARACTER_SELECTION( 6, "Masterchief"					,"masterchief", "Played Halo? Huh?", scriptMenuResponse "character_masterchief"; close "characters";, 3, when(rank >= 14) )
		LOCAL_CHARACTER_SELECTION( 7, "Makarov"						,"makarov", "Friend of Zakhaev.", scriptMenuResponse "character_makarov"; close "characters";, 3, when(rank >= 15 ) )
		LOCAL_CHARACTER_SELECTION( 8, "Juggernaut"					,"juggernaut", "Guy with very heavy armor.", scriptMenuResponse "character_juggernaut"; close "characters";, 3, when(rank >= 17 ) )
		*/
		LOCAL_ITEM_FRAME
		
	}


	menuDef
	{
		name			"sprays1"
		rect			0 0 640 480
		exp				rect X(0)
		exp				rect Y(0)
		focuscolor		COLOR_FOCUSED
		style			WINDOW_STYLE_FILLED
		onOpen			{ setLocalVarInt ui_hide_act_button 1; execnow "set ui_sprays_page 0"; hide character }
		onClose			{ setLocalVarInt ui_hide_act_button 0; }
		onESC			{ close self; }
		ACT_BG( "Select Spray", spray )

		
			
		LOCAL_ITEM_FRAME_BG
		LOCAL_ITEM_FRAME
		//LOCAL_SPRAY_SELECTION( itemNum, p_itemname, id, script response, offset, page )
		LOCAL_SPRAY_SELECTION( 1, "s1", 1, "0", 0, "0" )
		LOCAL_SPRAY_SELECTION( 2, "s2", 2, "1", 0, "0" )
		LOCAL_SPRAY_SELECTION( 3, "s3", 3, "2", 0, "0" )
		LOCAL_SPRAY_SELECTION( 4, "s4", 4, "3", 0, "0" )
		LOCAL_SPRAY_SELECTION( 5, "s5", 5, "4", 0, "0" )
		LOCAL_SPRAY_SELECTION( 6, "s6", 6, "5", 0, "0" )
		LOCAL_SPRAY_SELECTION( 7, "s7", 7, "6", 0, "0" )
		LOCAL_SPRAY_SELECTION( 8, "s8", 8, "7", 0, "0" )
		LOCAL_SPRAY_SELECTION( 9, "s9", 9, "8", 0, "0" )
		LOCAL_SPRAY_SELECTION( 10, "s10", 10, "9", 0, "0" )
		LOCAL_SPRAY_SELECTION( 11, "s11", 11, "10", 0, "0" )

		/*LOCAL_SPRAY_SELECTION( 1, "s12", 12, 0, "1" )
		LOCAL_SPRAY_SELECTION( 2, "s13", 13, 0, "1" )
		LOCAL_SPRAY_SELECTION( 3, "s14", 14, 0, "1" )
		LOCAL_SPRAY_SELECTION( 4, "s15", 12, 0, "1" )
		LOCAL_SPRAY_SELECTION( 5, "s16", 13, 0, "1" )
		LOCAL_SPRAY_SELECTION( 6, "s17", 14, 0, "1" )	
		LOCAL_SPRAY_SELECTION( 7, "s18", 14, 0, "1" )	
		LOCAL_SPRAY_SELECTION( 8, "s19", 14, 0, "1" )	
		LOCAL_SPRAY_SELECTION( 9, "s20", 14, 0, "1" )	
		LOCAL_SPRAY_SELECTION( 10, "s21", 14, 0, "1" )	*/

		CHOICE_BUTTON_VIS( 13, "^3Next Page >>", play "mouse_click"; close self; open "sprays2";, when( 1 ) )
		LOCAL_ITEM_FRAME
	}

	menuDef
	{
		name			"sprays2"
		rect			0 0 640 480
		exp				rect X(0)
		exp				rect Y(0)
		focuscolor		COLOR_FOCUSED
		style			WINDOW_STYLE_FILLED
		onOpen			{ setLocalVarInt ui_hide_act_button 1; execnow "set ui_sprays_page 0"; hide character }
		onClose			{ setLocalVarInt ui_hide_act_button 0; }
		onESC			{ close self; }
		ACT_BG( "Select Spray", spray )
			
		LOCAL_ITEM_FRAME_BG
		LOCAL_ITEM_FRAME
		//LOCAL_SPRAY_SELECTION( itemNum, p_itemname, id, offset, page )
		LOCAL_SPRAY_SELECTION( 1, "s1", 12, "11", 0, "0" )
		LOCAL_SPRAY_SELECTION( 2, "s2", 13, "12", 0, "0" )
		LOCAL_SPRAY_SELECTION( 3, "s3", 14, "13", 0, "0" )
		LOCAL_SPRAY_SELECTION( 4, "s4", 15, "14", 0, "0" )
		LOCAL_SPRAY_SELECTION( 5, "s5", 16, "15", 0, "0" )
		LOCAL_SPRAY_SELECTION( 6, "s6", 17, "16", 0, "0" )	
		LOCAL_SPRAY_SELECTION( 7, "s7", 18, "17", 0, "0" )	
		LOCAL_SPRAY_SELECTION( 8, "s8", 19, "18", 0, "0" )	
		LOCAL_SPRAY_SELECTION( 9, "s9", 20, "19", 0, "0" )	
		LOCAL_SPRAY_SELECTION( 10, "s10", 21, "20", 0, "0" )

		//CHOICE_BUTTON_VIS( 13, "^3Kovetkezo oldal >>", play "mouse_click"; hide "s1"; execnow "ui_sprays_page 1";, when( dvarString( "ui_sprays_page" ) == "0" ) )
		CHOICE_BUTTON_VIS( 13, "^3<< Previous Page", play "mouse_click"; close self; open "sprays1";, when( 1 ) )	
		LOCAL_ITEM_FRAME
	}

	menuDef
	{
		name			"items"
		rect			0 0 640 480
		exp				rect X(0)
		exp				rect Y(0)
		focuscolor		COLOR_FOCUSED
		style			WINDOW_STYLE_FILLED
		onOpen			{ setLocalVarInt ui_hide_act_button 1; hide spray; }
		onClose			{ setLocalVarInt ui_hide_act_button 0; }
		onESC			{ close self; }
		ACT_BG( "Select Weapon", character )
			
		LOCAL_ITEM_FRAME_BG
		LOCAL_ITEM_FRAME
		
		LOCAL_ITEM_SELECTION( 1, "c1", 1, "0", 0 )
		LOCAL_ITEM_SELECTION( 2, "c2", 2, "1", 0 )
		LOCAL_ITEM_SELECTION( 3, "c3", 3, "2", 0 )
		LOCAL_ITEM_SELECTION( 4, "c4", 4, "3", 0 )
		LOCAL_ITEM_SELECTION( 5, "c5", 5, "4", 0 )
		LOCAL_ITEM_SELECTION( 6, "c6", 6, "5", 0 )
		LOCAL_ITEM_SELECTION( 7, "c7", 7, "6", 0 )
		LOCAL_ITEM_SELECTION( 8, "c8", 8, "7", 0 )

		LOCAL_ITEM_FRAME
		
	}
}

