From 773c021f26971aec48a8449c4bbb64aa6644998e Mon Sep 17 00:00:00 2001 From: Github Actions Date: Sun, 5 Nov 2023 20:57:11 +0000 Subject: [PATCH 1/2] FORMAT-AUTO: automatic format on pull request #142 --- .../Systems/Menus/Menu/ButtonCallbacks.cpp | 22 +++++++++++++------ 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp b/src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp index aae16487..e8e0ce37 100644 --- a/src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp +++ b/src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp @@ -199,8 +199,7 @@ namespace Menu { void changeParallax() { - - auto ids = Registry::getInstance().getEntitiesByComponents({typeid(Raylib::TextShared)}); + auto ids = Registry::getInstance().getEntitiesByComponents({typeid(Raylib::TextShared)}); auto idsPara = Registry::getInstance().getEntitiesByComponents({typeid(Types::Parallax)}); auto arrText = Registry::getInstance().getComponents(); auto arrParallax = Registry::getInstance().getComponents(); @@ -210,13 +209,22 @@ namespace Menu { } else { Systems::Parallax::ActualParallax::getInstance()._actualParallaxNbr = 1; } - for (auto id: idsPara) { + for (auto id : idsPara) { Registry::getInstance().addToRemove(id); } - switch(Systems::Parallax::ActualParallax::getInstance().getActualParallaxType()) { - case JsonType::DEFAULT_PARALLAX: Systems::Parallax::ActualParallax::getInstance().setActualParralaxType(JsonType::PARALLAX_2); break; - case JsonType::PARALLAX_2: Systems::Parallax::ActualParallax::getInstance().setActualParralaxType(JsonType::DEFAULT_PARALLAX); break; - default: Systems::Parallax::ActualParallax::getInstance().setActualParralaxType(JsonType::DEFAULT_PARALLAX); break; + switch (Systems::Parallax::ActualParallax::getInstance().getActualParallaxType()) { + case JsonType::DEFAULT_PARALLAX: + Systems::Parallax::ActualParallax::getInstance().setActualParralaxType( + JsonType::PARALLAX_2); + break; + case JsonType::PARALLAX_2: + Systems::Parallax::ActualParallax::getInstance().setActualParralaxType( + JsonType::DEFAULT_PARALLAX); + break; + default: + Systems::Parallax::ActualParallax::getInstance().setActualParralaxType( + JsonType::DEFAULT_PARALLAX); + break; } for (auto id : ids) { if (arrText[id]->getCurrentText().find("PARALLAX") != std::string::npos) { From 2c301367cccdced331396bc479473098e7188c01 Mon Sep 17 00:00:00 2001 From: Xavier Mitault Date: Sun, 5 Nov 2023 21:02:21 +0000 Subject: [PATCH 2/2] CLIENT: Remove log unused PATCH --- src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp | 4 ---- src/Client/Systems/Menus/Menu/MenuSystems.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp b/src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp index aae16487..7a71773b 100644 --- a/src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp +++ b/src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp @@ -220,10 +220,6 @@ namespace Menu { } for (auto id : ids) { if (arrText[id]->getCurrentText().find("PARALLAX") != std::string::npos) { - Logger::info( - "parallax name" - + std::to_string( - Systems::Parallax::ActualParallax::getInstance()._actualParallaxNbr)); std::string paraName = "PARALLAX_" + std::to_string( diff --git a/src/Client/Systems/Menus/Menu/MenuSystems.cpp b/src/Client/Systems/Menus/Menu/MenuSystems.cpp index 195ee9ce..d31e9044 100644 --- a/src/Client/Systems/Menus/Menu/MenuSystems.cpp +++ b/src/Client/Systems/Menus/Menu/MenuSystems.cpp @@ -322,10 +322,6 @@ namespace Systems { for (auto id : ids) { if (arrText[id]->getCurrentText().find("PARALLAX") != std::string::npos) { - Logger::info( - "parallax name" - + std::to_string( - Systems::Parallax::ActualParallax::getInstance()._actualParallaxNbr)); std::string paraName = "PARALLAX_" + std::to_string(