Search in sources :

Example 1 with GuiHorizontalPowerBar

use of mekanism.client.gui.element.bar.GuiHorizontalPowerBar in project Mekanism by mekanism.

the class GuiRobitMain method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiSecurityTab(this, robit, 120));
    addButton(GuiSideHolder.create(this, 176, 6, 106, false, false, SpecialColors.TAB_ROBIT_MENU));
    addButton(new GuiInnerScreen(this, 27, 16, 122, 56));
    addButton(new GuiHorizontalPowerBar(this, robit.getEnergyContainer(), 27, 74, 120));
    addButton(new MekanismImageButton(this, 6, 16, 18, getButtonLocation("home"), () -> {
        Mekanism.packetHandler.sendToServer(new PacketRobit(RobitPacketType.GO_HOME, robit));
        getMinecraft().setScreen(null);
    }, getOnHover(MekanismLang.ROBIT_TELEPORT)));
    renameButton = addButton(new MekanismImageButton(this, 6, 35, 18, getButtonLocation("rename"), () -> openWindow(new GuiRobitRename(this, 27, 16, robit), () -> renameButton), getOnHover(MekanismLang.ROBIT_RENAME)));
    skinButton = addButton(new MekanismImageButton(this, 6, 54, 18, getButtonLocation("skin"), () -> openWindow(new GuiRobitSkinSelect(this, 4, -12, robit), () -> skinButton), getOnHover(MekanismLang.ROBIT_SKIN_SELECT)));
    addButton(new MekanismImageButton(this, 152, 35, 18, getButtonLocation("drop"), () -> Mekanism.packetHandler.sendToServer(new PacketRobit(RobitPacketType.DROP_PICKUP, robit)), getOnHover(MekanismLang.ROBIT_TOGGLE_PICKUP)));
    addButton(new MekanismImageButton(this, 152, 54, 18, getButtonLocation("follow"), () -> Mekanism.packetHandler.sendToServer(new PacketRobit(RobitPacketType.FOLLOW, robit)), getOnHover(MekanismLang.ROBIT_TOGGLE_FOLLOW)));
    addButton(new MekanismImageButton(this, 179, 10, 18, getButtonLocation("main"), () -> {
    // Clicking main button doesn't do anything while already on the main GUI
    }, getOnHover(MekanismLang.ROBIT)));
    addButton(new MekanismImageButton(this, 179, 30, 18, getButtonLocation("crafting"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedEntityButton.ROBIT_CRAFTING, robit)), getOnHover(MekanismLang.ROBIT_CRAFTING)));
    addButton(new MekanismImageButton(this, 179, 50, 18, getButtonLocation("inventory"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedEntityButton.ROBIT_INVENTORY, robit)), getOnHover(MekanismLang.ROBIT_INVENTORY)));
    addButton(new MekanismImageButton(this, 179, 70, 18, getButtonLocation("smelting"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedEntityButton.ROBIT_SMELTING, robit)), getOnHover(MekanismLang.ROBIT_SMELTING)));
    addButton(new MekanismImageButton(this, 179, 90, 18, getButtonLocation("repair"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiButtonPress(ClickedEntityButton.ROBIT_REPAIR, robit)), getOnHover(MekanismLang.ROBIT_REPAIR)));
}
Also used : GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) GuiRobitSkinSelect(mekanism.client.gui.element.window.GuiRobitSkinSelect) PacketGuiButtonPress(mekanism.common.network.to_server.PacketGuiButtonPress) GuiSecurityTab(mekanism.client.gui.element.tab.GuiSecurityTab) GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) PacketRobit(mekanism.common.network.to_server.PacketRobit) GuiRobitRename(mekanism.client.gui.element.window.GuiRobitRename) MekanismImageButton(mekanism.client.gui.element.button.MekanismImageButton)

Example 2 with GuiHorizontalPowerBar

use of mekanism.client.gui.element.bar.GuiHorizontalPowerBar in project Mekanism by mekanism.

the class GuiPigmentMixer method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiPigmentGauge(() -> tile.leftInputTank, () -> tile.getPigmentTanks(null), GaugeType.STANDARD, this, 25, 13));
    addButton(new GuiPigmentGauge(() -> tile.outputTank, () -> tile.getPigmentTanks(null), GaugeType.STANDARD, this, 79, 4));
    addButton(new GuiPigmentGauge(() -> tile.rightInputTank, () -> tile.getPigmentTanks(null), GaugeType.STANDARD, this, 133, 13));
    addButton(new GuiProgress(tile::getActive, ProgressType.SMALL_RIGHT, this, 47, 39).jeiCategory(tile).colored(new LeftColorDetails()));
    addButton(new GuiProgress(tile::getActive, ProgressType.SMALL_LEFT, this, 101, 39).jeiCategory(tile).colored(new RightColorDetails()));
}
Also used : GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiPigmentGauge(mekanism.client.gui.element.gauge.GuiPigmentGauge) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Example 3 with GuiHorizontalPowerBar

use of mekanism.client.gui.element.bar.GuiHorizontalPowerBar 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)));
}
Also used : GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiDownArrow(mekanism.client.gui.element.GuiDownArrow) ToggleButton(mekanism.client.gui.element.button.ToggleButton) GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) PacketGuiInteract(mekanism.common.network.to_server.PacketGuiInteract) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab) IBooleanProgressInfoHandler(mekanism.client.gui.element.progress.IProgressInfoHandler.IBooleanProgressInfoHandler)

Example 4 with GuiHorizontalPowerBar

use of mekanism.client.gui.element.bar.GuiHorizontalPowerBar in project Mekanism by mekanism.

the class GuiChemicalInfuser method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiHorizontalPowerBar(this, tile.getEnergyContainer(), 115, 75));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiGasGauge(() -> tile.leftTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 25, 13));
    addButton(new GuiGasGauge(() -> tile.centerTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 79, 4));
    addButton(new GuiGasGauge(() -> tile.rightTank, () -> tile.getGasTanks(null), GaugeType.STANDARD, this, 133, 13));
    addButton(new GuiProgress(tile::getActive, ProgressType.SMALL_RIGHT, this, 47, 39).jeiCategory(tile));
    addButton(new GuiProgress(tile::getActive, ProgressType.SMALL_LEFT, this, 101, 39).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 5 with GuiHorizontalPowerBar

use of mekanism.client.gui.element.bar.GuiHorizontalPowerBar 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));
}
Also used : GuiFluidGauge(mekanism.client.gui.element.gauge.GuiFluidGauge) GuiDownArrow(mekanism.client.gui.element.GuiDownArrow) GuiHorizontalPowerBar(mekanism.client.gui.element.bar.GuiHorizontalPowerBar) GuiSlurryGauge(mekanism.client.gui.element.gauge.GuiSlurryGauge) GuiProgress(mekanism.client.gui.element.progress.GuiProgress) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Aggregations

GuiHorizontalPowerBar (mekanism.client.gui.element.bar.GuiHorizontalPowerBar)10 GuiProgress (mekanism.client.gui.element.progress.GuiProgress)9 GuiEnergyTab (mekanism.client.gui.element.tab.GuiEnergyTab)9 GuiGasGauge (mekanism.client.gui.element.gauge.GuiGasGauge)6 GuiDownArrow (mekanism.client.gui.element.GuiDownArrow)2 GuiFluidGauge (mekanism.client.gui.element.gauge.GuiFluidGauge)2 GuiPigmentGauge (mekanism.client.gui.element.gauge.GuiPigmentGauge)2 GuiInnerScreen (mekanism.client.gui.element.GuiInnerScreen)1 MekanismImageButton (mekanism.client.gui.element.button.MekanismImageButton)1 ToggleButton (mekanism.client.gui.element.button.ToggleButton)1 GuiSlurryGauge (mekanism.client.gui.element.gauge.GuiSlurryGauge)1 IBooleanProgressInfoHandler (mekanism.client.gui.element.progress.IProgressInfoHandler.IBooleanProgressInfoHandler)1 GuiSecurityTab (mekanism.client.gui.element.tab.GuiSecurityTab)1 GuiRobitRename (mekanism.client.gui.element.window.GuiRobitRename)1 GuiRobitSkinSelect (mekanism.client.gui.element.window.GuiRobitSkinSelect)1 PacketGuiButtonPress (mekanism.common.network.to_server.PacketGuiButtonPress)1 PacketGuiInteract (mekanism.common.network.to_server.PacketGuiInteract)1 PacketRobit (mekanism.common.network.to_server.PacketRobit)1