This commit is contained in:
@@ -672,8 +672,8 @@ void mainWindowImpl::startNewLocalGame(newGameDialogImpl *v) {
|
||||
Tools::getRandNumber(0, gameData.numberOfPlayers-1, 1, &tmpDealerPos, 0);
|
||||
startData.startDealerPlayerId = static_cast<unsigned>(tmpDealerPos);
|
||||
|
||||
//remove ChatWindow
|
||||
tab_Chat->hide();
|
||||
//some gui modifications
|
||||
localGameModification();
|
||||
|
||||
//Start Game!!!
|
||||
mySession->startLocalGame(gameData, startData);
|
||||
@@ -720,7 +720,11 @@ void mainWindowImpl::callCreateNetworkGameDialog() {
|
||||
|
||||
|
||||
if (myStartNetworkGameDialog->result() == QDialog::Accepted ) {
|
||||
|
||||
//some gui modifications
|
||||
networkGameModification();
|
||||
myServerGuiInterface->getSession().initiateNetworkServerGame();
|
||||
|
||||
}
|
||||
else {
|
||||
mySession->terminateNetworkClient();
|
||||
@@ -731,7 +735,7 @@ void mainWindowImpl::callCreateNetworkGameDialog() {
|
||||
}
|
||||
|
||||
void mainWindowImpl::callJoinNetworkGameDialog() {
|
||||
|
||||
|
||||
myJoinNetworkGameDialog->exec();
|
||||
|
||||
if (myJoinNetworkGameDialog->result() == QDialog::Accepted ) {
|
||||
@@ -761,6 +765,10 @@ void mainWindowImpl::callJoinNetworkGameDialog() {
|
||||
if (myWaitingForServerGameDialog->result() == QDialog::Rejected) {
|
||||
mySession->terminateNetworkClient();
|
||||
}
|
||||
else {
|
||||
//some gui modifications
|
||||
networkGameModification();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2535,3 +2543,19 @@ void mainWindowImpl::closeEvent(QCloseEvent *event) {
|
||||
event->accept();
|
||||
|
||||
}
|
||||
|
||||
void mainWindowImpl::localGameModification() {
|
||||
|
||||
tabWidget_Left->setCurrentIndex(0);
|
||||
tabWidget_Left->disableTab(1, TRUE);
|
||||
|
||||
}
|
||||
|
||||
void mainWindowImpl::networkGameModification() {
|
||||
|
||||
tabWidget_Left->disableTab(1, FALSE);
|
||||
tabWidget_Left->setCurrentIndex(1);
|
||||
textBrowser_Chat->clear();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -245,6 +245,9 @@ public slots:
|
||||
void networkStart(boost::shared_ptr<Game> game);
|
||||
|
||||
void closeEvent(QCloseEvent*);
|
||||
|
||||
void localGameModification();
|
||||
void networkGameModification();
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -32,6 +32,7 @@ MyLeftTabWidget::~MyLeftTabWidget()
|
||||
void MyLeftTabWidget::startBlinkChatTab() { chatBlinkTimer->start(500); }
|
||||
void MyLeftTabWidget::stopBlinkChatTab() { chatBlinkTimer->stop(); }
|
||||
void MyLeftTabWidget::showDefaultChatTab() { myTabBar->setTabTextColor(1, QColor(240,240,240)); }
|
||||
void MyLeftTabWidget::disableTab(int tabIndex, bool yesNo) { myTabBar->setTabEnabled(tabIndex, !yesNo); }
|
||||
|
||||
void MyLeftTabWidget::blinkChatTab() {
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ public:
|
||||
void startBlinkChatTab();
|
||||
void stopBlinkChatTab();
|
||||
void showDefaultChatTab();
|
||||
void disableTab(int tabIndex, bool yesNO);
|
||||
|
||||
public slots:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user