Juicy Squash - Match-3 Game
import Felgo 4.0
import QtQuick 2.0
Item {
id: titleWindow
width: 304
height: 263
visible: opacity > 0
enabled: opacity == 1
signal startClicked()
signal creditsClicked()
signal vplayClicked()
Image {
source: Qt.resolvedUrl("../../assets/img/TitleWindow.png")
anchors.fill: parent
}
Text {
id: playButton
font.family: gameFont.name
font.pixelSize: 23
color: "red"
text: "play!"
anchors.horizontalCenter: parent.horizontalCenter
anchors.bottom: parent.bottom
anchors.bottomMargin: 72
anchors.horizontalCenterOffset: 6
MouseArea {
anchors.fill: parent
onClicked: startClicked()
}
SequentialAnimation on color {
loops: Animation.Infinite
PropertyAnimation {
to: "#ff8800"
duration: 1000
}
PropertyAnimation {
to: "red"
duration: 1000
}
}
}
JuicyButton {
text: "credits"
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.bottom
anchors.topMargin: -10
onClicked: creditsClicked()
}
MouseArea {
width: parent.width - 130
height: 25
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.bottomMargin: 25
anchors.leftMargin: 75
onClicked: vplayClicked()
}
MouseArea {
width: 60
height: 60
anchors.left: parent.left
anchors.bottom: parent.bottom
anchors.bottomMargin: 15
anchors.leftMargin: 15
onClicked: vplayClicked()
}
Behavior on opacity {
NumberAnimation { duration: 400 }
}
function show() {
titleWindow.opacity = 1
}
function hide() {