Center and free the Mouse cursor whenever a GuiReplayOverlay is opened

This commit is contained in:
CrushedPixel
2015-07-23 13:20:39 +02:00
parent 371d26aaff
commit be8286ad9c

View File

@@ -5,15 +5,20 @@ import eu.crushedpixel.replaymod.gui.overlay.GuiReplayOverlay;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Mouse;
import java.io.IOException;
public class GuiMouseInput extends GuiScreen {
private final Minecraft mc = Minecraft.getMinecraft();
private final GuiReplayOverlay overlay;
public GuiMouseInput(GuiReplayOverlay overlay) {
this.overlay = overlay;
Mouse.setGrabbed(false);
Mouse.setCursorPosition(mc.displayWidth/2, mc.displayHeight/2);
}
@Override