1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-17 01:32:21 +02:00

- fixed crash in hero window (#963)

- added unused for now image scaling algorithm
This commit is contained in:
Ivan Savenko
2012-05-19 21:38:01 +00:00
parent 6419f953cb
commit a13a62537b
6 changed files with 105 additions and 5 deletions

View File

@ -6207,8 +6207,12 @@ void MoraleLuckBox::set(const IBonusBearer *node)
imageName = morale ? "IMRL30": "ILCK30";
else
imageName = morale ? "IMRL42" : "ILCK42";
if (image && active)
image->deactivate();
delChildNUll(image);
image = new CAnimImage(imageName, bonusValue + 3);
if (active)
image->activate();
image->moveBy(Point(pos.w/2 - image->pos.w/2, pos.h/2 - image->pos.h/2));//center icon
}