diff options
author | Lorenz <lo.scherf@gmail.com> | 2022-09-11 17:45:22 +0200 |
---|---|---|
committer | Lorenz <lo.scherf@gmail.com> | 2022-09-11 17:45:22 +0200 |
commit | 0f84f9627ae7298ec34415daf087c93880c3ad4e (patch) | |
tree | 6dc5daed843356700915eca4c03abe33455d0536 /src/main/java | |
parent | eb0cda7a9f5fa7307e12ae96d0980aab1fc85dd6 (diff) | |
download | NotEnoughUpdates-0f84f9627ae7298ec34415daf087c93880c3ad4e.tar.gz NotEnoughUpdates-0f84f9627ae7298ec34415daf087c93880c3ad4e.tar.bz2 NotEnoughUpdates-0f84f9627ae7298ec34415daf087c93880c3ad4e.zip |
I'm doing a dirty workaround because it's not working as expected, and I'm so annoyed by now that I don't care how it looks as long as it works.
Diffstat (limited to 'src/main/java')
2 files changed, 11 insertions, 3 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 063aa862..046ef3b5 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java @@ -51,11 +51,12 @@ import io.github.moulberry.notenoughupdates.miscgui.StorageOverlay; import io.github.moulberry.notenoughupdates.miscgui.TradeWindow; import io.github.moulberry.notenoughupdates.miscgui.TrophyRewardOverlay; import io.github.moulberry.notenoughupdates.miscgui.minionhelper.MinionHelperManager; +import io.github.moulberry.notenoughupdates.miscgui.minionhelper.render.MinionHelperOverlay; import io.github.moulberry.notenoughupdates.mixins.AccessorGuiContainer; import io.github.moulberry.notenoughupdates.options.NEUConfig; import io.github.moulberry.notenoughupdates.overlays.AuctionSearchOverlay; -import io.github.moulberry.notenoughupdates.overlays.EquipmentOverlay; import io.github.moulberry.notenoughupdates.overlays.BazaarSearchOverlay; +import io.github.moulberry.notenoughupdates.overlays.EquipmentOverlay; import io.github.moulberry.notenoughupdates.overlays.OverlayManager; import io.github.moulberry.notenoughupdates.overlays.RancherBootOverlay; import io.github.moulberry.notenoughupdates.overlays.TextOverlay; @@ -573,6 +574,7 @@ public class RenderListener { 36 / 256f, GL11.GL_NEAREST ); + MinionHelperOverlay.getInstance().render(); if (button.icon != null && !button.icon.trim().isEmpty()) { GuiInvButtonEditor.renderIcon(button.icon, x + 1, y + 1); diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java index 38f1c9e1..ce880c63 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java @@ -52,6 +52,12 @@ import java.util.Map; public class MinionHelperOverlay { + public static MinionHelperOverlay getInstance() { + return instance; + } + + private static MinionHelperOverlay instance; + private final ResourceLocation minionOverlayImage = new ResourceLocation("notenoughupdates:minion_overlay.png"); private final ResourceLocation greenCheckImage = new ResourceLocation("notenoughupdates:dungeon_map/green_check.png"); private final ResourceLocation whiteCheckImage = new ResourceLocation("notenoughupdates:dungeon_map/white_check.png"); @@ -69,6 +75,7 @@ public class MinionHelperOverlay { private int currentPage = 0; public MinionHelperOverlay(MinionHelperManager manager) { + instance = this; this.manager = manager; hover = new MinionHelperOverlayHover(this, manager); } @@ -83,8 +90,7 @@ public class MinionHelperOverlay { cacheTotalPages = -1; } - @SubscribeEvent - public void onDrawBackground(GuiScreenEvent.BackgroundDrawnEvent event) { + public void render() { if (!manager.inCraftedMinionsInventory()) return; if (!NotEnoughUpdates.INSTANCE.config.minionHelper.gui) return; if (manager.isInvalidApiKey()) { |