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