Search in sources :

Example 6 with InputBar

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

the class GuiRequestTable method initGui.

@Override
public void initGui() {
    Keyboard.enableRepeatEvents(true);
    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 InputBar(fontRenderer, this, guiLeft + 205, bottom - 78, 200, 15);
    }
    search.reposition(guiLeft + 205, bottom - 78, 200, 15);
    if (itemDisplay == null) {
        itemDisplay = new ItemDisplay(this, fontRenderer, this, this, guiLeft + 205, guiTop + 18, 200, ySize - 100, right - 104, bottom - 24, 36, new int[] { 1, 10, 64, 64 }, true);
    }
    itemDisplay.reposition(guiLeft + 205, guiTop + 18, 200, ySize - 100, right - 104, bottom - 24);
    startLeft = guiLeft;
    startXSize = xSize;
    if (reHide) {
        showRequest = false;
        xSize = startXSize - 210;
        guiLeft = startLeft + 105;
        for (GuiButton button : moveWhileSmall) {
            button.x += 105;
        }
        hideShowButton.x += 90;
        hideShowButton.displayString = "Show";
        for (GuiButton button : hideWhileSmall) {
            button.visible = false;
        }
        Macrobutton.visible = false;
    }
}
Also used : InputBar(logisticspipes.utils.gui.InputBar) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiButton(net.minecraft.client.gui.GuiButton) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) ItemDisplay(logisticspipes.utils.gui.ItemDisplay) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox)

Example 7 with InputBar

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

the class GuiInvSysConnector method initGui.

@Override
public void initGui() {
    Keyboard.enableRepeatEvents(true);
    super.initGui();
    buttonList.clear();
    buttonList.add(new SmallGuiButton(0, guiLeft + 120, guiTop + 67, 10, 10, "<"));
    buttonList.add(new SmallGuiButton(1, guiLeft + 160, guiTop + 67, 10, 10, ">"));
    buttonList.add(new SmallGuiButton(2, guiLeft + 68, guiTop + 67, 46, 10, TextUtil.translate(GuiInvSysConnector.PREFIX + "Refresh")));
    buttonList.add(new SmallGuiButton(3, guiLeft + 80, guiTop + 55, 10, 10, "<"));
    buttonList.add(new SmallGuiButton(4, guiLeft + 120, guiTop + 55, 10, 10, ">"));
    buttonList.add(new SmallGuiButton(5, guiLeft + 140, guiTop + 55, 30, 10, TextUtil.translate(GuiInvSysConnector.PREFIX + "Save")));
    buttonList.add(new SmallGuiButton(6, guiLeft + 130, guiTop + 20, 40, 10, TextUtil.translate(GuiInvSysConnector.PREFIX + "Change")));
    if (this.resistanceCountBar == null) {
        this.resistanceCountBar = new InputBar(this.fontRenderer, this, guiLeft + 90, guiTop + 55, 30, 12, false, true, InputBar.Align.CENTER);
        this.resistanceCountBar.minNumber = 0;
        this.resistanceCountBar.setInteger(pipe.resistance);
    }
    this.resistanceCountBar.reposition(guiLeft + 90, guiTop + 55, 30, 12);
    refreshPacket();
}
Also used : InputBar(logisticspipes.utils.gui.InputBar) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton)

Example 8 with InputBar

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

the class GuiSatellitePipe method initGui.

@Override
public void initGui() {
    Keyboard.enableRepeatEvents(true);
    super.initGui();
    buttonList.add(new SmallGuiButton(0, (width / 2) - (30 / 2) + 35, (height / 2) + 20, 30, 10, "Save"));
    input = new InputBar(fontRenderer, this, guiLeft + 8, guiTop + 40, 100, 16);
}
Also used : InputBar(logisticspipes.utils.gui.InputBar) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton)

Example 9 with InputBar

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

the class GuiSecurityStation method initGui.

@Override
public void initGui() {
    Keyboard.enableRepeatEvents(true);
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiButton(0, guiLeft + 10, guiTop + 179, 30, 20, "--"));
    buttonList.get(0).visible = false;
    buttonList.add(new GuiButton(1, guiLeft + 10, guiTop + 139, 30, 20, "-"));
    buttonList.add(new GuiButton(2, guiLeft + 45, guiTop + 139, 30, 20, "+"));
    buttonList.add(new GuiButton(3, guiLeft + 140, guiTop + 179, 30, 20, "++"));
    buttonList.get(3).visible = false;
    buttonList.add(new SmallGuiButton(4, guiLeft + 241, guiTop + 217, 30, 10, TextUtil.translate(GuiSecurityStation.PREFIX + "Open")));
    buttonList.add(new GuiCheckBox(5, guiLeft + 160, guiTop + 42, 16, 16, _tile.allowCC));
    buttonList.add(new SmallGuiButton(6, guiLeft + 162, guiTop + 60, 60, 10, TextUtil.translate(GuiSecurityStation.PREFIX + "EditTable")));
    if (!SimpleServiceLocator.ccProxy.isCC() && !LogisticsPipes.isDEBUG()) {
        buttonList.get(5).visible = false;
        buttonList.get(6).visible = false;
    }
    buttonList.add(new GuiButton(7, guiLeft + 55, guiTop + 95, 70, 20, TextUtil.translate(GuiSecurityStation.PREFIX + "Authorize")));
    buttonList.add(new GuiButton(8, guiLeft + 175, guiTop + 95, 70, 20, TextUtil.translate(GuiSecurityStation.PREFIX + "Deauthorize")));
    buttonList.add(new GuiCheckBox(9, guiLeft + 160, guiTop + 74, 16, 16, _tile.allowAutoDestroy));
    buttonList.add(new GuiButton(10, guiLeft + 177, guiTop + 230, 95, 20, TextUtil.translate(GuiSecurityStation.PREFIX + "ChannelManager")));
    if (searchBar == null) {
        searchBar = new InputBar(this.fontRenderer, this, guiLeft + 180, bottom - 120, right - 8 + addition - guiLeft - 180, 17);
        lastClickedx = -10000000;
        lastClickedy = -10000000;
    }
    searchBar.reposition(guiLeft + 180, bottom - 120, right - 8 + addition - guiLeft - 180, 17);
    MainProxy.sendPacketToServer(PacketHandler.getPacket(PlayerListRequest.class));
}
Also used : InputBar(logisticspipes.utils.gui.InputBar) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiButton(net.minecraft.client.gui.GuiButton) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) PlayerListRequest(logisticspipes.network.packets.PlayerListRequest) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox)

Aggregations

InputBar (logisticspipes.utils.gui.InputBar)9 SmallGuiButton (logisticspipes.utils.gui.SmallGuiButton)9 GuiButton (net.minecraft.client.gui.GuiButton)5 GuiCheckBox (logisticspipes.utils.gui.GuiCheckBox)4 ItemDisplay (logisticspipes.utils.gui.ItemDisplay)4 PlayerListRequest (logisticspipes.network.packets.PlayerListRequest)1