The menu items trigger expected behaviour
authorHeli Hyvättinen <heli.hyvattinen@kymp.net>
Tue, 19 Jul 2011 12:59:01 +0000 (15:59 +0300)
committerHeli Hyvättinen <heli.hyvattinen@kymp.net>
Tue, 19 Jul 2011 12:59:01 +0000 (15:59 +0300)
Restart level and restart game made functional.
Settings prompts a temporary solution dialog asking whether vibration
effects should be enabled and acts on the answer.

seascene.cpp

index 9fed8d7..db31d78 100644 (file)
@@ -394,17 +394,26 @@ void SeaScene::handleScreenTapped()
     if (pItem == pRestartGameItem_)
     {
         qDebug() << "game restart requested";
+        restartGame();
     }
 
     else if (pItem == pRestartLevelItem_)
     {
         qDebug() << "Level restart requested";
+        restartLevel();
 
     }
 
     else if (pItem == pSettingsItem_)
     {
+    //Temporary code for settings, likely to be turned into a QML dialog
 
+          QMessageBox::StandardButton buttonpressed = QMessageBox::question(NULL,"Settings","Do you wish to have vibration effects enabled?", QMessageBox::Yes | QMessageBox::No);
+
+          if (buttonpressed == QMessageBox::Yes)
+              pVibrateAction_->setChecked(true);
+          if (buttonpressed == QMessageBox::No)
+              pVibrateAction_->setChecked(false);
     }
 
     else if (pItem == pAboutItem_)