summaryrefslogtreecommitdiffstats
path: root/examples/declarative/tutorials/samegame/samegame2/samegame.qml
diff options
context:
space:
mode:
Diffstat (limited to 'examples/declarative/tutorials/samegame/samegame2/samegame.qml')
-rw-r--r--examples/declarative/tutorials/samegame/samegame2/samegame.qml39
1 files changed, 39 insertions, 0 deletions
diff --git a/examples/declarative/tutorials/samegame/samegame2/samegame.qml b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
new file mode 100644
index 0000000..e446fa4
--- /dev/null
+++ b/examples/declarative/tutorials/samegame/samegame2/samegame.qml
@@ -0,0 +1,39 @@
+import Qt 4.6
+
+Rectangle {
+ id: Screen
+ width: 490; height: 720
+
+ SystemPalette { id: activePalette; colorGroup: Qt.Active }
+ Script { source: "samegame.js" }
+
+ Item {
+ width: parent.width; anchors.top: parent.top; anchors.bottom: ToolBar.top
+
+ Image {
+ id: background
+ anchors.fill: parent; source: "pics/background.png"
+ fillMode: "PreserveAspectCrop"
+ }
+ }
+
+ Rectangle {
+ id: ToolBar
+ color: activePalette.window
+ height: 32; width: parent.width
+ anchors.bottom: Screen.bottom
+
+ Button {
+ id: btnA; text: "New Game"; onClicked: initBoard();
+ anchors.left: parent.left; anchors.leftMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+
+ Text {
+ id: Score
+ text: "Score: Who knows?"; font.bold: true
+ anchors.right: parent.right; anchors.rightMargin: 3
+ anchors.verticalCenter: parent.verticalCenter
+ }
+ }
+}