aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java
diff options
context:
space:
mode:
authorDeDiamondPro <67508414+DeDiamondPro@users.noreply.github.com>2022-08-17 17:43:23 +0200
committerGitHub <noreply@github.com>2022-08-17 17:43:23 +0200
commit97f788ecd4be15b1556ee1f3d8bd057bdf06bf5f (patch)
tree2bccc96007025fbccf1758ac66d4665a97d6c315 /src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java
parente18629af6aee276b0be6cec473e4099cca9100f1 (diff)
downloadOneConfig-97f788ecd4be15b1556ee1f3d8bd057bdf06bf5f.tar.gz
OneConfig-97f788ecd4be15b1556ee1f3d8bd057bdf06bf5f.tar.bz2
OneConfig-97f788ecd4be15b1556ee1f3d8bd057bdf06bf5f.zip
Input revamp (#93)
* hud fix * api * things * stuff
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/renderer/RenderManager.java8
1 files changed, 4 insertions, 4 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);
}
}