WarpPI/core/src/main/java/it/cavallium/warppi/device/input/InputManager.java

28 lines
647 B
Java
Raw Normal View History

2019-02-27 23:29:03 +01:00
package it.cavallium.warppi.device.input;
2019-10-25 13:58:49 +02:00
import java.util.Objects;
2019-02-27 23:29:03 +01:00
public class InputManager {
private final KeyboardInputDevice keyboard;
private final TouchInputDevice touchDevice;
public InputManager(KeyboardInputDevice keyboard, TouchInputDevice touchscreen) {
2019-10-25 13:58:49 +02:00
this.keyboard = Objects.requireNonNull(keyboard);
this.touchDevice = Objects.requireNonNull(touchscreen);
2019-02-27 23:29:03 +01:00
}
public KeyboardInputDevice getKeyboard() {
return keyboard;
}
public TouchInputDevice getTouchDevice() {
return touchDevice;
}
public void initialize() {
this.keyboard.initialize();
this.touchDevice.initialize();
}
2019-02-27 23:29:03 +01:00
}