1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-21 00:19:29 +02:00

Changed configurable UI to match text refactoring:

- help.txt strings are now loaded as (hover, help) pairs
- renamed string pairs from translate.json to use (hover, help) form
- interface builder will always load label texts via unified ID
- interface builder way of loading buttons text has been changed:
- - field has been renamed "zelp" -> "help" for consistency
- - "help" field now only accepts string or object json type
This commit is contained in:
Ivan Savenko
2022-12-28 23:23:11 +02:00
parent 84493e1bff
commit 01d0cd4f7a
5 changed files with 75 additions and 89 deletions

View File

@ -448,7 +448,7 @@ CGeneralTextHandler::CGeneralTextHandler():
{
std::string first = parser.readString();
std::string second = parser.readString();
registerString("core.help." + std::to_string(index) + ".label", first);
registerString("core.help." + std::to_string(index) + ".hover", first);
registerString("core.help." + std::to_string(index) + ".help", second);
index += 1;
}
@ -631,7 +631,7 @@ LegacyHelpContainer::LegacyHelpContainer(CGeneralTextHandler & owner, std::strin
std::pair<std::string, std::string> LegacyHelpContainer::operator[](size_t index) const
{
return {
owner.translate(basePath + "." + std::to_string(index) + ".label"),
owner.translate(basePath + "." + std::to_string(index) + ".hover"),
owner.translate(basePath + "." + std::to_string(index) + ".help")
};
}