use of net.minecraft.client.gui.GuiButton in project MorePlanets by SteveKunG.
the class GuiSpaceWarpPad method initGui.
@Override
public void initGui() {
super.initGui();
List<String> batterySlotDesc = new ArrayList<>();
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.0"));
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.1"));
this.electricInfoRegion = new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 7, (this.height - this.ySize) / 2 + 23, 9, 57, new ArrayList<>(), this.width, this.height, this);
this.infoRegions.add(new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 21, (this.height - this.ySize) / 2 + 71, 18, 18, batterySlotDesc, this.width, this.height, this));
this.infoRegions.add(this.electricInfoRegion);
this.buttonList.add(this.buttonEnable = new GuiButton(0, this.width / 2 - 45, this.height / 2 - 16, 72, 20, !this.tile.getDisabled(0) ? GCCoreUtil.translate("gui.button.disable.name") : GCCoreUtil.translate("gui.button.enable.name")));
}
use of net.minecraft.client.gui.GuiButton in project MorePlanets by SteveKunG.
the class GuiShieldGeneratorEntityFilter method initGui.
@Override
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
int width = (this.width - this.xSize) / 2;
int height = (this.height - this.ySize) / 2;
List<String> batterySlotDesc = new ArrayList<>();
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.0"));
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.1"));
this.infoRegions.add(new GuiElementInfoRegionMP(width + 151, height + 77, 18, 18, batterySlotDesc, this.width, this.height, this));
this.infoRegions.add(new GuiElementInfoRegionMP(width + 60, height + 70, 13, 13, Arrays.asList(GCCoreUtil.translate("gui.shield_visible.desc")), this.width, this.height, this));
this.infoRegions.add(new GuiElementInfoRegionMP(width + 80, height + 70, 13, 13, Arrays.asList(GCCoreUtil.translate("gui.enable_shield.desc")), this.width, this.height, this));
this.infoRegions.add(new GuiElementInfoRegionMP(width + 100, height + 70, 13, 13, Arrays.asList(GCCoreUtil.translate("gui.enable_shield_damage.desc")), this.width, this.height, this));
this.buttonList.add(this.buttonBack = new GuiButton(0, this.width / 2 - 76, this.height / 2 - 6, 72, 20, GCCoreUtil.translate("gui.button.back.name")));
this.buttonList.add(this.buttonAdd = new GuiButton(1, this.width / 2 - 160, this.height / 2 - 6, 72, 20, GCCoreUtil.translate("gui.button.add.name")));
this.buttonAdd.enabled = false;
this.entityTextbox = new GuiTextField(0, this.fontRenderer, this.width / 2 - 3, this.height / 2 - 83, 30, 16);
this.entityTextbox.setMaxStringLength(2);
this.entityTextbox.setFocused(false);
this.entityTextbox.setCanLoseFocus(true);
this.entityTextbox.setEnableBackgroundDrawing(true);
this.entityTextbox.setTextColor(16777215);
this.entityTextbox.setText("");
this.selectionList = new GuiListEntityFilter(this, this.mc, this.width, this.height, 32, this.height - 64, 36);
}
use of net.minecraft.client.gui.GuiButton in project SecurityCraft by Geforce132.
the class GuiRAMActivate method initGui.
public void initGui() {
super.initGui();
for (int i = 1; i < 7; i++) {
// this.buttonList.add((i - 1, this.width / 2 - 49 - 25, this.height / 2 - 7 - 60 + ((i - 1) * 25), 149, 20, "Mine at X: " + this.item.tEList[i - 1].xCoord + " Y: " + this.item.tEList[i - 1].yCoord + " Z: " + this.item.tEList[i - 1].zCoord));
this.buttons[i - 1] = new GuiButton(i - 1, this.width / 2 - 49 - 25, this.height / 2 - 7 - 60 + ((i - 1) * 25), 149, 20, "Not bound!");
this.buttons[i - 1].enabled = false;
if (this.item.getItem() != null && this.item.getItem() == mod_SecurityCraft.remoteAccessMine && this.item.stackTagCompound != null && this.item.stackTagCompound.getIntArray("mine" + i) != null && this.item.stackTagCompound.getIntArray("mine" + i).length > 0) {
int[] coords = this.item.stackTagCompound.getIntArray("mine" + i);
if (coords[0] == 0 && coords[1] == 0 && coords[2] == 0) {
this.buttonList.add(this.buttons[i - 1]);
continue;
}
this.buttons[i - 1].displayString = "Mine at X: " + coords[0] + " Y: " + coords[1] + " Z: " + coords[2];
this.buttons[i - 1].enabled = true;
this.buttons[i - 1].id = i - 1;
}
// this.buttons[i - 1] = new GuiButton(i - 1, this.width / 2 - 49 - 25, this.height / 2 - 7 - 60 + ((i - 1) * 25), 149, 20, "Mine at X: " + this.item.tEList[i - 1].xCoord + " Y: " + this.item.tEList[i - 1].yCoord + " Z: " + this.item.tEList[i - 1].zCoord);
this.buttonList.add(this.buttons[i - 1]);
}
}
use of net.minecraft.client.gui.GuiButton in project SecurityCraft by Geforce132.
the class GuiRetinalScannerSetup method initGui.
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
int j = (this.height - this.height) / 2;
this.buttonList.add(new GuiButton(0, this.width / 2 - 48, this.height / 2 + 30 + 20, 100, 20, "Save & continue."));
this.textboxAllowedPlayers = new GuiTextField(this.fontRendererObj, this.width / 2 - 37 - 24, this.height / 2 - 23, 125, 12);
//
this.textboxAllowedPlayers.setTextColor(-1);
this.textboxAllowedPlayers.setDisabledTextColour(-1);
this.textboxAllowedPlayers.setEnableBackgroundDrawing(true);
this.textboxAllowedPlayers.setMaxStringLength(200);
}
use of net.minecraft.client.gui.GuiButton in project SecurityCraft by Geforce132.
the class GuiSecurityCamera method initGui.
public void initGui() {
super.initGui();
Keyboard.enableRepeatEvents(true);
this.buttonList.add(new GuiButton(0, 100, 100, 100, 20, "Save."));
for (int x = 1; x <= 5; x++) {
this.textFields[x - 1] = new GuiTextField(this.fontRendererObj, this.width / 2 - 52, this.height / 2 - 67 + (x * 20), 40, 12);
this.textFields[x - 1].setTextColor(-1);
this.textFields[x - 1].setDisabledTextColour(-1);
this.textFields[x - 1].setEnableBackgroundDrawing(true);
this.textFields[x - 1].setMaxStringLength(25);
if (this.TESC.getId(x) != "") {
this.textFields[x - 1].setText(this.TESC.getId(x));
// System.out.println(x - 1);
}
}
for (int x = 1; x <= 5; x++) {
this.textFields[(x + 5) - 1] = new GuiTextField(this.fontRendererObj, this.width / 2 + 20, this.height / 2 - 67 + (x * 20), 40, 12);
this.textFields[(x + 5) - 1].setTextColor(-1);
this.textFields[(x + 5) - 1].setDisabledTextColour(-1);
this.textFields[(x + 5) - 1].setEnableBackgroundDrawing(true);
this.textFields[(x + 5) - 1].setMaxStringLength(5);
if (this.TESC.getId((x + 5)) != "") {
this.textFields[(x + 5) - 1].setText(this.TESC.getId((x + 5)));
}
}
}
Aggregations