示例#1
0
/*
 ==================
 UI_Mods_Init
 ==================
*/
static void UI_Mods_Init (){

	Mem_Fill(&uiMods, 0, sizeof(uiMods_t));

	uiMods.background.generic.id				= ID_BACKGROUND;
	uiMods.background.generic.type				= QMTYPE_BITMAP;
	uiMods.background.generic.flags				= QMF_INACTIVE;
	uiMods.background.generic.x					= 0;
	uiMods.background.generic.y					= 0;
	uiMods.background.generic.width				= 1024;
	uiMods.background.generic.height			= 768;
	uiMods.background.pic						= ART_BACKGROUND;

	uiMods.banner.generic.id					= ID_BANNER;
	uiMods.banner.generic.type					= QMTYPE_BITMAP;
	uiMods.banner.generic.flags					= QMF_INACTIVE;
	uiMods.banner.generic.x						= 0;
	uiMods.banner.generic.y						= 66;
	uiMods.banner.generic.width					= 1024;
	uiMods.banner.generic.height				= 46;
	uiMods.banner.pic							= ART_BANNER;

	uiMods.back.generic.id						= ID_BACK;
	uiMods.back.generic.type					= QMTYPE_BITMAP;
	uiMods.back.generic.x						= 310;
	uiMods.back.generic.y						= 656;
	uiMods.back.generic.width					= 198;
	uiMods.back.generic.height					= 38;
	uiMods.back.generic.callback				= UI_Mods_Callback;
	uiMods.back.generic.ownerdraw				= UI_Mods_Ownerdraw;
	uiMods.back.pic								= UI_BACKBUTTON;

	uiMods.load.generic.id						= ID_LOAD;
	uiMods.load.generic.type					= QMTYPE_BITMAP;
	uiMods.load.generic.x						= 516;
	uiMods.load.generic.y						= 656;
	uiMods.load.generic.width					= 198;
	uiMods.load.generic.height					= 38;
	uiMods.load.generic.callback				= UI_Mods_Callback;
	uiMods.load.generic.ownerdraw				= UI_Mods_Ownerdraw;
	uiMods.load.pic								= UI_LOADBUTTON;

	uiMods.modList.generic.id					= ID_MODLIST;
	uiMods.modList.generic.type					= QMTYPE_SCROLLLIST;
	uiMods.modList.generic.flags				= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiMods.modList.generic.x					= 256;
	uiMods.modList.generic.y					= 208;
	uiMods.modList.generic.width				= 512;
	uiMods.modList.generic.height				= 352;
	uiMods.modList.generic.callback				= UI_Mods_Callback;

	UI_Mods_GetModList();

	UI_AddItem(&uiMods.menu, (void *)&uiMods.background);
	UI_AddItem(&uiMods.menu, (void *)&uiMods.banner);
	UI_AddItem(&uiMods.menu, (void *)&uiMods.back);
	UI_AddItem(&uiMods.menu, (void *)&uiMods.load);
	UI_AddItem(&uiMods.menu, (void *)&uiMods.modList);
}
示例#2
0
/*
=================
UI_PlayDemo_Init
=================
*/
static void UI_PlayDemo_Init( void )
{
	memset( &uiPlayDemo, 0, sizeof( uiPlayDemo_t ));

	uiPlayDemo.menu.vidInitFunc = UI_PlayDemo_Init;
	uiPlayDemo.menu.keyFunc = UI_PlayDemo_KeyFunc;

	StringConcat( uiPlayDemo.hintText, "Title", TITLE_LENGTH );
	StringConcat( uiPlayDemo.hintText, uiEmptyString, TITLE_LENGTH );
	StringConcat( uiPlayDemo.hintText, "Map", MAPNAME_LENGTH );
	StringConcat( uiPlayDemo.hintText, uiEmptyString, MAPNAME_LENGTH );
	StringConcat( uiPlayDemo.hintText, "Max Clients", MAXCLIENTS_LENGTH );
	StringConcat( uiPlayDemo.hintText, uiEmptyString, MAXCLIENTS_LENGTH );

	uiPlayDemo.background.generic.id = ID_BACKGROUND;
	uiPlayDemo.background.generic.type = QMTYPE_BITMAP;
	uiPlayDemo.background.generic.flags = QMF_INACTIVE;
	uiPlayDemo.background.generic.x = 0;
	uiPlayDemo.background.generic.y = 0;
	uiPlayDemo.background.generic.width = 1024;
	uiPlayDemo.background.generic.height = 768;
	uiPlayDemo.background.pic = ART_BACKGROUND;

	uiPlayDemo.banner.generic.id = ID_BANNER;
	uiPlayDemo.banner.generic.type = QMTYPE_BITMAP;
	uiPlayDemo.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiPlayDemo.banner.generic.x = UI_BANNER_POSX;
	uiPlayDemo.banner.generic.y = UI_BANNER_POSY;
	uiPlayDemo.banner.generic.width = UI_BANNER_WIDTH;
	uiPlayDemo.banner.generic.height = UI_BANNER_HEIGHT;
	uiPlayDemo.banner.pic = ART_BANNER;

	uiPlayDemo.play.generic.id = ID_PLAY;
	uiPlayDemo.play.generic.type = QMTYPE_ACTION;
	uiPlayDemo.play.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayDemo.play.generic.x = 72;
	uiPlayDemo.play.generic.y = 230;

	if ( gpGlobals->demoplayback )
	{
		uiPlayDemo.play.generic.name = "Stop";
		uiPlayDemo.play.generic.statusText = "Stop a demo playing";
	}
	else if ( gpGlobals->demorecording )
	{
		uiPlayDemo.play.generic.name = "Stop";
		uiPlayDemo.play.generic.statusText = "Stop a demo recording";
	}
	else
	{
		uiPlayDemo.play.generic.name = "Play";
		uiPlayDemo.play.generic.statusText = "Play a demo";
	}
	uiPlayDemo.play.generic.callback = UI_PlayDemo_Callback;

	uiPlayDemo.remove.generic.id = ID_DELETE;
	uiPlayDemo.remove.generic.type = QMTYPE_ACTION;
	uiPlayDemo.remove.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayDemo.remove.generic.x = 72;
	uiPlayDemo.remove.generic.y = 280;
	uiPlayDemo.remove.generic.name = "Delete";
	uiPlayDemo.remove.generic.statusText = "Delete a demo";
	uiPlayDemo.remove.generic.callback = UI_PlayDemo_Callback;

	uiPlayDemo.cancel.generic.id = ID_CANCEL;
	uiPlayDemo.cancel.generic.type = QMTYPE_ACTION;
	uiPlayDemo.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayDemo.cancel.generic.x = 72;
	uiPlayDemo.cancel.generic.y = 330;
	uiPlayDemo.cancel.generic.name = "Cancel";
	uiPlayDemo.cancel.generic.statusText = "Return back to main menu";
	uiPlayDemo.cancel.generic.callback = UI_PlayDemo_Callback;

	uiPlayDemo.hintMessage.generic.id = ID_TABLEHINT;
	uiPlayDemo.hintMessage.generic.type = QMTYPE_ACTION;
	uiPlayDemo.hintMessage.generic.flags = QMF_INACTIVE|QMF_SMALLFONT;
	uiPlayDemo.hintMessage.generic.color = uiColorHelp;
	uiPlayDemo.hintMessage.generic.name = uiPlayDemo.hintText;
	uiPlayDemo.hintMessage.generic.x = 360;
	uiPlayDemo.hintMessage.generic.y = 225;

	uiPlayDemo.levelShot.generic.id = ID_LEVELSHOT;
	uiPlayDemo.levelShot.generic.type = QMTYPE_BITMAP;
	uiPlayDemo.levelShot.generic.flags = QMF_INACTIVE;
	uiPlayDemo.levelShot.generic.x = LEVELSHOT_X;
	uiPlayDemo.levelShot.generic.y = LEVELSHOT_Y;
	uiPlayDemo.levelShot.generic.width = LEVELSHOT_W;
	uiPlayDemo.levelShot.generic.height = LEVELSHOT_H;
	uiPlayDemo.levelShot.generic.ownerdraw = UI_PlayDemo_Ownerdraw;

	uiPlayDemo.demosList.generic.id = ID_DEMOLIST;
	uiPlayDemo.demosList.generic.type = QMTYPE_SCROLLLIST;
	uiPlayDemo.demosList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_SMALLFONT;
	uiPlayDemo.demosList.generic.x = 360;
	uiPlayDemo.demosList.generic.y = 255;
	uiPlayDemo.demosList.generic.width = 640;
	uiPlayDemo.demosList.generic.height = 440;
	uiPlayDemo.demosList.generic.callback = UI_PlayDemo_Callback;

	uiPlayDemo.msgBox.generic.id = ID_MSGBOX;
	uiPlayDemo.msgBox.generic.type = QMTYPE_ACTION;
	uiPlayDemo.msgBox.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiPlayDemo.msgBox.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
	uiPlayDemo.msgBox.generic.x = 192;
	uiPlayDemo.msgBox.generic.y = 256;
	uiPlayDemo.msgBox.generic.width = 640;
	uiPlayDemo.msgBox.generic.height = 256;

	uiPlayDemo.promptMessage.generic.id = ID_MSGBOX;
	uiPlayDemo.promptMessage.generic.type = QMTYPE_ACTION;
	uiPlayDemo.promptMessage.generic.flags = QMF_INACTIVE|QMF_DROPSHADOW|QMF_HIDDEN;
	uiPlayDemo.promptMessage.generic.name = "Delete selected demo?";
	uiPlayDemo.promptMessage.generic.x = 315;
	uiPlayDemo.promptMessage.generic.y = 280;

	uiPlayDemo.yes.generic.id = ID_YES;
	uiPlayDemo.yes.generic.type = QMTYPE_ACTION;
	uiPlayDemo.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiPlayDemo.yes.generic.name = "Ok";
	uiPlayDemo.yes.generic.x = 380;
	uiPlayDemo.yes.generic.y = 460;
	uiPlayDemo.yes.generic.callback = UI_PlayDemo_Callback;

	uiPlayDemo.no.generic.id = ID_NO;
	uiPlayDemo.no.generic.type = QMTYPE_ACTION;
	uiPlayDemo.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiPlayDemo.no.generic.name = "Cancel";
	uiPlayDemo.no.generic.x = 530;
	uiPlayDemo.no.generic.y = 460;
	uiPlayDemo.no.generic.callback = UI_PlayDemo_Callback;

	UI_PlayDemo_GetDemoList();

	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.background );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.banner );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.play );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.remove );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.cancel );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.hintMessage );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.levelShot );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.demosList );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.msgBox );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.promptMessage );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.no );
	UI_AddItem( &uiPlayDemo.menu, (void *)&uiPlayDemo.yes );
}
/*
=================
UI_CustomGame_Init
=================
*/
static void UI_CustomGame_Init( void )
{
	memset( &uiCustomGame, 0, sizeof( uiCustomGame_t ));

	uiCustomGame.menu.vidInitFunc = UI_CustomGame_Init;
	uiCustomGame.menu.keyFunc = UI_CustomGame_KeyFunc;

	StringConcat( uiCustomGame.hintText, "Type", TYPE_LENGTH );
	StringConcat( uiCustomGame.hintText, uiEmptyString, TYPE_LENGTH );
	StringConcat( uiCustomGame.hintText, "Name", NAME_LENGTH );
	StringConcat( uiCustomGame.hintText, uiEmptyString, NAME_LENGTH );
	StringConcat( uiCustomGame.hintText, "Version", VER_LENGTH );
	StringConcat( uiCustomGame.hintText, uiEmptyString, VER_LENGTH );
	StringConcat( uiCustomGame.hintText, "Size", SIZE_LENGTH );
	StringConcat( uiCustomGame.hintText, uiEmptyString, SIZE_LENGTH );

	uiCustomGame.background.generic.id = ID_BACKGROUND;
	uiCustomGame.background.generic.type = QMTYPE_BITMAP;
	uiCustomGame.background.generic.flags = QMF_INACTIVE;
	uiCustomGame.background.generic.x = 0;
	uiCustomGame.background.generic.y = 0;
	uiCustomGame.background.generic.width = 1024;
	uiCustomGame.background.generic.height = 768;
	uiCustomGame.background.pic = ART_BACKGROUND;

	uiCustomGame.banner.generic.id = ID_BANNER;
	uiCustomGame.banner.generic.type = QMTYPE_BITMAP;
	uiCustomGame.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiCustomGame.banner.generic.x = UI_BANNER_POSX;
	uiCustomGame.banner.generic.y = UI_BANNER_POSY;
	uiCustomGame.banner.generic.width = UI_BANNER_WIDTH;
	uiCustomGame.banner.generic.height = UI_BANNER_HEIGHT;
	uiCustomGame.banner.pic = ART_BANNER;

	uiCustomGame.load.generic.id = ID_ACTIVATE;
	uiCustomGame.load.generic.type = QMTYPE_BM_BUTTON;
	uiCustomGame.load.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCustomGame.load.generic.x = 72;
	uiCustomGame.load.generic.y = 230;
	uiCustomGame.load.generic.name = "Activate";
	uiCustomGame.load.generic.statusText = "Activate selected custom game";
	uiCustomGame.load.generic.callback = UI_CustomGame_Callback;

	UI_UtilSetupPicButton( &uiCustomGame.load, PC_ACTIVATE );

	uiCustomGame.go2url.generic.id = ID_GOTOSITE;
	uiCustomGame.go2url.generic.type = QMTYPE_BM_BUTTON;
	uiCustomGame.go2url.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCustomGame.go2url.generic.x = 72;
	uiCustomGame.go2url.generic.y = 280;
	uiCustomGame.go2url.generic.name = "Visit web site";
	uiCustomGame.go2url.generic.statusText = "Visit the web site of game developrs";
	uiCustomGame.go2url.generic.callback = UI_CustomGame_Callback;

	UI_UtilSetupPicButton( &uiCustomGame.go2url, PC_VISIT_WEB_SITE );

	uiCustomGame.done.generic.id = ID_DONE;
	uiCustomGame.done.generic.type = QMTYPE_BM_BUTTON;
	uiCustomGame.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCustomGame.done.generic.x = 72;
	uiCustomGame.done.generic.y = 330;
	uiCustomGame.done.generic.name = "Done";
	uiCustomGame.done.generic.statusText = "Return to main menu";
	uiCustomGame.done.generic.callback = UI_CustomGame_Callback;

	UI_UtilSetupPicButton( &uiCustomGame.done, PC_DONE );

	uiCustomGame.hintMessage.generic.id = ID_TABLEHINT;
	uiCustomGame.hintMessage.generic.type = QMTYPE_ACTION;
	uiCustomGame.hintMessage.generic.flags = QMF_INACTIVE|QMF_SMALLFONT;
	uiCustomGame.hintMessage.generic.color = uiColorHelp;
	uiCustomGame.hintMessage.generic.name = uiCustomGame.hintText;
	uiCustomGame.hintMessage.generic.x = 360;
	uiCustomGame.hintMessage.generic.y = 225;

	uiCustomGame.modList.generic.id = ID_MODLIST;
	uiCustomGame.modList.generic.type = QMTYPE_SCROLLLIST;
	uiCustomGame.modList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_SMALLFONT;
	uiCustomGame.modList.generic.x = 360;
	uiCustomGame.modList.generic.y = 255;
	uiCustomGame.modList.generic.width = 640;
	uiCustomGame.modList.generic.height = 440;
	uiCustomGame.modList.generic.callback = UI_CustomGame_Callback;

	uiCustomGame.msgBox.generic.id = ID_MSGBOX;
	uiCustomGame.msgBox.generic.type = QMTYPE_ACTION;
	uiCustomGame.msgBox.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiCustomGame.msgBox.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
	uiCustomGame.msgBox.generic.x = 192;
	uiCustomGame.msgBox.generic.y = 256;
	uiCustomGame.msgBox.generic.width = 640;
	uiCustomGame.msgBox.generic.height = 256;

	uiCustomGame.promptMessage.generic.id = ID_MSGBOX;
	uiCustomGame.promptMessage.generic.type = QMTYPE_ACTION;
	uiCustomGame.promptMessage.generic.flags = QMF_INACTIVE|QMF_DROPSHADOW|QMF_HIDDEN;
	uiCustomGame.promptMessage.generic.name = "Leave current game?";
	uiCustomGame.promptMessage.generic.x = 315;
	uiCustomGame.promptMessage.generic.y = 280;

	uiCustomGame.yes.generic.id = ID_YES;
	uiCustomGame.yes.generic.type = QMTYPE_BM_BUTTON;
	uiCustomGame.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiCustomGame.yes.generic.name = "Ok";
	uiCustomGame.yes.generic.x = 380;
	uiCustomGame.yes.generic.y = 460;
	uiCustomGame.yes.generic.callback = UI_CustomGame_Callback;

	UI_UtilSetupPicButton( &uiCustomGame.yes, PC_OK );

	uiCustomGame.no.generic.id = ID_NO;
	uiCustomGame.no.generic.type = QMTYPE_BM_BUTTON;
	uiCustomGame.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiCustomGame.no.generic.name = "Cancel";
	uiCustomGame.no.generic.x = 530;
	uiCustomGame.no.generic.y = 460;
	uiCustomGame.no.generic.callback = UI_CustomGame_Callback;

	UI_UtilSetupPicButton( &uiCustomGame.no, PC_CANCEL );

	UI_CustomGame_GetModList();

	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.background );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.banner );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.load );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.go2url );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.done );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.hintMessage );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.modList );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.msgBox );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.promptMessage );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.no );
	UI_AddItem( &uiCustomGame.menu, (void *)&uiCustomGame.yes );
}
示例#4
0
/*
=================
UI_PlayerSetup_Init
=================
*/
static void UI_PlayerSetup_Init( void )
{
	memset( &uiPlayerSetup, 0, sizeof( uiPlayerSetup_t ));

	uiPlayerSetup.menu.vidInitFunc = UI_PlayerSetup_Init;

	uiPlayerSetup.uiWhite = PIC_Load("*white");

	uiPlayerSetup.background.generic.id = ID_BACKGROUND;
	uiPlayerSetup.background.generic.type = QMTYPE_BITMAP;
	uiPlayerSetup.background.generic.flags = QMF_INACTIVE;
	uiPlayerSetup.background.generic.x = 0;
	uiPlayerSetup.background.generic.y = 0;
	uiPlayerSetup.background.generic.width = uiStatic.width;
	uiPlayerSetup.background.generic.height = 768;
	uiPlayerSetup.background.pic = ART_BACKGROUND;

	uiPlayerSetup.banner.generic.id = ID_BANNER;
	uiPlayerSetup.banner.generic.type = QMTYPE_BITMAP;
	uiPlayerSetup.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiPlayerSetup.banner.generic.x = UI_BANNER_POSX;
	uiPlayerSetup.banner.generic.y = UI_BANNER_POSY;
	uiPlayerSetup.banner.generic.width = UI_BANNER_WIDTH;
	uiPlayerSetup.banner.generic.height = UI_BANNER_HEIGHT;
	uiPlayerSetup.banner.pic = ART_BANNER;

	uiPlayerSetup.done.generic.id = ID_DONE;
	uiPlayerSetup.done.generic.type = QMTYPE_BM_BUTTON;
	uiPlayerSetup.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayerSetup.done.generic.x = 72;
	uiPlayerSetup.done.generic.y = 230;
	uiPlayerSetup.done.generic.name = "Done";
	uiPlayerSetup.done.generic.statusText = "Go back to the Multiplayer Menu";
	uiPlayerSetup.done.generic.callback = UI_PlayerSetup_Callback;

	UI_UtilSetupPicButton( &uiPlayerSetup.done, PC_DONE );

	uiPlayerSetup.AdvOptions.generic.id = ID_ADVOPTIONS;
	uiPlayerSetup.AdvOptions.generic.type = QMTYPE_BM_BUTTON;
	uiPlayerSetup.AdvOptions.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayerSetup.AdvOptions.generic.x = 72;
	uiPlayerSetup.AdvOptions.generic.y = 280;
	uiPlayerSetup.AdvOptions.generic.name = "Adv. Options";
	uiPlayerSetup.AdvOptions.generic.statusText = "Configure handness, fov and other advanced options";
	uiPlayerSetup.AdvOptions.generic.callback = UI_PlayerSetup_Callback;

	UI_UtilSetupPicButton( &uiPlayerSetup.AdvOptions, PC_ADV_OPT );

	uiPlayerSetup.name.generic.id = ID_NAME;
	uiPlayerSetup.name.generic.type = QMTYPE_FIELD;
	uiPlayerSetup.name.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayerSetup.name.generic.x = 320;
	uiPlayerSetup.name.generic.y = 260;
	uiPlayerSetup.name.generic.width = 256;
	uiPlayerSetup.name.generic.height = 36;
	uiPlayerSetup.name.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.name.generic.statusText = "Enter your multiplayer display name";
	uiPlayerSetup.name.maxLength = 32;

	uiPlayerSetup.crosshairView.generic.id = ID_CROSSHAIRVIEW;
	uiPlayerSetup.crosshairView.generic.type = QMTYPE_BITMAP;
	uiPlayerSetup.crosshairView.generic.flags = QMF_INACTIVE;
	uiPlayerSetup.crosshairView.generic.x = 320;
	uiPlayerSetup.crosshairView.generic.y = 310;
	uiPlayerSetup.crosshairView.generic.width = 96;
	uiPlayerSetup.crosshairView.generic.height = 96;
	uiPlayerSetup.crosshairView.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.crosshairView.generic.ownerdraw = UI_Crosshair_Ownerdraw;
	uiPlayerSetup.crosshairView.generic.statusText = "Choose dynamic crosshair";
	uiPlayerSetup.crosshairView.pic = "gfx/vgui/crosshair";

	uiPlayerSetup.crosshairSize.generic.id = ID_CROSSHAIRSIZE;
	uiPlayerSetup.crosshairSize.generic.type = QMTYPE_SPINCONTROL;
	uiPlayerSetup.crosshairSize.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayerSetup.crosshairSize.generic.x = 480;
	uiPlayerSetup.crosshairSize.generic.y = 315;
	uiPlayerSetup.crosshairSize.generic.height = 26;
	uiPlayerSetup.crosshairSize.generic.width = 256;
	uiPlayerSetup.crosshairSize.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.crosshairSize.generic.statusText = "Set crosshair size";
	uiPlayerSetup.crosshairSize.minValue = 0;
	uiPlayerSetup.crosshairSize.maxValue = 3;
	uiPlayerSetup.crosshairSize.range	 = 1;

	uiPlayerSetup.crosshairColor.generic.id = ID_CROSSHAIRCOLOR;
	uiPlayerSetup.crosshairColor.generic.type = QMTYPE_SPINCONTROL;
	uiPlayerSetup.crosshairColor.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayerSetup.crosshairColor.generic.x = 480;
	uiPlayerSetup.crosshairColor.generic.y = 375;
	uiPlayerSetup.crosshairColor.generic.height = 26;
	uiPlayerSetup.crosshairColor.generic.width = 256;
	uiPlayerSetup.crosshairColor.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.crosshairColor.generic.statusText = "Set crosshair color";
	uiPlayerSetup.crosshairColor.minValue = 0;
	uiPlayerSetup.crosshairColor.maxValue = 4;
	uiPlayerSetup.crosshairColor.range	  = 1;

	uiPlayerSetup.crosshairTranslucent.generic.id = ID_CROSSHAIRCOLOR;
	uiPlayerSetup.crosshairTranslucent.generic.type = QMTYPE_CHECKBOX;
	uiPlayerSetup.crosshairTranslucent.generic.flags = QMF_HIGHLIGHTIFFOCUS | QMF_ACT_ONRELEASE | QMF_DROPSHADOW;
	uiPlayerSetup.crosshairTranslucent.generic.x = 320;
	uiPlayerSetup.crosshairTranslucent.generic.y = 420;
	uiPlayerSetup.crosshairTranslucent.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.crosshairTranslucent.generic.name = "Translucent crosshair";
	uiPlayerSetup.crosshairTranslucent.generic.statusText = "Set additive render crosshair";

	UI_PlayerSetup_GetConfig();

	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.background );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.banner );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.done );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.AdvOptions );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.name );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.crosshairView );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.crosshairSize );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.crosshairTranslucent );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.crosshairColor );

}
示例#5
0
/*
=================
UI_Controls_Init
=================
*/
static void UI_Controls_Init( void )
{
	memset( &uiControls, 0, sizeof( uiControls_t ));

	uiControls.menu.vidInitFunc = UI_Controls_Init;
	uiControls.menu.keyFunc = UI_Controls_KeyFunc;

	StringConcat( uiControls.hintText, "Action", CMD_LENGTH );
	StringConcat( uiControls.hintText, uiEmptyString, CMD_LENGTH-4 );
	StringConcat( uiControls.hintText, "Key/Button", KEY1_LENGTH );
	StringConcat( uiControls.hintText, uiEmptyString, KEY1_LENGTH-8 );
	StringConcat( uiControls.hintText, "Alternate", KEY2_LENGTH );
	StringConcat( uiControls.hintText, uiEmptyString, KEY2_LENGTH );

	uiControls.background.generic.id = ID_BACKGROUND;
	uiControls.background.generic.type = QMTYPE_BITMAP;
	uiControls.background.generic.flags = QMF_INACTIVE;
	uiControls.background.generic.x = 0;
	uiControls.background.generic.y = 0;
	uiControls.background.generic.width = 1024;
	uiControls.background.generic.height = 768;
	uiControls.background.pic = ART_BACKGROUND;

	uiControls.banner.generic.id = ID_BANNER;
	uiControls.banner.generic.type = QMTYPE_BITMAP;
	uiControls.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiControls.banner.generic.x = UI_BANNER_POSX;
	uiControls.banner.generic.y = UI_BANNER_POSY;
	uiControls.banner.generic.width = UI_BANNER_WIDTH;
	uiControls.banner.generic.height = UI_BANNER_HEIGHT;
	uiControls.banner.pic = ART_BANNER;

	uiControls.defaults.generic.id = ID_DEFAULTS;
	uiControls.defaults.generic.type = QMTYPE_BM_BUTTON;
	uiControls.defaults.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiControls.defaults.generic.x = 72;
	uiControls.defaults.generic.y = 230;
	uiControls.defaults.generic.name = "Use defaults";
	uiControls.defaults.generic.statusText = "Reset all buttons binding to their default values";
	uiControls.defaults.generic.callback = UI_Controls_Callback;

	UI_UtilSetupPicButton( &uiControls.defaults, PC_USE_DEFAULTS );

	uiControls.advanced.generic.id = ID_ADVANCED;
	uiControls.advanced.generic.type = QMTYPE_BM_BUTTON;
	uiControls.advanced.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiControls.advanced.generic.x = 72;
	uiControls.advanced.generic.y = 280;
	uiControls.advanced.generic.name = "Adv controls";
	uiControls.advanced.generic.statusText = "Change mouse sensitivity, enable autoaim, mouselook and crosshair";
	uiControls.advanced.generic.callback = UI_Controls_Callback;

	UI_UtilSetupPicButton( &uiControls.advanced, PC_ADV_CONTROLS );

	uiControls.done.generic.id = ID_DONE;
	uiControls.done.generic.type = QMTYPE_BM_BUTTON;
	uiControls.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiControls.done.generic.x = 72;
	uiControls.done.generic.y = 330;
	uiControls.done.generic.name = "Ok";
	uiControls.done.generic.statusText = "Save changes and return to configuration menu";
	uiControls.done.generic.callback = UI_Controls_Callback;

	UI_UtilSetupPicButton( &uiControls.done, PC_DONE );

	uiControls.cancel.generic.id = ID_CANCEL;
	uiControls.cancel.generic.type = QMTYPE_BM_BUTTON;
	uiControls.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiControls.cancel.generic.x = 72;
	uiControls.cancel.generic.y = 380;
	uiControls.cancel.generic.name = "Cancel";
	uiControls.cancel.generic.statusText = "Discard changes and return to configuration menu";
	uiControls.cancel.generic.callback = UI_Controls_Callback;

	UI_UtilSetupPicButton( &uiControls.cancel, PC_CANCEL );

	uiControls.hintMessage.generic.id = ID_TABLEHINT;
	uiControls.hintMessage.generic.type = QMTYPE_ACTION;
	uiControls.hintMessage.generic.flags = QMF_INACTIVE|QMF_SMALLFONT;
	uiControls.hintMessage.generic.color = uiColorHelp;
	uiControls.hintMessage.generic.name = uiControls.hintText;
	uiControls.hintMessage.generic.x = 360;
	uiControls.hintMessage.generic.y = 225;

	uiControls.keysList.generic.id = ID_KEYLIST;
	uiControls.keysList.generic.type = QMTYPE_SCROLLLIST;
	uiControls.keysList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_SMALLFONT;
	uiControls.keysList.generic.x = 360;
	uiControls.keysList.generic.y = 255;
	uiControls.keysList.generic.width = 640;
	uiControls.keysList.generic.height = 440;
	uiControls.keysList.generic.callback = UI_Controls_Callback;

	UI_Controls_ParseKeysList();

	uiControls.msgBox1.generic.id = ID_MSGBOX1;
	uiControls.msgBox1.generic.type = QMTYPE_ACTION;
	uiControls.msgBox1.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiControls.msgBox1.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
	uiControls.msgBox1.generic.x = 192;
	uiControls.msgBox1.generic.y = 256;
	uiControls.msgBox1.generic.width = 640;
	uiControls.msgBox1.generic.height = 128;

	uiControls.msgBox2.generic.id = ID_MSGBOX2;
	uiControls.msgBox2.generic.type = QMTYPE_ACTION;
	uiControls.msgBox2.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiControls.msgBox2.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
	uiControls.msgBox2.generic.x = 192;
	uiControls.msgBox2.generic.y = 256;
	uiControls.msgBox2.generic.width = 640;
	uiControls.msgBox2.generic.height = 256;

	uiControls.dlgMessage.generic.id = ID_MSGTEXT;
	uiControls.dlgMessage.generic.type = QMTYPE_ACTION;
	uiControls.dlgMessage.generic.flags = QMF_INACTIVE|QMF_HIDDEN|QMF_DROPSHADOW;
	uiControls.dlgMessage.generic.name = "Press a key or button";
	uiControls.dlgMessage.generic.x = 320;
	uiControls.dlgMessage.generic.y = 280;

	uiControls.promptMessage.generic.id = ID_PROMPT;
	uiControls.promptMessage.generic.type = QMTYPE_ACTION;
	uiControls.promptMessage.generic.flags = QMF_INACTIVE|QMF_DROPSHADOW|QMF_HIDDEN;
	uiControls.promptMessage.generic.name = "Reset buttons to default?";
	uiControls.promptMessage.generic.x = 290;
	uiControls.promptMessage.generic.y = 280;

	uiControls.yes.generic.id = ID_YES;
	uiControls.yes.generic.type = QMTYPE_BM_BUTTON;
	uiControls.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiControls.yes.generic.name = "Ok";
	uiControls.yes.generic.x = 380;
	uiControls.yes.generic.y = 460;
	uiControls.yes.generic.callback = UI_Controls_Callback;

	UI_UtilSetupPicButton( &uiControls.yes, PC_OK );

	uiControls.no.generic.id = ID_NO;
	uiControls.no.generic.type = QMTYPE_BM_BUTTON;
	uiControls.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiControls.no.generic.name = "Cancel";
	uiControls.no.generic.x = 530;
	uiControls.no.generic.y = 460;
	uiControls.no.generic.callback = UI_Controls_Callback;

	UI_UtilSetupPicButton( &uiControls.no, PC_CANCEL );

	UI_AddItem( &uiControls.menu, (void *)&uiControls.background );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.banner );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.defaults );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.advanced );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.done );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.cancel );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.hintMessage );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.keysList );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.msgBox1 );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.msgBox2 );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.dlgMessage );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.promptMessage );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.no );
	UI_AddItem( &uiControls.menu, (void *)&uiControls.yes );
}
示例#6
0
/*
=================
UI_InternetGames_Init
=================
*/
static void UI_InternetGames_Init( void )
{
	memset( &uiInternetGames, 0, sizeof( uiInternetGames_t ));

	uiInternetGames.menu.vidInitFunc = UI_InternetGames_Init;
	uiInternetGames.menu.keyFunc = UI_InternetGames_KeyFunc;

	StringConcat( uiInternetGames.hintText, "Game", GAME_LENGTH );
	StringConcat( uiInternetGames.hintText, uiEmptyString, GAME_LENGTH );
	StringConcat( uiInternetGames.hintText, "Map", MAPNAME_LENGTH );
	StringConcat( uiInternetGames.hintText, uiEmptyString, MAPNAME_LENGTH );
	StringConcat( uiInternetGames.hintText, "Type", TYPE_LENGTH );
	StringConcat( uiInternetGames.hintText, uiEmptyString, TYPE_LENGTH );
	StringConcat( uiInternetGames.hintText, "Num/Max Clients", MAXCL_LENGTH );
	StringConcat( uiInternetGames.hintText, uiEmptyString, MAXCL_LENGTH );

	uiInternetGames.background.generic.id = ID_BACKGROUND;
	uiInternetGames.background.generic.type = QMTYPE_BITMAP;
	uiInternetGames.background.generic.flags = QMF_INACTIVE;
	uiInternetGames.background.generic.x = 0;
	uiInternetGames.background.generic.y = 0;
	uiInternetGames.background.generic.width = uiStatic.width;
	uiInternetGames.background.generic.height = 768;
	uiInternetGames.background.pic = ART_BACKGROUND;
	uiInternetGames.background.generic.ownerdraw = UI_Background_Ownerdraw;

	uiInternetGames.banner.generic.id = ID_BANNER;
	uiInternetGames.banner.generic.type = QMTYPE_BITMAP;
	uiInternetGames.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiInternetGames.banner.generic.x = UI_BANNER_POSX;
	uiInternetGames.banner.generic.y = UI_BANNER_POSY;
	uiInternetGames.banner.generic.width = UI_BANNER_WIDTH;
	uiInternetGames.banner.generic.height = UI_BANNER_HEIGHT;
	uiInternetGames.banner.pic = ART_BANNER;

	uiInternetGames.joinGame.generic.id = ID_JOINGAME;
	uiInternetGames.joinGame.generic.type = QMTYPE_BM_BUTTON;
	uiInternetGames.joinGame.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_GRAYED;
	uiInternetGames.joinGame.generic.x = 72;
	uiInternetGames.joinGame.generic.y = 230;
	uiInternetGames.joinGame.generic.name = "Join game";
	uiInternetGames.joinGame.generic.statusText = "Join to selected game";
	uiInternetGames.joinGame.generic.callback = UI_InternetGames_Callback;

	UI_UtilSetupPicButton( &uiInternetGames.joinGame, PC_JOIN_GAME );

	uiInternetGames.createGame.generic.id = ID_CREATEGAME;
	uiInternetGames.createGame.generic.type = QMTYPE_BM_BUTTON;
	uiInternetGames.createGame.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiInternetGames.createGame.generic.x = 72;
	uiInternetGames.createGame.generic.y = 280;
	uiInternetGames.createGame.generic.name = "Create game";
	uiInternetGames.createGame.generic.statusText = "Create new Internet game";
	uiInternetGames.createGame.generic.callback = UI_InternetGames_Callback;

	UI_UtilSetupPicButton( &uiInternetGames.createGame, PC_CREATE_GAME );

	uiInternetGames.gameInfo.generic.id = ID_GAMEINFO;
	uiInternetGames.gameInfo.generic.type = QMTYPE_BM_BUTTON;
	uiInternetGames.gameInfo.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_GRAYED;
	uiInternetGames.gameInfo.generic.x = 72;
	uiInternetGames.gameInfo.generic.y = 330;
	uiInternetGames.gameInfo.generic.name = "View game info";
	uiInternetGames.gameInfo.generic.statusText = "Get detail game info";
	uiInternetGames.gameInfo.generic.callback = UI_InternetGames_Callback;

	UI_UtilSetupPicButton( &uiInternetGames.gameInfo, PC_VIEW_GAME_INFO );

	uiInternetGames.refresh.generic.id = ID_REFRESH;
	uiInternetGames.refresh.generic.type = QMTYPE_BM_BUTTON;
	uiInternetGames.refresh.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiInternetGames.refresh.generic.x = 72;
	uiInternetGames.refresh.generic.y = 380;
	uiInternetGames.refresh.generic.name = "Refresh";
	uiInternetGames.refresh.generic.statusText = "Refresh servers list";
	uiInternetGames.refresh.generic.callback = UI_InternetGames_Callback;

	UI_UtilSetupPicButton( &uiInternetGames.refresh, PC_REFRESH );

	uiInternetGames.done.generic.id = ID_DONE;
	uiInternetGames.done.generic.type = QMTYPE_BM_BUTTON;
	uiInternetGames.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiInternetGames.done.generic.x = 72;
	uiInternetGames.done.generic.y = 430;
	uiInternetGames.done.generic.name = "Done";
	uiInternetGames.done.generic.statusText = "Return to main menu";
	uiInternetGames.done.generic.callback = UI_InternetGames_Callback;

	UI_UtilSetupPicButton( &uiInternetGames.done, PC_DONE );

	uiInternetGames.msgBox.generic.id = ID_MSGBOX;
	uiInternetGames.msgBox.generic.type = QMTYPE_ACTION;
	uiInternetGames.msgBox.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiInternetGames.msgBox.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
	uiInternetGames.msgBox.generic.x = DLG_X + 192;
	uiInternetGames.msgBox.generic.y = 256;
	uiInternetGames.msgBox.generic.width = 640;
	uiInternetGames.msgBox.generic.height = 256;

	uiInternetGames.dlgMessage1.generic.id = ID_MSGTEXT;
	uiInternetGames.dlgMessage1.generic.type = QMTYPE_ACTION;
	uiInternetGames.dlgMessage1.generic.flags = QMF_INACTIVE|QMF_HIDDEN|QMF_DROPSHADOW;
	uiInternetGames.dlgMessage1.generic.name = "Join a network game will exit";
	uiInternetGames.dlgMessage1.generic.x = DLG_X + 248;
	uiInternetGames.dlgMessage1.generic.y = 280;

	uiInternetGames.dlgMessage2.generic.id = ID_MSGTEXT;
	uiInternetGames.dlgMessage2.generic.type = QMTYPE_ACTION;
	uiInternetGames.dlgMessage2.generic.flags = QMF_INACTIVE|QMF_HIDDEN|QMF_DROPSHADOW;
	uiInternetGames.dlgMessage2.generic.name = "any current game, OK to exit?";
	uiInternetGames.dlgMessage2.generic.x = DLG_X + 248;
	uiInternetGames.dlgMessage2.generic.y = 310;

	uiInternetGames.yes.generic.id = ID_YES;
	uiInternetGames.yes.generic.type = QMTYPE_BM_BUTTON;
	uiInternetGames.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_HIDDEN|QMF_DROPSHADOW;
	uiInternetGames.yes.generic.name = "Ok";
	uiInternetGames.yes.generic.x = DLG_X + 380;
	uiInternetGames.yes.generic.y = 460;
	uiInternetGames.yes.generic.callback = UI_InternetGames_Callback;

	UI_UtilSetupPicButton( &uiInternetGames.yes, PC_OK );

	uiInternetGames.no.generic.id = ID_NO;
	uiInternetGames.no.generic.type = QMTYPE_BM_BUTTON;
	uiInternetGames.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_HIDDEN|QMF_DROPSHADOW;
	uiInternetGames.no.generic.name = "Cancel";
	uiInternetGames.no.generic.x = DLG_X + 530;
	uiInternetGames.no.generic.y = 460;
	uiInternetGames.no.generic.callback = UI_InternetGames_Callback;

	UI_UtilSetupPicButton( &uiInternetGames.no, PC_CANCEL );

	uiInternetGames.hintMessage.generic.id = ID_TABLEHINT;
	uiInternetGames.hintMessage.generic.type = QMTYPE_ACTION;
	uiInternetGames.hintMessage.generic.flags = QMF_INACTIVE|QMF_SMALLFONT;
	uiInternetGames.hintMessage.generic.color = uiColorHelp;
	uiInternetGames.hintMessage.generic.name = uiInternetGames.hintText;
	uiInternetGames.hintMessage.generic.x = 360;
	uiInternetGames.hintMessage.generic.y = 225;

	uiInternetGames.gameList.generic.id = ID_SERVERSLIST;
	uiInternetGames.gameList.generic.type = QMTYPE_SCROLLLIST;
	uiInternetGames.gameList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_SMALLFONT;
	uiInternetGames.gameList.generic.x = 360;
	uiInternetGames.gameList.generic.y = 255;
	uiInternetGames.gameList.generic.width = 640;
	uiInternetGames.gameList.generic.height = 440;
	uiInternetGames.gameList.generic.callback = UI_InternetGames_Callback;
	uiInternetGames.gameList.itemNames = (const char **)uiInternetGames.gameDescriptionPtr;

	// server.dll needs for reading savefiles or startup newgame
	if( !CheckGameDll( ))
		uiInternetGames.createGame.generic.flags |= QMF_GRAYED;	// server.dll is missed - remote servers only

	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.background );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.banner );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.joinGame );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.createGame );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.gameInfo );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.refresh );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.done );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.hintMessage );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.gameList );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.msgBox );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.dlgMessage1 );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.dlgMessage2 );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.no );
 	UI_AddItem( &uiInternetGames.menu, (void *)&uiInternetGames.yes );

	uiInternetGames.refreshTime = uiStatic.realTime + 500; // delay before update 0.5 sec
}
/*
 ==================
 UI_Performance_Init
 ==================
*/
static void UI_Performance_Init (){

	Mem_Fill(&uiPerformance, 0, sizeof(uiPerformance_t));

	uiPerformance.background.generic.id			= ID_BACKGROUND;
	uiPerformance.background.generic.type		= QMTYPE_BITMAP;
	uiPerformance.background.generic.flags		= QMF_INACTIVE;
	uiPerformance.background.generic.x			= 0;
	uiPerformance.background.generic.y			= 0;
	uiPerformance.background.generic.width		= 1024;
	uiPerformance.background.generic.height		= 768;
	uiPerformance.background.pic				= ART_BACKGROUND;

	uiPerformance.banner.generic.id				= ID_BANNER;
	uiPerformance.banner.generic.type			= QMTYPE_BITMAP;
	uiPerformance.banner.generic.flags			= QMF_INACTIVE;
	uiPerformance.banner.generic.x				= 0;
	uiPerformance.banner.generic.y				= 66;
	uiPerformance.banner.generic.width			= 1024;
	uiPerformance.banner.generic.height			= 46;
	uiPerformance.banner.pic					= ART_BANNER;

	uiPerformance.textShadow1.generic.id		= ID_TEXTSHADOW1;
	uiPerformance.textShadow1.generic.type		= QMTYPE_BITMAP;
	uiPerformance.textShadow1.generic.flags		= QMF_INACTIVE;
	uiPerformance.textShadow1.generic.x			= 182;
	uiPerformance.textShadow1.generic.y			= 170;
	uiPerformance.textShadow1.generic.width		= 256;
	uiPerformance.textShadow1.generic.height	= 256;
	uiPerformance.textShadow1.generic.color		= colorBlack;
	uiPerformance.textShadow1.pic				= ART_TEXT1;

	uiPerformance.textShadow2.generic.id		= ID_TEXTSHADOW2;
	uiPerformance.textShadow2.generic.type		= QMTYPE_BITMAP;
	uiPerformance.textShadow2.generic.flags		= QMF_INACTIVE;
	uiPerformance.textShadow2.generic.x			= 182;
	uiPerformance.textShadow2.generic.y			= 426;
	uiPerformance.textShadow2.generic.width		= 256;
	uiPerformance.textShadow2.generic.height	= 256;
	uiPerformance.textShadow2.generic.color		= colorBlack;
	uiPerformance.textShadow2.pic				= ART_TEXT2;

	uiPerformance.text1.generic.id				= ID_TEXT1;
	uiPerformance.text1.generic.type			= QMTYPE_BITMAP;
	uiPerformance.text1.generic.flags			= QMF_INACTIVE;
	uiPerformance.text1.generic.x				= 180;
	uiPerformance.text1.generic.y				= 168;
	uiPerformance.text1.generic.width			= 256;
	uiPerformance.text1.generic.height			= 256;
	uiPerformance.text1.pic						= ART_TEXT1;

	uiPerformance.text2.generic.id				= ID_TEXT2;
	uiPerformance.text2.generic.type			= QMTYPE_BITMAP;
	uiPerformance.text2.generic.flags			= QMF_INACTIVE;
	uiPerformance.text2.generic.x				= 180;
	uiPerformance.text2.generic.y				= 424;
	uiPerformance.text2.generic.width			= 256;
	uiPerformance.text2.generic.height			= 256;
	uiPerformance.text2.pic						= ART_TEXT2;

	uiPerformance.back.generic.id				= ID_BACK;
	uiPerformance.back.generic.type				= QMTYPE_BITMAP;
	uiPerformance.back.generic.x				= 413;
	uiPerformance.back.generic.y				= 656;
	uiPerformance.back.generic.width			= 198;
	uiPerformance.back.generic.height			= 38;
	uiPerformance.back.generic.callback			= UI_Performance_Callback;
	uiPerformance.back.generic.ownerdraw		= UI_Performance_Ownerdraw;
	uiPerformance.back.pic						= UI_BACKBUTTON;

	uiPerformance.screenSize.generic.id			= ID_SCREENSIZE;
	uiPerformance.screenSize.generic.type		= QMTYPE_SPINCONTROL;
	uiPerformance.screenSize.generic.flags		= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.screenSize.generic.x			= 580;
	uiPerformance.screenSize.generic.y			= 160;
	uiPerformance.screenSize.generic.width		= 198;
	uiPerformance.screenSize.generic.height		= 30;
	uiPerformance.screenSize.generic.callback	= UI_Performance_Callback;
	uiPerformance.screenSize.generic.statusText	= "Set your game window's screen size";
	uiPerformance.screenSize.minValue			= 30;
	uiPerformance.screenSize.maxValue			= 100;
	uiPerformance.screenSize.range				= 10;

	uiPerformance.syncEveryFrame.generic.id		= ID_SYNCEVERYFRAME;
	uiPerformance.syncEveryFrame.generic.type	= QMTYPE_SPINCONTROL;
	uiPerformance.syncEveryFrame.generic.flags	= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.syncEveryFrame.generic.x		= 580;
	uiPerformance.syncEveryFrame.generic.y		= 192;
	uiPerformance.syncEveryFrame.generic.width	= 198;
	uiPerformance.syncEveryFrame.generic.height	= 30;
	uiPerformance.syncEveryFrame.generic.callback	= UI_Performance_Callback;
	uiPerformance.syncEveryFrame.generic.statusText	= "Synchronize video frames";
	uiPerformance.syncEveryFrame.minValue		= 0;
	uiPerformance.syncEveryFrame.maxValue		= 1;
	uiPerformance.syncEveryFrame.range			= 1;

	uiPerformance.inGameVideo.generic.id		= ID_INGAMEVIDEO;
	uiPerformance.inGameVideo.generic.type		= QMTYPE_SPINCONTROL;
	uiPerformance.inGameVideo.generic.flags		= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.inGameVideo.generic.x			= 580;
	uiPerformance.inGameVideo.generic.y			= 224;
	uiPerformance.inGameVideo.generic.width		= 198;
	uiPerformance.inGameVideo.generic.height	= 30;
	uiPerformance.inGameVideo.generic.callback	= UI_Performance_Callback;
	uiPerformance.inGameVideo.generic.statusText	= "Play in-game cinematics";
	uiPerformance.inGameVideo.minValue			= 0;
	uiPerformance.inGameVideo.maxValue			= 1;
	uiPerformance.inGameVideo.range				= 1;

	uiPerformance.dynamicLights.generic.id		= ID_DYNAMICLIGHTS;
	uiPerformance.dynamicLights.generic.type	= QMTYPE_SPINCONTROL;
	uiPerformance.dynamicLights.generic.flags	= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.dynamicLights.generic.x		= 580;
	uiPerformance.dynamicLights.generic.y		= 256;
	uiPerformance.dynamicLights.generic.width	= 198;
	uiPerformance.dynamicLights.generic.height	= 30;
	uiPerformance.dynamicLights.generic.callback	= UI_Performance_Callback;
	uiPerformance.dynamicLights.generic.statusText	= "Render dynamic lights on map and models";
	uiPerformance.dynamicLights.minValue		= 0;
	uiPerformance.dynamicLights.maxValue		= 1;
	uiPerformance.dynamicLights.range			= 1;

	uiPerformance.shadows.generic.id			= ID_SHADOWS;
	uiPerformance.shadows.generic.type			= QMTYPE_SPINCONTROL;
	uiPerformance.shadows.generic.flags			= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.shadows.generic.x				= 580;
	uiPerformance.shadows.generic.y				= 288;
	uiPerformance.shadows.generic.width			= 198;
	uiPerformance.shadows.generic.height		= 30;
	uiPerformance.shadows.generic.callback		= UI_Performance_Callback;
	uiPerformance.shadows.generic.statusText	= "Render shadows cast by models";
	uiPerformance.shadows.minValue				= 0;
	uiPerformance.shadows.maxValue				= 1;
	uiPerformance.shadows.range					= 1;

	uiPerformance.caustics.generic.id			= ID_CAUSTICS;
	uiPerformance.caustics.generic.type			= QMTYPE_SPINCONTROL;
	uiPerformance.caustics.generic.flags		= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.caustics.generic.x			= 580;
	uiPerformance.caustics.generic.y			= 320;
	uiPerformance.caustics.generic.width		= 198;
	uiPerformance.caustics.generic.height		= 30;
	uiPerformance.caustics.generic.callback		= UI_Performance_Callback;
	uiPerformance.caustics.generic.statusText	= "Render caustics on submerged surfaces";
	uiPerformance.caustics.minValue				= 0;
	uiPerformance.caustics.maxValue				= 1;
	uiPerformance.caustics.range				= 1;

	uiPerformance.particles.generic.id			= ID_PARTICLES;
	uiPerformance.particles.generic.type		= QMTYPE_SPINCONTROL;
	uiPerformance.particles.generic.flags		= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.particles.generic.x			= 580;
	uiPerformance.particles.generic.y			= 352;
	uiPerformance.particles.generic.width		= 198;
	uiPerformance.particles.generic.height		= 30;
	uiPerformance.particles.generic.callback	= UI_Performance_Callback;
	uiPerformance.particles.generic.statusText	= "Enable/Disable particle effects";
	uiPerformance.particles.minValue			= 0;
	uiPerformance.particles.maxValue			= 1;
	uiPerformance.particles.range				= 1;

	uiPerformance.decals.generic.id				= ID_DECALS;
	uiPerformance.decals.generic.type			= QMTYPE_SPINCONTROL;
	uiPerformance.decals.generic.flags			= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.decals.generic.x				= 580;
	uiPerformance.decals.generic.y				= 384;
	uiPerformance.decals.generic.width			= 198;
	uiPerformance.decals.generic.height			= 30;
	uiPerformance.decals.generic.callback		= UI_Performance_Callback;
	uiPerformance.decals.generic.statusText		= "Enable/Disable marks on walls";
	uiPerformance.decals.minValue				= 0;
	uiPerformance.decals.maxValue				= 2;
	uiPerformance.decals.range					= 1;

	uiPerformance.ejectingBrass.generic.id		= ID_EJECTINGBRASS;
	uiPerformance.ejectingBrass.generic.type	= QMTYPE_SPINCONTROL;
	uiPerformance.ejectingBrass.generic.flags	= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.ejectingBrass.generic.x		= 580;
	uiPerformance.ejectingBrass.generic.y		= 416;
	uiPerformance.ejectingBrass.generic.width	= 198;
	uiPerformance.ejectingBrass.generic.height	= 30;
	uiPerformance.ejectingBrass.generic.callback	= UI_Performance_Callback;
	uiPerformance.ejectingBrass.generic.statusText	= "Enable/Disable ejecting bullet casings from weapons";
	uiPerformance.ejectingBrass.minValue		= 0;
	uiPerformance.ejectingBrass.maxValue		= 2;
	uiPerformance.ejectingBrass.range			= 1;

	uiPerformance.shellEffects.generic.id		= ID_SHELLEFFECTS;
	uiPerformance.shellEffects.generic.type		= QMTYPE_SPINCONTROL;
	uiPerformance.shellEffects.generic.flags	= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.shellEffects.generic.x		= 580;
	uiPerformance.shellEffects.generic.y		= 448;
	uiPerformance.shellEffects.generic.width	= 198;
	uiPerformance.shellEffects.generic.height	= 30;
	uiPerformance.shellEffects.generic.callback	= UI_Performance_Callback;
	uiPerformance.shellEffects.generic.statusText	= "Enable/Disable player and weapon shells";
	uiPerformance.shellEffects.minValue			= 0;
	uiPerformance.shellEffects.maxValue			= 1;
	uiPerformance.shellEffects.range			= 1;

	uiPerformance.screenBlends.generic.id		= ID_SCREENBLENDS;
	uiPerformance.screenBlends.generic.type		= QMTYPE_SPINCONTROL;
	uiPerformance.screenBlends.generic.flags	= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.screenBlends.generic.x		= 580;
	uiPerformance.screenBlends.generic.y		= 480;
	uiPerformance.screenBlends.generic.width	= 198;
	uiPerformance.screenBlends.generic.height	= 30;
	uiPerformance.screenBlends.generic.callback	= UI_Performance_Callback;
	uiPerformance.screenBlends.generic.statusText	= "Enable/Disable screen blends";
	uiPerformance.screenBlends.minValue			= 0;
	uiPerformance.screenBlends.maxValue			= 2;
	uiPerformance.screenBlends.range			= 1;

	uiPerformance.blood.generic.id				= ID_BLOOD;
	uiPerformance.blood.generic.type			= QMTYPE_SPINCONTROL;
	uiPerformance.blood.generic.flags			= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiPerformance.blood.generic.x				= 580;
	uiPerformance.blood.generic.y				= 512;
	uiPerformance.blood.generic.width			= 198;
	uiPerformance.blood.generic.height			= 30;
	uiPerformance.blood.generic.callback		= UI_Performance_Callback;
	uiPerformance.blood.generic.statusText		= "Enable/Disable blood effects";
	uiPerformance.blood.minValue				= 0;
	uiPerformance.blood.maxValue				= 1;
	uiPerformance.blood.range					= 1;

	UI_Performance_GetConfig();

	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.background);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.banner);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.textShadow1);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.textShadow2);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.text1);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.text2);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.back);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.screenSize);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.syncEveryFrame);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.inGameVideo);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.dynamicLights);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.shadows);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.caustics);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.particles);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.decals);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.ejectingBrass);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.shellEffects);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.screenBlends);
	UI_AddItem(&uiPerformance.menu, (void *)&uiPerformance.blood);
}
示例#8
0
/*
=================
UI_CreateGame_Init
=================
*/
static void UI_CreateGame_Init( void )
{
	Mem_Set( &uiCreateGame, 0, sizeof( uiCreateGame_t ));

	com.strncat( uiCreateGame.hintText, "Map", MAPNAME_LENGTH );
	com.strncat( uiCreateGame.hintText, uiEmptyString, MAPNAME_LENGTH );
	com.strncat( uiCreateGame.hintText, "Title", TITLE_LENGTH );
	com.strncat( uiCreateGame.hintText, uiEmptyString, TITLE_LENGTH );

	uiCreateGame.background.generic.id = ID_BACKGROUND;
	uiCreateGame.background.generic.type = QMTYPE_BITMAP;
	uiCreateGame.background.generic.flags = QMF_INACTIVE;
	uiCreateGame.background.generic.x = 0;
	uiCreateGame.background.generic.y = 0;
	uiCreateGame.background.generic.width = 1024;
	uiCreateGame.background.generic.height = 768;
	uiCreateGame.background.pic = ART_BACKGROUND;

	uiCreateGame.banner.generic.id = ID_BANNER;
	uiCreateGame.banner.generic.type = QMTYPE_BITMAP;
	uiCreateGame.banner.generic.flags = QMF_INACTIVE;
	uiCreateGame.banner.generic.x = UI_BANNER_POSX;
	uiCreateGame.banner.generic.y = UI_BANNER_POSY;
	uiCreateGame.banner.generic.width = UI_BANNER_WIDTH;
	uiCreateGame.banner.generic.height = UI_BANNER_HEIGHT;
	uiCreateGame.banner.pic = ART_BANNER;

	uiCreateGame.advOptions.generic.id = ID_ADVOPTIONS;
	uiCreateGame.advOptions.generic.type = QMTYPE_ACTION;
	uiCreateGame.advOptions.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_GRAYED;
	uiCreateGame.advOptions.generic.x = 72;
	uiCreateGame.advOptions.generic.y = 230;
	uiCreateGame.advOptions.generic.name = "Adv. Options";
	uiCreateGame.advOptions.generic.statusText = "Open the LAN game advanced options menu";
	uiCreateGame.advOptions.generic.callback = UI_CreateGame_Callback;

	uiCreateGame.done.generic.id = ID_DONE;
	uiCreateGame.done.generic.type = QMTYPE_ACTION;
	uiCreateGame.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCreateGame.done.generic.x = 72;
	uiCreateGame.done.generic.y = 280;
	uiCreateGame.done.generic.name = "Ok";
	uiCreateGame.done.generic.statusText = "Start the multiplayer game";
	uiCreateGame.done.generic.callback = UI_CreateGame_Callback;

	uiCreateGame.cancel.generic.id = ID_CANCEL;
	uiCreateGame.cancel.generic.type = QMTYPE_ACTION;
	uiCreateGame.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCreateGame.cancel.generic.x = 72;
	uiCreateGame.cancel.generic.y = 330;
	uiCreateGame.cancel.generic.name = "Cancel";
	uiCreateGame.cancel.generic.statusText = "Return to LAN game menu";
	uiCreateGame.cancel.generic.callback = UI_CreateGame_Callback;

	uiCreateGame.dedicatedServer.generic.id = ID_DEDICATED;
	uiCreateGame.dedicatedServer.generic.type = QMTYPE_CHECKBOX;
	uiCreateGame.dedicatedServer.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiCreateGame.dedicatedServer.generic.name = "Dedicated server";
	uiCreateGame.dedicatedServer.generic.x = 72;
	uiCreateGame.dedicatedServer.generic.y = 685;
	uiCreateGame.dedicatedServer.generic.callback = UI_CreateGame_Callback;
	uiCreateGame.dedicatedServer.generic.statusText = "faster, but you can't join the server from this machine";

	uiCreateGame.hintMessage.generic.id = ID_TABLEHINT;
	uiCreateGame.hintMessage.generic.type = QMTYPE_ACTION;
	uiCreateGame.hintMessage.generic.flags = QMF_INACTIVE|QMF_SMALLFONT;
	uiCreateGame.hintMessage.generic.color = uiColorHelp;
	uiCreateGame.hintMessage.generic.name = uiCreateGame.hintText;
	uiCreateGame.hintMessage.generic.x = 590;
	uiCreateGame.hintMessage.generic.y = 215;

	uiCreateGame.mapsList.generic.id = ID_MAPLIST;
	uiCreateGame.mapsList.generic.type = QMTYPE_SCROLLLIST;
	uiCreateGame.mapsList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_SMALLFONT;
	uiCreateGame.mapsList.generic.x = 590;
	uiCreateGame.mapsList.generic.y = 245;
	uiCreateGame.mapsList.generic.width = 410;
	uiCreateGame.mapsList.generic.height = 440;
	uiCreateGame.mapsList.generic.callback = UI_CreateGame_Callback;

	uiCreateGame.hostName.generic.id = ID_HOSTNAME;
	uiCreateGame.hostName.generic.type = QMTYPE_FIELD;
	uiCreateGame.hostName.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCreateGame.hostName.generic.name = "Server Name:";
	uiCreateGame.hostName.generic.x = 350;
	uiCreateGame.hostName.generic.y = 260;
	uiCreateGame.hostName.generic.width = 205;
	uiCreateGame.hostName.generic.height = 32;
	uiCreateGame.hostName.generic.callback = UI_CreateGame_Callback;
	uiCreateGame.hostName.maxLength = 16;
	com.strncpy( uiCreateGame.hostName.buffer, Cvar_VariableString( "sv_hostname" ), sizeof( uiCreateGame.hostName.buffer ));

	uiCreateGame.maxClients.generic.id = ID_MAXCLIENTS;
	uiCreateGame.maxClients.generic.type = QMTYPE_FIELD;
	uiCreateGame.maxClients.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NUMBERSONLY;
	uiCreateGame.maxClients.generic.name = "Max Players:";
	uiCreateGame.maxClients.generic.x = 350;
	uiCreateGame.maxClients.generic.y = 360;
	uiCreateGame.maxClients.generic.width = 205;
	uiCreateGame.maxClients.generic.height = 32;
	uiCreateGame.maxClients.maxLength = 3;
	if( Cvar_VariableInteger( "sv_maxclients" ) <= 1 )
		com.snprintf( uiCreateGame.maxClients.buffer, sizeof( uiCreateGame.maxClients.buffer ), "8" );
	else com.snprintf( uiCreateGame.maxClients.buffer, sizeof( uiCreateGame.maxClients.buffer ), "%i", Cvar_VariableInteger( "sv_maxclients" ));

	uiCreateGame.password.generic.id = ID_PASSWORD;
	uiCreateGame.password.generic.type = QMTYPE_FIELD;
	uiCreateGame.password.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCreateGame.password.generic.name = "Password:"******"Starting a new game will exit";
	uiCreateGame.dlgMessage1.generic.x = 248;
	uiCreateGame.dlgMessage1.generic.y = 280;

	uiCreateGame.dlgMessage2.generic.id = ID_MSGTEXT;
	uiCreateGame.dlgMessage2.generic.type = QMTYPE_ACTION;
	uiCreateGame.dlgMessage2.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiCreateGame.dlgMessage2.generic.name = "any current game, OK to exit?";
	uiCreateGame.dlgMessage2.generic.x = 248;
	uiCreateGame.dlgMessage2.generic.y = 310;

	uiCreateGame.yes.generic.id = ID_YES;
	uiCreateGame.yes.generic.type = QMTYPE_ACTION;
	uiCreateGame.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_HIDDEN;
	uiCreateGame.yes.generic.name = "Ok";
	uiCreateGame.yes.generic.x = 380;
	uiCreateGame.yes.generic.y = 460;
	uiCreateGame.yes.generic.callback = UI_CreateGame_Callback;

	uiCreateGame.no.generic.id = ID_NO;
	uiCreateGame.no.generic.type = QMTYPE_ACTION;
	uiCreateGame.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_HIDDEN;
	uiCreateGame.no.generic.name = "Cancel";
	uiCreateGame.no.generic.x = 530;
	uiCreateGame.no.generic.y = 460;
	uiCreateGame.no.generic.callback = UI_CreateGame_Callback;

	UI_CreateGame_GetMapsList();
	if( !Host_ServerState()) SV_LoadProgs( "server" ); // force to get user mp_variables

	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.background );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.banner );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.advOptions );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.done );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.cancel );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.maxClients );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.hostName );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.password );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.dedicatedServer );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.hintMessage );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.mapsList );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.msgBox );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.dlgMessage1 );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.dlgMessage2 );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.no );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.yes );
}
示例#9
0
/*
=================
UI_TouchButtons_Init
=================
*/
static void UI_TouchButtons_Init( void )
{
    memset( &uiTouchButtons, 0, sizeof( uiTouchButtons_t ));

    //uiTouchOptions.hTestImage = PIC_Load( ART_GAMMA, PIC_KEEP_RGBDATA );

    uiTouchButtons.menu.vidInitFunc = UI_TouchButtons_Init;
    uiTouchButtons.initialized = true;

    uiTouchButtons.background.generic.id = ID_BACKGROUND;
    uiTouchButtons.background.generic.type = QMTYPE_BITMAP;
    uiTouchButtons.background.generic.flags = QMF_INACTIVE;
    uiTouchButtons.background.generic.x = 0;
    uiTouchButtons.background.generic.y = 0;
    uiTouchButtons.background.generic.width = uiStatic.width;
    uiTouchButtons.background.generic.height = 768;
    uiTouchButtons.background.pic = ART_BACKGROUND;

    uiTouchButtons.banner.generic.id = ID_BANNER;
    uiTouchButtons.banner.generic.type = QMTYPE_BITMAP;
    uiTouchButtons.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
    uiTouchButtons.banner.generic.x = UI_BANNER_POSX;
    uiTouchButtons.banner.generic.y = UI_BANNER_POSY - 70;
    uiTouchButtons.banner.generic.width = UI_BANNER_WIDTH;
    uiTouchButtons.banner.generic.height = UI_BANNER_HEIGHT;
    uiTouchButtons.banner.pic = ART_BANNER;
    /*
    	uiTouchOptions.testImage.generic.id = ID_BANNER;
    	uiTouchOptions.testImage.generic.type = QMTYPE_BITMAP;
    	uiTouchOptions.testImage.generic.flags = QMF_INACTIVE;
    	uiTouchOptions.testImage.generic.x = 390;
    	uiTouchOptions.testImage.generic.y = 225;
    	uiTouchOptions.testImage.generic.width = 480;
    	uiTouchOptions.testImage.generic.height = 450;
    	uiTouchOptions.testImage.pic = ART_GAMMA;
    	uiTouchOptions.testImage.generic.ownerdraw = UI_TouchButtons_Ownerdraw;
    */
    uiTouchButtons.done.generic.id = ID_DONE;
    uiTouchButtons.done.generic.type = QMTYPE_BM_BUTTON;
    uiTouchButtons.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.done.generic.x = 72;
    uiTouchButtons.done.generic.y = 550;
    uiTouchButtons.done.generic.name = "Done";
    uiTouchButtons.done.generic.statusText = "Save changes and go back to the Touch Menu";
    uiTouchButtons.done.generic.callback = UI_TouchButtons_Callback;

    UI_UtilSetupPicButton( &uiTouchButtons.done, PC_DONE );

    uiTouchButtons.cancel.generic.id = ID_CANCEL;
    uiTouchButtons.cancel.generic.type = QMTYPE_BM_BUTTON;
    uiTouchButtons.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.cancel.generic.x = 72;
    uiTouchButtons.cancel.generic.y = 600;
    uiTouchButtons.cancel.generic.name = "Cancel";
    uiTouchButtons.cancel.generic.statusText = "Discard changes and go back to the Touch Menu";
    uiTouchButtons.cancel.generic.callback = UI_TouchButtons_Callback;

    UI_UtilSetupPicButton( &uiTouchButtons.cancel, PC_CANCEL );

    uiTouchButtons.red.generic.id = ID_RED;
    uiTouchButtons.red.generic.type = QMTYPE_SLIDER;
    uiTouchButtons.red.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.red.generic.name = "Red:";
    uiTouchButtons.red.generic.x = 680;
    uiTouchButtons.red.generic.y = 150;
    uiTouchButtons.red.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.red.generic.statusText = "Horizontal look sensitivity";
    uiTouchButtons.red.minValue = 0.0;
    uiTouchButtons.red.maxValue = 1.0;
    uiTouchButtons.red.range = 0.05f;

    uiTouchButtons.green.generic.id = ID_GREEN;
    uiTouchButtons.green.generic.type = QMTYPE_SLIDER;
    uiTouchButtons.green.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.green.generic.name = "Green:";
    uiTouchButtons.green.generic.x = 680;
    uiTouchButtons.green.generic.y = 210;
    uiTouchButtons.green.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.green.generic.statusText = "Vertical look sensitivity";
    uiTouchButtons.green.minValue = 0.0;
    uiTouchButtons.green.maxValue = 1.0;
    uiTouchButtons.green.range = 0.05f;

    uiTouchButtons.blue.generic.id = ID_BLUE;
    uiTouchButtons.blue.generic.type = QMTYPE_SLIDER;
    uiTouchButtons.blue.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.blue.generic.name = "Blue:";
    uiTouchButtons.blue.generic.x = 680;
    uiTouchButtons.blue.generic.y = 270;
    uiTouchButtons.blue.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.blue.generic.statusText = "Side move sensitivity";
    uiTouchButtons.blue.minValue = 0.0;
    uiTouchButtons.blue.maxValue = 1.0;
    uiTouchButtons.blue.range = 0.05f;

    uiTouchButtons.alpha.generic.id = ID_ALPHA;
    uiTouchButtons.alpha.generic.type = QMTYPE_SLIDER;
    uiTouchButtons.alpha.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.alpha.generic.name = "Alpha:";
    uiTouchButtons.alpha.generic.x = 680;
    uiTouchButtons.alpha.generic.y = 330;
    uiTouchButtons.alpha.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.alpha.generic.statusText = "Forward move sensitivity";
    uiTouchButtons.alpha.minValue = 0.0;
    uiTouchButtons.alpha.maxValue = 1.0;
    uiTouchButtons.alpha.range = 0.05f;

    uiTouchButtons.hide.generic.id = ID_HIDE;
    uiTouchButtons.hide.generic.type = QMTYPE_CHECKBOX;
    uiTouchButtons.hide.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
    uiTouchButtons.hide.generic.name = "Hide";
    uiTouchButtons.hide.generic.x = 384 - 72 + 400;
    uiTouchButtons.hide.generic.y = 420;
    uiTouchButtons.hide.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.hide.generic.statusText = "show/hide button";

    uiTouchButtons.additive.generic.id = ID_ADDITIVE;
    uiTouchButtons.additive.generic.type = QMTYPE_CHECKBOX;
    uiTouchButtons.additive.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
    uiTouchButtons.additive.generic.name = "Additive";
    uiTouchButtons.additive.generic.x = 650;
    uiTouchButtons.additive.generic.y = 470;
    uiTouchButtons.additive.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.additive.generic.statusText = "Set button additive draw mode";

    uiTouchButtons.mp.generic.id = ID_MP;
    uiTouchButtons.mp.generic.type = QMTYPE_CHECKBOX;
    uiTouchButtons.mp.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
    uiTouchButtons.mp.generic.name = "MP";
    uiTouchButtons.mp.generic.x = 400;
    uiTouchButtons.mp.generic.y = 420;
    uiTouchButtons.mp.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.mp.generic.statusText = "Show button only in multiplayer";

    uiTouchButtons.sp.generic.id = ID_SP;
    uiTouchButtons.sp.generic.type = QMTYPE_CHECKBOX;
    uiTouchButtons.sp.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
    uiTouchButtons.sp.generic.name = "SP";
    uiTouchButtons.sp.generic.x = 160 - 72 + 400;
    uiTouchButtons.sp.generic.y = 420;
    uiTouchButtons.sp.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.sp.generic.statusText = "Show button only in singleplayer";

    uiTouchButtons.lock.generic.id = ID_LOCK;
    uiTouchButtons.lock.generic.type = QMTYPE_CHECKBOX;
    uiTouchButtons.lock.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
    uiTouchButtons.lock.generic.name = "Lock";
    uiTouchButtons.lock.generic.x = 256 - 72 + 400;
    uiTouchButtons.lock.generic.y = 420;
    uiTouchButtons.lock.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.lock.generic.statusText = "Lock button editing";

    uiTouchButtons.precision.generic.id = ID_PRECISION;
    uiTouchButtons.precision.generic.type = QMTYPE_CHECKBOX;
    uiTouchButtons.precision.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
    uiTouchButtons.precision.generic.name = "Look precision";
    uiTouchButtons.precision.generic.x = 400;
    uiTouchButtons.precision.generic.y = 470;
    uiTouchButtons.precision.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.precision.generic.statusText = "Increase look precision";

    uiTouchButtons.buttonList.generic.id = ID_BUTTONLIST;
    uiTouchButtons.buttonList.generic.type = QMTYPE_SCROLLLIST;
    uiTouchButtons.buttonList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_SMALLFONT;
    uiTouchButtons.buttonList.generic.x = 72;
    uiTouchButtons.buttonList.generic.y = 150;
    uiTouchButtons.buttonList.generic.width = 300;
    uiTouchButtons.buttonList.generic.height = 370;
    uiTouchButtons.buttonList.generic.callback = UI_TouchButtons_Callback;

    uiTouchButtons.save.generic.id = ID_SAVE;
    uiTouchButtons.save.generic.type = QMTYPE_BM_BUTTON;
    uiTouchButtons.save.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW | QMF_ACT_ONRELEASE;
    uiTouchButtons.save.generic.x = 384 - 72 + 320;
    uiTouchButtons.save.generic.y = 550;
    uiTouchButtons.save.generic.name = "Save";
    uiTouchButtons.save.generic.statusText = "Save as new button";
    uiTouchButtons.save.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.save.pic = PIC_Load("gfx/shell/btn_touch_save");

    uiTouchButtons.editor.generic.id = ID_EDITOR;
    uiTouchButtons.editor.generic.type = QMTYPE_BM_BUTTON;
    uiTouchButtons.editor.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW | QMF_ACT_ONRELEASE;
    uiTouchButtons.editor.generic.x = 384 - 72 + 320;
    uiTouchButtons.editor.generic.y = 600;
    uiTouchButtons.editor.generic.name = "Editor";
    uiTouchButtons.editor.generic.statusText = "Open interactive editor";
    uiTouchButtons.editor.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.editor.pic = PIC_Load("gfx/shell/btn_touch_editor");

    uiTouchButtons.select.generic.id = ID_SELECT;
    uiTouchButtons.select.generic.type = QMTYPE_BM_BUTTON;
    uiTouchButtons.select.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW | QMF_ACT_ONRELEASE;
    uiTouchButtons.select.generic.x = 500;
    uiTouchButtons.select.generic.y = 300;
    uiTouchButtons.select.generic.name = "Select";
    uiTouchButtons.select.generic.statusText = "Select texture from list";
    uiTouchButtons.select.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.select.pic = PIC_Load("gfx/shell/btn_touch_select");

    uiTouchButtons.name.generic.id = ID_NAME;
    uiTouchButtons.name.generic.type = QMTYPE_FIELD;
    uiTouchButtons.name.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.name.generic.name = "New Button:";
    uiTouchButtons.name.generic.x = 400;
    uiTouchButtons.name.generic.y = 550;
    uiTouchButtons.name.generic.width = 205;
    uiTouchButtons.name.generic.height = 32;
    uiTouchButtons.name.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.name.maxLength = 255;

    uiTouchButtons.command.generic.id = ID_COMMAND;
    uiTouchButtons.command.generic.type = QMTYPE_FIELD;
    uiTouchButtons.command.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.command.generic.name = "Command:";
    uiTouchButtons.command.generic.x = 400;
    uiTouchButtons.command.generic.y = 150;
    uiTouchButtons.command.generic.width = 205;
    uiTouchButtons.command.generic.height = 32;
    uiTouchButtons.command.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.command.maxLength = 255;

    uiTouchButtons.texture.generic.id = ID_TEXTURE;
    uiTouchButtons.texture.generic.type = QMTYPE_FIELD;
    uiTouchButtons.texture.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.texture.generic.name = "Texture:";
    uiTouchButtons.texture.generic.x = 400;
    uiTouchButtons.texture.generic.y = 250;
    uiTouchButtons.texture.generic.width = 205;
    uiTouchButtons.texture.generic.height = 32;
    uiTouchButtons.texture.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.texture.maxLength = 255;

    uiTouchButtons.msgBox.generic.id = ID_MSGBOX;
    uiTouchButtons.msgBox.generic.type = QMTYPE_ACTION;
    uiTouchButtons.msgBox.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
    uiTouchButtons.msgBox.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
    uiTouchButtons.msgBox.generic.x = DLG_X + 192;
    uiTouchButtons.msgBox.generic.y = 256;
    uiTouchButtons.msgBox.generic.width = 640;
    uiTouchButtons.msgBox.generic.height = 256;

    uiTouchButtons.color.generic.id = ID_COLOR;
    uiTouchButtons.color.generic.type = QMTYPE_ACTION;
    uiTouchButtons.color.generic.flags = QMF_INACTIVE;
    uiTouchButtons.color.generic.ownerdraw = UI_Color_Ownerdraw; // just a fill rectangle
    uiTouchButtons.color.generic.x = 800;
    uiTouchButtons.color.generic.y = 360;
    uiTouchButtons.color.generic.width = 70;
    uiTouchButtons.color.generic.height = 50;

    uiTouchButtons.preview.generic.id = ID_PREVIEW;
    uiTouchButtons.preview.generic.type = QMTYPE_ACTION;
    uiTouchButtons.preview.generic.flags = QMF_INACTIVE;
    uiTouchButtons.preview.generic.ownerdraw = UI_Preview_Ownerdraw; // just a fill rectangle
    uiTouchButtons.preview.generic.x = 400;
    uiTouchButtons.preview.generic.y = 300;
    uiTouchButtons.preview.generic.width = 70;
    uiTouchButtons.preview.generic.height = 70;

    uiTouchButtons.promptMessage.generic.id = ID_MSGBOX;
    uiTouchButtons.promptMessage.generic.type = QMTYPE_ACTION;
    uiTouchButtons.promptMessage.generic.flags = QMF_INACTIVE|QMF_DROPSHADOW|QMF_HIDDEN;
    uiTouchButtons.promptMessage.generic.name = uiTouchButtons.dialogText;
    uiTouchButtons.promptMessage.generic.x = DLG_X + 315;
    uiTouchButtons.promptMessage.generic.y = 280;

    uiTouchButtons.yes.generic.id = ID_YES;
    uiTouchButtons.yes.generic.type = QMTYPE_BM_BUTTON;
    uiTouchButtons.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
    uiTouchButtons.yes.generic.name = "Ok";
    uiTouchButtons.yes.generic.x = DLG_X + 380;
    uiTouchButtons.yes.generic.y = 460;
    uiTouchButtons.yes.generic.callback = UI_TouchButtons_Callback;

    UI_UtilSetupPicButton( &uiTouchButtons.yes, PC_OK );

    uiTouchButtons.no.generic.id = ID_NO;
    uiTouchButtons.no.generic.type = QMTYPE_BM_BUTTON;
    uiTouchButtons.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
    uiTouchButtons.no.generic.name = "Cancel";
    uiTouchButtons.no.generic.x = DLG_X + 530;
    uiTouchButtons.no.generic.y = 460;
    uiTouchButtons.no.generic.callback = UI_TouchButtons_Callback;

    UI_UtilSetupPicButton( &uiTouchButtons.no, PC_CANCEL );

    uiTouchButtons.reset.generic.id = ID_RESET;
    uiTouchButtons.reset.generic.type = QMTYPE_BM_BUTTON;
    uiTouchButtons.reset.generic.flags = QMF_HIGHLIGHTIFFOCUS | QMF_DROPSHADOW | QMF_ACT_ONRELEASE;
    uiTouchButtons.reset.generic.name = "Reset";
    uiTouchButtons.reset.generic.x = 384 - 72 + 480;
    uiTouchButtons.reset.generic.y = 600;
    uiTouchButtons.reset.generic.callback = UI_TouchButtons_Callback;
    uiTouchButtons.reset.generic.statusText = "Reset touch to default state";
    uiTouchButtons.reset.pic = PIC_Load("gfx/shell/btn_touch_reset");

    uiTouchButtons.remove.generic.id = ID_DELETE;
    uiTouchButtons.remove.generic.type = QMTYPE_BM_BUTTON;
    uiTouchButtons.remove.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
    uiTouchButtons.remove.generic.x = 384 - 72 + 480;
    uiTouchButtons.remove.generic.y = 550;
    uiTouchButtons.remove.generic.name = "Delete";
    uiTouchButtons.remove.generic.statusText = "Delete selected button";
    uiTouchButtons.remove.generic.callback = UI_TouchButtons_Callback;
    UI_UtilSetupPicButton( &uiTouchButtons.remove, PC_DELETE );

    uiTouchButtons.buttonList.itemNames = (const char **)uiTouchButtons.bNamesPtr;

    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.background );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.remove );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.reset );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.done );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.cancel );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.red );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.green );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.blue );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.alpha );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.hide );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.additive );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.precision );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.sp );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.mp );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.lock );

    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.buttonList );

    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.save );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.select );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.editor );

    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.name );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.banner );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.command );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.texture );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.color );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.preview );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.msgBox );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.promptMessage );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.no );
    UI_AddItem( &uiTouchButtons.menu, (void *)&uiTouchButtons.yes );

    UI_TouchButtons_GetButtonList();
}
示例#10
0
/*
=================
UI_Audio_Init
=================
*/
static void UI_Audio_Init( void )
{
	memset( &uiAudio, 0, sizeof( uiAudio_t ));

	
	uiAudio.menu.vidInitFunc = UI_Audio_Init;
	

	uiAudio.background.generic.id	= ID_BACKGROUND;
	uiAudio.background.generic.type = QMTYPE_BITMAP;
	uiAudio.background.generic.flags = QMF_INACTIVE;
	uiAudio.background.generic.x = 0;
	uiAudio.background.generic.y = 0;
	uiAudio.background.generic.width = 1024;
	uiAudio.background.generic.height = 768;
	uiAudio.background.pic = ART_BACKGROUND;


	uiAudio.banner.generic.id = ID_BANNER;
	uiAudio.banner.generic.type = QMTYPE_BITMAP;
	uiAudio.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiAudio.banner.generic.x = UI_BANNER_POSX;
	uiAudio.banner.generic.y = UI_BANNER_POSY;
	uiAudio.banner.generic.width = UI_BANNER_WIDTH;
	uiAudio.banner.generic.height	= UI_BANNER_HEIGHT;
	uiAudio.banner.pic = ART_BANNER;


	uiAudio.done.generic.id = ID_DONE;
	uiAudio.done.generic.type = QMTYPE_BM_BUTTON;
	uiAudio.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiAudio.done.generic.x = 72;
	uiAudio.done.generic.y = 230;
	uiAudio.done.generic.name = "Done";
	uiAudio.done.generic.statusText = "Go back to the Configuration Menu";
	uiAudio.done.generic.callback = UI_Audio_Callback;
	UI_UtilSetupPicButton( &uiAudio.done, PC_DONE );


	// Fograin92: Music volume
	uiAudio.musicVolume.generic.id			= ID_MUSICVOLUME;
	uiAudio.musicVolume.generic.type		= QMTYPE_SLIDER;
	uiAudio.musicVolume.generic.flags		= QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiAudio.musicVolume.generic.name		= "Game music volume";
	uiAudio.musicVolume.generic.x			= 320;	//320
	uiAudio.musicVolume.generic.y			= 280;	//340
	uiAudio.musicVolume.generic.callback	= UI_Audio_Callback;
	uiAudio.musicVolume.generic.statusText	= "";
	uiAudio.musicVolume.minValue			= 0.0;
	uiAudio.musicVolume.maxValue			= 1.0;
	uiAudio.musicVolume.range				= 0.05f;


	// Fograin92: Ambient+SFX Volume
	uiAudio.soundVolume.generic.id			= ID_SOUNDVOLUME;
	uiAudio.soundVolume.generic.type		= QMTYPE_SLIDER;
	uiAudio.soundVolume.generic.flags		= QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiAudio.soundVolume.generic.name		= "Ambient + SFX sounds volume";
	uiAudio.soundVolume.generic.x			= 320;
	uiAudio.soundVolume.generic.y			= 340;	// 280
	uiAudio.soundVolume.generic.callback	= UI_Audio_Callback;
	uiAudio.soundVolume.generic.statusText	= "";
	uiAudio.soundVolume.minValue			= 0.0;
	uiAudio.soundVolume.maxValue			= 1.0;
	uiAudio.soundVolume.range				= 0.05f;


	// Fograin92: HEV suit volume
	uiAudio.suitVolume.generic.id			= ID_SUITVOLUME;
	uiAudio.suitVolume.generic.type			= QMTYPE_SLIDER;
	uiAudio.suitVolume.generic.flags		= QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiAudio.suitVolume.generic.name			= "HEV/PCV sounds volume";
	uiAudio.suitVolume.generic.x			= 320;
	uiAudio.suitVolume.generic.y			= 400;
	uiAudio.suitVolume.generic.callback		= UI_Audio_Callback;
	uiAudio.suitVolume.generic.statusText	= "";
	uiAudio.suitVolume.minValue				= 0.0;
	uiAudio.suitVolume.maxValue				= 1.0;
	uiAudio.suitVolume.range				= 0.05f;


	// Fograin92: NPC voices volume
	uiAudio.voiceVolume.generic.id			= ID_VOICEVOLUME;
	uiAudio.voiceVolume.generic.type		= QMTYPE_SLIDER;
	uiAudio.voiceVolume.generic.flags		= QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiAudio.voiceVolume.generic.name		= "NPCs voice volume";
	uiAudio.voiceVolume.generic.x			= 320;
	uiAudio.voiceVolume.generic.y			= 460;
	uiAudio.voiceVolume.generic.callback	= UI_Audio_Callback;
	uiAudio.voiceVolume.generic.statusText	= "";
	uiAudio.voiceVolume.minValue			= 0.0;
	uiAudio.voiceVolume.maxValue			= 1.0;
	uiAudio.voiceVolume.range				= 0.05f;


	// Fograin92: Footsteps volume
	uiAudio.footstepsVolume.generic.id			= ID_FOOTVOLUME;
	uiAudio.footstepsVolume.generic.type		= QMTYPE_SLIDER;
	uiAudio.footstepsVolume.generic.flags		= QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiAudio.footstepsVolume.generic.name		= "Footsteps volume";
	uiAudio.footstepsVolume.generic.x			= 320;
	uiAudio.footstepsVolume.generic.y			= 520;
	uiAudio.footstepsVolume.generic.callback	= UI_Audio_Callback;
	uiAudio.footstepsVolume.generic.statusText	= "";
	uiAudio.footstepsVolume.minValue			= 0.0;
	uiAudio.footstepsVolume.maxValue			= 1.0;
	uiAudio.footstepsVolume.range				= 0.05f;


	UI_Audio_GetConfig();
	UI_AddItem( &uiAudio.menu, (void *)&uiAudio.background );
	UI_AddItem( &uiAudio.menu, (void *)&uiAudio.banner );
	UI_AddItem( &uiAudio.menu, (void *)&uiAudio.done );
	UI_AddItem( &uiAudio.menu, (void *)&uiAudio.soundVolume );
	UI_AddItem( &uiAudio.menu, (void *)&uiAudio.musicVolume );
	UI_AddItem( &uiAudio.menu, (void *)&uiAudio.suitVolume );
	UI_AddItem( &uiAudio.menu, (void *)&uiAudio.voiceVolume );
	UI_AddItem( &uiAudio.menu, (void *)&uiAudio.footstepsVolume );
}
示例#11
0
/*
=================
UI_GameOptions_Init
=================
*/
static void UI_GameOptions_Init( void )
{
	memset( &uiGameInitial, 0, sizeof( uiGameValues_t ));
	memset( &uiGameOptions, 0, sizeof( uiGameOptions_t ));

	uiGameOptions.menu.vidInitFunc = UI_GameOptions_Init;
	uiGameOptions.menu.keyFunc = UI_GameOptions_KeyFunc;

	uiGameOptions.background.generic.id = ID_BACKGROUND;
	uiGameOptions.background.generic.type = QMTYPE_BITMAP;
	uiGameOptions.background.generic.flags = QMF_INACTIVE;
	uiGameOptions.background.generic.x = 0;
	uiGameOptions.background.generic.y = 0;
	uiGameOptions.background.generic.width = uiStatic.width;
	uiGameOptions.background.generic.height = 768;
	uiGameOptions.background.pic = ART_BACKGROUND;

	uiGameOptions.banner.generic.id = ID_BANNER;
	uiGameOptions.banner.generic.type = QMTYPE_BITMAP;
	uiGameOptions.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiGameOptions.banner.generic.x = UI_BANNER_POSX;
	uiGameOptions.banner.generic.y = UI_BANNER_POSY;
	uiGameOptions.banner.generic.width = UI_BANNER_WIDTH;
	uiGameOptions.banner.generic.height = UI_BANNER_HEIGHT;
	uiGameOptions.banner.pic = ART_BANNER;

	uiGameOptions.done.generic.id	= ID_DONE;
	uiGameOptions.done.generic.type = QMTYPE_BM_BUTTON;
	uiGameOptions.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW; 
	uiGameOptions.done.generic.x = 72;
	uiGameOptions.done.generic.y = 230;
	uiGameOptions.done.generic.name = "Done";
	uiGameOptions.done.generic.statusText = "Save changes and go back to the Customize Menu";
	uiGameOptions.done.generic.callback = UI_GameOptions_Callback;

	UI_UtilSetupPicButton( &uiGameOptions.done, PC_DONE );

	uiGameOptions.cancel.generic.id = ID_CANCEL;
	uiGameOptions.cancel.generic.type = QMTYPE_BM_BUTTON;
	uiGameOptions.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGameOptions.cancel.generic.x = 72;
	uiGameOptions.cancel.generic.y = 280;
	uiGameOptions.cancel.generic.name = "Cancel";
	uiGameOptions.cancel.generic.statusText = "Go back to the Customize Menu";
	uiGameOptions.cancel.generic.callback = UI_GameOptions_Callback;

	UI_UtilSetupPicButton( &uiGameOptions.cancel, PC_CANCEL );

	uiGameOptions.maxFPS.generic.id = ID_MAXFPS;
	uiGameOptions.maxFPS.generic.type = QMTYPE_SPINCONTROL;
	uiGameOptions.maxFPS.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGameOptions.maxFPS.generic.x = 315;
	uiGameOptions.maxFPS.generic.y = 270;
	uiGameOptions.maxFPS.generic.width = 168;
	uiGameOptions.maxFPS.generic.height = 26;
	uiGameOptions.maxFPS.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.maxFPS.generic.statusText = "Cap your game frame rate";
	uiGameOptions.maxFPS.minValue = 20;
	uiGameOptions.maxFPS.maxValue = 500;
	uiGameOptions.maxFPS.range = 20;

	uiGameOptions.maxFPSmessage.generic.id = ID_MAXFPSMESSAGE;
	uiGameOptions.maxFPSmessage.generic.type = QMTYPE_ACTION;
	uiGameOptions.maxFPSmessage.generic.flags = QMF_SMALLFONT|QMF_INACTIVE|QMF_DROPSHADOW;
	uiGameOptions.maxFPSmessage.generic.x = 280;
	uiGameOptions.maxFPSmessage.generic.y = 230;
	uiGameOptions.maxFPSmessage.generic.name = "Limit game fps";
	uiGameOptions.maxFPSmessage.generic.color = uiColorHelp;

	uiGameOptions.hand.generic.id = ID_HAND;
	uiGameOptions.hand.generic.type = QMTYPE_CHECKBOX;
	uiGameOptions.hand.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_DROPSHADOW;
	uiGameOptions.hand.generic.x = 280;
	uiGameOptions.hand.generic.y = 330;
	uiGameOptions.hand.generic.name = "Use left hand";
	uiGameOptions.hand.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.hand.generic.statusText = "Draw gun at left side";

	uiGameOptions.allowDownload.generic.id = ID_ALLOWDOWNLOAD;
	uiGameOptions.allowDownload.generic.type = QMTYPE_CHECKBOX;
	uiGameOptions.allowDownload.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_DROPSHADOW;
	uiGameOptions.allowDownload.generic.x = 280;
	uiGameOptions.allowDownload.generic.y = 390;
	uiGameOptions.allowDownload.generic.name = "Allow download";
	uiGameOptions.allowDownload.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.allowDownload.generic.statusText = "Allow download of files from servers";

	uiGameOptions.alwaysRun.generic.id = ID_ALWAYSRUN;
	uiGameOptions.alwaysRun.generic.type = QMTYPE_CHECKBOX;
	uiGameOptions.alwaysRun.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_DROPSHADOW;
	uiGameOptions.alwaysRun.generic.x = 280;
	uiGameOptions.alwaysRun.generic.y = 450;
	uiGameOptions.alwaysRun.generic.name = "Always run";
	uiGameOptions.alwaysRun.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.alwaysRun.generic.statusText = "Switch between run/step models when pressed 'run' button";

	uiGameOptions.android_sleep.generic.id = ID_ANDROIDSLEEP;
	uiGameOptions.android_sleep.generic.type = QMTYPE_CHECKBOX;
	uiGameOptions.android_sleep.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_DROPSHADOW;
	uiGameOptions.android_sleep.generic.x = 280;
	uiGameOptions.android_sleep.generic.y = 510;
	uiGameOptions.android_sleep.generic.name = "Pause in background (Android)";
	uiGameOptions.android_sleep.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.android_sleep.generic.statusText = "Disable to run server in background";

	uiGameOptions.maxPacket.generic.id = ID_MAXPACKET;
	uiGameOptions.maxPacket.generic.type = QMTYPE_SPINCONTROL;
	uiGameOptions.maxPacket.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGameOptions.maxPacket.generic.x = 315;
	uiGameOptions.maxPacket.generic.y = 620;
	uiGameOptions.maxPacket.generic.width = 168;
	uiGameOptions.maxPacket.generic.height = 26;
	uiGameOptions.maxPacket.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.maxPacket.generic.statusText = "Limit packet size durning connection";
	uiGameOptions.maxPacket.minValue = 200;
	uiGameOptions.maxPacket.maxValue = 1500;
	uiGameOptions.maxPacket.range = 50;

	uiGameOptions.maxPacketmessage1.generic.id = ID_MAXPACKETMESSAGE;
	uiGameOptions.maxPacketmessage1.generic.type = QMTYPE_ACTION;
	uiGameOptions.maxPacketmessage1.generic.flags = QMF_SMALLFONT|QMF_INACTIVE|QMF_DROPSHADOW;
	uiGameOptions.maxPacketmessage1.generic.x = 280;
	uiGameOptions.maxPacketmessage1.generic.y = 580;
	uiGameOptions.maxPacketmessage1.generic.name = "Limit network packet size";
	uiGameOptions.maxPacketmessage1.generic.color = uiColorHelp;

	uiGameOptions.maxPacketmessage2.generic.id = ID_MAXPACKETMESSAGE;
	uiGameOptions.maxPacketmessage2.generic.type = QMTYPE_ACTION;
	uiGameOptions.maxPacketmessage2.generic.flags = QMF_SMALLFONT|QMF_INACTIVE|QMF_DROPSHADOW;
	uiGameOptions.maxPacketmessage2.generic.x = 280;
	uiGameOptions.maxPacketmessage2.generic.y = 660;
	uiGameOptions.maxPacketmessage2.generic.name = "^3Use 700 or less if connection hangs\nafter \"^6Spooling demo header^3\" message";
	uiGameOptions.maxPacketmessage2.generic.color = uiColorWhite;

	UI_GameOptions_GetConfig();

	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.background );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.banner );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.maxFPS );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.maxFPSmessage );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.hand );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.allowDownload );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.alwaysRun );
#ifdef __ANDROID__
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.android_sleep );
#endif
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.maxPacket );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.maxPacketmessage1 );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.maxPacketmessage2 );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.done );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.cancel );
}
示例#12
0
/*
=================
UI_MultiPlayer_Init
=================
*/
static void UI_MultiPlayer_Init( void )
{
	memset( &uiMultiPlayer, 0, sizeof( uiMultiPlayer_t ));

	uiMultiPlayer.menu.vidInitFunc = UI_MultiPlayer_Init;

	uiMultiPlayer.background.generic.id = ID_BACKGROUND;
	uiMultiPlayer.background.generic.type = QMTYPE_BITMAP;
	uiMultiPlayer.background.generic.flags = QMF_INACTIVE;
	uiMultiPlayer.background.generic.x = 0;
	uiMultiPlayer.background.generic.y = 0;
	uiMultiPlayer.background.generic.width = uiStatic.width;
	uiMultiPlayer.background.generic.height = 768;
	uiMultiPlayer.background.pic = ART_BACKGROUND;

	uiMultiPlayer.banner.generic.id = ID_BANNER;
	uiMultiPlayer.banner.generic.type = QMTYPE_BITMAP;
	uiMultiPlayer.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiMultiPlayer.banner.generic.x = UI_BANNER_POSX;
	uiMultiPlayer.banner.generic.y = UI_BANNER_POSY;
	uiMultiPlayer.banner.generic.width = UI_BANNER_WIDTH;
	uiMultiPlayer.banner.generic.height = UI_BANNER_HEIGHT;
	uiMultiPlayer.banner.pic = ART_BANNER;

	uiMultiPlayer.internetGames.generic.id = ID_INTERNETGAMES;
	uiMultiPlayer.internetGames.generic.type = QMTYPE_BM_BUTTON;
	uiMultiPlayer.internetGames.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMultiPlayer.internetGames.generic.x = 72;
	uiMultiPlayer.internetGames.generic.y = 230;
	uiMultiPlayer.internetGames.generic.name = "Internet games";
	uiMultiPlayer.internetGames.generic.statusText = "View list of a game internet servers and join the one of your choise";
	uiMultiPlayer.internetGames.generic.callback = UI_MultiPlayer_Callback;

	UI_UtilSetupPicButton( &uiMultiPlayer.internetGames, PC_INET_GAME );

	uiMultiPlayer.spectateGames.generic.id = ID_SPECTATEGAMES;
	uiMultiPlayer.spectateGames.generic.type = QMTYPE_BM_BUTTON;
	uiMultiPlayer.spectateGames.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY|QMF_GRAYED;
	uiMultiPlayer.spectateGames.generic.x = 72;
	uiMultiPlayer.spectateGames.generic.y = 280;
	uiMultiPlayer.spectateGames.generic.name = "Spectate games";
	uiMultiPlayer.spectateGames.generic.statusText = "Spectate internet games";
	uiMultiPlayer.spectateGames.generic.callback = UI_MultiPlayer_Callback;

	UI_UtilSetupPicButton( &uiMultiPlayer.spectateGames, PC_SPECTATE_GAMES );

	uiMultiPlayer.LANGame.generic.id = ID_LANGAME;
	uiMultiPlayer.LANGame.generic.type = QMTYPE_BM_BUTTON;
	uiMultiPlayer.LANGame.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMultiPlayer.LANGame.generic.x = 72;
	uiMultiPlayer.LANGame.generic.y = 330;
	uiMultiPlayer.LANGame.generic.name = "LAN game";
	uiMultiPlayer.LANGame.generic.statusText = "Set up the game on the local area network";
	uiMultiPlayer.LANGame.generic.callback = UI_MultiPlayer_Callback;

	UI_UtilSetupPicButton( &uiMultiPlayer.LANGame, PC_LAN_GAME );

	uiMultiPlayer.Customize.generic.id = ID_CUSTOMIZE;
	uiMultiPlayer.Customize.generic.type = QMTYPE_BM_BUTTON;
	uiMultiPlayer.Customize.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMultiPlayer.Customize.generic.x = 72;
	uiMultiPlayer.Customize.generic.y = 380;
	uiMultiPlayer.Customize.generic.name = "Customize";
	uiMultiPlayer.Customize.generic.statusText = "Choose your player name, and select visual options for your character";
	uiMultiPlayer.Customize.generic.callback = UI_MultiPlayer_Callback;

	UI_UtilSetupPicButton( &uiMultiPlayer.Customize, PC_CUSTOMIZE );

	uiMultiPlayer.Controls.generic.id = ID_CONTROLS;
	uiMultiPlayer.Controls.generic.type = QMTYPE_BM_BUTTON;
	uiMultiPlayer.Controls.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMultiPlayer.Controls.generic.x = 72;
	uiMultiPlayer.Controls.generic.y = 430;
	uiMultiPlayer.Controls.generic.name = "Controls";
	uiMultiPlayer.Controls.generic.statusText = "Change keyboard and mouse settings";
	uiMultiPlayer.Controls.generic.callback = UI_MultiPlayer_Callback;
	
	UI_UtilSetupPicButton( &uiMultiPlayer.Controls, PC_CONTROLS );

	uiMultiPlayer.done.generic.id = ID_DONE;
	uiMultiPlayer.done.generic.type = QMTYPE_BM_BUTTON;
	uiMultiPlayer.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMultiPlayer.done.generic.x = 72;
	uiMultiPlayer.done.generic.y = 480;
	uiMultiPlayer.done.generic.name = "Done";
	uiMultiPlayer.done.generic.statusText = "Go back to the Main Menu";
	uiMultiPlayer.done.generic.callback = UI_MultiPlayer_Callback;

	UI_UtilSetupPicButton( &uiMultiPlayer.done, PC_DONE );

	UI_AddItem( &uiMultiPlayer.menu, (void *)&uiMultiPlayer.background );
	UI_AddItem( &uiMultiPlayer.menu, (void *)&uiMultiPlayer.banner );
	UI_AddItem( &uiMultiPlayer.menu, (void *)&uiMultiPlayer.internetGames );
	UI_AddItem( &uiMultiPlayer.menu, (void *)&uiMultiPlayer.spectateGames );
	UI_AddItem( &uiMultiPlayer.menu, (void *)&uiMultiPlayer.LANGame );
	UI_AddItem( &uiMultiPlayer.menu, (void *)&uiMultiPlayer.Customize );
	UI_AddItem( &uiMultiPlayer.menu, (void *)&uiMultiPlayer.Controls );
	UI_AddItem( &uiMultiPlayer.menu, (void *)&uiMultiPlayer.done );
}
示例#13
0
/*
 ==================
 
 ==================
*/
static void UI_Video_Init (){

	Mem_Fill(&uiVideo, 0, sizeof(uiVideo_t));

	uiVideo.background.generic.id				= ID_BACKGROUND;
	uiVideo.background.generic.type				= QMTYPE_BITMAP;
	uiVideo.background.generic.flags			= QMF_INACTIVE;
	uiVideo.background.generic.x				= 0;
	uiVideo.background.generic.y				= 0;
	uiVideo.background.generic.width			= 1024;
	uiVideo.background.generic.height			= 768;
	uiVideo.background.pic						= ART_BACKGROUND;

	uiVideo.banner.generic.id					= ID_BANNER;
	uiVideo.banner.generic.type					= QMTYPE_BITMAP;
	uiVideo.banner.generic.flags				= QMF_INACTIVE;
	uiVideo.banner.generic.x					= 0;
	uiVideo.banner.generic.y					= 66;
	uiVideo.banner.generic.width				= 1024;
	uiVideo.banner.generic.height				= 46;
	uiVideo.banner.pic							= ART_BANNER;

	uiVideo.textShadow1.generic.id				= ID_TEXTSHADOW1;
	uiVideo.textShadow1.generic.type			= QMTYPE_BITMAP;
	uiVideo.textShadow1.generic.flags			= QMF_INACTIVE;
	uiVideo.textShadow1.generic.x				= 182;
	uiVideo.textShadow1.generic.y				= 170;
	uiVideo.textShadow1.generic.width			= 256;
	uiVideo.textShadow1.generic.height			= 256;
	uiVideo.textShadow1.generic.color			= colorBlack;
	uiVideo.textShadow1.pic						= ART_TEXT1;

	uiVideo.textShadow2.generic.id				= ID_TEXTSHADOW2;
	uiVideo.textShadow2.generic.type			= QMTYPE_BITMAP;
	uiVideo.textShadow2.generic.flags			= QMF_INACTIVE;
	uiVideo.textShadow2.generic.x				= 182;
	uiVideo.textShadow2.generic.y				= 426;
	uiVideo.textShadow2.generic.width			= 256;
	uiVideo.textShadow2.generic.height			= 256;
	uiVideo.textShadow2.generic.color			= colorBlack;
	uiVideo.textShadow2.pic						= ART_TEXT2;

	uiVideo.text1.generic.id					= ID_TEXT1;
	uiVideo.text1.generic.type					= QMTYPE_BITMAP;
	uiVideo.text1.generic.flags					= QMF_INACTIVE;
	uiVideo.text1.generic.x						= 180;
	uiVideo.text1.generic.y						= 168;
	uiVideo.text1.generic.width					= 256;
	uiVideo.text1.generic.height				= 256;
	uiVideo.text1.pic							= ART_TEXT1;

	uiVideo.text2.generic.id					= ID_TEXT2;
	uiVideo.text2.generic.type					= QMTYPE_BITMAP;
	uiVideo.text2.generic.flags					= QMF_INACTIVE;
	uiVideo.text2.generic.x						= 180;
	uiVideo.text2.generic.y						= 424;
	uiVideo.text2.generic.width					= 256;
	uiVideo.text2.generic.height				= 256;
	uiVideo.text2.pic							= ART_TEXT2;

	uiVideo.cancel.generic.id					= ID_CANCEL;
	uiVideo.cancel.generic.type					= QMTYPE_BITMAP;
	uiVideo.cancel.generic.x					= 206;
	uiVideo.cancel.generic.y					= 656;
	uiVideo.cancel.generic.width				= 198;
	uiVideo.cancel.generic.height				= 38;
	uiVideo.cancel.generic.callback				= UI_Video_Callback;
	uiVideo.cancel.generic.ownerdraw			= UI_Video_Ownerdraw;
	uiVideo.cancel.pic							= UI_CANCELBUTTON;

	uiVideo.advanced.generic.id					= ID_ADVANCED;
	uiVideo.advanced.generic.type				= QMTYPE_BITMAP;
	uiVideo.advanced.generic.x					= 413;
	uiVideo.advanced.generic.y					= 656;
	uiVideo.advanced.generic.width				= 198;
	uiVideo.advanced.generic.height				= 38;
	uiVideo.advanced.generic.callback			= UI_Video_Callback;
	uiVideo.advanced.generic.ownerdraw			= UI_Video_Ownerdraw;
	uiVideo.advanced.pic						= ART_ADVANCED;

	uiVideo.apply.generic.id					= ID_APPLY;
	uiVideo.apply.generic.type					= QMTYPE_BITMAP;
	uiVideo.apply.generic.x						= 620;
	uiVideo.apply.generic.y						= 656;
	uiVideo.apply.generic.width					= 198;
	uiVideo.apply.generic.height				= 38;
	uiVideo.apply.generic.callback				= UI_Video_Callback;
	uiVideo.apply.generic.ownerdraw				= UI_Video_Ownerdraw;
	uiVideo.apply.pic							= UI_APPLYBUTTON;

	UI_Video_GetConfig();

	UI_AddItem(&uiVideo.menu, (void *)&uiVideo.background);
	UI_AddItem(&uiVideo.menu, (void *)&uiVideo.banner);
	UI_AddItem(&uiVideo.menu, (void *)&uiVideo.textShadow1);
	UI_AddItem(&uiVideo.menu, (void *)&uiVideo.textShadow2);
	UI_AddItem(&uiVideo.menu, (void *)&uiVideo.text1);
	UI_AddItem(&uiVideo.menu, (void *)&uiVideo.text2);
	UI_AddItem(&uiVideo.menu, (void *)&uiVideo.cancel);
	UI_AddItem(&uiVideo.menu, (void *)&uiVideo.advanced);
	UI_AddItem(&uiVideo.menu, (void *)&uiVideo.apply);
}
/*
=================
UI_PlayerSetup_Init
=================
*/
static void UI_PlayerSetup_Init( void )
{
	bool game_hlRally = FALSE;
	int addFlags = 0;

	memset( &uiPlayerSetup, 0, sizeof( uiPlayerSetup_t ));

	// disable playermodel preview for HLRally to prevent crash
	if( !stricmp( gMenu.m_gameinfo.gamefolder, "hlrally" ))
		game_hlRally = TRUE;

	if( gMenu.m_gameinfo.flags & GFL_NOMODELS )
		addFlags |= QMF_INACTIVE;

	uiPlayerSetup.menu.vidInitFunc = UI_PlayerSetup_Init;

	uiPlayerSetup.background.generic.id = ID_BACKGROUND;
	uiPlayerSetup.background.generic.type = QMTYPE_BITMAP;
	uiPlayerSetup.background.generic.flags = QMF_INACTIVE;
	uiPlayerSetup.background.generic.x = 0;
	uiPlayerSetup.background.generic.y = 0;
	uiPlayerSetup.background.generic.width = 1024;
	uiPlayerSetup.background.generic.height = 768;
	uiPlayerSetup.background.pic = ART_BACKGROUND;

	uiPlayerSetup.banner.generic.id = ID_BANNER;
	uiPlayerSetup.banner.generic.type = QMTYPE_BITMAP;
	uiPlayerSetup.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiPlayerSetup.banner.generic.x = UI_BANNER_POSX;
	uiPlayerSetup.banner.generic.y = UI_BANNER_POSY;
	uiPlayerSetup.banner.generic.width = UI_BANNER_WIDTH;
	uiPlayerSetup.banner.generic.height = UI_BANNER_HEIGHT;
	uiPlayerSetup.banner.pic = ART_BANNER;

	uiPlayerSetup.done.generic.id = ID_DONE;
	uiPlayerSetup.done.generic.type = QMTYPE_BM_BUTTON;
	uiPlayerSetup.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayerSetup.done.generic.x = 72;
	uiPlayerSetup.done.generic.y = 230;
	uiPlayerSetup.done.generic.name = "Done";
	uiPlayerSetup.done.generic.statusText = "Go back to the Multiplayer Menu";
	uiPlayerSetup.done.generic.callback = UI_PlayerSetup_Callback;

	UI_UtilSetupPicButton( &uiPlayerSetup.done, PC_DONE );

	uiPlayerSetup.AdvOptions.generic.id = ID_ADVOPTIONS;
	uiPlayerSetup.AdvOptions.generic.type = QMTYPE_BM_BUTTON;
	uiPlayerSetup.AdvOptions.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayerSetup.AdvOptions.generic.x = 72;
	uiPlayerSetup.AdvOptions.generic.y = 280;
	uiPlayerSetup.AdvOptions.generic.name = "Adv. Options";
	uiPlayerSetup.AdvOptions.generic.statusText = "Configure handness, fov and other advanced options";
	uiPlayerSetup.AdvOptions.generic.callback = UI_PlayerSetup_Callback;

	UI_UtilSetupPicButton( &uiPlayerSetup.AdvOptions, PC_ADV_OPT );

	uiPlayerSetup.view.generic.id = ID_VIEW;
	uiPlayerSetup.view.generic.type = QMTYPE_BITMAP;
	uiPlayerSetup.view.generic.flags = QMF_INACTIVE;
	uiPlayerSetup.view.generic.x = 660;
	uiPlayerSetup.view.generic.y = 260;
	uiPlayerSetup.view.generic.width = 260;
	uiPlayerSetup.view.generic.height = 320;
	uiPlayerSetup.view.generic.ownerdraw = UI_PlayerSetup_Ownerdraw;

	uiPlayerSetup.name.generic.id = ID_NAME;
	uiPlayerSetup.name.generic.type = QMTYPE_FIELD;
	uiPlayerSetup.name.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiPlayerSetup.name.generic.x = 320;
	uiPlayerSetup.name.generic.y = 260;
	uiPlayerSetup.name.generic.width = 256;
	uiPlayerSetup.name.generic.height = 36;
	uiPlayerSetup.name.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.name.generic.statusText = "Enter your multiplayer display name";
	uiPlayerSetup.name.maxLength = 32;

	uiPlayerSetup.model.generic.id = ID_MODEL;
	uiPlayerSetup.model.generic.type = QMTYPE_SPINCONTROL;
	uiPlayerSetup.model.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|addFlags;
	uiPlayerSetup.model.generic.x = game_hlRally ? 320 : 702;
	uiPlayerSetup.model.generic.y = game_hlRally ? 320 : 590;
	uiPlayerSetup.model.generic.width = game_hlRally ? 256 : 176;
	uiPlayerSetup.model.generic.height = game_hlRally ? 36 : 32;
	uiPlayerSetup.model.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.model.generic.statusText = "Select a model for representation in multiplayer";
	uiPlayerSetup.model.minValue = 0;
	uiPlayerSetup.model.maxValue = 1;
	uiPlayerSetup.model.range  = 1;

	uiPlayerSetup.topColor.generic.id = ID_TOPCOLOR;
	uiPlayerSetup.topColor.generic.type = QMTYPE_SLIDER;
	uiPlayerSetup.topColor.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW|addFlags;
	uiPlayerSetup.topColor.generic.name = "Top color";
	uiPlayerSetup.topColor.generic.x = 250;
	uiPlayerSetup.topColor.generic.y = 550;
	uiPlayerSetup.topColor.generic.width = 300;
	uiPlayerSetup.topColor.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.topColor.generic.statusText = "Set a player model top color";
	uiPlayerSetup.topColor.minValue = 0.0;
	uiPlayerSetup.topColor.maxValue = 1.0;
	uiPlayerSetup.topColor.range = 0.05f;

	uiPlayerSetup.bottomColor.generic.id = ID_BOTTOMCOLOR;
	uiPlayerSetup.bottomColor.generic.type = QMTYPE_SLIDER;
	uiPlayerSetup.bottomColor.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW|addFlags;
	uiPlayerSetup.bottomColor.generic.name = "Bottom color";
	uiPlayerSetup.bottomColor.generic.x = 250;
	uiPlayerSetup.bottomColor.generic.y = 620;
	uiPlayerSetup.bottomColor.generic.width = 300;
	uiPlayerSetup.bottomColor.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.bottomColor.generic.statusText = "Set a player model bottom color";
	uiPlayerSetup.bottomColor.minValue = 0.0;
	uiPlayerSetup.bottomColor.maxValue = 1.0;
	uiPlayerSetup.bottomColor.range = 0.05f;

	uiPlayerSetup.showModels.generic.id = ID_SHOWMODELS;
	uiPlayerSetup.showModels.generic.type = QMTYPE_CHECKBOX;
	uiPlayerSetup.showModels.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW|addFlags;
	uiPlayerSetup.showModels.generic.name = "Show Player Models";
	uiPlayerSetup.showModels.generic.x = 72;
	uiPlayerSetup.showModels.generic.y = 380;
	uiPlayerSetup.showModels.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.showModels.generic.statusText = "show 3D player models instead of preview thumbnails";

	uiPlayerSetup.hiModels.generic.id = ID_HIMODELS;
	uiPlayerSetup.hiModels.generic.type = QMTYPE_CHECKBOX;
	uiPlayerSetup.hiModels.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW|addFlags;
	uiPlayerSetup.hiModels.generic.name = "High quality models";
	uiPlayerSetup.hiModels.generic.x = 72;
	uiPlayerSetup.hiModels.generic.y = 430;
	uiPlayerSetup.hiModels.generic.callback = UI_PlayerSetup_Callback;
	uiPlayerSetup.hiModels.generic.statusText = "show hi-res models in multiplayer";

	UI_PlayerSetup_GetConfig();

	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.background );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.banner );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.done );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.AdvOptions );
	// disable playermodel preview for HLRally to prevent crash
	if( game_hlRally == FALSE )
		UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.view );
	UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.name );

	if( !gMenu.m_gameinfo.flags & GFL_NOMODELS )
	{
		UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.model );
		UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.topColor );
		UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.bottomColor );
		UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.showModels );
		UI_AddItem( &uiPlayerSetup.menu, (void *)&uiPlayerSetup.hiModels );
	}
	// setup render and actor
	uiPlayerSetup.refdef.fov_x = 40;

	// NOTE: must be called after UI_AddItem whan we sure what UI_ScaleCoords is done
	uiPlayerSetup.refdef.viewport[0] = uiPlayerSetup.view.generic.x + (uiPlayerSetup.view.generic.width / 12);
	uiPlayerSetup.refdef.viewport[1] = uiPlayerSetup.view.generic.y + (uiPlayerSetup.view.generic.height / 12);
	uiPlayerSetup.refdef.viewport[2] = uiPlayerSetup.view.generic.width-(uiPlayerSetup.view.generic.width / 6);
	uiPlayerSetup.refdef.viewport[3] = uiPlayerSetup.view.generic.height-(uiPlayerSetup.view.generic.height / 6);

	UI_PlayerSetup_CalcFov( &uiPlayerSetup.refdef );
	uiPlayerSetup.ent = GET_MENU_EDICT ();

	if( !uiPlayerSetup.ent )
		return;

	// adjust entity params
	uiPlayerSetup.ent->curstate.number = 1;	// IMPORTANT: always set playerindex to 1
	uiPlayerSetup.ent->curstate.animtime = gpGlobals->time;	// start animation
	uiPlayerSetup.ent->curstate.sequence = 1;
	uiPlayerSetup.ent->curstate.scale = 1.0f;
	uiPlayerSetup.ent->curstate.frame = 0.0f;
	uiPlayerSetup.ent->curstate.framerate = 1.0f;
	uiPlayerSetup.ent->curstate.effects |= EF_FULLBRIGHT;
	uiPlayerSetup.ent->curstate.controller[0] = 127;
	uiPlayerSetup.ent->curstate.controller[1] = 127;
	uiPlayerSetup.ent->curstate.controller[2] = 127;
	uiPlayerSetup.ent->curstate.controller[3] = 127;
	uiPlayerSetup.ent->latched.prevcontroller[0] = 127;
	uiPlayerSetup.ent->latched.prevcontroller[1] = 127;
	uiPlayerSetup.ent->latched.prevcontroller[2] = 127;
	uiPlayerSetup.ent->latched.prevcontroller[3] = 127;
	uiPlayerSetup.ent->origin[0] = uiPlayerSetup.ent->curstate.origin[0] = 92;
	uiPlayerSetup.ent->origin[2] = uiPlayerSetup.ent->curstate.origin[2] = 2;
	uiPlayerSetup.ent->angles[1] = uiPlayerSetup.ent->curstate.angles[1] = 180;
	uiPlayerSetup.ent->player = true; // yes, draw me as playermodel
}
示例#15
0
/*
=================
UI_VidOptions_Init
=================
*/
static void UI_VidOptions_Init( void )
{
	memset( &uiVidOptions, 0, sizeof( uiVidOptions_t ));

	uiVidOptions.menu.vidInitFunc = UI_VidOptions_Init;

	uiVidOptions.background.generic.id = ID_BACKGROUND;
	uiVidOptions.background.generic.type = QMTYPE_BITMAP;
	uiVidOptions.background.generic.flags = QMF_INACTIVE;
	uiVidOptions.background.generic.x = 0;
	uiVidOptions.background.generic.y = 0;
	uiVidOptions.background.generic.width = 1024;
	uiVidOptions.background.generic.height = 768;
	uiVidOptions.background.pic = ART_BACKGROUND;

	uiVidOptions.banner.generic.id = ID_BANNER;
	uiVidOptions.banner.generic.type = QMTYPE_BITMAP;
	uiVidOptions.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiVidOptions.banner.generic.x = UI_BANNER_POSX;
	uiVidOptions.banner.generic.y = UI_BANNER_POSY;
	uiVidOptions.banner.generic.width = UI_BANNER_WIDTH;
	uiVidOptions.banner.generic.height = UI_BANNER_HEIGHT;
	uiVidOptions.banner.pic = ART_BANNER;

	uiVidOptions.testImage.generic.id = ID_BANNER;
	uiVidOptions.testImage.generic.type = QMTYPE_BITMAP;
	uiVidOptions.testImage.generic.flags = QMF_INACTIVE;
	uiVidOptions.testImage.generic.x = 390;
	uiVidOptions.testImage.generic.y = 225;
	uiVidOptions.testImage.generic.width = 460;
	uiVidOptions.testImage.generic.height = 450;
	uiVidOptions.testImage.pic = ART_GAMMA;
	uiVidOptions.testImage.generic.ownerdraw = UI_VidOptions_Ownerdraw;

	uiVidOptions.done.generic.id = ID_DONE;
	uiVidOptions.done.generic.type = QMTYPE_BM_BUTTON;
	uiVidOptions.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiVidOptions.done.generic.x = 72;
	uiVidOptions.done.generic.y = 435;
	uiVidOptions.done.generic.name = "Done";
	uiVidOptions.done.generic.statusText = "Go back to the Video Menu";
	uiVidOptions.done.generic.callback = UI_VidOptions_Callback;

	UI_UtilSetupPicButton( &uiVidOptions.done, PC_DONE );

	uiVidOptions.screenSize.generic.id = ID_SCREEN_SIZE;
	uiVidOptions.screenSize.generic.type = QMTYPE_SLIDER;
	uiVidOptions.screenSize.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiVidOptions.screenSize.generic.name = "Screen size";
	uiVidOptions.screenSize.generic.x = 72;
	uiVidOptions.screenSize.generic.y = 280;
	uiVidOptions.screenSize.generic.callback = UI_VidOptions_Callback;
	uiVidOptions.screenSize.generic.statusText = "Set the screen size";
	uiVidOptions.screenSize.minValue = 0.0;
	uiVidOptions.screenSize.maxValue = 1.0;
	uiVidOptions.screenSize.range = 0.05f;

	uiVidOptions.gammaIntensity.generic.id = ID_GAMMA;
	uiVidOptions.gammaIntensity.generic.type = QMTYPE_SLIDER;
	uiVidOptions.gammaIntensity.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiVidOptions.gammaIntensity.generic.name = "Gamma";
	uiVidOptions.gammaIntensity.generic.x = 72;
	uiVidOptions.gammaIntensity.generic.y = 340;
	uiVidOptions.gammaIntensity.generic.callback = UI_VidOptions_Callback;
	uiVidOptions.gammaIntensity.generic.statusText = "Set gamma value (0.5 - 2.3)";
	uiVidOptions.gammaIntensity.minValue = 0.0;
	uiVidOptions.gammaIntensity.maxValue = 1.0;
	uiVidOptions.gammaIntensity.range = 0.05f;

	uiVidOptions.glareReduction.generic.id = ID_GLARE_REDUCTION;
	uiVidOptions.glareReduction.generic.type = QMTYPE_SLIDER;
	uiVidOptions.glareReduction.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiVidOptions.glareReduction.generic.name = "Glare reduction";
	uiVidOptions.glareReduction.generic.x = 72;
	uiVidOptions.glareReduction.generic.y = 400;
	uiVidOptions.glareReduction.generic.callback = UI_VidOptions_Callback;
	uiVidOptions.glareReduction.generic.statusText = "Set glare reduction level";
	uiVidOptions.glareReduction.minValue = 0.0;
	uiVidOptions.glareReduction.maxValue = 1.0;
	uiVidOptions.glareReduction.range = 0.05f;

	uiVidOptions.fastSky.generic.id = ID_SIMPLE_SKY;
	uiVidOptions.fastSky.generic.type = QMTYPE_CHECKBOX;
	uiVidOptions.fastSky.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiVidOptions.fastSky.generic.name = "Draw simple sky";
	uiVidOptions.fastSky.generic.x = 72;
	uiVidOptions.fastSky.generic.y = 685;
	uiVidOptions.fastSky.generic.callback = UI_VidOptions_Callback;
	uiVidOptions.fastSky.generic.statusText = "enable/disable fast sky rendering (for old computers)";

	UI_VidOptions_GetConfig();

	UI_AddItem( &uiVidOptions.menu, (void *)&uiVidOptions.background );
	UI_AddItem( &uiVidOptions.menu, (void *)&uiVidOptions.banner );
	UI_AddItem( &uiVidOptions.menu, (void *)&uiVidOptions.done );
	UI_AddItem( &uiVidOptions.menu, (void *)&uiVidOptions.screenSize );
	UI_AddItem( &uiVidOptions.menu, (void *)&uiVidOptions.gammaIntensity );
	UI_AddItem( &uiVidOptions.menu, (void *)&uiVidOptions.glareReduction );
	UI_AddItem( &uiVidOptions.menu, (void *)&uiVidOptions.fastSky );
	UI_AddItem( &uiVidOptions.menu, (void *)&uiVidOptions.testImage );
}
示例#16
0
/*
=================
UI_PlayRec_Init
=================
*/
static void UI_PlayRec_Init( void )
{
	memset( &uiPlayRec, 0, sizeof( uiPlayRec_t ));

	uiPlayRec.menu.vidInitFunc = UI_PlayRec_Init;

	strcat( uiPlayRec.hintText, "During play or record demo, you can quickly stop\n" );
	strcat( uiPlayRec.hintText, "playing/recording demo by pressing " );
	strcat( uiPlayRec.hintText, KEY_KeynumToString( KEY_GetKey( "stop" )));
	strcat( uiPlayRec.hintText, ".\n" );

	uiPlayRec.background.generic.id = ID_BACKGROUND;
	uiPlayRec.background.generic.type = QMTYPE_BITMAP;
	uiPlayRec.background.generic.flags = QMF_INACTIVE;
	uiPlayRec.background.generic.x = 0;
	uiPlayRec.background.generic.y = 0;
	uiPlayRec.background.generic.width = 1024;
	uiPlayRec.background.generic.height = 768;
	uiPlayRec.background.pic = ART_BACKGROUND;

	uiPlayRec.banner.generic.id = ID_BANNER;
	uiPlayRec.banner.generic.type = QMTYPE_BITMAP;
	uiPlayRec.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiPlayRec.banner.generic.x = UI_BANNER_POSX;
	uiPlayRec.banner.generic.y = UI_BANNER_POSY;
	uiPlayRec.banner.generic.width = UI_BANNER_WIDTH;
	uiPlayRec.banner.generic.height = UI_BANNER_HEIGHT;
	uiPlayRec.banner.pic = ART_BANNER;

	uiPlayRec.play.generic.id = ID_PLAY;
	uiPlayRec.play.generic.type = QMTYPE_ACTION;
	uiPlayRec.play.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiPlayRec.play.generic.name = "Play demo";
	uiPlayRec.play.generic.statusText = "Play a specified demo";
	uiPlayRec.play.generic.x = 72;
	uiPlayRec.play.generic.y = 230;
	uiPlayRec.play.generic.callback = UI_PlayRec_Callback;

	uiPlayRec.record.generic.id = ID_RECORD;
	uiPlayRec.record.generic.type = QMTYPE_ACTION;
	uiPlayRec.record.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiPlayRec.record.generic.name = "Record demo";
	uiPlayRec.record.generic.statusText = "Record demo at this time";
	uiPlayRec.record.generic.x = 72;
	uiPlayRec.record.generic.y = 280;
	uiPlayRec.record.generic.callback = UI_PlayRec_Callback;

	uiPlayRec.done.generic.id = ID_DONE;
	uiPlayRec.done.generic.type = QMTYPE_ACTION;
	uiPlayRec.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiPlayRec.done.generic.name = "Done";
	uiPlayRec.done.generic.statusText = "Go back to the Main Menu";
	uiPlayRec.done.generic.x = 72;
	uiPlayRec.done.generic.y = 330;
	uiPlayRec.done.generic.callback = UI_PlayRec_Callback;

	uiPlayRec.hintMessage.generic.id = ID_MSGHINT;
	uiPlayRec.hintMessage.generic.type = QMTYPE_ACTION;
	uiPlayRec.hintMessage.generic.flags = QMF_INACTIVE|QMF_SMALLFONT;
	uiPlayRec.hintMessage.generic.color = uiColorHelp;
	uiPlayRec.hintMessage.generic.name = uiPlayRec.hintText;
	uiPlayRec.hintMessage.generic.x = 360;
	uiPlayRec.hintMessage.generic.y = 480;

	UI_AddItem( &uiPlayRec.menu, (void *)&uiPlayRec.background );
	UI_AddItem( &uiPlayRec.menu, (void *)&uiPlayRec.banner );
	UI_AddItem( &uiPlayRec.menu, (void *)&uiPlayRec.play );
	UI_AddItem( &uiPlayRec.menu, (void *)&uiPlayRec.record );
	UI_AddItem( &uiPlayRec.menu, (void *)&uiPlayRec.done );
	UI_AddItem( &uiPlayRec.menu, (void *)&uiPlayRec.hintMessage );
}
/*
=================
UI_FileDialog_Init
=================
*/
static void UI_FileDialog_Init( void )
{
	memset( &uiFileDialog, 0, sizeof( uiFileDialog_t ));

	//uiTouchOptions.hTestImage = PIC_Load( ART_GAMMA, PIC_KEEP_RGBDATA );

	uiFileDialog.menu.vidInitFunc = UI_FileDialog_Init;

	uiFileDialog.background.generic.id = ID_BACKGROUND;
	uiFileDialog.background.generic.type = QMTYPE_BITMAP;
	uiFileDialog.background.generic.flags = QMF_INACTIVE;
	uiFileDialog.background.generic.x = 0;
	uiFileDialog.background.generic.y = 0;
	uiFileDialog.background.generic.width = uiStatic.width;
	uiFileDialog.background.generic.height = 768;
	uiFileDialog.background.pic = ART_BACKGROUND;

	/*uiTouchOptions.banner.generic.id = ID_BANNER;
	uiTouchOptions.banner.generic.type = QMTYPE_BITMAP;
	uiTouchOptions.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiTouchOptions.banner.generic.x = UI_BANNER_POSX;
	uiTouchOptions.banner.generic.y = UI_BANNER_POSY;
	uiTouchOptions.banner.generic.width = UI_BANNER_WIDTH;
	uiTouchOptions.banner.generic.height = UI_BANNER_HEIGHT;
	uiTouchOptions.banner.pic = ART_BANNER;*/

	uiFileDialog.done.generic.id = ID_DONE;
	uiFileDialog.done.generic.type = QMTYPE_BM_BUTTON;
	uiFileDialog.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiFileDialog.done.generic.x = 72;
	uiFileDialog.done.generic.y = 150;
	uiFileDialog.done.generic.name = "Done";
	uiFileDialog.done.generic.statusText = "Use selected file";
	uiFileDialog.done.generic.callback = UI_FileDialog_Callback;

	UI_UtilSetupPicButton( &uiFileDialog.done, PC_DONE );

	uiFileDialog.cancel.generic.id = ID_CANCEL;
	uiFileDialog.cancel.generic.type = QMTYPE_BM_BUTTON;
	uiFileDialog.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiFileDialog.cancel.generic.x = 72;
	uiFileDialog.cancel.generic.y = 210;
	uiFileDialog.cancel.generic.name = "Cancel";
	uiFileDialog.cancel.generic.statusText = "Cancel file selection";
	uiFileDialog.cancel.generic.callback = UI_FileDialog_Callback;

	UI_UtilSetupPicButton( &uiFileDialog.cancel, PC_CANCEL );

	uiFileDialog.fileList.generic.id = ID_FILELIST;
	uiFileDialog.fileList.generic.type = QMTYPE_SCROLLLIST;
	uiFileDialog.fileList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_SMALLFONT;
	uiFileDialog.fileList.generic.x = 340;
	uiFileDialog.fileList.generic.y = 150;
	uiFileDialog.fileList.generic.width = 600;
	uiFileDialog.fileList.generic.height = 500;
	uiFileDialog.fileList.generic.callback = UI_FileDialog_Callback;

	uiFileDialog.preview.generic.id = ID_PREVIEW;
	uiFileDialog.preview.generic.type = QMTYPE_ACTION;
	uiFileDialog.preview.generic.flags =  QMF_INACTIVE;
	uiFileDialog.preview.generic.x = 72;
	uiFileDialog.preview.generic.y = 300;
	uiFileDialog.preview.generic.width = 196;
	uiFileDialog.preview.generic.height = 196;
	uiFileDialog.preview.generic.ownerdraw = UI_Preview_Ownerdraw;

	UI_FileDialog_GetFileList();

	UI_AddItem( &uiFileDialog.menu, (void *)&uiFileDialog.background );
	//UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.banner );
	UI_AddItem( &uiFileDialog.menu, (void *)&uiFileDialog.done );
	UI_AddItem( &uiFileDialog.menu, (void *)&uiFileDialog.cancel );
	if( uiFileDialogGlobal.preview )
	UI_AddItem( &uiFileDialog.menu, (void *)&uiFileDialog.preview );
	UI_AddItem( &uiFileDialog.menu, (void *)&uiFileDialog.fileList );

}
示例#18
0
/*
 ==================
 UI_Cinematics_Init
 ==================
*/
static void UI_Cinematics_Init (){

	Mem_Fill(&uiCinematics, 0, sizeof(uiCinematics_t));

	uiCinematics.menu.keyFunc					= UI_Cinematics_KeyFunc;

	uiCinematics.background.generic.id			= ID_BACKGROUND;
	uiCinematics.background.generic.type		= QMTYPE_BITMAP;
	uiCinematics.background.generic.flags		= QMF_INACTIVE;
	uiCinematics.background.generic.x			= 0;
	uiCinematics.background.generic.y			= 0;
	uiCinematics.background.generic.width		= 1024;
	uiCinematics.background.generic.height		= 768;
	uiCinematics.background.pic					= ART_BACKGROUND;

	uiCinematics.banner.generic.id				= ID_BANNER;
	uiCinematics.banner.generic.type			= QMTYPE_BITMAP;
	uiCinematics.banner.generic.flags			= QMF_INACTIVE;
	uiCinematics.banner.generic.x				= 0;
	uiCinematics.banner.generic.y				= 66;
	uiCinematics.banner.generic.width			= 1024;
	uiCinematics.banner.generic.height			= 46;
	uiCinematics.banner.pic						= ART_BANNER;

	uiCinematics.back.generic.id				= ID_BACK;
	uiCinematics.back.generic.type				= QMTYPE_BITMAP;
	uiCinematics.back.generic.x					= 310;
	uiCinematics.back.generic.y					= 656;
	uiCinematics.back.generic.width				= 198;
	uiCinematics.back.generic.height			= 38;
	uiCinematics.back.generic.callback			= UI_Cinematics_Callback;
	uiCinematics.back.generic.ownerdraw			= UI_Cinematics_Ownerdraw;
	uiCinematics.back.pic						= UI_BACKBUTTON;

	uiCinematics.play.generic.id				= ID_PLAY;
	uiCinematics.play.generic.type				= QMTYPE_BITMAP;
	uiCinematics.play.generic.x					= 516;
	uiCinematics.play.generic.y					= 656;
	uiCinematics.play.generic.width				= 198;
	uiCinematics.play.generic.height			= 38;
	uiCinematics.play.generic.callback			= UI_Cinematics_Callback;
	uiCinematics.play.generic.ownerdraw			= UI_Cinematics_Ownerdraw;
	uiCinematics.play.pic						= UI_PLAYBUTTON;

	uiCinematics.cinList.generic.id				= ID_CINLIST;
	uiCinematics.cinList.generic.type			= QMTYPE_SCROLLLIST;
	uiCinematics.cinList.generic.flags			= QMF_CENTER_JUSTIFY | QMF_PULSEIFFOCUS | QMF_DROPSHADOW;
	uiCinematics.cinList.generic.x				= 44;
	uiCinematics.cinList.generic.y				= 208;
	uiCinematics.cinList.generic.width			= 512;
	uiCinematics.cinList.generic.height			= 352;
	uiCinematics.cinList.generic.callback		= UI_Cinematics_Callback;

	uiCinematics.cinPreview.generic.id			= ID_CINPREVIEW;
	uiCinematics.cinPreview.generic.type		= QMTYPE_BITMAP;
	uiCinematics.cinPreview.generic.x			= 564;
	uiCinematics.cinPreview.generic.y			= 208;
	uiCinematics.cinPreview.generic.width		= 416;
	uiCinematics.cinPreview.generic.height		= 352;
	uiCinematics.cinPreview.generic.callback	= UI_Cinematics_Callback;
	uiCinematics.cinPreview.generic.ownerdraw	= UI_Cinematics_Ownerdraw;
	uiCinematics.cinPreview.pic					= ART_PREVIEWBACK;

	UI_Cinematics_GetCinList();

	UI_AddItem(&uiCinematics.menu, (void *)&uiCinematics.background);
	UI_AddItem(&uiCinematics.menu, (void *)&uiCinematics.banner);
	UI_AddItem(&uiCinematics.menu, (void *)&uiCinematics.back);
	UI_AddItem(&uiCinematics.menu, (void *)&uiCinematics.play);
	UI_AddItem(&uiCinematics.menu, (void *)&uiCinematics.cinList);
	UI_AddItem(&uiCinematics.menu, (void *)&uiCinematics.cinPreview);

	// Start playing first cinematic in list
//	if (uiCinematics.cinematicFiles[uiCinematics.cinList.curItem][0])
//		uiStatic.playingCinematic = CIN_PlayCinematic(uiCinematics.cinematicFiles[uiCinematics.cinList.curItem], CIN_LOOPING | CIN_SILENT);
}
示例#19
0
/*
=================
UI_LoadGame_Init
=================
*/
static void UI_LoadGame_Init( void )
{
	memset( &uiLoadGame, 0, sizeof( uiLoadGame_t ));

	uiLoadGame.menu.vidInitFunc = UI_LoadGame_Init;
	uiLoadGame.menu.keyFunc = UI_LoadGame_KeyFunc;

	StringConcat( uiLoadGame.hintText, "Time", TIME_LENGTH );
	StringConcat( uiLoadGame.hintText, uiEmptyString, TIME_LENGTH );
	StringConcat( uiLoadGame.hintText, "Game", NAME_LENGTH );
	StringConcat( uiLoadGame.hintText, uiEmptyString, NAME_LENGTH );
	StringConcat( uiLoadGame.hintText, "Elapsed time", GAMETIME_LENGTH );
	StringConcat( uiLoadGame.hintText, uiEmptyString, GAMETIME_LENGTH );

	uiLoadGame.background.generic.id = ID_BACKGROUND;
	uiLoadGame.background.generic.type = QMTYPE_BITMAP;
	uiLoadGame.background.generic.flags = QMF_INACTIVE;
	uiLoadGame.background.generic.x = 0;
	uiLoadGame.background.generic.y = 0;
	uiLoadGame.background.generic.width = 1024;
	uiLoadGame.background.generic.height = 768;
	uiLoadGame.background.pic = ART_BACKGROUND;

	uiLoadGame.banner.generic.id = ID_BANNER;
	uiLoadGame.banner.generic.type = QMTYPE_BITMAP;
	uiLoadGame.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiLoadGame.banner.generic.x = UI_BANNER_POSX;
	uiLoadGame.banner.generic.y = UI_BANNER_POSY;
	uiLoadGame.banner.generic.width = UI_BANNER_WIDTH;
	uiLoadGame.banner.generic.height = UI_BANNER_HEIGHT;
	uiLoadGame.banner.pic = ART_BANNER;

	uiLoadGame.load.generic.id = ID_LOAD;
	uiLoadGame.load.generic.type = QMTYPE_BM_BUTTON;
	uiLoadGame.load.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiLoadGame.load.generic.x = 72;
	uiLoadGame.load.generic.y = 230;
	uiLoadGame.load.generic.name = "Load";
	uiLoadGame.load.generic.statusText = "Load saved game";
	uiLoadGame.load.generic.callback = UI_LoadGame_Callback;

	UI_UtilSetupPicButton( &uiLoadGame.load, PC_LOAD_GAME );

	uiLoadGame.remove.generic.id = ID_DELETE;
	uiLoadGame.remove.generic.type = QMTYPE_BM_BUTTON;
	uiLoadGame.remove.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiLoadGame.remove.generic.x = 72;
	uiLoadGame.remove.generic.y = 280;
	uiLoadGame.remove.generic.name = "Delete";
	uiLoadGame.remove.generic.statusText = "Delete saved game";
	uiLoadGame.remove.generic.callback = UI_LoadGame_Callback;

	UI_UtilSetupPicButton( &uiLoadGame.remove, PC_DELETE );

	uiLoadGame.cancel.generic.id = ID_CANCEL;
	uiLoadGame.cancel.generic.type = QMTYPE_BM_BUTTON;
	uiLoadGame.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiLoadGame.cancel.generic.x = 72;
	uiLoadGame.cancel.generic.y = 330;
	uiLoadGame.cancel.generic.name = "Cancel";
	uiLoadGame.cancel.generic.statusText = "Return back to main menu";
	uiLoadGame.cancel.generic.callback = UI_LoadGame_Callback;

	UI_UtilSetupPicButton( &uiLoadGame.cancel, PC_CANCEL );

	uiLoadGame.hintMessage.generic.id = ID_TABLEHINT;
	uiLoadGame.hintMessage.generic.type = QMTYPE_ACTION;
	uiLoadGame.hintMessage.generic.flags = QMF_INACTIVE|QMF_SMALLFONT;
	uiLoadGame.hintMessage.generic.color = uiColorHelp;
	uiLoadGame.hintMessage.generic.name = uiLoadGame.hintText;
	uiLoadGame.hintMessage.generic.x = 360;
	uiLoadGame.hintMessage.generic.y = 225;

	uiLoadGame.levelShot.generic.id = ID_LEVELSHOT;
	uiLoadGame.levelShot.generic.type = QMTYPE_BITMAP;
	uiLoadGame.levelShot.generic.flags = QMF_INACTIVE;
	uiLoadGame.levelShot.generic.x = LEVELSHOT_X;
	uiLoadGame.levelShot.generic.y = LEVELSHOT_Y;
	uiLoadGame.levelShot.generic.width = LEVELSHOT_W;
	uiLoadGame.levelShot.generic.height = LEVELSHOT_H;
	uiLoadGame.levelShot.generic.ownerdraw = UI_LoadGame_Ownerdraw;

	uiLoadGame.savesList.generic.id = ID_SAVELIST;
	uiLoadGame.savesList.generic.type = QMTYPE_SCROLLLIST;
	uiLoadGame.savesList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_SMALLFONT;
	uiLoadGame.savesList.generic.x = 360;
	uiLoadGame.savesList.generic.y = 255;
	uiLoadGame.savesList.generic.width = 640;
	uiLoadGame.savesList.generic.height = 440;
	uiLoadGame.savesList.generic.callback = UI_LoadGame_Callback;

	uiLoadGame.msgBox.generic.id = ID_MSGBOX;
	uiLoadGame.msgBox.generic.type = QMTYPE_ACTION;
	uiLoadGame.msgBox.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiLoadGame.msgBox.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
	uiLoadGame.msgBox.generic.x = 192;
	uiLoadGame.msgBox.generic.y = 256;
	uiLoadGame.msgBox.generic.width = 640;
	uiLoadGame.msgBox.generic.height = 256;

	uiLoadGame.promptMessage.generic.id = ID_MSGBOX;
	uiLoadGame.promptMessage.generic.type = QMTYPE_ACTION;
	uiLoadGame.promptMessage.generic.flags = QMF_INACTIVE|QMF_DROPSHADOW|QMF_HIDDEN;
	uiLoadGame.promptMessage.generic.name = "Delete selected game?";
	uiLoadGame.promptMessage.generic.x = 315;
	uiLoadGame.promptMessage.generic.y = 280;

	uiLoadGame.yes.generic.id = ID_YES;
	uiLoadGame.yes.generic.type = QMTYPE_BM_BUTTON;
	uiLoadGame.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiLoadGame.yes.generic.name = "Ok";
	uiLoadGame.yes.generic.x = 380;
	uiLoadGame.yes.generic.y = 460;
	uiLoadGame.yes.generic.callback = UI_LoadGame_Callback;

	UI_UtilSetupPicButton( &uiLoadGame.yes, PC_OK );

	uiLoadGame.no.generic.id = ID_NO;
	uiLoadGame.no.generic.type = QMTYPE_BM_BUTTON;
	uiLoadGame.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiLoadGame.no.generic.name = "Cancel";
	uiLoadGame.no.generic.x = 530;
	uiLoadGame.no.generic.y = 460;
	uiLoadGame.no.generic.callback = UI_LoadGame_Callback;

	UI_UtilSetupPicButton( &uiLoadGame.no, PC_CANCEL );

	UI_LoadGame_GetGameList();

	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.background );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.banner );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.load );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.remove );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.cancel );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.hintMessage );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.levelShot );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.savesList );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.msgBox );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.promptMessage );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.no );
	UI_AddItem( &uiLoadGame.menu, (void *)&uiLoadGame.yes );
}
/*
=================
UI_NewGame_Init
=================
*/
static void UI_NewGame_Init( void )
{
	memset( &uiNewGame, 0, sizeof( uiNewGame_t ));

	uiNewGame.menu.vidInitFunc = UI_NewGame_Init;
	uiNewGame.menu.keyFunc = UI_NewGame_KeyFunc;
	
	uiNewGame.background.generic.id = ID_BACKGROUND;
	uiNewGame.background.generic.type = QMTYPE_BITMAP;
	uiNewGame.background.generic.flags = QMF_INACTIVE;
	uiNewGame.background.generic.x = 0;
	uiNewGame.background.generic.y = 0;
	uiNewGame.background.generic.width = 1024;
	uiNewGame.background.generic.height = 768;
	uiNewGame.background.pic = ART_BACKGROUND;

	uiNewGame.banner.generic.id = ID_BANNER;
	uiNewGame.banner.generic.type = QMTYPE_BITMAP;
	uiNewGame.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiNewGame.banner.generic.x = UI_BANNER_POSX;
	uiNewGame.banner.generic.y = UI_BANNER_POSY;
	uiNewGame.banner.generic.width = UI_BANNER_WIDTH;
	uiNewGame.banner.generic.height = UI_BANNER_HEIGHT;
	uiNewGame.banner.pic = ART_BANNER;

	uiNewGame.easy.generic.id = ID_EASY;
	uiNewGame.easy.generic.type = QMTYPE_BM_BUTTON;
	uiNewGame.easy.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiNewGame.easy.generic.name = "Easy";
	uiNewGame.easy.generic.statusText = MenuStrings[HINT_SKILL_EASY];
	uiNewGame.easy.generic.x = 72;
	uiNewGame.easy.generic.y = 230;
	uiNewGame.easy.generic.callback = UI_NewGame_Callback;

	UI_UtilSetupPicButton( &uiNewGame.easy, PC_EASY );

	uiNewGame.medium.generic.id = ID_MEDIUM;
	uiNewGame.medium.generic.type = QMTYPE_BM_BUTTON;
	uiNewGame.medium.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiNewGame.medium.generic.name = "Medium";
	uiNewGame.medium.generic.statusText = MenuStrings[HINT_SKILL_NORMAL];
	uiNewGame.medium.generic.x = 72;
	uiNewGame.medium.generic.y = 280;
	uiNewGame.medium.generic.callback = UI_NewGame_Callback;
	
	UI_UtilSetupPicButton( &uiNewGame.medium, PC_MEDIUM );

	uiNewGame.hard.generic.id = ID_DIFFICULT;
	uiNewGame.hard.generic.type = QMTYPE_BM_BUTTON;
	uiNewGame.hard.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiNewGame.hard.generic.name = "Difficult";
	uiNewGame.hard.generic.statusText = MenuStrings[HINT_SKILL_HARD];
	uiNewGame.hard.generic.x = 72;
	uiNewGame.hard.generic.y = 330;
	uiNewGame.hard.generic.callback = UI_NewGame_Callback;

	UI_UtilSetupPicButton( &uiNewGame.hard, PC_DIFFICULT );

	uiNewGame.cancel.generic.id = ID_CANCEL;
	uiNewGame.cancel.generic.type = QMTYPE_BM_BUTTON;
	uiNewGame.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiNewGame.cancel.generic.name = "Cancel";
	uiNewGame.cancel.generic.statusText = "Go back to the main Menu";
	uiNewGame.cancel.generic.x = 72;
	uiNewGame.cancel.generic.y = 380;
	uiNewGame.cancel.generic.callback = UI_NewGame_Callback;

	UI_UtilSetupPicButton( &uiNewGame.cancel, PC_CANCEL );

	uiNewGame.msgBox.generic.id = ID_MSGBOX;
	uiNewGame.msgBox.generic.type = QMTYPE_ACTION;
	uiNewGame.msgBox.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiNewGame.msgBox.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
	uiNewGame.msgBox.generic.x = 192;
	uiNewGame.msgBox.generic.y = 256;
	uiNewGame.msgBox.generic.width = 640;
	uiNewGame.msgBox.generic.height = 256;

	uiNewGame.dlgMessage1.generic.id = ID_MSGTEXT;
	uiNewGame.dlgMessage1.generic.type = QMTYPE_ACTION;
	uiNewGame.dlgMessage1.generic.flags = QMF_INACTIVE|QMF_HIDDEN|QMF_DROPSHADOW|QMF_CENTER_JUSTIFY;
	uiNewGame.dlgMessage1.generic.name = MenuStrings[HINT_RESTART_GAME];
	uiNewGame.dlgMessage1.generic.x = 192;
	uiNewGame.dlgMessage1.generic.y = 280;
	uiNewGame.dlgMessage1.generic.width = 640;
	uiNewGame.dlgMessage1.generic.height = 256;

	uiNewGame.yes.generic.id = ID_YES;
	uiNewGame.yes.generic.type = QMTYPE_BM_BUTTON;
	uiNewGame.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_HIDDEN|QMF_DROPSHADOW;
	uiNewGame.yes.generic.name = "Ok";
	uiNewGame.yes.generic.x = 380;
	uiNewGame.yes.generic.y = 460;
	uiNewGame.yes.generic.callback = UI_NewGame_Callback;

	UI_UtilSetupPicButton( &uiNewGame.yes, PC_OK );

	uiNewGame.no.generic.id = ID_NO;
	uiNewGame.no.generic.type = QMTYPE_BM_BUTTON;
	uiNewGame.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_HIDDEN|QMF_DROPSHADOW;
	uiNewGame.no.generic.name = "Cancel";
	uiNewGame.no.generic.x = 530;
	uiNewGame.no.generic.y = 460;
	uiNewGame.no.generic.callback = UI_NewGame_Callback;

	UI_UtilSetupPicButton( &uiNewGame.no, PC_CANCEL );

	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.background );
	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.banner );
	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.easy );
	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.medium );
	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.hard );
	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.cancel );
	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.msgBox );
	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.dlgMessage1 );
	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.no );
	UI_AddItem( &uiNewGame.menu, (void *)&uiNewGame.yes );
}
示例#21
0
/*
=================
UI_GamePad_Init
=================
*/
static void UI_GamePad_Init( void )
{
	memset( &uiGamePad, 0, sizeof( uiGamePad_t ));

	uiGamePad.menu.vidInitFunc = UI_GamePad_Init;

	uiGamePad.background.generic.id	= ID_BACKGROUND;
	uiGamePad.background.generic.type = QMTYPE_BITMAP;
	uiGamePad.background.generic.flags = QMF_INACTIVE;
	uiGamePad.background.generic.x = 0;
	uiGamePad.background.generic.y = 0;
	uiGamePad.background.generic.width = uiStatic.width;
	uiGamePad.background.generic.height = 768;
	uiGamePad.background.pic = ART_BACKGROUND;

	uiGamePad.banner.generic.id = ID_BANNER;
	uiGamePad.banner.generic.type = QMTYPE_BITMAP;
	uiGamePad.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiGamePad.banner.generic.x = UI_BANNER_POSX;
	uiGamePad.banner.generic.y = UI_BANNER_POSY;
	uiGamePad.banner.generic.width = UI_BANNER_WIDTH;
	uiGamePad.banner.generic.height	= UI_BANNER_HEIGHT;
	uiGamePad.banner.pic = ART_BANNER;

	uiGamePad.done.generic.id = ID_DONE;
	uiGamePad.done.generic.type = QMTYPE_BM_BUTTON;
	uiGamePad.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGamePad.done.generic.x = 72;
	uiGamePad.done.generic.y = 630;
	uiGamePad.done.generic.name = "Done";
	uiGamePad.done.generic.statusText = "Go back to the Configuration Menu";
	uiGamePad.done.generic.callback = UI_GamePad_Callback;

	UI_UtilSetupPicButton( &uiGamePad.done, PC_DONE );

	uiGamePad.axisBind_label.generic.type = QMTYPE_ACTION;
	uiGamePad.axisBind_label.generic.flags = QMF_CENTER_JUSTIFY|QMF_INACTIVE|QMF_DROPSHADOW;
	uiGamePad.axisBind_label.generic.x = 52;
	uiGamePad.axisBind_label.generic.y = 180;
	uiGamePad.axisBind_label.generic.color = uiColorHelp;
	uiGamePad.axisBind_label.generic.height = 26;
	uiGamePad.axisBind_label.generic.width = 200;
	uiGamePad.axisBind_label.generic.charHeight = 30;
	uiGamePad.axisBind_label.generic.charWidth = 17;
	uiGamePad.axisBind_label.generic.callback = UI_GamePad_Callback;
	uiGamePad.axisBind_label.generic.name = "Axis binding map";


	for( int i = 0, y = 230; i < 6; i++, y += 50 )
	{
		uiGamePad.axisBind[i].generic.id = ID_AXIS_BIND1 + i;
		uiGamePad.axisBind[i].generic.type = QMTYPE_SPINCONTROL;
		uiGamePad.axisBind[i].generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
		uiGamePad.axisBind[i].generic.x = 72;
		uiGamePad.axisBind[i].generic.y = y;
		uiGamePad.axisBind[i].generic.height = 26;
		uiGamePad.axisBind[i].generic.width = 256;
		uiGamePad.axisBind[i].generic.charWidth = 11;
		uiGamePad.axisBind[i].generic.charHeight = 22;
		uiGamePad.axisBind[i].generic.callback = UI_GamePad_Callback;
		uiGamePad.axisBind[i].generic.statusText = "Set axis binding";
		uiGamePad.axisBind[i].minValue = JOY_AXIS_SIDE;
		uiGamePad.axisBind[i].maxValue = JOY_AXIS_NULL;
		uiGamePad.axisBind[i].range = 1;
	}

	uiGamePad.side.generic.id = ID_SIDE;
	uiGamePad.side.generic.type = QMTYPE_SLIDER;
	uiGamePad.side.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGamePad.side.generic.x = 400;
	uiGamePad.side.generic.y = 250;
	uiGamePad.side.generic.callback = UI_GamePad_Callback;
	uiGamePad.side.generic.name = "Side";
	uiGamePad.side.generic.statusText = "Side movement sensitivity";
	uiGamePad.side.minValue = 0.0f;
	uiGamePad.side.maxValue = 2.0f;
	uiGamePad.side.range = 0.1f;

	uiGamePad.invSide.generic.id = ID_INVERT_SIDE;
	uiGamePad.invSide.generic.type = QMTYPE_CHECKBOX;
	uiGamePad.invSide.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_DROPSHADOW;
	uiGamePad.invSide.generic.name = "Invert";
	uiGamePad.invSide.generic.x = 620;
	uiGamePad.invSide.generic.y = 230;
	uiGamePad.invSide.generic.callback = UI_GamePad_Callback;
	uiGamePad.invSide.generic.statusText = "Invert side movement axis";

	uiGamePad.forward.generic.id = ID_FORWARD;
	uiGamePad.forward.generic.type = QMTYPE_SLIDER;
	uiGamePad.forward.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGamePad.forward.generic.x = 400;
	uiGamePad.forward.generic.y = 300;
	uiGamePad.forward.generic.callback = UI_GamePad_Callback;
	uiGamePad.forward.generic.name = "Forward";
	uiGamePad.forward.generic.statusText = "Forward movement sensitivity";
	uiGamePad.forward.minValue = 0.0f;
	uiGamePad.forward.maxValue = 2.0f;
	uiGamePad.forward.range = 0.1f;

	uiGamePad.invFwd.generic.id = ID_INVERT_FORWARD;
	uiGamePad.invFwd.generic.type = QMTYPE_CHECKBOX;
	uiGamePad.invFwd.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_DROPSHADOW;
	uiGamePad.invFwd.generic.name = "Invert";
	uiGamePad.invFwd.generic.x = 620;
	uiGamePad.invFwd.generic.y = 280;
	uiGamePad.invFwd.generic.callback = UI_GamePad_Callback;
	uiGamePad.invFwd.generic.statusText = "Invert forward movement axis";

	uiGamePad.pitch.generic.id = ID_PITCH;
	uiGamePad.pitch.generic.type = QMTYPE_SLIDER;
	uiGamePad.pitch.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGamePad.pitch.generic.x = 400;
	uiGamePad.pitch.generic.y = 350;
	uiGamePad.pitch.generic.callback = UI_GamePad_Callback;
	uiGamePad.pitch.generic.name = "Pitch";
	uiGamePad.pitch.generic.statusText = "Pitch rotating sensitivity";
	uiGamePad.pitch.minValue = 0.0f;
	uiGamePad.pitch.maxValue = 200.0f;
	uiGamePad.pitch.range = 1.0f;

	uiGamePad.invPitch.generic.id = ID_INVERT_PITCH;
	uiGamePad.invPitch.generic.type = QMTYPE_CHECKBOX;
	uiGamePad.invPitch.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_DROPSHADOW;
	uiGamePad.invPitch.generic.name = "Invert";
	uiGamePad.invPitch.generic.x = 620;
	uiGamePad.invPitch.generic.y = 330;
	uiGamePad.invPitch.generic.callback = UI_GamePad_Callback;
	uiGamePad.invPitch.generic.statusText = "Invert pitch axis";

	uiGamePad.yaw.generic.id = ID_YAW;
	uiGamePad.yaw.generic.type = QMTYPE_SLIDER;
	uiGamePad.yaw.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGamePad.yaw.generic.x = 400;
	uiGamePad.yaw.generic.y = 400;
	uiGamePad.yaw.generic.callback = UI_GamePad_Callback;
	uiGamePad.yaw.generic.name = "Yaw";
	uiGamePad.yaw.generic.statusText = "Yaw rotating sensitivity";
	uiGamePad.yaw.minValue = 0.0f;
	uiGamePad.yaw.maxValue = 200.0f;
	uiGamePad.yaw.range = 1.0f;

	uiGamePad.invYaw.generic.id = ID_INVERT_YAW;
	uiGamePad.invYaw.generic.type = QMTYPE_CHECKBOX;
	uiGamePad.invYaw.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_DROPSHADOW;
	uiGamePad.invYaw.generic.name = "Invert";
	uiGamePad.invYaw.generic.x = 620;
	uiGamePad.invYaw.generic.y = 380;
	uiGamePad.invYaw.generic.callback = UI_GamePad_Callback;
	uiGamePad.invYaw.generic.statusText = "Invert yaw axis";

	UI_GamePad_GetConfig();

	UI_AddItem( &uiGamePad.menu, &uiGamePad.background );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.banner );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.done );
	for( int i = 0; i < 6; i++ )
	{
		UI_AddItem( &uiGamePad.menu, &uiGamePad.axisBind[i] );
	}
	UI_AddItem( &uiGamePad.menu, &uiGamePad.side );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.invSide );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.forward );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.invFwd );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.pitch );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.invPitch );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.yaw );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.invYaw );
	UI_AddItem( &uiGamePad.menu, &uiGamePad.axisBind_label );
}
示例#22
0
/*
=================
UI_TouchOptions_Init
=================
*/
static void UI_TouchOptions_Init( void )
{
	memset( &uiTouchOptions, 0, sizeof( uiTouchOptions_t ));

	//uiTouchOptions.hTestImage = PIC_Load( ART_GAMMA, PIC_KEEP_RGBDATA );

	uiTouchOptions.menu.vidInitFunc = UI_TouchOptions_Init;

	uiTouchOptions.background.generic.id = ID_BACKGROUND;
	uiTouchOptions.background.generic.type = QMTYPE_BITMAP;
	uiTouchOptions.background.generic.flags = QMF_INACTIVE;
	uiTouchOptions.background.generic.x = 0;
	uiTouchOptions.background.generic.y = 0;
	uiTouchOptions.background.generic.width = uiStatic.width;
	uiTouchOptions.background.generic.height = 768;
	uiTouchOptions.background.pic = ART_BACKGROUND;

	uiTouchOptions.banner.generic.id = ID_BANNER;
	uiTouchOptions.banner.generic.type = QMTYPE_BITMAP;
	uiTouchOptions.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiTouchOptions.banner.generic.x = UI_BANNER_POSX;
	uiTouchOptions.banner.generic.y = UI_BANNER_POSY;
	uiTouchOptions.banner.generic.width = UI_BANNER_WIDTH;
	uiTouchOptions.banner.generic.height = UI_BANNER_HEIGHT;
	uiTouchOptions.banner.pic = ART_BANNER;
/*
	uiTouchOptions.testImage.generic.id = ID_BANNER;
	uiTouchOptions.testImage.generic.type = QMTYPE_BITMAP;
	uiTouchOptions.testImage.generic.flags = QMF_INACTIVE;
	uiTouchOptions.testImage.generic.x = 390;
	uiTouchOptions.testImage.generic.y = 225;
	uiTouchOptions.testImage.generic.width = 480;
	uiTouchOptions.testImage.generic.height = 450;
	uiTouchOptions.testImage.pic = ART_GAMMA;
	uiTouchOptions.testImage.generic.ownerdraw = UI_TouchOptions_Ownerdraw;
*/
	uiTouchOptions.done.generic.id = ID_DONE;
	uiTouchOptions.done.generic.type = QMTYPE_BM_BUTTON;
	uiTouchOptions.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiTouchOptions.done.generic.x = 72;
	uiTouchOptions.done.generic.y = 700;
	uiTouchOptions.done.generic.name = "Done";
	uiTouchOptions.done.generic.statusText = "Go back to the Touch Menu";
	uiTouchOptions.done.generic.callback = UI_TouchOptions_Callback;

	UI_UtilSetupPicButton( &uiTouchOptions.done, PC_DONE );

	uiTouchOptions.lookX.generic.id = ID_LOOKX;
	uiTouchOptions.lookX.generic.type = QMTYPE_SLIDER;
	uiTouchOptions.lookX.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiTouchOptions.lookX.generic.name = "Look X";
	uiTouchOptions.lookX.generic.x = 72;
	uiTouchOptions.lookX.generic.y = 280;
	uiTouchOptions.lookX.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.lookX.generic.statusText = "Horizontal look sensitivity";
	uiTouchOptions.lookX.minValue = 0.0;
	uiTouchOptions.lookX.maxValue = 1.0;
	uiTouchOptions.lookX.range = 0.05f;

	uiTouchOptions.lookY.generic.id = ID_LOOKY;
	uiTouchOptions.lookY.generic.type = QMTYPE_SLIDER;
	uiTouchOptions.lookY.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiTouchOptions.lookY.generic.name = "Look Y";
	uiTouchOptions.lookY.generic.x = 72;
	uiTouchOptions.lookY.generic.y = 340;
	uiTouchOptions.lookY.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.lookY.generic.statusText = "Vertical look sensitivity";
	uiTouchOptions.lookY.minValue = 0.0;
	uiTouchOptions.lookY.maxValue = 1.0;
	uiTouchOptions.lookY.range = 0.05f;

	uiTouchOptions.moveX.generic.id = ID_MOVEX;
	uiTouchOptions.moveX.generic.type = QMTYPE_SLIDER;
	uiTouchOptions.moveX.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiTouchOptions.moveX.generic.name = "Side";
	uiTouchOptions.moveX.generic.x = 72;
	uiTouchOptions.moveX.generic.y = 400;
	uiTouchOptions.moveX.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.moveX.generic.statusText = "Side move sensitivity";
	uiTouchOptions.moveX.minValue = 0.0;
	uiTouchOptions.moveX.maxValue = 1.0;
	uiTouchOptions.moveX.range = 0.05f;

	uiTouchOptions.moveY.generic.id = ID_MOVEY;
	uiTouchOptions.moveY.generic.type = QMTYPE_SLIDER;
	uiTouchOptions.moveY.generic.flags = QMF_PULSEIFFOCUS|QMF_DROPSHADOW;
	uiTouchOptions.moveY.generic.name = "Forward";
	uiTouchOptions.moveY.generic.x = 72;
	uiTouchOptions.moveY.generic.y = 460;
	uiTouchOptions.moveY.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.moveY.generic.statusText = "Forward move sensitivity";
	uiTouchOptions.moveY.minValue = 0.0;
	uiTouchOptions.moveY.maxValue = 1.0;
	uiTouchOptions.moveY.range = 0.05f;

	uiTouchOptions.gridsize.generic.id = ID_GRID_SIZE;
	uiTouchOptions.gridsize.generic.type = QMTYPE_SPINCONTROL;
	uiTouchOptions.gridsize.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiTouchOptions.gridsize.generic.x = 72+30;
	uiTouchOptions.gridsize.generic.y = 580;
	uiTouchOptions.gridsize.generic.width = 150;
	uiTouchOptions.gridsize.generic.height = 30;
	uiTouchOptions.gridsize.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.gridsize.generic.statusText = "Set grid size";
	uiTouchOptions.gridsize.maxValue = 100;
	uiTouchOptions.gridsize.minValue = 25;
	uiTouchOptions.gridsize.range = 5;

	uiTouchOptions.grid.generic.id = ID_GRID;
	uiTouchOptions.grid.generic.type = QMTYPE_CHECKBOX;
	uiTouchOptions.grid.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiTouchOptions.grid.generic.name = "Grid";
	uiTouchOptions.grid.generic.x = 72;
	uiTouchOptions.grid.generic.y = 520;
	uiTouchOptions.grid.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.grid.generic.statusText = "Enable/disable grid";

	uiTouchOptions.enable.generic.id = ID_ENABLE;
	uiTouchOptions.enable.generic.type = QMTYPE_CHECKBOX;
	uiTouchOptions.enable.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiTouchOptions.enable.generic.name = "Enable";
	uiTouchOptions.enable.generic.x = 680;
	uiTouchOptions.enable.generic.y = 650;
	uiTouchOptions.enable.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.enable.generic.statusText = "enable/disable touch controls";

	uiTouchOptions.nomouse.generic.id = ID_IGNORE_MOUSE;
	uiTouchOptions.nomouse.generic.type = QMTYPE_CHECKBOX;
	uiTouchOptions.nomouse.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiTouchOptions.nomouse.generic.name = "Ignore Mouse";
	uiTouchOptions.nomouse.generic.x = 680;
	uiTouchOptions.nomouse.generic.y = 590;
	uiTouchOptions.nomouse.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.nomouse.generic.statusText = "Ignore mouse input";

	uiTouchOptions.profiles.generic.id = ID_PROFILELIST;
	uiTouchOptions.profiles.generic.type = QMTYPE_SCROLLLIST;
	uiTouchOptions.profiles.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_SMALLFONT;
	uiTouchOptions.profiles.generic.x = 360;
	uiTouchOptions.profiles.generic.y = 255;
	uiTouchOptions.profiles.generic.width = 300;
	uiTouchOptions.profiles.generic.height = 340;
	uiTouchOptions.profiles.generic.callback = UI_TouchOptions_Callback;

	uiTouchOptions.reset.generic.id = ID_RESET;
	uiTouchOptions.reset.generic.type = QMTYPE_BM_BUTTON;
	uiTouchOptions.reset.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW | QMF_ACT_ONRELEASE;
	uiTouchOptions.reset.generic.name = "Reset";
	uiTouchOptions.reset.generic.x = 72;
	uiTouchOptions.reset.generic.y = 640;
	uiTouchOptions.reset.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.reset.generic.statusText = "Reset touch to default state";
	uiTouchOptions.reset.pic = PIC_Load("gfx/shell/btn_touch_reset");
	
	uiTouchOptions.remove.generic.id = ID_DELETE;
	uiTouchOptions.remove.generic.type = QMTYPE_BM_BUTTON;
	uiTouchOptions.remove.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiTouchOptions.remove.generic.x = 560;
	uiTouchOptions.remove.generic.y = 650;
	uiTouchOptions.remove.generic.name = "Delete";
	uiTouchOptions.remove.generic.statusText = "Delete saved game";
	uiTouchOptions.remove.generic.callback = UI_TouchOptions_Callback;
	UI_UtilSetupPicButton( &uiTouchOptions.remove, PC_DELETE );

	uiTouchOptions.apply.generic.id = ID_APPLY;
	uiTouchOptions.apply.generic.type = QMTYPE_BM_BUTTON;
	uiTouchOptions.apply.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiTouchOptions.apply.generic.x = 360;
	uiTouchOptions.apply.generic.y = 650;
	uiTouchOptions.apply.generic.name = "Activate";
	uiTouchOptions.apply.generic.statusText = "Apply selected profile";
	uiTouchOptions.apply.generic.callback = UI_TouchOptions_Callback;
	UI_UtilSetupPicButton( &uiTouchOptions.apply, PC_ACTIVATE );

	uiTouchOptions.profilename.generic.id = ID_PROFILENAME;
	uiTouchOptions.profilename.generic.type = QMTYPE_FIELD;
	uiTouchOptions.profilename.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiTouchOptions.profilename.generic.name = "New Profile:";
	uiTouchOptions.profilename.generic.x = 680;
	uiTouchOptions.profilename.generic.y = 260;
	uiTouchOptions.profilename.generic.width = 205;
	uiTouchOptions.profilename.generic.height = 32;
	uiTouchOptions.profilename.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.profilename.maxLength = 16;

	uiTouchOptions.save.generic.id = ID_SAVE;
	uiTouchOptions.save.generic.type = QMTYPE_BM_BUTTON;
	uiTouchOptions.save.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW | QMF_ACT_ONRELEASE;
	uiTouchOptions.save.generic.x = 680;
	uiTouchOptions.save.generic.y = 330;
	uiTouchOptions.save.generic.name = "Save";
	uiTouchOptions.save.generic.statusText = "Save new profile";
	uiTouchOptions.save.generic.callback = UI_TouchOptions_Callback;
	uiTouchOptions.save.pic = PIC_Load("gfx/shell/btn_touch_save");
	
	uiTouchOptions.msgBox.generic.id = ID_MSGBOX;
	uiTouchOptions.msgBox.generic.type = QMTYPE_ACTION;
	uiTouchOptions.msgBox.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiTouchOptions.msgBox.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
	uiTouchOptions.msgBox.generic.x = DLG_X + 192;
	uiTouchOptions.msgBox.generic.y = 256;
	uiTouchOptions.msgBox.generic.width = 640;
	uiTouchOptions.msgBox.generic.height = 256;

	uiTouchOptions.promptMessage.generic.id = ID_MSGBOX;
	uiTouchOptions.promptMessage.generic.type = QMTYPE_ACTION;
	uiTouchOptions.promptMessage.generic.flags = QMF_INACTIVE|QMF_DROPSHADOW|QMF_HIDDEN;
	uiTouchOptions.promptMessage.generic.name = uiTouchOptions.dialogText;
	uiTouchOptions.promptMessage.generic.x = DLG_X + 315;
	uiTouchOptions.promptMessage.generic.y = 280;

	uiTouchOptions.yes.generic.id = ID_YES;
	uiTouchOptions.yes.generic.type = QMTYPE_BM_BUTTON;
	uiTouchOptions.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiTouchOptions.yes.generic.name = "Ok";
	uiTouchOptions.yes.generic.x = DLG_X + 380;
	uiTouchOptions.yes.generic.y = 460;
	uiTouchOptions.yes.generic.callback = UI_TouchOptions_Callback;

	UI_UtilSetupPicButton( &uiTouchOptions.yes, PC_OK );

	uiTouchOptions.no.generic.id = ID_NO;
	uiTouchOptions.no.generic.type = QMTYPE_BM_BUTTON;
	uiTouchOptions.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiTouchOptions.no.generic.name = "Cancel";
	uiTouchOptions.no.generic.x = DLG_X + 530;
	uiTouchOptions.no.generic.y = 460;
	uiTouchOptions.no.generic.callback = UI_TouchOptions_Callback;

	UI_UtilSetupPicButton( &uiTouchOptions.no, PC_CANCEL );
	UI_TouchOptions_GetConfig();
	UI_TouchOptions_GetProfileList();

	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.background );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.banner );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.done );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.lookX );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.lookY );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.moveX );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.moveY );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.enable );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.nomouse );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.reset );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.profiles );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.save );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.profilename );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.remove );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.apply );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.grid );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.gridsize );

	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.msgBox );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.promptMessage );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.no );
	UI_AddItem( &uiTouchOptions.menu, (void *)&uiTouchOptions.yes );
	UI_TouchOptions_GetProfileList();

}
示例#23
0
/*
=================
UI_VidModes_Init
=================
*/
static void UI_VidModes_Init( void )
{
	memset( &uiVidModes, 0, sizeof( uiVidModes_t ));

	uiVidModes.menu.vidInitFunc = UI_VidModes_Init;
	
	uiVidModes.background.generic.id = ID_BACKGROUND;
	uiVidModes.background.generic.type = QMTYPE_BITMAP;
	uiVidModes.background.generic.flags = QMF_INACTIVE;
	uiVidModes.background.generic.x = 0;
	uiVidModes.background.generic.y = 0;
	uiVidModes.background.generic.width = uiStatic.width;
	uiVidModes.background.generic.height = 768;
	uiVidModes.background.pic = ART_BACKGROUND;

	uiVidModes.banner.generic.id = ID_BANNER;
	uiVidModes.banner.generic.type = QMTYPE_BITMAP;
	uiVidModes.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiVidModes.banner.generic.x = UI_BANNER_POSX;
	uiVidModes.banner.generic.y = UI_BANNER_POSY;
	uiVidModes.banner.generic.width = UI_BANNER_WIDTH;
	uiVidModes.banner.generic.height = UI_BANNER_HEIGHT;
	uiVidModes.banner.pic = ART_BANNER;

	uiVidModes.ok.generic.id = ID_APPLY;
	uiVidModes.ok.generic.type = QMTYPE_BM_BUTTON;
	uiVidModes.ok.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiVidModes.ok.generic.x = 72;
	uiVidModes.ok.generic.y = 230;
	uiVidModes.ok.generic.name = "Apply";
	uiVidModes.ok.generic.statusText = "Apply changes";
	uiVidModes.ok.generic.callback = UI_VidModes_Callback;

	UI_UtilSetupPicButton( &uiVidModes.ok, PC_OK );

	uiVidModes.cancel.generic.id = ID_DONE;
	uiVidModes.cancel.generic.type = QMTYPE_BM_BUTTON;
	uiVidModes.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiVidModes.cancel.generic.x = 72;
	uiVidModes.cancel.generic.y = 280;
	uiVidModes.cancel.generic.name = "Done";
	uiVidModes.cancel.generic.statusText = "Return back to previous menu";
	uiVidModes.cancel.generic.callback = UI_VidModes_Callback;

	UI_UtilSetupPicButton( &uiVidModes.cancel, PC_CANCEL );

	uiVidModes.listCaption.generic.id = ID_TABLEHINT;
	uiVidModes.listCaption.generic.type = QMTYPE_BM_BUTTON;
	uiVidModes.listCaption.generic.flags = QMF_INACTIVE|QMF_SMALLFONT;
	uiVidModes.listCaption.generic.color = uiColorHelp;
	uiVidModes.listCaption.generic.name = MenuStrings[HINT_DISPLAYMODE];
	uiVidModes.listCaption.generic.x = 400;
	uiVidModes.listCaption.generic.y = 270;

	uiVidModes.vidList.generic.id = ID_VIDMODELIST;
	uiVidModes.vidList.generic.type = QMTYPE_SCROLLLIST;
	uiVidModes.vidList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_SMALLFONT;
	uiVidModes.vidList.generic.x = 400;
	uiVidModes.vidList.generic.y = 300;
	uiVidModes.vidList.generic.width = 560;
	uiVidModes.vidList.generic.height = 300;
	uiVidModes.vidList.generic.callback = UI_VidModes_Callback;

	uiVidModes.windowed.generic.id = ID_FULLSCREEN;
	uiVidModes.windowed.generic.type = QMTYPE_CHECKBOX;
	uiVidModes.windowed.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiVidModes.windowed.generic.name = "Run in a window";
	uiVidModes.windowed.generic.x = 400;
	uiVidModes.windowed.generic.y = 620;
	uiVidModes.windowed.generic.callback = UI_VidModes_Callback;
	uiVidModes.windowed.generic.statusText = "Run game in window mode";

	uiVidModes.vsync.generic.id = ID_VERTICALSYNC;
	uiVidModes.vsync.generic.type = QMTYPE_CHECKBOX;
	uiVidModes.vsync.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiVidModes.vsync.generic.name = "Vertical sync";
	uiVidModes.vsync.generic.x = 400;
	uiVidModes.vsync.generic.y = 670;
	uiVidModes.vsync.generic.callback = UI_VidModes_Callback;
	uiVidModes.vsync.generic.statusText = "enable vertical synchronization";

	UI_VidModes_GetConfig();

	UI_AddItem( &uiVidModes.menu, (void *)&uiVidModes.background );
	UI_AddItem( &uiVidModes.menu, (void *)&uiVidModes.banner );
	UI_AddItem( &uiVidModes.menu, (void *)&uiVidModes.ok );
	UI_AddItem( &uiVidModes.menu, (void *)&uiVidModes.cancel );
	UI_AddItem( &uiVidModes.menu, (void *)&uiVidModes.windowed );
	UI_AddItem( &uiVidModes.menu, (void *)&uiVidModes.vsync );
	UI_AddItem( &uiVidModes.menu, (void *)&uiVidModes.listCaption );
	UI_AddItem( &uiVidModes.menu, (void *)&uiVidModes.vidList );
}
/*
=================
UI_Main_Init
=================
*/
static void UI_Main_Init( void )
{
	bool bCustomGame;

	memset( &uiMain, 0, sizeof( uiMain_t ));

	if( CVAR_GET_FLOAT( "host_allow_changegame" ))
		bCustomGame = true;
	else bCustomGame = false;

	// precache .avi file and get logo width and height
	PRECACHE_LOGO( "logo.avi" );

	uiMain.menu.vidInitFunc = UI_Main_Init;
	uiMain.menu.keyFunc = UI_Main_KeyFunc;
	uiMain.menu.activateFunc = UI_Main_ActivateFunc;

	uiMain.background.generic.id = ID_BACKGROUND;
	uiMain.background.generic.type = QMTYPE_BITMAP;
	uiMain.background.generic.flags = QMF_INACTIVE;
	uiMain.background.generic.x = 0;
	uiMain.background.generic.y = 0;
	uiMain.background.generic.width = uiStatic.width;
	uiMain.background.generic.height = 768;
	uiMain.background.pic = ART_BACKGROUND;
	uiMain.background.generic.ownerdraw = UI_Background_Ownerdraw;

	uiMain.console.generic.id = ID_CONSOLE;
	uiMain.console.generic.type = QMTYPE_BM_BUTTON;
	uiMain.console.generic.name = "Console";
	uiMain.console.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiMain.console.generic.x = 72;
	uiMain.console.generic.y = CL_IsActive() ? 180 : 230;
	uiMain.console.generic.callback = UI_Main_Callback;

	UI_UtilSetupPicButton( &uiMain.console, PC_CONSOLE );

	uiMain.resumeGame.generic.id = ID_RESUME;
	uiMain.resumeGame.generic.type = QMTYPE_BM_BUTTON;
	uiMain.resumeGame.generic.name = "Resume game";
	uiMain.resumeGame.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMain.resumeGame.generic.statusText = MenuStrings[HINT_RESUME_GAME];
	uiMain.resumeGame.generic.x = 72;
	uiMain.resumeGame.generic.y = 230;
	uiMain.resumeGame.generic.callback = UI_Main_Callback;

	UI_UtilSetupPicButton( &uiMain.resumeGame, PC_RESUME_GAME );

	uiMain.newGame.generic.id = ID_NEWGAME;
	uiMain.newGame.generic.type = QMTYPE_BM_BUTTON;
	uiMain.newGame.generic.name = "New game";
	uiMain.newGame.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMain.newGame.generic.statusText = MenuStrings[HINT_NEWGAME];
	uiMain.newGame.generic.x = 72;
	uiMain.newGame.generic.y = 280;
	uiMain.newGame.generic.callback = UI_Main_Callback;

	UI_UtilSetupPicButton( &uiMain.newGame, PC_NEW_GAME );

	if ( gMenu.m_gameinfo.gamemode == GAME_MULTIPLAYER_ONLY || !strlen( gMenu.m_gameinfo.startmap ))
		uiMain.newGame.generic.flags |= QMF_GRAYED;

	uiMain.saveRestore.generic.id = ID_SAVERESTORE;
	uiMain.saveRestore.generic.type = QMTYPE_BM_BUTTON;
	uiMain.saveRestore.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;

	// server.dll needs for reading savefiles or startup newgame
	if( !CheckGameDll( ))
	{
		uiMain.saveRestore.generic.flags |= QMF_GRAYED;
		uiMain.newGame.generic.flags |= QMF_GRAYED;
	}

	if( CL_IsActive( ))
	{
		uiMain.saveRestore.generic.name = "Save\\Load Game";
		uiMain.saveRestore.generic.statusText = MenuStrings[HINT_SAVELOADGAME];
		UI_UtilSetupPicButton(&uiMain.saveRestore,PC_SAVE_LOAD_GAME);
	}
	else
	{
		uiMain.saveRestore.generic.name = "Load Game";
		uiMain.saveRestore.generic.statusText = MenuStrings[HINT_LOADGAME];
		uiMain.resumeGame.generic.flags |= QMF_HIDDEN;
		UI_UtilSetupPicButton( &uiMain.saveRestore, PC_LOAD_GAME );
	}

	uiMain.saveRestore.generic.x = 72;
	uiMain.saveRestore.generic.y = 330;
	uiMain.saveRestore.generic.callback = UI_Main_Callback;

	uiMain.configuration.generic.id = ID_CONFIGURATION;
	uiMain.configuration.generic.type = QMTYPE_BM_BUTTON;
	uiMain.configuration.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMain.configuration.generic.name = "Configuration";
	uiMain.configuration.generic.statusText = MenuStrings[HINT_CONFIGURATION];
	uiMain.configuration.generic.x = 72;
	uiMain.configuration.generic.y = 380;
	uiMain.configuration.generic.callback = UI_Main_Callback;

	UI_UtilSetupPicButton( &uiMain.configuration, PC_CONFIG );

	uiMain.multiPlayer.generic.id = ID_MULTIPLAYER;
	uiMain.multiPlayer.generic.type = QMTYPE_BM_BUTTON;
	uiMain.multiPlayer.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMain.multiPlayer.generic.name = "Multiplayer";
	uiMain.multiPlayer.generic.statusText = MenuStrings[HINT_MULTIPLAYER];
	uiMain.multiPlayer.generic.x = 72;
	uiMain.multiPlayer.generic.y = 430;
	uiMain.multiPlayer.generic.callback = UI_Main_Callback;

	UI_UtilSetupPicButton( &uiMain.multiPlayer, PC_MULTIPLAYER );

	if ( gMenu.m_gameinfo.gamemode == GAME_SINGLEPLAYER_ONLY )
		uiMain.multiPlayer.generic.flags |= QMF_GRAYED;

	if ( gMenu.m_gameinfo.gamemode == GAME_MULTIPLAYER_ONLY )
	{
		uiMain.saveRestore.generic.flags |= QMF_GRAYED;
	}

	uiMain.customGame.generic.id = ID_CUSTOMGAME;
	uiMain.customGame.generic.type = QMTYPE_BM_BUTTON;
	uiMain.customGame.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMain.customGame.generic.name = "Custom Game";
	uiMain.customGame.generic.statusText = MenuStrings[HINT_CUSTOM_GAME];
	uiMain.customGame.generic.x = 72;
	uiMain.customGame.generic.y = 480;
	uiMain.customGame.generic.callback = UI_Main_Callback;

	UI_UtilSetupPicButton( &uiMain.customGame, PC_CUSTOM_GAME );

	uiMain.previews.generic.id = ID_PREVIEWS;
	uiMain.previews.generic.type = QMTYPE_BM_BUTTON;
	uiMain.previews.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMain.previews.generic.name = "Previews";
	uiMain.previews.generic.statusText = MenuStrings[HINT_PREVIEWS_TEXT];
	uiMain.previews.generic.x = 72;
	uiMain.previews.generic.y = (bCustomGame) ? 530 : 480;
	uiMain.previews.generic.callback = UI_Main_Callback;

	// too short execute string - not a real command
	if( strlen( MenuStrings[HINT_PREVIEWS_CMD] ) <= 3 )
		uiMain.previews.generic.flags |= QMF_GRAYED;

	UI_UtilSetupPicButton( &uiMain.previews, PC_PREVIEWS );

	uiMain.quit.generic.id = ID_QUIT;
	uiMain.quit.generic.type = QMTYPE_BM_BUTTON;
	uiMain.quit.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NOTIFY;
	uiMain.quit.generic.name = "Quit";
	uiMain.quit.generic.statusText = MenuStrings[HINT_QUIT_BUTTON];
	uiMain.quit.generic.x = 72;
	uiMain.quit.generic.y = (bCustomGame) ? 580 : 530;
	uiMain.quit.generic.callback = UI_Main_Callback;

	UI_UtilSetupPicButton( &uiMain.quit, PC_QUIT );

	uiMain.minimizeBtn.generic.id = ID_MINIMIZE;
	uiMain.minimizeBtn.generic.type = QMTYPE_BITMAP;
	uiMain.minimizeBtn.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_MOUSEONLY|QMF_ACT_ONRELEASE;
	uiMain.minimizeBtn.generic.x = uiStatic.width - 72;
	uiMain.minimizeBtn.generic.y = 13;
	uiMain.minimizeBtn.generic.width = 32;
	uiMain.minimizeBtn.generic.height = 32;
	uiMain.minimizeBtn.generic.callback = UI_Main_Callback;
	uiMain.minimizeBtn.pic = ART_MINIMIZE_N;
	uiMain.minimizeBtn.focusPic = ART_MINIMIZE_F;

	uiMain.quitButton.generic.id = ID_QUIT_BUTTON;
	uiMain.quitButton.generic.type = QMTYPE_BITMAP;
	uiMain.quitButton.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_MOUSEONLY|QMF_ACT_ONRELEASE;
	uiMain.quitButton.generic.x = uiStatic.width - 36;
	uiMain.quitButton.generic.y = 13;
	uiMain.quitButton.generic.width = 32;
	uiMain.quitButton.generic.height = 32;
	uiMain.quitButton.generic.callback = UI_Main_Callback;
	uiMain.quitButton.pic = ART_CLOSEBTN_N;
	uiMain.quitButton.focusPic = ART_CLOSEBTN_F;

	uiMain.msgBox.generic.id = ID_MSGBOX;
	uiMain.msgBox.generic.type = QMTYPE_ACTION;
	uiMain.msgBox.generic.flags = QMF_INACTIVE|QMF_HIDDEN;
	uiMain.msgBox.generic.ownerdraw = UI_MsgBox_Ownerdraw; // just a fill rectangle
	uiMain.msgBox.generic.x = DLG_X + 192;
	uiMain.msgBox.generic.y = 256;
	uiMain.msgBox.generic.width = 640;
	uiMain.msgBox.generic.height = 256;

	uiMain.quitMessage.generic.id = ID_MSGBOX;
	uiMain.quitMessage.generic.type = QMTYPE_ACTION;
	uiMain.quitMessage.generic.flags = QMF_INACTIVE|QMF_DROPSHADOW|QMF_HIDDEN|QMF_CENTER_JUSTIFY;
	uiMain.quitMessage.generic.name = (CL_IsActive( )) ? MenuStrings[HINT_QUIT_ACTIVE] : MenuStrings[HINT_QUIT];
	uiMain.quitMessage.generic.x = DLG_X + 192;
	uiMain.quitMessage.generic.y = 280;
	uiMain.quitMessage.generic.width = 640;
	uiMain.quitMessage.generic.height = 256;

	uiMain.dlgMessage1.generic.id = ID_MSGTEXT;
	uiMain.dlgMessage1.generic.type = QMTYPE_ACTION;
	uiMain.dlgMessage1.generic.flags = QMF_INACTIVE|QMF_DROPSHADOW|QMF_HIDDEN|QMF_CENTER_JUSTIFY;
	uiMain.dlgMessage1.generic.name = MenuStrings[HINT_RESTART_GAME];
	uiMain.dlgMessage1.generic.x = DLG_X + 192;
	uiMain.dlgMessage1.generic.y = 280;
	uiMain.dlgMessage1.generic.width = 640;
	uiMain.dlgMessage1.generic.height = 256;

	uiMain.yes.generic.id = ID_YES;
	uiMain.yes.generic.type = QMTYPE_BM_BUTTON;
	uiMain.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiMain.yes.generic.name = "Ok";
	uiMain.yes.generic.x = DLG_X + 380;
	uiMain.yes.generic.y = 460;
	uiMain.yes.generic.callback = UI_Main_Callback;

	UI_UtilSetupPicButton( &uiMain.yes, PC_OK );

	uiMain.no.generic.id = ID_NO;
	uiMain.no.generic.type = QMTYPE_BM_BUTTON;
	uiMain.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDDEN;
	uiMain.no.generic.name = "Cancel";
	uiMain.no.generic.x = DLG_X + 530;
	uiMain.no.generic.y = 460;
	uiMain.no.generic.callback = UI_Main_Callback;
	
	UI_UtilSetupPicButton( &uiMain.no, PC_CANCEL );

	UI_AddItem( &uiMain.menu, (void *)&uiMain.background );

	if ( gpGlobals->developer )
		UI_AddItem( &uiMain.menu, (void *)&uiMain.console );

	UI_AddItem( &uiMain.menu, (void *)&uiMain.resumeGame );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.newGame );

	UI_AddItem( &uiMain.menu, (void *)&uiMain.saveRestore );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.configuration );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.multiPlayer );

	if ( bCustomGame )
		UI_AddItem( &uiMain.menu, (void *)&uiMain.customGame );

	UI_AddItem( &uiMain.menu, (void *)&uiMain.previews );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.quit );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.minimizeBtn );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.quitButton );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.msgBox );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.quitMessage );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.dlgMessage1 );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.no );
	UI_AddItem( &uiMain.menu, (void *)&uiMain.yes );
}
示例#25
0
/*
=================
UI_GameOptions_Init
=================
*/
static void UI_GameOptions_Init( void )
{
	memset( &uiGameInitial, 0, sizeof( uiGameValues_t ));
	memset( &uiGameOptions, 0, sizeof( uiGameOptions_t ));

	uiGameOptions.menu.vidInitFunc = UI_GameOptions_Init;
	uiGameOptions.menu.keyFunc = UI_GameOptions_KeyFunc;

	uiGameOptions.background.generic.id = ID_BACKGROUND;
	uiGameOptions.background.generic.type = QMTYPE_BITMAP;
	uiGameOptions.background.generic.flags = QMF_INACTIVE;
	uiGameOptions.background.generic.x = 0;
	uiGameOptions.background.generic.y = 0;
	uiGameOptions.background.generic.width = uiStatic.width;
	uiGameOptions.background.generic.height = 768;
	uiGameOptions.background.pic = ART_BACKGROUND;

	uiGameOptions.banner.generic.id = ID_BANNER;
	uiGameOptions.banner.generic.type = QMTYPE_BITMAP;
	uiGameOptions.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiGameOptions.banner.generic.x = UI_BANNER_POSX;
	uiGameOptions.banner.generic.y = UI_BANNER_POSY;
	uiGameOptions.banner.generic.width = UI_BANNER_WIDTH;
	uiGameOptions.banner.generic.height = UI_BANNER_HEIGHT;
	uiGameOptions.banner.pic = ART_BANNER;

	uiGameOptions.done.generic.id	= ID_DONE;
	uiGameOptions.done.generic.type = QMTYPE_BM_BUTTON;
	uiGameOptions.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW; 
	uiGameOptions.done.generic.x = 72;
	uiGameOptions.done.generic.y = 230;
	uiGameOptions.done.generic.name = "Done";
	uiGameOptions.done.generic.statusText = "Save changes and go back to the Customize Menu";
	uiGameOptions.done.generic.callback = UI_GameOptions_Callback;

	UI_UtilSetupPicButton( &uiGameOptions.done, PC_DONE );

	uiGameOptions.cancel.generic.id = ID_CANCEL;
	uiGameOptions.cancel.generic.type = QMTYPE_BM_BUTTON;
	uiGameOptions.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGameOptions.cancel.generic.x = 72;
	uiGameOptions.cancel.generic.y = 280;
	uiGameOptions.cancel.generic.name = "Cancel";
	uiGameOptions.cancel.generic.statusText = "Go back to the Customize Menu";
	uiGameOptions.cancel.generic.callback = UI_GameOptions_Callback;

	UI_UtilSetupPicButton( &uiGameOptions.cancel, PC_CANCEL );

	uiGameOptions.maxFPS.generic.id = ID_MAXFPS;
	uiGameOptions.maxFPS.generic.type = QMTYPE_SPINCONTROL;
	uiGameOptions.maxFPS.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiGameOptions.maxFPS.generic.x = 315;
	uiGameOptions.maxFPS.generic.y = 270;
	uiGameOptions.maxFPS.generic.width = 168;
	uiGameOptions.maxFPS.generic.height = 26;
	uiGameOptions.maxFPS.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.maxFPS.generic.statusText = "Cap your game frame rate";
	uiGameOptions.maxFPS.minValue = 20;
	uiGameOptions.maxFPS.maxValue = 500;
	uiGameOptions.maxFPS.range = 20;

	uiGameOptions.maxFPSmessage.generic.id = ID_MAXFPSMESSAGE;
	uiGameOptions.maxFPSmessage.generic.type = QMTYPE_ACTION;
	uiGameOptions.maxFPSmessage.generic.flags = QMF_SMALLFONT|QMF_INACTIVE|QMF_DROPSHADOW;
	uiGameOptions.maxFPSmessage.generic.x = 280;
	uiGameOptions.maxFPSmessage.generic.y = 230;
	uiGameOptions.maxFPSmessage.generic.name = "Limit game fps";
	uiGameOptions.maxFPSmessage.generic.color = uiColorHelp;

	uiGameOptions.hand.generic.id = ID_HAND;
	uiGameOptions.hand.generic.type = QMTYPE_CHECKBOX;
	uiGameOptions.hand.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiGameOptions.hand.generic.x = 280;
	uiGameOptions.hand.generic.y = 330;
	uiGameOptions.hand.generic.name = "Use left hand";
	uiGameOptions.hand.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.hand.generic.statusText = "Draw gun at left side";

	uiGameOptions.allowDownload.generic.id = ID_ALLOWDOWNLOAD;
	uiGameOptions.allowDownload.generic.type = QMTYPE_CHECKBOX;
	uiGameOptions.allowDownload.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiGameOptions.allowDownload.generic.x = 280;
	uiGameOptions.allowDownload.generic.y = 390;
	uiGameOptions.allowDownload.generic.name = "Allow download";
	uiGameOptions.allowDownload.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.allowDownload.generic.statusText = "Allow download of files from servers";

	uiGameOptions.alwaysRun.generic.id = ID_ALWAYSRUN;
	uiGameOptions.alwaysRun.generic.type = QMTYPE_CHECKBOX;
	uiGameOptions.alwaysRun.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiGameOptions.alwaysRun.generic.x = 280;
	uiGameOptions.alwaysRun.generic.y = 450;
	uiGameOptions.alwaysRun.generic.name = "Always run";
	uiGameOptions.alwaysRun.generic.callback = UI_GameOptions_Callback;
	uiGameOptions.alwaysRun.generic.statusText = "Switch between run/step models when pressed 'run' button";

	UI_GameOptions_GetConfig();

	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.background );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.banner );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.done );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.cancel );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.maxFPS );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.maxFPSmessage );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.hand );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.alwaysRun );
	UI_AddItem( &uiGameOptions.menu, (void *)&uiGameOptions.allowDownload );
}
示例#26
0
/*
=================
UI_CreateGame_Init
=================
*/
static void UI_CreateGame_Init( void )
{
	memset( &uiCreateGame, 0, sizeof( uiCreateGame_t ));

	uiCreateGame.menu.vidInitFunc = UI_CreateGame_Init;
	uiCreateGame.menu.keyFunc = UI_CreateGame_KeyFunc;

	StringConcat( uiCreateGame.hintText, "Map", MAPNAME_LENGTH );
	StringConcat( uiCreateGame.hintText, uiEmptyString, MAPNAME_LENGTH );
	StringConcat( uiCreateGame.hintText, "Title", TITLE_LENGTH );
	StringConcat( uiCreateGame.hintText, uiEmptyString, TITLE_LENGTH );

	uiCreateGame.background.generic.id = ID_BACKGROUND;
	uiCreateGame.background.generic.type = QMTYPE_BITMAP;
	uiCreateGame.background.generic.flags = QMF_INACTIVE;
	uiCreateGame.background.generic.x = 0;
	uiCreateGame.background.generic.y = 0;
	uiCreateGame.background.generic.width = 1024;
	uiCreateGame.background.generic.height = 768;
	uiCreateGame.background.pic = ART_BACKGROUND;

	uiCreateGame.banner.generic.id = ID_BANNER;
	uiCreateGame.banner.generic.type = QMTYPE_BITMAP;
	uiCreateGame.banner.generic.flags = QMF_INACTIVE|QMF_DRAW_ADDITIVE;
	uiCreateGame.banner.generic.x = UI_BANNER_POSX;
	uiCreateGame.banner.generic.y = UI_BANNER_POSY;
	uiCreateGame.banner.generic.width = UI_BANNER_WIDTH;
	uiCreateGame.banner.generic.height = UI_BANNER_HEIGHT;
	uiCreateGame.banner.pic = ART_BANNER;

	uiCreateGame.advOptions.generic.id = ID_ADVOPTIONS;
	uiCreateGame.advOptions.generic.type = QMTYPE_BM_BUTTON;
	uiCreateGame.advOptions.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_GRAYED;
	uiCreateGame.advOptions.generic.x = 72;
	uiCreateGame.advOptions.generic.y = 230;
	uiCreateGame.advOptions.generic.name = "Adv. Options";
	uiCreateGame.advOptions.generic.statusText = "Open the LAN game advanced options menu";
	uiCreateGame.advOptions.generic.callback = UI_CreateGame_Callback;

	UI_UtilSetupPicButton( &uiCreateGame.advOptions, PC_ADV_OPT );

	uiCreateGame.done.generic.id = ID_DONE;
	uiCreateGame.done.generic.type = QMTYPE_BM_BUTTON;
	uiCreateGame.done.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCreateGame.done.generic.x = 72;
	uiCreateGame.done.generic.y = 280;
	uiCreateGame.done.generic.name = "Ok";
	uiCreateGame.done.generic.statusText = "Start the multiplayer game";
	uiCreateGame.done.generic.callback = UI_CreateGame_Callback;

	UI_UtilSetupPicButton( &uiCreateGame.done, PC_OK );

	uiCreateGame.cancel.generic.id = ID_CANCEL;
	uiCreateGame.cancel.generic.type = QMTYPE_BM_BUTTON;
	uiCreateGame.cancel.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCreateGame.cancel.generic.x = 72;
	uiCreateGame.cancel.generic.y = 330;
	uiCreateGame.cancel.generic.name = "Cancel";
	uiCreateGame.cancel.generic.statusText = "Return to LAN game menu";
	uiCreateGame.cancel.generic.callback = UI_CreateGame_Callback;

	UI_UtilSetupPicButton( &uiCreateGame.cancel, PC_CANCEL );

	uiCreateGame.dedicatedServer.generic.id = ID_DEDICATED;
	uiCreateGame.dedicatedServer.generic.type = QMTYPE_CHECKBOX;
	uiCreateGame.dedicatedServer.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiCreateGame.dedicatedServer.generic.name = "Dedicated server";
	uiCreateGame.dedicatedServer.generic.x = 72;
	uiCreateGame.dedicatedServer.generic.y = 685;
	uiCreateGame.dedicatedServer.generic.callback = UI_CreateGame_Callback;
	uiCreateGame.dedicatedServer.generic.statusText = "faster, but you can't join the server from this machine";

	uiCreateGame.hltv.generic.id = ID_HLTV;
	uiCreateGame.hltv.generic.type = QMTYPE_CHECKBOX;
	uiCreateGame.hltv.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_ACT_ONRELEASE|QMF_MOUSEONLY|QMF_DROPSHADOW;
	uiCreateGame.hltv.generic.name = "HLTV";
	uiCreateGame.hltv.generic.x = 72;
	uiCreateGame.hltv.generic.y = 635;
	uiCreateGame.hltv.generic.callback = UI_CreateGame_Callback;
	uiCreateGame.hltv.generic.statusText = "enable hltv mode in multiplayer";

	uiCreateGame.hintMessage.generic.id = ID_TABLEHINT;
	uiCreateGame.hintMessage.generic.type = QMTYPE_ACTION;
	uiCreateGame.hintMessage.generic.flags = QMF_INACTIVE|QMF_SMALLFONT;
	uiCreateGame.hintMessage.generic.color = uiColorHelp;
	uiCreateGame.hintMessage.generic.name = uiCreateGame.hintText;
	uiCreateGame.hintMessage.generic.x = 590;
	uiCreateGame.hintMessage.generic.y = 215;

	uiCreateGame.mapsList.generic.id = ID_MAPLIST;
	uiCreateGame.mapsList.generic.type = QMTYPE_SCROLLLIST;
	uiCreateGame.mapsList.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_SMALLFONT;
	uiCreateGame.mapsList.generic.x = 590;
	uiCreateGame.mapsList.generic.y = 245;
	uiCreateGame.mapsList.generic.width = 410;
	uiCreateGame.mapsList.generic.height = 440;
	uiCreateGame.mapsList.generic.callback = UI_CreateGame_Callback;

	uiCreateGame.hostName.generic.id = ID_HOSTNAME;
	uiCreateGame.hostName.generic.type = QMTYPE_FIELD;
	uiCreateGame.hostName.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW;
	uiCreateGame.hostName.generic.name = "Server Name:";
	uiCreateGame.hostName.generic.x = 350;
	uiCreateGame.hostName.generic.y = 260;
	uiCreateGame.hostName.generic.width = 205;
	uiCreateGame.hostName.generic.height = 32;
	uiCreateGame.hostName.generic.callback = UI_CreateGame_Callback;
	uiCreateGame.hostName.maxLength = 16;
	strcpy( uiCreateGame.hostName.buffer, CVAR_GET_STRING( "hostname" ));

	uiCreateGame.maxClients.generic.id = ID_MAXCLIENTS;
	uiCreateGame.maxClients.generic.type = QMTYPE_FIELD;
	uiCreateGame.maxClients.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_NUMBERSONLY;
	uiCreateGame.maxClients.generic.name = "Max Players:";
	uiCreateGame.maxClients.generic.x = 350;
	uiCreateGame.maxClients.generic.y = 360;
	uiCreateGame.maxClients.generic.width = 205;
	uiCreateGame.maxClients.generic.height = 32;
	uiCreateGame.maxClients.maxLength = 3;

	if( CVAR_GET_FLOAT( "maxplayers" ) <= 1 )
		strcpy( uiCreateGame.maxClients.buffer, "8" );
	else sprintf( uiCreateGame.maxClients.buffer, "%i", (int)CVAR_GET_FLOAT( "maxplayers" ));

	uiCreateGame.password.generic.id = ID_PASSWORD;
	uiCreateGame.password.generic.type = QMTYPE_FIELD;
	uiCreateGame.password.generic.flags = QMF_CENTER_JUSTIFY|QMF_HIGHLIGHTIFFOCUS|QMF_DROPSHADOW|QMF_HIDEINPUT;
	uiCreateGame.password.generic.name = "Password:"******"Starting a new game will exit";
	uiCreateGame.dlgMessage1.generic.x = 248;
	uiCreateGame.dlgMessage1.generic.y = 280;

	uiCreateGame.dlgMessage2.generic.id = ID_MSGTEXT;
	uiCreateGame.dlgMessage2.generic.type = QMTYPE_ACTION;
	uiCreateGame.dlgMessage2.generic.flags = QMF_INACTIVE|QMF_HIDDEN|QMF_DROPSHADOW;
	uiCreateGame.dlgMessage2.generic.name = "any current game, OK to exit?";
	uiCreateGame.dlgMessage2.generic.x = 248;
	uiCreateGame.dlgMessage2.generic.y = 310;

	uiCreateGame.yes.generic.id = ID_YES;
	uiCreateGame.yes.generic.type = QMTYPE_BM_BUTTON;
	uiCreateGame.yes.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_HIDDEN|QMF_DROPSHADOW;
	uiCreateGame.yes.generic.name = "Ok";
	uiCreateGame.yes.generic.x = 380;
	uiCreateGame.yes.generic.y = 460;
	uiCreateGame.yes.generic.callback = UI_CreateGame_Callback;

	UI_UtilSetupPicButton( &uiCreateGame.yes, PC_OK );

	uiCreateGame.no.generic.id = ID_NO;
	uiCreateGame.no.generic.type = QMTYPE_BM_BUTTON;
	uiCreateGame.no.generic.flags = QMF_HIGHLIGHTIFFOCUS|QMF_HIDDEN|QMF_DROPSHADOW;
	uiCreateGame.no.generic.name = "Cancel";
	uiCreateGame.no.generic.x = 530;
	uiCreateGame.no.generic.y = 460;
	uiCreateGame.no.generic.callback = UI_CreateGame_Callback;

	UI_UtilSetupPicButton( &uiCreateGame.no, PC_CANCEL );

	UI_CreateGame_GetMapsList();

	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.background );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.banner );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.advOptions );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.done );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.cancel );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.maxClients );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.hostName );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.password );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.dedicatedServer );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.hltv );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.hintMessage );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.mapsList );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.msgBox );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.dlgMessage1 );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.dlgMessage2 );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.no );
	UI_AddItem( &uiCreateGame.menu, (void *)&uiCreateGame.yes );
}