Skip to content

Commit 254f384

Browse files
committed
Added locked property.
1 parent c7e2fbb commit 254f384

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

src/input/Pointer.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,22 @@ var Pointer = new Class({
438438
*/
439439
this.active = (id === 0) ? true : false;
440440

441+
/**
442+
* Is this pointer Pointer Locked?
443+
*
444+
* Only a mouse pointer can be locked and it only becomes locked when requested via
445+
* the browsers Pointer Lock API.
446+
*
447+
* You can request this by calling the `this.input.mouse.requestPointerLock()` method from
448+
* a `pointerdown` or `pointerup` event handler.
449+
*
450+
* @name Phaser.Input.Pointer#locked
451+
* @readonly
452+
* @type {boolean}
453+
* @since 3.19.0
454+
*/
455+
this.locked = false;
456+
441457
/**
442458
* The horizontal scroll amount that occurred due to the user moving a mouse wheel or similar input device.
443459
*

0 commit comments

Comments
 (0)