Android: Allow finger movement while pressing button
This commit is contained in:
parent
78b3eb1e64
commit
72f3d69a78
|
@ -116,7 +116,8 @@ public final class InputOverlay extends SurfaceView implements OnTouchListener
|
|||
//
|
||||
// TODO: Refactor this so we detect either Axis movements or button presses so we don't run two loops all the time.
|
||||
//
|
||||
int buttonState = (event.getAction() == MotionEvent.ACTION_DOWN) ? ButtonState.PRESSED : ButtonState.RELEASED;
|
||||
int buttonState = (event.getAction() == MotionEvent.ACTION_DOWN || event.getAction() == MotionEvent.ACTION_MOVE)
|
||||
? ButtonState.PRESSED : ButtonState.RELEASED;
|
||||
// Check if there was a touch within the bounds of a drawable.
|
||||
for (InputOverlayDrawableButton button : overlayButtons)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue