diff options
Diffstat (limited to 'demos/declarative/minehunt')
-rw-r--r-- | demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg | bin | 30730 -> 0 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/MinehuntCore/pics/background.png | bin | 0 -> 313930 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/MinehuntCore/pics/quit.png | bin | 0 -> 583 bytes | |||
-rw-r--r-- | demos/declarative/minehunt/main.cpp | 1 | ||||
-rw-r--r-- | demos/declarative/minehunt/minehunt.qml | 14 |
5 files changed, 14 insertions, 1 deletions
diff --git a/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg b/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg Binary files differdeleted file mode 100644 index 445567f..0000000 --- a/demos/declarative/minehunt/MinehuntCore/pics/No-Ones-Laughing-3.jpg +++ /dev/null diff --git a/demos/declarative/minehunt/MinehuntCore/pics/background.png b/demos/declarative/minehunt/MinehuntCore/pics/background.png Binary files differnew file mode 100644 index 0000000..3734a27 --- /dev/null +++ b/demos/declarative/minehunt/MinehuntCore/pics/background.png diff --git a/demos/declarative/minehunt/MinehuntCore/pics/quit.png b/demos/declarative/minehunt/MinehuntCore/pics/quit.png Binary files differnew file mode 100644 index 0000000..b822057 --- /dev/null +++ b/demos/declarative/minehunt/MinehuntCore/pics/quit.png diff --git a/demos/declarative/minehunt/main.cpp b/demos/declarative/minehunt/main.cpp index fc223dd..8bbaee9 100644 --- a/demos/declarative/minehunt/main.cpp +++ b/demos/declarative/minehunt/main.cpp @@ -59,6 +59,7 @@ int main(int argc, char *argv[]) #endif canvas.engine()->rootContext()->setContextObject(game); canvas.setSource(QString("minehunt.qml")); + QObject::connect(canvas.engine(), SIGNAL(quit()), &app, SLOT(quit())); #ifdef Q_OS_SYMBIAN canvas.showFullScreen(); diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml index 136f56a..4accb52 100644 --- a/demos/declarative/minehunt/minehunt.qml +++ b/demos/declarative/minehunt/minehunt.qml @@ -49,7 +49,7 @@ Item { width: 450; height: 450 - Image { source: "MinehuntCore/pics/No-Ones-Laughing-3.jpg"; anchors.fill: parent; fillMode: Image.Tile } + Image { source: "MinehuntCore/pics/background.png"; anchors.fill: parent; fillMode: Image.Tile } Grid { anchors.horizontalCenter: parent.horizontalCenter @@ -67,6 +67,18 @@ Item { x: 20; spacing: 20 anchors.bottom: field.bottom; anchors.bottomMargin: 15 + Image { + source: "MinehuntCore/pics/quit.png" + scale: quitMouse.pressed ? 0.8 : 1.0 + smooth: quitMouse.pressed + y: 10 + MouseArea { + id: quitMouse + anchors.fill: parent + anchors.margins: -20 + onClicked: Qt.quit() + } + } Column { spacing: 2 Image { source: "MinehuntCore/pics/bomb-color.png" } |