Search in sources :

Example 1 with GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab 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 GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.

the class GuiResistiveHeater method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiInnerScreen(this, 48, 23, 80, 42, () -> Arrays.asList(MekanismLang.TEMPERATURE.translate(MekanismUtils.getTemperatureDisplay(tile.getTotalTemperature(), TemperatureUnit.KELVIN, true)), MekanismLang.RESISTIVE_HEATER_USAGE.translate(EnergyDisplay.of(tile.getEnergyContainer().getEnergyPerTick())))).clearFormat());
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer()));
    addButton(new GuiHeatTab(this, () -> {
        ITextComponent environment = MekanismUtils.getTemperatureDisplay(tile.getLastEnvironmentLoss(), TemperatureUnit.KELVIN, false);
        return Collections.singletonList(MekanismLang.DISSIPATED_RATE.translate(environment));
    }));
    energyUsageField = addButton(new GuiTextField(this, 50, 51, 76, 12));
    energyUsageField.setText(energyUsageField.getText());
    energyUsageField.setMaxStringLength(7);
    energyUsageField.setInputValidator(InputValidator.DIGIT);
    energyUsageField.configureDigitalInput(this::setEnergyUsage);
    energyUsageField.setFocused(true);
}
Also used : GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) ITextComponent(net.minecraft.util.text.ITextComponent) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab) GuiTextField(mekanism.client.gui.element.text.GuiTextField) GuiHeatTab(mekanism.client.gui.element.tab.GuiHeatTab)

Example 3 with GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab 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 4 with GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.

the class GuiQuantumEntangloporter method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiFrequencySelector<>(this, 14));
    addButton(new GuiEnergyTab(this, () -> {
        InventoryFrequency frequency = getFrequency();
        EnergyDisplay storing = frequency == null ? EnergyDisplay.ZERO : EnergyDisplay.of(frequency.storedEnergy);
        EnergyDisplay rate = EnergyDisplay.of(tile.getInputRate());
        return Arrays.asList(MekanismLang.STORING.translate(storing), MekanismLang.MATRIX_INPUT_RATE.translate(rate));
    }));
    addButton(new GuiHeatTab(this, () -> {
        ITextComponent transfer = MekanismUtils.getTemperatureDisplay(tile.getLastTransferLoss(), TemperatureUnit.KELVIN, false);
        ITextComponent environment = MekanismUtils.getTemperatureDisplay(tile.getLastEnvironmentLoss(), TemperatureUnit.KELVIN, false);
        return Arrays.asList(MekanismLang.TRANSFERRED_RATE.translate(transfer), MekanismLang.DISSIPATED_RATE.translate(environment));
    }));
}
Also used : EnergyDisplay(mekanism.common.util.text.EnergyDisplay) ITextComponent(net.minecraft.util.text.ITextComponent) InventoryFrequency(mekanism.common.content.entangloporter.InventoryFrequency) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab) GuiHeatTab(mekanism.client.gui.element.tab.GuiHeatTab)

Example 5 with GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.

the class GuiEnergyCube 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, 36, 98, false, true, SpecialColors.TAB_ARMOR_SLOTS));
    super.addGuiElements();
    addButton(new GuiEnergyGauge(tile.getEnergyContainer(), GaugeType.WIDE, this, 55, 18));
    addButton(new GuiEnergyTab(this, () -> Arrays.asList(MekanismLang.MATRIX_INPUT_RATE.translate(EnergyDisplay.of(tile.getInputRate())), MekanismLang.MAX_OUTPUT.translate(EnergyDisplay.of(tile.getTier().getOutput())))));
}
Also used : GuiEnergyGauge(mekanism.client.gui.element.gauge.GuiEnergyGauge) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Aggregations

GuiEnergyTab (mekanism.client.gui.element.tab.GuiEnergyTab)42 GuiVerticalPowerBar (mekanism.client.gui.element.bar.GuiVerticalPowerBar)23 GuiProgress (mekanism.client.gui.element.progress.GuiProgress)23 GuiGasGauge (mekanism.client.gui.element.gauge.GuiGasGauge)13 GuiInnerScreen (mekanism.client.gui.element.GuiInnerScreen)12 GuiHorizontalPowerBar (mekanism.client.gui.element.bar.GuiHorizontalPowerBar)9 GuiFluidGauge (mekanism.client.gui.element.gauge.GuiFluidGauge)8 ArrayList (java.util.ArrayList)5 List (java.util.List)5 GuiEnergyGauge (mekanism.client.gui.element.gauge.GuiEnergyGauge)5 GuiSlot (mekanism.client.gui.element.slot.GuiSlot)5 GuiDownArrow (mekanism.client.gui.element.GuiDownArrow)4 GuiFusionReactorTab (mekanism.generators.client.gui.element.GuiFusionReactorTab)4 FusionReactorMultiblockData (mekanism.generators.common.content.fusion.FusionReactorMultiblockData)4 GuiUpArrow (mekanism.client.gui.element.GuiUpArrow)3 IBarInfoHandler (mekanism.client.gui.element.bar.GuiBar.IBarInfoHandler)3 GuiPigmentGauge (mekanism.client.gui.element.gauge.GuiPigmentGauge)3 GuiHeatTab (mekanism.client.gui.element.tab.GuiHeatTab)3 PacketGuiInteract (mekanism.common.network.to_server.PacketGuiInteract)3 EnergyDisplay (mekanism.common.util.text.EnergyDisplay)3