mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
improvements for non quadratic maps
This commit is contained in:
@ -123,6 +123,7 @@ InfoCard::InfoCard()
|
||||
pos.y += 6;
|
||||
|
||||
labelSaveDate = std::make_shared<CLabel>(310, 38, FONT_SMALL, ETextAlignment::BOTTOMRIGHT, Colors::WHITE);
|
||||
labelMapSize = std::make_shared<CLabel>(332, 56, FONT_TINY, ETextAlignment::CENTER, Colors::WHITE);
|
||||
mapName = std::make_shared<CLabel>(26, 39, FONT_BIG, ETextAlignment::TOPLEFT, Colors::YELLOW);
|
||||
Rect descriptionRect(26, 149, 320, 115);
|
||||
mapDescription = std::make_shared<CTextBox>("", descriptionRect, 1);
|
||||
@ -185,6 +186,7 @@ InfoCard::InfoCard()
|
||||
void InfoCard::disableLabelRedraws()
|
||||
{
|
||||
labelSaveDate->setAutoRedraw(false);
|
||||
labelMapSize->setAutoRedraw(false);
|
||||
mapName->setAutoRedraw(false);
|
||||
mapDescription->label->setAutoRedraw(false);
|
||||
labelVictoryConditionText->setAutoRedraw(false);
|
||||
@ -200,6 +202,7 @@ void InfoCard::changeSelection()
|
||||
return;
|
||||
|
||||
labelSaveDate->setText(mapInfo->date);
|
||||
labelMapSize->setText(std::to_string(mapInfo->mapHeader->width) + "x" + std::to_string(mapInfo->mapHeader->height));
|
||||
mapName->setText(mapInfo->getNameTranslated());
|
||||
mapDescription->setText(mapInfo->getDescriptionTranslated());
|
||||
|
||||
|
Reference in New Issue
Block a user