|
I'm using TWLSlick.zip and have it setup like so:
MyStateBasedGame extends TWLStateBasedGame (which extends [slick's] StateBasedGame)
Then I also have HelloState extends BasicTWLGameState
What I would like is to have is global keyboard shortcuts that work regardless if TWL or Slick picks them up and regardless of which State it is in... For example, if I press 'Print Screen', it should call my printScreen() method (even if a GUI is up, or even if I'm in the main menu state).
In my previous version (with just TWLInputForward, not TWLSlick), I was handling this in MyStateBasedGame; but seems to not get it with TWLSlick (unless I remove input.consume() in the TWLInputForward).
Design wise, where is the best place to handle these global hot keys? I'm thinking maybe MyStateBasedGame , but implementation wise it seems tricky to get the key inputs to pick them up.
|