Package com.badlogic.gdx.backends.gwt
Class GwtInput
- java.lang.Object
-
- com.badlogic.gdx.backends.gwt.GwtInput
-
- All Implemented Interfaces:
com.badlogic.gdx.Input
public class GwtInput extends java.lang.Object implements com.badlogic.gdx.Input
-
-
Constructor Summary
Constructors Constructor Description GwtInput(com.google.gwt.dom.client.CanvasElement canvas)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcancelVibrate()floatgetAccelerometerX()floatgetAccelerometerY()floatgetAccelerometerZ()floatgetAzimuth()longgetCurrentEventTime()intgetDeltaX()intgetDeltaX(int pointer)intgetDeltaY()intgetDeltaY(int pointer)floatgetGyroscopeX()floatgetGyroscopeY()floatgetGyroscopeZ()com.badlogic.gdx.InputProcessorgetInputProcessor()intgetMaxPointers()protected static java.lang.StringgetMouseWheelEvent()Kindly borrowed from PlayN.com.badlogic.gdx.Input.OrientationgetNativeOrientation()floatgetPitch()floatgetPressure()floatgetPressure(int pointer)protected intgetRelativeX(com.google.gwt.dom.client.NativeEvent e, com.google.gwt.dom.client.CanvasElement target)Kindly borrowed from PlayN.protected intgetRelativeX(com.google.gwt.dom.client.Touch touch, com.google.gwt.dom.client.CanvasElement target)protected intgetRelativeY(com.google.gwt.dom.client.NativeEvent e, com.google.gwt.dom.client.CanvasElement target)Kindly borrowed from PlayN.protected intgetRelativeY(com.google.gwt.dom.client.Touch touch, com.google.gwt.dom.client.CanvasElement target)floatgetRoll()intgetRotation()voidgetRotationMatrix(float[] matrix)voidgetTextInput(com.badlogic.gdx.Input.TextInputListener listener, java.lang.String title, java.lang.String text, java.lang.String hint)intgetX()intgetX(int pointer)intgetY()intgetY(int pointer)booleanisButtonJustPressed(int button)booleanisButtonPressed(int button)booleanisCatchBackKey()booleanisCatchKey(int keycode)booleanisCatchMenuKey()booleanisCursorCatched()booleanisKeyJustPressed(int key)booleanisKeyPressed(int key)booleanisPeripheralAvailable(com.badlogic.gdx.Input.Peripheral peripheral)booleanisTouched()booleanisTouched(int pointer)booleanjustTouched()voidsetCatchBackKey(boolean catchBack)voidsetCatchKey(int keycode, boolean catchKey)voidsetCatchMenuKey(boolean catchMenu)voidsetCursorCatched(boolean catched)works only for Chrome > Version 18 with enabled Mouse Lock enable in about:flags or start Chrome with the --enable-pointer-lock flagvoidsetCursorPosition(int x, int y)voidsetInputProcessor(com.badlogic.gdx.InputProcessor processor)voidsetOnscreenKeyboardVisible(boolean visible)voidvibrate(int milliseconds)voidvibrate(long[] pattern, int repeat)
-
-
-
Method Detail
-
getAccelerometerX
public float getAccelerometerX()
- Specified by:
getAccelerometerXin interfacecom.badlogic.gdx.Input
-
getAccelerometerY
public float getAccelerometerY()
- Specified by:
getAccelerometerYin interfacecom.badlogic.gdx.Input
-
getAccelerometerZ
public float getAccelerometerZ()
- Specified by:
getAccelerometerZin interfacecom.badlogic.gdx.Input
-
getGyroscopeX
public float getGyroscopeX()
- Specified by:
getGyroscopeXin interfacecom.badlogic.gdx.Input
-
getGyroscopeY
public float getGyroscopeY()
- Specified by:
getGyroscopeYin interfacecom.badlogic.gdx.Input
-
getGyroscopeZ
public float getGyroscopeZ()
- Specified by:
getGyroscopeZin interfacecom.badlogic.gdx.Input
-
getMaxPointers
public int getMaxPointers()
- Specified by:
getMaxPointersin interfacecom.badlogic.gdx.Input
-
getX
public int getX()
- Specified by:
getXin interfacecom.badlogic.gdx.Input
-
getX
public int getX(int pointer)
- Specified by:
getXin interfacecom.badlogic.gdx.Input
-
getDeltaX
public int getDeltaX()
- Specified by:
getDeltaXin interfacecom.badlogic.gdx.Input
-
getDeltaX
public int getDeltaX(int pointer)
- Specified by:
getDeltaXin interfacecom.badlogic.gdx.Input
-
getY
public int getY()
- Specified by:
getYin interfacecom.badlogic.gdx.Input
-
getY
public int getY(int pointer)
- Specified by:
getYin interfacecom.badlogic.gdx.Input
-
getDeltaY
public int getDeltaY()
- Specified by:
getDeltaYin interfacecom.badlogic.gdx.Input
-
getDeltaY
public int getDeltaY(int pointer)
- Specified by:
getDeltaYin interfacecom.badlogic.gdx.Input
-
isTouched
public boolean isTouched()
- Specified by:
isTouchedin interfacecom.badlogic.gdx.Input
-
justTouched
public boolean justTouched()
- Specified by:
justTouchedin interfacecom.badlogic.gdx.Input
-
isTouched
public boolean isTouched(int pointer)
- Specified by:
isTouchedin interfacecom.badlogic.gdx.Input
-
getPressure
public float getPressure()
- Specified by:
getPressurein interfacecom.badlogic.gdx.Input
-
getPressure
public float getPressure(int pointer)
- Specified by:
getPressurein interfacecom.badlogic.gdx.Input
-
isButtonPressed
public boolean isButtonPressed(int button)
- Specified by:
isButtonPressedin interfacecom.badlogic.gdx.Input
-
isButtonJustPressed
public boolean isButtonJustPressed(int button)
- Specified by:
isButtonJustPressedin interfacecom.badlogic.gdx.Input
-
isKeyPressed
public boolean isKeyPressed(int key)
- Specified by:
isKeyPressedin interfacecom.badlogic.gdx.Input
-
isKeyJustPressed
public boolean isKeyJustPressed(int key)
- Specified by:
isKeyJustPressedin interfacecom.badlogic.gdx.Input
-
getTextInput
public void getTextInput(com.badlogic.gdx.Input.TextInputListener listener, java.lang.String title, java.lang.String text, java.lang.String hint)- Specified by:
getTextInputin interfacecom.badlogic.gdx.Input
-
setOnscreenKeyboardVisible
public void setOnscreenKeyboardVisible(boolean visible)
- Specified by:
setOnscreenKeyboardVisiblein interfacecom.badlogic.gdx.Input
-
vibrate
public void vibrate(int milliseconds)
- Specified by:
vibratein interfacecom.badlogic.gdx.Input
-
vibrate
public void vibrate(long[] pattern, int repeat)- Specified by:
vibratein interfacecom.badlogic.gdx.Input
-
cancelVibrate
public void cancelVibrate()
- Specified by:
cancelVibratein interfacecom.badlogic.gdx.Input
-
getAzimuth
public float getAzimuth()
- Specified by:
getAzimuthin interfacecom.badlogic.gdx.Input
-
getPitch
public float getPitch()
- Specified by:
getPitchin interfacecom.badlogic.gdx.Input
-
getRoll
public float getRoll()
- Specified by:
getRollin interfacecom.badlogic.gdx.Input
-
getRotationMatrix
public void getRotationMatrix(float[] matrix)
- Specified by:
getRotationMatrixin interfacecom.badlogic.gdx.Input
-
getCurrentEventTime
public long getCurrentEventTime()
- Specified by:
getCurrentEventTimein interfacecom.badlogic.gdx.Input
-
setCatchBackKey
public void setCatchBackKey(boolean catchBack)
- Specified by:
setCatchBackKeyin interfacecom.badlogic.gdx.Input
-
isCatchBackKey
public boolean isCatchBackKey()
- Specified by:
isCatchBackKeyin interfacecom.badlogic.gdx.Input
-
setCatchMenuKey
public void setCatchMenuKey(boolean catchMenu)
- Specified by:
setCatchMenuKeyin interfacecom.badlogic.gdx.Input
-
isCatchMenuKey
public boolean isCatchMenuKey()
- Specified by:
isCatchMenuKeyin interfacecom.badlogic.gdx.Input
-
setCatchKey
public void setCatchKey(int keycode, boolean catchKey)- Specified by:
setCatchKeyin interfacecom.badlogic.gdx.Input
-
isCatchKey
public boolean isCatchKey(int keycode)
- Specified by:
isCatchKeyin interfacecom.badlogic.gdx.Input
-
setInputProcessor
public void setInputProcessor(com.badlogic.gdx.InputProcessor processor)
- Specified by:
setInputProcessorin interfacecom.badlogic.gdx.Input
-
getInputProcessor
public com.badlogic.gdx.InputProcessor getInputProcessor()
- Specified by:
getInputProcessorin interfacecom.badlogic.gdx.Input
-
isPeripheralAvailable
public boolean isPeripheralAvailable(com.badlogic.gdx.Input.Peripheral peripheral)
- Specified by:
isPeripheralAvailablein interfacecom.badlogic.gdx.Input
-
getRotation
public int getRotation()
- Specified by:
getRotationin interfacecom.badlogic.gdx.Input
-
getNativeOrientation
public com.badlogic.gdx.Input.Orientation getNativeOrientation()
- Specified by:
getNativeOrientationin interfacecom.badlogic.gdx.Input
-
setCursorCatched
public void setCursorCatched(boolean catched)
works only for Chrome > Version 18 with enabled Mouse Lock enable in about:flags or start Chrome with the --enable-pointer-lock flag- Specified by:
setCursorCatchedin interfacecom.badlogic.gdx.Input
-
isCursorCatched
public boolean isCursorCatched()
- Specified by:
isCursorCatchedin interfacecom.badlogic.gdx.Input
-
setCursorPosition
public void setCursorPosition(int x, int y)- Specified by:
setCursorPositionin interfacecom.badlogic.gdx.Input
-
getMouseWheelEvent
protected static java.lang.String getMouseWheelEvent()
Kindly borrowed from PlayN.
-
getRelativeX
protected int getRelativeX(com.google.gwt.dom.client.NativeEvent e, com.google.gwt.dom.client.CanvasElement target)Kindly borrowed from PlayN.
-
getRelativeY
protected int getRelativeY(com.google.gwt.dom.client.NativeEvent e, com.google.gwt.dom.client.CanvasElement target)Kindly borrowed from PlayN.
-
getRelativeX
protected int getRelativeX(com.google.gwt.dom.client.Touch touch, com.google.gwt.dom.client.CanvasElement target)
-
getRelativeY
protected int getRelativeY(com.google.gwt.dom.client.Touch touch, com.google.gwt.dom.client.CanvasElement target)
-
-