Package com.prineside.luaj.mapping.parts
Class LJ_GDX.Input_O.LIP
java.lang.Object
com.prineside.luaj.mapping.InterfaceProxy
com.prineside.luaj.mapping.parts.LJ_GDX.Input_O.LIP
- All Implemented Interfaces:
com.badlogic.gdx.Input,com.esotericsoftware.kryo.KryoSerializable
- Enclosing class:
- LJ_GDX.Input_O
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.badlogic.gdx.Input
com.badlogic.gdx.Input.Buttons, com.badlogic.gdx.Input.Keys, com.badlogic.gdx.Input.OnscreenKeyboardType, com.badlogic.gdx.Input.Orientation, com.badlogic.gdx.Input.Peripheral, com.badlogic.gdx.Input.TextInputListener, com.badlogic.gdx.Input.VibrationType -
Method Summary
Modifier and TypeMethodDescriptionfloatfloatfloatfloatThe azimuth is the angle of the device's orientation around the z-axis.longintintgetDeltaX(int p1) intintgetDeltaY(int p1) floatfloatfloatcom.badlogic.gdx.InputProcessorintcom.badlogic.gdx.Input.OrientationfloatgetPitch()The pitch is the angle of the device's orientation around the x-axis.floatfloatgetPressure(int p1) Returns the pressure of the given pointer, where 0 is untouched.floatgetRoll()The roll is the angle of the device's orientation around the y-axis.intvoidgetRotationMatrix(float[] p1) Returns the rotation matrix describing the devices rotation as per SensorManager#getRotationMatrix(float[], float[], float[], float[]).voidgetTextInput(com.badlogic.gdx.Input.TextInputListener p1, String p2, String p3, String p4) System dependent method to input a string of text.voidgetTextInput(com.badlogic.gdx.Input.TextInputListener p1, String p2, String p3, String p4, com.badlogic.gdx.Input.OnscreenKeyboardType p5) System dependent method to input a string of text.intgetX()intgetX(int p1) Returns the x coordinate in screen coordinates of the given pointer.intgetY()intgetY(int p1) Returns the y coordinate in screen coordinates of the given pointer.booleanisButtonJustPressed(int p1) Returns whether a given button has just been pressed.booleanisButtonPressed(int p1) Whether a given button is pressed or not.booleanbooleanisCatchKey(int p1) booleanbooleanbooleanisKeyJustPressed(int p1) Returns whether the key has just been pressed.booleanisKeyPressed(int p1) Returns whether the key is pressed.booleanisPeripheralAvailable(com.badlogic.gdx.Input.Peripheral p1) Queries whether aInput.Peripheralis currently available.booleanbooleanisTouched(int p1) Whether the screen is currently touched by the pointer with the given index.booleanvoidsetCatchBackKey(boolean p1) voidsetCatchKey(int p1, boolean p2) Sets whether the given key on Android or GWT should be caught.voidsetCatchMenuKey(boolean p1) voidsetCursorCatched(boolean p1) Only viable on desktop, GWT and Android 8+.voidsetCursorPosition(int p1, int p2) Only viable on the desktop.voidsetInputProcessor(com.badlogic.gdx.InputProcessor p1) Sets theInputProcessorthat will receive all touch and key input events.voidsetOnscreenKeyboardVisible(boolean p1) Sets the on-screen keyboard visible if available.voidsetOnscreenKeyboardVisible(boolean p1, com.badlogic.gdx.Input.OnscreenKeyboardType p2) Sets the on-screen keyboard visible if available.voidvibrate(int p1) Generates a simple haptic effect of a given duration or a vibration effect on devices without haptic capabilities.voidvibrate(int p1, boolean p2) Generates a simple haptic effect of a given duration and default amplitude.voidvibrate(int p1, int p2, boolean p3) Generates a simple haptic effect of a given duration and amplitude.voidvibrate(com.badlogic.gdx.Input.VibrationType p1) Generates a simple haptic effect of a type.Methods inherited from class com.prineside.luaj.mapping.InterfaceProxy
getLuaObj, read, write
-
Method Details
-
getAccelerometerX
public float getAccelerometerX()- Specified by:
getAccelerometerXin interfacecom.badlogic.gdx.Input- Returns:
- The acceleration force in m/s^2 applied to the device in the X axis, including the force of gravity
-
getAccelerometerY
public float getAccelerometerY()- Specified by:
getAccelerometerYin interfacecom.badlogic.gdx.Input- Returns:
- The acceleration force in m/s^2 applied to the device in the Y axis, including the force of gravity
-
getAccelerometerZ
public float getAccelerometerZ()- Specified by:
getAccelerometerZin interfacecom.badlogic.gdx.Input- Returns:
- The acceleration force in m/s^2 applied to the device in the Z axis, including the force of gravity
-
getAzimuth
public float getAzimuth()Description copied from interface:com.badlogic.gdx.InputThe azimuth is the angle of the device's orientation around the z-axis. The positive z-axis points towards the earths center.- Specified by:
getAzimuthin interfacecom.badlogic.gdx.Input- Returns:
- the azimuth in degrees
- See Also:
-
getCurrentEventTime
public long getCurrentEventTime()- Specified by:
getCurrentEventTimein interfacecom.badlogic.gdx.Input- Returns:
- the time of the event currently reported to the
InputProcessor.
-
getDeltaX
public int getDeltaX()- Specified by:
getDeltaXin interfacecom.badlogic.gdx.Input- Returns:
- the different between the current pointer location and the last pointer location on the x-axis.
-
getDeltaX
public int getDeltaX(int p1) - Specified by:
getDeltaXin interfacecom.badlogic.gdx.Input- Returns:
- the different between the current pointer location and the last pointer location on the x-axis.
-
getDeltaY
public int getDeltaY()- Specified by:
getDeltaYin interfacecom.badlogic.gdx.Input- Returns:
- the different between the current pointer location and the last pointer location on the y-axis.
-
getDeltaY
public int getDeltaY(int p1) - Specified by:
getDeltaYin interfacecom.badlogic.gdx.Input- Returns:
- the different between the current pointer location and the last pointer location on the y-axis.
-
getGyroscopeX
public float getGyroscopeX()- Specified by:
getGyroscopeXin interfacecom.badlogic.gdx.Input- Returns:
- The rate of rotation in rad/s around the X axis
-
getGyroscopeY
public float getGyroscopeY()- Specified by:
getGyroscopeYin interfacecom.badlogic.gdx.Input- Returns:
- The rate of rotation in rad/s around the Y axis
-
getGyroscopeZ
public float getGyroscopeZ()- Specified by:
getGyroscopeZin interfacecom.badlogic.gdx.Input- Returns:
- The rate of rotation in rad/s around the Z axis
-
getInputProcessor
public com.badlogic.gdx.InputProcessor getInputProcessor()- Specified by:
getInputProcessorin interfacecom.badlogic.gdx.Input- Returns:
- the currently set
InputProcessoror null.
-
getMaxPointers
public int getMaxPointers()- Specified by:
getMaxPointersin interfacecom.badlogic.gdx.Input- Returns:
- The maximum number of pointers supported
-
getNativeOrientation
public com.badlogic.gdx.Input.Orientation getNativeOrientation()- Specified by:
getNativeOrientationin interfacecom.badlogic.gdx.Input- Returns:
- the native orientation of the device.
-
getPitch
public float getPitch()Description copied from interface:com.badlogic.gdx.InputThe pitch is the angle of the device's orientation around the x-axis. The positive x-axis roughly points to the west and is orthogonal to the z- and y-axis.- Specified by:
getPitchin interfacecom.badlogic.gdx.Input- Returns:
- the pitch in degrees
- See Also:
-
getPressure
public float getPressure()- Specified by:
getPressurein interfacecom.badlogic.gdx.Input- Returns:
- the pressure of the first pointer
-
getPressure
public float getPressure(int p1) Description copied from interface:com.badlogic.gdx.InputReturns the pressure of the given pointer, where 0 is untouched. On Android it should be up to 1.0, but it can go above that slightly and its not consistent between devices. On iOS 1.0 is the normal touch and significantly more of hard touch. Check relevant manufacturer documentation for details. Check availability withInput.isPeripheralAvailable(Peripheral). If not supported, returns 1.0 when touched.- Specified by:
getPressurein interfacecom.badlogic.gdx.Input- Parameters:
p1- the pointer id.- Returns:
- the pressure
-
getRoll
public float getRoll()Description copied from interface:com.badlogic.gdx.InputThe roll is the angle of the device's orientation around the y-axis. The positive y-axis points to the magnetic north pole of the earth.- Specified by:
getRollin interfacecom.badlogic.gdx.Input- Returns:
- the roll in degrees
- See Also:
-
getRotation
public int getRotation()- Specified by:
getRotationin interfacecom.badlogic.gdx.Input- Returns:
- the rotation of the device with respect to its native orientation.
-
getRotationMatrix
public void getRotationMatrix(float[] p1) Description copied from interface:com.badlogic.gdx.InputReturns the rotation matrix describing the devices rotation as per SensorManager#getRotationMatrix(float[], float[], float[], float[]). Does not manipulate the matrix if the platform does not have an accelerometer.- Specified by:
getRotationMatrixin interfacecom.badlogic.gdx.Input
-
getTextInput
public void getTextInput(com.badlogic.gdx.Input.TextInputListener p1, String p2, String p3, String p4) Description copied from interface:com.badlogic.gdx.InputSystem dependent method to input a string of text. A dialog box will be created with the given title and the given text as a message for the user. Will use the Default keyboard type. Once the dialog has been closed the providedInput.TextInputListenerwill be called on the rendering thread.- Specified by:
getTextInputin interfacecom.badlogic.gdx.Input- Parameters:
p1- The TextInputListener.p2- The title of the text input dialog.p3- The message presented to the user.
-
getTextInput
public void getTextInput(com.badlogic.gdx.Input.TextInputListener p1, String p2, String p3, String p4, com.badlogic.gdx.Input.OnscreenKeyboardType p5) Description copied from interface:com.badlogic.gdx.InputSystem dependent method to input a string of text. A dialog box will be created with the given title and the given text as a message for the user. Once the dialog has been closed the providedInput.TextInputListenerwill be called on the rendering thread.- Specified by:
getTextInputin interfacecom.badlogic.gdx.Input- Parameters:
p1- The TextInputListener.p2- The title of the text input dialog.p3- The message presented to the user.p5- which type of keyboard we wish to display
-
getX
public int getX()- Specified by:
getXin interfacecom.badlogic.gdx.Input- Returns:
- The x coordinate of the last touch on touch screen devices and the current mouse position on desktop for the first pointer in screen coordinates. The screen origin is the top left corner.
-
getX
public int getX(int p1) Description copied from interface:com.badlogic.gdx.InputReturns the x coordinate in screen coordinates of the given pointer. Pointers are indexed from 0 to n. The pointer id identifies the order in which the fingers went down on the screen, e.g. 0 is the first finger, 1 is the second and so on. When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on the touch screen the first free index will be used.- Specified by:
getXin interfacecom.badlogic.gdx.Input- Parameters:
p1- the pointer id.- Returns:
- the x coordinate
-
getY
public int getY()- Specified by:
getYin interfacecom.badlogic.gdx.Input- Returns:
- The y coordinate of the last touch on touch screen devices and the current mouse position on desktop for the first pointer in screen coordinates. The screen origin is the top left corner.
-
getY
public int getY(int p1) Description copied from interface:com.badlogic.gdx.InputReturns the y coordinate in screen coordinates of the given pointer. Pointers are indexed from 0 to n. The pointer id identifies the order in which the fingers went down on the screen, e.g. 0 is the first finger, 1 is the second and so on. When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on the touch screen the first free index will be used.- Specified by:
getYin interfacecom.badlogic.gdx.Input- Parameters:
p1- the pointer id.- Returns:
- the y coordinate
-
isButtonJustPressed
public boolean isButtonJustPressed(int p1) Description copied from interface:com.badlogic.gdx.InputReturns whether a given button has just been pressed. Button constants can be found inInput.Buttons. On Android only the Buttons#LEFT constant is meaningful before version 4.0. On WebGL (GWT), only LEFT, RIGHT and MIDDLE buttons are supported.- Specified by:
isButtonJustPressedin interfacecom.badlogic.gdx.Input- Parameters:
p1- the button to check.- Returns:
- true or false.
-
isButtonPressed
public boolean isButtonPressed(int p1) Description copied from interface:com.badlogic.gdx.InputWhether a given button is pressed or not. Button constants can be found inInput.Buttons. On Android only the Buttons#LEFT constant is meaningful before version 4.0.- Specified by:
isButtonPressedin interfacecom.badlogic.gdx.Input- Parameters:
p1- the button to check.- Returns:
- whether the button is down or not.
-
isCatchBackKey
public boolean isCatchBackKey()- Specified by:
isCatchBackKeyin interfacecom.badlogic.gdx.Input- Returns:
- whether the back button is currently being caught
-
isCatchKey
public boolean isCatchKey(int p1) - Specified by:
isCatchKeyin interfacecom.badlogic.gdx.Input- Parameters:
p1- keycode to check if caught- Returns:
- true if the given keycode is configured to be caught
-
isCatchMenuKey
public boolean isCatchMenuKey()- Specified by:
isCatchMenuKeyin interfacecom.badlogic.gdx.Input- Returns:
- whether the menu button is currently being caught
-
isCursorCatched
public boolean isCursorCatched()- Specified by:
isCursorCatchedin interfacecom.badlogic.gdx.Input- Returns:
- whether the mouse cursor is catched.
-
isKeyJustPressed
public boolean isKeyJustPressed(int p1) Description copied from interface:com.badlogic.gdx.InputReturns whether the key has just been pressed.- Specified by:
isKeyJustPressedin interfacecom.badlogic.gdx.Input- Parameters:
p1- The key code as found inInput.Keys.- Returns:
- true or false.
-
isKeyPressed
public boolean isKeyPressed(int p1) Description copied from interface:com.badlogic.gdx.InputReturns whether the key is pressed.- Specified by:
isKeyPressedin interfacecom.badlogic.gdx.Input- Parameters:
p1- The key code as found inInput.Keys.- Returns:
- true or false.
-
isPeripheralAvailable
public boolean isPeripheralAvailable(com.badlogic.gdx.Input.Peripheral p1) Description copied from interface:com.badlogic.gdx.InputQueries whether aInput.Peripheralis currently available. In case of Android and theInput.Peripheral.HardwareKeyboardthis returns the whether the keyboard is currently slid out or not.- Specified by:
isPeripheralAvailablein interfacecom.badlogic.gdx.Input- Parameters:
p1- theInput.Peripheral- Returns:
- whether the peripheral is available or not.
-
isTouched
public boolean isTouched()- Specified by:
isTouchedin interfacecom.badlogic.gdx.Input- Returns:
- whether the screen is currently touched.
-
isTouched
public boolean isTouched(int p1) Description copied from interface:com.badlogic.gdx.InputWhether the screen is currently touched by the pointer with the given index. Pointers are indexed from 0 to n. The pointer id identifies the order in which the fingers went down on the screen, e.g. 0 is the first finger, 1 is the second and so on. When two fingers are touched down and the first one is lifted the second one keeps its index. If another finger is placed on the touch screen the first free index will be used.- Specified by:
isTouchedin interfacecom.badlogic.gdx.Input- Parameters:
p1- the pointer- Returns:
- whether the screen is touched by the pointer
-
justTouched
public boolean justTouched()- Specified by:
justTouchedin interfacecom.badlogic.gdx.Input- Returns:
- whether a new touch down event just occurred.
-
setCatchBackKey
public void setCatchBackKey(boolean p1) - Specified by:
setCatchBackKeyin interfacecom.badlogic.gdx.Input- Parameters:
p1- whether to catch the back button
-
setCatchKey
public void setCatchKey(int p1, boolean p2) Description copied from interface:com.badlogic.gdx.InputSets whether the given key on Android or GWT should be caught. No effect on other platforms. All keys that are not caught may be handled by other apps or background processes on Android, or may trigger default browser behaviour on GWT. For example, media or volume buttons are handled by background media players if present, or Space key triggers a scroll. All keys you need to control your game should be caught to prevent unintended behaviour.- Specified by:
setCatchKeyin interfacecom.badlogic.gdx.Input- Parameters:
p1- keycode to catchp2- whether to catch the given keycode
-
setCatchMenuKey
public void setCatchMenuKey(boolean p1) - Specified by:
setCatchMenuKeyin interfacecom.badlogic.gdx.Input- Parameters:
p1- whether to catch the menu button
-
setCursorCatched
public void setCursorCatched(boolean p1) Description copied from interface:com.badlogic.gdx.InputOnly viable on desktop, GWT and Android 8+. Will confine the mouse cursor location to the window and hide the mouse cursor. X and y coordinates are still reported as if the mouse was not catched.- Specified by:
setCursorCatchedin interfacecom.badlogic.gdx.Input- Parameters:
p1- whether to catch or not to catch the mouse cursor
-
setCursorPosition
public void setCursorPosition(int p1, int p2) Description copied from interface:com.badlogic.gdx.InputOnly viable on the desktop. Will set the mouse cursor location to the given window coordinates (origin top-left corner).- Specified by:
setCursorPositionin interfacecom.badlogic.gdx.Input- Parameters:
p1- the x-positionp2- the y-position
-
setInputProcessor
public void setInputProcessor(com.badlogic.gdx.InputProcessor p1) Description copied from interface:com.badlogic.gdx.InputSets theInputProcessorthat will receive all touch and key input events. It will be called before theApplicationListener.render()method each frame.- Specified by:
setInputProcessorin interfacecom.badlogic.gdx.Input- Parameters:
p1- the InputProcessor
-
setOnscreenKeyboardVisible
public void setOnscreenKeyboardVisible(boolean p1) Description copied from interface:com.badlogic.gdx.InputSets the on-screen keyboard visible if available. Will use the Default keyboard type.- Specified by:
setOnscreenKeyboardVisiblein interfacecom.badlogic.gdx.Input- Parameters:
p1- visible or not
-
setOnscreenKeyboardVisible
public void setOnscreenKeyboardVisible(boolean p1, com.badlogic.gdx.Input.OnscreenKeyboardType p2) Description copied from interface:com.badlogic.gdx.InputSets the on-screen keyboard visible if available.- Specified by:
setOnscreenKeyboardVisiblein interfacecom.badlogic.gdx.Input- Parameters:
p1- visible or notp2- which type of keyboard we wish to display. Can be null when hiding
-
vibrate
public void vibrate(int p1) Description copied from interface:com.badlogic.gdx.InputGenerates a simple haptic effect of a given duration or a vibration effect on devices without haptic capabilities. Note that on Android backend you'll need the permission<uses-permission android:name="android.permission.VIBRATE" />in your manifest file in order for this to work. On iOS backend you'll need to setuseHaptics = truefor devices with haptics capabilities to use them.- Specified by:
vibratein interfacecom.badlogic.gdx.Input- Parameters:
p1- the number of milliseconds to vibrate.
-
vibrate
public void vibrate(com.badlogic.gdx.Input.VibrationType p1) Description copied from interface:com.badlogic.gdx.InputGenerates a simple haptic effect of a type. VibrationTypes are length/amplitude haptic effect presets that depend on each device and are defined by manufacturers. Should give most consistent results across devices and OSs. Note that on Android backend you'll need the permission<uses-permission android:name="android.permission.VIBRATE" />in your manifest file in order for this to work. On iOS backend you'll need to setuseHaptics = truefor devices with haptics capabilities to use them.- Specified by:
vibratein interfacecom.badlogic.gdx.Input- Parameters:
p1- the type of vibration
-
vibrate
public void vibrate(int p1, boolean p2) Description copied from interface:com.badlogic.gdx.InputGenerates a simple haptic effect of a given duration and default amplitude. Note that on Android backend you'll need the permission<uses-permission android:name="android.permission.VIBRATE" />in your manifest file in order for this to work. On iOS backend you'll need to setuseHaptics = truefor devices with haptics capabilities to use them.- Specified by:
vibratein interfacecom.badlogic.gdx.Input- Parameters:
p1- the duration of the haptics effectp2- whether to use non-haptic vibrator on devices without haptics capabilities (or haptics disabled). Fallback non-haptic vibrations may ignore length parameter in some backends.
-
vibrate
public void vibrate(int p1, int p2, boolean p3) Description copied from interface:com.badlogic.gdx.InputGenerates a simple haptic effect of a given duration and amplitude. Note that on Android backend you'll need the permission<uses-permission android:name="android.permission.VIBRATE" />in your manifest file in order for this to work. On iOS backend you'll need to setuseHaptics = truefor devices with haptics capabilities to use them.- Specified by:
vibratein interfacecom.badlogic.gdx.Input- Parameters:
p1- the duration of the haptics effectp2- the amplitude/strength of the haptics effect. Valid values in the range [0, 255].p3- whether to use non-haptic vibrator on devices without haptics capabilities (or haptics disabled). Fallback non-haptic vibrations may ignore length and/or amplitude parameters in some backends.
-