Search in sources :

Example 6 with GuiAnimatedStat

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

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

the class GuiGasLift method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTank(-1, guiLeft + 80, guiTop + 15, te.getTank()));
    statusStat = addAnimatedStat("gui.tab.status", new ItemStack(Blockss.GAS_LIFT), 0xFFFFAA00, false);
    GuiAnimatedStat optionStat = addAnimatedStat("gui.tab.gasLift.mode", new ItemStack(Blockss.PRESSURE_TUBE), 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.BUCKET));
    button.setTooltipText(I18n.format("gui.tab.gasLift.mode.pumpEmpty"));
    optionStat.addWidget(button);
    modeButtons[0] = button;
    button = new GuiButtonSpecial(2, 30, 20, 20, 20, "");
    button.setRenderStacks(new ItemStack(Items.WATER_BUCKET));
    button.setTooltipText(I18n.format("gui.tab.gasLift.mode.pumpLeave"));
    optionStat.addWidget(button);
    modeButtons[1] = button;
    button = new GuiButtonSpecial(3, 55, 20, 20, 20, "");
    button.setRenderStacks(new ItemStack(Blockss.PRESSURE_TUBE));
    button.setTooltipText(I18n.format("gui.tab.gasLift.mode.drawIn"));
    optionStat.addWidget(button);
    modeButtons[2] = button;
}
Also used : ArrayList(java.util.ArrayList) WidgetTank(me.desht.pneumaticcraft.client.gui.widget.WidgetTank) ItemStack(net.minecraft.item.ItemStack) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)

Example 8 with GuiAnimatedStat

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

the class GuiLiquidHopper method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTank(0, guiLeft + 116, guiTop + 15, te.getTank()));
    statusStat = addAnimatedStat("gui.tab.hopperStatus", new ItemStack(Blockss.LIQUID_HOPPER), 0xFFFFAA00, false);
    GuiAnimatedStat optionStat = addAnimatedStat("gui.tab.gasLift.mode", new ItemStack(Blocks.LEVER), 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.BUCKET));
    button.setTooltipText(I18n.format("gui.tab.liquidHopper.mode.empty"));
    optionStat.addWidget(button);
    modeButtons[0] = button;
    button = new GuiButtonSpecial(2, 30, 20, 20, 20, "");
    button.setRenderStacks(new ItemStack(Items.WATER_BUCKET));
    button.setTooltipText(I18n.format("gui.tab.liquidHopper.mode.leaveLiquid"));
    optionStat.addWidget(button);
    modeButtons[1] = button;
}
Also used : ArrayList(java.util.ArrayList) WidgetTank(me.desht.pneumaticcraft.client.gui.widget.WidgetTank) ItemStack(net.minecraft.item.ItemStack) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)

Example 9 with GuiAnimatedStat

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

the class GuiLogisticsRequester method initGui.

@Override
public void initGui() {
    super.initGui();
    addAnimatedStat("gui.tab.info.ghostSlotInteraction.title", new ItemStack(Blocks.HOPPER), 0xFF00AAFF, true).setText("gui.tab.info.ghostSlotInteraction");
    if (Loader.isModLoaded(ModIds.AE2)) {
        if (logistics.isPlacedOnInterface()) {
            Item item = AEApi.instance().definitions().parts().cableGlass().item(AEColor.TRANSPARENT);
            if (item == null) {
                Log.warning("AE2 cable couldn't be found!");
                item = Itemss.LOGISTICS_FRAME_REQUESTER;
            }
            GuiAnimatedStat stat = addAnimatedStat("gui.tab.info.logisticsRequester.aeIntegration.title", new ItemStack(item, 1, 16), 0xFF00AAFF, false);
            List<String> text = new ArrayList<String>();
            for (int i = 0; i < 2; i++) text.add("");
            text.add("gui.tab.info.logisticsRequester.aeIntegration");
            stat.setText(text);
            stat.addWidget(aeIntegration = new GuiCheckBox(1, 16, 13, 0xFF000000, "gui.tab.info.logisticsRequester.aeIntegration.enable"));
        }
    }
}
Also used : Item(net.minecraft.item.Item) ArrayList(java.util.ArrayList) GuiCheckBox(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox) ItemStack(net.minecraft.item.ItemStack) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)

Example 10 with GuiAnimatedStat

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

the class EntityTrackUpgradeHandler method getAnimatedStat.

@Override
@SideOnly(Side.CLIENT)
public GuiAnimatedStat getAnimatedStat() {
    if (entityTrackInfo == null) {
        Minecraft minecraft = Minecraft.getMinecraft();
        ScaledResolution sr = new ScaledResolution(minecraft);
        entityTrackInfo = new GuiAnimatedStat(null, "Current tracked entities:", CraftingRegistrator.getUpgrade(EnumUpgrade.ENTITY_TRACKER), statX != -1 ? statX : sr.getScaledWidth() - 2, statY, 0x3000AA00, null, statLeftSided);
        entityTrackInfo.setMinDimensionsAndReset(0, 0);
    }
    return entityTrackInfo;
}
Also used : ScaledResolution(net.minecraft.client.gui.ScaledResolution) GuiAnimatedStat(me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat) Minecraft(net.minecraft.client.Minecraft) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

GuiAnimatedStat (me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)12 ArrayList (java.util.ArrayList)6 ItemStack (net.minecraft.item.ItemStack)6 Minecraft (net.minecraft.client.Minecraft)4 ScaledResolution (net.minecraft.client.gui.ScaledResolution)4 GuiCheckBox (me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)3 WidgetTank (me.desht.pneumaticcraft.client.gui.widget.WidgetTank)3 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)3 IGuiAnimatedStat (me.desht.pneumaticcraft.api.client.IGuiAnimatedStat)1 WidgetEnergy (me.desht.pneumaticcraft.client.gui.widget.WidgetEnergy)1 WidgetTemperature (me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature)1 WidgetTooltipArea (me.desht.pneumaticcraft.client.gui.widget.WidgetTooltipArea)1 GuiTextField (net.minecraft.client.gui.GuiTextField)1 Item (net.minecraft.item.Item)1 IEnergyStorage (net.minecraftforge.energy.IEnergyStorage)1