ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/s10k/Vago/bgImageWizard/bgimagepage3.cpp
(Generate patch)

Comparing:
Vago/trunk/Vago/bgImageWizard/bgimagepage3.cpp (file contents), Revision 1054 by s10k, Wed Oct 12 21:35:13 2016 UTC vs.
s10k/Vago/bgImageWizard/bgimagepage3.cpp (file contents), Revision 1093 by s10k, Sat Dec 30 13:57:32 2017 UTC

# Line 51 | Line 51 | void BGImagePage3::on_cbCreateTXMB_toggl
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      }
# Line 84 | Line 84 | void BGImagePage3::generateImageName(){
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);
# Line 123 | Line 135 | bool BGImagePage3::validatePage(){
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  

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)