//load textfont
- if ( !font.loadFromFile ("assets/fonts/ComicNeue-Bold.ttf") )
+ if ( !font.loadFromFile ("assets/fonts/Philosopher-Regular.ttf") )
throw std::invalid_argument ("Unable to load font");
//start
sf::FloatRect gbts {starttext.getGlobalBounds()};
starttext.setOrigin(gbts.width / 2, gbts.height / 2);
starttext.setPosition ((S_WIDTH) / 2, ((S_HEIGHT / 2) - 100));
- starttext.setFillColor(sf::Color::Black);
//score
scoreboardtext = sf::Text{ "Scoreboard", font, 24 };
sf::FloatRect gbtb {scoreboardtext.getGlobalBounds()};
scoreboardtext.setOrigin(gbtb.width / 2, gbtb.height / 2);
scoreboardtext.setPosition (S_WIDTH / 2, ((S_HEIGHT / 2) - 50));
- scoreboardtext.setFillColor(sf::Color::Black);
//quit
quittext = sf::Text{ "Quit", font, 24 };
sf::FloatRect gbtq {quittext.getGlobalBounds()};
quittext.setOrigin(gbtq.width / 2, gbtq.height / 2);
quittext.setPosition (S_WIDTH / 2, S_HEIGHT / 2);
- quittext.setFillColor(sf::Color::Black);
-
}
void Start_menu::update(Context& context)
scoreboardtext.setFillColor(sf::Color::Black);
quittext.setFillColor(sf::Color::Yellow);
}
-
-
+
+
// mouse placement
mouse_r.setPosition(((S_WIDTH / 2) + 60), ((S_HEIGHT / 2) - 115 + 50*(menu_index - 1)));
mouse_l.setPosition(((S_WIDTH / 2) - 58), ((S_HEIGHT / 2) - 68 + 50*(menu_index - 1)));
else if(menu_index == 2)
{
- std::cout << "det funka att se poäng" << std::endl; // lägg in state för scoreboard sen
menu_index = 1;
}
else if(menu_index == 3)
{
exit_game = true;
- std::cout << "det funka att stänga av" << std::endl;
menu_index = 1;
}
break;
case sf::Keyboard::Up:
- std::cout << "det funka att trycka på upp" << std::endl;
if(menu_index == 1)
{
break;
break;
case sf::Keyboard::Down:
- std::cout << "det funka att trycka på ned" << std::endl;
if(menu_index == 3)
{
break;