project_files/Android-build/SDL-android-project/src/org/hedgewars/mobile/TouchInterface/TouchInterface.java
branchhedgeroid
changeset 5550 50650032c251
parent 5546 d36dac11a9b2
child 5621 ea796c83ea47
equal deleted inserted replaced
5548:73f2fec65257 5550:50650032c251
    38 		
    38 		
    39 		int action = event.getAction();
    39 		int action = event.getAction();
    40 		int actionCode = action & MotionEvent.ACTION_MASK;
    40 		int actionCode = action & MotionEvent.ACTION_MASK;
    41 		
    41 		
    42 		for (int i = 0; i < event.getPointerCount(); i++) {
    42 		for (int i = 0; i < event.getPointerCount(); i++) {
    43 			SDLActivity.onNativeTouch(actionCode, event.getPointerId(i), event.getX(i), event.getY(i), event.getPressure(i));
    43 			SDLActivity.onNativeTouch(actionCode, event.getPointerId(i), (int)event.getX(i), (int)event.getY(i), event.getPressure(i));
       
    44 //			Log.d("Android", String.format("x=%f, y=%f, pntr=%d", event.getX(i), event.getY(i), event.getPointerId(i)));
    44 		   }
    45 		   }
    45 		return true;
    46 		return true;
    46 	}
    47 	}
    47 
    48 
    48 	/** Show an event in the LogCat view, for debugging */
    49 	/** Show an event in the LogCat view, for debugging */