Search in sources :

Example 1 with WidgetEnergy

use of me.desht.pneumaticcraft.client.gui.widget.WidgetEnergy 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 2 with WidgetEnergy

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

the class GuiAerialInterface method initGui.

@Override
public void initGui() {
    super.initGui();
    if (PneumaticCraftAPIHandler.getInstance().liquidXPs.size() > 0) {
        GuiAnimatedStat xpStat = addAnimatedStat("gui.tab.info.aerialInterface.liquidXp.info.title", new ItemStack(Items.EXPERIENCE_BOTTLE), 0xFF55FF55, false);
        xpStat.setText(getLiquidXPText());
        xpButton = new GuiButtonSpecial(4, 20, 15, 20, 20, "");
        xpButton.setListener(this);
        setupXPButton();
        xpStat.addWidget(xpButton);
    }
    addAnimatedStat("gui.tab.info.aerialInterface.interfacingRF.info.title", Textures.GUI_BUILDCRAFT_ENERGY, 0xFFc02222, false).setText("gui.tab.info.aerialInterface.interfacingRF.info");
    if (te.hasCapability(CapabilityEnergy.ENERGY, null)) {
        IEnergyStorage storage = te.getCapability(CapabilityEnergy.ENERGY, null);
        addWidget(new WidgetEnergy(guiLeft + 20, guiTop + 20, storage));
    }
    if (te.getUpgrades(EnumUpgrade.DISPENSER) > 0) {
        GuiAnimatedStat optionStat = addAnimatedStat("gui.tab.aerialInterface.feedMode", new ItemStack(Items.BEEF), 0xFFFFCC00, false);
        List<String> text = new ArrayList<String>();
        for (int i = 0; i < 4; i++) text.add("                 ");
        optionStat.setTextWithoutCuttingString(text);
        GuiButtonSpecial button = new GuiButtonSpecial(1, 5, 20, 20, 20, "");
        button.setRenderStacks(new ItemStack(Items.BEEF));
        button.setTooltipText(I18n.format("gui.tab.aerialInterface.feedMode.feedFullyUtilize"));
        optionStat.addWidget(button);
        modeButtons[0] = button;
        button = new GuiButtonSpecial(2, 30, 20, 20, 20, "");
        button.setRenderStacks(new ItemStack(Items.APPLE));
        button.setTooltipText(I18n.format("gui.tab.aerialInterface.feedMode.feedWhenPossible"));
        optionStat.addWidget(button);
        modeButtons[1] = button;
        button = new GuiButtonSpecial(3, 55, 20, 20, 20, "");
        button.setRenderStacks(new ItemStack(Items.GOLDEN_APPLE));
        button.setTooltipText(Arrays.asList(WordUtils.wrap(I18n.format("gui.tab.aerialInterface.feedMode.utilizeFullHealthElsePossible"), 40).split(System.getProperty("line.separator"))));
        optionStat.addWidget(button);
        modeButtons[2] = button;
    } else {
        for (int i = 0; i < modeButtons.length; i++) modeButtons[i] = null;
    }
}
Also used : WidgetEnergy(me.desht.pneumaticcraft.client.gui.widget.WidgetEnergy) IEnergyStorage(net.minecraftforge.energy.IEnergyStorage) ArrayList(java.util.ArrayList) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat) ItemStack(net.minecraft.item.ItemStack)

Example 3 with WidgetEnergy

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

the class GuiFluxCompressor method initGui.

@Override
public void initGui() {
    super.initGui();
    inputStat = addAnimatedStat("Input", 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)

Aggregations

WidgetEnergy (me.desht.pneumaticcraft.client.gui.widget.WidgetEnergy)3 IEnergyStorage (net.minecraftforge.energy.IEnergyStorage)3 WidgetTemperature (me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature)2 ArrayList (java.util.ArrayList)1 GuiAnimatedStat (me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)1 ItemStack (net.minecraft.item.ItemStack)1