mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
always use MouseEvent in keyboard hooks
This commit is contained in:
parent
d5d615bfd3
commit
fe33f51424
@ -442,9 +442,8 @@ export class Camera extends BasicSerializableObject {
|
|||||||
this.downPreHandler.dispatch(new Vector(event.clientX, event.clientY), enumMouseButton.middle);
|
this.downPreHandler.dispatch(new Vector(event.clientX, event.clientY), enumMouseButton.middle);
|
||||||
} else if (event.button === 2) {
|
} else if (event.button === 2) {
|
||||||
this.downPreHandler.dispatch(new Vector(event.clientX, event.clientY), enumMouseButton.right);
|
this.downPreHandler.dispatch(new Vector(event.clientX, event.clientY), enumMouseButton.right);
|
||||||
} else {
|
|
||||||
this.root.app.inputMgr.handleKeydown(event);
|
|
||||||
}
|
}
|
||||||
|
this.root.app.inputMgr.handleKeydown(event);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -486,9 +485,7 @@ export class Camera extends BasicSerializableObject {
|
|||||||
if (!this.checkPreventDoubleMouse()) {
|
if (!this.checkPreventDoubleMouse()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (event.button >= 3) {
|
this.root.app.inputMgr.handleKeyup(event);
|
||||||
this.root.app.inputMgr.handleKeyup(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.combinedSingleTouchStopHandler(event.clientX, event.clientY);
|
this.combinedSingleTouchStopHandler(event.clientX, event.clientY);
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user