Android: Allow finger movement while pressing button
This commit is contained in:
1 parent
78b3eb1e64
commit
72f3d69a78
1 file changed
+2
-1
@@ -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.
|
// 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.
|
// Check if there was a touch within the bounds of a drawable.
|
||||||
for (InputOverlayDrawableButton button : overlayButtons)
|
for (InputOverlayDrawableButton button : overlayButtons)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in new issue
Block a user