|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.gameengine.icadroids.input.TouchInput
public class TouchInput
TouchInput class that sets and handles the input and put the result in easy-to-use flags. Each flag can statically be accessed, they hold the values. Do not instantiate this class yourself, all you need are the static values.
Field Summary | |
---|---|
static int |
fingerCount
the number of touches in this multiple touch event |
static int |
maxFingers
Change this value to increase the amount of fingers you can use. defaults to 10. |
static boolean |
onPress
TRUE when device receives input ; FALSE otherwise |
static boolean |
onRelease
TRUE when device has no input/or loses input(ex: user removes his finger) |
static boolean |
pinch
TRUE when space between two fingers decreases. |
static float |
scale
gets the scaling factor that applies on zoom and pinch actions |
static boolean |
use
Wether or not you want to use the touch input or not , set this flag to true if you want to use it. |
static float[] |
xPointer
Use this when you want to check the locations of multiple touches. |
static float |
xPos
The X position of the point where the user touches the screen. |
static float[] |
yPointer
the Y value of multiple touches. |
static float |
yPos
The Y position of the point where the user touches the screen. |
static boolean |
zoom
TRUE when space between two fingers increase. |
Constructor Summary | |
---|---|
TouchInput()
|
Method Summary | |
---|---|
boolean |
onTouch(View v,
MotionEvent event)
DO NOT CALL THIS FUNCTION. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean use
public static int maxFingers
public static boolean onPress
public static boolean onRelease
public static float xPos
GameEngine.translateToGamePosition(float, float)
public static float yPos
GameEngine.translateToGamePosition(float, float)
public static boolean zoom
public static boolean pinch
public static float scale
public static float[] xPointer
public static float[] yPointer
public static int fingerCount
Constructor Detail |
---|
public TouchInput()
Method Detail |
---|
public boolean onTouch(View v, MotionEvent event)
v
- the View that android requiresevent
- the event that this function catches.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |