Search in sources :

Example 6 with GuiElementInfoRegionMP

use of stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP 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);
}
Also used : GuiElementInfoRegionMP(stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP) GuiButton(net.minecraft.client.gui.GuiButton) ArrayList(java.util.ArrayList) GuiTextField(net.minecraft.client.gui.GuiTextField)

Example 7 with GuiElementInfoRegionMP

use of stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP in project MorePlanets by SteveKunG.

the class GuiNuclearWasteGenerator method initGui.

@Override
public void initGui() {
    super.initGui();
    List<String> electricityDesc = new ArrayList<>();
    electricityDesc.add(GCCoreUtil.translate("gui.energy_storage.desc.0"));
    electricityDesc.add(EnumColor.YELLOW + GCCoreUtil.translate("gui.energy_storage.desc.1") + ((int) Math.floor(this.tile.getEnergyStoredGC()) + " / " + (int) Math.floor(this.tile.getMaxEnergyStoredGC())));
    this.electricInfoRegion = new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 46, (this.height - this.ySize) / 2 + 24, 56, 9, new ArrayList<>(), this.width, this.height, this);
    this.infoRegions.add(this.electricInfoRegion);
    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((this.width - this.xSize) / 2 + 121, (this.height - this.ySize) / 2 + 19, 18, 18, batterySlotDesc, this.width, this.height, this));
    this.infoRegions.add(new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 155, (this.height - this.ySize) / 2 + 87, 13, 13, Arrays.asList(GCCoreUtil.translate("gui.multiblock_guide.desc")), this.width, this.height, this));
    this.buttonList.add(this.buttonEnable = new GuiButton(0, this.width / 2 - 36, this.height / 2 - 19, 72, 20, !this.tile.getDisabled(0) ? GCCoreUtil.translate("gui.button.disable.name") : GCCoreUtil.translate("gui.button.enable.name")));
    this.buttonEnable.enabled = this.tile.disableCooldown == 0;
    int width = (this.width - this.xSize) / 2;
    int height = (this.height - this.ySize) / 2;
    this.checkboxRender = new GuiElementCheckbox(1, this, width + 155, height + 87, "");
    this.buttonList.add(this.checkboxRender);
}
Also used : GuiElementCheckbox(micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementCheckbox) GuiElementInfoRegionMP(stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP) GuiButton(net.minecraft.client.gui.GuiButton) ArrayList(java.util.ArrayList)

Example 8 with GuiElementInfoRegionMP

use of stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP in project MorePlanets by SteveKunG.

the class GuiDarkEnergyReceiver 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.infoRegions.add(new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 31, (this.height - this.ySize) / 2 + 26, 18, 18, batterySlotDesc, this.width, this.height, this));
    if (!this.tile.successful && !this.tile.activated) {
        this.infoRegions.add(new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 155, (this.height - this.ySize) / 2 + 87, 13, 13, Arrays.asList(GCCoreUtil.translate("gui.multiblock_guide.desc")), this.width, this.height, this));
    }
    this.electricInfoRegion = new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 107, (this.height - this.ySize) / 2 + 31, 56, 9, new ArrayList<>(), this.width, this.height, this);
    this.infoRegions.add(this.electricInfoRegion);
    this.buttonList.add(this.buttonEnable = new GuiButton(0, this.width / 2 - 36, this.height / 2 - 19, 72, 20, !this.tile.getDisabled(0) ? GCCoreUtil.translate("gui.button.disable.name") : GCCoreUtil.translate("gui.button.enable.name")));
    this.buttonEnable.enabled = this.tile.disableCooldown == 0 && !this.tile.successful;
    int width = (this.width - this.xSize) / 2;
    int height = (this.height - this.ySize) / 2;
    this.checkboxRender = new GuiElementCheckbox(1, this, width + 155, height + 87, "");
    this.checkboxRender.visible = !this.tile.successful && !this.tile.activated;
    this.buttonList.add(this.checkboxRender);
}
Also used : GuiElementCheckbox(micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementCheckbox) GuiElementInfoRegionMP(stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP) GuiButton(net.minecraft.client.gui.GuiButton) ArrayList(java.util.ArrayList)

Example 9 with GuiElementInfoRegionMP

use of stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP in project MorePlanets by SteveKunG.

the class GuiBlackHoleStorage method initGui.

@Override
public void initGui() {
    super.initGui();
    int width = (this.width - this.xSize) / 2;
    int height = (this.height - this.ySize) / 2;
    List<String> renderDesc = new ArrayList<>();
    renderDesc.add(GCCoreUtil.translate("gui.disable_black_hole.desc"));
    this.infoRegions.add(new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 178, (this.height - this.ySize) / 2 + 192, 13, 13, renderDesc, this.width, this.height, this));
    renderDesc = new ArrayList<>();
    renderDesc.add(GCCoreUtil.translate("gui.use_hopper.desc"));
    this.infoRegions.add(new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 198, (this.height - this.ySize) / 2 + 192, 13, 13, renderDesc, this.width, this.height, this));
    renderDesc = new ArrayList<>();
    renderDesc.add(GCCoreUtil.translate("gui.collect_mode.desc"));
    this.infoRegions.add(new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 218, (this.height - this.ySize) / 2 + 192, 13, 13, renderDesc, this.width, this.height, this));
    this.infoRegions.add(this.xpValueInfo = new GuiElementInfoRegionMP((this.width - this.xSize) / 2 + 238, (this.height - this.ySize) / 2 + 170, 5, 37, null, this.width, this.height, this));
    this.disableBlackHoleCheckbox = new GuiElementCheckbox(0, this, width + 178, height + 192, "");
    this.useHopperCheckbox = new GuiElementCheckbox(1, this, width + 198, height + 192, "");
    this.collectModeCheckbox = new GuiElementCheckboxMP(2, this, width + 218, height + 192, "");
    this.buttonList.add(this.disableBlackHoleCheckbox);
    this.buttonList.add(this.useHopperCheckbox);
    this.buttonList.add(this.collectModeCheckbox);
}
Also used : GuiElementCheckbox(micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementCheckbox) GuiElementCheckboxMP(stevekung.mods.moreplanets.util.client.gui.GuiElementCheckboxMP) GuiElementInfoRegionMP(stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)9 GuiElementInfoRegionMP (stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP)9 GuiButton (net.minecraft.client.gui.GuiButton)7 GuiElementCheckbox (micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementCheckbox)4 GuiTextField (net.minecraft.client.gui.GuiTextField)1 PacketSimpleMP (stevekung.mods.moreplanets.network.PacketSimpleMP)1 GuiElementCheckboxMP (stevekung.mods.moreplanets.util.client.gui.GuiElementCheckboxMP)1 GuiNumberField (stevekung.mods.moreplanets.util.client.gui.GuiNumberField)1