equal
deleted
inserted
replaced
42 #include "ThemeModel.h" |
42 #include "ThemeModel.h" |
43 |
43 |
44 // last game info |
44 // last game info |
45 QList<QVariant> lastGameStartArgs = QList<QVariant>(); |
45 QList<QVariant> lastGameStartArgs = QList<QVariant>(); |
46 GameType lastGameType = gtNone; |
46 GameType lastGameType = gtNone; |
|
47 QString lastTrainingSubFolder = NULL; |
47 GameCFGWidget * lastGameCfg = NULL; |
48 GameCFGWidget * lastGameCfg = NULL; |
48 QString lastGameAmmo = NULL; |
49 QString lastGameAmmo = NULL; |
49 TeamSelWidget * lastGameTeamSel = NULL; |
50 TeamSelWidget * lastGameTeamSel = NULL; |
50 |
51 |
51 QString training, campaign, campaignScript, campaignTeam; // TODO: Cleaner solution? |
52 QString training, campaign, campaignScript, campaignTeam; // TODO: Cleaner solution? |
476 demo.clear(); |
477 demo.clear(); |
477 Start(false); |
478 Start(false); |
478 SetGameState(gsStarted); |
479 SetGameState(gsStarted); |
479 } |
480 } |
480 |
481 |
481 void HWGame::StartTraining(const QString & file) |
482 void HWGame::StartTraining(const QString & file, const QString & subFolder) |
482 { |
483 { |
483 lastGameStartArgs.clear(); |
484 lastGameStartArgs.clear(); |
484 lastGameStartArgs.append(file); |
485 lastGameStartArgs.append(file); |
485 lastGameType = gtTraining; |
486 lastGameType = gtTraining; |
|
487 lastTrainingSubFolder = subFolder; |
486 |
488 |
487 gameType = gtTraining; |
489 gameType = gtTraining; |
488 training = "Missions/Training/" + file + ".lua"; |
490 |
|
491 training = "Missions/" + subFolder + "/" + file + ".lua"; |
489 demo.clear(); |
492 demo.clear(); |
490 Start(false); |
493 Start(false); |
491 SetGameState(gsStarted); |
494 SetGameState(gsStarted); |
492 } |
495 } |
493 |
496 |