Package de.gurkenlabs.litiengine.input
Class Input
java.lang.Object
de.gurkenlabs.litiengine.input.Input
public final class Input
extends java.lang.Object
The static
Input
class is the LITIENGINE's access point to devices that capture physical player input.
It manages input from different devices, i.e. keyboard, mouse or gamepad, and provides a unified API to access this information.- See Also:
mouse()
,keyboard()
,gamepads()
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Input.InputGameAdapter
Method Summary
Method Details
gamepads
Gets the manager for all gamepad input devices.The manager provides easy access to the default controller as well as access by gamepad index for mulitplayer games. Gamepads don't need to be added explicitly, the manager supports hot-plugging at runtime and will auto-detect any added/removed gamepads.
This returns null if
Game.config().input().isGamepadSupport()
is set to false.- Returns:
- The gamepad manager.
- See Also:
GamepadManager.current()
,GamepadManager.get(int)
keyboard
Gets the keyboard input device.- Returns:
- The keyboard input device.
mouse
Gets the mouse input device.- Returns:
- The mouse input device.