summaryrefslogtreecommitdiff
path: root/qml/pages/Point.qml
blob: f6104616692cac0083645fe1351e9ab2a1ebcc50 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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();
    }
}