diff options
| author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-05 22:37:47 +0900 | 
|---|---|---|
| committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-05 22:37:47 +0900 | 
| commit | 206063acf3a6e0edc0d16b07d206aa36207b42d4 (patch) | |
| tree | 8d0f31d65cfa4b3f85a3d4f7f0844f6df65b2b7e /src/main/java/cc/polyfrost/oneconfig/utils/InputUtils.java | |
| parent | fecb67e07ded0d20b12d3bdb48fea3e2e50b7f88 (diff) | |
| download | OneConfig-206063acf3a6e0edc0d16b07d206aa36207b42d4.tar.gz OneConfig-206063acf3a6e0edc0d16b07d206aa36207b42d4.tar.bz2 OneConfig-206063acf3a6e0edc0d16b07d206aa36207b42d4.zip | |
a
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());      } | 
