Update dists

This commit is contained in:
redphx 2024-12-28 17:04:40 +07:00
parent 116640eb32
commit ef85175a91
2 changed files with 20 additions and 22 deletions

View File

@ -2948,8 +2948,6 @@ class NativeMkbHandler extends MkbHandler {
pointerClient; pointerClient;
enabled = !1; enabled = !1;
mouseButtonsPressed = 0; mouseButtonsPressed = 0;
mouseWheelX = 0;
mouseWheelY = 0;
mouseVerticalMultiply = 0; mouseVerticalMultiply = 0;
mouseHorizontalMultiply = 0; mouseHorizontalMultiply = 0;
inputSink; inputSink;
@ -3030,7 +3028,7 @@ class NativeMkbHandler extends MkbHandler {
this.resetMouseInput(), this.enabled = !1, this.updateInputConfigurationAsync(!1), this.waitForMouseData(!0); this.resetMouseInput(), this.enabled = !1, this.updateInputConfigurationAsync(!1), this.waitForMouseData(!0);
} }
destroy() { destroy() {
this.pointerClient?.stop(), this.stop(), window.removeEventListener("keyup", this), window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this), BxEventBus.Script.off("dialog.shown", this.onDialogShown), this.waitForMouseData(!1), document.pointerLockElement && document.exitPointerLock(); this.pointerClient?.stop(), this.stop(), window.removeEventListener("keyup", this), window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this), BxEventBus.Script.off("dialog.shown", this.onDialogShown), this.waitForMouseData(!1), document.exitPointerLock();
} }
handleMouseMove(data) { handleMouseMove(data) {
this.sendMouseInput({ this.sendMouseInput({
@ -3049,20 +3047,21 @@ class NativeMkbHandler extends MkbHandler {
X: 0, X: 0,
Y: 0, Y: 0,
Buttons: this.mouseButtonsPressed, Buttons: this.mouseButtonsPressed,
WheelX: this.mouseWheelX, WheelX: 0,
WheelY: this.mouseWheelY WheelY: 0
}); });
} }
handleMouseWheel(data) { handleMouseWheel(data) {
let { vertical, horizontal } = data; let { vertical, horizontal } = data, mouseWheelX = horizontal;
if (this.mouseWheelX = horizontal, this.mouseHorizontalMultiply && this.mouseHorizontalMultiply !== 1) this.mouseWheelX *= this.mouseHorizontalMultiply; if (this.mouseHorizontalMultiply && this.mouseHorizontalMultiply !== 1) mouseWheelX *= this.mouseHorizontalMultiply;
if (this.mouseWheelY = vertical, this.mouseVerticalMultiply && this.mouseVerticalMultiply !== 1) this.mouseWheelY *= this.mouseVerticalMultiply; let mouseWheelY = vertical;
if (this.mouseVerticalMultiply && this.mouseVerticalMultiply !== 1) mouseWheelY *= this.mouseVerticalMultiply;
return this.sendMouseInput({ return this.sendMouseInput({
X: 0, X: 0,
Y: 0, Y: 0,
Buttons: this.mouseButtonsPressed, Buttons: this.mouseButtonsPressed,
WheelX: this.mouseWheelX, WheelX: mouseWheelX,
WheelY: this.mouseWheelY WheelY: mouseWheelY
}), !0; }), !0;
} }
setVerticalScrollMultiplier(vertical) { setVerticalScrollMultiplier(vertical) {
@ -3358,7 +3357,7 @@ class EmulatedMkbHandler extends MkbHandler {
} }
destroy() { destroy() {
if (!this.initialized) return; if (!this.initialized) return;
if (this.initialized = !1, this.isPolling = !1, this.enabled = !1, this.stop(), this.waitForMouseData(!1), document.pointerLockElement && document.exitPointerLock(), window.removeEventListener("keydown", this.onKeyboardEvent), window.removeEventListener("keyup", this.onKeyboardEvent), AppInterface) window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this); if (this.initialized = !1, this.isPolling = !1, this.enabled = !1, this.stop(), this.waitForMouseData(!1), document.exitPointerLock(), window.removeEventListener("keydown", this.onKeyboardEvent), window.removeEventListener("keyup", this.onKeyboardEvent), AppInterface) window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this);
else document.removeEventListener("pointerlockchange", this.onPointerLockChange), document.removeEventListener("pointerlockerror", this.onPointerLockError); else document.removeEventListener("pointerlockchange", this.onPointerLockChange), document.removeEventListener("pointerlockerror", this.onPointerLockError);
window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this.onPollingModeChanged), BxEventBus.Script.off("dialog.shown", this.onDialogShown), this.mouseDataProvider?.destroy(), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this.onPollingModeChanged); window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this.onPollingModeChanged), BxEventBus.Script.off("dialog.shown", this.onDialogShown), this.mouseDataProvider?.destroy(), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this.onPollingModeChanged);
} }

View File

@ -3097,8 +3097,6 @@ class NativeMkbHandler extends MkbHandler {
pointerClient; pointerClient;
enabled = !1; enabled = !1;
mouseButtonsPressed = 0; mouseButtonsPressed = 0;
mouseWheelX = 0;
mouseWheelY = 0;
mouseVerticalMultiply = 0; mouseVerticalMultiply = 0;
mouseHorizontalMultiply = 0; mouseHorizontalMultiply = 0;
inputSink; inputSink;
@ -3179,7 +3177,7 @@ class NativeMkbHandler extends MkbHandler {
this.resetMouseInput(), this.enabled = !1, this.updateInputConfigurationAsync(!1), this.waitForMouseData(!0); this.resetMouseInput(), this.enabled = !1, this.updateInputConfigurationAsync(!1), this.waitForMouseData(!0);
} }
destroy() { destroy() {
this.pointerClient?.stop(), this.stop(), window.removeEventListener("keyup", this), window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this), BxEventBus.Script.off("dialog.shown", this.onDialogShown), this.waitForMouseData(!1), document.pointerLockElement && document.exitPointerLock(); this.pointerClient?.stop(), this.stop(), window.removeEventListener("keyup", this), window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this), BxEventBus.Script.off("dialog.shown", this.onDialogShown), this.waitForMouseData(!1), document.exitPointerLock();
} }
handleMouseMove(data) { handleMouseMove(data) {
this.sendMouseInput({ this.sendMouseInput({
@ -3198,20 +3196,21 @@ class NativeMkbHandler extends MkbHandler {
X: 0, X: 0,
Y: 0, Y: 0,
Buttons: this.mouseButtonsPressed, Buttons: this.mouseButtonsPressed,
WheelX: this.mouseWheelX, WheelX: 0,
WheelY: this.mouseWheelY WheelY: 0
}); });
} }
handleMouseWheel(data) { handleMouseWheel(data) {
let { vertical, horizontal } = data; let { vertical, horizontal } = data, mouseWheelX = horizontal;
if (this.mouseWheelX = horizontal, this.mouseHorizontalMultiply && this.mouseHorizontalMultiply !== 1) this.mouseWheelX *= this.mouseHorizontalMultiply; if (this.mouseHorizontalMultiply && this.mouseHorizontalMultiply !== 1) mouseWheelX *= this.mouseHorizontalMultiply;
if (this.mouseWheelY = vertical, this.mouseVerticalMultiply && this.mouseVerticalMultiply !== 1) this.mouseWheelY *= this.mouseVerticalMultiply; let mouseWheelY = vertical;
if (this.mouseVerticalMultiply && this.mouseVerticalMultiply !== 1) mouseWheelY *= this.mouseVerticalMultiply;
return this.sendMouseInput({ return this.sendMouseInput({
X: 0, X: 0,
Y: 0, Y: 0,
Buttons: this.mouseButtonsPressed, Buttons: this.mouseButtonsPressed,
WheelX: this.mouseWheelX, WheelX: mouseWheelX,
WheelY: this.mouseWheelY WheelY: mouseWheelY
}), !0; }), !0;
} }
setVerticalScrollMultiplier(vertical) { setVerticalScrollMultiplier(vertical) {
@ -3507,7 +3506,7 @@ class EmulatedMkbHandler extends MkbHandler {
} }
destroy() { destroy() {
if (!this.initialized) return; if (!this.initialized) return;
if (this.initialized = !1, this.isPolling = !1, this.enabled = !1, this.stop(), this.waitForMouseData(!1), document.pointerLockElement && document.exitPointerLock(), window.removeEventListener("keydown", this.onKeyboardEvent), window.removeEventListener("keyup", this.onKeyboardEvent), AppInterface) window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this); if (this.initialized = !1, this.isPolling = !1, this.enabled = !1, this.stop(), this.waitForMouseData(!1), document.exitPointerLock(), window.removeEventListener("keydown", this.onKeyboardEvent), window.removeEventListener("keyup", this.onKeyboardEvent), AppInterface) window.removeEventListener(BxEvent.POINTER_LOCK_REQUESTED, this), window.removeEventListener(BxEvent.POINTER_LOCK_EXITED, this);
else document.removeEventListener("pointerlockchange", this.onPointerLockChange), document.removeEventListener("pointerlockerror", this.onPointerLockError); else document.removeEventListener("pointerlockchange", this.onPointerLockChange), document.removeEventListener("pointerlockerror", this.onPointerLockError);
window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this.onPollingModeChanged), BxEventBus.Script.off("dialog.shown", this.onDialogShown), this.mouseDataProvider?.destroy(), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this.onPollingModeChanged); window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this.onPollingModeChanged), BxEventBus.Script.off("dialog.shown", this.onDialogShown), this.mouseDataProvider?.destroy(), window.removeEventListener(BxEvent.XCLOUD_POLLING_MODE_CHANGED, this.onPollingModeChanged);
} }