QTfrontend/hwform.cpp
branchwebgl
changeset 9521 8054d9d775fd
parent 9236 ddd675825672
parent 9393 094a176dd623
child 9950 2759212a27de
--- a/QTfrontend/hwform.cpp	Fri Oct 11 11:55:31 2013 +0200
+++ b/QTfrontend/hwform.cpp	Fri Oct 11 17:43:13 2013 +0200
@@ -165,14 +165,13 @@
 #endif
 
 #ifdef __APPLE__
-    AutoUpdater* updater = NULL;
     if (config->isAutoUpdateEnabled())
     {
-#ifdef __APPLE__
+        AutoUpdater* updater = NULL;
+
 #ifdef SPARKLE_ENABLED
         updater = new SparkleAutoUpdater();
 #endif
-#endif
         if (updater)
         {
             updater->checkForUpdates();
@@ -658,7 +657,7 @@
         }
 
         QList<HWTeam> teamsList;
-        for (QStringList::iterator it = tmNames.begin(); it != tmNames.end(); it++)
+        for (QStringList::iterator it = tmNames.begin(); it != tmNames.end(); ++it)
         {
             HWTeam team(*it);
             team.loadFromFile();
@@ -704,7 +703,7 @@
 
 void HWForm::GoToPage(int id)
 {
-    bool stopAnim = false;
+    //bool stopAnim = false;
 
     int lastid = ui.Pages->currentIndex();
     PagesStack.push(ui.Pages->currentIndex());
@@ -721,7 +720,7 @@
 
 
 #if (QT_VERSION >= 0x040600)
-    if (!stopAnim)
+    //if (!stopAnim)
     {
         /**Start animation :**/
         int coeff = 1;
@@ -817,7 +816,7 @@
         stopAnim = true; */
 
     if ((!hwnet) || (!hwnet->isInRoom()))
-        if (id == ID_PAGE_NETGAME || id == ID_PAGE_NETGAME)
+        if (id == ID_PAGE_NETGAME)
         {
             stopAnim = true;
             GoBack();
@@ -1723,7 +1722,7 @@
     CreateGame(0, 0, 0);
 
     QComboBox *combo = ui.pageCampaign->CBMission;
-    QString camp = ui.pageCampaign->CBCampaign->currentText();
+    QString camp = ui.pageCampaign->CBCampaign->currentText().replace(QString(" "),QString("_"));
     unsigned int mNum = combo->count() - combo->currentIndex();
     QString miss = getCampaignScript(camp, mNum);
     QString campTeam = ui.pageCampaign->CBTeam->currentText();
@@ -1888,7 +1887,7 @@
     unsigned int n = entries.count();
     for(unsigned int i = 0; i < n; i++)
     {
-        ui.pageCampaign->CBCampaign->addItem(QString(entries[i]), QString(entries[i]));
+        ui.pageCampaign->CBCampaign->addItem(QString(entries[i]).replace(QString("_"),QString(" ")), QString(entries[i]).replace(QString("_"),QString(" ")));
     }
 }
 
@@ -1900,7 +1899,7 @@
     HWTeam team(ui.pageCampaign->CBTeam->currentText());
     ui.pageCampaign->CBMission->clear();
 
-    QString campaignName = ui.pageCampaign->CBCampaign->currentText();
+    QString campaignName = ui.pageCampaign->CBCampaign->currentText().replace(QString(" "),QString("_"));
     QStringList missionEntries = getCampMissionList(campaignName);
     QString tName = team.name();
     unsigned int n = missionEntries.count();
@@ -1961,7 +1960,7 @@
 void HWForm::UpdateCampaignPageMission(int index)
 {
     // update thumbnail
-    QString campaignName = ui.pageCampaign->CBCampaign->currentText();
+    QString campaignName = ui.pageCampaign->CBCampaign->currentText().replace(QString(" "),QString("_"));
     unsigned int mNum = ui.pageCampaign->CBMission->count() - ui.pageCampaign->CBMission->currentIndex();
     QString image = getCampaignImage(campaignName,mNum);
     ui.pageCampaign->btnPreview->setIcon(QIcon((":/res/campaign/"+campaignName+"/"+image)));
@@ -2009,7 +2008,11 @@
                    + (config->isShowFPSEnabled() ? " --showfps" : "")
                    + (config->isAltDamageEnabled() ? " --altdmg" : "")
                    + " --frame-interval " + QString::number(config->timerInterval())
-                   + " --raw-quality " + QString::number(config->translateQuality()));
+                   + " --raw-quality " + QString::number(config->translateQuality()))
+                   + (!config->Form->ui.pageOptions->CBTeamTag->isChecked() ? " --no-teamtag" : "")
+                   + (!config->Form->ui.pageOptions->CBHogTag->isChecked() ? " --no-hogtag" : "")
+                   + (!config->Form->ui.pageOptions->CBHealthTag->isChecked() ? " --no-healthtag" : "")
+                   + (config->Form->ui.pageOptions->CBTagOpacity->isChecked() ? " --translucent-tags" : "");
 }
 
 void HWForm::AssociateFiles()