コード例 #1
0
ファイル: sppostgame.c プロジェクト: icanhas/yantar
static void
Init(void)
{
	postgame.menu.wrapAround		= qtrue;
	postgame.menu.key			= MenuKey;
	postgame.menu.draw			= MenuDraw;
	postgame.ignoreKeysTime			= uis.realtime + 1500;

	UI_SPPostgameMenu_Cache();

	postgame.item_menu.generic.type		= MTYPE_BITMAP;
	postgame.item_menu.generic.name		= ART_MENU0;
	postgame.item_menu.generic.flags	= QMF_LEFT_JUSTIFY 
		| QMF_PULSEIFFOCUS | QMF_INACTIVE;
	postgame.item_menu.generic.x		= 0;
	postgame.item_menu.generic.y		= 480-64;
	postgame.item_menu.generic.callback = MenuEvent;
	postgame.item_menu.generic.id		= ID_MENU;
	postgame.item_menu.width		= 128;
	postgame.item_menu.height		= 64;
	postgame.item_menu.focuspic		= ART_MENU1;

	postgame.item_again.generic.type	= MTYPE_BITMAP;
	postgame.item_again.generic.name	= ART_REPLAY0;
	postgame.item_again.generic.flags	= QMF_CENTER_JUSTIFY
		| QMF_PULSEIFFOCUS | QMF_INACTIVE;
	postgame.item_again.generic.x		= 320;
	postgame.item_again.generic.y		= 480-64;
	postgame.item_again.generic.callback = AgainEvent;
	postgame.item_again.generic.id		= ID_AGAIN;
	postgame.item_again.width		= 128;
	postgame.item_again.height		= 64;
	postgame.item_again.focuspic		= ART_REPLAY1;

	postgame.item_next.generic.type		= MTYPE_BITMAP;
	postgame.item_next.generic.name		= ART_NEXT0;
	postgame.item_next.generic.flags	= QMF_RIGHT_JUSTIFY
		| QMF_PULSEIFFOCUS | QMF_INACTIVE;
	postgame.item_next.generic.x		= 640;
	postgame.item_next.generic.y		= 480-64;
	postgame.item_next.generic.callback = NextEvent;
	postgame.item_next.generic.id		= ID_NEXT;
	postgame.item_next.width		= 128;
	postgame.item_next.height		= 64;
	postgame.item_next.focuspic		= ART_NEXT1;

	Menu_AddItem(&postgame.menu, (void*)&postgame.item_menu);
	Menu_AddItem(&postgame.menu, (void*)&postgame.item_again);
	Menu_AddItem(&postgame.menu, (void*)&postgame.item_next);
}
コード例 #2
0
ファイル: ui_sppostgame.c プロジェクト: gitter-badger/rpgxEF
/*
=================
UI_SPPostgameMenu_Init
=================
Sets up the exact look of the menu buttons at the bottom
*/
static void UI_SPPostgameMenu_Init( void ) {

	postgameMenuInfo.menu.wrapAround	= qtrue;
	postgameMenuInfo.menu.key			= UI_SPPostgameMenu_MenuKey;
//	postgameMenuInfo.menu.draw			= UI_SPPostgameMenu_MenuDraw;
	postgameMenuInfo.ignoreKeysTime		= uis.realtime + 1500;

	UI_SPPostgameMenu_Cache();

	postgameMenuInfo.item_menu.generic.type			= MTYPE_BITMAP;
	postgameMenuInfo.item_menu.generic.name			= BUTTON_GRAPHIC_LONGRIGHT;
	postgameMenuInfo.item_menu.generic.flags		= QMF_HIGHLIGHT_IF_FOCUS;
	postgameMenuInfo.item_menu.generic.x			= 33;
	postgameMenuInfo.item_menu.generic.y			= 446;
	postgameMenuInfo.item_menu.generic.callback		= UI_SPPostgameMenu_MenuEvent;
	postgameMenuInfo.item_menu.generic.id			= ID_MENU;
	postgameMenuInfo.item_menu.width				= MENU_BUTTON_MED_WIDTH;
	postgameMenuInfo.item_menu.height				= MENU_BUTTON_MED_HEIGHT;
	postgameMenuInfo.item_menu.color				= CT_DKPURPLE1;
	postgameMenuInfo.item_menu.color2				= CT_LTPURPLE1;
	postgameMenuInfo.item_menu.textX				= 5;
	postgameMenuInfo.item_menu.textY				= 1;
	postgameMenuInfo.item_menu.textEnum				= MBT_RETURNMENU;
	postgameMenuInfo.item_menu.textcolor			= CT_BLACK;
	postgameMenuInfo.item_menu.textcolor2			= CT_WHITE;

	postgameMenuInfo.item_again.generic.type		= MTYPE_BITMAP;
	postgameMenuInfo.item_again.generic.name		= BUTTON_GRAPHIC_LONGRIGHT;
	postgameMenuInfo.item_again.generic.flags		= QMF_HIGHLIGHT_IF_FOCUS;
	postgameMenuInfo.item_again.generic.x			= 256;
	postgameMenuInfo.item_again.generic.y			= 446;
	postgameMenuInfo.item_again.generic.callback	= UI_SPPostgameMenu_AgainEvent;
	postgameMenuInfo.item_again.generic.id			= ID_AGAIN;
	postgameMenuInfo.item_again.width				= MENU_BUTTON_MED_WIDTH;
	postgameMenuInfo.item_again.height				= MENU_BUTTON_MED_HEIGHT;
	postgameMenuInfo.item_again.color				= CT_DKPURPLE1;
	postgameMenuInfo.item_again.color2				= CT_LTPURPLE1;
	postgameMenuInfo.item_again.textX				= 5;
	postgameMenuInfo.item_again.textY				= 1;
	postgameMenuInfo.item_again.textEnum			= MBT_REPLAY;
	postgameMenuInfo.item_again.textcolor			= CT_BLACK;
	postgameMenuInfo.item_again.textcolor2			= CT_WHITE;

	postgameMenuInfo.item_next.generic.type			= MTYPE_BITMAP;
	postgameMenuInfo.item_next.generic.name			= BUTTON_GRAPHIC_LONGRIGHT;
	postgameMenuInfo.item_next.generic.flags		= QMF_HIGHLIGHT_IF_FOCUS;
	postgameMenuInfo.item_next.generic.x			= 477;
	postgameMenuInfo.item_next.generic.y			= 446;
	postgameMenuInfo.item_next.generic.callback		= UI_SPPostgameMenu_NextEvent;
	postgameMenuInfo.item_next.generic.id			= ID_NEXT;
	postgameMenuInfo.item_next.width				= MENU_BUTTON_MED_WIDTH;
	postgameMenuInfo.item_next.height				= MENU_BUTTON_MED_HEIGHT;
	postgameMenuInfo.item_next.color				= CT_DKPURPLE1;
	postgameMenuInfo.item_next.color2				= CT_LTPURPLE1;
	postgameMenuInfo.item_next.textX				= 5;
	postgameMenuInfo.item_next.textY				= 1;
	postgameMenuInfo.item_next.textEnum				= MBT_NEXTMATCH;
	postgameMenuInfo.item_next.textcolor			= CT_BLACK;
	postgameMenuInfo.item_next.textcolor2			= CT_WHITE;


	Menu_AddItem( &postgameMenuInfo.menu, ( void * )&postgameMenuInfo.item_menu );
	Menu_AddItem( &postgameMenuInfo.menu, ( void * )&postgameMenuInfo.item_next );
	Menu_AddItem( &postgameMenuInfo.menu, ( void * )&postgameMenuInfo.item_again );
}