Search in sources :

Example 1 with GuiVerticalPowerBar

use of mekanism.client.gui.element.bar.GuiVerticalPowerBar 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 2 with GuiVerticalPowerBar

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

the class GuiTeleporter method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiTeleporterStatus(this, () -> getFrequency() != null, () -> tile.status));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 158, 26));
    addButton(new GuiFrequencySelector<>(this, 14));
}
Also used : GuiTeleporterStatus(mekanism.client.gui.element.custom.GuiTeleporterStatus) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar)

Example 3 with GuiVerticalPowerBar

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

the class GuiBioGenerator method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiInnerScreen(this, 48, 23, 80, 40, () -> Arrays.asList(EnergyDisplay.of(tile.getEnergyContainer().getEnergy()).getTextComponent(), GeneratorsLang.STORED_BIO_FUEL.translate(TextUtils.format(tile.bioFuelTank.getFluidAmount())), GeneratorsLang.OUTPUT_RATE_SHORT.translate(EnergyDisplay.of(tile.getMaxOutput())))));
    addButton(new GuiEnergyTab(this, () -> Arrays.asList(GeneratorsLang.PRODUCING_AMOUNT.translate(tile.getActive() ? EnergyDisplay.of(MekanismGeneratorsConfig.generators.bioGeneration.get()) : EnergyDisplay.ZERO), MekanismLang.MAX_OUTPUT.translate(EnergyDisplay.of(tile.getMaxOutput())))));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiFluidBar(this, GuiFluidBar.getProvider(tile.bioFuelTank, tile.getFluidTanks(null)), 7, 15, 4, 52, false));
}
Also used : GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) GuiFluidBar(mekanism.client.gui.element.bar.GuiFluidBar) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 4 with GuiVerticalPowerBar

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

the class GuiGasGenerator method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiEnergyTab(this, () -> Arrays.asList(GeneratorsLang.PRODUCING_AMOUNT.translate(EnergyDisplay.of(tile.getGenerationRate().multiply(tile.getUsed()).multiply(tile.getMaxBurnTicks()))), MekanismLang.MAX_OUTPUT.translate(EnergyDisplay.of(tile.getMaxOutput())))));
    addButton(new GuiGasGauge(() -> tile.fuelTank, () -> tile.getGasTanks(null), GaugeType.WIDE, this, 55, 18));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
}
Also used : GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 5 with GuiVerticalPowerBar

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

the class GuiHeatGenerator method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiEnergyTab(this, () -> Arrays.asList(GeneratorsLang.PRODUCING_AMOUNT.translate(EnergyDisplay.of(tile.getProducingEnergy())), MekanismLang.MAX_OUTPUT.translate(EnergyDisplay.of(tile.getMaxOutput())))));
    addButton(new GuiFluidGauge(() -> tile.lavaTank, () -> tile.getFluidTanks(null), GaugeType.WIDE, this, 55, 18));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiHeatTab(this, () -> {
        ITextComponent temp = MekanismUtils.getTemperatureDisplay(tile.getTotalTemperature(), TemperatureUnit.KELVIN, true);
        ITextComponent transfer = MekanismUtils.getTemperatureDisplay(tile.getLastTransferLoss(), TemperatureUnit.KELVIN, false);
        ITextComponent environment = MekanismUtils.getTemperatureDisplay(tile.getLastEnvironmentLoss(), TemperatureUnit.KELVIN, false);
        return Arrays.asList(MekanismLang.TEMPERATURE.translate(temp), MekanismLang.TRANSFERRED_RATE.translate(transfer), MekanismLang.DISSIPATED_RATE.translate(environment));
    }));
}
Also used : GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) ITextComponent(net.minecraft.util.text.ITextComponent) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab) GuiHeatTab(mekanism.client.gui.element.tab.GuiHeatTab)

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