wright script is called on StartCampaign but maybe cause problems if i.e. set a default image spacecampaign
authorPeriklis Ntanasis <pntanasis@gmail.com>
Fri, 28 Jun 2013 20:14:32 +0300
branchspacecampaign
changeset 9288 180cab35c9c1
parent 9286 c89b992ff5fe
child 9290 478aa681e702
wright script is called on StartCampaign but maybe cause problems if i.e. set a default image
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Fri Jun 28 19:55:16 2013 +0300
+++ b/QTfrontend/hwform.cpp	Fri Jun 28 20:14:32 2013 +0300
@@ -1722,11 +1722,12 @@
 void HWForm::StartCampaign()
 {
     CreateGame(0, 0, 0);
-
-    QComboBox *combo = ui.pageCampaign->CBMission;
+	// what if no picture? :D
+    //QComboBox *combo = ui.pageCampaign->CBMission;
     QString camp = ui.pageCampaign->CBCampaign->currentText();
-    unsigned int mNum = combo->count() - combo->currentIndex();
-    QString miss = getCampaignScript(camp, mNum);
+    //unsigned int mNum = combo->count() - combo->currentIndex();
+    //QString miss = getCampaignScript(camp, mNum);
+    QString miss = campaignMissionImages[ui.pageCampaign->CBMission->currentIndex()].replace(QString(".png"),QString(".lua"));
     QString campTeam = ui.pageCampaign->CBTeam->currentText();
 
     game->StartCampaign(camp, miss, campTeam);