Exemplo n.º 1
0
Menu *MenuFactory::CreateTempBattleMenu() const
{
	Menu *menu = new Menu();
	MenuItem *item;

	item = new MenuItem();
	item->SetText("Choose Skill");
	menu->AddMenuItem(item);

	item = new MenuItem();
	item->SetText("Forfeit Match");
	menu->AddMenuItem(item);

	menu->SetPosition(50, GameManager::GetInstance().GetResolution().y - menu->GetDimensions().y - 50);

	return menu;
}
Exemplo n.º 2
0
Menu *MenuFactory::CreateMainMenu() const
{
	Menu *menu = new Menu();
	MenuItem *item;

	item = new MenuItem();
	item->SetText("Start Game");
	menu->AddMenuItem(item);

	item = new MenuItem();
	item->SetText("Toggle Audio");
	menu->AddMenuItem(item);

	item = new MenuItem();
	item->SetText("Quit Game");
	menu->AddMenuItem(item);

	menu->SetPosition(50, GameManager::GetInstance().GetResolution().y - menu->GetDimensions().y - 50);

	return menu;
}
Exemplo n.º 3
0
Menu *MenuFactory::CreateChooseAIDifficultyMenu(const sf::Vector2f &primaryDimensions) const
{
	Menu *menu = new Menu();
	MenuItem *item;

	for (auto &name : AIAvatar::DifficultyNames)
	{
		item = new MenuItem();
		item->SetText(name);
		menu->AddMenuItem(item);
	}
	
	item = new MenuItem();
	item->SetText("Back");
	menu->AddMenuItem(item);

	menu->SetPosition(75 + primaryDimensions.x, GameManager::GetInstance().GetResolution().y - menu->GetDimensions().y - 50);

	return menu;
}
Exemplo n.º 4
0
Menu *MenuFactory::CreateChooseClassMenu(const sf::Vector2f &primaryDimensions) const
{
	Menu *menu = new Menu();
	MenuItem *item;

	item = new MenuItem();
	item->SetText(AvatarClass::GetClassName(ClassType::Warrior));
	menu->AddMenuItem(item);

	item = new MenuItem();
	item->SetText(AvatarClass::GetClassName(ClassType::Rogue));
	menu->AddMenuItem(item);

	item = new MenuItem();
	item->SetText(AvatarClass::GetClassName(ClassType::Mage));
	menu->AddMenuItem(item);

	item = new MenuItem();
	item->SetText("Back");
	menu->AddMenuItem(item);

	menu->SetPosition(75 + primaryDimensions.x, GameManager::GetInstance().GetResolution().y - menu->GetDimensions().y - 50);

	return menu;
}
Exemplo n.º 5
0
Menu *MenuFactory::CreateTempSkillsMenu(const sf::Vector2f &battleDimensions, const Skill *skillArray) const
{
	Menu *menu = new Menu();
	MenuItem *item;

	item = new MenuItem();
	item->SetText(skillArray[0].name);
	menu->AddMenuItem(item);

	item = new MenuItem();
	item->SetText(skillArray[1].name);
	menu->AddMenuItem(item);

	item = new MenuItem();
	item->SetText(skillArray[2].name);
	menu->AddMenuItem(item);

	menu->SetPosition(75 + battleDimensions.x, GameManager::GetInstance().GetResolution().y - menu->GetDimensions().y - 50);

	return menu;
}