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:
@@ -471,6 +471,16 @@ public class Options {
|
||||
*/
|
||||
public static int getTargetFPS() { return targetFPS[targetFPSindex]; }
|
||||
|
||||
/**
|
||||
* Sets the target frame rate to the next available option, and sends a
|
||||
* bar notification about the action.
|
||||
* @param container the game container
|
||||
*/
|
||||
public static void setNextFPS(GameContainer container) {
|
||||
GameOption.TARGET_FPS.click(container);
|
||||
UI.sendBarNotification(String.format("Frame limiter: %s", GameOption.TARGET_FPS.getValueString()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the master volume level.
|
||||
* @return the volume [0, 1]
|
||||
@@ -697,6 +707,16 @@ public class Options {
|
||||
*/
|
||||
public static boolean isMouseDisabled() { return GameOption.DISABLE_MOUSE_BUTTONS.getBooleanValue(); }
|
||||
|
||||
/**
|
||||
* Toggles the mouse button enabled/disabled state during gameplay and
|
||||
* sends a bar notification about the action.
|
||||
*/
|
||||
public static void toggleMouseDisabled() {
|
||||
GameOption.DISABLE_MOUSE_BUTTONS.click(null);
|
||||
UI.sendBarNotification((GameOption.DISABLE_MOUSE_BUTTONS.getBooleanValue()) ?
|
||||
"Mouse buttons are disabled." : "Mouse buttons are enabled.");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the left game key.
|
||||
* @return the left key code
|
||||
|
||||
Reference in New Issue
Block a user