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 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
|
||||||
|
|||||||
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user