- Further work on stack of pages
authorunc0rr
Thu, 07 Dec 2006 21:24:58 +0000
changeset 290 09738170c557
parent 289 604c4a779c20
child 291 afa378f1e961
- Further work on stack of pages - Visible net game button ;)
QTfrontend/hwform.cpp
QTfrontend/pages.cpp
--- a/QTfrontend/hwform.cpp	Thu Dec 07 17:04:55 2006 +0000
+++ b/QTfrontend/hwform.cpp	Thu Dec 07 21:24:58 2006 +0000
@@ -83,7 +83,7 @@
 
 	connect(ui.pageInfo->BtnBack,	SIGNAL(clicked()),	this, SLOT(GoBack()));
 
-	ui.Pages->setCurrentIndex(ID_PAGE_MAIN);
+	GoToPage(ID_PAGE_MAIN);
 }
 
 void HWForm::UpdateTeamsLists()
@@ -130,7 +130,7 @@
 	  teamsList.push_back(team);
 	}
 	ui.pageMultiplayer->teamsSelect->resetPlayingTeams(teamsList);
-	ui.Pages->setCurrentIndex(ID_PAGE_MULTIPLAYER);
+	GoToPage(ID_PAGE_MULTIPLAYER);
 }
 
 void HWForm::GoToDemos()
@@ -142,7 +142,7 @@
 	ui.pagePlayDemo->DemosList->clear();
 	ui.pagePlayDemo->DemosList->addItems(tmpdir.entryList(QStringList("*.hwd_" + cProtoVer))
 			.replaceInStrings(QRegExp("^(.*).hwd_" + cProtoVer), "\\1"));
-	ui.Pages->setCurrentIndex(ID_PAGE_DEMOS);
+	GoToPage(ID_PAGE_DEMOS);
 }
 
 void HWForm::GoToNet()
@@ -171,7 +171,7 @@
 {
 	editedTeam = new HWTeam("unnamed");
 	editedTeam->SetToPage(this);
-	ui.Pages->setCurrentIndex(ID_PAGE_SETUP_TEAM);
+	GoToPage(ID_PAGE_SETUP_TEAM);
 }
 
 void HWForm::EditTeam()
@@ -179,7 +179,7 @@
 	editedTeam = new HWTeam(ui.pageOptions->CBTeamName->currentText());
 	editedTeam->LoadFromFile();
 	editedTeam->SetToPage(this);
-	ui.Pages->setCurrentIndex(ID_PAGE_SETUP_TEAM);
+	GoToPage(ID_PAGE_SETUP_TEAM);
 }
 
 void HWForm::TeamSave()
@@ -188,13 +188,13 @@
 	editedTeam->SaveToFile();
 	delete editedTeam;
 	UpdateTeamsLists();
-	ui.Pages->setCurrentIndex(ID_PAGE_SETUP);
+	GoBack();
 }
 
 void HWForm::TeamDiscard()
 {
 	delete editedTeam;
-	ui.Pages->setCurrentIndex(ID_PAGE_SETUP);
+	GoBack();
 }
 
 void HWForm::SimpleGame()
@@ -232,7 +232,7 @@
 void HWForm::NetDisconnect()
 {
 	hwnet->Disconnect();
-	GoToNet();
+	GoBack();
 }
 
 void HWForm::AddGame(const QString & chan)
@@ -242,7 +242,7 @@
 
 void HWForm::NetGameEnter()
 {
-	ui.Pages->setCurrentIndex(ID_PAGE_NETCFG);
+	GoToPage(ID_PAGE_NETCFG);
 }
 
 void HWForm::NetJoin()
--- a/QTfrontend/pages.cpp	Thu Dec 07 17:04:55 2006 +0000
+++ b/QTfrontend/pages.cpp	Thu Dec 07 21:24:58 2006 +0000
@@ -63,7 +63,6 @@
 	BtnNet->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
 	BtnNet->setFont(*font14);
 	BtnNet->setText(QPushButton::tr("Net game"));
-	BtnNet->setVisible(false);  // Temporary fix for 0.8 release due to broken net game support
 	pageLayout->addWidget(BtnNet, 3, 1);
 
 	BtnDemos = new QPushButton(this);