QTfrontend/hwform.cpp
changeset 339 7535ab6c3820
parent 338 d1e75dcd285f
child 341 184230eb4151
equal deleted inserted replaced
338:d1e75dcd285f 339:7535ab6c3820
   236 	game->PlayDemo(cfgdir->absolutePath() + "/Demos/" + curritem->text() + ".hwd_" + cProtoVer);
   236 	game->PlayDemo(cfgdir->absolutePath() + "/Demos/" + curritem->text() + ".hwd_" + cProtoVer);
   237 }
   237 }
   238 
   238 
   239 void HWForm::_NetConnect(const QString & hostName, quint16 port, const QString & nick)
   239 void HWForm::_NetConnect(const QString & hostName, quint16 port, const QString & nick)
   240 {
   240 {
   241 	hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG);
   241 	hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget);
   242 	connect(hwnet, SIGNAL(AddGame(const QString &)), this, SLOT(AddGame(const QString &)));
   242 	connect(hwnet, SIGNAL(AddGame(const QString &)), this, SLOT(AddGame(const QString &)));
   243 	connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
   243 	connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
   244 	connect(hwnet, SIGNAL(AddNetTeam(const QString&)), this, SLOT(AddNetTeam(const QString&)));
   244 	connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&)));
   245 
   245 
   246 	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamWillPlay(HWTeam)), hwnet, SLOT(AddTeam(HWTeam)));
   246 	connect(ui.pageNetGame->pNetTeamsWidget, SIGNAL(teamWillPlay(HWTeam)), hwnet, SLOT(AddTeam(HWTeam)));
   247 
   247 
   248 	connect(ui.pageNetGame->pGameCFG, SIGNAL(seedChanged(const QString &)), hwnet, SLOT(onSeedChanged(const QString &)));
   248 	connect(ui.pageNetGame->pGameCFG, SIGNAL(seedChanged(const QString &)), hwnet, SLOT(onSeedChanged(const QString &)));
   249 	connect(ui.pageNetGame->pGameCFG, SIGNAL(mapChanged(const QString &)), hwnet, SLOT(onMapChanged(const QString &)));
   249 	connect(ui.pageNetGame->pGameCFG, SIGNAL(mapChanged(const QString &)), hwnet, SLOT(onMapChanged(const QString &)));
   312 void HWForm::NetStartGame()
   312 void HWForm::NetStartGame()
   313 {
   313 {
   314 	hwnet->StartGame();
   314 	hwnet->StartGame();
   315 }
   315 }
   316 
   316 
   317 void HWForm::AddNetTeam(const QString& team)
   317 void HWForm::AddNetTeam(const HWTeam& team)
   318 {
   318 {
   319   ui.pageNetGame->pNetTeamsWidget->addTeam(team, true);
   319   ui.pageNetGame->pNetTeamsWidget->addTeam(team);
   320 }
   320 }
   321 
   321 
   322 void HWForm::StartMPGame()
   322 void HWForm::StartMPGame()
   323 {
   323 {
   324 	CreateGame(ui.pageMultiplayer->gameCFG);
   324 	CreateGame(ui.pageMultiplayer->gameCFG);