diff --git a/Motus/Main.qml b/Motus/Main.qml index 000a85bc047c8f514ffb663f81a0d0e50b0d2833..b736f0ae6981efe3d3e4c3dfd623918484c1512b 100644 --- a/Motus/Main.qml +++ b/Motus/Main.qml @@ -200,9 +200,15 @@ Window { MouseArea { anchors.fill: parent cursorShape: Qt.PointingHandCursor + enabled: motusGame.win || motusGame.loosetry || motusGame.loosetime || !motusGame.debut onClicked: { + // Début d'une partie, désactivation des boutons de régénération, etc. + motusGame.debut=true; mot = motusGame.getRandomWord(nb_lettres); + motusGame.setLoosetrybool(false); + motusGame.setLoosetimebool(false); + motusGame.setWinbool(false); motusGame.startTimer(); case3._textText = mot; mot_split = mot.split(""); diff --git a/Motus/motusgame.h b/Motus/motusgame.h index 8ed37439cc3eb9c4b4c3a7f40404e0b28a2f3f2f..eeebd32ac965935f833b87ccad544dfa28139a5a 100644 --- a/Motus/motusgame.h +++ b/Motus/motusgame.h @@ -83,6 +83,7 @@ private: bool loosetry = false; bool loosetime = false; bool win = false; + bool debut = false; void loadWords();