#include "ui/menudef.h"

{
\\ SYSTEM MENU \\

menuDef {
    	name "ingame_system"
    	visible 0
    	fullscreen 0
		outOfBoundsClick			// this closes the window if it gets a click out of the rectangle
    	rect 298 30 276 325
    	focusColor 1 .75 0 1
    	style 1
    	border 1
	onopen { hide grpsystem ; show graphics }

itemDef {
	name window
	rect 10 15 256 310
	style 1
	backcolor 0 .1 0 1
	visible 1
	decoration
	}

// FRAME	//


itemDef {
	name window
	rect 0 10 64 64
	style 3
	background "ui/assets/ingameleftcorner.tga"
	visible 1
	decoration
	}

itemDef {
	name window
	rect 64 10 64 8
	style 3
	background "ui/assets/ingametop.tga"
	visible 1
	decoration
	}

itemDef {
	name window
	rect 167 10 64 8
	style 3
	background "ui/assets/ingametop.tga"
	visible 1
	decoration
	}

itemDef {
	name window
	rect 213 10 64 64
	style 3
	background "ui/assets/ingamerightcorner.tga"
	visible 1
	decoration
	}
itemDef {
	name window
	rect 103 0 64 16
	style 3
	background "ui/assets/ingameconnection.tga"
	visible 1
	decoration
	}
itemDef {
	name window
	rect 0 264 64 64
	style 3
	background "ui/assets/ingameleftcornerb.tga"
	visible 1
	decoration
	}
itemDef {
	name window
	rect 213 264 64 64
	style 3
	background "ui/assets/ingamerightcornerb.tga"
	visible 1
	decoration
	}

itemDef {
	name window
	rect 0 64 16 64
	style 3
	background "ui/assets/ingameleft.tga"
	visible 1
	decoration
	}


itemDef {
	name window
	rect 0 128 16 64
	style 3
	background "ui/assets/ingameleft.tga"
	visible 1
	decoration
	}

itemDef {
	name window
	rect 0 192 16 74
	style 3
	background "ui/assets/ingameleft.tga"
	visible 1
	decoration
	}

itemDef {
	name window
	rect 261 64 16 64
	style 3
	background "ui/assets/ingameright.tga"
	visible 1
	decoration
	}


itemDef {
	name window
	rect 261 128 16 64
	style 3
	background "ui/assets/ingameright.tga"
	visible 1
	decoration
	}
itemDef {
	name window
	rect 261 192 16 74
	style 3
	background "ui/assets/ingameright.tga"
	visible 1
	decoration
	}

itemDef {
	name window
	rect 64 320 74 8
	style 3
	background "ui/assets/ingamebottom.tga"
	visible 1
	decoration
	}
itemDef {
	name window
	rect 138 320 74 8
	style 3
	background "ui/assets/ingamebottom.tga"
	visible 1
	decoration
	}

itemDef {
	name ctr_graphics
	text "Graphics"
	type 1
	textscale .25
	group grpControlbutton
	style WINDOW_STYLE_FILLED
	background "ui/assets/button_back.tga"
	rect 30 25 65 20
	textalign 1
	textalignx 32
	textaligny 16
	forecolor 1 1 1 1
	backcolor .37 .1 .1 1 
	visible 1
	action { hide grpSystem ; show graphics }
	mouseEnter { setitemcolor ctr_graphics backcolor .1 .37 .1 1 }
      	mouseExit { setitemcolor ctr_graphics backcolor .37 .1 .1 1 }
	}

	itemDef {
      		name graphics				
		group grpSystem
      	type ITEM_TYPE_MULTI
			text "Quality:"
		cvar "ui_glCustom"
		cvarFloatList { "High Quality" 0 "Normal" 1 "Fast" 2 "Fastest" 3 "Custom" 4 }
		rect 0 50 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25         
      		forecolor 1 1 1 1
      		visible 0 
			action { uiScript update "ui_glCustom" }
    		}

	itemDef {
      		name graphics
		group grpSystem
     	type ITEM_TYPE_EDITFIELD
		text "GL Driver:"
		cvar "r_gldriver"
		//cvarFloatList {  }
		rect 0 70 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
			decoration
    		}

	itemDef {
      		name graphics
		group grpSystem
      		type ITEM_TYPE_YESNO
		text "GL Extensions:"
		cvar "r_allowExtensions"
		rect 0 90 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
		action { uiScript glCustom }
    		}
	
	itemDef {
      		name graphics
			group grpSystem
      		type ITEM_TYPE_MULTI
		text "Video Mode:"
		cvar "r_mode"
		cvarFloatList { "320x240" 0 "400x300" 1 "512x384" 2 "640x480" 3 "800x600" 4 "960x720" 5 "1024x768" 6 "1152x864" 7 "1280x1024" 8 "1600x1200" 9 "2048x1536" 10 "856x480 wide screen" 11 }
		rect 0 110 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
			action { uiScript glCustom }
    		}

	itemDef {
      		name graphics
		group grpSystem
      		type ITEM_TYPE_MULTI
		text "Color Depth:"
		cvar "r_colorbits"
		cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 }
		rect 0 130 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
			action { uiScript glCustom ; uiScript update "r_colorbits" }
    		}

	itemDef {
      		name graphics
		group grpSystem
      	 	type ITEM_TYPE_YESNO
		text "Fullscreen:"
		cvar "r_fullscreen"
		rect 0 150 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
			action { uiScript glCustom }
    		}

	itemDef {
      		name graphics
		group grpSystem
     		type ITEM_TYPE_MULTI
		text "Lighting:"
		cvar "r_vertexlight"
		cvarFloatList { "Light Map (high)" 0 "Vertex (low)" 1  }
		rect 0 170 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
			action { uiScript glCustom }
    		}

	itemDef {
      		name graphics
		group grpSystem
      		type ITEM_TYPE_MULTI
		text "Geometric Detail:"
		cvar "r_lodbias"
		cvarFloatList { "High" 0 "Medium" 1 "Low" 2 }
		rect 0 190 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
			action { uiScript glCustom ; uiScript update "r_lodbias" }
    		}

	itemDef {
      		name graphics
		group grpSystem
      		type ITEM_TYPE_MULTI
		text "Texture Detail:"
		cvar "r_picmip"
		cvarFloatList { "Low" 2 "Normal" 1 "High" 0 }
		rect 0 210 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
			action { uiScript glCustom }
    		}
	
	itemDef {
      		name graphics
		group grpSystem
      		type ITEM_TYPE_MULTI
		text "Texture Quality:"
		cvar "r_texturebits"
		cvarFloatList { "Default" 0 "16 bit" 16 "32 bit" 32 }
		rect 0 230 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
    		}

	itemDef {
      		name graphics
		group grpSystem
      		type ITEM_TYPE_MULTI
		text "Texture Filter:"
		cvar "r_texturemode"
		cvarStrList { "Bilinear", "GL_LINEAR_MIPMAP_NEAREST", "Trilinear", "GL_LINEAR_MIPMAP_LINEAR"  }
		rect 0 250 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
		action { uiScript glCustom }
    		}

	itemDef {
      		name graphics
		group grpSystem
      		type ITEM_TYPE_YESNO
		text "Compress Textures:"
		cvar "r_ext_compressed_textures "
		rect 0 270 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 133
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
		action { uiScript glCustom }
    		}
	
    		
//here

itemDef {
	name ctr_driver
	text "Driver Info"
	type 1
	textscale .25
	group grpControlbutton
	style WINDOW_STYLE_FILLED
	background "ui/assets/button_back.tga"
	rect 105 25 65 20
	textalign 1
	textalignx 32
	textaligny 16
	forecolor 1 1 1 1
	backcolor .37 .1 .1 1 
	visible 1
	action { hide grpSystem ; show driver }
	mouseEnter { setitemcolor ctr_driver backcolor .1 .37 .1 1 }
      	mouseExit { setitemcolor ctr_driver backcolor .37 .1 .1 1 }
	}


 	
	itemDef {
		name driver
		group grpSystem
		rect 15 55 230 230	
		ownerdraw UI_GLINFO 
		textalign 1
		textscale .15
		textalignx 0
		textaligny 17
		forecolor 1 1 1 1
		visible 0
		decoration
	}

itemDef {
	name ctr_other
	text "Other"
	type 1
	textscale .25
	group grpControlbutton
	style WINDOW_STYLE_FILLED
	background "ui/assets/button_back.tga"
	rect 180 25 65 20
	textalign 1
	textalignx 32
	textaligny 16
	forecolor 1 1 1 1
	backcolor .37 .1 .1 1 
	visible 1
	action { hide grpSystem ; show other }
	mouseEnter { setitemcolor ctr_other backcolor .1 .37 .1 1 }
      	mouseExit { setitemcolor ctr_other backcolor .37 .1 .1 1 }
	}
	

itemDef {
      	name other			
	group grpSystem
      	style 1
	text "Display"
	rect 0 45 128 20
      	textalign ITEM_ALIGN_CENTER
      	textalignx 128
      	textaligny 17
	textscale .25         
      	forecolor 1 1 1 1
      	visible 0 
	decoration
    	}
	
	itemDef {
      		name other			
		group grpSystem
      		type ITEM_TYPE_SLIDER
		text "Brightness:"
		cvarfloat "r_gamma" 1 .5 2
		rect 0 65 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 128 
      		textaligny 17
		textscale .25         
      		forecolor 1 1 1 1
      		visible 0 
    		}

	itemDef {
      		name other
		group grpSystem
      		type ITEM_TYPE_SLIDER
		text "Screen Size:"
		cvarfloat "cg_viewsize" 100 30 100
		//cvarFloatList {  }
		rect 0 85 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 128
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
    		}

itemDef {
      	name other			
	group grpSystem
      	style 1
	text "Sound"
	rect 0 125 128 20
      	textalign ITEM_ALIGN_CENTER
      	textalignx 128
      	textaligny 17
	textscale .25         
      	forecolor 1 1 1 1
      	visible 0 
	decoration
    	}

	itemDef {
      		name other
		group grpSystem
      		type ITEM_TYPE_SLIDER
		text "Effects Volume:"
		cvarfloat "s_volume" 0.7 0 1
			rect 0 145 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 128
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
    		}
	
	itemDef {
      		name other
		group grpSystem
      		type ITEM_TYPE_SLIDER
		text "Music Volume:"
		cvarfloat "s_musicvolume" 0.25 0 1
			rect 0 165 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 128
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
    		}

	itemDef {
      		name other
		group grpSystem
      		type ITEM_TYPE_MULTI	
		text "Sound Quality:"
		cvar "s_khz"
		cvarFloatList { "22 khz (high)" 22 "11 khz (low)" 11 }
		rect 0 185 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 128
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
    		}

	itemDef {
      		name other
		group grpSystem
      		type ITEM_TYPE_YESNO	
		text "Doppler Sound:"
		cvar "s_doppler"
		rect 0 205 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 128
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
    		}

	
itemDef {
      	name other			
	group grpSystem
      	style 1
	text "Network"
	rect 0 245 128 20
      	textalign ITEM_ALIGN_CENTER
      	textalignx 128 
      	textaligny 17
	textscale .25         
      	forecolor 1 1 1 1
      	visible 0 
	decoration
    	}

	itemDef {
      		name other
		group grpSystem
      		type ITEM_TYPE_MULTI
		text "Net Data Rate:"
		cvar "rate"
		cvarFloatList { "<=28.8k" 2500 "33.6k" 3000 "56k" 4000 "ISDN" 5000 "LAN/CABLE/xDSl" 25000  }
		rect 0 265 256 20
      		textalign ITEM_ALIGN_RIGHT
      		textalignx 128
      		textaligny 17
		textscale .25        
      		forecolor 1 1 1 1
      		visible 0 
    		}

itemDef {
	name graphics
	text "Apply"
	type 1
	textscale .25
	group grpsystem
	style WINDOW_STYLE_FILLED
	background "ui/assets/button_back.tga"
	rect 101 295 75 20
	textalign 1
	textalignx 37
	textaligny 15
	forecolor 1 1 1 1
	backcolor .37 .1 .1 1 
	visible 0
	action { exec "vid_restart" }
	mouseEnter { setcolor backcolor .1 .37 .1 1 }
      	mouseExit { setcolor backcolor .37 .1 .1 1 }
	}


}


}
