Working on translations

This commit is contained in:
Vladislav Khorev committed 2026-07-07 11:24:21 +03:00
1 parent 9d8ca865c7
commit e2d9105b02
18 files changed
+271 -88

No files matched your search

+8
View File
@@ -1,6 +1,7 @@
#include "MenuManager.h"
#include "Game.h"
#include "Localization.h"
#include "items/ItemRegistry.h"
#include "render/TextRenderer.h"
#include "utils/Utils.h"
#include <iostream>
@@ -414,12 +415,19 @@ namespace ZL {
uiManager.setTextButtonCallback("languageRussianButton", [this](const std::string&) {
ZL::g_currentLanguage = ZL::Language::Russian;
reloadLocalizedGameContent();
});
uiManager.setTextButtonCallback("languageEnglishButton", [this](const std::string&) {
ZL::g_currentLanguage = ZL::Language::English;
reloadLocalizedGameContent();
});
}
void MenuManager::reloadLocalizedGameContent() {
ItemRegistry::instance().loadFromJson("resources/config/items.json", CONST_ZIP_FILE);
gameState_.questJournal.reloadDefinitionsPreservingState("resources/config/quests.json", CONST_ZIP_FILE);
}
void MenuManager::showLoadGameScreen()
{
uiManager.pushMenuFromSavedRoot(loadSavedGameScreenRoot);