Search in sources :

Example 6 with GuiEnergyGauge

use of mekanism.client.gui.element.gauge.GuiEnergyGauge in project Mekanism by mekanism.

the class GuiAntiprotonicNucleosynthesizer method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiInnerScreen(this, 45, 18, 104, 68).jeiCategory(tile));
    addButton(new GuiEnergyTab(this, tile.getEnergyContainer(), tile::getEnergyUsed));
    addButton(new GuiGasGauge(() -> tile.gasTank, () -> tile.getGasTanks(null), GaugeType.SMALL_MED, this, 5, 18));
    addButton(new GuiEnergyGauge(tile.getEnergyContainer(), GaugeType.SMALL_MED, this, 172, 18));
    addButton(new GuiDynamicHorizontalRateBar(this, new IBarInfoHandler() {

        @Override
        public ITextComponent getTooltip() {
            return MekanismLang.PROGRESS.translate(TextUtils.getPercent(tile.getScaledProgress()));
        }

        @Override
        public double getLevel() {
            return Math.min(1, tile.getScaledProgress());
        }
    }, 5, 88, 183, ColorFunction.scale(Color.rgbi(60, 45, 74), Color.rgbi(100, 30, 170))));
}
Also used : GuiInnerScreen(mekanism.client.gui.element.GuiInnerScreen) IBarInfoHandler(mekanism.client.gui.element.bar.GuiBar.IBarInfoHandler) GuiGasGauge(mekanism.client.gui.element.gauge.GuiGasGauge) GuiDynamicHorizontalRateBar(mekanism.client.gui.element.bar.GuiDynamicHorizontalRateBar) GuiEnergyGauge(mekanism.client.gui.element.gauge.GuiEnergyGauge) GuiEnergyTab(mekanism.client.gui.element.tab.GuiEnergyTab)

Aggregations

GuiEnergyGauge (mekanism.client.gui.element.gauge.GuiEnergyGauge)6 GuiEnergyTab (mekanism.client.gui.element.tab.GuiEnergyTab)5 GuiInnerScreen (mekanism.client.gui.element.GuiInnerScreen)2 IBarInfoHandler (mekanism.client.gui.element.bar.GuiBar.IBarInfoHandler)2 IEnergyInfoHandler (mekanism.client.gui.element.gauge.GuiEnergyGauge.IEnergyInfoHandler)2 GuiGasGauge (mekanism.client.gui.element.gauge.GuiGasGauge)2 GuiMatrixTab (mekanism.client.gui.element.tab.GuiMatrixTab)2 MatrixMultiblockData (mekanism.common.content.matrix.MatrixMultiblockData)2 GuiElementHolder (mekanism.client.gui.element.GuiElementHolder)1 GuiDynamicHorizontalRateBar (mekanism.client.gui.element.bar.GuiDynamicHorizontalRateBar)1 GuiVerticalRateBar (mekanism.client.gui.element.bar.GuiVerticalRateBar)1 GuiFluidGauge (mekanism.client.gui.element.gauge.GuiFluidGauge)1 GuiNumberGauge (mekanism.client.gui.element.gauge.GuiNumberGauge)1 INumberInfoHandler (mekanism.client.gui.element.gauge.GuiNumberGauge.INumberInfoHandler)1 GuiProgress (mekanism.client.gui.element.progress.GuiProgress)1 GuiSlot (mekanism.client.gui.element.slot.GuiSlot)1 GuiAmplifierTab (mekanism.client.gui.element.tab.GuiAmplifierTab)1 GuiTextField (mekanism.client.gui.element.text.GuiTextField)1 GuiFusionReactorTab (mekanism.generators.client.gui.element.GuiFusionReactorTab)1 FusionReactorMultiblockData (mekanism.generators.common.content.fusion.FusionReactorMultiblockData)1