Added desktop and no-sound modes.

When -desktop is given on the command line then the settings menu is shown on
the desktop instead of an vr overlay.
When -nosound is given on the command line then there are no sound
effects.
This commit is contained in:
2016-12-04 23:37:00 +01:00
parent 4e15b9dea8
commit b766dc72cc
11 changed files with 137 additions and 102 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ ComboBox {
onActivated: {
if (activeFocus) {
MyResources.activationSound.play()
MyResources.playActivationSound()
}
}
+1 -1
View File
@@ -25,7 +25,7 @@ Button {
onClicked: {
if (activationSoundEnabled) {
MyResources.activationSound.play()
MyResources.playActivationSound()
}
}
}
+1 -1
View File
@@ -24,6 +24,6 @@ Button {
}
onClicked: {
MyResources.activationSound.play()
MyResources.playActivationSound()
}
}
+11
View File
@@ -1,8 +1,19 @@
pragma Singleton
import QtQuick 2.7
import QtMultimedia 5.6
import matzman666.advsettings 1.0
QtObject {
function playActivationSound() {
if (!OverlayController.soundDisabled()) {
activationSound.play()
}
}
function playFocusChangedSound() {
if (!OverlayController.soundDisabled()) {
focusChangedSound.play()
}
}
property SoundEffect activationSound: SoundEffect {
source: vrRuntimePath + "tools/content/panorama/sounds/activation.wav"
}
+1 -1
View File
@@ -46,7 +46,7 @@ Slider {
onValueChanged: {
if (activeFocus) {
MyResources.activationSound.play()
MyResources.playActivationSound()
}
}
}
+1 -1
View File
@@ -43,7 +43,7 @@ Rectangle {
}
}
onClicked: {
MyResources.focusChangedSound.play()
MyResources.playFocusChangedSound()
stackView.pop()
}
}
+1 -1
View File
@@ -48,6 +48,6 @@ CheckBox {
}
onClicked: {
MyResources.activationSound.play()
MyResources.playActivationSound()
}
}
+7 -7
View File
@@ -27,7 +27,7 @@ MyStackViewPage {
text: "SteamVR"
Layout.fillWidth: true
onClicked: {
MyResources.focusChangedSound.play()
MyResources.playFocusChangedSound()
mainView.push(steamVRPage)
}
}
@@ -38,7 +38,7 @@ MyStackViewPage {
text: "Chaperone"
Layout.fillWidth: true
onClicked: {
MyResources.focusChangedSound.play()
MyResources.playFocusChangedSound()
mainView.push(chaperonePage)
}
}
@@ -49,7 +49,7 @@ MyStackViewPage {
text: "Play Space"
Layout.fillWidth: true
onClicked: {
MyResources.focusChangedSound.play()
MyResources.playFocusChangedSound()
mainView.push(playspacePage)
}
}
@@ -60,7 +60,7 @@ MyStackViewPage {
text: "Floor Fix"
Layout.fillWidth: true
onClicked: {
MyResources.focusChangedSound.play()
MyResources.playFocusChangedSound()
mainView.push(fixFloorPage)
}
}
@@ -71,7 +71,7 @@ MyStackViewPage {
text: "Audio"
Layout.fillWidth: true
onClicked: {
MyResources.focusChangedSound.play()
MyResources.playFocusChangedSound()
mainView.push(audioPage)
}
}
@@ -82,7 +82,7 @@ MyStackViewPage {
text: "Statistics"
Layout.fillWidth: true
onClicked: {
MyResources.focusChangedSound.play()
MyResources.playFocusChangedSound()
mainView.push(statisticsPage)
}
}
@@ -98,7 +98,7 @@ MyStackViewPage {
text: "Settings"
Layout.fillWidth: true
onClicked: {
MyResources.focusChangedSound.play()
MyResources.playFocusChangedSound()
mainView.push(settingsPage)
}
}