From a81bc67e90df2fddb8e2b8ad5ac6e13cf7c81032 Mon Sep 17 00:00:00 2001 From: Wyvest <45589059+Wyvest@users.noreply.github.com> Date: Sat, 2 Jul 2022 07:38:22 +0700 Subject: pass a UMatrixStack in HUD API From 1.17+, most matrix transformations can only be done with a MatrixStack instance, thus to prepare for a OneConfig 1.17+ port this has been done. --- src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/cc/polyfrost/oneconfig/gui') diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java index 2c3e681..b45a1d8 100644 --- a/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java +++ b/src/main/java/cc/polyfrost/oneconfig/gui/HudGui.java @@ -37,11 +37,11 @@ public class HudGui extends UScreen implements GuiPause { } for (Hud hud : HudCore.huds) { - if (hud.enabled) processHud(hud, mouseX); + if (hud.enabled) processHud(matrixStack, hud, mouseX); } } - private void processHud(Hud hud, int mouseX) { + private void processHud(UMatrixStack matrixStack, Hud hud, int mouseX) { if (hud == editingHud && isScaling) { float xFloat = hud.getXScaled(UResolution.getScaledWidth()); float yFloat = hud.getYScaled(UResolution.getScaledHeight()); @@ -65,7 +65,7 @@ public class HudGui extends UScreen implements GuiPause { int x = (int) hud.getXScaled(UResolution.getScaledWidth()); int y = (int) hud.getYScaled(UResolution.getScaledHeight()); - hud.drawExampleAll(x, y, hud.scale, true); + hud.drawExampleAll(matrixStack, x, y, hud.scale, true); int color = new Color(215, 224, 235).getRGB(); if (editingHud == hud) { color = new Color(43, 159, 235).getRGB(); -- cgit