1355 } |
1355 } |
1356 |
1356 |
1357 void HWForm::CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo) |
1357 void HWForm::CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo) |
1358 { |
1358 { |
1359 game = new HWGame(config, gamecfg, ammo, pTeamSelWidget); |
1359 game = new HWGame(config, gamecfg, ammo, pTeamSelWidget); |
1360 connect(game, SIGNAL(CampStateChanged(int)), this, SLOT(UpdateCampaignPage(int))); |
1360 connect(game, SIGNAL(CampStateChanged(int)), this, SLOT(UpdateCampaignPageProgress(int))); |
1361 connect(game, SIGNAL(GameStateChanged(GameState)), this, SLOT(GameStateChanged(GameState))); |
1361 connect(game, SIGNAL(GameStateChanged(GameState)), this, SLOT(GameStateChanged(GameState))); |
1362 connect(game, SIGNAL(GameStats(char, const QString &)), ui.pageGameStats, SLOT(GameStats(char, const QString &))); |
1362 connect(game, SIGNAL(GameStats(char, const QString &)), ui.pageGameStats, SLOT(GameStats(char, const QString &))); |
1363 connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection); |
1363 connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection); |
1364 connect(game, SIGNAL(HaveRecord(bool, const QByteArray &)), this, SLOT(GetRecord(bool, const QByteArray &))); |
1364 connect(game, SIGNAL(HaveRecord(bool, const QByteArray &)), this, SLOT(GetRecord(bool, const QByteArray &))); |
1365 m_lastDemo = QByteArray(); |
1365 m_lastDemo = QByteArray(); |
1588 |
1588 |
1589 for (unsigned int i = min(m + 1, n); i > 0; i--) |
1589 for (unsigned int i = min(m + 1, n); i > 0; i--) |
1590 { |
1590 { |
1591 ui.pageCampaign->CBMission->addItem(QString("Mission %1: ").arg(i) + QString(missionEntries[i-1]), QString(missionEntries[i-1])); |
1591 ui.pageCampaign->CBMission->addItem(QString("Mission %1: ").arg(i) + QString(missionEntries[i-1]), QString(missionEntries[i-1])); |
1592 } |
1592 } |
|
1593 } |
|
1594 |
|
1595 void HWForm::UpdatecampaignPageProgress(int index) |
|
1596 { |
|
1597 int missionIndex = ui.pageCampaign->CBMission->currentIndex(); |
|
1598 UpdateCampaignPage(0); |
|
1599 ui.pageCampaign->CBMission->setCurrentIndex(missionIndex); |
1593 } |
1600 } |
1594 |
1601 |
1595 // used for --set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality] |
1602 // used for --set-everything [screen width] [screen height] [color dept] [volume] [enable music] [enable sounds] [language file] [full screen] [show FPS] [alternate damage] [timer value] [reduced quality] |
1596 QString HWForm::getDemoArguments() |
1603 QString HWForm::getDemoArguments() |
1597 { |
1604 { |