Beispiel #1
0
// Builds the menu
void CMenuBloodBath::Build()
{
	// Make sure to call the base class
	CMenuBase::Build();

	CreateTitle("interface\\mainmenus\\bloodbath.pcx", IDS_MENU_TITLE_BLOODBATH, m_pMainMenus->GetTitlePos());		
	SetOptionPos(m_pMainMenus->GetOptionsPos());
	SetItemSpacing(0);

	AddLargeTextItemOption(IDS_MENU_BLOODBATH_JOIN, MENU_CMD_JOIN_GAME);
	AddLargeTextItemOption(IDS_MENU_BLOODBATH_HOST, MENU_CMD_HOST_GAME);
	AddLargeTextItemOption(IDS_MENU_BLOODBATH_CHARSETUP, MENU_CMD_CHARACTER_SETUP_RESVERIFY);
}
Beispiel #2
0
// Wrapper for adding a control with a string ID instead of an HSTRING
CLTGUITextItemCtrl *CMenuBase::AddLargeTextItemOption(int messageCode, DWORD dwCommandID)
{
	// Load the string
	HSTRING hString=DNULL;
	if (messageCode)
	{
		hString=m_pClientDE->FormatString(messageCode);
	}

	// Create the control
	CLTGUITextItemCtrl *pCtrl=AddLargeTextItemOption(hString, dwCommandID);
	
	// Free the string
	if (hString)
	{
		m_pClientDE->FreeString(hString);
	}

	return pCtrl;	
}