Add in example of working audio.
This commit is contained in:
parent
a1e0c9ebb1
commit
2bb6ae818e
13
Menu.qml
13
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 {
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Binary file not shown.
|
@ -1,4 +1,4 @@
|
|||
QT += quick
|
||||
QT += quick multimedia multimediawidgets
|
||||
CONFIG += c++11
|
||||
|
||||
# The following define makes your compiler emit warnings if you use
|
||||
|
|
4
main.qml
4
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 {
|
||||
|
|
Loading…
Reference in New Issue