aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorLorenz <lo.scherf@gmail.com>2022-09-11 17:45:22 +0200
committerLorenz <lo.scherf@gmail.com>2022-09-11 17:45:22 +0200
commit0f84f9627ae7298ec34415daf087c93880c3ad4e (patch)
tree6dc5daed843356700915eca4c03abe33455d0536 /src/main/java
parenteb0cda7a9f5fa7307e12ae96d0980aab1fc85dd6 (diff)
downloadNotEnoughUpdates-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')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/listener/RenderListener.java4
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/minionhelper/render/MinionHelperOverlay.java10
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()) {