void MainWgt::on_pbBackFromGame_clicked() { if (isSound()){ moMainTheme->stop(); } emit gameOver(false); placeSemkoTimer->stop(); stacked->slideInIdx(stacked->indexOf(pMenu)); }
void Note::displayNote() { if(isSound()) { playWav(); } QMessageBox::information(parent ,strTitle, strDetails, QMessageBox::Ok) ; }
void MainWgt::startGame() { if (isSound()){ moMainTheme->play(); } placeSemkoTimer->stop(); placeTimerInterval = 1000; placeSemkoTimer->setInterval(placeTimerInterval); nextLevelCount = nextLevelIncrement; semkoInterval = 30; scene->setSceneRect(0, 0, 10, 10); ui->lcdSluzgano->display(0); ui->lcdUnluzged->display ( lives ); placeSemkoTimer->start(); }
void MainWgt::slotGameOver(bool isWinner) { placeSemkoTimer->stop(); QApplication::processEvents(); if (isSound()){ moMainTheme->stop(); moGameOver->play(); } QString name = QInputDialog::getText(this,tr("Game over!"), tr("Enter your name")); if (name.isEmpty()){ on_pbBackFromGame_clicked(); return; } results.insert(ui->lcdSluzgano->intValue(), name); saveResults(); updateResultsList(); on_pbResults_clicked(); }