diff options
author | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-02 06:12:23 +0700 |
---|---|---|
committer | Wyvest <45589059+Wyvest@users.noreply.github.com> | 2022-07-02 06:12:23 +0700 |
commit | d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051 (patch) | |
tree | 9bb9b53e2823f73084780673763504f4098bae69 /src/main/java/cc/polyfrost/oneconfig/gui/elements/Slider.java | |
parent | d2b1d57120bb51e76191302a58d935afe52b89df (diff) | |
download | OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.tar.gz OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.tar.bz2 OneConfig-d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051.zip |
Separate Minecraft dependant and non-dependant code
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/elements/Slider.java')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/gui/elements/Slider.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/elements/Slider.java b/src/main/java/cc/polyfrost/oneconfig/gui/elements/Slider.java index 8c9dfb6..dda5621 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/elements/Slider.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/elements/Slider.java @@ -1,9 +1,9 @@ package cc.polyfrost.oneconfig.gui.elements; import cc.polyfrost.oneconfig.internal.assets.Colors; +import cc.polyfrost.oneconfig.platform.Platform; import cc.polyfrost.oneconfig.renderer.RenderManager; import cc.polyfrost.oneconfig.utils.InputUtils; -import org.lwjgl.input.Mouse; public class Slider extends BasicElement { private final float min, max; @@ -34,7 +34,7 @@ public class Slider extends BasicElement { public void update(int x, int y) { super.update(x, y); - boolean isMouseDown = Mouse.isButtonDown(0); + boolean isMouseDown = Platform.getMousePlatform().isButtonDown(0); boolean hovered = InputUtils.isAreaHovered(x - 6, y - 3, width + 12, height + 6); if (hovered && isMouseDown && !mouseWasDown) dragging = true; mouseWasDown = isMouseDown; |