From 42a7f35c7e1ed7b771f93e69e6bbd2a674a4f569 Mon Sep 17 00:00:00 2001 From: NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> Date: Wed, 5 Apr 2023 04:20:35 +1000 Subject: Move overlays back behind other stuff v2 (#651) Fix overlays not rendering over tab and stuff like on 2.0 --- .../moulberry/notenoughupdates/listener/RenderListener.java | 2 ++ .../github/moulberry/notenoughupdates/overlays/TextOverlay.java | 9 +-------- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'src/main/java') diff --git a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java index 54ffe35e..d4b9a60d 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java @@ -159,6 +159,7 @@ public class RenderListener { if (neu.hasSkyblockScoreboard() && event.type.equals(RenderGameOverlayEvent.ElementType.ALL)) { DungeonWin.render(event.partialTicks); GlStateManager.pushMatrix(); + Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.locationedit.guiScale); GlStateManager.translate(0, 0, -200); label: for (TextOverlay overlay : OverlayManager.textOverlays) { @@ -173,6 +174,7 @@ public class RenderListener { GlStateManager.enableDepth(); overlay.render(); } + Utils.pushGuiScale(0); GlStateManager.popMatrix(); OverlayManager.dontRenderOverlay = new ArrayList<>(); } diff --git a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java index 2fbbe27d..28a6bcaa 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java @@ -142,10 +142,7 @@ public abstract class TextOverlay { private void render(List strings, boolean dummy) { if (strings == null) return; - if (!dummy) { - GlStateManager.pushMatrix(); - Utils.pushGuiScale(NotEnoughUpdates.INSTANCE.config.locationedit.guiScale); - } + Vector2f size = getSize(strings); overlayHeight = (int) size.y; overlayWidth = (int) size.x; @@ -210,9 +207,5 @@ public abstract class TextOverlay { } } } - if (!dummy) { - Utils.pushGuiScale(0); - GlStateManager.popMatrix(); - } } } -- cgit