use of org.bleachhack.module.mods.ClickGui in project BleachHack by BleachDrinker420.
the class ModuleClickGuiScreen method render.
public void render(MatrixStack matrices, int mouseX, int mouseY, float delta) {
BleachFileHelper.SCHEDULE_SAVE_CLICKGUI.set(true);
ClickGui clickGui = ModuleManager.getModule(ClickGui.class);
searchField.visible = clickGui.getSetting(1).asToggle().getState();
if (clickGui.getSetting(1).asToggle().getState()) {
searchField.setSuggestion(searchField.getText().isEmpty() ? "Search here" : "");
Set<Module> seachMods = new HashSet<>();
if (!searchField.getText().isEmpty()) {
for (Module m : ModuleManager.getModules()) {
if (m.getName().toLowerCase(Locale.ENGLISH).contains(searchField.getText().toLowerCase(Locale.ENGLISH).replace(" ", ""))) {
seachMods.add(m);
}
}
}
for (Window w : getWindows()) {
if (w instanceof ModuleWindow) {
((ModuleWindow) w).setSearchedModule(seachMods);
}
}
}
int len = clickGui.getSetting(0).asSlider().getValueInt();
for (Window w : getWindows()) {
if (w instanceof ModuleWindow) {
((ModuleWindow) w).setLen(len);
}
}
super.render(matrices, mouseX, mouseY, delta);
textRenderer.draw(matrices, "BleachHack-" + BleachHack.VERSION + "-" + SharedConstants.getGameVersion().getName(), 3, 3, 0x305090);
textRenderer.draw(matrices, "BleachHack-" + BleachHack.VERSION + "-" + SharedConstants.getGameVersion().getName(), 2, 2, 0x6090d0);
if (clickGui.getSetting(2).asToggle().getState()) {
textRenderer.drawWithShadow(matrices, "Current prefix is: \"" + Command.getPrefix() + "\" (" + Command.getPrefix() + "help)", 2, height - 20, 0x99ff99);
textRenderer.drawWithShadow(matrices, "Use " + Command.getPrefix() + "clickgui to reset the clickgui", 2, height - 10, 0x9999ff);
}
}
Aggregations