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

Template list prototype looks fine

This commit is contained in:
nordsoft
2022-12-13 03:47:29 +04:00
parent 690ff773f4
commit f90cb1be90
3 changed files with 107 additions and 0 deletions

View File

@@ -179,6 +179,15 @@ std::shared_ptr<CIntObject> InterfaceObjectConfigurable::buildWidget(const JsonN
if(!config["zelp"].isNull())
zelp = CGI->generaltexth->zelp[config["zelp"].Integer()];
auto button = std::make_shared<CButton>(Point(x, y), image, zelp);
if(!config["items"].isNull())
{
for(const auto & item : config["items"].Vector())
{
button->addOverlay(buildWidget(item));
}
}
if(!config["callback"].isNull())
button->addCallback(std::bind(callbacks[config["callback"].String()], 0));
return button;
}
if(type == "labelGroup")