diff --git a/data/language/en-GB.txt b/data/language/en-GB.txt index 487806c89f..636b35a5b9 100644 --- a/data/language/en-GB.txt +++ b/data/language/en-GB.txt @@ -3702,6 +3702,11 @@ STR_6627 :Track speed too high! STR_6628 :Can only be placed on path edges! STR_6629 :Align toolbar buttons horizontally centred STR_6630 :This setting will align the toolbar buttons horizontally in the centre of the screen. The traditional way of aligning them is in the left and right corner. +STR_6631 :Loading... +STR_6632 :Checking object files... +STR_6633 :Checking scenario files... +STR_6634 :Checking track design files... +STR_6635 :Checking asset packs... ############# # Scenarios # diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 401c80514a..6784bc13d1 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -505,18 +505,24 @@ namespace OpenRCT2 ContextInit(); _preloaderScene->AddJob([&]() { - _objectRepository->LoadOrConstruct(_localisationService->GetCurrentLanguage()); + auto currentLanguage = _localisationService->GetCurrentLanguage(); + + _preloaderScene->UpdateCaption(STR_CHECKING_OBJECT_FILES); + _objectRepository->LoadOrConstruct(currentLanguage); if (!gOpenRCT2Headless) { + _preloaderScene->UpdateCaption(STR_CHECKING_ASSET_PACKS); _assetPackManager->Scan(); _assetPackManager->LoadEnabledAssetPacks(); _assetPackManager->Reload(); } - _trackDesignRepository->Scan(_localisationService->GetCurrentLanguage()); + _preloaderScene->UpdateCaption(STR_CHECKING_TRACK_DESIGN_FILES); + _trackDesignRepository->Scan(currentLanguage); - _scenarioRepository->Scan(_localisationService->GetCurrentLanguage()); + _preloaderScene->UpdateCaption(STR_CHECKING_SCENARIO_FILES); + _scenarioRepository->Scan(currentLanguage); }); TitleSequenceManager::Scan(); diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 82f39e674e..320e318bd4 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -3855,6 +3855,12 @@ enum : uint16_t STR_OPTIONS_TOOLBAR_BUTTONS_CENTRED = 6629, STR_OPTIONS_TOOLBAR_BUTTONS_CENTRED_TIP = 6630, + STR_LOADING_GENERIC = 6631, + STR_CHECKING_OBJECT_FILES = 6632, + STR_CHECKING_SCENARIO_FILES = 6633, + STR_CHECKING_TRACK_DESIGN_FILES = 6634, + STR_CHECKING_ASSET_PACKS = 6635, + // Have to include resource strings (from scenarios and objects) for the time being now that language is partially working /* MAX_STR_COUNT = 32768 */ // MAX_STR_COUNT - upper limit for number of strings, not the current count strings }; diff --git a/src/openrct2/scenes/preloader/PreloaderScene.cpp b/src/openrct2/scenes/preloader/PreloaderScene.cpp index 969aaf3541..5e38c59803 100644 --- a/src/openrct2/scenes/preloader/PreloaderScene.cpp +++ b/src/openrct2/scenes/preloader/PreloaderScene.cpp @@ -16,6 +16,7 @@ #include "../../audio/audio.h" #include "../../interface/Viewport.h" #include "../../interface/Window.h" +#include "../../localisation/LocalisationService.h" #include "../../localisation/StringIds.h" #include "../../windows/Intent.h" @@ -37,9 +38,7 @@ void PreloaderScene::Load() ContextOpenWindow(WindowClass::MainWindow); WindowResizeGui(ContextGetWidth(), ContextGetHeight()); - auto intent = Intent(WindowClass::NetworkStatus); - intent.PutExtra(INTENT_EXTRA_MESSAGE, std::string{ "Loading..." }); - ContextOpenIntent(&intent); + UpdateCaption(STR_LOADING_GENERIC); LOG_VERBOSE("PreloaderScene::Load() finished"); } @@ -62,6 +61,15 @@ void PreloaderScene::Tick() } } +void PreloaderScene::UpdateCaption(StringId stringId) +{ + LOG_VERBOSE("PreloaderScene::UpdateCaption()"); + + auto intent = Intent(WindowClass::NetworkStatus); + intent.PutExtra(INTENT_EXTRA_MESSAGE, GetContext().GetLocalisationService().GetString(stringId)); + ContextOpenIntent(&intent); +}; + void PreloaderScene::Stop() { Audio::StopAll(); diff --git a/src/openrct2/scenes/preloader/PreloaderScene.h b/src/openrct2/scenes/preloader/PreloaderScene.h index 09324df707..f533e4443e 100644 --- a/src/openrct2/scenes/preloader/PreloaderScene.h +++ b/src/openrct2/scenes/preloader/PreloaderScene.h @@ -23,6 +23,7 @@ namespace OpenRCT2 void Load() override; void Tick() override; void Stop() override; + void UpdateCaption(StringId stringId); void AddJob(const std::function& fn) { _jobs.AddTask(fn);