Skip to content

Commit

Permalink
Add energy indicator widget to laser amplifier gui (mekanism/Mekanism…
Browse files Browse the repository at this point in the history
  • Loading branch information
pupnewfster committed Aug 26, 2024
1 parent c364e7f commit 43da63a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/main/java/mekanism/client/gui/GuiLaserAmplifier.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package mekanism.client.gui;

import java.math.BigDecimal;
import java.util.List;
import mekanism.client.gui.element.gauge.GaugeType;
import mekanism.client.gui.element.gauge.GuiEnergyGauge;
import mekanism.client.gui.element.tab.GuiAmplifierTab;
import mekanism.client.gui.element.tab.GuiEnergyTab;
import mekanism.client.gui.element.text.GuiTextField;
import mekanism.common.MekanismLang;
import mekanism.common.inventory.container.tile.MekanismTileContainer;
Expand Down Expand Up @@ -34,6 +36,7 @@ public GuiLaserAmplifier(MekanismTileContainer<TileEntityLaserAmplifier> contain
protected void addGuiElements() {
super.addGuiElements();
addRenderableWidget(new GuiEnergyGauge(tile.getEnergyContainer(), GaugeType.STANDARD, this, 6, 10));
addRenderableWidget(new GuiEnergyTab(this, () -> List.of(MekanismLang.STORING.translate(EnergyDisplay.of(tile.getEnergyContainer())))));
addRenderableWidget(new GuiAmplifierTab(this, tile));
timerField = addRenderableWidget(new GuiTextField(this, 96, 28, 36, 11));
timerField.setMaxLength(4);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class GuiAmplifierTab extends GuiInsetElement<TileEntityLaserAmplifier> {
private final Map<RedstoneOutput, Tooltip> tooltips = new EnumMap<>(RedstoneOutput.class);

public GuiAmplifierTab(IGuiWrapper gui, TileEntityLaserAmplifier tile) {
super(OFF, gui, tile, -26, 138, 26, 18, true);
super(OFF, gui, tile, gui.getXSize(), 109, 26, 18, false);
}

@Override
Expand Down

0 comments on commit 43da63a

Please sign in to comment.