Search in sources :

Example 1 with ControlSlot

use of binnie.core.gui.minecraft.control.ControlSlot in project Binnie by ForestryMC.

the class WindowSequencer method initialiseClient.

@Override
@SideOnly(Side.CLIENT)
public void initialiseClient() {
    super.initialiseClient();
    int x = 16;
    int y = 32;
    CraftGUIUtil.horizontalGrid(x, y, TextJustification.MIDDLE_CENTER, 2, new ControlSlotArray.Builder(this, 0, 0, 2, 2).create(Sequencer.SLOT_RESERVE), new ControlIconDisplay(this, 0, 0, GUIIcon.ARROW_RIGHT.getIcon().getResourceLocation()), new ControlSequencerProgress(this, 0, 0), new ControlIconDisplay(this, 0, 0, GUIIcon.ARROW_RIGHT.getIcon().getResourceLocation()), new ControlSlot.Builder(this, 0, 0).assign(6));
    final ControlSlot slotTarget = new ControlSlot.Builder(this, x + 96, y + 16).assign(5);
    x = 34;
    y = 92;
    this.slotText = new ControlText(this, new Area(0, y, this.getWidth(), 12), TextFormatting.DARK_GRAY + I18N.localise("genetics.machine.sequencer.texts.userless"), TextJustification.MIDDLE_CENTER);
    y += 20;
    final ControlSlot slotDye = new ControlSlot.Builder(this, x, y).assign(0);
    x += 20;
    new ControlSlotCharge(this, x, y, 0).setColor(16750848);
    x += 32;
    new ControlEnergyBar(this, x, y, 60, 16, Alignment.LEFT);
    x += 92;
    final ControlErrorState errorState = new ControlErrorState(this, x, y + 1);
    new ControlPlayerInventory(this);
}
Also used : ControlIconDisplay(binnie.core.gui.minecraft.control.ControlIconDisplay) Area(binnie.core.gui.geometry.Area) ControlErrorState(binnie.core.gui.minecraft.control.ControlErrorState) ControlText(binnie.core.gui.controls.ControlText) ControlPlayerInventory(binnie.core.gui.minecraft.control.ControlPlayerInventory) ControlSlot(binnie.core.gui.minecraft.control.ControlSlot) ControlSlotCharge(binnie.core.gui.minecraft.control.ControlSlotCharge) ControlEnergyBar(binnie.core.gui.minecraft.control.ControlEnergyBar) SideOnly(net.minecraftforge.fml.relauncher.SideOnly)

Aggregations

ControlText (binnie.core.gui.controls.ControlText)1 Area (binnie.core.gui.geometry.Area)1 ControlEnergyBar (binnie.core.gui.minecraft.control.ControlEnergyBar)1 ControlErrorState (binnie.core.gui.minecraft.control.ControlErrorState)1 ControlIconDisplay (binnie.core.gui.minecraft.control.ControlIconDisplay)1 ControlPlayerInventory (binnie.core.gui.minecraft.control.ControlPlayerInventory)1 ControlSlot (binnie.core.gui.minecraft.control.ControlSlot)1 ControlSlotCharge (binnie.core.gui.minecraft.control.ControlSlotCharge)1 SideOnly (net.minecraftforge.fml.relauncher.SideOnly)1