diff --git a/src/input/InputManager.js b/src/input/InputManager.js index 0d7c17fb7..ac934ca40 100644 --- a/src/input/InputManager.js +++ b/src/input/InputManager.js @@ -771,6 +771,25 @@ var InputManager = new Class({ this.updateInputPlugins(CONST.MOUSE_WHEEL, this.mousePointerContainer); }, + /** + * Processes a pointer lock change event, as passed in by the MouseManager. + * + * @method Phaser.Input.InputManager#onPointerLockChange + * @fires Phaser.Input.Events#POINTERLOCK_CHANGE + * @private + * @since 3.19.0 + * + * @param {MouseEvent} event - The native DOM Mouse event. + */ + onPointerLockChange: function (event) + { + var isLocked = this.mouse.locked; + + this.mousePointer.locked = isLocked; + + this.events.emit(Events.POINTERLOCK_CHANGE, event, isLocked); + }, + /** * Checks if the given Game Object should be considered as a candidate for input or not. *