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

Read default template from config, named custom types

This commit is contained in:
nordsoft
2022-12-22 01:37:33 +04:00
parent 7e7071fc95
commit 8f7025328f
2 changed files with 14 additions and 13 deletions

View File

@@ -405,13 +405,9 @@ std::shared_ptr<CIntObject> InterfaceObjectConfigurable::buildWidget(JsonNode co
{
return buildSlider(config);
}
if(type == "custom")
{
logGlobal->debug("Calling custom widget building function");
return const_cast<InterfaceObjectConfigurable*>(this)->buildCustomWidget(config);
}
logGlobal->error("Unknown type, nullptr will be returned");
return std::shared_ptr<CIntObject>(nullptr);
logGlobal->debug("Calling custom widget building function");
return const_cast<InterfaceObjectConfigurable*>(this)->buildCustomWidget(config);
}
std::shared_ptr<CIntObject> InterfaceObjectConfigurable::buildCustomWidget(const JsonNode & config)