2018-02-13 08:53:53 -05:00
|
|
|
import QtQuick 2.0
|
2018-02-22 08:03:26 -05:00
|
|
|
import QtMultimedia 5.8
|
2018-02-13 08:53:53 -05:00
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
anchors.fill: parent
|
|
|
|
|
|
|
|
Image {
|
|
|
|
source: 'images/backdrop.jpg'
|
|
|
|
anchors.fill: parent
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
id: logo
|
|
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.top: parent.top
|
|
|
|
anchors.topMargin: 20
|
|
|
|
|
|
|
|
color: Qt.rgba(1, 1, 1, 0.5)
|
|
|
|
|
|
|
|
width: parent.width
|
|
|
|
height: logoImage.height
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: logoImage
|
|
|
|
source: 'images/logo.png'
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-13 23:22:15 -05:00
|
|
|
Column {
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
width: parent.width
|
2018-02-14 08:53:52 -05:00
|
|
|
spacing: 10
|
2018-02-13 23:22:15 -05:00
|
|
|
|
2018-02-15 08:57:36 -05:00
|
|
|
MenuButton {
|
|
|
|
buttonText: "New Game"
|
|
|
|
function actionOnClick() {
|
|
|
|
appPage.source = "Board.qml"
|
2018-02-14 08:53:52 -05:00
|
|
|
}
|
2018-02-15 08:57:36 -05:00
|
|
|
}
|
2018-02-13 23:22:15 -05:00
|
|
|
|
2018-02-15 08:57:36 -05:00
|
|
|
MenuButton {
|
|
|
|
buttonText: "Open Game"
|
|
|
|
// disabled: true
|
|
|
|
}
|
2018-02-13 08:53:53 -05:00
|
|
|
|
2018-02-15 08:57:36 -05:00
|
|
|
MenuButton {
|
|
|
|
buttonText: "Save Game"
|
|
|
|
// disabled: true
|
2018-02-22 08:03:26 -05:00
|
|
|
function actionOnClick() {
|
|
|
|
pingSound.seek(0)
|
|
|
|
pingSound.play()
|
|
|
|
}
|
|
|
|
|
|
|
|
// From: https://freesound.org/people/edsward/sounds/341871/
|
|
|
|
Audio {
|
|
|
|
id: pingSound
|
|
|
|
source: 'assets/ping.wav'
|
|
|
|
autoLoad: true
|
|
|
|
}
|
2018-02-15 08:57:36 -05:00
|
|
|
}
|
2018-02-13 23:22:15 -05:00
|
|
|
|
2018-02-15 08:57:36 -05:00
|
|
|
MenuButton {
|
|
|
|
buttonText: "About justCheckers"
|
2018-02-13 23:22:15 -05:00
|
|
|
}
|
|
|
|
|
2018-02-15 08:57:36 -05:00
|
|
|
MenuButton {
|
|
|
|
buttonText: "Settings"
|
|
|
|
}
|
2018-02-13 23:22:15 -05:00
|
|
|
|
2018-02-15 08:57:36 -05:00
|
|
|
MenuButton {
|
|
|
|
buttonText: "Quit"
|
|
|
|
function actionOnClick() {
|
|
|
|
Qt.quit()
|
|
|
|
}
|
2018-02-13 23:22:15 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Rectangle {
|
2018-02-13 08:53:53 -05:00
|
|
|
anchors.horizontalCenter: parent.horizontalCenter
|
|
|
|
anchors.bottom: parent.bottom
|
|
|
|
anchors.bottomMargin: 20
|
|
|
|
|
|
|
|
color: Qt.rgba(1, 1, 1, 0.5)
|
|
|
|
width: parent.width
|
|
|
|
height: 20
|
|
|
|
|
|
|
|
Text {
|
2018-02-13 15:18:59 -05:00
|
|
|
text: "v" + appVersion
|
2018-02-13 08:53:53 -05:00
|
|
|
anchors.verticalCenter: parent.verticalCenter
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.rightMargin: 20
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|