Skip to content

Commit 3227918

Browse files
committed
fix phaserjs#154 Button now goes back to over state when setFrames used in action
1 parent 903c2e7 commit 3227918

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
@@ -197,7 +197,7 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
197197
{
198198
this._onDownFrameName = downFrame;
199199

200-
if (this.input.pointerOver())
200+
if (this.input.pointerDown())
201201
{
202202
this.frameName = downFrame;
203203
}
@@ -206,7 +206,7 @@ Phaser.Button.prototype.setFrames = function (overFrame, outFrame, downFrame) {
206206
{
207207
this._onDownFrameID = downFrame;
208208

209-
if (this.input.pointerOver())
209+
if (this.input.pointerDown())
210210
{
211211
this.frame = downFrame;
212212
}

0 commit comments

Comments
 (0)