Skip to content

Commit

Permalink
Merge branch 'the-merge' of github.com:X-R-G-B/R-Bus into the-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
TTENSHII committed Nov 5, 2023
2 parents 272b3d7 + 5c12165 commit 5046c4f
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions src/Client/Systems/Menus/Menu/MenuSystems.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ namespace Systems {
Nitwork::NitworkClient::getInstance().disconnectLobby();
Scene::SceneManager::getInstance().changeScene(SELECT_LOBBY);
break;
case LOADING_SCREEN:
Scene::SceneManager::getInstance().stop();
break;
case LOADING_SCREEN: Scene::SceneManager::getInstance().stop(); break;
}
}
}
Expand Down Expand Up @@ -260,11 +258,13 @@ namespace Systems {
std::string textKeyword = "loading";
Json &json = Json::getInstance();

nlohmann::json jsonData = json.getDataByJsonType<nlohmann::json>(ResourcesManager::getPathByJsonType(JsonType::MENU), "background");
nlohmann::json jsonData = json.getDataByJsonType<nlohmann::json>(
ResourcesManager::getPathByJsonType(JsonType::MENU),
"background");
std::string path = json.getDataFromJson<std::string>(jsonData, "imgPath");
float width = json.getDataFromJson<float>(jsonData, "width");
float height = json.getDataFromJson<float>(jsonData, "height");
auto background = Raylib::Sprite::fromFile(path, width, height, id);
float width = json.getDataFromJson<float>(jsonData, "width");
float height = json.getDataFromJson<float>(jsonData, "height");
auto background = Raylib::Sprite::fromFile(path, width, height, id);
Registry::getInstance().getComponents<Raylib::SpriteShared>().insertBack(background);
Registry::getInstance().setToFrontLayers(id);
Registry::getInstance().getComponents<Types::Position>().insertBack(position);
Expand All @@ -280,9 +280,9 @@ namespace Systems {

static void updateText(std::size_t size, std::size_t loadedTexture)
{
std::size_t percentage = (loadedTexture * 100) / size;
std::string textKeyword = "loading";
auto &arrText = Registry::getInstance().getComponents<Raylib::TextShared>();
std::size_t percentage = (loadedTexture * 100) / size;
std::string textKeyword = "loading";
auto &arrText = Registry::getInstance().getComponents<Raylib::TextShared>();
auto ids = Registry::getInstance().getEntitiesByComponents({typeid(Raylib::TextShared)});

for (auto id : ids) {
Expand Down Expand Up @@ -318,7 +318,6 @@ namespace Systems {
initLoadingScreen();
step++;
}

}

void initSceneGame(std::size_t managerId, std::size_t systemId)
Expand Down

0 comments on commit 5046c4f

Please sign in to comment.