From 3227918c57e1b0cf1c57156bdf42f6b64fb4c447 Mon Sep 17 00:00:00 2001 From: beeglebug Date: Sat, 2 Nov 2013 11:24:00 +0000 Subject: [PATCH] fix #154 Button now goes back to over state when setFrames used in action --- src/gameobjects/Button.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gameobjects/Button.js b/src/gameobjects/Button.js index 63bceb82..1dd1a331 100644 --- a/src/gameobjects/Button.js +++ b/src/gameobjects/Button.js @@ -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; }