Temple of The Roguelike Forums

Development => Programming => Topic started by: penguin_buddha on September 13, 2012, 04:22:49 PM

Title: SquidLib: Getting keyboard input
Post by: penguin_buddha on September 13, 2012, 04:22:49 PM
I've been looking at Squidlib and i'm interested. My only question is whether the library has any build in methods to get keyboard input. As far as I can see, it doesn't. I'm curious how Eben gets input for his games...
Title: Re: SquidLib: Getting keyboard input
Post by: yam655 on September 13, 2012, 07:00:54 PM
I've been looking at Squidlib and i'm interested. My only question is whether the library has any build in methods to get keyboard input. As far as I can see, it doesn't. I'm curious how Eben gets input for his games...

My understanding is that it's just a Swing component. As such, you use the standard Swing event mechanism to get key input.

While there are other approaches, you can look at http://docs.oracle.com/javase/6/docs/api/java/awt/event/KeyListener.html

Cheers,
Steven Black