1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Added RenderHandler that acts as factory for images and animations

This commit is contained in:
Ivan Savenko
2023-09-04 18:01:44 +03:00
parent 3f921fa771
commit 1d0e696db6
38 changed files with 246 additions and 126 deletions

View File

@@ -31,6 +31,7 @@
#include "../windows/GUIClasses.h"
#include "../windows/InfoWindows.h"
#include "../render/IImage.h"
#include "../render/IRenderHandler.h"
#include "../render/CAnimation.h"
#include "../render/Graphics.h"
#include "../gui/CGuiHandler.h"
@@ -306,7 +307,7 @@ void CBonusSelection::createBonusesIcons()
if(picNumber != -1)
picName += ":" + std::to_string(picNumber);
auto anim = std::make_shared<CAnimation>();
auto anim = GH.renderHandler().createAnimation();
anim->setCustom(picName, 0);
bonusButton->setImage(anim);
if(CSH->campaignBonus == i)