mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-05-07 14:56:06 +02:00
Display short url and normal one, small changes and fixes
This commit is contained in:
@@ -211,9 +211,14 @@ namespace VRCX
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetVR(bool active, bool hmdOverlay, bool wristOverlay)
|
public void SetVR(bool active, bool hmdOverlay, bool wristOverlay, bool menuButton)
|
||||||
{
|
{
|
||||||
VRCXVR.Instance.SetActive(active, hmdOverlay, wristOverlay);
|
VRCXVR.Instance.SetActive(active, hmdOverlay, wristOverlay, menuButton);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TriggerLeftHand()
|
||||||
|
{
|
||||||
|
VRCXVR.Instance.TriggerLeftHand();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RefreshVR()
|
public void RefreshVR()
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ namespace VRCX
|
|||||||
private bool _active;
|
private bool _active;
|
||||||
private bool _hmdOverlayActive;
|
private bool _hmdOverlayActive;
|
||||||
private bool _wristOverlayActive;
|
private bool _wristOverlayActive;
|
||||||
|
private bool _menuButton;
|
||||||
|
|
||||||
static VRCXVR()
|
static VRCXVR()
|
||||||
{
|
{
|
||||||
@@ -245,11 +246,12 @@ namespace VRCX
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetActive(bool active, bool hmdOverlay, bool wristOverlay)
|
public void SetActive(bool active, bool hmdOverlay, bool wristOverlay, bool menuButton)
|
||||||
{
|
{
|
||||||
_active = active;
|
_active = active;
|
||||||
_hmdOverlayActive = hmdOverlay;
|
_hmdOverlayActive = hmdOverlay;
|
||||||
_wristOverlayActive = wristOverlay;
|
_wristOverlayActive = wristOverlay;
|
||||||
|
_menuButton = menuButton;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Refresh()
|
public void Refresh()
|
||||||
@@ -300,7 +302,6 @@ 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,
|
||||||
@@ -310,7 +311,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 & (button ? 2u : (isOculus ? 128u : 4u))) != 0)
|
(state.ulButtonPressed & (_menuButton ? 2u : (isOculus ? 128u : 4u))) != 0)
|
||||||
{
|
{
|
||||||
if (role == ETrackedControllerRole.LeftHand)
|
if (role == ETrackedControllerRole.LeftHand)
|
||||||
{
|
{
|
||||||
|
|||||||
+52
-28
@@ -8281,18 +8281,6 @@ speechSynthesis.getVoices();
|
|||||||
) {
|
) {
|
||||||
photonBots.unshift(id);
|
photonBots.unshift(id);
|
||||||
}
|
}
|
||||||
if (joinTime && joinTime + 10000 < dtNow && !hasInstantiated) {
|
|
||||||
if (!this.photonLobbyBots.includes(id)) {
|
|
||||||
this.addEntryPhotonEvent({
|
|
||||||
photonId: id,
|
|
||||||
displayName: ref.displayName,
|
|
||||||
userId: ref.id,
|
|
||||||
text: 'photon bot has joined',
|
|
||||||
created_at: new Date().toJSON()
|
|
||||||
});
|
|
||||||
}
|
|
||||||
photonBots.unshift(id);
|
|
||||||
}
|
|
||||||
if (isInvisible) {
|
if (isInvisible) {
|
||||||
if (!this.photonLobbyBots.includes(id)) {
|
if (!this.photonLobbyBots.includes(id)) {
|
||||||
this.addEntryPhotonEvent({
|
this.addEntryPhotonEvent({
|
||||||
@@ -8304,8 +8292,22 @@ speechSynthesis.getVoices();
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
photonBots.unshift(id);
|
photonBots.unshift(id);
|
||||||
}
|
} else if (avatarEyeHeight < 0) {
|
||||||
if (avatarEyeHeight < 0) {
|
if (!this.photonLobbyBots.includes(id)) {
|
||||||
|
this.addEntryPhotonEvent({
|
||||||
|
photonId: id,
|
||||||
|
displayName: ref.displayName,
|
||||||
|
userId: ref.id,
|
||||||
|
text: 'photon bot has joined',
|
||||||
|
created_at: new Date().toJSON()
|
||||||
|
});
|
||||||
|
}
|
||||||
|
photonBots.unshift(id);
|
||||||
|
} else if (
|
||||||
|
joinTime &&
|
||||||
|
joinTime + 10000 < dtNow &&
|
||||||
|
!hasInstantiated
|
||||||
|
) {
|
||||||
if (!this.photonLobbyBots.includes(id)) {
|
if (!this.photonLobbyBots.includes(id)) {
|
||||||
this.addEntryPhotonEvent({
|
this.addEntryPhotonEvent({
|
||||||
photonId: id,
|
photonId: id,
|
||||||
@@ -8439,6 +8441,11 @@ speechSynthesis.getVoices();
|
|||||||
this.lookupUser(ref);
|
this.lookupUser(ref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.$message({
|
||||||
|
message: 'Missing user info',
|
||||||
|
type: 'error'
|
||||||
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -9074,6 +9081,10 @@ speechSynthesis.getVoices();
|
|||||||
/VideoPlay\(PyPyDance\) "(.+?)",([\d.]+),([\d.]+),"(.+?)\s*(?:)?"/g.exec(
|
/VideoPlay\(PyPyDance\) "(.+?)",([\d.]+),([\d.]+),"(.+?)\s*(?:)?"/g.exec(
|
||||||
gameLog.data
|
gameLog.data
|
||||||
);
|
);
|
||||||
|
if (!data) {
|
||||||
|
console.error('failed to parse', gameLog.data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
var videoUrl = data[1];
|
var videoUrl = data[1];
|
||||||
var videoPos = Number(data[2]);
|
var videoPos = Number(data[2]);
|
||||||
var videoLength = Number(data[3]);
|
var videoLength = Number(data[3]);
|
||||||
@@ -9139,9 +9150,13 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
$app.methods.addGameLogVRDancing = function (gameLog, location) {
|
$app.methods.addGameLogVRDancing = function (gameLog, location) {
|
||||||
var data =
|
var data =
|
||||||
/VideoPlay\(VRDancing\) "(.+?)",([\d.]+),([\d.]+),([\d.]+),"(.+?)","(.+?)"/g.exec(
|
/VideoPlay\(VRDancing\) "(.+?)",([\d.]+),([\d.]+),(-?[\d.]+),"(.+?)","(.+?)"/g.exec(
|
||||||
gameLog.data
|
gameLog.data
|
||||||
);
|
);
|
||||||
|
if (!data) {
|
||||||
|
console.error('failed to parse', gameLog.data);
|
||||||
|
return;
|
||||||
|
}
|
||||||
var videoUrl = data[1];
|
var videoUrl = data[1];
|
||||||
var videoPos = Number(data[2]);
|
var videoPos = Number(data[2]);
|
||||||
var videoLength = Number(data[3]);
|
var videoLength = Number(data[3]);
|
||||||
@@ -9468,7 +9483,8 @@ speechSynthesis.getVoices();
|
|||||||
appId = '784094509008551956';
|
appId = '784094509008551956';
|
||||||
bigIcon = 'pypy';
|
bigIcon = 'pypy';
|
||||||
} else if (
|
} else if (
|
||||||
L.worldId === 'wrld_42377cf1-c54f-45ed-8996-5875b0573a83'
|
L.worldId === 'wrld_42377cf1-c54f-45ed-8996-5875b0573a83' ||
|
||||||
|
L.worldId === 'wrld_dd6d2888-dbdc-47c2-bc98-3d631b2acd7c'
|
||||||
) {
|
) {
|
||||||
appId = '846232616054030376';
|
appId = '846232616054030376';
|
||||||
bigIcon = 'vr_dancing';
|
bigIcon = 'vr_dancing';
|
||||||
@@ -9683,11 +9699,11 @@ speechSynthesis.getVoices();
|
|||||||
params.tag = ref.tag;
|
params.tag = ref.tag;
|
||||||
}
|
}
|
||||||
if (!this.searchWorldLabs) {
|
if (!this.searchWorldLabs) {
|
||||||
if (params.tag) {
|
if (params.tag) {
|
||||||
params.tag += ',system_approved';
|
params.tag += ',system_approved';
|
||||||
} else {
|
} else {
|
||||||
params.tag = 'system_approved';
|
params.tag = 'system_approved';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// TODO: option.platform
|
// TODO: option.platform
|
||||||
this.searchWorldParams = params;
|
this.searchWorldParams = params;
|
||||||
@@ -11214,7 +11230,7 @@ speechSynthesis.getVoices();
|
|||||||
'sharedFeedFilters',
|
'sharedFeedFilters',
|
||||||
JSON.stringify(this.sharedFeedFilters)
|
JSON.stringify(this.sharedFeedFilters)
|
||||||
);
|
);
|
||||||
this.updateVRConfigVars();
|
this.updateSharedFeed(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.methods.cancelSharedFeedFilters = function () {
|
$app.methods.cancelSharedFeedFilters = function () {
|
||||||
@@ -11274,7 +11290,8 @@ speechSynthesis.getVoices();
|
|||||||
$app.methods.isDanceWorld = function (location) {
|
$app.methods.isDanceWorld = function (location) {
|
||||||
var danceWorlds = [
|
var danceWorlds = [
|
||||||
'wrld_f20326da-f1ac-45fc-a062-609723b097b1',
|
'wrld_f20326da-f1ac-45fc-a062-609723b097b1',
|
||||||
'wrld_42377cf1-c54f-45ed-8996-5875b0573a83'
|
'wrld_42377cf1-c54f-45ed-8996-5875b0573a83',
|
||||||
|
'wrld_dd6d2888-dbdc-47c2-bc98-3d631b2acd7c'
|
||||||
];
|
];
|
||||||
var L = API.parseLocation(location);
|
var L = API.parseLocation(location);
|
||||||
if (danceWorlds.includes(L.worldId)) {
|
if (danceWorlds.includes(L.worldId)) {
|
||||||
@@ -11384,10 +11401,15 @@ speechSynthesis.getVoices();
|
|||||||
) {
|
) {
|
||||||
hmdOverlay = true;
|
hmdOverlay = true;
|
||||||
}
|
}
|
||||||
// active, hmdOverlay, wristOverlay
|
// active, hmdOverlay, wristOverlay, menuButton
|
||||||
AppApi.SetVR(true, hmdOverlay, this.overlayWrist);
|
AppApi.SetVR(
|
||||||
|
true,
|
||||||
|
hmdOverlay,
|
||||||
|
this.overlayWrist,
|
||||||
|
this.overlaybutton
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
AppApi.SetVR(false, false, false);
|
AppApi.SetVR(false, false, false, false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -14304,7 +14326,8 @@ speechSynthesis.getVoices();
|
|||||||
loading: false,
|
loading: false,
|
||||||
desktop: configRepository.getBool('launchAsDesktop'),
|
desktop: configRepository.getBool('launchAsDesktop'),
|
||||||
location: '',
|
location: '',
|
||||||
url: ''
|
url: '',
|
||||||
|
shortUrl: ''
|
||||||
};
|
};
|
||||||
|
|
||||||
$app.watch['launchDialog.desktop'] = function () {
|
$app.watch['launchDialog.desktop'] = function () {
|
||||||
@@ -14317,7 +14340,7 @@ speechSynthesis.getVoices();
|
|||||||
|
|
||||||
API.$on('INSTANCE:SHORTNAME', function (args) {
|
API.$on('INSTANCE:SHORTNAME', function (args) {
|
||||||
var url = `https://vrch.at/${args.json}`;
|
var url = `https://vrch.at/${args.json}`;
|
||||||
$app.launchDialog.url = url;
|
$app.launchDialog.shortUrl = url;
|
||||||
});
|
});
|
||||||
|
|
||||||
$app.methods.showLaunchDialog = function (tag) {
|
$app.methods.showLaunchDialog = function (tag) {
|
||||||
@@ -14332,6 +14355,7 @@ speechSynthesis.getVoices();
|
|||||||
} else {
|
} else {
|
||||||
D.location = L.worldId;
|
D.location = L.worldId;
|
||||||
}
|
}
|
||||||
|
D.shortUrl = '';
|
||||||
D.url = getLaunchURL(L.worldId, L.instanceId);
|
D.url = getLaunchURL(L.worldId, L.instanceId);
|
||||||
D.visible = true;
|
D.visible = true;
|
||||||
API.getInstanceShortName({
|
API.getInstanceShortName({
|
||||||
|
|||||||
+4
-1
@@ -2029,7 +2029,10 @@ html
|
|||||||
|
|
||||||
//- dialog: launch
|
//- dialog: launch
|
||||||
el-dialog.x-dialog(ref="launchDialog" :visible.sync="launchDialog.visible" title="Launch" width="400px")
|
el-dialog.x-dialog(ref="launchDialog" :visible.sync="launchDialog.visible" title="Launch" width="400px")
|
||||||
div #[span(v-text="launchDialog.url" style="word-break:break-all;font-size:12px")]
|
div #[span(v-text="launchDialog.shortUrl" style="word-break:break-all;font-size:12px")]
|
||||||
|
el-tooltip(placement="top" content="Copy to clipboard" :disabled="hideTooltips")
|
||||||
|
el-button(@click="copyInstanceUrl(launchDialog.shortUrl)" size="mini" icon="el-icon-s-order" style="margin-left:5px" circle)
|
||||||
|
div(style="margin-top:10px") #[span(v-text="launchDialog.url" style="word-break:break-all;font-size:12px")]
|
||||||
el-tooltip(placement="top" content="Copy to clipboard" :disabled="hideTooltips")
|
el-tooltip(placement="top" content="Copy to clipboard" :disabled="hideTooltips")
|
||||||
el-button(@click="copyInstanceUrl(launchDialog.url)" size="mini" icon="el-icon-s-order" style="margin-left:5px" circle)
|
el-button(@click="copyInstanceUrl(launchDialog.url)" size="mini" icon="el-icon-s-order" style="margin-left:5px" circle)
|
||||||
template(#footer)
|
template(#footer)
|
||||||
|
|||||||
Reference in New Issue
Block a user