Add new Zone wizard
This commit is contained in:
@@ -17,8 +17,6 @@ namespace world {
|
||||
using namespace studio;
|
||||
|
||||
const QString NewWorldWizard::FIELD_WORLD_PATH = "World.WorldPath";
|
||||
const QString NewWorldWizard::FIELD_WIDTH = "World.Width";
|
||||
const QString NewWorldWizard::FIELD_HEIGHT = "World.Height";
|
||||
|
||||
NewWorldWizard::NewWorldWizard(const Context *ctx) {
|
||||
addLineEdit(tr("&Name:"), FIELD_WORLD_PATH, "", [this, ctx](QString worldName) {
|
||||
@@ -31,28 +29,6 @@ NewWorldWizard::NewWorldWizard(const Context *ctx) {
|
||||
}
|
||||
}
|
||||
);
|
||||
addLineEdit(tr("&Width:"), FIELD_WIDTH, "", [this, ctx](QString widthStr) {
|
||||
bool ok = false;
|
||||
widthStr.toInt(&ok);
|
||||
if (ok) {
|
||||
return 0;
|
||||
} else {
|
||||
this->showValidationError(tr("Invalid width: \"%1\"").arg(widthStr));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
);
|
||||
addLineEdit(tr("&Height:"), FIELD_HEIGHT, "", [this, ctx](QString widthStr) {
|
||||
bool ok = false;
|
||||
widthStr.toInt(&ok);
|
||||
if (ok) {
|
||||
return 0;
|
||||
} else {
|
||||
this->showValidationError(tr("Invalid height: \"%1\"").arg(widthStr));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user