QTfrontend/newnetclient.cpp
changeset 660 7c155e849602
parent 655 e58a77556878
child 697 44f167938201
equal deleted inserted replaced
659:5eafb20566f1 660:7c155e849602
   336   onFortsModeChanged(m_pGameCFGWidget->getGameFlags() & 0x1);
   336   onFortsModeChanged(m_pGameCFGWidget->getGameFlags() & 0x1);
   337 }
   337 }
   338 
   338 
   339 void HWNewNet::RunGame()
   339 void HWNewNet::RunGame()
   340 {
   340 {
   341   HWGame* game = new HWGame(config, m_pGameCFGWidget, m_pTeamSelWidget);
   341   emit AskForRunGame();
   342   connect(game, SIGNAL(GameStateChanged(GameState)), this, SIGNAL(GameStateChanged(GameState)));
       
   343   connect(game, SIGNAL(SendNet(const QByteArray &)), this, SLOT(SendNet(const QByteArray &)));
       
   344   connect(this, SIGNAL(FromNet(const QByteArray &)), game, SLOT(FromNet(const QByteArray &)));
       
   345   connect(game, SIGNAL(ErrorMessage(const QString &)), this, SLOT(ShowErrorMessage(const QString &)), Qt::QueuedConnection);
       
   346   game->StartNet();
       
   347 }
       
   348 
       
   349 void HWNewNet::ShowErrorMessage(const QString & msg)
       
   350 {
       
   351 	QMessageBox::warning(0,
       
   352 			"Hedgewars",
       
   353 			msg);
       
   354 }
   342 }
   355 
   343 
   356 void HWNewNet::onHedgehogsNumChanged(const HWTeam& team)
   344 void HWNewNet::onHedgehogsNumChanged(const HWTeam& team)
   357 {
   345 {
   358   RawSendNet(QString("HHNUM%1%2%1%3%1%4").arg(delimeter).arg(team.TeamName)\
   346   RawSendNet(QString("HHNUM%1%2%1%3%1%4").arg(delimeter).arg(team.TeamName)\