cleanup in Scoreboard_menu.cc file, Alma och Malin
authorAlma Dejus <almde515@student.liu.se>
Mon, 11 Dec 2023 08:57:51 +0000 (09:57 +0100)
committerAlma Dejus <almde515@student.liu.se>
Mon, 11 Dec 2023 08:57:51 +0000 (09:57 +0100)
src/Scoreboard_menu.cc

index 242502d114430b40fc87118b3ffb75022030ae2d..14952928ad7ca9f02edc8fd1b80653aedebbd903 100644 (file)
@@ -66,12 +66,14 @@ Scoreboard_menu::Scoreboard_menu(json& params) :
 
     // Scorelist
     // -----------------------------------------------------------------------
-    std::ifstream highscore_file_r{data["game_constants"]["highscore_file"].get<std::string>()};
+    std::ifstream highscore_file_r{
+        data["game_constants"]["highscore_file"].get<std::string>()};
 
     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))); 
 }