From 6c2cc134abf3f32d1d6ec172c6201f8d990c88ab Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Sun, 24 Aug 2014 12:52:10 +0200 Subject: Initial commit --- qml/pages/Point.qml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 qml/pages/Point.qml (limited to 'qml/pages/Point.qml') 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(); + } +} -- cgit v1.2.3