diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java b/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java index a48d369..6582eaa 100644 --- a/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java +++ b/src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java @@ -96,7 +96,7 @@ public final class InputUtils { * @return the current mouse X position */ public static int mouseX() { - if (OneConfigGui.INSTANCE == null) return Platform.getMousePlatform().getMouseX(); + if (OneConfigGui.INSTANCE == null) return (int) Platform.getMousePlatform().getMouseX(); //todo stop casting and actually use doubles return (int) (Platform.getMousePlatform().getMouseX() / OneConfigGui.INSTANCE.getScaleFactor()); } @@ -110,7 +110,7 @@ public final class InputUtils { * @return the current mouse Y position */ public static int mouseY() { - if (OneConfigGui.INSTANCE == null) return UResolution.getWindowHeight() - Math.abs(Platform.getMousePlatform().getMouseY()); + if (OneConfigGui.INSTANCE == null) return (int) (UResolution.getWindowHeight() - Math.abs(Platform.getMousePlatform().getMouseY())); return (int) ((UResolution.getWindowHeight() - Math.abs(Platform.getMousePlatform().getMouseY())) / OneConfigGui.INSTANCE.getScaleFactor()); } |