Freed mouse during rendering process

Made replay_recordings and replay_videos folder customizable through config file (not recommended)
This commit is contained in:
Marius Metzger
2015-04-06 19:15:55 +02:00
parent 4ed92c3739
commit 352fcbde4e
13 changed files with 126 additions and 45 deletions

View File

@@ -33,6 +33,7 @@ import eu.crushedpixel.replaymod.holders.TimeKeyframe;
import eu.crushedpixel.replaymod.recording.ConnectionEventHandler;
import eu.crushedpixel.replaymod.registry.ReplayGuiRegistry;
import eu.crushedpixel.replaymod.replay.ReplayHandler;
import eu.crushedpixel.replaymod.replay.ReplayProcess;
import eu.crushedpixel.replaymod.utils.MouseUtils;
import eu.crushedpixel.replaymod.video.VideoWriter;
@@ -82,7 +83,7 @@ public class GuiReplayOverlay extends Gui {
@SubscribeEvent
public void onRenderGui(RenderGameOverlayEvent event) {
if(VideoWriter.isRecording() && !(mc.currentScreen instanceof GuiCancelRender)) {
if(ReplayProcess.isVideoRecording() && ReplayHandler.isInPath() && !(mc.currentScreen instanceof GuiCancelRender)) {
event.setCanceled(true);
}
}
@@ -113,10 +114,6 @@ public class GuiReplayOverlay extends Gui {
GL11.glEnable(GL11.GL_BLEND);
if(!ReplayHandler.isInReplay()) {
return;
}
Point mousePoint = MouseUtils.getMousePos();
final int mouseX = (int) mousePoint.getX();
final int mouseY = (int) mousePoint.getY();
@@ -250,7 +247,8 @@ public class GuiReplayOverlay extends Gui {
mc.renderEngine.bindTexture(extended_gui);
if(hover && Mouse.isButtonDown(0) && isClick() && FMLClientHandler.instance().isGUIOpen(GuiMouseInput.class)) {
if(hover && Mouse.isButtonDown(0) && isClick() && FMLClientHandler.instance().isGUIOpen(GuiMouseInput.class)
&& !ReplayHandler.isInPath()) {
if(ReplayHandler.getSelected() == null || !(ReplayHandler.getSelected() instanceof PositionKeyframe)) {
addPlaceKeyframe();
} else {
@@ -292,7 +290,7 @@ public class GuiReplayOverlay extends Gui {
mc.renderEngine.bindTexture(extended_gui);
if(hover && Mouse.isButtonDown(0) && isClick() && FMLClientHandler.instance().isGUIOpen(GuiMouseInput.class)) {
if(ReplayHandler.getSelected() == null || !(ReplayHandler.getSelected() instanceof TimeKeyframe)) {
if(ReplayHandler.getSelected() == null || !(ReplayHandler.getSelected() instanceof TimeKeyframe) && !ReplayHandler.isInPath()) {
addTimeKeyframe();
} else {
ReplayHandler.removeKeyframe(ReplayHandler.getSelected());