1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-09-16 09:26:28 +02:00

Added possibility to define per-town tower icon for battle queue in siege

This commit is contained in:
Ivan Savenko
2022-11-29 14:47:51 +02:00
parent 3d1f6df0e2
commit 861a6849f9
12 changed files with 45 additions and 30 deletions

View File

@@ -310,11 +310,13 @@ std::shared_ptr<Animation> Graphics::getAnimation(const std::shared_ptr<const Ob
return ret;
}
void Graphics::addImageListEntry(size_t index, const std::string & listName, const std::string & imageName)
void Graphics::addImageListEntry(size_t index, size_t group, const std::string & listName, const std::string & imageName)
{
if (!imageName.empty())
{
JsonNode entry;
if ( group != 0)
entry["group"].Integer() = group;
entry["frame"].Integer() = index;
entry["file"].String() = imageName;
@@ -324,7 +326,7 @@ void Graphics::addImageListEntry(size_t index, const std::string & listName, con
void Graphics::addImageListEntries(const EntityService * service)
{
auto cb = std::bind(&Graphics::addImageListEntry, this, _1, _2, _3);
auto cb = std::bind(&Graphics::addImageListEntry, this, _1, _2, _3, _4);
auto loopCb = [&](const Entity * entity, bool & stop)
{