1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Support roads selection in random map tab

This commit is contained in:
nordsoft
2022-12-17 04:54:37 +04:00
parent d93e844609
commit 4f5fab702e
2 changed files with 17 additions and 3 deletions

View File

@ -110,10 +110,11 @@ RandomMapTab::RandomMapTab():
for(auto road : VLC->terrainTypeHandler->roads())
{
std::string cbRoadType = "selectRoad_" + road.fileName;
addCallback(cbRoadType, [&](bool on)
std::string cbRoadType = "selectRoad_" + road.name;
addCallback(cbRoadType, [&, road](bool on)
{
//TODO: support road types
mapGenOptions->setRoadEnabled(road.name, on);
updateMapInfoByHost();
});
}