Show correct maximum player count in network games.

This commit is contained in:
lotodore
2007-10-20 22:34:14 +00:00
parent 4bc57f07d0
commit 64ba7c0994
3 changed files with 10 additions and 3 deletions
@@ -45,9 +45,6 @@ startNetworkGameDialogImpl::startNetworkGameDialogImpl(QWidget *parent, ConfigFi
void startNetworkGameDialogImpl::exec() {
GameInfo info = mySession->getClientGameInfo(0);
label_maxPlayerNumber->setText(QString::number(info.data.maxNumberOfPlayers));
QDialog::exec();
}
@@ -132,6 +129,12 @@ void startNetworkGameDialogImpl::newGameAdmin(unsigned playerId, QString)
}
}
void startNetworkGameDialogImpl::gameCreated(unsigned /*gameId*/)
{
GameInfo info = mySession->getClientGameInfo(0);
label_maxPlayerNumber->setText(QString::number(info.data.maxNumberOfPlayers));
}
void startNetworkGameDialogImpl::playerSelected(QTreeWidgetItem* item, QTreeWidgetItem*) {
if (item)
@@ -183,6 +186,7 @@ void startNetworkGameDialogImpl::clearDialog()
treeWidget->clear();
myChat->clearChat();
checkBox_fillUpWithComputerOpponents->hide();
label_maxPlayerNumber->setText(QString::number(0));
myPlayerId = 0;
}