The Pointer move callbacks are now sent an extra parameter: fromClick allowing your callbacks to distinguish between the Pointer just moving, or moving as a result of being pressed down (thanks @iforce2d #1055)

This commit is contained in:
photonstorm 2014-08-29 14:19:47 +01:00
parent 9b6ffc3f94
commit 9055fc7e01
2 changed files with 2 additions and 1 deletions

View file

@ -117,6 +117,7 @@ Version 2.1.0 - "Cairhien" - -in development-
* P2.PointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
* P2.InversePointProxy.x and y values are now returned in pixels (previously they were returned in meters). See PointProxy.mx/my for meter values.
* Arcade.overlap and collide are now more consistent about allowing a Group vs. Group or Group vs. Array of Groups set (thanks @pyromanfo #877 #1147)
* The Pointer move callbacks are now sent an extra parameter: `fromClick` allowing your callbacks to distinguish between the Pointer just moving, or moving as a result of being pressed down (thanks @iforce2d #1055)
### Bug Fixes

View file

@ -434,7 +434,7 @@ Phaser.Pointer.prototype = {
while (i--)
{
this.game.input.moveCallbacks[i].callback.call(this.game.input.moveCallbacks[i].context, this, this.x, this.y);
this.game.input.moveCallbacks[i].callback.call(this.game.input.moveCallbacks[i].context, this, this.x, this.y, fromClick);
}
// Easy out if we're dragging something and it still exists