summaryrefslogtreecommitdiffstats
path: root/demos/declarative/samegame
diff options
context:
space:
mode:
Diffstat (limited to 'demos/declarative/samegame')
-rwxr-xr-xdemos/declarative/samegame/content/samegame.js5
-rw-r--r--demos/declarative/samegame/samegame.qml4
2 files changed, 7 insertions, 2 deletions
diff --git a/demos/declarative/samegame/content/samegame.js b/demos/declarative/samegame/content/samegame.js
index 09057eb..7deafde 100755
--- a/demos/declarative/samegame/content/samegame.js
+++ b/demos/declarative/samegame/content/samegame.js
@@ -22,6 +22,11 @@ function timeStr(msecs) {
return ret;
}
+function getTileSize()
+{
+ return tileSize;
+}
+
function initBoard()
{
for(var i = 0; i<maxIndex; i++){
diff --git a/demos/declarative/samegame/samegame.qml b/demos/declarative/samegame/samegame.qml
index ede4362..2d00208 100644
--- a/demos/declarative/samegame/samegame.qml
+++ b/demos/declarative/samegame/samegame.qml
@@ -23,8 +23,8 @@ Rectangle {
property int score: 0
z: 20; anchors.centerIn: parent
- width: parent.width - (parent.width % tileSize);
- height: parent.height - (parent.height % tileSize);
+ width: parent.width - (parent.width % getTileSize());
+ height: parent.height - (parent.height % getTileSize());
MouseRegion {
id: gameMR