363 hwnet=0; |
363 hwnet=0; |
364 } |
364 } |
365 ui.pageNetGame->pChatWidget->clear(); |
365 ui.pageNetGame->pChatWidget->clear(); |
366 hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget); |
366 hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget); |
367 |
367 |
368 connect(hwnet, SIGNAL(GameStateChanged(GameState)), this, SLOT(NetGameStateChanged(GameState))); |
368 connect(hwnet, SIGNAL(AskForRunGame()), this, SLOT(CreateNetGame())); |
369 connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter())); |
369 connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter())); |
370 connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&))); |
370 connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&))); |
371 |
371 |
372 connect(hwnet, SIGNAL(chatStringFromNet(const QStringList&)), |
372 connect(hwnet, SIGNAL(chatStringFromNet(const QStringList&)), |
373 ui.pageNetGame->pChatWidget, SLOT(onChatStringFromNet(const QStringList&))); |
373 ui.pageNetGame->pChatWidget, SLOT(onChatStringFromNet(const QStringList&))); |
488 CreateGame(ui.pageMultiplayer->gameCFG, ui.pageMultiplayer->teamsSelect); |
491 CreateGame(ui.pageMultiplayer->gameCFG, ui.pageMultiplayer->teamsSelect); |
489 |
492 |
490 game->StartLocal(); |
493 game->StartLocal(); |
491 } |
494 } |
492 |
495 |
493 void HWForm::NetGameStateChanged(GameState __attribute__((unused)) gameState) |
|
494 { |
|
495 ui.pageNetGame->BtnGo->setText(QPushButton::tr("Go!")); |
|
496 ui.pageNetGame->BtnGo->setEnabled(true); |
|
497 } |
|
498 |
|
499 void HWForm::GameStateChanged(GameState gameState) |
496 void HWForm::GameStateChanged(GameState gameState) |
500 { |
497 { |
501 switch(gameState) { |
498 switch(gameState) { |
502 case gsStarted: { |
499 case gsStarted: { |
503 ui.pageGameStats->labelGameStats->setText(""); |
500 ui.pageGameStats->labelGameStats->setText(""); |