1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Created separate classes for shared, unchangeable image and image

manipulators owned by UI elements
This commit is contained in:
Ivan Savenko
2024-06-04 11:46:45 +00:00
parent 2b3e4e01ca
commit 47de9a62dc
19 changed files with 312 additions and 243 deletions

View File

@ -1143,9 +1143,9 @@ void CPlayerInterface::showMapObjectSelectDialog(QueryID askID, const Component
const CGTownInstance * t = dynamic_cast<const CGTownInstance *>(cb->getObj(obj));
if(t)
{
std::shared_ptr<CAnimation> a = GH.renderHandler().loadAnimation(AnimationPath::builtin("ITPA"));
a->preload();
images.push_back(a->getImage(t->town->clientInfo.icons[t->hasFort()][false] + 2)->scaleFast(Point(35, 23)));
auto image = GH.renderHandler().loadImage(AnimationPath::builtin("ITPA"), t->town->clientInfo.icons[t->hasFort()][false] + 2, 0);
image->scaleFast(Point(35, 23));
images.push_back(image);
}
}