Skip to content

Commit

Permalink
Merge branch 'feature/RB-161-button-create-main-server' of github.com…
Browse files Browse the repository at this point in the history
…:X-R-G-B/R-Bus into feature/RB-161-button-create-main-server
  • Loading branch information
KitetsuK committed Nov 5, 2023
2 parents 06044ef + 552ac83 commit a1fda4e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
26 changes: 15 additions & 11 deletions src/Client/Systems/Menus/Menu/ButtonCallbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,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<Raylib::TextShared>();
auto arrParallax = Registry::getInstance().getComponents<Types::Parallax>();
Expand All @@ -225,20 +224,25 @@ 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) {
Logger::info(
"parallax name"
+ std::to_string(
Systems::Parallax::ActualParallax::getInstance()._actualParallaxNbr));
std::string paraName =
"PARALLAX_"
+ std::to_string(
Expand Down
4 changes: 0 additions & 4 deletions src/Client/Systems/Menus/Menu/MenuSystems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit a1fda4e

Please sign in to comment.