2 files + 78 − 44 Side-by-side Compare changes Side-by-side Inline Show whitespace changes Files 2 applicationQT2048/MenuPage.qml +77 −40 Original line number Original line Diff line number Diff line Loading @@ -14,9 +14,19 @@ Rectangle { y:70 y:70 } } Text{ text: "Design du jeu" font.bold: true color:"grey" font.pixelSize: 25 anchors.horizontalCenter: parent.horizontalCenter y:120 } MenuBar{ MenuBar{ y:220 y:180 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter background: Rectangle { color: "#BBADA0"; radius: 5 } background: Rectangle { color: "#BBADA0"; radius: 5 } Loading @@ -25,7 +35,7 @@ Rectangle { MenuItem { MenuItem { text: "Arial" text: "Arial" background: Rectangle { color: "black"; radius: 5 } // Fond et coins arrondis background: Rectangle { color: "grey"; radius: 5 } // Fond et coins arrondis } } } } Loading @@ -33,7 +43,7 @@ Rectangle { } } MenuBar{ MenuBar{ y:300 y:240 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter background: Rectangle { color: "#BBADA0"; radius: 5 } background: Rectangle { color: "#BBADA0"; radius: 5 } Loading @@ -43,15 +53,20 @@ Rectangle { } } Text{ Rectangle { text: "Fonctionnalitées" color:"red" font.bold: true width: 90; height: 30 color:"grey" font.pixelSize: 25 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter y:150 y:300 radius:5 } MenuBar { MenuBar { anchors.horizontalCenter: parent.horizontalCenter y:350 background: Rectangle { color: "#BBADA0"; radius: 5 } Menu{ Menu{ title:"mode de jeu" title:"mode de jeu" Loading @@ -69,21 +84,24 @@ Rectangle { } } } } } Rectangle { Text{ text: "accès à l'historique des parties" width: 90; height: 30 color:"grey" font.pixelSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter y:250 y:390 radius:5 } MenuBar{ MenuBar{ anchors.horizontalCenter: parent.horizontalCenter y:450 background: Rectangle { color: "#BBADA0"; radius: 5 } Menu { Menu { title: "Charger une ancienne partie" title: "Charger une ancienne partie" Repeater { Repeater { model: gameManager.partieHistorique model: gameManager.partieHistorique MenuItem { MenuItem { Loading @@ -96,14 +114,33 @@ Rectangle { } } Rectangle { color:"#BBADA0" width: 150; height: 30 anchors.horizontalCenter: parent.horizontalCenter y:510 radius:5 Text{ anchors.centerIn: parent text: "Supprimer l'historique" color:"black" } MouseArea{ anchors.fill: parent onClicked: gameManager.supprimerHistorique() } } } Rectangle { Rectangle { color:"blue" color:"blue" width: 90; height: 30 width: 90; height: 30 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter y:510 y:560 radius:5 radius:5 Text{ Text{ Loading applicationQT2048/gamemanager.cpp +1 −4 Original line number Original line Diff line number Diff line Loading @@ -437,9 +437,8 @@ void GameManager::chargerPartie(QString partieName){ } } emit gridChanged(); // Notifiez que la grille a changé emit gridChanged(); // Notifiez que la grille a changé file.close(); file.close(); calculscore(); } } int GameManager::score() const { int GameManager::score() const { Loading @@ -448,8 +447,6 @@ int GameManager::score() const { void GameManager::calculscore(){ void GameManager::calculscore(){ if (m_gameOver) { // Si la partie est terminée, ne calcule pas le score if (m_gameOver) { // Si la partie est terminée, ne calcule pas le score return; return; Loading
applicationQT2048/MenuPage.qml +77 −40 Original line number Original line Diff line number Diff line Loading @@ -14,9 +14,19 @@ Rectangle { y:70 y:70 } } Text{ text: "Design du jeu" font.bold: true color:"grey" font.pixelSize: 25 anchors.horizontalCenter: parent.horizontalCenter y:120 } MenuBar{ MenuBar{ y:220 y:180 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter background: Rectangle { color: "#BBADA0"; radius: 5 } background: Rectangle { color: "#BBADA0"; radius: 5 } Loading @@ -25,7 +35,7 @@ Rectangle { MenuItem { MenuItem { text: "Arial" text: "Arial" background: Rectangle { color: "black"; radius: 5 } // Fond et coins arrondis background: Rectangle { color: "grey"; radius: 5 } // Fond et coins arrondis } } } } Loading @@ -33,7 +43,7 @@ Rectangle { } } MenuBar{ MenuBar{ y:300 y:240 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter background: Rectangle { color: "#BBADA0"; radius: 5 } background: Rectangle { color: "#BBADA0"; radius: 5 } Loading @@ -43,15 +53,20 @@ Rectangle { } } Text{ Rectangle { text: "Fonctionnalitées" color:"red" font.bold: true width: 90; height: 30 color:"grey" font.pixelSize: 25 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter y:150 y:300 radius:5 } MenuBar { MenuBar { anchors.horizontalCenter: parent.horizontalCenter y:350 background: Rectangle { color: "#BBADA0"; radius: 5 } Menu{ Menu{ title:"mode de jeu" title:"mode de jeu" Loading @@ -69,21 +84,24 @@ Rectangle { } } } } } Rectangle { Text{ text: "accès à l'historique des parties" width: 90; height: 30 color:"grey" font.pixelSize: 20 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter y:250 y:390 radius:5 } MenuBar{ MenuBar{ anchors.horizontalCenter: parent.horizontalCenter y:450 background: Rectangle { color: "#BBADA0"; radius: 5 } Menu { Menu { title: "Charger une ancienne partie" title: "Charger une ancienne partie" Repeater { Repeater { model: gameManager.partieHistorique model: gameManager.partieHistorique MenuItem { MenuItem { Loading @@ -96,14 +114,33 @@ Rectangle { } } Rectangle { color:"#BBADA0" width: 150; height: 30 anchors.horizontalCenter: parent.horizontalCenter y:510 radius:5 Text{ anchors.centerIn: parent text: "Supprimer l'historique" color:"black" } MouseArea{ anchors.fill: parent onClicked: gameManager.supprimerHistorique() } } } Rectangle { Rectangle { color:"blue" color:"blue" width: 90; height: 30 width: 90; height: 30 anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter y:510 y:560 radius:5 radius:5 Text{ Text{ Loading
applicationQT2048/gamemanager.cpp +1 −4 Original line number Original line Diff line number Diff line Loading @@ -437,9 +437,8 @@ void GameManager::chargerPartie(QString partieName){ } } emit gridChanged(); // Notifiez que la grille a changé emit gridChanged(); // Notifiez que la grille a changé file.close(); file.close(); calculscore(); } } int GameManager::score() const { int GameManager::score() const { Loading @@ -448,8 +447,6 @@ int GameManager::score() const { void GameManager::calculscore(){ void GameManager::calculscore(){ if (m_gameOver) { // Si la partie est terminée, ne calcule pas le score if (m_gameOver) { // Si la partie est terminée, ne calcule pas le score return; return; Loading