I use a Swing-based command line for testing new game features.
Unfortunately, typing in this command line also provides input to my unfinished Liti-engine based UI.
This is annoying.
I'm looking for some general fix for this. Is there a configuration setting that disables keyboard input when the game window is not in focus?
Or maybe a toggle that would let me turn on and off input at will?
I looked, but couldn't find any.
I can easily make a check if the command-line is in focus, but I'd rather not copy-paste that check in every key listener method.
I got the command line's controller class hooked up to the game loop, so if a toggle exist, I could insert it there.