# HG changeset patch # User kragniz # Date 1325147704 -3600 # Node ID 3222bb0612ca873eeef03bfbd4a01fc271593f16 # Parent 5a1f49d84d95be8f12b59f932bb50b50dcae6e9a GCI task: idea diff -r 5a1f49d84d95 -r 3222bb0612ca QTfrontend/net/newnetclient.cpp --- a/QTfrontend/net/newnetclient.cpp Thu Dec 29 09:29:56 2011 +0100 +++ b/QTfrontend/net/newnetclient.cpp Thu Dec 29 09:35:04 2011 +0100 @@ -81,6 +81,9 @@ RawSendNet(QString("CREATE_ROOM%1%2").arg(delimeter).arg(room)); isChief = true; + + //set our ready status to be true + RawSendNet(QString("TOGGLE_READY")); } void HWNewNet::JoinRoom(const QString & room) @@ -167,7 +170,7 @@ } void HWNewNet::OnConnect() -{ +{ netClientState = Connected; } @@ -341,8 +344,10 @@ { for(int i = 2; i < lst.size(); ++i) { - if (lst[i] == mynick) + if (lst[i] == mynick) { emit setMyReadyStatus(setFlag); + } + emit setReadyStatus(lst[i], setFlag); } } diff -r 5a1f49d84d95 -r 3222bb0612ca QTfrontend/ui/page/pagenetgame.cpp --- a/QTfrontend/ui/page/pagenetgame.cpp Thu Dec 29 09:29:56 2011 +0100 +++ b/QTfrontend/ui/page/pagenetgame.cpp Thu Dec 29 09:35:04 2011 +0100 @@ -67,6 +67,7 @@ leRoomName->setMinimumWidth(200); leRoomName->setMaximumWidth(400); + //Button to signify whether the player is ready to start playing BtnGo = new QPushButton(this); BtnGo->setToolTip(QPushButton::tr("Ready")); BtnGo->setIcon(QIcon(":/res/lightbulb_off.png")); @@ -74,7 +75,6 @@ BtnGo->setMinimumWidth(50); BtnGo->setMinimumHeight(50); - bottomLayout->addWidget(leRoomName); BtnUpdate = addButton(QAction::tr("Update"), bottomLayout, 1); @@ -172,6 +172,10 @@ BtnStart->setVisible(isMaster); BtnUpdate->setVisible(isMaster); leRoomName->setVisible(isMaster); + + //disable the `toggle ready` button, because the start button does the same + //job when the user is chief + BtnGo->setVisible(!isMaster); } void PageNetGame::setUser(const QString & nickname)