1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +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

@@ -885,9 +885,9 @@ void CCastleBuildings::enterCastleGate()
availableTowns.push_back(t->id.getNum());//add to the list
if(settings["general"]["enableUiEnhancements"].Bool())
{
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);
}
}
}