#include "ui/menudef.h"

{
	assetGlobalDef {
		font "fonts/normal" 16				// font
		smallFont "fonts/smallFont" 12			// font
		bigFont "fonts/bigFont" 24			// font
		cursor "ui/assets/3_cursor3"			// cursor	
		gradientBar "ui/assets/gradientbar2.tga"	// gradient bar
		itemFocusSound "sound/misc/menu2.wav"	
					// sound for item getting focus (via keyboard or mouse )

		fadeClamp 1.0				// sets the fadeup alpha
		fadeCycle 1					// how often fade happens in milliseconds
		fadeAmount 0.1				// amount to adjust alpha per cycle
		
		shadowColor 0.1 0.1 0.1 0.25			// shadow color
		}
							   




menuDef {
	name "main"
//	background "menuback_cw"		// Spinning Circle Background
	fullScreen MENU_TRUE				
	rect 0 0 640 480				// Size and position of the menu
	visible MENU_TRUE				// Visible on open
	focusColor .9 .85 1 .8			// Menu focus color for text and items
	soundloop ""
					
	onOpen { 
		setitemcolor fadebox backcolor 0 0 0 1 ; 
		playlooped "sound/music/l_theme.wav" ;
		fadeout fadebox ;
	 //  	play "sound/misc/tim_pump.wav" ; 
		uiScript stopRefresh ;
		}
		
	onESC { open quit_popmenu }
	


	itemDef {
		name modelselection 				//Precache player model	
		ownerdraw UI_PLAYERMODEL			//Ownerdraw for player models
		rect 0 0 0 0 
		style 1
		decoration 
		visible 1
    	}


	// black background
	itemDef {
		name blackback
		style WINDOW_STYLE_SHADER
		rect -10 0 660 480
		scralign stretchAll
		background "ui/assets/fadebox.tga"
		forecolor 0 0 0 1
		backcolor 0 0 0 1
		visible 1
		decoration
		}



	itemDef {
		name backimage2					// backimage2
		style WINDOW_STYLE_SHADER
		rect 0 0 640 480
//		scralign stretch
		background "backimage2"
		visible 1
		decoration
		}





	itemDef {
		name testmodel_bj
		type ITEM_TYPE_MODEL
		rect 90 80 800 800  
		model_angle -110
		asset_model "models/mapobjects/bjui/bjui_b.MD3"
		model_animplay 0 200 0 30
		model_fovx 37
		model_fovy 34
		visible 1
		decoration
		}




	itemDef {
		name video_over1					// video_over1
		style WINDOW_STYLE_SHADER
		rect 230 0 410 480
//		scralign stretch
		background "video_over1"
		visible 1
		decoration
    	}



	itemDef {
		name testmodel_aflag1
		type ITEM_TYPE_MODEL
		rect 150 0 800 600 
		model_angle 90
		model_origin 100 100 100
		asset_model "models/mapobjects/flag/flag_americanui.MD3"
		model_animplay 0 114 0 10
		model_fovx 40
		model_fovy 40
		visible 1
		decoration
		}




	itemDef {
		name band2						// band2
		style WINDOW_STYLE_SHADER
		rect 360 20 128 640
		scralign stretch
		background "band2"
		visible 1
		decoration
		}
	

	itemDef {
		name bands						// bands
		style WINDOW_STYLE_SHADER
//		rect 200 -480 640 1024
      	rect 0 -480 640 1024
		scralign stretch
		background "bands"
		visible 1
		decoration
		}


	itemDef {
		name backimage4					// left side image with black gradient  
		style WINDOW_STYLE_SHADER
		rect 0 0 343 480
//		scralign stretch
		background "backimage4"
		visible 1
		decoration
		}


	itemDef {
		name testmodel_nflag1
		type ITEM_TYPE_MODEL
		rect -350 -30 800 600 
		model_angle -130
		model_origin 100 100 100
		asset_model "models/mapobjects/flag/flag_naziui.MD3"
		model_animplay 0 114 0 10
		model_fovx 40
		model_fovy 40
		visible 1
		decoration
		}
		
	// black left model cap for surround modes
	itemDef {
		name blackleft
		style WINDOW_STYLE_SHADER
		rect -120 0 120 480
		scralign stretch
		background "ui/assets/fadebox.tga"
		forecolor 0 0 0 1
		backcolor 0 0 0 1
		visible 1
		decoration
		}
		
	// black right model cap for surround modes
	itemDef {
		name blackright
		style WINDOW_STYLE_SHADER
		rect 640 0 120 480
		scralign stretch
		background "ui/assets/fadebox.tga"
		forecolor 0 0 0 1
		backcolor 0 0 0 1
		visible 1
		decoration
		}

	itemDef {
		name BLACKGRAD					// BLACKGRAD
		style WINDOW_STYLE_SHADER
		rect 0 -4 640 132
		scralign topStretch
		background "BLACKGRAD"
		visible 1
		decoration
		}

	itemDef {
		name BLACKGRAD2					// BLACKGRAD
		style WINDOW_STYLE_SHADER
		rect 0 370 640 -128
		scralign bottomStretch
		background "BLACKGRAD"
		visible 1
		decoration
		}
/*		
	itemDef {
		name gold_line					// gold_line
		style WINDOW_STYLE_SHADER
		rect 0 410 640 10
		scralign bottomStretch
		background "gold_line"
		visible 1
		decoration
		}
		
	itemDef {
		name gold_line					// gold_line
		style WINDOW_STYLE_SHADER
		rect 0 76 640 10
		scralign topStretch
		background "gold_line"
		visible 1
		decoration
		}
		
	itemDef {
		name FLAME_BACK					// Flame black background
		style WINDOW_STYLE_SHADER
		rect 210 20 220 67
		background "ui/assets/fadebox.tga"
		visible 1
		decoration
		}
*/
	itemDef {
		name FLAME						// FLAME
		style WINDOW_STYLE_SHADER
		rect 210 20 220 67
		background "fLAME"
		visible 1
		decoration
		}
		
	itemDef {
		name testmodel_icon_burn
		type ITEM_TYPE_MODEL
		rect 140 266 360 326
		model_angle 90
		model_origin 0 0 0
		asset_model "models/mapobjects/ui/icon_burn.MD3"
		model_fovx 90
		model_fovy 90
		visible 1
		decoration
		}
		
	itemDef {
		name WOLFFLAMELOGO				// WOLFFLAMELOGO
		style WINDOW_STYLE_SHADER
		rect 200 -5 240 120
		background "WOLFFLAMELOGO"
		visible 1
		decoration
		}


	itemDef {
		name WOLFICON					// WOLFICON
		style WINDOW_STYLE_SHADER
		rect 220 380 200 100
		background "WOLFICON"
		visible 1
		decoration
		}

	itemDef {
		name gold_line					// gold_line
		style WINDOW_STYLE_SHADER
		rect 0 410 250 10
//		rect -256 410 506 10
//		rect 233 410 17 10
		scralign stretchLeftCenter	// bottom	// bottomStretch
		background "gold_line"
		visible 1
		decoration
		}

	itemDef {
		name gold_line					// gold_line
		style WINDOW_STYLE_SHADER
		rect 390 410 250 10
//		rect 390 410 506 10
//		rect 390 410 17 10
		scralign stretchRightCenter	// bottom	// bottomStretch
		background "gold_line"
		visible 1
		decoration
		}


	itemDef {
		name gold_line					// gold_line
		style WINDOW_STYLE_SHADER
		rect 0 76 226 10
//		rect -256 76 482 10
//		rect 207 76 19 10
		scralign stretchLeftCenter	// top	// topStretch
		background "gold_line"
		visible 1
		decoration
		}

	itemDef {
		name gold_line					// gold_line
		style WINDOW_STYLE_SHADER
//		rect 414 76 230 10
//		rect 414 76 486 10
//		rect 414 76 19 10
		rect 414 76 226 10
		scralign stretchRightCenter	// top	// topStretch
		background "gold_line"
		visible 1
		decoration
		}


////////// GAMETYPE //////////////////////////////////////////////////////// 

	//	SINGLEPLAYER	// 


	itemDef {
		name play
		text "PLAY"
		type 1
		style 0	
		textstyle 6
		rect 16 396 40 14 
		textalign 0
		textscale .233		
		textalignx 2
		textaligny 14
		forecolor .9 .9 .9 1
		visible 1
		textfont UI_FONT_NORMAL
		mouseEnter {  fadein message_accept }
		action { play "sound/misc/zap.wav" ; 
		close main ; 
		open play_menu }
		}




	itemDef {
		name loadgame
		text "LOAD GAME"
		type 1
		style 0	
		textstyle 6
		rect 70 396 72 14 
		textalign 0
		textscale .2308		
		textalignx 0
		textaligny 14
		forecolor .9 .9 .9 .9
		visible 1 
		textfont UI_FONT_NORMAL
		mouseEnter { fadein message_accept }
		action {close main ; open load_menu ; play "sound/misc/zap.wav"; }
    	}
	





//	OPTIONS		// 


itemDef {
		name options
		text "OPTIONS"
		type 1
		style 0	
		textstyle 6
		rect 156 396 56 14 
		textalign 0
		textscale .2308		
		textalignx 2
		textaligny 14
		forecolor .9 .9 .9 1
		visible 1
		textfont UI_FONT_NORMAL 
		mouseEnter {fadein message_accept }
		action {play "sound/misc/zap.wav" ; 
		close main ; 
		open setup_menu ;
		open control_menu
		} 
    }


itemDef {
      	name playselection
      	text "MULTIPLAYER"
		type 1
		style 0	
		textstyle 6
		rect 430 396 84 14 
		textalign 0
		textscale .2308		
		textalignx 0
		textaligny 14
		textfont UI_FONT_NORMAL
		forecolor .9 .9 .9 1
		visible 1  
		mouseEnter {
		fadein message_accept}
		action {play "sound/misc/zap.wav";
		open multi_popmenu}
//		action { uiScript startMultiplayer }
    	}
   

itemDef {
	name credits
	text "CREDITS"
		type 1
		style 0	
		textstyle 6
		rect 530 396 52 14 
		textalign 0
		textscale .2308		
		textalignx 0
		textaligny 14
		textfont UI_FONT_NORMAL
		forecolor .9 .9 .9 .9
		visible 1 
	mouseEnter { fadein message_accept }
	action {	close main; open credit} 
   	}


//	QUIT	//



itemDef {
		name quit
		text "QUIT"
		type 1
		style 0	
		textstyle 6
		rect 600 396 32 14 
		textalign 0
		textscale .2308		
		textalignx 0
		textaligny 14
		textfont UI_FONT_NORMAL
		forecolor .9 .9 .9 .9
		visible 1 
		mouseEnter {
		fadein message_accept}
		action {play "sound/misc/zap.wav";
		open quit_popmenu}

}

//itemDef {
//      	name copyright
//      	text "Wolfenstein ID Software Copyright2001"
//      	style 0
//      	textscale .15
//      	rect 530 475 360 40
//      	textalign 1	
//      	textaligny 0
//      	textalignx 20 
//      	forecolor .7 .7 .7 .9      
//		visible 1 
//      	decoration 
//	}



itemDef {
      	name fadebox					// Box for fading in menus
      	style WINDOW_STYLE_FILLED
 		background "ui/assets/fadebox.tga"
		forecolor 0 0 0 1
		backcolor 0 0 0 1
		rect 0 0 640 480
      	visible 1 
		decoration
    	}

}
