mirror of
https://github.com/wassname/phaser.git
synced 2026-07-17 11:31:30 +08:00
fix #154 Button now goes back to over state when setFrames used in action
This commit is contained in:
@@ -197,7 +197,7 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
|
||||
{
|
||||
this._onDownFrameName = downFrame;
|
||||
|
||||
if (this.input.pointerOver())
|
||||
if (this.input.pointerDown())
|
||||
{
|
||||
this.frameName = downFrame;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
|
||||
{
|
||||
this._onDownFrameID = downFrame;
|
||||
|
||||
if (this.input.pointerOver())
|
||||
if (this.input.pointerDown())
|
||||
{
|
||||
this.frame = downFrame;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user