When restarting the Replay, Speed setting is now being kept
This commit is contained in:
@@ -80,12 +80,13 @@ public class GuiReplayOverlay extends Gui {
|
||||
private boolean wasSliding = false;
|
||||
private boolean mouseDwn = false;
|
||||
|
||||
public void resetUI() throws Exception {
|
||||
public void resetUI(boolean slider) throws Exception {
|
||||
if(FMLClientHandler.instance().isGUIOpen(GuiMouseInput.class)) {
|
||||
mc.displayGuiScreen(null);
|
||||
}
|
||||
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
|
||||
|
||||
@@ -308,7 +308,7 @@ public class ReplayHandler {
|
||||
channel.pipeline().fireChannelActive();
|
||||
|
||||
try {
|
||||
ReplayMod.overlay.resetUI();
|
||||
ReplayMod.overlay.resetUI(true);
|
||||
} catch(Exception e) {}
|
||||
|
||||
//Load lighting and trigger update
|
||||
@@ -337,7 +337,7 @@ public class ReplayHandler {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
ReplayMod.overlay.resetUI();
|
||||
ReplayMod.overlay.resetUI(false);
|
||||
} catch(Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user