added images and corrected bug that didn't show correct description at some occasions
authorPeriklis Ntanasis <pntanasis@gmail.com>
Wed, 12 Jun 2013 04:53:04 +0300
changeset 9184 8bf450fe6cc8
parent 9182 f92e205bc167
child 9189 b0d16164dfa0
added images and corrected bug that didn't show correct description at some occasions
QTfrontend/hwform.cpp
QTfrontend/hwform.h
QTfrontend/res/campaign/A Classic Fairytale/backstab.png
QTfrontend/res/campaign/A Classic Fairytale/dragon.png
QTfrontend/res/campaign/A Classic Fairytale/enemy.png
QTfrontend/res/campaign/A Classic Fairytale/epil.png
QTfrontend/res/campaign/A Classic Fairytale/family.png
QTfrontend/res/campaign/A Classic Fairytale/first_blood.png
QTfrontend/res/campaign/A Classic Fairytale/journey.png
QTfrontend/res/campaign/A Classic Fairytale/queen.png
QTfrontend/res/campaign/A Classic Fairytale/shadow.png
QTfrontend/res/campaign/A Classic Fairytale/united.png
share/hedgewars/Data/Locale/campaigns_en.txt
--- a/QTfrontend/hwform.cpp	Mon May 27 21:39:52 2013 +0300
+++ b/QTfrontend/hwform.cpp	Wed Jun 12 04:53:04 2013 +0300
@@ -195,6 +195,7 @@
 #endif
 
 	previousCampaignName = "";
+	previousTeamName = "";
     UpdateTeamsLists();
     InitCampaignPage();
     UpdateCampaignPage(0);
@@ -1893,7 +1894,7 @@
 void HWForm::UpdateCampaignPage(int index)
 {
     Q_UNUSED(index);
-
+    
     HWTeam team(ui.pageCampaign->CBTeam->currentText());
     ui.pageCampaign->CBMission->clear();
 
@@ -1906,11 +1907,16 @@
     // if the campaign name changes update the campaignMissionDescriptions list
     // this will be used later in UpdateCampaignPageMission() to update
     // the mission description in the campaign page
-    bool updateMissionList = false;    
+    bool updateMissionList = false;
     QSettings * m_info;
-    if(previousCampaignName.compare(campaignName)!=0) 
+    if(previousCampaignName.compare(campaignName)!=0 || 
+			previousTeamName.compare(tName) != 0) 
     {
+		if (previousTeamName.compare(tName) != 0 && 
+				previousTeamName.compare("") != 0)
+			index = qMin(m + 1, n);
 		previousCampaignName = campaignName;
+		previousTeamName = tName;
 		updateMissionList = true;
 		// the following code was based on pagetraining.cpp
 		DataManager & dataMgr = DataManager::instance();    
@@ -1946,6 +1952,7 @@
     }
     if(updateMissionList)
 		delete m_info;
+
     UpdateCampaignPageMission(index);
 }
 
--- a/QTfrontend/hwform.h	Mon May 27 21:39:52 2013 +0300
+++ b/QTfrontend/hwform.h	Wed Jun 12 04:53:04 2013 +0300
@@ -194,6 +194,7 @@
         AmmoSchemeModel * ammoSchemeModel;
         QStack<int> PagesStack;
         QString previousCampaignName;
+        QString previousTeamName;
         QStringList campaignMissionDescriptions;
         QTime eggTimer;
         BGWidget * wBackground;
Binary file QTfrontend/res/campaign/A Classic Fairytale/backstab.png has changed
Binary file QTfrontend/res/campaign/A Classic Fairytale/dragon.png has changed
Binary file QTfrontend/res/campaign/A Classic Fairytale/enemy.png has changed
Binary file QTfrontend/res/campaign/A Classic Fairytale/epil.png has changed
Binary file QTfrontend/res/campaign/A Classic Fairytale/family.png has changed
Binary file QTfrontend/res/campaign/A Classic Fairytale/first_blood.png has changed
Binary file QTfrontend/res/campaign/A Classic Fairytale/journey.png has changed
Binary file QTfrontend/res/campaign/A Classic Fairytale/queen.png has changed
Binary file QTfrontend/res/campaign/A Classic Fairytale/shadow.png has changed
Binary file QTfrontend/res/campaign/A Classic Fairytale/united.png has changed
--- a/share/hedgewars/Data/Locale/campaigns_en.txt	Mon May 27 21:39:52 2013 +0300
+++ b/share/hedgewars/Data/Locale/campaigns_en.txt	Wed Jun 12 04:53:04 2013 +0300
@@ -16,4 +16,4 @@
 
 A Classic Fairytale-enemy.desc="What a great twist! Leaks a lot has to fight side by side with the… “cannibals” against the common enemy. The evil cyborgs!"
 
-A Classic Fairytale-epil.desc="Congratulations! Leaks a lot can finally leave in peace and get praised by his new friends and his tribe. Be proud for what you succeed! You can play again previous missions and see the other possible endings"
+A Classic Fairytale-epil.desc="Congratulations! Leaks a lot can finally leave in peace and get praised by his new friends and his tribe. Be proud for what you succeed! You can play again previous missions and see the other possible endings."