Search in sources :

Example 26 with GuiButton

use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.

the class GuiFluidSupplierPipe method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiButton(0, width / 2 + 45, height / 2 - 25, 30, 20, logic.isRequestingPartials() ? StringUtils.translate(GuiFluidSupplierPipe.PREFIX + "Yes") : StringUtils.translate(GuiFluidSupplierPipe.PREFIX + "No")));
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton)

Example 27 with GuiButton

use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.

the class GuiLogisticsCraftingTable method drawGuiContainerBackgroundLayer.

@Override
protected void drawGuiContainerBackgroundLayer(float fA, int iA, int jA) {
    for (GuiButton sycleButton : sycleButtons) {
        sycleButton.visible = _crafter.targetType != null;
    }
    GuiGraphics.drawGuiBackGround(mc, guiLeft, guiTop, right, bottom, zLevel, true);
    GuiGraphics.drawGuiBackGround(mc, guiLeft, guiTop, right, bottom, zLevel, true);
    for (int x = 0; x < 3; x++) {
        for (int y = 0; y < 3; y++) {
            GuiGraphics.drawSlotBackground(mc, guiLeft + 34 + x * 18, guiTop + 9 + y * 18);
        }
    }
    GuiGraphics.drawSlotBackground(mc, guiLeft + 124, guiTop + 27);
    for (int x = 0; x < 9; x++) {
        for (int y = 0; y < 2; y++) {
            GuiGraphics.drawSlotBackground(mc, guiLeft + 7 + x * 18, guiTop + 79 + y * 18);
        }
    }
    GuiGraphics.drawPlayerInventoryBackground(mc, guiLeft + 8, guiTop + 135);
    ItemIdentifierStack[] items = new ItemIdentifierStack[9];
    for (int i = 0; i < 9; i++) {
        if (_crafter.matrix.getIDStackInSlot(i) != null) {
            items[i] = _crafter.matrix.getIDStackInSlot(i);
        }
    }
    ItemStackRenderer.renderItemIdentifierStackListIntoGui(Arrays.asList(items), null, 0, guiLeft + 8, guiTop + 79, 9, 9, 18, 18, 0.0F, DisplayAmount.NEVER);
    GL11.glTranslatef(0F, 0F, 20F);
    for (int a = 0; a < 9; a++) {
        Gui.drawRect(guiLeft + 8 + (a * 18), guiTop + 80, guiLeft + 24 + (a * 18), guiTop + 96, 0xc08b8b8b);
    }
    GL11.glTranslatef(0F, 0F, -20F);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) ItemIdentifierStack(logisticspipes.utils.item.ItemIdentifierStack)

Example 28 with GuiButton

use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.

the class GuiExtractor method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    int left = width / 2 - xSize / 2;
    int top = height / 2 - ySize / 2;
    //DOWN
    buttonList.add(new GuiButton(0, left + 110, top + 103, 40, 20, ""));
    //UP
    buttonList.add(new GuiButton(1, left + 110, top + 43, 40, 20, ""));
    //NORTH
    buttonList.add(new GuiButton(2, left + 50, top + 53, 50, 20, ""));
    //SOUTH
    buttonList.add(new GuiButton(3, left + 50, top + 93, 50, 20, ""));
    //WEST
    buttonList.add(new GuiButton(4, left + 10, top + 73, 40, 20, ""));
    //EAST
    buttonList.add(new GuiButton(5, left + 100, top + 73, 40, 20, ""));
    //DEFAULT
    buttonList.add(new GuiButton(6, left + 10, top + 23, 60, 20, ""));
    refreshButtons();
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton)

Example 29 with GuiButton

use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.

the class GuiExtractor method refreshButtons.

private void refreshButtons() {
    for (Object p : buttonList) {
        GuiButton button = (GuiButton) p;
        button.displayString = isExtract(ForgeDirection.getOrientation(button.id));
    }
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton)

Example 30 with GuiButton

use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.

the class SneakyConfigurationPopup method initGui.

@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    configDisplay = new SideConfigDisplay(config) {

        @Override
        public void handleSelection(SelectedFace selection) {
            SneakyConfigurationPopup.this.handleSelection(selection);
        }
    };
    configDisplay.init();
    configDisplay.renderNeighbours = true;
    buttonList.add(new GuiButton(0, right - 106, bottom - 26, 100, 20, "Cancel"));
    bounds = new Rectangle(guiLeft + 5, guiTop + 20, this.xSize - 10, this.ySize - 50);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) SideConfigDisplay(logisticspipes.utils.gui.sideconfig.SideConfigDisplay) Rectangle(java.awt.Rectangle)

Aggregations

GuiButton (net.minecraft.client.gui.GuiButton)132 GuiTextField (net.minecraft.client.gui.GuiTextField)17 SmallGuiButton (logisticspipes.utils.gui.SmallGuiButton)12 ArrayList (java.util.ArrayList)10 ItemStack (net.minecraft.item.ItemStack)9 Point (java.awt.Point)7 GuiElementInfoRegionMP (stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP)7 ItemDisplay (logisticspipes.utils.gui.ItemDisplay)6 GuiCheckBox (logisticspipes.utils.gui.GuiCheckBox)5 Bounds (ivorius.reccomplex.gui.table.Bounds)4 Rectangle (java.awt.Rectangle)4 SearchBar (logisticspipes.utils.gui.SearchBar)4 ItemIdentifierStack (logisticspipes.utils.item.ItemIdentifierStack)3 GuiButtonVariableDims (am2.guis.controls.GuiButtonVariableDims)2 GuiSlideControl (am2.guis.controls.GuiSlideControl)2 IOException (java.io.IOException)2 BitSet (java.util.BitSet)2 GuiDiskPopup (logisticspipes.gui.popup.GuiDiskPopup)2 RequestMonitorPopup (logisticspipes.gui.popup.RequestMonitorPopup)2 ClearCraftingGridPacket (logisticspipes.network.packets.block.ClearCraftingGridPacket)2