VR overlay progress bar filter

This commit is contained in:
Natsumi
2021-09-30 00:02:05 +13:00
parent 00bd2b9946
commit 67a54c6965
3 changed files with 29 additions and 4 deletions

View File

@@ -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);
}

View File

@@ -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();
};

View File

@@ -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