| 51 |
|
|
| 52 |
|
void BGImagePage3::on_leLevelId_textChanged(const QString &arg1) |
| 53 |
|
{ |
| 54 |
< |
if(!arg1.isEmpty() && !Util::isStringInteger(arg1)){ |
| 55 |
< |
Util::showErrorPopUp("Level id must be a number."); |
| 54 |
> |
if(!arg1.isEmpty() && !Util::Validation::isStringInteger(arg1)){ |
| 55 |
> |
Util::Dialogs::showError("Level id must be a number."); |
| 56 |
|
ui->leLevelId->clear(); |
| 57 |
|
return; |
| 58 |
|
} |
| 84 |
|
if(type == "Other"){ |
| 85 |
|
backgroundName = "TXMPother"; |
| 86 |
|
txmbName = "TXMBother"; |
| 87 |
+ |
ui->leLevelId->clear(); |
| 88 |
+ |
ui->leLevelId->setEnabled(false); |
| 89 |
|
} |
| 90 |
|
else if(type == "Intro Screen"){ |
| 91 |
|
backgroundName = "TXMPlevel" + levelNumber + "_intro_"; |
| 92 |
|
txmbName = "TXMBintro_splash_screen"; |
| 93 |
+ |
ui->leLevelId->setEnabled(true); |
| 94 |
|
} |
| 95 |
|
else if(type == "Win Screen"){ |
| 96 |
|
backgroundName = "TXMPlevel" + levelNumber + "_win_"; |
| 97 |
|
txmbName = "TXMBwin_splash_screen"; |
| 98 |
+ |
ui->leLevelId->setEnabled(true); |
| 99 |
|
} |
| 100 |
|
else if(type == "Loose Screen"){ |
| 101 |
|
backgroundName = "TXMPfail01_"; |
| 102 |
|
txmbName = "TXMBfail_splash_screen"; |
| 103 |
+ |
ui->leLevelId->clear(); |
| 104 |
+ |
ui->leLevelId->setEnabled(false); |
| 105 |
|
} |
| 106 |
|
else if(type == "Main Menu Screen"){ |
| 107 |
|
backgroundName = "TXMPOni_startup_"; |
| 108 |
|
txmbName = "TXMBpict_mainmenu"; |
| 109 |
+ |
ui->leLevelId->clear(); |
| 110 |
+ |
ui->leLevelId->setEnabled(false); |
| 111 |
|
} |
| 112 |
|
else if(type == "Options Menu Screen"){ |
| 113 |
|
backgroundName = "TXMPoptions_"; |
| 114 |
|
txmbName = "TXMBpict_options_background"; |
| 115 |
+ |
ui->leLevelId->clear(); |
| 116 |
+ |
ui->leLevelId->setEnabled(false); |
| 117 |
|
} |
| 118 |
|
else if(type == "Load Level Screen"){ |
| 119 |
|
backgroundName = "TXMPoni_kanji_"; |
| 120 |
|
txmbName = "TXMBpict_loadgame_background"; |
| 121 |
+ |
ui->leLevelId->clear(); |
| 122 |
+ |
ui->leLevelId->setEnabled(false); |
| 123 |
|
} |
| 124 |
|
|
| 125 |
|
ui->leImageName->setText(backgroundName); |
| 135 |
|
QStringList namesList; |
| 136 |
|
|
| 137 |
|
if(ui->leImageName->text().trimmed().isEmpty()){ |
| 138 |
< |
Util::showErrorPopUp("You need to input a name to the image!"); |
| 138 |
> |
Util::Dialogs::showError("You need to input a name to the image!"); |
| 139 |
|
return false; |
| 140 |
|
} |
| 141 |
|
|
| 142 |
|
if(ui->cbCreateTXMB->isChecked() && ui->leTXMBName->text().trimmed().isEmpty()){ |
| 143 |
< |
Util::showErrorPopUp("You need to input a name to the TXMB file!"); |
| 143 |
> |
Util::Dialogs::showError("You need to input a name to the TXMB file!"); |
| 144 |
|
return false; |
| 145 |
|
} |
| 146 |
|
|