void universal::forwardMatchGame() { if(spacebarFlag == true && ui->matchThis->text() == stringList.at(i)) { if(ui->matchThis->text() == ui->userEntry->text() && ui->matchThis->text() == stringList.at(i)) { // This prevents list from going out of bounds. if(correctForward < stopAtNumber -1 ) { if(gameOnFlag) { finishedPlayed = false; gameOn(); } if(ui->fadeOut->isChecked() || ui->fadeOutIn->isChecked()) startGraphicsEffects(); if(colorHighlightFlag) colorHighOff(); if(lineHighlightFlag) lineHighOff(); ui->matchThis->setText(stringList.at(++i)); ++num; set_Match_StyleSheet(); } ++correctForward; forwardIsKeyPressed(); if(colorHighlightFlag) colorHighOn(); if(lineHighlightFlag) lineHighOn(); displayMessages(); } else ++incorrectForward; } /* Last letter, calling farewell greeting, turning tutorial and spacebar off, and reseting for next time. */ if(correctForward == stopAtNumber && spacebarFlag == true ) { spacebarFlag = false; completedTheGame = true; matchGameDisable(); set_Match_StyleSheet(); QTimer::singleShot(2000, this, SLOT( wouldYouLikeToPlayAgain() )); killTimer(); if(ui->fadeOut->isChecked() || ui->fadeOutIn->isChecked()) startGraphicsEffects(); // Game over animation for Extreme Keyboard -> fade. if(gameOnFlag) { finishedPlayed = false; gameOn(); } if(ui->rbUppercase->isChecked()) { ui->h4_2->hide(); ui->v1->hide(); ui->labelCorrect->setNum(26); isKeyPressed52 = true; changeColorBack52(); if(imageFlagKeys == "1") { ui->img26->show(); ui->img26->setMovie(&movieKeys); } } if( ui->rbLowercase->isChecked()) { ui->h4->hide(); ui->v19->hide(); ui->labelCorrect->setNum(26); isKeyPressed26 = true; changeColorBack26(); if(imageFlagKeys == "1") { ui->img26->show(); ui->img26->setMovie(&movieKeys); } } if( ui->rbNumberLine->isChecked() ) { ui->h4_2->hide(); ui->v24->hide(); ui->labelCorrect->setNum(42); isKeyPressed94 = true; changeColorBack94(); if(imageFlagKeys == "1") { ui->img47->show(); ui->img47->setMovie(&movieKeys); } } if( ui->rbEverything->isChecked()) { ui->h4_2->hide(); ui->v24->hide(); ui->labelCorrect->setNum(94); isKeyPressed94 = true; changeColorBack94(); if(imageFlagKeys == "1") { ui->img47->show(); ui->img47->setMovie(&movieKeys); } } stopCounter(); ui->labelCorrect->setStyleSheet("background-color: transparent; font-style:italic;"); ui->labelIncorrect->setStyleSheet("background-color: transparent; font-style:italic;"); } else { QTimer::singleShot(speedtimer, this, SLOT(clearUserEntryLabel())); ui->labelCorrect->setNum(correctForward); ui->labelIncorrect->setNum(incorrectForward); } }