QTfrontend/pages.cpp
changeset 3743 234ce4da76d4
parent 3714 c407f00d2851
child 3760 d30f1ba768d7
--- a/QTfrontend/pages.cpp	Tue Aug 17 19:43:17 2010 -0400
+++ b/QTfrontend/pages.cpp	Fri Aug 20 11:26:27 2010 -0400
@@ -119,7 +119,7 @@
     Tips << tr("You should never install Hedgewars on computers you don't own (school, university, work, etc.). Please ask the responsible person instead!", "Tips");
     Tips << tr("Hedgewars can be perfect for short games during breaks. Just ensure you don't add too many hedgehogs or use an huge map. Reducing time and health might help as well.", "Tips");
     Tips << tr("No hedgehogs were harmed in making this game.", "Tips");
-
+    
 
     if(isDevBuild)
         mainNote->setText(QLabel::tr("This development build is 'work in progress' and may not be compatible with other versions of the game. Some features might be broken or incomplete. Use at your own risk!"));
@@ -369,7 +369,7 @@
     Mix_Chunk *sound;
     QDir tmpdir;
     mySdli->SDLMusicInit();
-
+    
     tmpdir.cd(datadir->absolutePath());
     tmpdir.cd("Sounds/voices");
     tmpdir.cd(CBVoicepack->currentText());
@@ -957,7 +957,7 @@
     CBSelect->addItems(tmpdir.entryList(QStringList("*.lua")).replaceInStrings(QRegExp("^(.*)\\.lua"), "\\1"));
 
     pageLayout->addWidget(CBSelect, 1, 1);
-
+    
     BtnStartTrain = new QPushButton(this);
     BtnStartTrain->setFont(*font14);
     BtnStartTrain->setText(QPushButton::tr("Go!"));
@@ -1073,7 +1073,7 @@
         QTableWidgetItem * item;
         item = new QTableWidgetItem(list[i + 1]); // room name
         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
-
+        
         // pick appropriate room icon and tooltip (game in progress yes/no; later maybe locked rooms etc.)
         if(list[i].compare("True"))
         {
@@ -1112,13 +1112,13 @@
         else
         {
             item = new QTableWidgetItem(list[i + 5]); // selected map
-
+            
             // check to see if we've got this map
             // not perfect but a start
             if(!mapList->contains(list[i + 5]))
                 item->setForeground(QBrush(QColor(255, 0, 0)));
         }
-
+        
         item->setFlags(Qt::ItemIsEnabled | Qt::ItemIsSelectable);
         item->setToolTip(tr("Games may be played on precreated or randomized maps."));
         roomsList->setItem(r, 4, item);
@@ -1289,6 +1289,10 @@
     TBW_disablelandobjects->setToolTip("<b>" + ToggleButtonWidget::tr("Disable Land Objects") + "</b>:<br />" + tr("Disable land objects when generating random maps."));
     glGMLayout->addWidget(TBW_disablelandobjects,4,0,1,1);
 
+    TBW_aisurvival = new ToggleButtonWidget(gbGameModes, ":/res/btnAISurvival.png");
+    TBW_aisurvival->setToolTip("<b>" + ToggleButtonWidget::tr("AI Survival Mode") + "</b>:<br />" + tr("AI respawns on death."));
+    glGMLayout->addWidget(TBW_aisurvival,4,1,1,1);
+
     // Right
     QLabel * l;
 
@@ -1472,15 +1476,16 @@
     mapper->addMapping(TBW_sharedammo, 15);
     mapper->addMapping(TBW_disablegirders, 16);
     mapper->addMapping(TBW_disablelandobjects, 17);
-    mapper->addMapping(SB_DamageModifier, 18);
-    mapper->addMapping(SB_TurnTime, 19);
-    mapper->addMapping(SB_InitHealth, 20);
-    mapper->addMapping(SB_SuddenDeath, 21);
-    mapper->addMapping(SB_CaseProb, 22);
-    mapper->addMapping(SB_MinesTime, 23);
-    mapper->addMapping(SB_Mines, 24);
-    mapper->addMapping(SB_MineDuds, 25);
-    mapper->addMapping(SB_Explosives, 26);
+    mapper->addMapping(TBW_aisurvival, 18);
+    mapper->addMapping(SB_DamageModifier, 19);
+    mapper->addMapping(SB_TurnTime, 20);
+    mapper->addMapping(SB_InitHealth, 21);
+    mapper->addMapping(SB_SuddenDeath, 22);
+    mapper->addMapping(SB_CaseProb, 23);
+    mapper->addMapping(SB_MinesTime, 24);
+    mapper->addMapping(SB_Mines, 25);
+    mapper->addMapping(SB_MineDuds, 26);
+    mapper->addMapping(SB_Explosives, 27);
 
     mapper->toFirst();
 }
@@ -1516,7 +1521,7 @@
     // 0
     pbAsk = addButton(tr("Fetch data"), pageLayout, 0, 0, 1, 3);
     connect(pbAsk, SIGNAL(clicked()), this, SIGNAL(askServerVars()));
-
+    
     // 1
     QLabel * lblSMN = new QLabel(this);
     lblSMN->setText(tr("Server message for latest version:"));
@@ -1550,10 +1555,10 @@
     pageLayout->addWidget(tb, 4, 1, 1, 2);
     connect(leServerMessageNew, SIGNAL(textEdited(const QString &)), tb, SLOT(setHtml(const QString &)));
     connect(leServerMessageOld, SIGNAL(textEdited(const QString &)), tb, SLOT(setHtml(const QString &)));
-
+    
     // 5
     pbClearAccountsCache = addButton(tr("Clear Accounts Cache"), pageLayout, 5, 0);
-
+    
     // 6
     pbSetSM = addButton(tr("Set data"), pageLayout, 6, 0, 1, 3);