Search in sources :

Example 16 with GuiVerticalPowerBar

use of mekanism.client.gui.element.bar.GuiVerticalPowerBar in project Mekanism by mekanism.

the class GuiModificationStation method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 154, 40));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer()));
    addButton(new GuiProgress(tile::getScaledProgress, ProgressType.LARGE_RIGHT, this, 65, 123));
    removeButton = addButton(new TranslationButton(this, 34, 96, 108, 17, MekanismLang.BUTTON_REMOVE, () -> Mekanism.packetHandler.sendToServer(new PacketRemoveModule(tile.getBlockPos(), selectedModule.getData()))));
    removeButton.active = false;
    addButton(new GuiModuleScrollList(this, 34, 20, 108, 74, () -> tile.containerSlot.getStack().copy(), this::onModuleSelected));
}
Also used : TranslationButton(mekanism.client.gui.element.button.TranslationButton) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab) PacketRemoveModule(mekanism.common.network.to_server.PacketRemoveModule) GuiModuleScrollList(mekanism.client.gui.element.scroll.GuiModuleScrollList)

Example 17 with GuiVerticalPowerBar

use of mekanism.client.gui.element.bar.GuiVerticalPowerBar in project Mekanism by mekanism.

the class GuiCombiner method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiUpArrow(this, 68, 38));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));
    addButton(new GuiProgress(tile::getScaledProgress, ProgressType.BAR, this, 86, 38).jeiCategory(tile));
}
Also used : GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiUpArrow(mekanism.client.gui.element.GuiUpArrow) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 18 with GuiVerticalPowerBar

use of mekanism.client.gui.element.bar.GuiVerticalPowerBar in project Mekanism by mekanism.

the class GuiElectrolyticSeparator method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.STANDARD, this, 5, 10));
    addButton(new GuiGasGauge(() -> tile.leftTank, () -> tile.getGasTanks(null), GaugeType.SMALL, this, 58, 18));
    addButton(new GuiGasGauge(() -> tile.rightTank, () -> tile.getGasTanks(null), GaugeType.SMALL, this, 100, 18));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiProgress(tile::getActive, ProgressType.BI, this, 80, 30).jeiCategory(tile));
    addButton(new GuiGasMode(this, 7, 72, false, () -> tile.dumpLeft, tile.getBlockPos(), 0));
    addButton(new GuiGasMode(this, 159, 72, true, () -> tile.dumpRight, tile.getBlockPos(), 1));
}
Also used : GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiGasMode(mekanism.client.gui.element.button.GuiGasMode) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 19 with GuiVerticalPowerBar

use of mekanism.client.gui.element.bar.GuiVerticalPowerBar in project Mekanism by mekanism.

the class GuiFactory method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiSortingTab(this, tile));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), imageWidth - 12, 16, tile instanceof TileEntitySawingFactory ? 73 : 52));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getLastUsage));
    if (tile.hasSecondaryResourceBar()) {
        if (tile instanceof TileEntityMetallurgicInfuserFactory) {
            TileEntityMetallurgicInfuserFactory factory = (TileEntityMetallurgicInfuserFactory) this.tile;
            addButton(new GuiChemicalBar<>(this, GuiChemicalBar.getProvider(factory.getInfusionTank(), tile.getInfusionTanks(null)), 7, 76, tile.tier == FactoryTier.ULTIMATE ? 172 : 138, 4, true));
            addButton(new GuiDumpButton<>(this, factory, tile.tier == FactoryTier.ULTIMATE ? 182 : 148, 76));
        } else if (tile instanceof TileEntityItemStackGasToItemStackFactory) {
            TileEntityItemStackGasToItemStackFactory factory = (TileEntityItemStackGasToItemStackFactory) this.tile;
            addButton(new GuiChemicalBar<>(this, GuiChemicalBar.getProvider(factory.getGasTank(), tile.getGasTanks(null)), 7, 76, tile.tier == FactoryTier.ULTIMATE ? 172 : 138, 4, true));
            addButton(new GuiDumpButton<>(this, factory, tile.tier == FactoryTier.ULTIMATE ? 182 : 148, 76));
        }
    }
    int baseX = tile.tier == FactoryTier.BASIC ? 55 : tile.tier == FactoryTier.ADVANCED ? 35 : tile.tier == FactoryTier.ELITE ? 29 : 27;
    int baseXMult = tile.tier == FactoryTier.BASIC ? 38 : tile.tier == FactoryTier.ADVANCED ? 26 : 19;
    for (int i = 0; i < tile.tier.processes; i++) {
        int cacheIndex = i;
        addProgress(new GuiProgress(() -> tile.getScaledProgress(1, cacheIndex), ProgressType.DOWN, this, 4 + baseX + (i * baseXMult), 33));
    }
}
Also used : TileEntityMetallurgicInfuserFactory(mekanism.common.tile.factory.TileEntityMetallurgicInfuserFactory) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) TileEntitySawingFactory(mekanism.common.tile.factory.TileEntitySawingFactory) GuiSortingTab(mekanism.client.gui.element.tab.GuiSortingTab) TileEntityItemStackGasToItemStackFactory(mekanism.common.tile.factory.TileEntityItemStackGasToItemStackFactory) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab) GuiChemicalBar(mekanism.client.gui.element.bar.GuiChemicalBar) GuiDumpButton(mekanism.client.gui.element.GuiDumpButton)

Example 20 with GuiVerticalPowerBar

use of mekanism.client.gui.element.bar.GuiVerticalPowerBar in project Mekanism by mekanism.

the class GuiFluidicPlenisher method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiInnerScreen(this, 54, 23, 80, 41, () -> {
        List<ITextComponent> list = new ArrayList<>();
        list.add(EnergyDisplay.of(tile.getEnergyContainer()).getTextComponent());
        list.add(MekanismLang.FINISHED.translate(YesNo.of(tile.finishedCalc)));
        FluidStack fluid = tile.fluidTank.getFluid();
        if (fluid.isEmpty()) {
            list.add(MekanismLang.NO_FLUID.translate());
        } else {
            list.add(MekanismLang.GENERIC_STORED_MB.translate(fluid, TextUtils.format(fluid.getAmount())));
        }
        return list;
    }));
    addButton(new GuiDownArrow(this, 32, 39));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.STANDARD, this, 6, 13));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer()));
}
Also used : GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiDownArrow(mekanism.client.gui.element.GuiDownArrow) FluidStack(net.minecraftforge.fluids.FluidStack) ArrayList(java.util.ArrayList) List(java.util.List) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Aggregations

GuiVerticalPowerBar (mekanism.client.gui.element.bar.GuiVerticalPowerBar)25 GuiEnergyTab (mekanism.client.gui.element.tab.GuiEnergyTab)23 GuiProgress (mekanism.client.gui.element.progress.GuiProgress)12 GuiInnerScreen (mekanism.client.gui.element.GuiInnerScreen)10 ArrayList (java.util.ArrayList)5 List (java.util.List)5 GuiFluidGauge (mekanism.client.gui.element.gauge.GuiFluidGauge)5 GuiGasGauge (mekanism.client.gui.element.gauge.GuiGasGauge)4 GuiSlot (mekanism.client.gui.element.slot.GuiSlot)4 GuiUpArrow (mekanism.client.gui.element.GuiUpArrow)3 TranslationButton (mekanism.client.gui.element.button.TranslationButton)3 ILangEntry (mekanism.api.text.ILangEntry)2 GuiDownArrow (mekanism.client.gui.element.GuiDownArrow)2 IBarInfoHandler (mekanism.client.gui.element.bar.GuiBar.IBarInfoHandler)2 GuiGasMode (mekanism.client.gui.element.button.GuiGasMode)2 GuiTeleporterStatus (mekanism.client.gui.element.custom.GuiTeleporterStatus)2 GuiHeatTab (mekanism.client.gui.element.tab.GuiHeatTab)2 PacketGuiInteract (mekanism.common.network.to_server.PacketGuiInteract)2 GuiStateTexture (mekanism.generators.client.gui.element.GuiStateTexture)2 ITextComponent (net.minecraft.util.text.ITextComponent)2