mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix camera pan (#673)
* Fix some literal edge cases * Fixed for fullscreen
This commit is contained in:
parent
b32ae43464
commit
cceffc1832
@ -862,6 +862,10 @@ export class Camera extends BasicSerializableObject {
|
|||||||
* @param {number} dt
|
* @param {number} dt
|
||||||
*/
|
*/
|
||||||
internalUpdateMousePanning(now, dt) {
|
internalUpdateMousePanning(now, dt) {
|
||||||
|
if (!this.root.app.focused) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.root.app.settings.getAllSettings().enableMousePan) {
|
if (!this.root.app.settings.getAllSettings().enableMousePan) {
|
||||||
// Not enabled
|
// Not enabled
|
||||||
return;
|
return;
|
||||||
@ -882,10 +886,10 @@ export class Camera extends BasicSerializableObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
mousePos.x < 0 ||
|
mousePos.x <= 0 ||
|
||||||
mousePos.y < 0 ||
|
mousePos.y <= 0 ||
|
||||||
mousePos.x > this.root.gameWidth ||
|
mousePos.x >= this.root.gameWidth ||
|
||||||
mousePos.y > this.root.gameHeight
|
mousePos.y >= this.root.gameHeight
|
||||||
) {
|
) {
|
||||||
// Out of screen
|
// Out of screen
|
||||||
return;
|
return;
|
||||||
|
@ -48,6 +48,10 @@ export class HUDShapeViewer extends BaseHUDPart {
|
|||||||
this.close();
|
this.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isBlockingOverlay() {
|
||||||
|
return this.visible;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the copying of a key was requested
|
* Called when the copying of a key was requested
|
||||||
*/
|
*/
|
||||||
|
Loading…
Reference in New Issue
Block a user