1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +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();
});
}

View File

@ -113,5 +113,18 @@
"label" : "Hide complete quests",
"help" : "Hide all quests that already completed"
}
},
"randomMapTab":
{
"widgets":
{
"defaultTemplate": "default",
"templateLabel": "Template",
"teamAlignmentsButton": "Setup...",
"teamAlignmentsLabel": "Team alignments",
"dirtRoad": "Dirt",
"gravelRoad": "Gravel",
"cobblestoneRoad": "Stone"
}
}
}