diff --git a/src/gui/qt/mainwindow/mainwindowimpl.cpp b/src/gui/qt/mainwindow/mainwindowimpl.cpp index fdca29e8..0bf97c77 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.cpp +++ b/src/gui/qt/mainwindow/mainwindowimpl.cpp @@ -264,6 +264,8 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent) potDistributeTimer = new QTimer(this); postRiverRunAnimation6Timer = new QTimer(this); + blinkingStartButtonAnimationTimer = new QTimer(this); + dealFlopCards0Timer->setSingleShot(TRUE); dealFlopCards1Timer->setSingleShot(TRUE); dealFlopCards2Timer->setSingleShot(TRUE); @@ -525,6 +527,8 @@ mainWindowImpl::mainWindowImpl(QMainWindow *parent) connect(postRiverRunAnimation5Timer, SIGNAL(timeout()), this, SLOT( postRiverRunAnimation6() )); connect(postRiverRunAnimation6Timer, SIGNAL(timeout()), this, SLOT( startNewHand() )); + connect(blinkingStartButtonAnimationTimer, SIGNAL(timeout()), this, SLOT( blinkingStartButtonAnimationAction())); + connect( actionNewGame, SIGNAL( triggered() ), this, SLOT( callNewGameDialog() ) ); connect( actionAboutPokerth, SIGNAL( triggered() ), this, SLOT( callAboutPokerthDialog() ) ); connect( actionSettings, SIGNAL( triggered() ), this, SLOT( callSettingsDialog() ) ); @@ -1999,6 +2003,8 @@ void mainWindowImpl::startNewHand() { pushButton_break->setDisabled(FALSE); pushButton_break->setText("Start"); breakAfterActualHand=FALSE; + + blinkingStartButtonAnimationTimer->start(500); } } @@ -2111,6 +2117,13 @@ void mainWindowImpl::breakButtonClicked() { breakAfterActualHand=TRUE; } else { + blinkingStartButtonAnimationTimer->stop(); + //Set default Color + QPalette tempPalette = pushButton_break->palette(); + tempPalette.setColor(QPalette::Button, QColor(40,82,0)); + tempPalette.setColor(QPalette::ButtonText, QColor(240,240,240)); + pushButton_break->setPalette(tempPalette); + pushButton_break->setText("Stop"); startNewHand(); } @@ -2326,9 +2339,15 @@ void mainWindowImpl::switchFullscreen() { void mainWindowImpl::blinkingStartButtonAnimationAction() { -// QPalette tempPalette = groupBoxArray[i]->palette(); -// tempPalette.setColor(QPalette::Window, inactive); -// groupBoxArray[i]->setPalette(tempPalette); -// pushButton_break-> -// pushButton_break-> -} \ No newline at end of file + QPalette tempPalette = pushButton_break->palette(); + + if(tempPalette.color(QPalette::Button).red()==40) { + tempPalette.setColor(QPalette::Button, QColor(113,162,0)); + tempPalette.setColor(QPalette::ButtonText, QColor(0,0,0)); + } + else { + tempPalette.setColor(QPalette::Button, QColor(40,82,0)); + tempPalette.setColor(QPalette::ButtonText, QColor(240,240,240)); + } + pushButton_break->setPalette(tempPalette); +} diff --git a/src/gui/qt/mainwindow/mainwindowimpl.h b/src/gui/qt/mainwindow/mainwindowimpl.h index e05f0968..e5b1718a 100755 --- a/src/gui/qt/mainwindow/mainwindowimpl.h +++ b/src/gui/qt/mainwindow/mainwindowimpl.h @@ -167,9 +167,7 @@ public slots: void postRiverRunAnimation5(); void postRiverRunAnimation6(); -// void blinkingStartButtonAnimationStart(); void blinkingStartButtonAnimationAction(); -// void blinkingStartButtonAnimationStop(); void flipHolecardsAllIn(); void showMyCards(); @@ -262,7 +260,10 @@ private: QTimer *postRiverRunAnimation3Timer; QTimer *postRiverRunAnimation5Timer; QTimer *postRiverRunAnimation6Timer; + + QTimer *blinkingStartButtonAnimationTimer; + QWidget *userWidgetsArray[4]; QLabel *buttonLabelArray[MAX_NUMBER_OF_PLAYERS]; QLabel *cashLabelArray[MAX_NUMBER_OF_PLAYERS];