mirror of
https://github.com/wassname/phaser.git
synced 2026-07-17 11:31:30 +08:00
* 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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user