Option to gently fade chaperone to disabled below a certain height (#622)

* Option to fade out chaperone when HMD goes below a configured height

Useful for setups in which you have a seat just outside your VR space,
or like to sit in the middle of your space for any amount of time. Will
fade out the boundaries to 0% opacity over 5 seconds, 5 seconds after
you sit down. Standing back up to the configured height will make them
pop back in immediately.

Can be found under Chaperone -> Additional Settings.

* Update format.sh to require clang-format v10

* Use fade distance instead of opacity, opacity inconsistently applied

* Bugfixes (#624)

* stop crashing on HMD Init Errors, as well as bypass force quit on all steamvr Init Errors

* add qtc clang to gitignore

* add app volume adjustment

* adjust app volume placement in menu

* fix type error

* increment version

* fix version number

---------

Co-authored-by: ykeara <ykeara1@gmail.com>
This commit is contained in:
Chelsea Jaggi
2023-05-17 14:21:59 -05:00
committed by GitHub
co-authored by ykeara
parent 65b5aace06
commit 1cfd9ff104
14 changed files with 340 additions and 14 deletions
+71
View File
@@ -18,6 +18,73 @@ MyStackViewPage {
ColumnLayout {
spacing: 18
RowLayout{
MyText {
text: "Application Volume:"
Layout.rightMargin: 12
}
MyPushButton2 {
text: "-"
Layout.preferredWidth: 40
onClicked: {
volumeSlider.value -= 0.05
}
}
MySlider {
id: volumeSlider
from: 0.0
to: 1.0
stepSize: 0.01
value: 0.7
Layout.fillWidth: true
onPositionChanged: {
var val = (this.value * 100)
volumeText.text = Math.round(val) + "%"
}
onValueChanged: {
OverlayController.setSoundVolume(value, false)
}
}
MyPushButton2 {
text: "+"
Layout.preferredWidth: 40
onClicked: {
volumeSlider.value += 0.05
}
}
MyTextField {
id: volumeText
text: "70%"
keyBoardUID: 503
Layout.preferredWidth: 100
Layout.leftMargin: 10
horizontalAlignment: Text.AlignHCenter
function onInputEvent(input) {
var val = parseFloat(input)
if (!isNaN(val)) {
if (val < 0) {
val = 0
} else if (val > 100.0) {
val = 100.0
}
var v = (val/100).toFixed(0)
if (v <= volumeSlider.to) {
chaperoneVisibilitySlider.value = v
} else {
ChaperoneTabController.setBoundsVisibility(v, false)
}
}
text = Math.round(ChaperoneTabController.boundsVisibility * 100) + "%"
}
}
}
MyToggleButton {
id: settingsAutoStartToggle
text: "Autostart"
@@ -295,6 +362,7 @@ MyStackViewPage {
seatedOldExternalWarning.visible = MoveCenterTabController.allowExternalEdits && MoveCenterTabController.oldStyleMotion
reloadChaperoneProfiles()
volumeSlider.value = OverlayController.soundVolume
}
Connections {
@@ -357,6 +425,9 @@ MyStackViewPage {
onAutoApplyChaperoneEnabledChanged: {
autoApplyChaperoneToggleButton.checked = OverlayController.autoApplyChaperoneEnabled
}
onSoundVolumeChanged:{
volumeSlider.value = OverlayController.soundVolume
}
}
Connections{
target: ChaperoneTabController