use of mcjty.lib.gui.widgets.EnergyBar in project RFTools by McJty.
the class GuiBooster method initGui.
@Override
public void initGui() {
super.initGui();
int maxEnergyStored = tileEntity.getMaxEnergyStored();
energyBar = new EnergyBar(mc, this).setVertical().setMaxValue(maxEnergyStored).setLayoutHint(new PositionalLayout.PositionalHint(8, 101, 10, 76)).setShowText(false);
energyBar.setValue(GenericEnergyStorageTileEntity.getCurrentRF());
Panel toplevel = new Panel(mc, this).setBackground(iconLocation).setLayout(new PositionalLayout());
initRedstoneMode();
toplevel.addChild(energyBar).addChild(redstoneMode);
toplevel.setBounds(new Rectangle(guiLeft, guiTop, xSize, ySize));
window = new Window(this, toplevel);
Keyboard.enableRepeatEvents(true);
}
use of mcjty.lib.gui.widgets.EnergyBar in project RFTools by McJty.
the class GuiRemoteStorage 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);
for (int i = 0; i < 4; i++) {
global[i] = new ImageChoiceLabel(mc, this);
final int finalI = i;
global[i].addChoiceEvent((parent, newChoice) -> changeGlobal(finalI));
global[i].addChoice("off" + i, "Cross-dimension access disabled", guiElements, 0, 32);
global[i].addChoice("on" + i, "Cross-dimension access enabled", guiElements, 16, 32);
global[i].setLayoutHint(new PositionalLayout.PositionalHint(i < 2 ? (43 - 18) : (120 - 18), (i % 2) == 0 ? 9 : 36, 16, 16));
global[i].setCurrentChoice(tileEntity.isGlobal(i) ? 1 : 0);
toplevel.addChild(global[i]);
}
toplevel.setBounds(new Rectangle(guiLeft, guiTop, xSize, ySize));
window = new Window(this, toplevel);
}
use of mcjty.lib.gui.widgets.EnergyBar in project RFTools by McJty.
the class GuiBlockProtector 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());
initRedstoneMode();
Panel toplevel = new Panel(mc, this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar).addChild(redstoneMode);
toplevel.setBounds(new Rectangle(guiLeft, guiTop, xSize, ySize));
window = new Window(this, toplevel);
tileEntity.requestRfFromServer(RFTools.MODID);
}
use of mcjty.lib.gui.widgets.EnergyBar in project RFTools by McJty.
the class GuiCoalGenerator 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());
initRedstoneMode();
Panel toplevel = new Panel(mc, this).setBackground(iconLocation).setLayout(new PositionalLayout()).addChild(energyBar).addChild(redstoneMode);
toplevel.setBounds(new Rectangle(guiLeft, guiTop, xSize, ySize));
window = new Window(this, toplevel);
tileEntity.requestRfFromServer(RFTools.MODID);
}
use of mcjty.lib.gui.widgets.EnergyBar in project RFTools by McJty.
the class GuiMachineInfuser 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());
// arrow = new ImageLabel(mc, this).setImage(iconGuiElements, 192, 0);
// arrow.setLayoutHint(new PositionalLayout.PositionalHint(90, 26, 16, 16));
// .addChild(arrow);
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);
// tileEntity.requestResearchingFromServer();
}
Aggregations