Search in sources :

Example 1 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiPigmentMixer method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiPigmentGauge(() -> tile.leftInputTank, () -> tile.getPigmentTanks(null), GaugeType.STANDARD, this, 25, 13));
    addButton(new GuiPigmentGauge(() -> tile.outputTank, () -> tile.getPigmentTanks(null), GaugeType.STANDARD, this, 79, 4));
    addButton(new GuiPigmentGauge(() -> tile.rightInputTank, () -> tile.getPigmentTanks(null), GaugeType.STANDARD, this, 133, 13));
    addButton(new GuiProgress(tile::getActive, ProgressType.SMALL_RIGHT, this, 47, 39).jeiCategory(tile).colored(new LeftColorDetails()));
    addButton(new GuiProgress(tile::getActive, ProgressType.SMALL_LEFT, this, 101, 39).jeiCategory(tile).colored(new RightColorDetails()));
}
Also used : GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiPigmentGauge(mekanism.client.gui.element.gauge.GuiPigmentGauge) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 2 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiRotaryCondensentrator method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiDownArrow(this, 159, 44));
    addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.STANDARD, this, 133, 13));
    addButton(new GuiGasGauge(() -> tile.gasTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 25, 13));
    addButton(new GuiProgress(new IBooleanProgressInfoHandler() {

        @Override
        public boolean fillProgressBar() {
            return tile.getActive();
        }

        @Override
        public boolean isActive() {
            return !tile.mode;
        }
    }, ProgressType.LARGE_RIGHT, this, 64, 39).jeiCategories(condensentrating));
    addButton(new GuiProgress(new IBooleanProgressInfoHandler() {

        @Override
        public boolean fillProgressBar() {
            return tile.getActive();
        }

        @Override
        public boolean isActive() {
            return tile.mode;
        }
    }, ProgressType.LARGE_LEFT, this, 64, 39).jeiCategories(decondensentrating));
    addButton(new ToggleButton(this, 4, 4, () -> tile.mode, () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.NEXT_MODE, tile)), getOnHover(MekanismLang.CONDENSENTRATOR_TOGGLE)));
}
Also used : GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiDownArrow(mekanism.client.gui.element.GuiDownArrow) ToggleButton(mekanism.client.gui.element.button.ToggleButton) GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) PacketGuiInteract(mekanism.common.network.to_server.PacketGuiInteract) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab) IBooleanProgressInfoHandler(mekanism.client.gui.element.progress.IProgressInfoHandler.IBooleanProgressInfoHandler)

Example 3 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiFusionReactorHeat method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiEnergyTab(this, () -> {
        FusionReactorMultiblockData multiblock = tile.getMultiblock();
        return Arrays.asList(MekanismLang.STORING.translate(EnergyDisplay.of(multiblock.energyContainer)), GeneratorsLang.PRODUCING_AMOUNT.translate(EnergyDisplay.of(multiblock.getPassiveGeneration(false, true))));
    }));
    addButton(new GuiNumberGauge(new INumberInfoHandler() {

        @Override
        public TextureAtlasSprite getIcon() {
            return MekanismRenderer.getBaseFluidTexture(Fluids.LAVA, FluidType.STILL);
        }

        @Override
        public double getLevel() {
            return tile.getMultiblock().getLastPlasmaTemp();
        }

        @Override
        public double getScaledLevel() {
            return Math.min(1, getLevel() / MAX_LEVEL);
        }

        @Override
        public ITextComponent getText() {
            return GeneratorsLang.REACTOR_PLASMA.translate(MekanismUtils.getTemperatureDisplay(getLevel(), TemperatureUnit.KELVIN, true));
        }
    }, GaugeType.STANDARD, this, 7, 50));
    addButton(new GuiProgress(() -> {
        FusionReactorMultiblockData multiblock = tile.getMultiblock();
        return multiblock.getLastPlasmaTemp() > multiblock.getLastCaseTemp();
    }, ProgressType.SMALL_RIGHT, this, 29, 76));
    addButton(new GuiNumberGauge(new INumberInfoHandler() {

        @Override
        public TextureAtlasSprite getIcon() {
            return MekanismRenderer.getBaseFluidTexture(Fluids.LAVA, FluidType.STILL);
        }

        @Override
        public double getLevel() {
            return tile.getMultiblock().getLastCaseTemp();
        }

        @Override
        public double getScaledLevel() {
            return Math.min(1, getLevel() / MAX_LEVEL);
        }

        @Override
        public ITextComponent getText() {
            return GeneratorsLang.REACTOR_CASE.translate(MekanismUtils.getTemperatureDisplay(getLevel(), TemperatureUnit.KELVIN, true));
        }
    }, GaugeType.STANDARD, this, 61, 50));
    addButton(new GuiProgress(() -> tile.getMultiblock().getCaseTemp() > 0, ProgressType.SMALL_RIGHT, this, 83, 61));
    addButton(new GuiProgress(() -> {
        FusionReactorMultiblockData multiblock = tile.getMultiblock();
        return multiblock.getCaseTemp() > 0 && !multiblock.waterTank.isEmpty() && multiblock.steamTank.getStored() < multiblock.steamTank.getCapacity();
    }, ProgressType.SMALL_RIGHT, this, 83, 91));
    addButton(new GuiFluidGauge(() -> tile.getMultiblock().waterTank, () -> tile.getFluidTanks(null), GaugeType.SMALL, this, 115, 84));
    addButton(new GuiGasGauge(() -> tile.getMultiblock().steamTank, () -> tile.getGasTanks(null), GaugeType.SMALL, this, 151, 84));
    addButton(new GuiEnergyGauge(tile.getMultiblock().energyContainer, GaugeType.SMALL, this, 115, 46));
    addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.FUEL));
    addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.STAT));
}
Also used : GuiFusionReactorTab(mekanism.generators.client.gui.element.GuiFusionReactorTab) FusionReactorMultiblockData(mekanism.generators.common.content.fusion.FusionReactorMultiblockData) GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) GuiEnergyGauge(mekanism.client.gui.element.gauge.GuiEnergyGauge) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab) INumberInfoHandler(mekanism.client.gui.element.gauge.GuiNumberGauge.INumberInfoHandler) GuiNumberGauge(mekanism.client.gui.element.gauge.GuiNumberGauge)

Example 4 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiChemicalInfuser method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiGasGauge(() -> tile.leftTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 25, 13));
    addButton(new GuiGasGauge(() -> tile.centerTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 79, 4));
    addButton(new GuiGasGauge(() -> tile.rightTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 133, 13));
    addButton(new GuiProgress(tile::getActive, ProgressType.SMALL_RIGHT, this, 47, 39).jeiCategory(tile));
    addButton(new GuiProgress(tile::getActive, ProgressType.SMALL_LEFT, this, 101, 39).jeiCategory(tile));
}
Also used : GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 5 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiChemicalWasher method addGuiElements.

@Override
protected void addGuiElements() {
    // Add the side holder before the slots, as it holds a couple of the slots
    addButton(GuiSideHolder.create(this, imageWidth, 66, 57, false, true, SpecialColors.TAB_CHEMICAL_WASHER));
    super.addGuiElements();
    addButton(new GuiDownArrow(this, imageWidth + 8, 91));
    addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.STANDARD, this, 7, 13));
    addButton(new GuiSlurryGauge(() -> tile.inputTank, () -> tile.getSlurryTanks(null), GaugeType.STANDARD, this, 28, 13));
    addButton(new GuiSlurryGauge(() -> tile.outputTank, () -> tile.getSlurryTanks(null), GaugeType.STANDARD, this, 131, 13));
    addButton(new GuiProgress(tile::getActive, ProgressType.LARGE_RIGHT, this, 64, 39).jeiCategory(tile));
}
Also used : GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiDownArrow(mekanism.client.gui.element.GuiDownArrow) GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) GuiSlurryGauge(mekanism.client.gui.element.gauge.GuiSlurryGauge) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Aggregations

GuiProgress (mekanism.client.gui.element.progress.GuiProgress)25 GuiEnergyTab (mekanism.client.gui.element.tab.GuiEnergyTab)23 GuiVerticalPowerBar (mekanism.client.gui.element.bar.GuiVerticalPowerBar)12 GuiGasGauge (mekanism.client.gui.element.gauge.GuiGasGauge)11 GuiHorizontalPowerBar (mekanism.client.gui.element.bar.GuiHorizontalPowerBar)9 GuiFluidGauge (mekanism.client.gui.element.gauge.GuiFluidGauge)5 GuiUpArrow (mekanism.client.gui.element.GuiUpArrow)3 GuiPigmentGauge (mekanism.client.gui.element.gauge.GuiPigmentGauge)3 GuiSlot (mekanism.client.gui.element.slot.GuiSlot)3 GuiDownArrow (mekanism.client.gui.element.GuiDownArrow)2 TranslationButton (mekanism.client.gui.element.button.TranslationButton)2 PacketGuiInteract (mekanism.common.network.to_server.PacketGuiInteract)2 GuiFusionReactorTab (mekanism.generators.client.gui.element.GuiFusionReactorTab)2 FusionReactorMultiblockData (mekanism.generators.common.content.fusion.FusionReactorMultiblockData)2 MatrixStack (com.mojang.blaze3d.matrix.MatrixStack)1 Collections (java.util.Collections)1 Nonnull (javax.annotation.Nonnull)1 GuiConfigurableTile (mekanism.client.gui.GuiConfigurableTile)1 GuiDumpButton (mekanism.client.gui.element.GuiDumpButton)1 GuiElementHolder (mekanism.client.gui.element.GuiElementHolder)1