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:
@@ -64,7 +64,7 @@ ComboBox {
|
||||
|
||||
onActivated: {
|
||||
if (activeFocus) {
|
||||
MyResources.activationSound.play()
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ Button {
|
||||
|
||||
onClicked: {
|
||||
if (activationSoundEnabled) {
|
||||
MyResources.activationSound.play()
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,6 +24,6 @@ Button {
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
MyResources.activationSound.play()
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ Slider {
|
||||
|
||||
onValueChanged: {
|
||||
if (activeFocus) {
|
||||
MyResources.activationSound.play()
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ Rectangle {
|
||||
}
|
||||
}
|
||||
onClicked: {
|
||||
MyResources.focusChangedSound.play()
|
||||
MyResources.playFocusChangedSound()
|
||||
stackView.pop()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,6 +48,6 @@ CheckBox {
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
MyResources.activationSound.play()
|
||||
MyResources.playActivationSound()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user