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

30 lines
930 B
Java
Raw Normal View History

2023-02-24 09:16:21 -08:00
package dev.resent.visual.ui;
2023-01-12 14:10:43 -08:00
2023-02-19 12:29:19 -08:00
import dev.resent.client.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.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
public class HUDConfigScreen extends GuiScreen {
2023-01-14 07:56:36 -08:00
public void initGui() {
2023-02-20 10:24:41 -08:00
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 148, "Back"));
2023-01-14 07:56:36 -08:00
}
public void onGuiClosed() {
mc.gameSettings.saveOptions();
}
public void drawScreen(int mx, int my, float par3) {
this.drawDefaultBackground();
2023-02-19 12:29:19 -08:00
Resent.INSTANCE.modManager.modules.stream().filter(m -> m.isEnabled() && m instanceof RenderMod).forEach(rm -> ((RenderMod)rm).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());
}
}
2023-01-12 14:10:43 -08:00
}