mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Win/loss condition texts use MetaString
This commit is contained in:
@ -1585,9 +1585,9 @@ void CPlayerInterface::gameOver(PlayerColor player, const EVictoryLossCheckResul
|
||||
{
|
||||
if (victoryLossCheckResult.loss() && cb->getPlayerStatus(playerID) == EPlayerStatus::INGAME) //enemy has lost
|
||||
{
|
||||
std::string str = CGI->generaltexth->translate(victoryLossCheckResult.messageToSelf);
|
||||
boost::algorithm::replace_first(str, "%s", CGI->generaltexth->capColors[player.getNum()]);
|
||||
showInfoDialog(str, std::vector<std::shared_ptr<CComponent>>(1, std::make_shared<CComponent>(CComponent::flag, player.getNum(), 0)));
|
||||
MetaString message = victoryLossCheckResult.messageToSelf;
|
||||
message.appendLocalString(EMetaText::COLOR, player.getNum());
|
||||
showInfoDialog(message.toString(), std::vector<std::shared_ptr<CComponent>>(1, std::make_shared<CComponent>(CComponent::flag, player.getNum(), 0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user