You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
927 B
Java

package net.brokenmoon.afloydwiremod.gui;
import net.brokenmoon.afloydwiremod.tileentity.ChipTileEntity;
import net.minecraft.src.*;
public class GuiProgrammer extends GuiScreen {
private ChipTileEntity chip;
@Override
public void initGui() {
//this.height - 240 is top
//This.width / 2
this.controlList.add(new GuiButton(1, this.width / 2 - 214, this.height - 240, "Constant"));
this.controlList.add(new GuiButton(2, this.width / 2 - 214, this.height - 220, "Count"));
}
public GuiProgrammer(EntityPlayer player, ChipTileEntity chip) {
super.initGui();
this.chip = chip;
}
@Override
protected void actionPerformed(GuiButton guibutton) {
if (guibutton.id == 1) {
chip.setMode("constant");
} else if(guibutton.id == 2){
chip.setMode("count");
}
this.mc.displayGuiScreen(null);
}
}