Pressing the chat button if a GuiMouseInput is already present closes this GuiMouseInput (easier toggle between mouse and camera mode)
This commit is contained in:
@@ -15,10 +15,21 @@ public class GuiMouseInput extends GuiScreen {
|
||||
|
||||
private final GuiReplayOverlay overlay;
|
||||
|
||||
private boolean shouldClose = false;
|
||||
|
||||
public GuiMouseInput(GuiReplayOverlay overlay) {
|
||||
this.overlay = overlay;
|
||||
Mouse.setGrabbed(false);
|
||||
Mouse.setCursorPosition(mc.displayWidth/2, mc.displayHeight/2);
|
||||
|
||||
if(mc.currentScreen instanceof GuiMouseInput) {
|
||||
shouldClose = true;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
if(shouldClose) mc.displayGuiScreen(null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user