demos/declarative/minehunt/minehunt.qml
changeset 37 758a864f9613
parent 30 5dc02b23752f
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
    47     property int clickx: 0
    47     property int clickx: 0
    48     property int clicky: 0
    48     property int clicky: 0
    49 
    49 
    50     width: 450; height: 450
    50     width: 450; height: 450
    51 
    51 
    52     Image { source: "MinehuntCore/pics/No-Ones-Laughing-3.jpg"; anchors.fill: parent; fillMode: Image.Tile }
    52     Image { source: "MinehuntCore/pics/background.png"; anchors.fill: parent; fillMode: Image.Tile }
    53 
    53 
    54     Grid {
    54     Grid {
    55         anchors.horizontalCenter: parent.horizontalCenter
    55         anchors.horizontalCenter: parent.horizontalCenter
    56         columns: 9; spacing: 1
    56         columns: 9; spacing: 1
    57 
    57 
    65     Row {
    65     Row {
    66         id: gamedata
    66         id: gamedata
    67         x: 20; spacing: 20
    67         x: 20; spacing: 20
    68         anchors.bottom: field.bottom; anchors.bottomMargin: 15
    68         anchors.bottom: field.bottom; anchors.bottomMargin: 15
    69 
    69 
       
    70         Image {
       
    71             source: "MinehuntCore/pics/quit.png"
       
    72             scale: quitMouse.pressed ? 0.8 : 1.0
       
    73             smooth: quitMouse.pressed
       
    74             y: 10
       
    75             MouseArea {
       
    76                 id: quitMouse
       
    77                 anchors.fill: parent
       
    78                 anchors.margins: -20
       
    79                 onClicked: Qt.quit()
       
    80             }
       
    81         }
    70         Column {
    82         Column {
    71             spacing: 2
    83             spacing: 2
    72             Image { source: "MinehuntCore/pics/bomb-color.png" }
    84             Image { source: "MinehuntCore/pics/bomb-color.png" }
    73             Text { anchors.horizontalCenter: parent.horizontalCenter; color: "white"; text: numMines }
    85             Text { anchors.horizontalCenter: parent.horizontalCenter; color: "white"; text: numMines }
    74         }
    86         }