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

@@ -29,6 +29,7 @@
#include "../windows/CMessage.h"
#include "../render/CAnimation.h"
#include "../render/Canvas.h"
#include "../render/IRenderHandler.h"
#include "../adventureMap/CInGameConsole.h"
#include "../../CCallback.h"
@@ -469,7 +470,7 @@ void BattleWindow::showAlternativeActionIcon(PossiblePlayerBattleAction action)
break;
}
auto anim = std::make_shared<CAnimation>(iconName);
auto anim = GH.renderHandler().loadAnimation(iconName);
w->setImage(anim);
w->redraw();
}