Package arc.mock
Class MockInput
java.lang.Object
arc.Input
arc.mock.MockInput
The headless backend does its best to mock elements. This is intended to make code-sharing between
server and client as simple as possible.
-
Nested Class Summary
Nested classes/interfaces inherited from class arc.Input
Input.Orientation, Input.Peripheral, Input.TextInput
-
Field Summary
Fields inherited from class arc.Input
caughtKeys, devices, inputMultiplexer, keyboard, mouseReturn, useKeyboard
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
deltaX()
int
deltaX
(int pointer) int
deltaY()
int
deltaY
(int pointer) long
boolean
boolean
isTouched
(int pointer) Whether the screen is currently touched by the pointer with the given index.boolean
int
mouseX()
int
mouseX
(int pointer) Returns the x coordinate in screen coordinates of the given pointer.int
mouseY()
int
mouseY
(int pointer) Returns the y coordinate in screen coordinates of the given pointer.Methods inherited from class arc.Input
addProcessor, alt, axis, axis, axisTap, cancelVibrate, ctrl, getAccelerometer, getDevices, getGyroscope, getInputMultiplexer, getInputProcessors, getKeyboard, getNativeOrientation, getOrientation, getPressure, getPressure, getRotation, getRotationMatrix, getTextInput, getTouches, isCatch, isPeripheralAvailable, keyDown, keyDown, keyRelease, keyRelease, keyTap, keyTap, mouse, mouseScreen, mouseWorld, mouseWorld, mouseWorldX, mouseWorldY, removeProcessor, setCatch, setOnscreenKeyboardVisible, setUseKeyboard, shift, useKeyboard, vibrate, vibrate
-
Constructor Details
-
MockInput
public MockInput()
-
-
Method Details
-
mouseX
public int mouseX() -
mouseX
public int mouseX(int pointer) Description copied from class: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. -
deltaX
public int deltaX() -
deltaX
public int deltaX(int pointer) -
mouseY
public int mouseY() -
mouseY
public int mouseY(int pointer) Description copied from class: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. -
deltaY
public int deltaY() -
deltaY
public int deltaY(int pointer) -
isTouched
public boolean isTouched() -
justTouched
public boolean justTouched()- Specified by:
justTouched
in classInput
- Returns:
- whether a new touch down event just occurred.
-
isTouched
public boolean isTouched(int pointer) Description copied from class: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. -
getCurrentEventTime
public long getCurrentEventTime()- Specified by:
getCurrentEventTime
in classInput
- Returns:
- the time of the event currently reported to the
InputProcessor
.
-