summaryrefslogtreecommitdiff
path: root/qml/pages/Point.qml
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2014-08-24 12:52:10 +0200
committerSébastien Dailly <sebastien@chimrod.com>2014-08-24 12:52:10 +0200
commit6c2cc134abf3f32d1d6ec172c6201f8d990c88ab (patch)
tree98b03151505f8fc058977f906e93e9a799b02217 /qml/pages/Point.qml
Initial commit
Diffstat (limited to 'qml/pages/Point.qml')
-rw-r--r--qml/pages/Point.qml29
1 files changed, 29 insertions, 0 deletions
diff --git a/qml/pages/Point.qml b/qml/pages/Point.qml
new file mode 100644
index 0000000..f610461
--- /dev/null
+++ b/qml/pages/Point.qml
@@ -0,0 +1,29 @@
+import QtQuick 2.0
+
+import "../actions.js" as Actions
+
+Item {
+
+ property string type: "";
+
+ function getImageForType() {
+ if ("" === type) {
+ return ""
+ }
+
+ return "../content/gfx/" + type + ".png"
+ }
+
+ MouseArea {
+
+ id: interactiveArea
+ anchors.fill: parent
+ onClicked: clickHandler(index);
+ }
+
+ Image {
+ id: piece
+ anchors.fill: parent
+ source: getImageForType();
+ }
+}