Skip to content

Commit 0e84b7c

Browse files
committed
Merge pull request phaserjs#162 from beeglebug/button
Button now goes back to over state when setFrames used in action
2 parents a5c8b25 + 3227918 commit 0e84b7c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/gameobjects/Button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
253253
{
254254
this._onDownFrameName = downFrame;
255255

256-
if (this.input.pointerOver())
256+
if (this.input.pointerDown())
257257
{
258258
this.frameName = downFrame;
259259
}
@@ -262,7 +262,7 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
262262
{
263263
this._onDownFrameID = downFrame;
264264

265-
if (this.input.pointerOver())
265+
if (this.input.pointerDown())
266266
{
267267
this.frame = downFrame;
268268
}

0 commit comments

Comments
 (0)