Search in sources :

Example 16 with GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab 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 17 with GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab 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 18 with GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab 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)

Example 19 with GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.

the class GuiMetallurgicInfuser 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.RIGHT, this, 72, 47).jeiCategory(tile));
    addButton(new GuiChemicalBar<>(this, GuiChemicalBar.getProvider(tile.infusionTank, tile.getInfusionTanks(null)), 7, 15, 4, 52, false));
    addButton(new GuiDumpButton<>(this, tile, 16, 59));
}
Also used : GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiVerticalPowerBar(mekanism.client.gui.element.bar.GuiVerticalPowerBar) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 20 with GuiEnergyTab

use of mekanism.client.gui.element.tab.GuiEnergyTab in project Mekanism by mekanism.

the class GuiFusionReactorController method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    if (tile.getMultiblock().isFormed()) {
        addButton(new GuiEnergyTab(this, () -> {
            FusionReactorMultiblockData multiblock = tile.getMultiblock();
            return Arrays.asList(MekanismLang.STORING.translate(EnergyDisplay.of(multiblock.energyContainer)), GeneratorsLang.PRODUCING_AMOUNT.translate(EnergyDisplay.of(multiblock.getPassiveGeneration(false, true))));
        }));
        addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.HEAT));
        addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.FUEL));
        addButton(new GuiFusionReactorTab(this, tile, FusionReactorTab.STAT));
    }
}
Also used : GuiFusionReactorTab(mekanism.generators.client.gui.element.GuiFusionReactorTab) FusionReactorMultiblockData(mekanism.generators.common.content.fusion.FusionReactorMultiblockData) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Aggregations

GuiEnergyTab (mekanism.client.gui.element.tab.GuiEnergyTab)42 GuiVerticalPowerBar (mekanism.client.gui.element.bar.GuiVerticalPowerBar)23 GuiProgress (mekanism.client.gui.element.progress.GuiProgress)23 GuiGasGauge (mekanism.client.gui.element.gauge.GuiGasGauge)13 GuiInnerScreen (mekanism.client.gui.element.GuiInnerScreen)12 GuiHorizontalPowerBar (mekanism.client.gui.element.bar.GuiHorizontalPowerBar)9 GuiFluidGauge (mekanism.client.gui.element.gauge.GuiFluidGauge)8 ArrayList (java.util.ArrayList)5 List (java.util.List)5 GuiEnergyGauge (mekanism.client.gui.element.gauge.GuiEnergyGauge)5 GuiSlot (mekanism.client.gui.element.slot.GuiSlot)5 GuiDownArrow (mekanism.client.gui.element.GuiDownArrow)4 GuiFusionReactorTab (mekanism.generators.client.gui.element.GuiFusionReactorTab)4 FusionReactorMultiblockData (mekanism.generators.common.content.fusion.FusionReactorMultiblockData)4 GuiUpArrow (mekanism.client.gui.element.GuiUpArrow)3 IBarInfoHandler (mekanism.client.gui.element.bar.GuiBar.IBarInfoHandler)3 GuiPigmentGauge (mekanism.client.gui.element.gauge.GuiPigmentGauge)3 GuiHeatTab (mekanism.client.gui.element.tab.GuiHeatTab)3 PacketGuiInteract (mekanism.common.network.to_server.PacketGuiInteract)3 EnergyDisplay (mekanism.common.util.text.EnergyDisplay)3