1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-27 22:49:25 +02:00

Renamed MetaString methods to more logical names

This commit is contained in:
Ivan Savenko
2023-06-18 12:18:25 +03:00
parent 2636a0dcc3
commit 56d69e790b
32 changed files with 592 additions and 557 deletions

View File

@@ -270,14 +270,14 @@ void CPlayerInterface::acceptTurn()
auto daysWithoutCastle = optDaysWithoutCastle.value();
if (daysWithoutCastle < 6)
{
text.addTxt(MetaString::ARRAY_TXT,128); //%s, you only have %d days left to capture a town or you will be banished from this land.
text.addReplacement(MetaString::COLOR, playerColor.getNum());
text.addReplacement(7 - daysWithoutCastle);
text.appendLocalString(EMetaText::ARRAY_TXT,128); //%s, you only have %d days left to capture a town or you will be banished from this land.
text.replaceLocalString(EMetaText::COLOR, playerColor.getNum());
text.replaceNumber(7 - daysWithoutCastle);
}
else if (daysWithoutCastle == 6)
{
text.addTxt(MetaString::ARRAY_TXT,129); //%s, this is your last day to capture a town or you will be banished from this land.
text.addReplacement(MetaString::COLOR, playerColor.getNum());
text.appendLocalString(EMetaText::ARRAY_TXT,129); //%s, this is your last day to capture a town or you will be banished from this land.
text.replaceLocalString(EMetaText::COLOR, playerColor.getNum());
}
showInfoDialogAndWait(components, text);
@@ -1048,8 +1048,7 @@ void CPlayerInterface::showInfoDialogAndWait(std::vector<Component> & components
{
EVENT_HANDLER_CALLED_BY_CLIENT;
std::string str;
text.toString(str);
std::string str = text.toString();
showInfoDialog(EInfoWindowMode::MODAL, str, components, 0);
waitWhileDialog();