Search in sources :

Example 1 with SearchBar

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

use of logisticspipes.utils.gui.SearchBar 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 3 with SearchBar

use of logisticspipes.utils.gui.SearchBar 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)3 SearchBar (logisticspipes.utils.gui.SearchBar)3 SmallGuiButton (logisticspipes.utils.gui.SmallGuiButton)3 GuiButton (net.minecraft.client.gui.GuiButton)3 GuiCheckBox (logisticspipes.utils.gui.GuiCheckBox)2