use of org.bleachhack.gui.clickgui.window.ModuleWindow in project BleachHack by BleachDrinker420.
the class UIClickGuiScreen method init.
public void init() {
super.init();
uiContainer.windows.values().forEach(this::addWindow);
clearWindows();
addWindow(new ModuleWindow(List.of(ModuleManager.getModule(UI.class)), 200, 200, 75, "Render", new ItemStack(Items.YELLOW_STAINED_GLASS)));
}
use of org.bleachhack.gui.clickgui.window.ModuleWindow in project BleachHack by BleachDrinker420.
the class ModuleClickGuiScreen method initWindows.
public void initWindows() {
int len = ModuleManager.getModule(ClickGui.class).getSetting(0).asSlider().getValueInt();
int y = 50;
for (ModuleCategory c : ModuleCategory.values()) {
addWindow(new ModuleWindow(ModuleManager.getModulesInCat(c), 30, y, len, StringUtils.capitalize(c.name().toLowerCase()), c.getItem()));
y += 16;
}
for (Window w : getWindows()) {
if (w instanceof ClickGuiWindow) {
((ClickGuiWindow) w).hiding = true;
}
}
}
use of org.bleachhack.gui.clickgui.window.ModuleWindow 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