working on refactoring

This commit is contained in:
Vladislav Khorev committed 2026-10-24 22:37:20 +06:00
1 parent 9b71ee447a
commit d5ef126264
12 files changed
+309 -219

No files matched your search

+9 -3
View File
@@ -326,9 +326,14 @@ namespace FRG {
loadSavedGameScreenRoot = loadLocalizedUi("resources/w/ui/screen_load.json", zipFile);
campaignScreenRoot = loadLocalizedUi("resources/w/ui/screen_campaign.json", zipFile);
loadingScreenRoots_.clear();
auto preloadLoadingScreen = [this, &zipFile](const std::string& path) {
if (!path.empty() && !loadingScreenRoots_.count(path))
loadingScreenRoots_[path] = loadLocalizedUi(path, zipFile);
};
for (const CampaignConfig& campaign : CampaignRegistry::instance().all()) {
if (!loadingScreenRoots_.count(campaign.loadingScreenPath))
loadingScreenRoots_[campaign.loadingScreenPath] = loadLocalizedUi(campaign.loadingScreenPath, zipFile);
preloadLoadingScreen(campaign.loadingScreenPath);
for (const LocationConfig& location : campaign.locations)
preloadLoadingScreen(location.loadingScreenPath);
}
saveGameScreenRoot = loadLocalizedUi("resources/w/ui/screen_save.json", zipFile);
}
@@ -1535,6 +1540,7 @@ namespace FRG {
});
uiManager.setButtonCallback("mapGo", [this](const std::string&) {
gameState_.tutorialNeedOpenTaxiScreen = false;
gameState_.tutorialTaxiHintDone = true;
if (gameState_.taxiIsCalled == false)
{
@@ -1693,7 +1699,7 @@ namespace FRG {
void MenuManager::tutorialShowTaxiHint()
{
logger() << "tutorialShowTaxiHint" << std::endl;
if (!gameState_.isTutorialActive()) return;
if (!gameState_.isTutorialActive() || gameState_.tutorialTaxiHintDone) return;
gameState_.tutorialNeedOpenTaxiScreen = true; // cleared when the taxi is ordered
refreshHudVisibility();
}