# HG changeset patch # User unc0rr # Date 1165526698 0 # Node ID 09738170c557041433278dfbbdf1202c4102e915 # Parent 604c4a779c20367b388b5e6b4f16818cdec15f04 - Further work on stack of pages - Visible net game button ;) diff -r 604c4a779c20 -r 09738170c557 QTfrontend/hwform.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() diff -r 604c4a779c20 -r 09738170c557 QTfrontend/pages.cpp --- 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);