Search in sources :

Example 1 with ItemDisplay

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

the class GuiAddTracking method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    // Refresh
    buttonList.add(new GuiButton(3, guiLeft + 4, bottom - 25, 50, 20, "Refresh"));
    buttonList.add(new GuiButton(0, right - 55, bottom - 25, 50, 20, "Add"));
    // 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, "<"));
    // Sort
    buttonList.add(new SmallGuiButton(20, xCenter - 13, bottom - 21, 26, 10, "Sort"));
    if (search == null) {
        search = new SearchBar(Minecraft.getMinecraft().fontRenderer, getBaseScreen(), guiLeft + 30, bottom - 78, right - guiLeft - 58, 15);
    }
    search.reposition(guiLeft + 10, bottom - 58, right - guiLeft - 20, 15);
    if (itemDisplay == null) {
        itemDisplay = new ItemDisplay(this, Minecraft.getMinecraft().fontRenderer, getBaseScreen(), null, guiLeft + 10, guiTop + 18, xSize - 20, ySize - 100, new int[] { 1, 10, 64, 64 }, true);
    }
    itemDisplay.reposition(guiLeft + 10, guiTop + 18, xSize - 20, ySize - 80);
}
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)

Example 2 with ItemDisplay

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

the class GuiStatistics method initGui.

@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    TAB_BUTTON_1.add(addButton(new GuiButton(0, guiLeft + 10, guiTop + 70, 20, 20, "<")));
    TAB_BUTTON_1.add(addButton(new GuiButton(1, guiLeft + 150, guiTop + 70, 20, 20, ">")));
    TAB_BUTTON_1.add(addButton(new GuiButton(2, guiLeft + 37, guiTop + 70, 40, 20, "Add")));
    TAB_BUTTON_1.add(addButton(new GuiButton(3, guiLeft + 83, guiTop + 70, 60, 20, "Remove")));
    TAB_BUTTON_1_2.add(addButton(new SmallGuiButton(4, guiLeft + 84, guiTop + 205, 10, 10, "<")));
    TAB_BUTTON_1_2.add(addButton(new SmallGuiButton(5, guiLeft + 96, guiTop + 205, 10, 10, ">")));
    TAB_BUTTON_2.add(addButton(new GuiButton(6, guiLeft + 10, guiTop + 40, 160, 20, StringUtils.translate(PREFIX + "gettasks"))));
    TAB_BUTTON_2.add(addButton(new SmallGuiButton(7, guiLeft + 90, guiTop + 65, 10, 10, "<")));
    TAB_BUTTON_2.add(addButton(new SmallGuiButton(8, guiLeft + 160, guiTop + 65, 10, 10, ">")));
    if (itemDisplay_1 == null) {
        itemDisplay_1 = new ItemDisplay(null, fontRendererObj, this, null, guiLeft + 10, guiTop + 18, xSize - 20, ySize - 100, new int[] { 1, 10, 64, 64 }, true);
    }
    itemDisplay_1.reposition(guiLeft + 10, guiTop + 40, xSize - 20, 20);
    if (itemDisplay_2 == null) {
        itemDisplay_2 = new ItemDisplay(null, fontRendererObj, this, null, guiLeft + 10, guiTop + 18, xSize - 20, ySize - 100, new int[] { 1, 10, 64, 64 }, true);
        itemDisplay_2.setItemList(new ArrayList<>());
    }
    itemDisplay_2.reposition(guiLeft + 10, guiTop + 80, xSize - 20, 125);
    updateItemList();
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiButton(net.minecraft.client.gui.GuiButton) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) ItemDisplay(logisticspipes.utils.gui.ItemDisplay)

Example 3 with ItemDisplay

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

the class FluidGuiOrderer method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    boolean setItemDisplay = itemDisplay == null;
    super.initGui();
    // Refresh
    buttonList.add(new GuiButton(3, guiLeft + 10, bottom - 25, 46, 20, "Refresh"));
    if (setItemDisplay) {
        itemDisplay = new ItemDisplay(this, mc.fontRenderer, this, this, guiLeft + 10, guiTop + 18, xSize - 20, ySize - 100, new int[] { 1, 1000, 16000, 100 }, false);
    }
    itemDisplay.reposition(guiLeft + 10, guiTop + 18, xSize - 20, ySize - 100);
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) ItemDisplay(logisticspipes.utils.gui.ItemDisplay)

Example 4 with ItemDisplay

use of logisticspipes.utils.gui.ItemDisplay 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 5 with ItemDisplay

use of logisticspipes.utils.gui.ItemDisplay 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

ItemDisplay (logisticspipes.utils.gui.ItemDisplay)5 GuiButton (net.minecraft.client.gui.GuiButton)5 SmallGuiButton (logisticspipes.utils.gui.SmallGuiButton)4 SearchBar (logisticspipes.utils.gui.SearchBar)3 GuiCheckBox (logisticspipes.utils.gui.GuiCheckBox)2