diff --git a/VRCXVR.cs b/VRCXVR.cs index 04ea3fc4..433e54c0 100644 --- a/VRCXVR.cs +++ b/VRCXVR.cs @@ -140,7 +140,7 @@ namespace VRCX { _browser1.RenderToTexture(_texture1); } - if ("true".Equals(SharedVariable.Instance.Get("config:vrcx_overlaynotifications"))) + if ("true".Equals(SharedVariable.Instance.Get("config:vrcx_overlaynotifications")) || "true".Equals(SharedVariable.Instance.Get("config:vrcx_progresspie"))) { _browser2.RenderToTexture(_texture2); } diff --git a/html/src/app.js b/html/src/app.js index 7b89396d..8975ebbb 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -9618,6 +9618,9 @@ speechSynthesis.getVoices(); $app.data.youTubeApiKey = configRepository.getString('VRCX_youtubeAPIKey'); $app.data.progressPie = configRepository.getBool('VRCX_progressPie'); + $app.data.progressPieFilter = configRepository.getBool( + 'VRCX_progressPieFilter' + ); var downloadProgressStateChange = function () { this.updateVRConfigVars(); @@ -9629,6 +9632,20 @@ speechSynthesis.getVoices(); if (this.isDarkMode) { notificationTheme = 'sunset'; } + var progressPie = false; + if (this.progressPie) { + progressPie = true; + if (this.progressPieFilter) { + var L = API.parseLocation(this.lastLocation.location); + var danceWorlds = [ + 'wrld_f20326da-f1ac-45fc-a062-609723b097b1', + 'wrld_42377cf1-c54f-45ed-8996-5875b0573a83' + ]; + if (!danceWorlds.includes(L.worldId)) { + progressPie = false; + } + } + } var VRConfigVars = { notificationTTS: this.notificationTTS, notificationTTSVoice: this.notificationTTSVoice, @@ -9642,7 +9659,7 @@ speechSynthesis.getVoices(); isGameRunning: this.isGameRunning, isGameNoVR: this.isGameNoVR, downloadProgress: this.downloadProgress, - progressPie: this.progressPie + progressPie }; var json = JSON.stringify(VRConfigVars); AppApi.ExecuteVrFeedFunction('configUpdate', json); @@ -14478,6 +14495,10 @@ speechSynthesis.getVoices(); $app.methods.changeYouTubeApi = function () { configRepository.setBool('VRCX_youtubeAPI', this.youTubeApi); configRepository.setBool('VRCX_progressPie', this.progressPie); + configRepository.setBool( + 'VRCX_progressPieFilter', + this.progressPieFilter + ); this.updateVRConfigVars(); }; diff --git a/html/src/index.pug b/html/src/index.pug index 88359c8a..c9efc4ed 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -937,10 +937,14 @@ html span.name Enabled el-switch(v-model="youTubeApi" @change="changeYouTubeApi") div.options-container-item - span.name Progress pie overlay for videos + el-button(size="small" icon="el-icon-caret-right" @click="showYouTubeApiDialog") YouTube API Key + span.header Progress pie overlay for videos + div.options-container-item + span.name Enable el-switch(v-model="progressPie" @change="changeYouTubeApi") div.options-container-item - el-button(size="small" icon="el-icon-caret-right" @click="showYouTubeApiDialog") YouTube API Key + span.name Dance worlds only + el-switch(v-model="progressPieFilter" @change="changeYouTubeApi") div.options-container span.header VRCX Cache/Debug div.options-container-item