1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Bit refactoring

This commit is contained in:
nordsoft 2023-04-29 19:08:42 +04:00 committed by Nordsoft91
parent 68fa7aaf35
commit 07b2052679
2 changed files with 5 additions and 2 deletions

View File

@ -703,7 +703,7 @@ CMarketplaceWindow::CMarketplaceWindow(const IMarket * Market, const CGHeroInsta
}
else if(auto * o = dynamic_cast<const CGMarket *>(market))
{
title = o->title.empty() ? o->getObjectName() : o->title;
title = o->title;
}
titleLabel = std::make_shared<CLabel>(300, 27, FONT_BIG, ETextAlignment::CENTER, Colors::YELLOW, title);

View File

@ -335,7 +335,10 @@ CGObjectInstance * MarketInstanceConstructor::create(std::shared_ptr<const Objec
if(marketEfficacy >= 0)
market->marketEfficacy = marketEfficacy;
market->title = VLC->generaltexth->translate(title);
market->title = market->getObjectName();
if(!title.empty())
market->title = VLC->generaltexth->translate(title);
market->speech = VLC->generaltexth->translate(speech);
return market;