resent-1.8/src/main/java/dev/resent/ui/HUDConfigScreen.java

41 lines
1.3 KiB
Java
Raw Normal View History

2023-01-14 15:39:22 -08:00
package dev.resent.ui;
2023-01-12 14:10:43 -08:00
import dev.resent.Resent;
2023-02-02 08:17:26 -08:00
import dev.resent.module.base.RenderMod;
2023-01-12 14:10:43 -08:00
import net.lax1dude.eaglercraft.v1_8.Keyboard;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
@SuppressWarnings("all")
public class HUDConfigScreen extends GuiScreen {
2023-01-14 07:56:36 -08:00
public void initGui() {
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 148, "Back"));
}
public void onGuiClosed() {
Keyboard.enableRepeatEvents(false);
mc.gameSettings.saveOptions();
}
public void drawScreen(int mx, int my, float par3) {
this.drawDefaultBackground();
for (int i = 0; i < Resent.INSTANCE.modManager.modules.size(); i++) {
2023-02-02 08:17:26 -08:00
if (Resent.INSTANCE.modManager.modules.get(i).isEnabled() && (Resent.INSTANCE.modManager.modules.get(i) instanceof RenderMod)) {
((RenderMod) Resent.INSTANCE.modManager.modules.get(i)).renderLayout(mx, my);
2023-01-14 07:56:36 -08:00
}
}
super.drawScreen(mx, my, par3);
}
protected void actionPerformed(GuiButton par1GuiButton) {
if (par1GuiButton.id == 200) {
this.mc.displayGuiScreen(new ClickGUI());
}
}
public boolean doesGuiPauseGame() {
return false;
}
2023-01-12 14:10:43 -08:00
}