QGraphicsItem* pItem = items.at(0); //Selecting an item brings here, thus only selecting one item should be possible
//... so we can just take the first one
+ //Selection is just used to get notice of a menu item being clicked, removed after use
+
+ clearSelection();
+
+
+ //Act upon the selected item
+
if (pItem == pRestartGameItem_)
{
qDebug() << "game restart requested";
restartGame();
+ pPauseAction_->setChecked(false); //unpause game
+
}
else if (pItem == pRestartLevelItem_)
{
qDebug() << "Level restart requested";
restartLevel();
+ pPauseAction_->setChecked(false); //unpause game
}
{
qApp->quit();
}
-
-
-
- //Selection is just used to get notice of a menu item being clicked, removed after use
-
- clearSelection();
-
- //The user propably went to paused state just to access menu, so unpause unless vibration set (so the user sees its changed)
- //or unless status bar was requested
- if (pItem != pMinimizeItem_ || pItem != pSettingsItem_)
-
- {
- pPauseAction_->setChecked(false);
- }
}