mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 05:03:37 +00:00
InputHandler.validForInput now checks if the game object has input.enabled
set to false
and doesn't validate it for input if that's the case.
This commit is contained in:
parent
9f08442304
commit
2633f8ce6d
3 changed files with 3 additions and 2 deletions
|
@ -288,6 +288,7 @@ If you are an exceptional JavaScript developer and would like to join the Phaser
|
|||
* The Physics Editor Exporter (found in the resources folder of the repo) has had an option to prefix shape names and optimize JSON output added to it (thanks @Garbanas #2093)
|
||||
* Touch.addTouchLockCallback has a new argument `onEnd` which allows the callback to fire either on a touchstart or a touchend event.
|
||||
* The SoundManager now detects if the browser is running under iOS9 and uses a touchend callback to unlock the audio subsystem. Previous versions of iOS (and Android) still use touchstart. This fixes Apple's screw-up with regard to changing the way Web Audio should be triggered in Mobile Safari. Thanks Apple (thanks @MyCatCarlos for the heads-up #2095)
|
||||
* InputHandler.validForInput now checks if the game object has `input.enabled` set to `false` and doesn't validate it for input if that's the case.
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
|
|
|
@ -438,7 +438,7 @@ Phaser.InputHandler.prototype = {
|
|||
|
||||
if (includePixelPerfect === undefined) { includePixelPerfect = true; }
|
||||
|
||||
if (this.sprite.scale.x === 0 || this.sprite.scale.y === 0 || this.priorityID < this.game.input.minPriorityID)
|
||||
if (!this.enabled || this.sprite.scale.x === 0 || this.sprite.scale.y === 0 || this.priorityID < this.game.input.minPriorityID)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -833,7 +833,7 @@ Phaser.Pointer.prototype = {
|
|||
|
||||
var currentNode = this.game.input.interactiveItems.first;
|
||||
|
||||
while(currentNode)
|
||||
while (currentNode)
|
||||
{
|
||||
if (!currentNode.checked &&
|
||||
currentNode.validForInput(highestInputPriorityID, highestRenderOrderID, true))
|
||||
|
|
Loading…
Reference in a new issue