Add overlayHand option, small fixes

This commit is contained in:
Natsumi
2022-11-22 18:33:07 +13:00
parent c1afe3b59b
commit b0c41c6d08
4 changed files with 65 additions and 34 deletions

View File

@@ -4519,7 +4519,11 @@ speechSynthesis.getVoices();
}
}
if (--this.nextAppUpdateCheck <= 0) {
this.nextAppUpdateCheck = 1800; // 15mins
if (this.branch === 'Stable') {
this.nextAppUpdateCheck = 14400; // 2hours
} else {
this.nextAppUpdateCheck = 1800; // 15mins
}
if (this.autoUpdateVRCX !== 'Off') {
this.checkForVRCXUpdate();
}
@@ -6517,7 +6521,8 @@ speechSynthesis.getVoices();
}
};
$app.methods.login = function () {
$app.methods.login = async function () {
await webApiService.clearCookies();
this.$refs.loginForm.validate((valid) => {
if (valid && !this.loginForm.loading) {
this.loginForm.loading = true;
@@ -12252,6 +12257,10 @@ speechSynthesis.getVoices();
$app.data.openVR = configRepository.getBool('openVR');
$app.data.openVRAlways = configRepository.getBool('openVRAlways');
$app.data.overlaybutton = configRepository.getBool('VRCX_overlaybutton');
$app.data.overlayHand = configRepository.getInt('VRCX_overlayHand');
if (typeof $app.data.overlayHand !== 'number') {
$app.data.overlayHand = 0;
}
$app.data.hidePrivateFromFeed = configRepository.getBool(
'VRCX_hidePrivateFromFeed'
);
@@ -12367,6 +12376,11 @@ speechSynthesis.getVoices();
configRepository.setBool('openVR', this.openVR);
configRepository.setBool('openVRAlways', this.openVRAlways);
configRepository.setBool('VRCX_overlaybutton', this.overlaybutton);
this.overlayHand = parseInt(this.overlayHand, 10);
if (isNaN(this.overlayHand)) {
this.overlayHand = 0;
}
configRepository.setInt('VRCX_overlayHand', this.overlayHand);
configRepository.setBool(
'VRCX_hidePrivateFromFeed',
this.hidePrivateFromFeed
@@ -12426,6 +12440,7 @@ speechSynthesis.getVoices();
this.updateVRConfigVars();
this.updateVRLastLocation();
AppApi.ExecuteVrOverlayFunction('notyClear', '');
this.updateOpenVR(this.isGameRunning, this.isSteamVRRunning);
};
$app.methods.saveSortFavoritesOption = function () {
this.getLocalWorldFavorites();
@@ -12991,15 +13006,16 @@ speechSynthesis.getVoices();
) {
hmdOverlay = true;
}
// active, hmdOverlay, wristOverlay, menuButton
// active, hmdOverlay, wristOverlay, menuButton, overlayHand
AppApi.SetVR(
true,
hmdOverlay,
this.overlayWrist,
this.overlaybutton
this.overlaybutton,
this.overlayHand
);
} else {
AppApi.SetVR(false, false, false, false);
AppApi.SetVR(false, false, false, false, 0);
}
};