Cursor Reset Fix

This commit is contained in:
kirillsaint 2023-08-30 17:56:41 +06:00
parent 198bf6789a
commit f3a00cb1cc
3 changed files with 11 additions and 6 deletions

View File

@ -236,11 +236,13 @@ public class ClickGUI extends SilentScreen {
mc.displayGuiScreen(null); mc.displayGuiScreen(null);
} }
loaded = false; loaded = false;
Client.getInstance().getMouseCursorHandler().disableCursor();
} else {
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
} }
if(introAnimation.isDone() && !close) { if(introAnimation.isDone() && !close) {
loaded = true; loaded = true;
} }
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
GlUtils.stopScale(); GlUtils.stopScale();
GlStateManager.popMatrix(); GlStateManager.popMatrix();

View File

@ -146,8 +146,6 @@ public class GuiColorPicker extends SilentScreen {
cursorType = MouseCursorHandler.CursorType.POINTER; cursorType = MouseCursorHandler.CursorType.POINTER;
} }
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
GL11.glPopMatrix(); GL11.glPopMatrix();
RenderUtil.drawImage(new ResourceLocation("silentclient/logos/logo.png"), x + 5, y + 5, 77, 15); RenderUtil.drawImage(new ResourceLocation("silentclient/logos/logo.png"), x + 5, y + 5, 77, 15);
@ -161,7 +159,10 @@ public class GuiColorPicker extends SilentScreen {
if(ClickGUI.introAnimation.isDone(Direction.BACKWARDS)) { if(ClickGUI.introAnimation.isDone(Direction.BACKWARDS)) {
mc.displayGuiScreen(null); mc.displayGuiScreen(null);
} }
} Client.getInstance().getMouseCursorHandler().disableCursor();
} else {
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
}
GlUtils.stopScale(); GlUtils.stopScale();
GlStateManager.popMatrix(); GlStateManager.popMatrix();

View File

@ -224,7 +224,6 @@ public class ModSettings extends SilentScreen {
settingY += settingHeight; settingY += settingHeight;
} }
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
GL11.glDisable(GL11.GL_SCISSOR_TEST); GL11.glDisable(GL11.GL_SCISSOR_TEST);
GL11.glPopMatrix(); GL11.glPopMatrix();
@ -275,7 +274,10 @@ public class ModSettings extends SilentScreen {
if(ClickGUI.introAnimation.isDone(Direction.BACKWARDS)) { if(ClickGUI.introAnimation.isDone(Direction.BACKWARDS)) {
mc.displayGuiScreen(null); mc.displayGuiScreen(null);
} }
} Client.getInstance().getMouseCursorHandler().disableCursor();
} else {
Client.getInstance().getMouseCursorHandler().enableCursor(cursorType);
}
GlUtils.stopScale(); GlUtils.stopScale();
GlStateManager.popMatrix(); GlStateManager.popMatrix();