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 TypeMethodDescriptionfloat
float
float
float
The azimuth is the angle of the device's orientation around the z-axis.long
int
int
getDeltaX
(int p1) int
int
getDeltaY
(int p1) float
float
float
com.badlogic.gdx.InputProcessor
int
com.badlogic.gdx.Input.Orientation
float
getPitch()
The pitch is the angle of the device's orientation around the x-axis.float
float
getPressure
(int p1) Returns the pressure of the given pointer, where 0 is untouched.float
getRoll()
The roll is the angle of the device's orientation around the y-axis.int
void
getRotationMatrix
(float[] p1) Returns the rotation matrix describing the devices rotation as per SensorManager#getRotationMatrix(float[], float[], float[], float[]).void
getTextInput
(com.badlogic.gdx.Input.TextInputListener p1, String p2, String p3, String p4) System dependent method to input a string of text.void
getTextInput
(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.int
getX()
int
getX
(int p1) Returns the x coordinate in screen coordinates of the given pointer.int
getY()
int
getY
(int p1) Returns the y coordinate in screen coordinates of the given pointer.boolean
isButtonJustPressed
(int p1) Returns whether a given button has just been pressed.boolean
isButtonPressed
(int p1) Whether a given button is pressed or not.boolean
boolean
isCatchKey
(int p1) boolean
boolean
boolean
isKeyJustPressed
(int p1) Returns whether the key has just been pressed.boolean
isKeyPressed
(int p1) Returns whether the key is pressed.boolean
isPeripheralAvailable
(com.badlogic.gdx.Input.Peripheral p1) Queries whether aInput.Peripheral
is currently available.boolean
boolean
isTouched
(int p1) Whether the screen is currently touched by the pointer with the given index.boolean
void
setCatchBackKey
(boolean p1) void
setCatchKey
(int p1, boolean p2) Sets whether the given key on Android or GWT should be caught.void
setCatchMenuKey
(boolean p1) void
setCursorCatched
(boolean p1) Only viable on desktop, GWT and Android 8+.void
setCursorPosition
(int p1, int p2) Only viable on the desktop.void
setInputProcessor
(com.badlogic.gdx.InputProcessor p1) Sets theInputProcessor
that will receive all touch and key input events.void
setOnscreenKeyboardVisible
(boolean p1) Sets the on-screen keyboard visible if available.void
setOnscreenKeyboardVisible
(boolean p1, com.badlogic.gdx.Input.OnscreenKeyboardType p2) Sets the on-screen keyboard visible if available.void
vibrate
(int p1) Generates a simple haptic effect of a given duration or a vibration effect on devices without haptic capabilities.void
vibrate
(int p1, boolean p2) Generates a simple haptic effect of a given duration and default amplitude.void
vibrate
(int p1, int p2, boolean p3) Generates a simple haptic effect of a given duration and amplitude.void
vibrate
(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:
getAccelerometerX
in 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:
getAccelerometerY
in 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:
getAccelerometerZ
in 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.Input
The azimuth is the angle of the device's orientation around the z-axis. The positive z-axis points towards the earths center.- Specified by:
getAzimuth
in interfacecom.badlogic.gdx.Input
- Returns:
- the azimuth in degrees
- See Also:
-
getCurrentEventTime
public long getCurrentEventTime()- Specified by:
getCurrentEventTime
in interfacecom.badlogic.gdx.Input
- Returns:
- the time of the event currently reported to the
InputProcessor
.
-
getDeltaX
public int getDeltaX()- Specified by:
getDeltaX
in 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:
getDeltaX
in 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:
getDeltaY
in 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:
getDeltaY
in 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:
getGyroscopeX
in interfacecom.badlogic.gdx.Input
- Returns:
- The rate of rotation in rad/s around the X axis
-
getGyroscopeY
public float getGyroscopeY()- Specified by:
getGyroscopeY
in interfacecom.badlogic.gdx.Input
- Returns:
- The rate of rotation in rad/s around the Y axis
-
getGyroscopeZ
public float getGyroscopeZ()- Specified by:
getGyroscopeZ
in 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:
getInputProcessor
in interfacecom.badlogic.gdx.Input
- Returns:
- the currently set
InputProcessor
or null.
-
getMaxPointers
public int getMaxPointers()- Specified by:
getMaxPointers
in interfacecom.badlogic.gdx.Input
- Returns:
- The maximum number of pointers supported
-
getNativeOrientation
public com.badlogic.gdx.Input.Orientation getNativeOrientation()- Specified by:
getNativeOrientation
in interfacecom.badlogic.gdx.Input
- Returns:
- the native orientation of the device.
-
getPitch
public float getPitch()Description copied from interface:com.badlogic.gdx.Input
The 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:
getPitch
in interfacecom.badlogic.gdx.Input
- Returns:
- the pitch in degrees
- See Also:
-
getPressure
public float getPressure()- Specified by:
getPressure
in interfacecom.badlogic.gdx.Input
- Returns:
- the pressure of the first pointer
-
getPressure
public float getPressure(int p1) Description copied from interface:com.badlogic.gdx.Input
Returns 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:
getPressure
in interfacecom.badlogic.gdx.Input
- Parameters:
p1
- the pointer id.- Returns:
- the pressure
-
getRoll
public float getRoll()Description copied from interface:com.badlogic.gdx.Input
The 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:
getRoll
in interfacecom.badlogic.gdx.Input
- Returns:
- the roll in degrees
- See Also:
-
getRotation
public int getRotation()- Specified by:
getRotation
in 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.Input
Returns 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:
getRotationMatrix
in 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.Input
System 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.TextInputListener
will be called on the rendering thread.- Specified by:
getTextInput
in 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.Input
System 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.TextInputListener
will be called on the rendering thread.- Specified by:
getTextInput
in 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:
getX
in 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.Input
Returns 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:
getX
in interfacecom.badlogic.gdx.Input
- Parameters:
p1
- the pointer id.- Returns:
- the x coordinate
-
getY
public int getY()- Specified by:
getY
in 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.Input
Returns 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:
getY
in 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.Input
Returns 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:
isButtonJustPressed
in 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.Input
Whether 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:
isButtonPressed
in interfacecom.badlogic.gdx.Input
- Parameters:
p1
- the button to check.- Returns:
- whether the button is down or not.
-
isCatchBackKey
public boolean isCatchBackKey()- Specified by:
isCatchBackKey
in interfacecom.badlogic.gdx.Input
- Returns:
- whether the back button is currently being caught
-
isCatchKey
public boolean isCatchKey(int p1) - Specified by:
isCatchKey
in 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:
isCatchMenuKey
in interfacecom.badlogic.gdx.Input
- Returns:
- whether the menu button is currently being caught
-
isCursorCatched
public boolean isCursorCatched()- Specified by:
isCursorCatched
in interfacecom.badlogic.gdx.Input
- Returns:
- whether the mouse cursor is catched.
-
isKeyJustPressed
public boolean isKeyJustPressed(int p1) Description copied from interface:com.badlogic.gdx.Input
Returns whether the key has just been pressed.- Specified by:
isKeyJustPressed
in 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.Input
Returns whether the key is pressed.- Specified by:
isKeyPressed
in 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.Input
Queries whether aInput.Peripheral
is currently available. In case of Android and theInput.Peripheral.HardwareKeyboard
this returns the whether the keyboard is currently slid out or not.- Specified by:
isPeripheralAvailable
in interfacecom.badlogic.gdx.Input
- Parameters:
p1
- theInput.Peripheral
- Returns:
- whether the peripheral is available or not.
-
isTouched
public boolean isTouched()- Specified by:
isTouched
in interfacecom.badlogic.gdx.Input
- Returns:
- whether the screen is currently touched.
-
isTouched
public boolean isTouched(int p1) Description copied from interface:com.badlogic.gdx.Input
Whether 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:
isTouched
in interfacecom.badlogic.gdx.Input
- Parameters:
p1
- the pointer- Returns:
- whether the screen is touched by the pointer
-
justTouched
public boolean justTouched()- Specified by:
justTouched
in interfacecom.badlogic.gdx.Input
- Returns:
- whether a new touch down event just occurred.
-
setCatchBackKey
public void setCatchBackKey(boolean p1) - Specified by:
setCatchBackKey
in 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.Input
Sets 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:
setCatchKey
in interfacecom.badlogic.gdx.Input
- Parameters:
p1
- keycode to catchp2
- whether to catch the given keycode
-
setCatchMenuKey
public void setCatchMenuKey(boolean p1) - Specified by:
setCatchMenuKey
in 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.Input
Only 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:
setCursorCatched
in 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.Input
Only viable on the desktop. Will set the mouse cursor location to the given window coordinates (origin top-left corner).- Specified by:
setCursorPosition
in 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.Input
Sets theInputProcessor
that will receive all touch and key input events. It will be called before theApplicationListener.render()
method each frame.- Specified by:
setInputProcessor
in interfacecom.badlogic.gdx.Input
- Parameters:
p1
- the InputProcessor
-
setOnscreenKeyboardVisible
public void setOnscreenKeyboardVisible(boolean p1) Description copied from interface:com.badlogic.gdx.Input
Sets the on-screen keyboard visible if available. Will use the Default keyboard type.- Specified by:
setOnscreenKeyboardVisible
in 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.Input
Sets the on-screen keyboard visible if available.- Specified by:
setOnscreenKeyboardVisible
in 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.Input
Generates 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 = true
for devices with haptics capabilities to use them.- Specified by:
vibrate
in 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.Input
Generates 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 = true
for devices with haptics capabilities to use them.- Specified by:
vibrate
in 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.Input
Generates 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 = true
for devices with haptics capabilities to use them.- Specified by:
vibrate
in 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.Input
Generates 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 = true
for devices with haptics capabilities to use them.- Specified by:
vibrate
in 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.
-