use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementInfoRegion in project Galacticraft by micdoodle8.
the class GuiGeothermal method initGui.
@Override
public void initGui() {
super.initGui();
List<String> electricityDesc = new ArrayList<String>();
electricityDesc.add(GCCoreUtil.translate("gui.energy_storage.desc.0"));
electricityDesc.add(EnumColor.YELLOW + GCCoreUtil.translate("gui.energy_storage.desc.1") + ((int) Math.floor(this.geothermalGenerator.getEnergyStoredGC()) + " / " + (int) Math.floor(this.geothermalGenerator.getMaxEnergyStoredGC())));
this.electricInfoRegion.tooltipStrings = electricityDesc;
this.electricInfoRegion.xPosition = (this.width - this.xSize) / 2 + 96;
this.electricInfoRegion.yPosition = (this.height - this.ySize) / 2 + 24;
this.electricInfoRegion.parentWidth = this.width;
this.electricInfoRegion.parentHeight = this.height;
this.infoRegions.add(this.electricInfoRegion);
List<String> batterySlotDesc = new ArrayList<String>();
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.0"));
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.1"));
this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 151, (this.height - this.ySize) / 2 + 82, 18, 18, batterySlotDesc, this.width, this.height, this));
// List<String> sunGenDesc = new ArrayList<String>();
// float sunVisible = Math.round(this.geothermalGenerator.solarStrength / 9.0F * 1000) / 10.0F;
// sunGenDesc.add(this.geothermalGenerator.solarStrength > 0 ? GCCoreUtil.translate("gui.status.sun_visible.name") + ": " + sunVisible + "%" : GCCoreUtil.translate("gui.status.blockedfully.name"));
// this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 47, (this.height - this.ySize) / 2 + 20, 18, 18, sunGenDesc, this.width, this.height, this));
this.buttonList.add(this.buttonEnableSolar = new GuiButton(0, this.width / 2 - 36, this.height / 2 - 19, 72, 20, GCCoreUtil.translate("gui.button.enable.name")));
}
use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementInfoRegion in project Galacticraft by micdoodle8.
the class GuiOxygenDecompressor method initGui.
@Override
public void initGui() {
super.initGui();
List<String> batterySlotDesc = new ArrayList<String>();
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.0"));
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.1"));
this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 31, (this.height - this.ySize) / 2 + 26, 18, 18, batterySlotDesc, this.width, this.height, this));
List<String> compressorSlotDesc = new ArrayList<String>();
compressorSlotDesc.add(GCCoreUtil.translate("gui.oxygen_decompressor.slot.desc.0"));
compressorSlotDesc.add(GCCoreUtil.translate("gui.oxygen_decompressor.slot.desc.1"));
this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 132, (this.height - this.ySize) / 2 + 70, 18, 18, compressorSlotDesc, this.width, this.height, this));
List<String> oxygenDesc = new ArrayList<String>();
oxygenDesc.add(GCCoreUtil.translate("gui.oxygen_storage.desc.0"));
oxygenDesc.add(EnumColor.YELLOW + GCCoreUtil.translate("gui.oxygen_storage.desc.1") + ": " + ((int) Math.floor(this.decompressor.getOxygenStored()) + " / " + (int) Math.floor(this.decompressor.getMaxOxygenStored())));
this.oxygenInfoRegion.tooltipStrings = oxygenDesc;
this.oxygenInfoRegion.xPosition = (this.width - this.xSize) / 2 + 112;
this.oxygenInfoRegion.yPosition = (this.height - this.ySize) / 2 + 24;
this.oxygenInfoRegion.parentWidth = this.width;
this.oxygenInfoRegion.parentHeight = this.height;
this.infoRegions.add(this.oxygenInfoRegion);
List<String> electricityDesc = new ArrayList<String>();
electricityDesc.add(GCCoreUtil.translate("gui.energy_storage.desc.0"));
electricityDesc.add(EnumColor.YELLOW + GCCoreUtil.translate("gui.energy_storage.desc.1") + ((int) Math.floor(this.decompressor.getEnergyStoredGC()) + " / " + (int) Math.floor(this.decompressor.getMaxEnergyStoredGC())));
this.electricInfoRegion.tooltipStrings = electricityDesc;
this.electricInfoRegion.xPosition = (this.width - this.xSize) / 2 + 112;
this.electricInfoRegion.yPosition = (this.height - this.ySize) / 2 + 37;
this.electricInfoRegion.parentWidth = this.width;
this.electricInfoRegion.parentHeight = this.height;
this.infoRegions.add(this.electricInfoRegion);
}
use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementInfoRegion in project Galacticraft by micdoodle8.
the class GuiOxygenDistributor method initGui.
@Override
public void initGui() {
super.initGui();
final int var5 = (this.width - this.xSize) / 2;
final int var6 = (this.height - this.ySize) / 2;
List<String> batterySlotDesc = new ArrayList<String>();
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.0"));
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.1"));
this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 46, (this.height - this.ySize) / 2 + 26, 18, 18, batterySlotDesc, this.width, this.height, this));
List<String> oxygenSlotDesc = new ArrayList<String>();
oxygenSlotDesc.add(GCCoreUtil.translate("gui.oxygen_slot.desc.0"));
oxygenSlotDesc.add(GCCoreUtil.translate("gui.oxygen_slot.desc.1"));
this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 16, (this.height - this.ySize) / 2 + 26, 18, 18, oxygenSlotDesc, this.width, this.height, this));
List<String> oxygenDesc = new ArrayList<String>();
oxygenDesc.add(GCCoreUtil.translate("gui.oxygen_storage.desc.0"));
oxygenDesc.add(EnumColor.YELLOW + GCCoreUtil.translate("gui.oxygen_storage.desc.1") + ": " + ((int) Math.floor(this.distributor.getOxygenStored()) + " / " + (int) Math.floor(this.distributor.getMaxOxygenStored())));
this.oxygenInfoRegion.tooltipStrings = oxygenDesc;
this.oxygenInfoRegion.xPosition = (this.width - this.xSize) / 2 + 112;
this.oxygenInfoRegion.yPosition = (this.height - this.ySize) / 2 + 24;
this.oxygenInfoRegion.parentWidth = this.width;
this.oxygenInfoRegion.parentHeight = this.height;
this.infoRegions.add(this.oxygenInfoRegion);
List<String> electricityDesc = new ArrayList<String>();
electricityDesc.add(GCCoreUtil.translate("gui.energy_storage.desc.0"));
electricityDesc.add(EnumColor.YELLOW + GCCoreUtil.translate("gui.energy_storage.desc.1") + ((int) Math.floor(this.distributor.getEnergyStoredGC()) + " / " + (int) Math.floor(this.distributor.getMaxEnergyStoredGC())));
this.electricInfoRegion.tooltipStrings = electricityDesc;
this.electricInfoRegion.xPosition = (this.width - this.xSize) / 2 + 112;
this.electricInfoRegion.yPosition = (this.height - this.ySize) / 2 + 37;
this.electricInfoRegion.parentWidth = this.width;
this.electricInfoRegion.parentHeight = this.height;
this.infoRegions.add(this.electricInfoRegion);
this.checkboxRenderBubble = new GuiElementCheckbox(0, this, var5 + 85, var6 + 87, GCCoreUtil.translate("gui.message.bubble_visible.name"));
this.buttonList.add(this.checkboxRenderBubble);
}
use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementInfoRegion in project Galacticraft by micdoodle8.
the class GuiCircuitFabricator method initGui.
@Override
public void initGui() {
super.initGui();
this.electricInfoRegion.tooltipStrings = new ArrayList<String>();
this.electricInfoRegion.xPosition = (this.width - this.xSize) / 2 + 17;
this.electricInfoRegion.yPosition = (this.height - this.ySize) / 2 + 88;
this.electricInfoRegion.parentWidth = this.width;
this.electricInfoRegion.parentHeight = this.height;
this.infoRegions.add(this.electricInfoRegion);
List<String> batterySlotDesc = new ArrayList<String>();
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.0"));
batterySlotDesc.add(GCCoreUtil.translate("gui.battery_slot.desc.1"));
this.infoRegions.add(new GuiElementInfoRegion((this.width - this.xSize) / 2 + 5, (this.height - this.ySize) / 2 + 68, 18, 18, batterySlotDesc, this.width, this.height, this));
this.processInfoRegion.tooltipStrings = new ArrayList<String>();
this.processInfoRegion.xPosition = (this.width - this.xSize) / 2 + 87;
this.processInfoRegion.yPosition = (this.height - this.ySize) / 2 + 19;
this.processInfoRegion.parentWidth = this.width;
this.processInfoRegion.parentHeight = this.height;
this.infoRegions.add(this.processInfoRegion);
}
use of micdoodle8.mods.galacticraft.core.client.gui.element.GuiElementInfoRegion in project Galacticraft by micdoodle8.
the class GuiContainerGC method drawScreen.
@Override
public void drawScreen(int par1, int par2, float par3) {
super.drawScreen(par1, par2, par3);
for (int k = 0; k < this.infoRegions.size(); ++k) {
GuiElementInfoRegion guibutton = this.infoRegions.get(k);
guibutton.drawRegion(par1, par2);
}
}
Aggregations