diff --git a/VRCXVR.cs b/VRCXVR.cs index f6237717..eb401174 100644 --- a/VRCXVR.cs +++ b/VRCXVR.cs @@ -295,6 +295,7 @@ namespace VRCX sb.Clear(); system.GetStringTrackedDeviceProperty(i, ETrackedDeviceProperty.Prop_TrackingSystemName_String, sb, (uint)sb.Capacity, ref err); var isOculus = sb.ToString().IndexOf("oculus", StringComparison.OrdinalIgnoreCase) >= 0; + var button = "true".Equals(SharedVariable.Instance.Get("config:vrcx_overlaybutton")); // Oculus : B/Y, Bit 1, Mask 2 // Oculus : A/X, Bit 7, Mask 128 // Vive : Menu, Bit 1, Mask 2, @@ -304,7 +305,7 @@ namespace VRCX role == ETrackedControllerRole.RightHand) { if (system.GetControllerState(i, ref state, (uint)Marshal.SizeOf(state)) && - (state.ulButtonPressed & (isOculus ? 2u : 4u)) != 0) + (state.ulButtonPressed & (button ? 2u : (isOculus ? 128u : 4u))) != 0) { if (role == ETrackedControllerRole.LeftHand) { diff --git a/html/src/app.js b/html/src/app.js index 7a209e1b..cc1028df 100644 --- a/html/src/app.js +++ b/html/src/app.js @@ -5703,6 +5703,7 @@ speechSynthesis.getVoices(); $app.data.visits = 0; $app.data.openVR = configRepository.getBool('openVR'); $app.data.openVRAlways = configRepository.getBool('openVRAlways'); + $app.data.overlaybutton = configRepository.getBool('VRCX_overlaybutton'); $app.data.hidePrivateFromFeed = configRepository.getBool('VRCX_hidePrivateFromFeed'); $app.data.hideLoginsFromFeed = configRepository.getBool('VRCX_hideLoginsFromFeed'); $app.data.hideDevicesFromFeed = configRepository.getBool('VRCX_hideDevicesFromFeed'); @@ -5714,6 +5715,7 @@ speechSynthesis.getVoices(); var saveOpenVROption = function () { configRepository.setBool('openVR', this.openVR); configRepository.setBool('openVRAlways', this.openVRAlways); + configRepository.setBool('VRCX_overlaybutton', this.overlaybutton); configRepository.setBool('VRCX_hidePrivateFromFeed', this.hidePrivateFromFeed); configRepository.setBool('VRCX_hideLoginsFromFeed', this.hideLoginsFromFeed); configRepository.setBool('VRCX_hideDevicesFromFeed', this.hideDevicesFromFeed); @@ -5730,6 +5732,7 @@ speechSynthesis.getVoices(); }; $app.watch.openVR = saveOpenVROption; $app.watch.openVRAlways = saveOpenVROption; + $app.watch.overlaybutton = saveOpenVROption; $app.watch.hidePrivateFromFeed = saveOpenVROption; $app.watch.hideLoginsFromFeed = saveOpenVROption; $app.watch.hideDevicesFromFeed = saveOpenVROption; diff --git a/html/src/app.scss b/html/src/app.scss index 30830404..06d92a44 100644 --- a/html/src/app.scss +++ b/html/src/app.scss @@ -565,5 +565,5 @@ i.x-user-status.busy { .options-container-item .name { display: inline-block; - min-width: 150px + min-width: 175px; } diff --git a/html/src/index.pug b/html/src/index.pug index d972f543..4d3215df 100644 --- a/html/src/index.pug +++ b/html/src/index.pug @@ -543,16 +543,20 @@ html div.options-container-item span * It runs automatically when VRChat is running. br - span Vive or Other Controller: Grab Button br - span Oculus Controller: B Button + span Grip: Vive or Other Controllers Grab, Oculus X/A Buttons + br + span Menu: Vive Menu, Index B, Oculus Y/B Buttons br div.options-container-item span.name Enable el-switch(v-model="openVR") div.options-container-item - span.name Force Run + span.name Force Run (Opens SteamVR) el-switch(v-model="openVRAlways" :disabled="!openVR") + div.options-container-item + span.name(style="min-width:137px") Overlay Button + el-switch(v-model="overlaybutton" inactive-text="Grip" active-text="Menu" :disabled="!openVR") div.options-container-item span.name Hide VR Devices el-switch(v-model="hideDevicesFromFeed" :disabled="!openVR") @@ -572,7 +576,7 @@ html span.name Notification TTS el-switch(v-model="notificationTTS" :disabled="!openVR") div.options-container-item - span.name TTS Voice + span.name Text-to-Speech Voice el-dropdown(@command="(voice) => changeTTSVoice(voice)" trigger="click" size="small") el-button(v-text="TTSvoices[notificationTTSVoice].name" size="mini" :disabled="!openVR || !notificationTTS") el-dropdown-menu(#default="dropdown")