30 lines
606 B
Java
30 lines
606 B
Java
package speiger.src.coreengine.rendering.input.events;
|
|
|
|
import speiger.src.coreengine.utils.eventbus.Event;
|
|
|
|
public abstract class KeyEvent extends Event
|
|
{
|
|
@Override
|
|
public boolean isCancelable() {
|
|
return true;
|
|
}
|
|
|
|
public static class KeyPressEvent extends KeyEvent {
|
|
public final int key;
|
|
|
|
public KeyPressEvent(int key) {
|
|
this.key = key;
|
|
}
|
|
}
|
|
|
|
public static class CharTypeEvent extends KeyEvent {
|
|
public final char character;
|
|
public final int codePoint;
|
|
|
|
public CharTypeEvent(char character, int codePoint) {
|
|
this.character = character;
|
|
this.codePoint = codePoint;
|
|
}
|
|
}
|
|
}
|