diff --git a/Menu.qml b/Menu.qml
index c372fb9..7b4bc83 100644
--- a/Menu.qml
+++ b/Menu.qml
@@ -1,8 +1,8 @@
import QtQuick 2.0
+import QtMultimedia 5.8
Rectangle {
anchors.fill: parent
- color: "blue"
Image {
source: 'images/backdrop.jpg'
@@ -49,6 +49,17 @@ Rectangle {
MenuButton {
buttonText: "Save Game"
// disabled: true
+ function actionOnClick() {
+ pingSound.seek(0)
+ pingSound.play()
+ }
+
+ // From: https://freesound.org/people/edsward/sounds/341871/
+ Audio {
+ id: pingSound
+ source: 'assets/ping.wav'
+ autoLoad: true
+ }
}
MenuButton {
diff --git a/MenuButton.qml b/MenuButton.qml
index 68609e1..dcc3699 100644
--- a/MenuButton.qml
+++ b/MenuButton.qml
@@ -14,7 +14,7 @@ Rectangle {
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 50
- height: 50
+ height: parent.parent.height * 0.1
radius: 10
color: backgroundAtRest
@@ -34,7 +34,7 @@ Rectangle {
Text {
text: buttonText
- font.pointSize: 18
+ font.pointSize: parent.height * 0.2
font.bold: true
height: 30
diff --git a/assets/ping.wav b/assets/ping.wav
new file mode 100644
index 0000000..fe67bde
Binary files /dev/null and b/assets/ping.wav differ
diff --git a/justcheckers.pro b/justcheckers.pro
index 734fa49..00d8da3 100644
--- a/justcheckers.pro
+++ b/justcheckers.pro
@@ -1,4 +1,4 @@
-QT += quick
+QT += quick multimedia multimediawidgets
CONFIG += c++11
# The following define makes your compiler emit warnings if you use
diff --git a/main.qml b/main.qml
index 00646cb..978f0ef 100644
--- a/main.qml
+++ b/main.qml
@@ -7,8 +7,8 @@ Window {
property var appVersion: "0.4.0"
visible: true
- width: 800
- height: 600
+ width: 540
+ height: 960
title: qsTr("justCheckers v" + appVersion)
Loader {
diff --git a/qml.qrc b/qml.qrc
index 65021e4..478ba79 100644
--- a/qml.qrc
+++ b/qml.qrc
@@ -15,5 +15,6 @@
images/play.png
images/splash.jpg
MenuButton.qml
+ assets/ping.wav