src/android patchset: changes AndroidAssetManager, AndroidInput, OGLESContext, JmeSystem, TextureLoader
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7501 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
fb28b20660
commit
0ec3bb6dba
76
engine/src/android/com/jme3/input/android/TouchEvent.java
Normal file
76
engine/src/android/com/jme3/input/android/TouchEvent.java
Normal file
@ -0,0 +1,76 @@
|
||||
package com.jme3.input.android;
|
||||
|
||||
import com.jme3.math.Vector2f;
|
||||
|
||||
public class TouchEvent
|
||||
{
|
||||
public static enum Type {GRABBED,DRAGGED,RELEASED,FLING,TAP,DOUBLETAP,LONGPRESSED,SCALE,OUTSIDE,IDLE}
|
||||
public Type type=Type.IDLE;
|
||||
|
||||
public static enum Operation {NOP,STARTED,RUNNING,STOPPED,CANCELED}
|
||||
private Operation operation=Operation.NOP;
|
||||
|
||||
public float x;
|
||||
public float y;
|
||||
public float deltax;
|
||||
public float deltay;
|
||||
public float[] extra;
|
||||
|
||||
public TouchEvent(Type type, Operation operation, float x, float y, float deltax, float deltay, float[] extra)
|
||||
{
|
||||
set(type, operation, x, y, deltax, deltay, extra);
|
||||
}
|
||||
|
||||
public void set( Type type, Operation operation, float x, float y, float deltax, float deltay, float[] extra)
|
||||
{
|
||||
this.type=type;
|
||||
this.operation=operation;
|
||||
this.x=x;
|
||||
this.y=y;
|
||||
this.deltax=deltax;
|
||||
this.deltay=deltay;
|
||||
this.extra=extra;
|
||||
}
|
||||
|
||||
|
||||
public Type getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public Operation getOperation()
|
||||
{
|
||||
return operation;
|
||||
}
|
||||
|
||||
|
||||
public float getX()
|
||||
{
|
||||
return x;
|
||||
}
|
||||
|
||||
public float getY()
|
||||
{
|
||||
return y;
|
||||
}
|
||||
|
||||
public float getDeltaX()
|
||||
{
|
||||
return deltax;
|
||||
}
|
||||
|
||||
public float getDeltaY()
|
||||
{
|
||||
return deltay;
|
||||
}
|
||||
|
||||
public float[] getExtra()
|
||||
{
|
||||
return extra;
|
||||
}
|
||||
|
||||
public Vector2f getDelta()
|
||||
{
|
||||
return new Vector2f(deltax,deltay);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user