QTfrontend/hwform.cpp
changeset 1311 49beb1221c0b
parent 1310 4616e15d566f
child 1312 0078e4f72d40
--- a/QTfrontend/hwform.cpp	Mon Oct 06 19:01:59 2008 +0000
+++ b/QTfrontend/hwform.cpp	Tue Oct 07 12:37:06 2008 +0000
@@ -400,10 +400,13 @@
 		delete hwnet;
 		hwnet=0;
 	}
+	
 	ui.pageNetGame->pChatWidget->clear();
+	
 	hwnet = new HWNewNet(config, ui.pageNetGame->pGameCFG, ui.pageNetGame->pNetTeamsWidget);
 
 	connect(hwnet, SIGNAL(AskForRunGame()), this, SLOT(CreateNetGame()));
+	connect(hwnet, SIGNAL(Connected()), this, SLOT(NetConnected()));
 	connect(hwnet, SIGNAL(EnteredGame()), this, SLOT(NetGameEnter()));
 	connect(hwnet, SIGNAL(AddNetTeam(const HWTeam&)), this, SLOT(AddNetTeam(const HWTeam&)));
 
@@ -514,6 +517,11 @@
   GoBack();
 }
 
+void HWForm::NetConnected()
+{
+	GoToPage(ID_PAGE_ROOMSLIST);
+}
+
 void HWForm::NetGameEnter()
 {
 	GoToPage(ID_PAGE_NETCFG);
@@ -521,9 +529,9 @@
 
 void HWForm::NetStartGame()
 {
-  ui.pageNetGame->BtnGo->setText(QPushButton::tr("Waiting"));
-  ui.pageNetGame->BtnGo->setEnabled(false);
-  hwnet->StartGame();
+	ui.pageNetGame->BtnGo->setText(QPushButton::tr("Waiting"));
+	ui.pageNetGame->BtnGo->setEnabled(false);
+	hwnet->Ready();
 }
 
 void HWForm::AddNetTeam(const HWTeam& team)