#include "States.h"
#include "Context.h"
#include "constants.h"
+
+
// Start menu --------------------------------------------
-Start_menu::Start_menu() : texture{}, texture2{}, sprite{}, mouse_l{}, mouse_r{}, start_game{false}, exit_game{false},
- scoreboard{false}, menu_index{1}, starttext{}, scoreboardtext{}, quittext{}, font{}
+Start_menu::Start_menu() : texture{}, texture2{}, sprite{}, mouse_l{}, mouse_r{}, starttext{}, scoreboardtext{},
+ quittext{}, font{}, start_game{false}, exit_game{false}, scoreboard{false}, menu_index{1}
{
//sprite
texture.loadFromFile("assets/meny_bild.png");
break;
}
- else;
+ else
{
menu_index -= 1;
}
break;
}
- else;
+ else
{
menu_index += 1;
}
// Pause menu --------------------------------------------
-Pause_menu::Pause_menu() : texture{}, texture2{}, sprite{}, resume_game{false}, menu{false}, exit_game{false},
- resumetext{}, startmenutext{}, quittext{}, mouse_r{}, mouse_l{}, font{}, menu_index{1}
+Pause_menu::Pause_menu() : texture{}, texture2{}, sprite{}, mouse_l{}, mouse_r{}, resumetext{}, startmenutext{},
+ quittext{}, font{}, resume_game{false}, exit_game{false}, menu{false}, menu_index{1}
{
texture.loadFromFile("assets/Pause_bild.png");
sprite.setTexture(texture);;
// load textfont
if ( !font.loadFromFile ("assets/fonts/Philosopher-Regular.ttf") )
- throw std::invalid_argument ("Unable to load font");
+ {
+ throw std::invalid_argument ("Unable to load font");
+ }
// Resume text
break;
}
- else;
+ else
{
menu_index -= 1;
}
break;
}
- else;
+ else
{
menu_index += 1;
}
// Scoreboard menu --------------------------------------------
-Scoreboard_menu::Scoreboard_menu() : /*texture{},*/ texture2{}, /*sprite{},*/ menu{false}, exit_game{false},
- startmenutext{}, quittext{}, mouse_r{}, mouse_l{}, font{}, menu_index{1}
+Scoreboard_menu::Scoreboard_menu() : /*texture{},*/ texture2{}, /*sprite{},*/ mouse_l{}, mouse_r{}, startmenutext{},
+ quittext{}, font{}, exit_game{false}, menu{false}, menu_index{1}
{
// Add background later
/*
break;
}
- else;
+ else
{
menu_index -= 1;
}
break;
}
- else;
+ else
{
menu_index += 1;
}
// GameOver menu --------------------------------------------
-GameOver_menu::GameOver_menu() : /*texture{},*/ texture2{}, /*sprite{},*/ menu{false}, exit_game{false},
- startmenutext{}, quittext{}, mouse_r{}, mouse_l{}, font{}, menu_index{1}
+GameOver_menu::GameOver_menu() : /*texture{},*/ texture2{}, /*sprite{},*/ mouse_l{}, mouse_r{}, startmenutext{},
+ quittext{}, font{}, exit_game{false}, menu{false}, menu_index{1}
{
// Add background later
/*
break;
}
- else;
+ else
{
menu_index -= 1;
}
break;
}
- else;
+ else
{
menu_index += 1;
}