Exemple #1
0
/*
===============
CDKeyMenu_Init
===============
*/
void CDKeyMenu_Init(void) 
{

	CDKeyMenu_Cache();

	s_cdkey_menu.nitems					= 0;
	s_cdkey_menu.wrapAround				= qtrue;
	s_cdkey_menu.draw					= M_CDKey_MenuDraw;
	s_cdkey_menu.key					= M_CDKey_MenuKey;
	s_cdkey_menu.fullscreen				= qtrue;
	s_cdkey_menu.wrapAround				= qfalse;
	s_cdkey_menu.descX					= MENU_DESC_X;
	s_cdkey_menu.descY					= MENU_DESC_Y;
	s_cdkey_menu.titleX					= MENU_TITLE_X;
	s_cdkey_menu.titleY					= MENU_TITLE_Y;
	s_cdkey_menu.titleI					= MNT_CONTROLSMENU_TITLE;
	s_cdkey_menu.footNoteEnum			= MNT_CDKEY;

	SetupMenu_TopButtons(&s_cdkey_menu,MENU_CDKEY,NULL);

}
Exemple #2
0
/*
===============
UI_NetworkOptionsMenu_Init
===============
*/
static void UI_NetworkOptionsMenu_Init( void ) 
{
	int		rate;

	memset( &networkOptionsInfo, 0, sizeof(networkOptionsInfo) );

	UI_NetworkOptionsMenu_Cache();

	networkOptionsInfo.menu.nitems						= 0;
	networkOptionsInfo.menu.wrapAround					= qtrue;
	networkOptionsInfo.menu.draw						= Network_MenuDraw;
	networkOptionsInfo.menu.fullscreen					= qtrue;
	networkOptionsInfo.menu.descX						= MENU_DESC_X;
	networkOptionsInfo.menu.descY						= MENU_DESC_Y;
	networkOptionsInfo.menu.listX						= 230;
	networkOptionsInfo.menu.listY						= 188;
	networkOptionsInfo.menu.titleX						= MENU_TITLE_X;
	networkOptionsInfo.menu.titleY						= MENU_TITLE_Y;
	networkOptionsInfo.menu.titleI						= MNT_CONTROLSMENU_TITLE;
	networkOptionsInfo.menu.footNoteEnum				= MNT_NETWORKSETUP;


	SetupMenu_TopButtons(&networkOptionsInfo.menu,MENU_NETWORK,NULL);

	networkOptionsInfo.rate.generic.type				= MTYPE_SPINCONTROL;
	networkOptionsInfo.rate.generic.flags				= QMF_HIGHLIGHT_IF_FOCUS;
	networkOptionsInfo.rate.generic.x					= 212;
	networkOptionsInfo.rate.generic.y					= 262;
	networkOptionsInfo.rate.textEnum					= MBT_DATARATE;
	networkOptionsInfo.rate.generic.callback			= UI_NetworkOptionsMenu_Event;
	networkOptionsInfo.rate.generic.id					= ID_RATE;
	networkOptionsInfo.rate.textcolor					= CT_BLACK;
	networkOptionsInfo.rate.textcolor2					= CT_WHITE;
	networkOptionsInfo.rate.color						= CT_DKPURPLE1;
	networkOptionsInfo.rate.color2						= CT_LTPURPLE1;
	networkOptionsInfo.rate.textX						= 5;
	networkOptionsInfo.rate.textY						= 2;
	networkOptionsInfo.rate.listnames					= rate_items;



	Menu_AddItem( &networkOptionsInfo.menu, ( void * ) &networkOptionsInfo.rate );

	rate = trap_Cvar_VariableValue( "rate" );
	if( rate <= 2500 ) 
	{
		networkOptionsInfo.rate.curvalue = 0;
	}
	else if( rate <= 3000 ) 
	{
		networkOptionsInfo.rate.curvalue = 1;
	}
	else if( rate <= 4000 ) 
	{
		networkOptionsInfo.rate.curvalue = 2;
	}
	else if( rate <= 5000 ) 
	{
		networkOptionsInfo.rate.curvalue = 3;
	}
	else 
	{
		networkOptionsInfo.rate.curvalue = 4;
	}
}
Exemple #3
0
/*
=================
Preferences_MenuInit
=================
*/
static void Preferences_MenuInit( void )
{
	UI_PreferencesMenu_Cache();

	s_gameoptions_menu.nitems				= 0;
	s_gameoptions_menu.wrapAround			= qtrue;
//	s_gameoptions_menu.opening				= M_Main_Opening;
//	s_gameoptions_menu.closing				= M_Main_Closing;
	s_gameoptions_menu.draw					= Preferences_MenuDraw;
	s_gameoptions_menu.key					= Preferences_MenuKey;
	s_gameoptions_menu.fullscreen			= qtrue;
	s_gameoptions_menu.descX				= MENU_DESC_X;
	s_gameoptions_menu.descY				= MENU_DESC_Y;
	s_gameoptions_menu.titleX				= MENU_TITLE_X;
	s_gameoptions_menu.titleY				= MENU_TITLE_Y;
	s_gameoptions_menu.titleI				= MNT_CONTROLSMENU_TITLE;
	s_gameoptions_menu.footNoteEnum			= MNT_GAMEOPTION_LABEL;

	SetupMenu_TopButtons(&s_gameoptions_menu,MENU_GAME,NULL);

	s_preferences_wallmarks_box.generic.type			= MTYPE_BITMAP;      
	s_preferences_wallmarks_box.generic.flags			= QMF_HIGHLIGHT_IF_FOCUS;
	s_preferences_wallmarks_box.generic.x				= 196;
	s_preferences_wallmarks_box.generic.y				= 358;
	s_preferences_wallmarks_box.generic.name			= "menu/lcarscontrols/round4.tga";
	s_preferences_wallmarks_box.generic.id				= ID_WALLMARKS;
	s_preferences_wallmarks_box.generic.callback		= Preferences_Event;
	s_preferences_wallmarks_box.width					= 128;
	s_preferences_wallmarks_box.height					= 64;
	s_preferences_wallmarks_box.color					= CT_DKBLUE1;
	s_preferences_wallmarks_box.color2					= CT_LTBLUE1;
	s_preferences_wallmarks_box.textX					= 1;
	s_preferences_wallmarks_box.textY					= 25;
	s_preferences_wallmarks_box.textEnum				= MBT_WALLMARKS1;
	s_preferences_wallmarks_box.textEnum2				= MBT_WALLMARKS2;
	s_preferences_wallmarks_box.textcolor				= CT_BLACK;
	s_preferences_wallmarks_box.textcolor2				= CT_WHITE;
	s_preferences_wallmarks_box.focusX					= 196;
	s_preferences_wallmarks_box.focusY					= 384;
	s_preferences_wallmarks_box.focusHeight				= 37;
	s_preferences_wallmarks_box.focusWidth				= 95;

	s_preferences_wallmarks_value.generic.type			= MTYPE_BITMAP;      
	s_preferences_wallmarks_value.generic.flags			= QMF_INACTIVE;
	s_preferences_wallmarks_value.generic.x				= 196;
	s_preferences_wallmarks_value.generic.y				= 328;
	s_preferences_wallmarks_value.generic.name			= "menu/lcarscontrols/round3.tga";
	s_preferences_wallmarks_value.generic.id			= ID_WALLMARKS_VALUE;
	s_preferences_wallmarks_value.generic.callback		= Preferences_Event;
	s_preferences_wallmarks_value.width					= 64;
	s_preferences_wallmarks_value.height				= 64;
	s_preferences_wallmarks_value.textX					= 12;
	s_preferences_wallmarks_value.textY					= 18;
	Preferences_CvarSet("cg_marks",&s_preferences_wallmarks_value,
		s_preferences_wallmarks_box.color2,s_preferences_wallmarks_box.color);  
	s_preferences_wallmarks_value.textcolor				= CT_WHITE;
	s_preferences_wallmarks_value.textcolor2			= CT_WHITE;


	s_preferences_dynamiclights_box.generic.type			= MTYPE_BITMAP;      
	s_preferences_dynamiclights_box.generic.flags			= QMF_HIGHLIGHT_IF_FOCUS;
	s_preferences_dynamiclights_box.generic.x				= 269;
	s_preferences_dynamiclights_box.generic.y				= 298;
	s_preferences_dynamiclights_box.generic.name			= "menu/lcarscontrols/round5.tga";
	s_preferences_dynamiclights_box.generic.id				= ID_DYNAMICLIGHTS;
	s_preferences_dynamiclights_box.generic.callback		= Preferences_Event;
	s_preferences_dynamiclights_box.width					= 128;
	s_preferences_dynamiclights_box.height					= 128;
	s_preferences_dynamiclights_box.color					= CT_DKBLUE1;
	s_preferences_dynamiclights_box.color2					= CT_LTBLUE1;
	s_preferences_dynamiclights_box.textX					= 14;
	s_preferences_dynamiclights_box.textY					= 2;
	s_preferences_dynamiclights_box.textEnum				= MBT_DYNAMICLIGHTS1;
	s_preferences_dynamiclights_box.textEnum2				= MBT_DYNAMICLIGHTS2;
	s_preferences_dynamiclights_box.textcolor				= CT_BLACK;
	s_preferences_dynamiclights_box.textcolor2				= CT_WHITE;
	s_preferences_dynamiclights_box.focusX					= 279;
	s_preferences_dynamiclights_box.focusY					= 298;
	s_preferences_dynamiclights_box.focusHeight				= 54;
	s_preferences_dynamiclights_box.focusWidth				= 61;

	s_preferences_dynamiclights_value.generic.type			= MTYPE_BITMAP;      
	s_preferences_dynamiclights_value.generic.flags			= QMF_INACTIVE;
	s_preferences_dynamiclights_value.generic.x				= 226;
	s_preferences_dynamiclights_value.generic.y				= 298;
	s_preferences_dynamiclights_value.generic.name			= "menu/lcarscontrols/round18.tga";
	s_preferences_dynamiclights_value.generic.id			= ID_DYNAMICLIGHTS_VALUE;
	s_preferences_dynamiclights_value.generic.callback		= Preferences_Event;
	s_preferences_dynamiclights_value.width					= 64;
	s_preferences_dynamiclights_value.height				= 64;
	s_preferences_dynamiclights_value.textX					= 19;
	s_preferences_dynamiclights_value.textY					= 10;
	s_preferences_dynamiclights_value.textEnum				= MBT_ON;
	Preferences_CvarSet("r_dynamiclight",&s_preferences_dynamiclights_value,
		s_preferences_dynamiclights_box.color2,s_preferences_dynamiclights_box.color);  
	s_preferences_dynamiclights_value.textcolor				= CT_WHITE;
	s_preferences_dynamiclights_value.textcolor2			= CT_WHITE;


	s_preferences_lightflares_box.generic.type				= MTYPE_BITMAP;      
	s_preferences_lightflares_box.generic.flags				= QMF_HIGHLIGHT_IF_FOCUS;
	s_preferences_lightflares_box.generic.x					= 95;
	s_preferences_lightflares_box.generic.y					= 171;
	s_preferences_lightflares_box.generic.name				= "menu/lcarscontrols/round12.tga";
	s_preferences_lightflares_box.generic.id				= ID_LIGHTFLARES;
	s_preferences_lightflares_box.generic.callback			= Preferences_Event;
	s_preferences_lightflares_box.width						= 128;
	s_preferences_lightflares_box.height					= 64;
	s_preferences_lightflares_box.color						= CT_DKORANGE;
	s_preferences_lightflares_box.color2					= CT_LTORANGE;
	s_preferences_lightflares_box.textX						= 36;
	s_preferences_lightflares_box.textY						= 2;
	s_preferences_lightflares_box.textEnum					= MBT_LIGHTFLARES1;
	s_preferences_lightflares_box.textEnum2					= MBT_LIGHTFLARES2;
	s_preferences_lightflares_box.textcolor					= CT_BLACK;
	s_preferences_lightflares_box.textcolor2				= CT_WHITE;
	s_preferences_lightflares_box.focusX					= 119;
	s_preferences_lightflares_box.focusY					= 171;
	s_preferences_lightflares_box.focusHeight				= 42;
	s_preferences_lightflares_box.focusWidth				= 76;

	s_preferences_lightflares_value.generic.type			= MTYPE_BITMAP;      
	s_preferences_lightflares_value.generic.flags			= QMF_INACTIVE;
	s_preferences_lightflares_value.generic.x				= 145;
	s_preferences_lightflares_value.generic.y				= 217;
	s_preferences_lightflares_value.generic.name			= "menu/lcarscontrols/round9.tga";
	s_preferences_lightflares_value.generic.id				= ID_LIGHTFLARES_VALUE;
	s_preferences_lightflares_value.generic.callback		= Preferences_Event;
	s_preferences_lightflares_value.width					= 64;
	s_preferences_lightflares_value.height					= 64;
	s_preferences_lightflares_value.textX					= 19;
	s_preferences_lightflares_value.textY					= 15;
	Preferences_CvarSet("r_flares",&s_preferences_lightflares_value,
		s_preferences_lightflares_box.color2,s_preferences_lightflares_box.color);  
	s_preferences_lightflares_value.textcolor				= CT_WHITE;
	s_preferences_lightflares_value.textcolor2				= CT_WHITE;

	s_preferences_identifytarget_box.generic.type			= MTYPE_BITMAP;      
	s_preferences_identifytarget_box.generic.flags			= QMF_HIGHLIGHT_IF_FOCUS;
	s_preferences_identifytarget_box.generic.x				= 268;
	s_preferences_identifytarget_box.generic.y				= 222;
	s_preferences_identifytarget_box.generic.name			= "menu/lcarscontrols/round6.tga";
	s_preferences_identifytarget_box.generic.id				= ID_IDENTIFYTARGET;
	s_preferences_identifytarget_box.generic.callback		= Preferences_Event;
	s_preferences_identifytarget_box.width					= 128;
	s_preferences_identifytarget_box.height					= 128;
	s_preferences_identifytarget_box.color					= CT_DKPURPLE3;
	s_preferences_identifytarget_box.color2					= CT_LTPURPLE3;
	s_preferences_identifytarget_box.textX					= 14;
	s_preferences_identifytarget_box.textY					= 37;
	s_preferences_identifytarget_box.textEnum				= MBT_IDENTIFYTARGET1;
	s_preferences_identifytarget_box.textEnum2				= MBT_IDENTIFYTARGET2;
	s_preferences_identifytarget_box.textcolor				= CT_BLACK;
	s_preferences_identifytarget_box.textcolor2				= CT_WHITE;
	s_preferences_identifytarget_box.focusX					= 278;
	s_preferences_identifytarget_box.focusY					= 255;
	s_preferences_identifytarget_box.focusHeight			= 41;
	s_preferences_identifytarget_box.focusWidth				= 62;

	s_preferences_identifytarget_value.generic.type			= MTYPE_BITMAP;      
	s_preferences_identifytarget_value.generic.flags		= QMF_INACTIVE;
	s_preferences_identifytarget_value.generic.x			= 226;
	s_preferences_identifytarget_value.generic.y			= 242;
	s_preferences_identifytarget_value.generic.name			= "menu/lcarscontrols/round7.tga";
	s_preferences_identifytarget_value.generic.id			= ID_IDENTIFYTARGET_VALUE;
	s_preferences_identifytarget_value.generic.callback		= Preferences_Event;
	s_preferences_identifytarget_value.width				= 64;
	s_preferences_identifytarget_value.height				= 64;
	s_preferences_identifytarget_value.textX				= 19;
	s_preferences_identifytarget_value.textY				= 29;
	Preferences_CvarSet("cg_drawCrosshairNames",&s_preferences_identifytarget_value,
		s_preferences_identifytarget_box.color2,s_preferences_identifytarget_box.color);  
	s_preferences_identifytarget_value.textcolor			= CT_WHITE;
	s_preferences_identifytarget_value.textcolor2			= CT_WHITE;


	s_preferences_synceveryframe_box.generic.type			= MTYPE_BITMAP;      
	s_preferences_synceveryframe_box.generic.flags			= QMF_HIGHLIGHT_IF_FOCUS;
	s_preferences_synceveryframe_box.generic.x				= 197;
	s_preferences_synceveryframe_box.generic.y				= 171;
	s_preferences_synceveryframe_box.generic.name			= "menu/lcarscontrols/round13.tga";
	s_preferences_synceveryframe_box.generic.id				= ID_SYNCEVERYFRAME;
	s_preferences_synceveryframe_box.generic.callback		= Preferences_Event;
	s_preferences_synceveryframe_box.width					= 128;
	s_preferences_synceveryframe_box.height					= 64;
	s_preferences_synceveryframe_box.color					= CT_DKBLUE1;
	s_preferences_synceveryframe_box.color2					= CT_LTBLUE1;
	s_preferences_synceveryframe_box.textX					= 4;
	s_preferences_synceveryframe_box.textY					= 2;
	s_preferences_synceveryframe_box.textEnum				= MBT_SYNCEVERYFRAME1;
	s_preferences_synceveryframe_box.textEnum2				= MBT_SYNCEVERYFRAME2;
	s_preferences_synceveryframe_box.textcolor				= CT_BLACK;
	s_preferences_synceveryframe_box.textcolor2				= CT_WHITE;
	s_preferences_synceveryframe_box.focusX					= 197;
	s_preferences_synceveryframe_box.focusY					= 171;
	s_preferences_synceveryframe_box.focusHeight			= 38;
	s_preferences_synceveryframe_box.focusWidth				= 79;

	s_preferences_synceveryframe_value.generic.type			= MTYPE_BITMAP;      
	s_preferences_synceveryframe_value.generic.flags		= QMF_INACTIVE;
	s_preferences_synceveryframe_value.generic.x			= 196;
	s_preferences_synceveryframe_value.generic.y			= 216;
	s_preferences_synceveryframe_value.generic.name			= "menu/lcarscontrols/round8.tga";
	s_preferences_synceveryframe_value.generic.id			= ID_SYNCEVERYFRAME_VALUE;
	s_preferences_synceveryframe_value.generic.callback		= Preferences_Event;
	s_preferences_synceveryframe_value.width				= 64;
	s_preferences_synceveryframe_value.height				= 64;
	s_preferences_synceveryframe_value.textX				= 12;
	s_preferences_synceveryframe_value.textY				= 15;
	Preferences_CvarSet("r_finish",&s_preferences_synceveryframe_value,
		s_preferences_synceveryframe_box.color2,s_preferences_synceveryframe_box.color);  
	s_preferences_synceveryframe_value.textcolor			= CT_WHITE;
	s_preferences_synceveryframe_value.textcolor2			= CT_WHITE;


	s_preferences_crosshair_box.generic.type				= MTYPE_BITMAP;      
	s_preferences_crosshair_box.generic.flags				= QMF_HIGHLIGHT_IF_FOCUS;
	s_preferences_crosshair_box.generic.x					= 394;
	s_preferences_crosshair_box.generic.y					= 244;
	s_preferences_crosshair_box.generic.name				= "menu/common/full_button2.tga";
	s_preferences_crosshair_box.generic.id					= ID_CROSSHAIR;
	s_preferences_crosshair_box.generic.callback			= Preferences_Event;
	s_preferences_crosshair_box.width						= 100;
	s_preferences_crosshair_box.height						= 32;
	s_preferences_crosshair_box.color						= CT_DKBLUE1;
	s_preferences_crosshair_box.color2						= CT_LTBLUE1;
	s_preferences_crosshair_box.textX						= 20;
	s_preferences_crosshair_box.textY						= 1;
	s_preferences_crosshair_box.textEnum					= MBT_CROSSHAIR;
	s_preferences_crosshair_box.textcolor					= CT_BLACK;
	s_preferences_crosshair_box.textcolor2					= CT_WHITE;
	s_preferences_crosshair_box.focusX						= 380;
	s_preferences_crosshair_box.focusY						= 244;
	s_preferences_crosshair_box.focusHeight					= 18;
	s_preferences_crosshair_box.focusWidth					= 128;

	s_textlanguage.generic.type									= MTYPE_SPINCONTROL;      
	s_textlanguage.generic.flags								= QMF_HIGHLIGHT_IF_FOCUS;
	s_textlanguage.generic.x									= 320;
	s_textlanguage.generic.y									= 184;
	s_textlanguage.generic.name									= GRAPHIC_BUTTONRIGHT;
	s_textlanguage.generic.callback								= Preferences_Event; 
	s_textlanguage.generic.id									= ID_TEXTLANGUAGE; 
	s_textlanguage.color										= CT_DKPURPLE1;
	s_textlanguage.color2										= CT_LTPURPLE1;
	s_textlanguage.textX										= MENU_BUTTON_TEXT_X;
	s_textlanguage.textY										= MENU_BUTTON_TEXT_Y;
	s_textlanguage.width										= 80;
	s_textlanguage.textEnum										= MBT_TEXTLANGUAGE;
	s_textlanguage.textcolor									= CT_BLACK;
	s_textlanguage.textcolor2									= CT_WHITE;	
	s_textlanguage.listnames									= s_textlanguage_Names;

	s_voicelanguage.generic.type									= MTYPE_SPINCONTROL;      
	s_voicelanguage.generic.flags								= QMF_HIGHLIGHT_IF_FOCUS;
	s_voicelanguage.generic.x									= 320;
	s_voicelanguage.generic.y									= 204;
	s_voicelanguage.generic.name									= GRAPHIC_BUTTONRIGHT;
	s_voicelanguage.generic.callback								= Preferences_Event; 
	s_voicelanguage.generic.id									= ID_VOICELANGUAGE; 
	s_voicelanguage.color										= CT_DKPURPLE1;
	s_voicelanguage.color2										= CT_LTPURPLE1;
	s_voicelanguage.textX										= MENU_BUTTON_TEXT_X;
	s_voicelanguage.textY										= MENU_BUTTON_TEXT_Y;
	s_voicelanguage.width										= 80;
	s_voicelanguage.textEnum									= MBT_VOICELANGUAGE;
	s_voicelanguage.textcolor									= CT_BLACK;
	s_voicelanguage.textcolor2									= CT_WHITE;	
	s_voicelanguage.listnames									= s_voicelanguage_Names;

	s_subtitle.generic.type									= MTYPE_SPINCONTROL;      
	s_subtitle.generic.flags								= QMF_HIGHLIGHT_IF_FOCUS;
	s_subtitle.generic.x									= 320;
	s_subtitle.generic.y									= 384;
	s_subtitle.generic.name									= GRAPHIC_BUTTONRIGHT;
	s_subtitle.generic.callback								= Preferences_Event; 
	s_subtitle.generic.id									= ID_SUBTITLE; 
	s_subtitle.color										= CT_DKPURPLE1;
	s_subtitle.color2										= CT_LTPURPLE1;
	s_subtitle.textX										= MENU_BUTTON_TEXT_X;
	s_subtitle.textY										= MENU_BUTTON_TEXT_Y;
	s_subtitle.width										= 80;
	s_subtitle.textEnum										= MBT_SUBTITLES;
	s_subtitle.textcolor									= CT_BLACK;
	s_subtitle.textcolor2									= CT_WHITE;	
	s_subtitle.listnames									= s_subtitle_Names;

	Menu_AddItem( &s_gameoptions_menu, &s_preferences_wallmarks_box );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_wallmarks_value );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_dynamiclights_box );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_dynamiclights_value );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_lightflares_box );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_lightflares_value );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_identifytarget_box );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_identifytarget_value );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_synceveryframe_box );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_synceveryframe_value );
	Menu_AddItem( &s_gameoptions_menu, &s_preferences_crosshair_box);
	Menu_AddItem( &s_gameoptions_menu, &s_textlanguage);
	Menu_AddItem( &s_gameoptions_menu, &s_voicelanguage);
	Menu_AddItem( &s_gameoptions_menu, &s_subtitle);

	s_gameoptions_menu.initialized = qtrue;		// Show we've been here

	Preferences_SetValues();
}
Exemple #4
0
/*
===============
SoundMenu_Init
===============
*/
void SoundMenu_Init(void) 
{
	int x,y;
	int	rate;

	UI_SoundMenu_Cache();

	soundOptionsInfo.menu.nitems					= 0;
	soundOptionsInfo.menu.wrapAround				= qtrue;
	soundOptionsInfo.menu.draw					= M_Sound_MenuDraw;
	soundOptionsInfo.menu.key					= M_Sound_MenuKey;
	soundOptionsInfo.menu.fullscreen				= qtrue;
	soundOptionsInfo.menu.wrapAround				= qfalse;
	soundOptionsInfo.menu.descX					= MENU_DESC_X;
	soundOptionsInfo.menu.descY					= MENU_DESC_Y;
	soundOptionsInfo.menu.titleX					= MENU_TITLE_X;
	soundOptionsInfo.menu.titleY					= MENU_TITLE_Y;
	soundOptionsInfo.menu.titleI					= MNT_CONTROLSMENU_TITLE;
	soundOptionsInfo.menu.footNoteEnum			= MNT_SOUND_SETUP;

	x = 212;
	soundOptionsInfo.rate.generic.type				= MTYPE_SPINCONTROL;
	soundOptionsInfo.rate.generic.flags				= QMF_HIGHLIGHT_IF_FOCUS;
	soundOptionsInfo.rate.generic.x					= x;
	soundOptionsInfo.rate.generic.y					= 192;
	soundOptionsInfo.rate.textEnum					= MBT_DATARATE;
	soundOptionsInfo.rate.generic.callback			= UI_SoundOptionsMenu_Event;
	soundOptionsInfo.rate.generic.id				= ID_RATE;
	soundOptionsInfo.rate.textcolor					= CT_BLACK;
	soundOptionsInfo.rate.textcolor2				= CT_WHITE;
	soundOptionsInfo.rate.color						= CT_DKPURPLE1;
	soundOptionsInfo.rate.color2					= CT_LTPURPLE1;
	soundOptionsInfo.rate.textX						= 5;
	soundOptionsInfo.rate.textY						= 2;
	soundOptionsInfo.rate.listnames					= rate_items;

	y = 256;
	soundOptionsInfo.sfxvolume.generic.type			= MTYPE_SLIDER;
	soundOptionsInfo.sfxvolume.generic.x			= x + MENU_BUTTON_MED_WIDTH + 35;
	soundOptionsInfo.sfxvolume.generic.y			= y;
	soundOptionsInfo.sfxvolume.generic.flags		= QMF_SMALLFONT;
	soundOptionsInfo.sfxvolume.generic.callback		= UI_SoundOptionsMenu_Event;
	soundOptionsInfo.sfxvolume.generic.id			= ID_EFFECTSVOLUME;
	soundOptionsInfo.sfxvolume.minvalue				= 0;
	soundOptionsInfo.sfxvolume.maxvalue				= 10;
	soundOptionsInfo.sfxvolume.color				= CT_DKPURPLE1;
	soundOptionsInfo.sfxvolume.color2				= CT_LTPURPLE1;
	soundOptionsInfo.sfxvolume.generic.name			= "menu/common/monbar_2.tga";
	soundOptionsInfo.sfxvolume.width				= 256;
	soundOptionsInfo.sfxvolume.height				= 32;
	soundOptionsInfo.sfxvolume.focusWidth			= 145;
	soundOptionsInfo.sfxvolume.focusHeight			= 18;
	soundOptionsInfo.sfxvolume.picName				= "menu/common/square.tga";
	soundOptionsInfo.sfxvolume.picX					= x;
	soundOptionsInfo.sfxvolume.picY					= y;
	soundOptionsInfo.sfxvolume.picWidth				= MENU_BUTTON_MED_WIDTH;
	soundOptionsInfo.sfxvolume.picHeight			= MENU_BUTTON_MED_HEIGHT;
	soundOptionsInfo.sfxvolume.textEnum				= MBT_EFFECTSVOLUME;
	soundOptionsInfo.sfxvolume.textX				= 5;
	soundOptionsInfo.sfxvolume.textY				= 1;
	soundOptionsInfo.sfxvolume.textcolor			= CT_BLACK;
	soundOptionsInfo.sfxvolume.textcolor2			= CT_WHITE;
	soundOptionsInfo.sfxvolume.thumbName			= "menu/common/slider.tga";
	soundOptionsInfo.sfxvolume.thumbHeight			= 32;
	soundOptionsInfo.sfxvolume.thumbWidth			= 16;
	soundOptionsInfo.sfxvolume.thumbGraphicWidth	= 9;
	soundOptionsInfo.sfxvolume.thumbColor			= CT_DKBLUE1;
	soundOptionsInfo.sfxvolume.thumbColor2			= CT_LTBLUE1;

	y = 278;
	soundOptionsInfo.musicvolume.generic.type		= MTYPE_SLIDER;
	soundOptionsInfo.musicvolume.generic.x			= x + MENU_BUTTON_MED_WIDTH + 35;
	soundOptionsInfo.musicvolume.generic.y			= y;
	soundOptionsInfo.musicvolume.generic.flags		= QMF_SMALLFONT;
	soundOptionsInfo.musicvolume.generic.callback	= UI_SoundOptionsMenu_Event;
	soundOptionsInfo.musicvolume.generic.id			= ID_MUSICVOLUME;
	soundOptionsInfo.musicvolume.minvalue			= 0;
	soundOptionsInfo.musicvolume.maxvalue			= 10;
	soundOptionsInfo.musicvolume.color				= CT_DKPURPLE1;
	soundOptionsInfo.musicvolume.color2				= CT_LTPURPLE1;
	soundOptionsInfo.musicvolume.generic.name		= "menu/common/monbar_2.tga";
	soundOptionsInfo.musicvolume.width				= 256;
	soundOptionsInfo.musicvolume.height				= 32;
	soundOptionsInfo.musicvolume.focusWidth			= 145;
	soundOptionsInfo.musicvolume.focusHeight		= 18;
	soundOptionsInfo.musicvolume.picName			= "menu/common/square.tga";
	soundOptionsInfo.musicvolume.picX				= x;
	soundOptionsInfo.musicvolume.picY				= y;
	soundOptionsInfo.musicvolume.picWidth			= MENU_BUTTON_MED_WIDTH;
	soundOptionsInfo.musicvolume.picHeight			= MENU_BUTTON_MED_HEIGHT;
	soundOptionsInfo.musicvolume.textEnum			= MBT_MUSICVOLUME;
	soundOptionsInfo.musicvolume.textX				= 5;
	soundOptionsInfo.musicvolume.textY				= 1;
	soundOptionsInfo.musicvolume.textcolor			= CT_BLACK;
	soundOptionsInfo.musicvolume.textcolor2			= CT_WHITE;
	soundOptionsInfo.musicvolume.thumbName			= "menu/common/slider.tga";
	soundOptionsInfo.musicvolume.thumbHeight		= 32;
	soundOptionsInfo.musicvolume.thumbWidth			= 16;
	soundOptionsInfo.musicvolume.thumbGraphicWidth	= 9;
	soundOptionsInfo.musicvolume.thumbColor			= CT_DKBLUE1;
	soundOptionsInfo.musicvolume.thumbColor2		= CT_LTBLUE1;

	soundOptionsInfo.quality.generic.type			= MTYPE_SPINCONTROL;
	soundOptionsInfo.quality.generic.flags			= QMF_HIGHLIGHT_IF_FOCUS;
	soundOptionsInfo.quality.generic.x				= 120;
	soundOptionsInfo.quality.generic.y				= 322;
	soundOptionsInfo.quality.generic.callback		= UI_SoundOptionsMenu_Event;
	soundOptionsInfo.quality.generic.id				= ID_QUALITY;
	soundOptionsInfo.quality.textEnum				= MBT_SOUNDQUALITY;
	soundOptionsInfo.quality.textcolor				= CT_BLACK;
	soundOptionsInfo.quality.textcolor2				= CT_WHITE;
	soundOptionsInfo.quality.color					= CT_DKPURPLE1;
	soundOptionsInfo.quality.color2					= CT_LTPURPLE1;
	soundOptionsInfo.quality.textX					= 5;
	soundOptionsInfo.quality.textY					= 2;
	soundOptionsInfo.quality.listnames				= s_sndquality_Names;

	soundOptionsInfo.a3d.generic.type				= MTYPE_SPINCONTROL;
	soundOptionsInfo.a3d.generic.flags				= QMF_HIGHLIGHT_IF_FOCUS;
	soundOptionsInfo.a3d.generic.x					= 416;
	soundOptionsInfo.a3d.generic.y					= 322;
	soundOptionsInfo.a3d.generic.callback			= UI_SoundOptionsMenu_Event;
	soundOptionsInfo.a3d.generic.id					= ID_A3D;
	soundOptionsInfo.a3d.textEnum					= MBT_A3D;
	soundOptionsInfo.a3d.textcolor					= CT_BLACK;
	soundOptionsInfo.a3d.textcolor2					= CT_WHITE;
	soundOptionsInfo.a3d.color						= CT_DKPURPLE1;
	soundOptionsInfo.a3d.color2						= CT_LTPURPLE1;
	soundOptionsInfo.a3d.textX						= 5;
	soundOptionsInfo.a3d.textY						= 2;
	soundOptionsInfo.a3d.listnames					= s_OffOnNone_Names;

	SetupMenu_TopButtons(&soundOptionsInfo.menu,MENU_SOUND,NULL);

	Menu_AddItem( &soundOptionsInfo.menu, ( void * )&soundOptionsInfo.rate );
	Menu_AddItem( &soundOptionsInfo.menu, ( void * )&soundOptionsInfo.sfxvolume);
	Menu_AddItem( &soundOptionsInfo.menu, ( void * )&soundOptionsInfo.musicvolume);
	Menu_AddItem( &soundOptionsInfo.menu, ( void * )&soundOptionsInfo.quality);
	Menu_AddItem( &soundOptionsInfo.menu, ( void * )&soundOptionsInfo.a3d);

	soundOptionsInfo.sfxvolume.curvalue = trap_Cvar_VariableValue( "s_volume" ) * 10;
	soundOptionsInfo.musicvolume.curvalue = trap_Cvar_VariableValue( "s_musicvolume" ) * 10;
	soundOptionsInfo.quality.curvalue = trap_Cvar_VariableValue( "s_khz" ) != 11;
	soundOptionsInfo.holdSoundQuality = soundOptionsInfo.quality.curvalue; 
	soundOptionsInfo.a3d.curvalue = (int)trap_Cvar_VariableValue( "s_usingA3D" );

	soundOptionsInfo.menu.initialized = qtrue;


	rate = trap_Cvar_VariableValue( "rate" );
	if( rate <= 2500 ) 
	{
		soundOptionsInfo.rate.curvalue = 0;
	}
	else if( rate <= 3000 ) 
	{
		soundOptionsInfo.rate.curvalue = 1;
	}
	else if( rate <= 4000 ) 
	{
		soundOptionsInfo.rate.curvalue = 2;
	}
	else if( rate <= 5000 ) 
	{
		soundOptionsInfo.rate.curvalue = 3;
	}
	else 
	{
		soundOptionsInfo.rate.curvalue = 4;
	}
}