use of mekanism.client.gui.element.GuiDownArrow 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)));
}
use of mekanism.client.gui.element.GuiDownArrow in project Mekanism by mekanism.
the class GuiDynamicTank method addGuiElements.
@Override
protected void addGuiElements() {
// Add the side holder before the slots, as it holds a couple of the slots
addButton(GuiSideHolder.armorHolder(this));
addButton(new GuiElementHolder(this, 141, 16, 26, 56));
super.addGuiElements();
addButton(new GuiSlot(SlotType.INNER_HOLDER_SLOT, this, 145, 20));
addButton(new GuiSlot(SlotType.INNER_HOLDER_SLOT, this, 145, 50));
addButton(new GuiInnerScreen(this, 49, 21, 84, 46, () -> {
List<ITextComponent> ret = new ArrayList<>();
TankMultiblockData multiblock = tile.getMultiblock();
long capacity = multiblock.getChemicalTankCapacity();
switch(multiblock.mergedTank.getCurrentType()) {
case EMPTY:
ret.add(MekanismLang.EMPTY.translate());
break;
case FLUID:
addStored(ret, multiblock.getFluidTank().getFluid(), FluidStack::getAmount);
capacity = multiblock.getTankCapacity();
break;
case GAS:
addStored(ret, multiblock.getGasTank());
break;
case INFUSION:
addStored(ret, multiblock.getInfusionTank());
break;
case PIGMENT:
addStored(ret, multiblock.getPigmentTank());
break;
case SLURRY:
addStored(ret, multiblock.getSlurryTank());
break;
}
ret.add(MekanismLang.CAPACITY.translate(""));
ret.add(MekanismLang.GENERIC_MB.translate(TextUtils.format(capacity)));
return ret;
}).spacing(2));
addButton(new GuiDownArrow(this, 150, 39));
addButton(new GuiContainerEditModeTab<>(this, tile));
addButton(new GuiMergedTankGauge<>(() -> tile.getMultiblock().mergedTank, tile::getMultiblock, GaugeType.MEDIUM, this, 7, 16, 34, 56));
}
use of mekanism.client.gui.element.GuiDownArrow in project Mekanism by mekanism.
the class GuiThermalEvaporationController method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiInnerScreen(this, 48, 19, 80, 40, () -> {
EvaporationMultiblockData multiblock = tile.getMultiblock();
return Arrays.asList(MekanismLang.MULTIBLOCK_FORMED.translate(), MekanismLang.EVAPORATION_HEIGHT.translate(multiblock.height()), MekanismLang.TEMPERATURE.translate(MekanismUtils.getTemperatureDisplay(multiblock.getTemperature(), TemperatureUnit.KELVIN, true)), MekanismLang.FLUID_PRODUCTION.translate(Math.round(multiblock.lastGain * 100D) / 100D));
}).spacing(1).jeiCategory(tile));
addButton(new GuiDownArrow(this, 32, 39));
addButton(new GuiDownArrow(this, 136, 39));
addButton(new GuiHorizontalRateBar(this, new IBarInfoHandler() {
@Override
public ITextComponent getTooltip() {
return MekanismUtils.getTemperatureDisplay(tile.getMultiblock().getTemperature(), TemperatureUnit.KELVIN, true);
}
@Override
public double getLevel() {
return Math.min(1, tile.getMultiblock().getTemperature() / EvaporationMultiblockData.MAX_MULTIPLIER_TEMP);
}
}, 48, 63));
addButton(new GuiFluidGauge(() -> tile.getMultiblock().inputTank, () -> tile.getMultiblock().getFluidTanks(null), GaugeType.STANDARD, this, 6, 13));
addButton(new GuiFluidGauge(() -> tile.getMultiblock().outputTank, () -> tile.getMultiblock().getFluidTanks(null), GaugeType.STANDARD, this, 152, 13));
addButton(new GuiHeatTab(this, () -> {
ITextComponent environment = MekanismUtils.getTemperatureDisplay(tile.getMultiblock().lastEnvironmentLoss, TemperatureUnit.KELVIN, false);
return Collections.singletonList(MekanismLang.DISSIPATED_RATE.translate(environment));
}));
}
use of mekanism.client.gui.element.GuiDownArrow in project Mekanism by mekanism.
the class GuiChemicalWasher 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, 66, 57, false, true, SpecialColors.TAB_CHEMICAL_WASHER));
super.addGuiElements();
addButton(new GuiDownArrow(this, imageWidth + 8, 91));
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, 7, 13));
addButton(new GuiSlurryGauge(() -> tile.inputTank, () -> tile.getSlurryTanks(null), GaugeType.STANDARD, this, 28, 13));
addButton(new GuiSlurryGauge(() -> tile.outputTank, () -> tile.getSlurryTanks(null), GaugeType.STANDARD, this, 131, 13));
addButton(new GuiProgress(tile::getActive, ProgressType.LARGE_RIGHT, this, 64, 39).jeiCategory(tile));
}
use of mekanism.client.gui.element.GuiDownArrow in project Mekanism by mekanism.
the class GuiElectricPump method addGuiElements.
@Override
protected void addGuiElements() {
super.addGuiElements();
addButton(new GuiInnerScreen(this, 54, 23, 80, 41, () -> {
List<ITextComponent> list = new ArrayList<>();
list.add(EnergyDisplay.of(tile.getEnergyContainer()).getTextComponent());
FluidStack fluidStack = tile.fluidTank.getFluid();
if (fluidStack.isEmpty()) {
list.add(MekanismLang.NO_FLUID.translate());
} else {
list.add(MekanismLang.GENERIC_STORED_MB.translate(fluidStack, TextUtils.format(fluidStack.getAmount())));
}
return list;
}));
addButton(new GuiDownArrow(this, 32, 39));
addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
addButton(new GuiFluidGauge(() -> tile.fluidTank, () -> tile.getFluidTanks(null), GaugeType.STANDARD, this, 6, 13));
addButton(new GuiEnergyTab(this, tile.getEnergyContainer()));
}
Aggregations