Merge pull request #557 from minggo/iss755

fixed #755
This commit is contained in:
minggo 2011-10-19 02:03:19 -07:00
commit 7e8e7c7e87
3 changed files with 17 additions and 14 deletions

View File

@ -297,8 +297,8 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
case MotionEvent.ACTION_DOWN:
// there are only one finger on the screen
final int idDown = event.getPointerId(0);
final float xDown = event.getX(idDown);
final float yDown = event.getY(idDown);
final float xDown = xs[0];
final float yDown = ys[0];
queueEvent(new Runnable() {
@Override
@ -333,8 +333,8 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
case MotionEvent.ACTION_UP:
// there are only one finger on the screen
final int idUp = event.getPointerId(0);
final float xUp = event.getX(idUp);
final float yUp = event.getY(idUp);
final float xUp = xs[0];
final float yUp = ys[0];
queueEvent(new Runnable() {
@Override
@ -374,6 +374,7 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
}
return super.onKeyDown(keyCode, event);
}
// Show an event in the LogCat view, for debugging
private void dumpEvent(MotionEvent event) {
String names[] = { "DOWN" , "UP" , "MOVE" , "CANCEL" , "OUTSIDE" ,

View File

@ -297,8 +297,8 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
case MotionEvent.ACTION_DOWN:
// there are only one finger on the screen
final int idDown = event.getPointerId(0);
final float xDown = event.getX(idDown);
final float yDown = event.getY(idDown);
final float xDown = xs[0];
final float yDown = ys[0];
queueEvent(new Runnable() {
@Override
@ -333,8 +333,8 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
case MotionEvent.ACTION_UP:
// there are only one finger on the screen
final int idUp = event.getPointerId(0);
final float xUp = event.getX(idUp);
final float yUp = event.getY(idUp);
final float xUp = xs[0];
final float yUp = ys[0];
queueEvent(new Runnable() {
@Override
@ -374,6 +374,7 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
}
return super.onKeyDown(keyCode, event);
}
// Show an event in the LogCat view, for debugging
private void dumpEvent(MotionEvent event) {
String names[] = { "DOWN" , "UP" , "MOVE" , "CANCEL" , "OUTSIDE" ,

View File

@ -297,8 +297,8 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
case MotionEvent.ACTION_DOWN:
// there are only one finger on the screen
final int idDown = event.getPointerId(0);
final float xDown = event.getX(idDown);
final float yDown = event.getY(idDown);
final float xDown = xs[0];
final float yDown = ys[0];
queueEvent(new Runnable() {
@Override
@ -333,8 +333,8 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
case MotionEvent.ACTION_UP:
// there are only one finger on the screen
final int idUp = event.getPointerId(0);
final float xUp = event.getX(idUp);
final float yUp = event.getY(idUp);
final float xUp = xs[0];
final float yUp = ys[0];
queueEvent(new Runnable() {
@Override
@ -374,6 +374,7 @@ public class Cocos2dxGLSurfaceView extends GLSurfaceView {
}
return super.onKeyDown(keyCode, event);
}
// Show an event in the LogCat view, for debugging
private void dumpEvent(MotionEvent event) {
String names[] = { "DOWN" , "UP" , "MOVE" , "CANCEL" , "OUTSIDE" ,