diff options
author | NopoTheGamer <40329022+NopoTheGamer@users.noreply.github.com> | 2023-04-05 04:20:35 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-04 20:20:35 +0200 |
commit | 42a7f35c7e1ed7b771f93e69e6bbd2a674a4f569 (patch) | |
tree | b8a08f1aa93de6a8a83e4a6df9395e2106b23b6b /src | |
parent | a278e49969e073be5abc7e46514b73b0d5073a11 (diff) | |
download | NotEnoughUpdates-42a7f35c7e1ed7b771f93e69e6bbd2a674a4f569.tar.gz NotEnoughUpdates-42a7f35c7e1ed7b771f93e69e6bbd2a674a4f569.tar.bz2 NotEnoughUpdates-42a7f35c7e1ed7b771f93e69e6bbd2a674a4f569.zip |
Move overlays back behind other stuff v2 (#651)
Fix overlays not rendering over tab and stuff like on 2.0
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java | 2 | ||||
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/overlays/TextOverlay.java | 9 |
2 files changed, 3 insertions, 8 deletions
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<String> 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(); - } } } |