mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
Merge pull request #1478 from kambala-decapitator/units-huge-numbers
limit displayed units number to 4 digits
This commit is contained in:
commit
54537fc02c
@ -850,7 +850,7 @@ void StackQueue::StackBox::setUnit(const battle::Unit * unit, size_t turn)
|
||||
if (unit->unitType()->idNumber == CreatureID::ARROW_TOWERS)
|
||||
icon->setFrame(owner->getSiegeShooterIconID(), 1);
|
||||
|
||||
amount->setText(CSDL_Ext::makeNumberShort(unit->getCount()));
|
||||
amount->setText(CSDL_Ext::makeNumberShort(unit->getCount(), 4));
|
||||
|
||||
if(stateIcon)
|
||||
{
|
||||
|
@ -318,7 +318,7 @@ void BattleStacksController::showStackAmountBox(Canvas & canvas, const CStack *
|
||||
//blitting amount
|
||||
Point textPos = stackAnimation[stack->ID]->pos.topLeft() + amountBG->dimensions()/2 + Point(xAdd, yAdd);
|
||||
|
||||
canvas.drawText(textPos, EFonts::FONT_TINY, Colors::WHITE, ETextAlignment::CENTER, CSDL_Ext::makeNumberShort(stack->getCount()));
|
||||
canvas.drawText(textPos, EFonts::FONT_TINY, Colors::WHITE, ETextAlignment::CENTER, CSDL_Ext::makeNumberShort(stack->getCount(), 4));
|
||||
}
|
||||
|
||||
void BattleStacksController::showStack(Canvas & canvas, const CStack * stack)
|
||||
|
@ -378,7 +378,7 @@ void CGarrisonSlot::update()
|
||||
creatureImage->setFrame(creature->getIconIndex());
|
||||
|
||||
stackCount->enable();
|
||||
stackCount->setText(boost::lexical_cast<std::string>(myStack->count));
|
||||
stackCount->setText(CSDL_Ext::makeNumberShort(myStack->count, 4));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -247,7 +247,7 @@ void CArmyTooltip::init(const InfoAboutArmy &army)
|
||||
std::string subtitle;
|
||||
if(army.army.isDetailed)
|
||||
{
|
||||
subtitle = boost::lexical_cast<std::string>(slot.second.count);
|
||||
subtitle = CSDL_Ext::makeNumberShort(slot.second.count, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user