Search in sources :

Example 1 with WidgetTemperature

use of me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature in project pnc-repressurized by TeamPneumatic.

the class GuiRefinery method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTemperature(-1, guiLeft + 32, guiTop + 20, 273, 673, te.getHeatExchangerLogic(null), 373));
    addWidget(new WidgetTank(-1, guiLeft + 8, guiTop + 13, te.getInputTank()));
    int x = guiLeft + 95;
    int y = guiTop + 17;
    addWidget(new WidgetTank(-1, x, y, te.getOutputTank()));
    refineries = new ArrayList<>();
    refineries.add(te);
    TileEntityRefinery refinery = te;
    while (refinery.getTileCache()[EnumFacing.UP.ordinal()].getTileEntity() instanceof TileEntityRefinery) {
        refinery = (TileEntityRefinery) refinery.getTileCache()[EnumFacing.UP.ordinal()].getTileEntity();
        x += 20;
        y -= 4;
        if (refineries.size() < 4)
            addWidget(new WidgetTank(-1, x, y, refinery.getOutputTank()));
        refineries.add(refinery);
    }
    if (refineries.size() < 2 || refineries.size() > 4) {
        problemTab.openWindow();
    }
}
Also used : TileEntityRefinery(me.desht.pneumaticcraft.common.tileentity.TileEntityRefinery) WidgetTemperature(me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature) WidgetTank(me.desht.pneumaticcraft.client.gui.widget.WidgetTank)

Example 2 with WidgetTemperature

use of me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature in project pnc-repressurized by TeamPneumatic.

the class GuiThermopneumaticProcessingPlant method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTank(-1, guiLeft + 13, guiTop + 15, te.getInputTank()));
    addWidget(new WidgetTank(-1, guiLeft + 79, guiTop + 15, te.getOutputTank()));
    addWidget(tempWidget = new WidgetTemperature(-1, guiLeft + 98, guiTop + 15, 273, 673, te.getHeatExchangerLogic(null), (int) te.requiredTemperature));
    GuiButtonSpecial dumpButton = new GuiButtonSpecial(1, guiLeft + 12, guiTop + 81, 18, 18, "");
    dumpButton.setRenderedIcon(Textures.GUI_X_BUTTON);
    dumpButton.setTooltipText(PneumaticCraftUtils.convertStringIntoList(I18n.format("gui.thermopneumatic.dumpInput")));
    addWidget(dumpButton);
}
Also used : WidgetTemperature(me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature) WidgetTank(me.desht.pneumaticcraft.client.gui.widget.WidgetTank)

Example 3 with WidgetTemperature

use of me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature in project pnc-repressurized by TeamPneumatic.

the class GuiPneumaticDynamo method initGui.

@Override
public void initGui() {
    super.initGui();
    inputStat = addAnimatedStat("Output", Textures.GUI_BUILDCRAFT_ENERGY, 0xFF555555, false);
    IEnergyStorage storage = te.getCapability(CapabilityEnergy.ENERGY, null);
    addWidget(new WidgetEnergy(guiLeft + 20, guiTop + 20, storage));
    addWidget(new WidgetTemperature(0, guiLeft + 87, guiTop + 20, 273, 675, te.getHeatExchangerLogic(null), 325, 625));
}
Also used : WidgetEnergy(me.desht.pneumaticcraft.client.gui.widget.WidgetEnergy) WidgetTemperature(me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature) IEnergyStorage(net.minecraftforge.energy.IEnergyStorage)

Example 4 with WidgetTemperature

use of me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature in project pnc-repressurized by TeamPneumatic.

the class GuiPlasticMixer method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTemperature(0, guiLeft + 55, guiTop + 25, 295, 500, te.getLogic(0)));
    addWidget(new WidgetTemperature(1, guiLeft + 82, guiTop + 25, 295, 500, te.getLogic(1), PneumaticValues.PLASTIC_MIXER_MELTING_TEMP));
    addWidget(new WidgetTank(3, guiLeft + 152, guiTop + 14, te.getTank()));
    GuiAnimatedStat stat = addAnimatedStat("gui.tab.plasticMixer.plasticSelection", new ItemStack(Itemss.PLASTIC, 1, 1), 0xFF005500, false);
    List<String> text = new ArrayList<>();
    for (int i = 0; i < 12; i++) {
        text.add("                      ");
    }
    stat.setTextWithoutCuttingString(text);
    buttons = new GuiButtonSpecial[16];
    for (int x = 0; x < 4; x++) {
        for (int y = 0; y < 4; y++) {
            int index = y * 4 + x;
            ItemStack plastic = new ItemStack(Itemss.PLASTIC, 1, index);
            buttons[index] = new GuiButtonSpecial(index + 1, x * 21 + 4, y * 21 + 30, 20, 20, "").setRenderStacks(plastic).setTooltipText(plastic.getDisplayName());
            stat.addWidget(buttons[index]);
        }
    }
    stat.addWidget(lockSelection = new GuiCheckBox(17, 4, 18, 0xFF000000, "gui.plasticMixer.lockSelection").setChecked(te.lockSelection).setTooltip(I18n.format("gui.plasticMixer.lockSelection.tooltip")));
}
Also used : WidgetTemperature(me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature) ArrayList(java.util.ArrayList) GuiCheckBox(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox) WidgetTank(me.desht.pneumaticcraft.client.gui.widget.WidgetTank) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat) ItemStack(net.minecraft.item.ItemStack)

Example 5 with WidgetTemperature

use of me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature in project pnc-repressurized by TeamPneumatic.

the class GuiAdvancedLiquidCompressor method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTemperature(0, guiLeft + 92, guiTop + 20, 273, 675, ((IHeatExchanger) te).getHeatExchangerLogic(null), 325, 625));
}
Also used : IHeatExchanger(me.desht.pneumaticcraft.api.tileentity.IHeatExchanger) WidgetTemperature(me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature)

Aggregations

WidgetTemperature (me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature)9 IHeatExchanger (me.desht.pneumaticcraft.api.tileentity.IHeatExchanger)3 WidgetTank (me.desht.pneumaticcraft.client.gui.widget.WidgetTank)3 WidgetEnergy (me.desht.pneumaticcraft.client.gui.widget.WidgetEnergy)2 IEnergyStorage (net.minecraftforge.energy.IEnergyStorage)2 ArrayList (java.util.ArrayList)1 GuiAnimatedStat (me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)1 GuiCheckBox (me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)1 TileEntityRefinery (me.desht.pneumaticcraft.common.tileentity.TileEntityRefinery)1 ItemStack (net.minecraft.item.ItemStack)1