diff --git a/src/components/gameMaster/zoneEditor/EventTiles.vue b/src/components/gameMaster/zoneEditor/EventTiles.vue index 8f8a44e..76ecc63 100644 --- a/src/components/gameMaster/zoneEditor/EventTiles.vue +++ b/src/components/gameMaster/zoneEditor/EventTiles.vue @@ -39,6 +39,9 @@ function pencil(pointer: Phaser.Input.Pointer) { // Check if left mouse button is pressed if (!pointer.isDown) return + // Check if shift is not pressed, this means we are moving the camera + if (pointer.event.shiftKey) return + // Check if there is a tile const tile = getTile(props.tilemap, pointer.worldX, pointer.worldY) if (!tile) return @@ -84,6 +87,9 @@ function eraser(pointer: Phaser.Input.Pointer) { // Check if left mouse button is pressed if (!pointer.isDown) return + // Check if shift is not pressed, this means we are moving the camera + if (pointer.event.shiftKey) return + // Check if there is a tile const tile = getTile(props.tilemap, pointer.worldX, pointer.worldY) if (!tile) return diff --git a/src/components/gameMaster/zoneEditor/Objects.vue b/src/components/gameMaster/zoneEditor/Objects.vue index 5878bfc..8eacc87 100644 --- a/src/components/gameMaster/zoneEditor/Objects.vue +++ b/src/components/gameMaster/zoneEditor/Objects.vue @@ -51,6 +51,9 @@ function pencil(pointer: Phaser.Input.Pointer) { // Check if left mouse button is pressed if (!pointer.isDown) return + // Check if shift is not pressed, this means we are moving the camera + if (pointer.event.shiftKey) return + // Check if there is a tile const tile = getTile(props.tilemap, pointer.worldX, pointer.worldY) if (!tile) return @@ -88,6 +91,9 @@ function eraser(pointer: Phaser.Input.Pointer) { // Check if left mouse button is pressed if (!pointer.isDown) return + // Check if shift is not pressed, this means we are moving the camera + if (pointer.event.shiftKey) return + // Check if there is a tile const tile = getTile(props.tilemap, pointer.worldX, pointer.worldY) if (!tile) return diff --git a/src/components/gameMaster/zoneEditor/Tiles.vue b/src/components/gameMaster/zoneEditor/Tiles.vue index 3f1adfd..3a44ea1 100644 --- a/src/components/gameMaster/zoneEditor/Tiles.vue +++ b/src/components/gameMaster/zoneEditor/Tiles.vue @@ -62,6 +62,9 @@ function pencil(pointer: Phaser.Input.Pointer) { // Check if left mouse button is pressed if (!pointer.isDown) return + // Check if shift is not pressed, this means we are moving the camera + if (pointer.event.shiftKey) return + // Check if there is a tile const tile = getTile(tiles, pointer.worldX, pointer.worldY) if (!tile) return @@ -86,6 +89,9 @@ function eraser(pointer: Phaser.Input.Pointer) { // Check if left mouse button is pressed if (!pointer.isDown) return + // Check if shift is not pressed, this means we are moving the camera + if (pointer.event.shiftKey) return + // Check if there is a tile const tile = getTile(tiles, pointer.worldX, pointer.worldY) if (!tile) return