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);
}
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));
}
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));
}
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));
}
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));
}));
}
Aggregations