use of mekanism.client.gui.element.progress.IProgressInfoHandler.IBooleanProgressInfoHandler 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)));
}
Aggregations