2021-09-30 21:44:30 -05:00
|
|
|
//
|
|
|
|
|
// Source code recreated from a .class file by IntelliJ IDEA
|
|
|
|
|
// (powered by FernFlower decompiler)
|
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
package noppes.npcs.client.gui.script;
|
|
|
|
|
|
|
|
|
|
import net.minecraft.client.gui.GuiButton;
|
|
|
|
|
import net.minecraft.util.ResourceLocation;
|
|
|
|
|
import noppes.npcs.client.gui.util.GuiNPCInterface;
|
|
|
|
|
import noppes.npcs.client.gui.util.GuiNpcButton;
|
2021-10-01 01:17:12 -05:00
|
|
|
import org.lwjgl.opengl.GL11;
|
2021-09-30 21:44:30 -05:00
|
|
|
|
2021-10-11 06:49:30 -05:00
|
|
|
public class GuiScriptGlobal extends GuiNPCInterface {
|
2021-09-30 21:44:30 -05:00
|
|
|
private final ResourceLocation resource = new ResourceLocation("customnpcs", "textures/gui/smallbg.png");
|
|
|
|
|
|
|
|
|
|
public GuiScriptGlobal() {
|
|
|
|
|
this.xSize = 176;
|
|
|
|
|
this.ySize = 222;
|
|
|
|
|
this.drawDefaultBackground = false;
|
|
|
|
|
this.title = "";
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void initGui() {
|
|
|
|
|
super.initGui();
|
|
|
|
|
this.addButton(new GuiNpcButton(0, this.guiLeft + 38, this.guiTop + 20, 100, 20, "Players"));
|
2021-10-01 01:17:12 -05:00
|
|
|
this.addButton(new GuiNpcButton(1, this.guiLeft + 38, this.guiTop + 50, 100, 20, "Forge"));
|
2022-03-23 17:42:35 -05:00
|
|
|
this.addButton(new GuiNpcButton(2, this.guiLeft + 38, this.guiTop + 80, 100, 20, "All NPCs"));
|
2021-09-30 21:44:30 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void drawScreen(int i, int j, float f) {
|
|
|
|
|
this.drawDefaultBackground();
|
2021-10-01 01:17:12 -05:00
|
|
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
2021-09-30 21:44:30 -05:00
|
|
|
this.mc.renderEngine.bindTexture(this.resource);
|
|
|
|
|
this.drawTexturedModalRect(this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize);
|
|
|
|
|
super.drawScreen(i, j, f);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
protected void actionPerformed(GuiButton guibutton) {
|
|
|
|
|
if (guibutton.id == 0) {
|
|
|
|
|
this.displayGuiScreen(new GuiScriptPlayers());
|
|
|
|
|
}
|
2021-10-18 06:33:39 -05:00
|
|
|
if (guibutton.id == 1) {
|
2021-09-30 21:44:30 -05:00
|
|
|
this.displayGuiScreen(new GuiScriptForge());
|
2021-10-18 06:33:39 -05:00
|
|
|
}
|
2022-03-23 03:54:06 -05:00
|
|
|
if (guibutton.id == 2) {
|
|
|
|
|
this.displayGuiScreen(new GuiScriptAllNPCs());
|
|
|
|
|
}
|
2021-09-30 21:44:30 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void keyTyped(char c, int i) {
|
|
|
|
|
if (i == 1 || this.isInventoryKey(i)) {
|
|
|
|
|
this.close();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void save() {
|
|
|
|
|
}
|
|
|
|
|
}
|