From d4bb5a94308d4379ef3d6cc7b9221ea0d98ff051 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sat, 2 Jul 2022 06:12:23 +0700 Subject: Separate Minecraft dependant and non-dependant code --- src/main/java/cc/polyfrost/oneconfig/gui/elements/Slider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/elements/Slider.java') 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; -- cgit