💄 Added dialog for starting a new game

main
Isabell Pflug 1 year ago
parent b016f77cae
commit e3c2f36358

@ -10,7 +10,12 @@ void MainWindow::buttonPressed(QPushButton *button) {
}
void MainWindow::newGame() {
initialiseGame();
QMessageBox newGameDialog;
newGameDialog.setText("Do you really want to start a new game?");
newGameDialog.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
if (newGameDialog.exec() == QMessageBox::Yes) {
initialiseGame();
}
}
// initialisation functions

@ -7,6 +7,7 @@
#include <QDebug>
#include <QGenericMatrix>
#include <QMainWindow>
#include <QMessageBox>
#include <QPushButton>
#include <QSettings>

Loading…
Cancel
Save