# HG changeset patch # User smxx # Date 1270749390 0 # Node ID 339b271d664194863ffef2fc8be99d22f50c1e8d # Parent 091cf214bdd577d394d1d6230f9b9667012bebfd Frontend: * Show a text notice instead of settings page's (disabled) modify team buttons while in a room or game setup screen diff -r 091cf214bdd5 -r 339b271d6641 QTfrontend/hwform.cpp --- a/QTfrontend/hwform.cpp Thu Apr 08 02:35:40 2010 +0000 +++ b/QTfrontend/hwform.cpp Thu Apr 08 17:56:30 2010 +0000 @@ -416,9 +416,11 @@ if (id == ID_PAGE_MULTIPLAYER || id == ID_PAGE_NETGAME) { QStringList tmNames = config->GetTeamsList(); TeamSelWidget* curTeamSelWidget; - ui.pageOptions->BtnNewTeam->setEnabled(false); - ui.pageOptions->BtnEditTeam->setEnabled(false); - ui.pageOptions->BtnDeleteTeam->setEnabled(false); + ui.pageOptions->BtnNewTeam->setVisible(false); + ui.pageOptions->BtnEditTeam->setVisible(false); + ui.pageOptions->BtnDeleteTeam->setVisible(false); + ui.pageOptions->CBTeamName->setVisible(false); + ui.pageOptions->LblNoEditTeam->setVisible(true); if(id == ID_PAGE_MULTIPLAYER) { curTeamSelWidget = ui.pageMultiplayer->teamsSelect; @@ -451,9 +453,11 @@ if(id == ID_PAGE_MAIN) { - ui.pageOptions->BtnNewTeam->setEnabled(true); - ui.pageOptions->BtnEditTeam->setEnabled(true); - ui.pageOptions->BtnDeleteTeam->setEnabled(true); + ui.pageOptions->BtnNewTeam->setVisible(true); + ui.pageOptions->BtnEditTeam->setVisible(true); + ui.pageOptions->BtnDeleteTeam->setVisible(true); + ui.pageOptions->CBTeamName->setVisible(true); + ui.pageOptions->LblNoEditTeam->setVisible(false); } // load and save ignore/friends lists diff -r 091cf214bdd5 -r 339b271d6641 QTfrontend/pages.cpp --- a/QTfrontend/pages.cpp Thu Apr 08 02:35:40 2010 +0000 +++ b/QTfrontend/pages.cpp Thu Apr 08 17:56:30 2010 +0000 @@ -425,6 +425,12 @@ BtnDeleteTeam->setMaximumWidth(pmDelete.width() + 6); GBTlayout->addWidget(BtnDeleteTeam, 0, 3); + LblNoEditTeam = new QLabel(teamsBox); + LblNoEditTeam->setText(tr("You can't edit teams from team selection. Go back to main menu to add, edit or delete teams.")); + LblNoEditTeam->setWordWrap(true); + LblNoEditTeam->setVisible(false); + GBTlayout->addWidget(LblNoEditTeam, 0, 0); + gbTBLayout->addWidget(teamsBox, 0, 0); } diff -r 091cf214bdd5 -r 339b271d6641 QTfrontend/pages.h --- a/QTfrontend/pages.h Thu Apr 08 02:35:40 2010 +0000 +++ b/QTfrontend/pages.h Thu Apr 08 17:56:30 2010 +0000 @@ -214,6 +214,7 @@ QPushButton *BtnNewTeam; QPushButton *BtnEditTeam; QPushButton *BtnDeleteTeam; + QLabel *LblNoEditTeam; QComboBox *CBTeamName; IconedGroupBox *AGGroupBox; QComboBox *CBResolution; diff -r 091cf214bdd5 -r 339b271d6641 share/hedgewars/Data/Sounds/Rope_hit.ogg Binary file share/hedgewars/Data/Sounds/Rope_hit.ogg has changed