diff options
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/renderer')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java | 8 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/renderer/TextRenderer.java | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java b/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java index 1d1670c..5e9c996 100644 --- a/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java +++ b/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java @@ -36,7 +36,7 @@ import cc.polyfrost.oneconfig.platform.NanoVGPlatform; import cc.polyfrost.oneconfig.platform.Platform; import cc.polyfrost.oneconfig.renderer.font.Font; import cc.polyfrost.oneconfig.renderer.font.FontManager; -import cc.polyfrost.oneconfig.utils.InputUtils; +import cc.polyfrost.oneconfig.utils.InputHandler; import cc.polyfrost.oneconfig.utils.NetworkUtils; import org.lwjgl.nanovg.NVGColor; import org.lwjgl.nanovg.NVGPaint; @@ -337,13 +337,13 @@ public final class RenderManager { * <p><b>This does NOT scale to Minecraft's GUI scale!</b></p> * * @see RenderManager#drawText(long, String, float, float, int, float, Font) - * @see InputUtils#isAreaClicked(float, float, float, float) + * @see InputHandler#isAreaClicked(float, float, float, float) */ - public static void drawURL(long vg, String url, float x, float y, float size, Font font) { + public static void drawURL(long vg, String url, float x, float y, float size, Font font, InputHandler inputHandler) { drawText(vg, url, x, y, Colors.PRIMARY_500, size, font); float length = getTextWidth(vg, url, size, font); drawRect(vg, x, y + size / 2, length, 1, Colors.PRIMARY_500); - if (InputUtils.isAreaClicked((int) (x - 2), (int) (y - 1), (int) (length + 4), (int) (size / 2 + 3))) { + if (inputHandler.isAreaClicked((int) (x - 2), (int) (y - 1), (int) (length + 4), (int) (size / 2 + 3))) { NetworkUtils.browseLink(url); } } diff --git a/src/main/java/cc/polyfrost/oneconfig/renderer/TextRenderer.java b/src/main/java/cc/polyfrost/oneconfig/renderer/TextRenderer.java index 84b45a1..2eed6d7 100644 --- a/src/main/java/cc/polyfrost/oneconfig/renderer/TextRenderer.java +++ b/src/main/java/cc/polyfrost/oneconfig/renderer/TextRenderer.java @@ -28,7 +28,7 @@ package cc.polyfrost.oneconfig.renderer; import cc.polyfrost.oneconfig.internal.assets.Colors; import cc.polyfrost.oneconfig.renderer.font.Font; -import cc.polyfrost.oneconfig.utils.InputUtils; +import cc.polyfrost.oneconfig.utils.InputHandler; import cc.polyfrost.oneconfig.utils.NetworkUtils; import com.google.common.annotations.Beta; import org.lwjgl.nanovg.NVGColor; @@ -148,13 +148,13 @@ public class TextRenderer { * <p><b>This does NOT scale to Minecraft's GUI scale!</b></p> * * @see RenderManager#drawText(long, String, float, float, int, float, Font) - * @see InputUtils#isAreaClicked(float, float, float, float) + * @see InputHandler#isAreaClicked(float, float, float, float) */ - public static void drawURL(long vg, String url, float x, float y, float size, Font font) { + public static void drawURL(long vg, String url, float x, float y, float size, Font font, InputHandler inputHandler) { drawText(vg, url, x, y, Colors.PRIMARY_500, size, font); float length = getTextWidth(vg, url, size, font); RenderManager.drawRect(vg, x, y + size / 2, length, 1, Colors.PRIMARY_500); - if (InputUtils.isAreaClicked((int) (x - 2), (int) (y - 1), (int) (length + 4), (int) (size / 2 + 3))) { + if (inputHandler.isAreaClicked((int) (x - 2), (int) (y - 1), (int) (length + 4), (int) (size / 2 + 3))) { NetworkUtils.browseLink(url); } } |