When restarting the Replay, Speed setting is now being kept

This commit is contained in:
CrushedPixel
2015-05-06 18:27:21 +02:00
parent 8e3ded4f5e
commit c95e66efbc
2 changed files with 5 additions and 4 deletions

View File

@@ -80,12 +80,13 @@ public class GuiReplayOverlay extends Gui {
private boolean wasSliding = false; private boolean wasSliding = false;
private boolean mouseDwn = false; private boolean mouseDwn = false;
public void resetUI() throws Exception { public void resetUI(boolean slider) throws Exception {
if(FMLClientHandler.instance().isGUIOpen(GuiMouseInput.class)) { if(FMLClientHandler.instance().isGUIOpen(GuiMouseInput.class)) {
mc.displayGuiScreen(null); mc.displayGuiScreen(null);
} }
ReplayHandler.setRealTimelineCursor(0); ReplayHandler.setRealTimelineCursor(0);
speedSlider = new GuiReplaySpeedSlider(1, sliderX, sliderY, I18n.format("replaymod.gui.speed")); if(slider)
speedSlider = new GuiReplaySpeedSlider(1, sliderX, sliderY, I18n.format("replaymod.gui.speed"));
} }
@SubscribeEvent @SubscribeEvent

View File

@@ -308,7 +308,7 @@ public class ReplayHandler {
channel.pipeline().fireChannelActive(); channel.pipeline().fireChannelActive();
try { try {
ReplayMod.overlay.resetUI(); ReplayMod.overlay.resetUI(true);
} catch(Exception e) {} } catch(Exception e) {}
//Load lighting and trigger update //Load lighting and trigger update
@@ -337,7 +337,7 @@ public class ReplayHandler {
@Override @Override
public void run() { public void run() {
try { try {
ReplayMod.overlay.resetUI(); ReplayMod.overlay.resetUI(false);
} catch(Exception e) { } catch(Exception e) {
e.printStackTrace(); e.printStackTrace();
} }