mirror of
https://github.com/wassname/phaser.git
synced 2026-06-27 16:10:15 +08:00
Input no longer sets cursor to default if already set to none
This commit is contained in:
@@ -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
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user