From c16b3824f29fe24e16a7de63fe3a7a051aea24d0 Mon Sep 17 00:00:00 2001 From: Colton Date: Sun, 5 May 2024 10:59:02 -0400 Subject: [PATCH] Moved active modules out of ModuleSelectorHud so that it is always visible. TODO: Perhaps seperate it into it's own hud for people to move around??? --- src/main/java/net/aoba/gui/GuiManager.java | 14 ++++++++++++++ .../java/net/aoba/gui/hud/ModuleSelectorHud.java | 12 ------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/main/java/net/aoba/gui/GuiManager.java b/src/main/java/net/aoba/gui/GuiManager.java index 635427d4..8e7545e3 100644 --- a/src/main/java/net/aoba/gui/GuiManager.java +++ b/src/main/java/net/aoba/gui/GuiManager.java @@ -30,6 +30,7 @@ import org.lwjgl.opengl.GL11; import net.aoba.module.Module; import net.aoba.Aoba; +import net.aoba.AobaClient; import net.aoba.gui.colors.Color; import net.aoba.gui.colors.RainbowColor; import net.aoba.gui.colors.RandomColor; @@ -257,6 +258,19 @@ public void draw(DrawContext drawContext, float tickDelta) { } } + // Draws the active mods in the top right of the screen. + AobaClient aoba = Aoba.getInstance(); + int iteration = 0; + for(int i = 0; i < aoba.moduleManager.modules.size(); i++) { + Module mod = aoba.moduleManager.modules.get(i); + if(mod.getState()) { + RenderUtils.drawString(drawContext, mod.getName(), + (float) (window.getWidth() - ((mc.textRenderer.getWidth(mod.getName()) + 5) * 2)), 10 + (iteration*20), + GuiManager.foregroundColor.getValue().getColorAsInt()); + iteration++; + } + } + matrixStack.pop(); GL11.glEnable(GL11.GL_CULL_FACE); diff --git a/src/main/java/net/aoba/gui/hud/ModuleSelectorHud.java b/src/main/java/net/aoba/gui/hud/ModuleSelectorHud.java index 8fb500b3..3da2fa04 100644 --- a/src/main/java/net/aoba/gui/hud/ModuleSelectorHud.java +++ b/src/main/java/net/aoba/gui/hud/ModuleSelectorHud.java @@ -158,17 +158,5 @@ public void draw(DrawContext drawContext, float partialTicks) { } } } - - // Draws the active mods in the top right of the screen. - int iteration = 0; - for(int i = 0; i < aoba.moduleManager.modules.size(); i++) { - Module mod = aoba.moduleManager.modules.get(i); - if(mod.getState()) { - RenderUtils.drawString(drawContext, mod.getName(), - (float) (window.getWidth() - ((mc.textRenderer.getWidth(mod.getName()) + 5) * 2)), 10 + (iteration*20), - GuiManager.foregroundColor.getValue().getColorAsInt()); - iteration++; - } - } } }