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

Extra fix: fix amount position in battle creature labels

This commit is contained in:
Dydzio 2024-01-07 21:45:39 +01:00
parent 3c95f92c59
commit d309a00025

View File

@ -327,7 +327,7 @@ void BattleStacksController::showStackAmountBox(Canvas & canvas, const CStack *
boxPosition = owner.fieldController->hexPositionLocal(frontPos).center() + Point(-8, -14); boxPosition = owner.fieldController->hexPositionLocal(frontPos).center() + Point(-8, -14);
} }
Point textPosition = amountBG->dimensions()/2 + boxPosition; Point textPosition = amountBG->dimensions()/2 + boxPosition + Point(0, 1);
canvas.draw(amountBG, boxPosition); canvas.draw(amountBG, boxPosition);
canvas.drawText(textPosition, EFonts::FONT_TINY, Colors::WHITE, ETextAlignment::CENTER, TextOperations::formatMetric(stack->getCount(), 4)); canvas.drawText(textPosition, EFonts::FONT_TINY, Colors::WHITE, ETextAlignment::CENTER, TextOperations::formatMetric(stack->getCount(), 4));