Hi everyone,
I am very sorry if I am to ask a very simple question regarding Lanterna. It just so happens that I've got nowhere else to turn to.
I've already posted a question on
reddit and I doubt if anyone would answer over there. I want to do the simplest of things with Lanterna - create a Terminal and a Screen, draw a character on the top layer and redraw it according to keyboard input. That said, I am attempting to "move" a character in a 80x25 grid.
Besides the straightforward readInput() method implementation for my (Screen) screen which didn't do the right thing, I've also attempted to instantiate an InputDecoder and call the getNextCharacter() method:
InputDecoder indec = new InputDecoder(new InputStreamReader(System.in));
KeyStroke ks = new KeyStroke(KeyType.Enter);
if (indec.getNextCharacter(true).equals(ks)) {
...
}
This also had no actual results; I couldn't redraw anything when calling upon putString(int x,int y,String str) method for my (TextGraphics) tGraphics object.
I have to admit I've found a Lanterna 2 implementation for a roguelike game project (Brown uni cs), but that hadn't helped me much. KeyStroke and KeyType are nowhere to be found in previous Lanterna versions. I seem to be hitting a brick wall and I'd really appreciate any advice you guys could spare.
Best of wishes,
D. Vultures