* Fixed issue in Sound.play where if you gave a missing marker it would play the whole sound sprite instead.

* Button.setFrames will set the current frame based on the button state immediately.
* InputHandler now creates the _pointerData array on creation and populates with one empty set of values, so pointerOver etc all work before a start call.
* Added Canvas.setUserSelect() to disable touchCallouts and user selections within the canvas.
* When the game boots it will now by default disable user-select and touch action events on the game canvas.
* Loaded.setPreloadSprite now rounds the width/height values and starts from 1. This fixes canvas draw errors in IE9/10 and Firefox.
This commit is contained in:
Richard Davey
2013-09-30 17:12:22 +01:00
parent 8d17e1f963
commit 16b1913de1
7 changed files with 114 additions and 31 deletions
+30
View File
@@ -84,10 +84,20 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
if (typeof overFrame === 'string')
{
this._onOverFrameName = overFrame;
if (this.input.pointerOver())
{
this.frameName = overFrame;
}
}
else
{
this._onOverFrameID = overFrame;
if (this.input.pointerOver())
{
this.frame = overFrame;
}
}
}
@@ -97,11 +107,21 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
{
this._onOutFrameName = outFrame;
this._onUpFrameName = outFrame;
if (this.input.pointerOver() == false)
{
this.frameName = outFrame;
}
}
else
{
this._onOutFrameID = outFrame;
this._onUpFrameID = outFrame;
if (this.input.pointerOver() == false)
{
this.frame = outFrame;
}
}
}
@@ -110,10 +130,20 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
if (typeof downFrame === 'string')
{
this._onDownFrameName = downFrame;
if (this.input.pointerOver())
{
this.frameName = downFrame;
}
}
else
{
this._onDownFrameID = downFrame;
if (this.input.pointerOver())
{
this.frame = downFrame;
}
}
}