Skip to content

Сделать клетки переворачиваемыми #1

@Kaffeine

Description

@Kaffeine
Item {
    id: cellItem
    width: 48
    height: 32
    property Cell cell: field.cellAt(index % field.width, index / field.width)

    Flipable {
        anchors.fill: parent

        front: Rectangle {
            anchors.fill: parent
        }

        back: Item {
            anchors.fill: parent
            Text {
                anchors.centerIn: parent
                text: cell.key
            }
            Image{
                anchors.centerIn: parent
                width:40
                height:40
                id:image5
                source: "qrc:///smeshariki/" + cell.key + ".png"
            }
        }

        transform: Rotation {
            origin.x: cellItem.width / 2
            origin.y: cellItem.height / 2
            axis.x: 1; axis.y: 0; axis.z: 0
            angle: 0
            Behavior on angle { NumberAnimation { duration: 400; easing.type: Easing.OutBack } }
        }
    }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions