Skip to content

Commit

Permalink
Moved active modules out of ModuleSelectorHud so that it is always vi…
Browse files Browse the repository at this point in the history
…sible.

TODO: Perhaps seperate it into it's own hud for people to move around???
  • Loading branch information
coltonk9043 committed May 5, 2024
1 parent d9540ae commit c16b382
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
14 changes: 14 additions & 0 deletions src/main/java/net/aoba/gui/GuiManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
12 changes: 0 additions & 12 deletions src/main/java/net/aoba/gui/hud/ModuleSelectorHud.java
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
}
}

0 comments on commit c16b382

Please sign in to comment.