public interface Input
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getClipboardContents()
Returns the clipboard contents.
|
org.mini2Dx.gdx.utils.Array<GamePad> |
getGamePads()
Returns the list of known
GamePads connected to the device. |
int |
getX()
Returns the mouse/touch screen X coordinate
|
int |
getY()
Returns the mouse/touch screen Y coordinate
|
boolean |
hasClipboardContents()
Returns if the clipboard has contents.
|
boolean |
isClipboardSupported()
Returns if the clipboard is supported by the current platform.
|
boolean |
isKeyDown(int key)
Returns if a keyboard key is down
|
boolean |
isKeyJustPressed(int key)
Returns if a keyboard key was just pressed (down, then released)
|
boolean |
isKeyUp(int key)
Returns if a keyboard key is up
|
boolean |
justTouched()
Returns if the the screen was just touched or the mouse was just clicked
|
PS4GamePad |
newPS4GamePad(GamePad gamePad)
Wraps a
GamePad as a PS4GamePad |
SwitchDualJoyConGamePad |
newSwitchDualJoyConGamePad(GamePad gamePad)
Wraps a
GamePad as a SwitchDualJoyConGamePad |
SwitchJoyConLGamePad |
newSwitchJoyConLGamePad(GamePad gamePad)
Wraps a
GamePad as a SwitchJoyConLGamePad |
SwitchJoyConRGamePad |
newSwitchJoyConRGamePad(GamePad gamePad)
Wraps a
GamePad as a SwitchJoyConRGamePad |
XboxGamePad |
newXboxGamePad(GamePad gamePad)
Wraps a
GamePad as a XboxGamePad |
void |
setClipboardContents(java.lang.String contents)
Sets the clipboard contents.
|
void |
setGamePadConnectionListener(GamePadConnectionListener listener,
boolean notifyExisting)
Sets the
GamePadConnectionListener for handling GamePad connects/disconnects |
void |
setInputProcessor(org.mini2Dx.gdx.InputProcessor inputProcessor)
Sets the
InputProcessor for handling mouse/keyboard/touch events |
void |
setOnScreenKeyboardVisible(boolean visible)
Sets on mobile and consoles of the on-screen keyboard should appear.
|
void setInputProcessor(org.mini2Dx.gdx.InputProcessor inputProcessor)
InputProcessor for handling mouse/keyboard/touch eventsinputProcessor - The InputProcessor to usevoid setGamePadConnectionListener(GamePadConnectionListener listener, boolean notifyExisting)
GamePadConnectionListener for handling GamePad connects/disconnectslistener - The GamePadConnectionListener to usenotifyExisting - True if the listener should receive a GamePadConnectionListener.onConnect(GamePad) call for existing controllers connectedvoid setOnScreenKeyboardVisible(boolean visible)
Input.Keys.ESCAPE is sent when the keyboard is closed.visible - True if the keyboard should appearorg.mini2Dx.gdx.utils.Array<GamePad> getGamePads()
GamePads connected to the device.Array if no GamePads are present.PS4GamePad newPS4GamePad(GamePad gamePad)
GamePad as a PS4GamePadgamePad - The underlying GamePad instancePS4GamePadSwitchDualJoyConGamePad newSwitchDualJoyConGamePad(GamePad gamePad)
GamePad as a SwitchDualJoyConGamePadgamePad - The underlying GamePad instanceSwitchDualJoyConGamePadSwitchJoyConLGamePad newSwitchJoyConLGamePad(GamePad gamePad)
GamePad as a SwitchJoyConLGamePadgamePad - The underlying GamePad instanceSwitchJoyConLGamePadSwitchJoyConRGamePad newSwitchJoyConRGamePad(GamePad gamePad)
GamePad as a SwitchJoyConRGamePadgamePad - The underlying GamePad instanceSwitchJoyConRGamePadXboxGamePad newXboxGamePad(GamePad gamePad)
GamePad as a XboxGamePadgamePad - The underlying GamePad instanceXboxGamePadint getX()
int getY()
boolean isKeyJustPressed(int key)
key - The keyboard keycodeboolean isKeyDown(int key)
key - The keyboard keycodeboolean isKeyUp(int key)
key - The keyboard keycodeboolean justTouched()
boolean isClipboardSupported()
boolean hasClipboardContents()
getClipboardContents() to
prevent triggering unwanted clipboard access notifications (iOS >= 14)java.lang.String getClipboardContents()
void setClipboardContents(java.lang.String contents)
contents - Clipboard contents to be set