OSDN Git Service

[change] minor improvement
authorchristoph.widulle <christoph.widulle@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Thu, 30 Dec 2010 21:10:31 +0000 (21:10 +0000)
committerchristoph.widulle <christoph.widulle@6c4fd544-2939-11df-bb46-9574ba5d0bfa>
Thu, 30 Dec 2010 21:10:31 +0000 (21:10 +0000)
backends/gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidSingleTouchHandler.java

index 57b697c..707ff66 100644 (file)
@@ -29,21 +29,20 @@ public class AndroidSingleTouchHandler implements AndroidTouchHandler {
                int y = (int)event.getY();\r
                input.touchX[0] = x;\r
                input.touchY[0] = y;\r
+\r
                if (event.getAction() == MotionEvent.ACTION_DOWN) {\r
                        postTouchEvent(input, TouchEvent.TOUCH_DOWN, x, y, 0);\r
                        input.touched[0] = true;\r
-               }\r
 \r
-               if (event.getAction() == MotionEvent.ACTION_MOVE) {\r
+               }else if (event.getAction() == MotionEvent.ACTION_MOVE) {\r
                        postTouchEvent(input, TouchEvent.TOUCH_DRAGGED, x, y, 0);\r
                        input.touched[0] = true;\r
-               }\r
-               if (event.getAction() == MotionEvent.ACTION_UP) {\r
+\r
+               }else if (event.getAction() == MotionEvent.ACTION_UP) {\r
                        postTouchEvent(input, TouchEvent.TOUCH_UP, x, y, 0);\r
                        input.touched[0] = false;\r
-               }\r
 \r
-               if (event.getAction() == MotionEvent.ACTION_CANCEL) {\r
+               }else if (event.getAction() == MotionEvent.ACTION_CANCEL) {\r
                        postTouchEvent(input, TouchEvent.TOUCH_UP, x, y, 0);\r
                        input.touched[0] = false;\r
                }\r