MrLoick / flixel-android

Automatically exported from code.google.com/p/flixel-android
Other
0 stars 0 forks source link

Button goes into HIGHLIGHT state when release two buttons simultaneous. #19

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Open TiledMap2 demo.
2. Press and hold two buttons.
3. Release two buttons simultaneous.

Expected output
The buttons goes into NORMAL state.

Actual output:
One of the buttons goes into HIGHLIGHT state.

Please use labels and text to provide additional information.
FlxButton::updateButton
When two (or more) buttons are pressed and released at the same time, one 
button goes into HIGHLIGHT state. That's because the button get twice into
updateButton.

1. Released two buttons simultaneous.
2. first notifyObserver fires.
3. Everything within the observer will be fired.
4. The button checks which of the touches are in the same coordinates of the 
button and set it to NORMAL state.
5. second notifyObserver fires.
6. Everything within the observer will be fired.
7. The button checks which of the touches are in the same coordinates of the 
button and because it's already in NORMAL state it will goes into HIGHLIGHT
state.

To fixed this, it could be to set the position of the touch out of the screen 
after justReleased I think.

Original issue reported on code.google.com by kawingc...@gmail.com on 6 Jul 2012 at 9:34

GoogleCodeExporter commented 8 years ago
Fixed by r64

Original comment by TSWes...@gmail.com on 12 Jul 2012 at 12:06