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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user