Add Play/Pause hotkey

This commit is contained in:
johni0702
2015-10-04 15:44:27 +02:00
parent 213c16c81d
commit 526ee76d4a
2 changed files with 9 additions and 2 deletions

View File

@@ -76,6 +76,15 @@ public class ReplayModReplay {
}
}
});
core.getKeyBindingRegistry().registerKeyBinding("replaymod.input.playpause", Keyboard.KEY_P, new Runnable() {
@Override
public void run() {
if (replayHandler != null) {
replayHandler.getOverlay().playPauseButton.onClick();
}
}
});
}
@Mod.EventHandler

View File

@@ -35,8 +35,6 @@ public class KeybindRegistry {
static {
replayModKeyBindings = new ArrayList<KeyBinding>();
replayModKeyBindings.add(new KeyBinding(KEY_PLAY_PAUSE, Keyboard.KEY_P, "replaymod.title"));
replayModKeyBindings.add(new KeyBinding(KEY_ROLL_CLOCKWISE, Keyboard.KEY_L, "replaymod.title"));
replayModKeyBindings.add(new KeyBinding(KEY_ROLL_COUNTERCLOCKWISE, Keyboard.KEY_J, "replaymod.title"));
replayModKeyBindings.add(new KeyBinding(KEY_RESET_TILT, Keyboard.KEY_K, "replaymod.title"));