Fix compile error (missing method, removed in 9f3a97f)

This commit is contained in:
johni0702
2015-05-26 01:14:55 +02:00
parent 9f3a97f65c
commit 9e6d03d342
2 changed files with 9 additions and 1 deletions

View File

@@ -105,7 +105,7 @@ public class KeyInputHandler {
public void handleCustomKeybindings(KeyBinding kb, boolean found, int keyCode) {
//Custom registered handlers
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_PLAY_PAUSE) && (kb.isPressed() || kb.getKeyCode() == keyCode) && !ReplayHandler.isInPath()) {
ReplayMod.overlay.playOrPause();
ReplayMod.overlay.togglePlayPause();
}
if(kb.getKeyDescription().equals(KeybindRegistry.KEY_ROLL_CLOCKWISE) && (kb.isKeyDown() || kb.getKeyCode() == keyCode) && !ReplayHandler.isInPath()) {

View File

@@ -402,6 +402,14 @@ public class GuiReplayOverlay extends Gui {
GlStateManager.enableBlend();
}
public void togglePlayPause() {
if (ReplayMod.replaySender.paused()) {
ReplayMod.replaySender.setReplaySpeed(speedSlider.getSliderValue());
} else {
ReplayMod.replaySender.setReplaySpeed(0);
}
}
/**
* Dummy interface for GUI on which this replay overlay shall not be rendered.
*/