equal
deleted
inserted
replaced
65 teamslist.push_back("DefaultTeam"); |
65 teamslist.push_back("DefaultTeam"); |
66 } |
66 } |
67 |
67 |
68 for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) |
68 for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) |
69 { |
69 { |
70 QString tmpTeamStr=(*it).replace(QRegExp("^(.*).cfg$"), "\\1"); |
70 ui.pageMultiplayer->teamsSelect->addTeam(*it); |
71 ui.pageMultiplayer->teamsSelect->addTeam(tmpTeamStr); |
71 ui.pageOptions->CBTeamName->addItem(*it); |
72 ui.pageOptions->CBTeamName->addItem(tmpTeamStr); |
|
73 } |
72 } |
74 |
73 |
75 connect(ui.pageMain->BtnSinglePlayer, SIGNAL(clicked()), this, SLOT(GoToSinglePlayer())); |
74 connect(ui.pageMain->BtnSinglePlayer, SIGNAL(clicked()), this, SLOT(GoToSinglePlayer())); |
76 connect(ui.pageMain->BtnSetup, SIGNAL(clicked()), this, SLOT(GoToSetup())); |
75 connect(ui.pageMain->BtnSetup, SIGNAL(clicked()), this, SLOT(GoToSetup())); |
77 connect(ui.pageMain->BtnMultiplayer, SIGNAL(clicked()), this, SLOT(GoToMultiplayer())); |
76 connect(ui.pageMain->BtnMultiplayer, SIGNAL(clicked()), this, SLOT(GoToMultiplayer())); |
256 } |
255 } |
257 |
256 |
258 void HWForm::StartMPGame() |
257 void HWForm::StartMPGame() |
259 { |
258 { |
260 game = new HWGame(config, ui.pageMultiplayer->gameCFG); |
259 game = new HWGame(config, ui.pageMultiplayer->gameCFG); |
261 game->AddTeam("DefaultTeam"); |
260 QStringList teamslist = config->GetTeamsList(); |
262 game->AddTeam("DefaultTeam"); |
261 for (QStringList::Iterator it = teamslist.begin(); it != teamslist.end(); ++it ) { |
|
262 if(ui.pageMultiplayer->teamsSelect->isPlaying(*it)) { |
|
263 game->AddTeam(*it, ui.pageMultiplayer->teamsSelect->numHedgedogs(*it)); |
|
264 } |
|
265 } |
263 game->StartLocal(); |
266 game->StartLocal(); |
264 } |
267 } |