Search in sources :

Example 6 with EnergyBar

use of mcjty.lib.gui.widgets.EnergyBar in project RFTools by McJty.

the class GuiMatterBeamer method initGui.

@Override
public void initGui() {
    super.initGui();
    int maxEnergyStored = tileEntity.getMaxEnergyStored();
    energyBar = new EnergyBar(mc, this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(10, 7, 8, 54)).setShowText(false);
    energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());
    Panel toplevel = new Panel(mc, this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar);
    toplevel.setBounds(new Rectangle(guiLeft, guiTop, xSize, ySize));
    window = new Window(this, toplevel);
    tileEntity.requestRfFromServer(RFTools.MODID);
}
Also used : Window(mcjty.lib.gui.Window) Panel(mcjty.lib.gui.widgets.Panel) PositionalLayout(mcjty.lib.gui.layout.PositionalLayout) EnergyBar(mcjty.lib.gui.widgets.EnergyBar)

Aggregations

Window (mcjty.lib.gui.Window)6 PositionalLayout (mcjty.lib.gui.layout.PositionalLayout)6 EnergyBar (mcjty.lib.gui.widgets.EnergyBar)6 Panel (mcjty.lib.gui.widgets.Panel)6 ImageChoiceLabel (mcjty.lib.gui.widgets.ImageChoiceLabel)1