ui to change map's assigned layout id

This commit is contained in:
garak
2023-02-06 15:05:22 -05:00
parent de8b005d77
commit 9918159caa
6 changed files with 378 additions and 318 deletions

View File

@@ -29,6 +29,13 @@ void Map::setName(QString mapName) {
constantName = mapConstantFromName(mapName);
}
void Map::setLayout(Layout *layout) {
this->layout = layout;
if (layout) {
this->layoutId = layout->id;
}
}
QString Map::mapConstantFromName(QString mapName) {
// Transform map names of the form 'GraniteCave_B1F` into map constants like 'MAP_GRANITE_CAVE_B1F'.
static const QRegularExpression caseChange("([a-z])([A-Z])");