public interface InputAdapter
InputManager
and the Hardware implementation (e.g. LWJGL)| Modifier and Type | Method and Description |
|---|---|
boolean |
getKey(Key key)
Whether the key is currently pressed
|
boolean |
getKeyDown(Key key)
Whether the key is currently pressed.
|
boolean |
getKeyUp(Key key)
Returns true when the key has just been released
|
boolean |
getMouse(MouseButton mouseButton)
Whether the button is currently pressed
|
boolean |
getMouseDown(MouseButton mouseButton)
Whether the button is currently pressed.
|
Vector2f |
getMousePosition()
Returns the Mouse Position on the screen.
|
boolean |
getMouseUp(MouseButton mouseButton)
Returns true when the button has just been released
|
int |
keysTotal()
The total Number of keyboard keys
|
void |
setCursor(boolean enabled)
Hides the cursor, when disabled (enabled = false)
|
void |
setMousePosition(Vector2f position)
Modifies the mouse cursor position
|
void |
update()
Trigger an update.
|
int keysTotal()
void update()
boolean getKey(Key key)
key - Key to checkboolean getKeyDown(Key key)
key - Key to checkboolean getKeyUp(Key key)
key - Key to checkboolean getMouse(MouseButton mouseButton)
mouseButton - Button to checkboolean getMouseDown(MouseButton mouseButton)
mouseButton - Button to checkboolean getMouseUp(MouseButton mouseButton)
mouseButton - Button to checkVector2f getMousePosition()
void setMousePosition(Vector2f position)
position - New Positionvoid setCursor(boolean enabled)
enabled - true shows cursor, false hides itCopyright © 2014. All rights reserved.