Skip to content
Snippets Groups Projects
Select Git revision
  • c615c53525ba3f8d1b039e566af9a53037c3af99
  • main default protected
2 results

Main.qml

Blame
  • Main.qml 2.84 KiB
    import QtQuick
    
    
    Window {
        visible: true
        width: 400
        height: 500
        title: qsTr("Application 2048")
    
        Rectangle{
            width:150;height:150
            color:"orange"
            x:25
            y:10
        }
    
        Rectangle{
    
            color:"black"
            width: 90; height: 50
            x:270
            y:10
            radius:10
    
            Text{
                text: "meilleur score"
                color:"white"
                anchors.horizontalCenter: parent.horizontalCenter
                y:5
    
            }
    
            Text{
                id: bestScore
                text:"0"
                color:"white"
                font.bold: true
                font.pixelSize: 20
                anchors.horizontalCenter: parent.horizontalCenter
                y:20
    
            }
        }
    
        Rectangle {
            id: buttonNew
            color:"#F65E3B"
            width: 90; height: 40
            x:160
            y:65
            radius:10
    
            Text{
                id: buttonLabel
                anchors.centerIn: parent
                text: "NOUVEAU "
                color:"white"
                font.bold: true
            }
    
            MouseArea{
                id: buttonMouseArea
    
                anchors.fill: parent //anchor all sides of the mouse area to the rectangle's anchors
                    //onClicked handles valid mouse button clicks
                onClicked: gameManager.restartGame()
            }
        }
    
        Rectangle {