Input no longer sets cursor to default if already set to none

This commit is contained in:
Richard Davey
2013-12-26 00:52:01 +00:00
parent 167a498a5e
commit 923a10ee81
3 changed files with 9 additions and 4 deletions
+1
View File
@@ -101,6 +101,7 @@ Updates:
* Lots of documentation fixes in the Tween class.
* Tweens fire an onLoop event if they are set to repeat. onComplete is now only fired for the final repeat (or never if the repeat is infinite)
* Pointer used to un-pause a paused game every time it was clicked/touched (this avoided some rogue browser plugins). Now only happens if Stage.disableVisibilityChange is true.
* Input doesn't set the cursor to default if it's already set to none.
Bug Fixes:
+5 -1
View File
@@ -488,7 +488,11 @@ Phaser.Input.prototype = {
}
this.currentPointers = 0;
this.game.stage.canvas.style.cursor = "default";
if (this.game.canvas.style.cursor !== 'none')
{
this.game.canvas.style.cursor = 'default';
}
if (hard === true)
{
+3 -3
View File
@@ -584,7 +584,7 @@ Phaser.InputHandler.prototype = {
if (this.useHandCursor && this._pointerData[pointer.id].isDragged === false)
{
this.game.stage.canvas.style.cursor = "pointer";
this.game.canvas.style.cursor = "pointer";
}
this.sprite.events.onInputOver.dispatch(this.sprite, pointer);
@@ -605,7 +605,7 @@ Phaser.InputHandler.prototype = {
if (this.useHandCursor && this._pointerData[pointer.id].isDragged === false)
{
this.game.stage.canvas.style.cursor = "default";
this.game.canvas.style.cursor = "default";
}
if (this.sprite && this.sprite.events)
@@ -674,7 +674,7 @@ Phaser.InputHandler.prototype = {
// Pointer outside the sprite? Reset the cursor
if (this.useHandCursor)
{
this.game.stage.canvas.style.cursor = "default";
this.game.canvas.style.cursor = "default";
}
}