Search in sources :

Example 6 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiElectricMachine method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiUpArrow(this, 68, 38));
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));
    addButton(new GuiProgress(tile::getScaledProgress, ProgressType.BAR, this, 86, 38).jeiCategory(tile));
}
Also used : GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiUpArrow(mekanism.client.gui.element.GuiUpArrow) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 7 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiAdvancedElectricMachine method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 164, 15));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));
    addButton(new GuiProgress(tile::getScaledProgress, ProgressType.BAR, this, 86, 38).jeiCategory(tile));
    addButton(new GuiChemicalBar<>(this, GuiChemicalBar.getProvider(tile.gasTank, tile.getGasTanks(null)), 68, 36, 6, 12, false));
}
Also used : GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 8 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiChemicalCrystallizer method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 157, 23));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));
    addButton(new GuiMergedChemicalTankGauge<>(() -> tile.inputTank, () -> tile, GaugeType.STANDARD, this, 7, 4));
    addButton(new GuiProgress(tile::getScaledProgress, ProgressType.LARGE_RIGHT, this, 53, 61).jeiCategory(tile));
    // Init slot display before gui screen, so it can reference it, but add it after, so it renders above it
    slotDisplay = new GuiSequencedSlotDisplay(this, 129, 14, () -> iterStacks);
    updateSlotContents();
    addButton(new GuiInnerScreen(this, 31, 13, 115, 42, () -> getScreenRenderStrings(this.oreInfo)));
    addButton(new GuiSlot(SlotType.ORE, this, 128, 13).setRenderAboveSlots());
    addButton(slotDisplay);
}
Also used : GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiSlot(mekanism.client.gui.element.slot.GuiSlot) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiSequencedSlotDisplay(mekanism.client.gui.element.slot.GuiSequencedSlotDisplay) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 9 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiChemicalDissolutionChamber method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getActive));
    addButton(new GuiGasGauge(() -> tile.injectTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 7, 4));
    addButton(new GuiMergedChemicalTankGauge<>(() -> tile.outputTank, () -> tile, GaugeType.STANDARD, this, 131, 13));
    addButton(new GuiProgress(tile::getScaledProgress, ProgressType.LARGE_RIGHT, this, 64, 40).jeiCategory(tile));
}
Also used : GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 10 with GuiProgress

use of mekanism.client.gui.element.progress.GuiProgress in project Mekanism by mekanism.

the class GuiFormulaicAssemblicator method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiVerticalPowerBar(this, tile.getEnergyContainer(), 159, 15));
    // Overwrite the output slots with a "combined" slot
    addButton(new GuiSlot(SlotType.OUTPUT_LARGE, this, 115, 16));
    addButton(new GuiProgress(() -> tile.getOperatingTicks() / (double) tile.getTicksRequired(), ProgressType.TALL_RIGHT, this, 86, 43).jeiCrafting());
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer()));
    encodeFormulaButton = addButton(new MekanismImageButton(this, 7, 45, 14, getButtonLocation("encode_formula"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.ENCODE_FORMULA, tile)), getOnHover(MekanismLang.ENCODE_FORMULA)));
    stockControlButton = addButton(new MekanismImageButton(this, 26, 75, 16, getButtonLocation("stock_control"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.STOCK_CONTROL_BUTTON, tile)), getOnHover(() -> MekanismLang.STOCK_CONTROL.translate(OnOff.of(tile.getStockControl())))));
    fillEmptyButton = addButton(new MekanismImageButton(this, 44, 75, 16, getButtonLocation("fill_empty"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.MOVE_ITEMS, tile)), getOnHover(MekanismLang.FILL_EMPTY)));
    craftSingleButton = addButton(new MekanismImageButton(this, 71, 75, 16, getButtonLocation("craft_single"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.CRAFT_SINGLE, tile)), getOnHover(MekanismLang.CRAFT_SINGLE)));
    craftAvailableButton = addButton(new MekanismImageButton(this, 89, 75, 16, getButtonLocation("craft_available"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.CRAFT_ALL, tile)), getOnHover(MekanismLang.CRAFT_AVAILABLE)));
    autoModeButton = addButton(new MekanismImageButton(this, 107, 75, 16, getButtonLocation("auto_toggle"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.NEXT_MODE, tile)), getOnHover(() -> MekanismLang.AUTO_MODE.translate(OnOff.of(tile.getAutoMode())))));
    updateEnabledButtons();
}
Also used : GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiSlot(mekanism.client.gui.element.slot.GuiSlot) MekanismImageButton(mekanism.client.gui.element.button.MekanismImageButton) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) PacketGuiInteract(mekanism.common.network.to_server.PacketGuiInteract) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Aggregations

GuiProgress (mekanism.client.gui.element.progress.GuiProgress)25 GuiEnergyTab (mekanism.client.gui.element.tab.GuiEnergyTab)23 GuiVerticalPowerBar (mekanism.client.gui.element.bar.GuiVerticalPowerBar)12 GuiGasGauge (mekanism.client.gui.element.gauge.GuiGasGauge)11 GuiHorizontalPowerBar (mekanism.client.gui.element.bar.GuiHorizontalPowerBar)9 GuiFluidGauge (mekanism.client.gui.element.gauge.GuiFluidGauge)5 GuiUpArrow (mekanism.client.gui.element.GuiUpArrow)3 GuiPigmentGauge (mekanism.client.gui.element.gauge.GuiPigmentGauge)3 GuiSlot (mekanism.client.gui.element.slot.GuiSlot)3 GuiDownArrow (mekanism.client.gui.element.GuiDownArrow)2 TranslationButton (mekanism.client.gui.element.button.TranslationButton)2 PacketGuiInteract (mekanism.common.network.to_server.PacketGuiInteract)2 GuiFusionReactorTab (mekanism.generators.client.gui.element.GuiFusionReactorTab)2 FusionReactorMultiblockData (mekanism.generators.common.content.fusion.FusionReactorMultiblockData)2 MatrixStack (com.mojang.blaze3d.matrix.MatrixStack)1 Collections (java.util.Collections)1 Nonnull (javax.annotation.Nonnull)1 GuiConfigurableTile (mekanism.client.gui.GuiConfigurableTile)1 GuiDumpButton (mekanism.client.gui.element.GuiDumpButton)1 GuiElementHolder (mekanism.client.gui.element.GuiElementHolder)1