Phaser.MSPointer = function (game){ this.game = game; this.callbackContext = this.game; this.disabled = false ; this._onMSPointerDown = null ; this._onMSPointerMove = null ; this._onMSPointerUp = null ; } ; Phaser.MSPointer.prototype = { start: function (){ if (this._onMSPointerDown !== null ) { return ; } var _this = this; if (this.game.device.mspointer) { this._onMSPointerDown = function (event){ return _this.onPointerDown(event); } ; this._onMSPointerMove = function (event){ return _this.onPointerMove(event); } ; this._onMSPointerUp = function (event){ return _this.onPointerUp(event); } ; this.game.canvas.addEventListener('MSPointerDown', this._onMSPointerDown, false ); this.game.canvas.addEventListener('MSPointerMove', this._onMSPointerMove, false ); this.game.canvas.addEventListener('MSPointerUp', this._onMSPointerUp, false ); this.game.canvas.addEventListener('pointerDown', this._onMSPointerDown, false ); this.game.canvas.addEventListener('pointerMove', this._onMSPointerMove, false ); this.game.canvas.addEventListener('pointerUp', this._onMSPointerUp, false ); this.game.canvas.style["-ms-content-zooming"] = 'none'; this.game.canvas.style["-ms-touch-action"] = 'none'; } } , onPointerDown: function (event){ if (this.game.input.disabled || this.disabled) { return ; } event.preventDefault(); event.identifier = event.pointerId; this.game.input.startPointer(event); } , onPointerMove: function (event){ if (this.game.input.disabled || this.disabled) { return ; } event.preventDefault(); event.identifier = event.pointerId; this.game.input.updatePointer(event); } , onPointerUp: function (event){ if (this.game.input.disabled || this.disabled) { return ; } event.preventDefault(); event.identifier = event.pointerId; this.game.input.stopPointer(event); } , stop: function (){ this.game.canvas.removeEventListener('MSPointerDown', this._onMSPointerDown); this.game.canvas.removeEventListener('MSPointerMove', this._onMSPointerMove); this.game.canvas.removeEventListener('MSPointerUp', this._onMSPointerUp); this.game.canvas.removeEventListener('pointerDown', this._onMSPointerDown); this.game.canvas.removeEventListener('pointerMove', this._onMSPointerMove); this.game.canvas.removeEventListener('pointerUp', this._onMSPointerUp); } } ; Phaser.MSPointer.prototype.constructor = Phaser.MSPointer;