Added global F7 and F10 shortcuts.

- F7: cycles through FPS settings.
- F10: toggles mouse enable/disable state during gameplay.

Also added bar notifications for saving/loading checkpoints.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2015-03-05 14:40:57 -05:00
parent 235adc539e
commit cf9b22442f
9 changed files with 78 additions and 1 deletions

View File

@@ -137,6 +137,7 @@ public class DownloadsMenu extends BasicGameState {
private Thread importThread;
// game-related variables
private GameContainer container;
private StateBasedGame game;
private Input input;
private int state;
@@ -148,6 +149,7 @@ public class DownloadsMenu extends BasicGameState {
@Override
public void init(GameContainer container, StateBasedGame game)
throws SlickException {
this.container = container;
this.game = game;
this.input = container.getInput();
@@ -636,6 +638,12 @@ public class DownloadsMenu extends BasicGameState {
pageDir = Page.CURRENT;
resetSearchTimer();
break;
case Input.KEY_F7:
Options.setNextFPS(container);
break;
case Input.KEY_F10:
Options.toggleMouseDisabled();
break;
case Input.KEY_F12:
Utils.takeScreenShot();
break;