Skip to content

Commit eab6cdf

Browse files
authored
[Reviewed] [Mouse pointer lock] Add handling of touches (#889)
1 parent 24bfea7 commit eab6cdf

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

extensions/reviewed/MousePointerLock.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"name": "MousePointerLock",
99
"previewIconUrl": "https://resources.gdevelop-app.com/assets/Icons/Line Hero Pack/Master/SVG/Virtual Reality/Virtual Reality_360_rotate_vr_movement.svg",
1010
"shortDescription": "This behavior removes the limit on the distance the mouse can move and hides the cursor.",
11-
"version": "0.1.4",
11+
"version": "0.1.5",
1212
"description": [
1313
"This behavior removes the limit on the distance the mouse can move and hides the cursor.",
1414
"",
@@ -17,7 +17,7 @@
1717
"",
1818
"Game players don't have to worry about leaving the gameplay area or accidentally clicking on another application that moves the mouse focus away from the game.",
1919
"",
20-
"Locking the pointer locks `MouseX()` and `MouseY()` expressions.",
20+
"Locking the pointer locks `CursorX()` and `CursorY()` expressions.",
2121
"Use `MovementX()` and `MovementY()` instead.",
2222
""
2323
],
@@ -50,7 +50,7 @@
5050
"gdjs._MousePointerLockExtension = {};",
5151
"gdjs._MousePointerLockExtension.movement = { x: 0, y: 0 };",
5252
"",
53-
"canvas.addEventListener(\"mousemove\", (e) => {",
53+
"canvas.addEventListener(\"pointermove\", (e) => {",
5454
" gdjs._MousePointerLockExtension.movement.x += e.movementX || 0;",
5555
" gdjs._MousePointerLockExtension.movement.y += e.movementY || 0;",
5656
"}, false);"
@@ -182,4 +182,4 @@
182182
],
183183
"eventsBasedBehaviors": [],
184184
"eventsBasedObjects": []
185-
}
185+
}

0 commit comments

Comments
 (0)