From 9b63134b457ee0ed62cf85d980ca71b242004ae8 Mon Sep 17 00:00:00 2001 From: JayceTDE Date: Fri, 6 Jan 2017 12:47:46 -0700 Subject: [PATCH] Fixed floating button values --- v2-community/CHANGELOG.md | 1 + v2-community/src/input/DeviceButton.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/v2-community/CHANGELOG.md b/v2-community/CHANGELOG.md index 79584e73b..6e9eaa889 100755 --- a/v2-community/CHANGELOG.md +++ b/v2-community/CHANGELOG.md @@ -16,6 +16,7 @@ ### Bug Fixes +* Floating Gamepad buttons now work correctly when partially pressing and releasing * Phaser.Line.intersectsRectangle() now works correctly for horizontal and vertical lines ([#2942](https://github.com/photonstorm/phaser/issues/2942)). * removeTextureAtlas now deletes the correct cache object. diff --git a/v2-community/src/input/DeviceButton.js b/v2-community/src/input/DeviceButton.js index 94a3c570f..640261a38 100755 --- a/v2-community/src/input/DeviceButton.js +++ b/v2-community/src/input/DeviceButton.js @@ -219,6 +219,9 @@ Phaser.DeviceButton.prototype = { */ padFloat: function (value) { + this.isDown = false; + this.isUp = false; + this.value = value; this.onFloat.dispatch(this, value);