--- Vago/trunk/Vago/bgImageWizard/bgimagepage3.cpp 2016/10/12 21:35:13 1054 +++ s10k/Vago/bgImageWizard/bgimagepage3.cpp 2017/12/30 13:57:32 1093 @@ -51,8 +51,8 @@ void BGImagePage3::on_cbCreateTXMB_toggl void BGImagePage3::on_leLevelId_textChanged(const QString &arg1) { - if(!arg1.isEmpty() && !Util::isStringInteger(arg1)){ - Util::showErrorPopUp("Level id must be a number."); + if(!arg1.isEmpty() && !Util::Validation::isStringInteger(arg1)){ + Util::Dialogs::showError("Level id must be a number."); ui->leLevelId->clear(); return; } @@ -84,30 +84,42 @@ void BGImagePage3::generateImageName(){ if(type == "Other"){ backgroundName = "TXMPother"; txmbName = "TXMBother"; + ui->leLevelId->clear(); + ui->leLevelId->setEnabled(false); } else if(type == "Intro Screen"){ backgroundName = "TXMPlevel" + levelNumber + "_intro_"; txmbName = "TXMBintro_splash_screen"; + ui->leLevelId->setEnabled(true); } else if(type == "Win Screen"){ backgroundName = "TXMPlevel" + levelNumber + "_win_"; txmbName = "TXMBwin_splash_screen"; + ui->leLevelId->setEnabled(true); } else if(type == "Loose Screen"){ backgroundName = "TXMPfail01_"; txmbName = "TXMBfail_splash_screen"; + ui->leLevelId->clear(); + ui->leLevelId->setEnabled(false); } else if(type == "Main Menu Screen"){ backgroundName = "TXMPOni_startup_"; txmbName = "TXMBpict_mainmenu"; + ui->leLevelId->clear(); + ui->leLevelId->setEnabled(false); } else if(type == "Options Menu Screen"){ backgroundName = "TXMPoptions_"; txmbName = "TXMBpict_options_background"; + ui->leLevelId->clear(); + ui->leLevelId->setEnabled(false); } else if(type == "Load Level Screen"){ backgroundName = "TXMPoni_kanji_"; txmbName = "TXMBpict_loadgame_background"; + ui->leLevelId->clear(); + ui->leLevelId->setEnabled(false); } ui->leImageName->setText(backgroundName); @@ -123,12 +135,12 @@ bool BGImagePage3::validatePage(){ QStringList namesList; if(ui->leImageName->text().trimmed().isEmpty()){ - Util::showErrorPopUp("You need to input a name to the image!"); + Util::Dialogs::showError("You need to input a name to the image!"); return false; } if(ui->cbCreateTXMB->isChecked() && ui->leTXMBName->text().trimmed().isEmpty()){ - Util::showErrorPopUp("You need to input a name to the TXMB file!"); + Util::Dialogs::showError("You need to input a name to the TXMB file!"); return false; }