Search in sources :

Example 11 with SmallGuiButton

use of logisticspipes.utils.gui.SmallGuiButton in project LogisticsPipes by RS485.

the class SelectItemOutOfList method initGui.

@Override
@SuppressWarnings("unchecked")
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new SmallGuiButton(0, guiLeft + 108, guiTop + 5, 10, 10, "<"));
    buttonList.add(new SmallGuiButton(1, guiLeft + 138, guiTop + 5, 10, 10, ">"));
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton)

Example 12 with SmallGuiButton

use of logisticspipes.utils.gui.SmallGuiButton in project LogisticsPipes by RS485.

the class GuiCraftingPipe method initGui.

@Override
public void initGui() {
    super.initGui();
    extentionControllerLeft.clear();
    buttonList.clear();
    FluidCraftingExtention extention = null;
    if (!isAdvancedSat) {
        if (liquidCrafter != 0) {
            extention = new FluidCraftingExtention(0);
        }
        addButton(normalButtonArray[0] = new SmallGuiButton(0, (width - xSize) / 2 + 155, (height - ySize) / 2 + 50, 10, 10, ">"));
        addButton(normalButtonArray[1] = new SmallGuiButton(1, (width - xSize) / 2 + 120, (height - ySize) / 2 + 50, 10, 10, "<"));
        addButton(normalButtonArray[2] = new SmallGuiButton(3, (width - xSize) / 2 + 39, (height - ySize) / 2 + 50, 37, 10, StringUtils.translate(GuiCraftingPipe.PREFIX + "Import")));
        addButton(normalButtonArray[3] = new SmallGuiButton(4, (width - xSize) / 2 + 6, (height - ySize) / 2 + 50, 28, 10, StringUtils.translate(GuiCraftingPipe.PREFIX + "Open")));
        addButton(normalButtonArray[4] = new SmallGuiButton(20, (width - xSize) / 2 + 155, (height - ySize) / 2 + 85, 10, 10, ">"));
        addButton(normalButtonArray[5] = new SmallGuiButton(21, (width - xSize) / 2 + 120, (height - ySize) / 2 + 85, 10, 10, "<"));
        if (liquidCrafter != 0) {
            extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(normalButtonArray[6] = new SmallGuiButton(22, guiLeft - (liquidCrafter * 40) / 2 + 5, guiTop + 158, 10, 10, ">"))));
            extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(normalButtonArray[7] = new SmallGuiButton(23, guiLeft - (liquidCrafter * 40) / 2 - 15, guiTop + 158, 10, 10, "<"))));
        }
    } else {
        for (int i = 0; i < 9; i++) {
            addButton(advancedSatButtonArray[i][0] = new SmallGuiButton(30 + i, (width - xSize) / 2 + 10 + 18 * i, (height - ySize) / 2 + 40, 15, 10, "/\\"));
            addButton(advancedSatButtonArray[i][1] = new SmallGuiButton(40 + i, (width - xSize) / 2 + 10 + 18 * i, (height - ySize) / 2 + 70, 15, 10, "\\/"));
        }
        addButton(normalButtonArray[2] = new SmallGuiButton(3, (width - xSize) / 2 + 39, (height - ySize) / 2 + 100, 37, 10, StringUtils.translate(GuiCraftingPipe.PREFIX + "Import")));
        addButton(normalButtonArray[3] = new SmallGuiButton(4, (width - xSize) / 2 + 6, (height - ySize) / 2 + 100, 28, 10, StringUtils.translate(GuiCraftingPipe.PREFIX + "Open")));
        addButton(normalButtonArray[4] = new SmallGuiButton(20, (width - xSize) / 2 + 155, (height - ySize) / 2 + 105, 10, 10, ">"));
        addButton(normalButtonArray[5] = new SmallGuiButton(21, (width - xSize) / 2 + 120, (height - ySize) / 2 + 105, 10, 10, "<"));
    }
    for (int i = 0; i < liquidCrafter; i++) {
        if (isAdvancedSat) {
            extention = new FluidCraftingExtention(i);
        }
        int liquidLeft = 0;
        if (isAdvancedSat) {
            liquidLeft = guiLeft - 40;
        } else {
            liquidLeft = guiLeft - (liquidCrafter * 40) + (i * 40);
        }
        liquidGuiParts[i] = new GuiButton[10];
        extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][0] = new SmallGuiButton(100 + 10 * i + 0, liquidLeft + 22, guiTop + 65, 10, 10, "+"))));
        extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][1] = new SmallGuiButton(100 + 10 * i + 1, liquidLeft + 22, guiTop + 85, 10, 10, "+"))));
        extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][2] = new SmallGuiButton(100 + 10 * i + 2, liquidLeft + 22, guiTop + 105, 10, 10, "+"))));
        extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][3] = new SmallGuiButton(100 + 10 * i + 3, liquidLeft + 22, guiTop + 125, 10, 10, "+"))));
        extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][4] = new SmallGuiButton(100 + 10 * i + 4, liquidLeft + 8, guiTop + 65, 10, 10, "-"))));
        extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][5] = new SmallGuiButton(100 + 10 * i + 5, liquidLeft + 8, guiTop + 85, 10, 10, "-"))));
        extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][6] = new SmallGuiButton(100 + 10 * i + 6, liquidLeft + 8, guiTop + 105, 10, 10, "-"))));
        extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][7] = new SmallGuiButton(100 + 10 * i + 7, liquidLeft + 8, guiTop + 125, 10, 10, "-"))));
        if (isAdvancedSat) {
            extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][8] = new SmallGuiButton(100 + 10 * i + 8, liquidLeft + 5, guiTop + 158, 10, 10, "<"))));
            extention.registerButton(extentionControllerLeft.registerControlledButton(addButton(liquidGuiParts[i][9] = new SmallGuiButton(100 + 10 * i + 9, liquidLeft + 25, guiTop + 158, 10, 10, ">"))));
            extentionControllerLeft.addExtention(extention);
        }
        extention.registerSlot(fluidSlotIDs[i]);
    }
    if (!isAdvancedSat && liquidCrafter != 0) {
        extentionControllerLeft.addExtention(extention);
    }
    if (hasByproductExtractor) {
        ByproductExtention byproductExtention = new ByproductExtention();
        byproductExtention.registerSlot(byproductSlotID);
        extentionControllerLeft.addExtention(byproductExtention);
    }
    if (cleanupSize > 0) {
        CleanupExtention cleanupExtention = new CleanupExtention();
        cleanupExtention.registerButton(extentionControllerLeft.registerControlledButton(addButton(cleanupModeButton = new SmallGuiButton(24, guiLeft - 56, guiTop + 18 + (18 * cleanupSize), 50, 10, StringUtils.translate(GuiCraftingPipe.PREFIX + (_pipe.cleanupModeIsExclude ? "Exclude" : "Include"))))));
        cleanupExtention.registerButton(extentionControllerLeft.registerControlledButton(addButton(new SmallGuiButton(25, guiLeft - 56, guiTop + 32 + (18 * cleanupSize), 50, 10, StringUtils.translate(GuiCraftingPipe.PREFIX + "Import")))));
        for (int i = 0; i < cleanupSize * 3; i++) {
            cleanupExtention.registerSlot(cleanupSlotIDs[i]);
        }
        extentionControllerLeft.addExtention(cleanupExtention);
    }
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton)

Example 13 with SmallGuiButton

use of logisticspipes.utils.gui.SmallGuiButton in project LogisticsPipes by RS485.

the class GuiInvSysConnector method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new SmallGuiButton(0, guiLeft + 120, guiTop + 47, 10, 10, "<"));
    buttonList.add(new SmallGuiButton(1, guiLeft + 160, guiTop + 47, 10, 10, ">"));
    buttonList.add(new SmallGuiButton(2, guiLeft + 68, guiTop + 47, 46, 10, StringUtils.translate(GuiInvSysConnector.PREFIX + "Refresh")));
    buttonList.add(new SmallGuiButton(3, guiLeft + 80, guiTop + 35, 10, 10, "<"));
    buttonList.add(new SmallGuiButton(4, guiLeft + 120, guiTop + 35, 10, 10, ">"));
    buttonList.add(new SmallGuiButton(5, guiLeft + 140, guiTop + 35, 30, 10, StringUtils.translate(GuiInvSysConnector.PREFIX + "Save")));
    refreshPacket();
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton)

Example 14 with SmallGuiButton

use of logisticspipes.utils.gui.SmallGuiButton in project LogisticsPipes by RS485.

the class GuiOrderer method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    // Request
    buttonList.add(new GuiButton(0, right - 55, bottom - 25, 50, 20, "Request"));
    // Next page
    buttonList.add(new SmallGuiButton(1, right - 15, guiTop + 5, 10, 10, ">"));
    // Prev page
    buttonList.add(new SmallGuiButton(2, right - 90, guiTop + 5, 10, 10, "<"));
    // -64
    buttonList.add(new SmallGuiButton(10, xCenter - 51, bottom - 15, 26, 10, "---"));
    // -10
    buttonList.add(new SmallGuiButton(4, xCenter - 51, bottom - 26, 15, 10, "--"));
    // -1
    buttonList.add(new SmallGuiButton(5, xCenter - 35, bottom - 26, 10, 10, "-"));
    // +1
    buttonList.add(new SmallGuiButton(6, xCenter + 26, bottom - 26, 10, 10, "+"));
    // +10
    buttonList.add(new SmallGuiButton(7, xCenter + 38, bottom - 26, 15, 10, "++"));
    // +64
    buttonList.add(new SmallGuiButton(11, xCenter + 26, bottom - 15, 26, 10, "+++"));
    // Popup
    buttonList.add(new GuiCheckBox(8, guiLeft + 9, bottom - 60, 14, 14, Configs.DISPLAY_POPUP));
    // Sort
    buttonList.add(new SmallGuiButton(20, xCenter - 13, bottom - 41, 26, 10, "Sort"));
    if (search == null) {
        search = new SearchBar(mc.fontRenderer, this, guiLeft + 30, bottom - 78, right - guiLeft - 58, 15);
    }
    search.reposition(guiLeft + 30, bottom - 78, right - guiLeft - 58, 15);
    if (itemDisplay == null) {
        itemDisplay = new ItemDisplay(this, mc.fontRenderer, this, this, guiLeft + 10, guiTop + 18, xSize - 20, ySize - 100, new int[] { 1, 10, 64, 64 }, true);
    }
    itemDisplay.reposition(guiLeft + 10, guiTop + 18, xSize - 20, ySize - 100);
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiButton(net.minecraft.client.gui.GuiButton) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) ItemDisplay(logisticspipes.utils.gui.ItemDisplay) SearchBar(logisticspipes.utils.gui.SearchBar) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox)

Example 15 with SmallGuiButton

use of logisticspipes.utils.gui.SmallGuiButton in project LogisticsPipes by RS485.

the class GuiRequestTable method initGui.

@Override
@SuppressWarnings("unchecked")
public void initGui() {
    boolean reHide = false;
    if (!showRequest) {
        guiLeft = startLeft;
        xSize = startXSize;
        showRequest = true;
        reHide = true;
    }
    super.initGui();
    buttonList.clear();
    // Request
    buttonList.add(hideWhileSmall.addChain(new GuiButton(0, right - 55, bottom - 25, 50, 20, "Request")));
    // Next page
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(1, right - 15, guiTop + 5, 10, 10, ">")));
    // Prev page
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(2, right - 90, guiTop + 5, 10, 10, "<")));
    // -64
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(10, right - 148, bottom - 15, 26, 10, "---")));
    // -10
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(4, right - 148, bottom - 26, 15, 10, "--")));
    // -1
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(5, right - 132, bottom - 26, 10, 10, "-")));
    // +1
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(6, right - 86, bottom - 26, 10, 10, "+")));
    // +10
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(7, right - 74, bottom - 26, 15, 10, "++")));
    // +64
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(11, right - 86, bottom - 15, 26, 10, "+++")));
    // Popup
    buttonList.add(hideWhileSmall.addChain(new GuiCheckBox(8, guiLeft + 209, bottom - 60, 14, 14, Configs.DISPLAY_POPUP)));
    // Refresh
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(3, guiLeft + 210, bottom - 15, 46, 10, "Refresh")));
    // Component
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(13, guiLeft + 210, bottom - 28, 46, 10, "Content")));
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(9, guiLeft + 210, bottom - 41, 46, 10, "Both")));
    // Sort
    buttonList.add(hideWhileSmall.addChain(new SmallGuiButton(20, right - 116, bottom - 41, 26, 10, "Sort")));
    // +1
    buttonList.add(moveWhileSmall.addChain(new SmallGuiButton(14, guiLeft + 96, guiTop + 53, 10, 10, "+")));
    // +10
    buttonList.add(moveWhileSmall.addChain(new SmallGuiButton(15, guiLeft + 108, guiTop + 53, 15, 10, "++")));
    // +64
    buttonList.add(moveWhileSmall.addChain(new SmallGuiButton(16, guiLeft + 96, guiTop + 64, 26, 10, "+++")));
    // x
    buttonList.add(moveWhileSmall.addChain(new SmallGuiButton(30, guiLeft + 96 + 2, guiTop + 18, 10, 10, "X")));
    // ~
    buttonList.add(moveWhileSmall.addChain(new SmallGuiButton(31, guiLeft + 108 + 2, guiTop + 18, 10, 10, "~", 3)));
    // Hide
    buttonList.add(hideShowButton = new SmallGuiButton(17, guiLeft + 173, guiTop + 5, 36, 10, "Hide"));
    buttonList.add(Macrobutton = new SmallGuiButton(18, right - 55, bottom - 60, 50, 10, "Disk"));
    Macrobutton.enabled = false;
    (sycleButtons[0] = addButton(new SmallGuiButton(21, guiLeft + 124, guiTop + 30, 15, 10, "/\\"))).visible = false;
    (sycleButtons[1] = addButton(new SmallGuiButton(22, guiLeft + 124, guiTop + 42, 15, 10, "\\/"))).visible = false;
    if (search == null) {
        search = new SearchBar(mc.fontRenderer, this, guiLeft + 205, bottom - 78, 200, 15);
    }
    search.reposition(guiLeft + 205, bottom - 78, 200, 15);
    if (itemDisplay == null) {
        itemDisplay = new ItemDisplay(this, mc.fontRenderer, this, this, guiLeft + 205, guiTop + 18, 200, ySize - 100, new int[] { 1, 10, 64, 64 }, true);
    }
    itemDisplay.reposition(guiLeft + 205, guiTop + 18, 200, ySize - 100);
    startLeft = guiLeft;
    startXSize = xSize;
    if (reHide) {
        showRequest = false;
        xSize = startXSize - 210;
        guiLeft = startLeft + 105;
        for (GuiButton button : moveWhileSmall) {
            button.xPosition += 105;
        }
        hideShowButton.xPosition += 90;
        hideShowButton.displayString = "Show";
        for (GuiButton button : hideWhileSmall) {
            button.visible = false;
        }
        Macrobutton.visible = false;
    }
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiButton(net.minecraft.client.gui.GuiButton) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) ItemDisplay(logisticspipes.utils.gui.ItemDisplay) SearchBar(logisticspipes.utils.gui.SearchBar) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox)

Aggregations

SmallGuiButton (logisticspipes.utils.gui.SmallGuiButton)23 GuiButton (net.minecraft.client.gui.GuiButton)10 GuiCheckBox (logisticspipes.utils.gui.GuiCheckBox)5 ItemDisplay (logisticspipes.utils.gui.ItemDisplay)5 SearchBar (logisticspipes.utils.gui.SearchBar)4 ItemStack (net.minecraft.item.ItemStack)2 ArrayList (java.util.ArrayList)1 BitSet (java.util.BitSet)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1 List (java.util.List)1 Locale (java.util.Locale)1 Map (java.util.Map)1 Entry (java.util.Map.Entry)1 Collectors (java.util.stream.Collectors)1 LogisticsPipes (logisticspipes.LogisticsPipes)1 Configs (logisticspipes.config.Configs)1 GuiDiskPopup (logisticspipes.gui.popup.GuiDiskPopup)1 GuiRequestPopup (logisticspipes.gui.popup.GuiRequestPopup)1