mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 06:56:04 +02:00
Add overlay bind toggle
This commit is contained in:
@@ -295,6 +295,7 @@ namespace VRCX
|
|||||||
sb.Clear();
|
sb.Clear();
|
||||||
system.GetStringTrackedDeviceProperty(i, ETrackedDeviceProperty.Prop_TrackingSystemName_String, sb, (uint)sb.Capacity, ref err);
|
system.GetStringTrackedDeviceProperty(i, ETrackedDeviceProperty.Prop_TrackingSystemName_String, sb, (uint)sb.Capacity, ref err);
|
||||||
var isOculus = sb.ToString().IndexOf("oculus", StringComparison.OrdinalIgnoreCase) >= 0;
|
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 : B/Y, Bit 1, Mask 2
|
||||||
// Oculus : A/X, Bit 7, Mask 128
|
// Oculus : A/X, Bit 7, Mask 128
|
||||||
// Vive : Menu, Bit 1, Mask 2,
|
// Vive : Menu, Bit 1, Mask 2,
|
||||||
@@ -304,7 +305,7 @@ namespace VRCX
|
|||||||
role == ETrackedControllerRole.RightHand)
|
role == ETrackedControllerRole.RightHand)
|
||||||
{
|
{
|
||||||
if (system.GetControllerState(i, ref state, (uint)Marshal.SizeOf(state)) &&
|
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)
|
if (role == ETrackedControllerRole.LeftHand)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5703,6 +5703,7 @@ speechSynthesis.getVoices();
|
|||||||
$app.data.visits = 0;
|
$app.data.visits = 0;
|
||||||
$app.data.openVR = configRepository.getBool('openVR');
|
$app.data.openVR = configRepository.getBool('openVR');
|
||||||
$app.data.openVRAlways = configRepository.getBool('openVRAlways');
|
$app.data.openVRAlways = configRepository.getBool('openVRAlways');
|
||||||
|
$app.data.overlaybutton = configRepository.getBool('VRCX_overlaybutton');
|
||||||
$app.data.hidePrivateFromFeed = configRepository.getBool('VRCX_hidePrivateFromFeed');
|
$app.data.hidePrivateFromFeed = configRepository.getBool('VRCX_hidePrivateFromFeed');
|
||||||
$app.data.hideLoginsFromFeed = configRepository.getBool('VRCX_hideLoginsFromFeed');
|
$app.data.hideLoginsFromFeed = configRepository.getBool('VRCX_hideLoginsFromFeed');
|
||||||
$app.data.hideDevicesFromFeed = configRepository.getBool('VRCX_hideDevicesFromFeed');
|
$app.data.hideDevicesFromFeed = configRepository.getBool('VRCX_hideDevicesFromFeed');
|
||||||
@@ -5714,6 +5715,7 @@ speechSynthesis.getVoices();
|
|||||||
var saveOpenVROption = function () {
|
var saveOpenVROption = function () {
|
||||||
configRepository.setBool('openVR', this.openVR);
|
configRepository.setBool('openVR', this.openVR);
|
||||||
configRepository.setBool('openVRAlways', this.openVRAlways);
|
configRepository.setBool('openVRAlways', this.openVRAlways);
|
||||||
|
configRepository.setBool('VRCX_overlaybutton', this.overlaybutton);
|
||||||
configRepository.setBool('VRCX_hidePrivateFromFeed', this.hidePrivateFromFeed);
|
configRepository.setBool('VRCX_hidePrivateFromFeed', this.hidePrivateFromFeed);
|
||||||
configRepository.setBool('VRCX_hideLoginsFromFeed', this.hideLoginsFromFeed);
|
configRepository.setBool('VRCX_hideLoginsFromFeed', this.hideLoginsFromFeed);
|
||||||
configRepository.setBool('VRCX_hideDevicesFromFeed', this.hideDevicesFromFeed);
|
configRepository.setBool('VRCX_hideDevicesFromFeed', this.hideDevicesFromFeed);
|
||||||
@@ -5730,6 +5732,7 @@ speechSynthesis.getVoices();
|
|||||||
};
|
};
|
||||||
$app.watch.openVR = saveOpenVROption;
|
$app.watch.openVR = saveOpenVROption;
|
||||||
$app.watch.openVRAlways = saveOpenVROption;
|
$app.watch.openVRAlways = saveOpenVROption;
|
||||||
|
$app.watch.overlaybutton = saveOpenVROption;
|
||||||
$app.watch.hidePrivateFromFeed = saveOpenVROption;
|
$app.watch.hidePrivateFromFeed = saveOpenVROption;
|
||||||
$app.watch.hideLoginsFromFeed = saveOpenVROption;
|
$app.watch.hideLoginsFromFeed = saveOpenVROption;
|
||||||
$app.watch.hideDevicesFromFeed = saveOpenVROption;
|
$app.watch.hideDevicesFromFeed = saveOpenVROption;
|
||||||
|
|||||||
+1
-1
@@ -565,5 +565,5 @@ i.x-user-status.busy {
|
|||||||
|
|
||||||
.options-container-item .name {
|
.options-container-item .name {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
min-width: 150px
|
min-width: 175px;
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-4
@@ -543,16 +543,20 @@ html
|
|||||||
div.options-container-item
|
div.options-container-item
|
||||||
span * It runs automatically when VRChat is running.
|
span * It runs automatically when VRChat is running.
|
||||||
br
|
br
|
||||||
span Vive or Other Controller: Grab Button
|
|
||||||
br
|
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
|
br
|
||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name Enable
|
span.name Enable
|
||||||
el-switch(v-model="openVR")
|
el-switch(v-model="openVR")
|
||||||
div.options-container-item
|
div.options-container-item
|
||||||
span.name Force Run
|
span.name Force Run (Opens SteamVR)
|
||||||
el-switch(v-model="openVRAlways" :disabled="!openVR")
|
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
|
div.options-container-item
|
||||||
span.name Hide VR Devices
|
span.name Hide VR Devices
|
||||||
el-switch(v-model="hideDevicesFromFeed" :disabled="!openVR")
|
el-switch(v-model="hideDevicesFromFeed" :disabled="!openVR")
|
||||||
@@ -572,7 +576,7 @@ html
|
|||||||
span.name Notification TTS
|
span.name Notification TTS
|
||||||
el-switch(v-model="notificationTTS" :disabled="!openVR")
|
el-switch(v-model="notificationTTS" :disabled="!openVR")
|
||||||
div.options-container-item
|
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-dropdown(@command="(voice) => changeTTSVoice(voice)" trigger="click" size="small")
|
||||||
el-button(v-text="TTSvoices[notificationTTSVoice].name" size="mini" :disabled="!openVR || !notificationTTS")
|
el-button(v-text="TTSvoices[notificationTTSVoice].name" size="mini" :disabled="!openVR || !notificationTTS")
|
||||||
el-dropdown-menu(#default="dropdown")
|
el-dropdown-menu(#default="dropdown")
|
||||||
|
|||||||
Reference in New Issue
Block a user