From: Alma Dejus Date: Mon, 11 Dec 2023 08:57:51 +0000 (+0100) Subject: cleanup in Scoreboard_menu.cc file, Alma och Malin X-Git-Url: https://gitweb.forssennils.se/?a=commitdiff_plain;h=dc6daac2ef68f474e5092626232910ea15b0c181;p=TDDC76_proj.git cleanup in Scoreboard_menu.cc file, Alma och Malin --- diff --git a/src/Scoreboard_menu.cc b/src/Scoreboard_menu.cc index 242502d..1495292 100644 --- a/src/Scoreboard_menu.cc +++ b/src/Scoreboard_menu.cc @@ -66,12 +66,14 @@ Scoreboard_menu::Scoreboard_menu(json& params) : // Scorelist // ----------------------------------------------------------------------- - std::ifstream highscore_file_r{data["game_constants"]["highscore_file"].get()}; + std::ifstream highscore_file_r{ + data["game_constants"]["highscore_file"].get()}; std::string csv_content{}; int index{0}; - for (std::string one_line; std::getline(highscore_file_r, one_line); csv_content += std::to_string(index) + ". " + one_line + "p \n") + for (std::string one_line; std::getline(highscore_file_r, one_line); + csv_content += std::to_string(index) + ". " + one_line + "p \n") { ++index; } @@ -117,8 +119,11 @@ void Scoreboard_menu::update(Context& context) } // mouse placement - mouse_r.setPosition(((S_WIDTH / 2) + 45 - 30*(menu_index - 1)), ((S_HEIGHT / 2) + 60 + 50*(menu_index - 1))); - mouse_l.setPosition(((S_WIDTH / 2) - 73 + 30*(menu_index - 1)), ((S_HEIGHT / 2) + 60 + 50*(menu_index - 1))); + mouse_r.setPosition(((S_WIDTH / 2) + 45 - 30*(menu_index - 1)), + ((S_HEIGHT / 2) + 60 + 50*(menu_index - 1))); + + mouse_l.setPosition(((S_WIDTH / 2) - 73 + 30*(menu_index - 1)), + ((S_HEIGHT / 2) + 60 + 50*(menu_index - 1))); }