Search in sources :

Example 1 with GuiCheckBox

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

the class GuiOrderer method actionPerformed.

@Override
protected void actionPerformed(GuiButton guibutton) {
    if (guibutton.id == 0 && itemDisplay.getSelectedItem() != null) {
        MainProxy.sendPacketToServer(PacketHandler.getPacket(RequestSubmitPacket.class).setDimension(dimension).setStack(itemDisplay.getSelectedItem().getItem().makeStack(itemDisplay.getRequestCount())).setPosX(xCoord).setPosY(yCoord).setPosZ(zCoord));
        refreshItems();
    } else if (guibutton.id == 1) {
        itemDisplay.nextPage();
    } else if (guibutton.id == 2) {
        itemDisplay.prevPage();
    } else if (guibutton.id == 3) {
        refreshItems();
    } else if (guibutton.id == 10) {
        itemDisplay.sub(3);
    } else if (guibutton.id == 4) {
        itemDisplay.sub(2);
    } else if (guibutton.id == 5) {
        itemDisplay.sub(1);
    } else if (guibutton.id == 6) {
        itemDisplay.add(1);
    } else if (guibutton.id == 7) {
        itemDisplay.add(2);
    } else if (guibutton.id == 11) {
        itemDisplay.add(3);
    } else if (guibutton.id == 8) {
        GuiCheckBox button = (GuiCheckBox) guibutton;
        Configs.DISPLAY_POPUP = button.change();
        Configs.savePopupState();
    } else if (guibutton.id == 13 && itemDisplay.getSelectedItem() != null) {
        MainProxy.sendPacketToServer(PacketHandler.getPacket(RequestComponentPacket.class).setDimension(dimension).setStack(itemDisplay.getSelectedItem().getItem().makeStack(itemDisplay.getRequestCount())).setPosX(xCoord).setPosY(yCoord).setPosZ(zCoord));
    } else if (guibutton.id == 20) {
        itemDisplay.cycle();
    }
    super.actionPerformed(guibutton);
}
Also used : RequestComponentPacket(logisticspipes.network.packets.orderer.RequestComponentPacket) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox)

Example 2 with GuiCheckBox

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

the class GuiRequestTable method drawGuiContainerBackgroundLayer.

@Override
public void drawGuiContainerBackgroundLayer(float f, int i, int j) {
    for (GuiButton sycleButton : sycleButtons) {
        sycleButton.visible = _table.targetType != null;
    }
    GuiGraphics.drawGuiBackGround(mc, guiLeft, guiTop, right - (showRequest ? 0 : 105), bottom, zLevel, true);
    drawRect(guiLeft + 162, guiTop + 23, guiLeft + 182, guiTop + 43, Color.BLACK);
    drawRect(guiLeft + 164, guiTop + 25, guiLeft + 180, guiTop + 41, Color.DARKER_GREY);
    if (showRequest) {
        mc.fontRenderer.drawString(_title, guiLeft + 180 + mc.fontRenderer.getStringWidth(_title) / 2, guiTop + 6, 0x404040);
        itemDisplay.renderPageNumber(right - 47, guiTop + 6);
        if (buttonList.get(9) instanceof GuiCheckBox && ((GuiCheckBox) buttonList.get(9)).getState()) {
            mc.fontRenderer.drawString("Popup", guiLeft + 225, bottom - 56, 0x404040);
        } else {
            mc.fontRenderer.drawString("Popup", guiLeft + 225, bottom - 56, Color.getValue(Color.GREY));
        }
        itemDisplay.renderAmount(right - 103, bottom - 24, getStackAmount());
        //SearchInput
        search.renderSearchBar();
        itemDisplay.renderSortMode(right - 103, bottom - 52);
        itemDisplay.renderItemArea(zLevel);
    }
    for (int x = 0; x < 9; x++) {
        for (int y = 0; y < 3; y++) {
            GuiGraphics.drawSlotBackground(mc, guiLeft + (x * 18) + 19, guiTop + (y * 18) + 79);
        }
    }
    for (int x = 0; x < 3; x++) {
        for (int y = 0; y < 3; y++) {
            GuiGraphics.drawSlotBackground(mc, guiLeft + (x * 18) + 19, guiTop + (y * 18) + 14);
        }
    }
    mc.fontRenderer.drawString("Sort:", guiLeft + 136, guiTop + 55, 0xffffff);
    GuiGraphics.drawSlotBackground(mc, guiLeft + 100, guiTop + 32);
    GuiGraphics.drawSlotBackground(mc, guiLeft + 163, guiTop + 50);
    drawRect(guiLeft + 75, guiTop + 38, guiLeft + 95, guiTop + 43, Color.DARKER_GREY);
    for (int a = 0; a < 10; a++) {
        drawRect(guiLeft + 97 - a, guiTop + 40 - a, guiLeft + 98 - a, guiTop + 41 + a, Color.DARKER_GREY);
    }
    for (int a = 0; a < 15; a++) {
        drawRect(guiLeft + 164 + a, guiTop + 51 + a, guiLeft + 166 + a, guiTop + 53 + a, Color.DARKER_GREY);
        drawRect(guiLeft + 164 + a, guiTop + 65 - a, guiLeft + 166 + a, guiTop + 67 - a, Color.DARKER_GREY);
    }
    GuiGraphics.drawPlayerInventoryBackground(mc, guiLeft + 20, guiTop + 150);
    for (final Entry<Integer, Pair<IResource, LinkedLogisticsOrderList>> entry : _table.watchedRequests.entrySet()) {
        if (!handledExtention.get(entry.getKey())) {
            handledExtention.set(entry.getKey());
            extentionControllerLeft.addExtention(new GuiExtention() {

                private Map<Pair<Integer, Integer>, IOrderInfoProvider> ordererPosition = new HashMap<>();

                private int height;

                private int width = 4;

                private GuiButton localControlledButton;

                @SuppressWarnings("unchecked")
                @Override
                public void renderForground(int left, int top) {
                    if (!_table.watchedRequests.containsKey(entry.getKey())) {
                        extentionControllerLeft.removeExtention(this);
                        if (isFullyExtended() && localControlledButton != null) {
                            buttonList.remove(localControlledButton);
                            localControlledButton = null;
                            orderIdForButton = -1;
                        }
                        return;
                    }
                    ordererPosition.clear();
                    GL11.glEnable(GL12.GL_RESCALE_NORMAL);
                    OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, 240 / 1.0F, 240 / 1.0F);
                    GL11.glEnable(GL11.GL_LIGHTING);
                    GL11.glEnable(GL11.GL_DEPTH_TEST);
                    RenderHelper.enableGUIStandardItemLighting();
                    ItemStack stack = null;
                    IResource resource = entry.getValue().getValue1();
                    String s = null;
                    if (resource != null) {
                        stack = resource.getDisplayItem().makeNormalStack();
                        GuiScreen.itemRender.renderItemAndEffectIntoGUI(mc.fontRenderer, getMC().renderEngine, stack, left + 5, top + 5);
                        GuiScreen.itemRender.renderItemOverlayIntoGUI(mc.fontRenderer, getMC().renderEngine, stack, left + 5, top + 5, "");
                        s = StringUtils.getFormatedStackSize(stack.stackSize, false);
                    } else {
                        s = "List";
                    }
                    GL11.glDisable(GL11.GL_LIGHTING);
                    GL11.glDisable(GL11.GL_DEPTH_TEST);
                    GuiScreen.itemRender.zLevel = 0.0F;
                    // Draw number
                    mc.fontRenderer.drawStringWithShadow(s, left + 22 - mc.fontRenderer.getStringWidth(s), top + 14, 16777215);
                    if (isFullyExtended()) {
                        if (localControlledButton == null || orderIdForButton != entry.getKey()) {
                            if (localControlledButton != null) {
                                buttonList.remove(localControlledButton);
                            }
                            localControlledButton = new SmallGuiButton(100, guiLeft - 35, guiTop + 10, 30, 10, "more");
                            buttonList.add(localControlledButton);
                            orderIdForButton = entry.getKey();
                        }
                        List<IOrderInfoProvider> list = entry.getValue().getValue2().getList();
                        calculateSize(left, top, list);
                        String ident = "ID: " + Integer.toString(entry.getKey());
                        mc.fontRenderer.drawStringWithShadow(ident, left + 25, top + 7, 16777215);
                        int x = left + 6;
                        int y = top + 25;
                        for (IOrderInfoProvider order : list) {
                            stack = order.getAsDisplayItem().makeNormalStack();
                            if (stack.stackSize <= 0) {
                                continue;
                            }
                            GL11.glEnable(GL11.GL_LIGHTING);
                            GL11.glEnable(GL11.GL_DEPTH_TEST);
                            RenderHelper.enableGUIStandardItemLighting();
                            GuiScreen.itemRender.renderItemAndEffectIntoGUI(mc.fontRenderer, getMC().renderEngine, stack, x, y);
                            GuiScreen.itemRender.renderItemOverlayIntoGUI(mc.fontRenderer, getMC().renderEngine, stack, x, y, "");
                            s = StringUtils.getFormatedStackSize(stack.stackSize, false);
                            GL11.glDisable(GL11.GL_LIGHTING);
                            GL11.glDisable(GL11.GL_DEPTH_TEST);
                            GuiScreen.itemRender.zLevel = 0.0F;
                            // Draw number
                            mc.fontRenderer.drawStringWithShadow(s, x + 17 - mc.fontRenderer.getStringWidth(s), y + 9, 16777215);
                            ordererPosition.put(new Pair<>(x, y), order);
                            x += 18;
                            if (x > left + getFinalWidth() - 18) {
                                x = left + 6;
                                y += 18;
                            }
                        }
                    } else if (isExtending()) {
                        List<IOrderInfoProvider> list = entry.getValue().getValue2().getList();
                        calculateSize(left, top, list);
                    }
                    if (!isFullyExtended() && localControlledButton != null) {
                        buttonList.remove(localControlledButton);
                        localControlledButton = null;
                        orderIdForButton = -1;
                    }
                    RenderHelper.disableStandardItemLighting();
                }

                private void calculateSize(int left, int top, List<IOrderInfoProvider> list) {
                    int x = left + 6;
                    int y = 50;
                    int line = 1;
                    width = 4;
                    for (IOrderInfoProvider order : list) {
                        ItemStack stack = order.getAsDisplayItem().makeNormalStack();
                        if (stack.stackSize <= 0) {
                            continue;
                        }
                        if (line++ % (4 * 4) == 0) {
                            width++;
                        }
                    }
                    for (IOrderInfoProvider order : list) {
                        ItemStack stack = order.getAsDisplayItem().makeNormalStack();
                        if (stack.stackSize <= 0) {
                            continue;
                        }
                        x += 18;
                        if (x > left + getFinalWidth() - 18) {
                            x = left + 6;
                            y += 18;
                        }
                    }
                    height = y;
                    if (x == left + 6) {
                        height -= 18;
                    }
                }

                @Override
                public int getFinalWidth() {
                    return Math.max(85, width * 18 + 8);
                }

                @Override
                public int getFinalHeight() {
                    return Math.max(50, height);
                }

                @Override
                public void handleMouseOverAt(int xPos, int yPos) {
                    if (isFullyExtended()) {
                        ordererPosition.keySet().stream().filter(key -> xPos >= key.getValue1() && xPos < key.getValue1() + 18 && yPos >= key.getValue2() && yPos < key.getValue2() + 18).forEach(key -> {
                            IOrderInfoProvider order = ordererPosition.get(key);
                            List<String> list = new ArrayList<>();
                            list.add(ChatColor.BLUE + "Request Type: " + ChatColor.YELLOW + order.getType().name());
                            list.add(ChatColor.BLUE + "Send to Router ID: " + ChatColor.YELLOW + order.getRouterId());
                            GuiGraphics.displayItemToolTip(new Object[] { xPos - 10, yPos, order.getAsDisplayItem().makeNormalStack(), true, list }, zLevel, guiLeft, guiTop, false);
                        });
                    } else {
                        List<String> list = new ArrayList<>();
                        list.add(ChatColor.BLUE + "Request ID: " + ChatColor.YELLOW + entry.getKey());
                        GuiGraphics.displayItemToolTip(new Object[] { xPos - 10, yPos, entry.getValue().getValue1().getDisplayItem().makeNormalStack(), true, list }, zLevel, guiLeft, guiTop, false);
                    }
                }
            });
        }
    }
    super.renderExtentions();
}
Also used : OpenGlHelper(net.minecraft.client.renderer.OpenGlHelper) CraftingCycleRecipe(logisticspipes.network.packets.block.CraftingCycleRecipe) IOrderInfoProvider(logisticspipes.routing.order.IOrderInfoProvider) LogisticsPipes(logisticspipes.LogisticsPipes) IItemSearch(logisticspipes.utils.gui.IItemSearch) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox) Keyboard(org.lwjgl.input.Keyboard) MainProxy(logisticspipes.proxy.MainProxy) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiExtention(logisticspipes.utils.gui.extention.GuiExtention) Configs(logisticspipes.config.Configs) LogisticsBaseGuiScreen(logisticspipes.utils.gui.LogisticsBaseGuiScreen) ItemDisplay(logisticspipes.utils.gui.ItemDisplay) RequestMonitorPopup(logisticspipes.gui.popup.RequestMonitorPopup) Locale(java.util.Locale) Map(java.util.Map) GuiRequestPopup(logisticspipes.gui.popup.GuiRequestPopup) RenderHelper(net.minecraft.client.renderer.RenderHelper) PipeBlockRequestTable(logisticspipes.pipes.PipeBlockRequestTable) GL12(org.lwjgl.opengl.GL12) GL11(org.lwjgl.opengl.GL11) RequestSubmitListPacket(logisticspipes.network.packets.orderer.RequestSubmitListPacket) OrdererRefreshRequestPacket(logisticspipes.network.packets.orderer.OrdererRefreshRequestPacket) ChainAddArrayList(logisticspipes.utils.ChainAddArrayList) LinkedLogisticsOrderList(logisticspipes.routing.order.LinkedLogisticsOrderList) GuiButton(net.minecraft.client.gui.GuiButton) Collection(java.util.Collection) ItemIdentifier(logisticspipes.utils.item.ItemIdentifier) PacketHandler(logisticspipes.network.PacketHandler) Collectors(java.util.stream.Collectors) EnchantmentHelper(net.minecraft.enchantment.EnchantmentHelper) List(java.util.List) EntityPlayer(net.minecraft.entity.player.EntityPlayer) Pair(logisticspipes.utils.tuples.Pair) Entry(java.util.Map.Entry) DummyContainer(logisticspipes.utils.gui.DummyContainer) Enchantment(net.minecraft.enchantment.Enchantment) ISpecialItemRenderer(logisticspipes.interfaces.ISpecialItemRenderer) HashMap(java.util.HashMap) Color(logisticspipes.utils.Color) RequestSubmitPacket(logisticspipes.network.packets.orderer.RequestSubmitPacket) StringUtils(logisticspipes.utils.string.StringUtils) ArrayList(java.util.ArrayList) ItemStack(net.minecraft.item.ItemStack) RequestComponentPacket(logisticspipes.network.packets.orderer.RequestComponentPacket) GuiDiskPopup(logisticspipes.gui.popup.GuiDiskPopup) SearchBar(logisticspipes.utils.gui.SearchBar) DiskRequestConectPacket(logisticspipes.network.packets.orderer.DiskRequestConectPacket) ISubGuiControler(logisticspipes.utils.gui.ISubGuiControler) ChatColor(logisticspipes.utils.string.ChatColor) Iterator(java.util.Iterator) IChainAddList(logisticspipes.interfaces.IChainAddList) IResource(logisticspipes.request.resources.IResource) IDiskProvider(logisticspipes.interfaces.IDiskProvider) GuiScreen(net.minecraft.client.gui.GuiScreen) ItemIdentifierStack(logisticspipes.utils.item.ItemIdentifierStack) ClearCraftingGridPacket(logisticspipes.network.packets.block.ClearCraftingGridPacket) BitSet(java.util.BitSet) GuiGraphics(logisticspipes.utils.gui.GuiGraphics) HashMap(java.util.HashMap) IOrderInfoProvider(logisticspipes.routing.order.IOrderInfoProvider) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiButton(net.minecraft.client.gui.GuiButton) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox) GuiExtention(logisticspipes.utils.gui.extention.GuiExtention) ChainAddArrayList(logisticspipes.utils.ChainAddArrayList) LinkedLogisticsOrderList(logisticspipes.routing.order.LinkedLogisticsOrderList) List(java.util.List) ArrayList(java.util.ArrayList) IChainAddList(logisticspipes.interfaces.IChainAddList) ItemStack(net.minecraft.item.ItemStack) IResource(logisticspipes.request.resources.IResource) Pair(logisticspipes.utils.tuples.Pair)

Example 3 with GuiCheckBox

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

the class GuiRequestTable method actionPerformed.

@Override
protected void actionPerformed(GuiButton guibutton) {
    if (guibutton.id == 0 && itemDisplay.getSelectedItem() != null) {
        MainProxy.sendPacketToServer(PacketHandler.getPacket(RequestSubmitPacket.class).setDimension(dimension).setStack(itemDisplay.getSelectedItem().getItem().makeStack(itemDisplay.getRequestCount())).setTilePos(_table.container));
        refreshItems();
    } else if (guibutton.id == 1) {
        itemDisplay.nextPage();
    } else if (guibutton.id == 2) {
        itemDisplay.prevPage();
    } else if (guibutton.id == 3) {
        refreshItems();
    } else if (guibutton.id == 10) {
        itemDisplay.sub(3);
    } else if (guibutton.id == 4) {
        itemDisplay.sub(2);
    } else if (guibutton.id == 5) {
        itemDisplay.sub(1);
    } else if (guibutton.id == 6) {
        itemDisplay.add(1);
    } else if (guibutton.id == 7) {
        itemDisplay.add(2);
    } else if (guibutton.id == 11) {
        itemDisplay.add(3);
    } else if (guibutton.id == 8) {
        GuiCheckBox button = (GuiCheckBox) guibutton;
        Configs.DISPLAY_POPUP = button.change();
        Configs.savePopupState();
    } else if (guibutton.id == 13 && itemDisplay.getSelectedItem() != null) {
        MainProxy.sendPacketToServer(PacketHandler.getPacket(RequestComponentPacket.class).setDimension(dimension).setStack(itemDisplay.getSelectedItem().getItem().makeStack(itemDisplay.getRequestCount())).setTilePos(_table.container));
    } else if (guibutton.id == 9) {
        String displayString = "";
        switch(displayOptions) {
            case Both:
                displayOptions = DisplayOptions.CraftOnly;
                displayString = "Craft";
                break;
            case CraftOnly:
                displayOptions = DisplayOptions.SupplyOnly;
                displayString = "Supply";
                break;
            case SupplyOnly:
                displayOptions = DisplayOptions.Both;
                displayString = "Both";
                break;
        }
        guibutton.displayString = displayString;
        refreshItems();
    } else if (guibutton.id == 14) {
        requestMatrix(1);
    } else if (guibutton.id == 15) {
        requestMatrix(10);
    } else if (guibutton.id == 16) {
        requestMatrix(64);
    } else if (guibutton.id == 17) {
        //hideShowButton
        // moveWhileSmall
        showRequest = !showRequest;
        if (showRequest) {
            xSize = startXSize;
            guiLeft = startLeft;
            for (GuiButton button : moveWhileSmall) {
                button.xPosition -= 105;
            }
            hideShowButton.xPosition -= 90;
        } else {
            xSize = startXSize - 210;
            guiLeft = startLeft + 105;
            for (GuiButton button : moveWhileSmall) {
                button.xPosition += 105;
            }
            hideShowButton.xPosition += 90;
        }
        hideShowButton.displayString = showRequest ? "Hide" : "Show";
        for (GuiButton button : hideWhileSmall) {
            button.visible = showRequest;
        }
        Macrobutton.visible = showRequest;
        orderIdForButton = -1;
    } else if (guibutton.id == 100) {
        extentionControllerLeft.retract();
        setSubGui(new RequestMonitorPopup(_table, orderIdForButton));
    } else if (guibutton.id == 18) {
        MainProxy.sendPacketToServer(PacketHandler.getPacket(DiskRequestConectPacket.class).setPosX(_table.getX()).setPosY(_table.getY()).setPosZ(_table.getZ()));
        setSubGui(new GuiDiskPopup(this));
    } else if (guibutton.id == 20) {
        itemDisplay.cycle();
    } else if (guibutton.id == 21 || guibutton.id == 22) {
        MainProxy.sendPacketToServer(PacketHandler.getPacket(CraftingCycleRecipe.class).setDown(guibutton.id == 22).setTilePos(_table.container));
    } else if (guibutton.id == 30) {
        MainProxy.sendPacketToServer(PacketHandler.getPacket(ClearCraftingGridPacket.class).setTilePos(_table.container));
        _table.cacheRecipe();
    } else if (guibutton.id == 31) {
        ArrayList<ItemIdentifierStack> list = new ArrayList<>(9);
        list.addAll(_table.matrix.getItemsAndCount().entrySet().stream().map(e -> e.getKey().makeStack(e.getValue())).collect(Collectors.toList()));
        for (Pair<ItemStack, Integer> entry : _table.inv) {
            if (entry.getValue1() == null)
                continue;
            int size = entry.getValue1().stackSize;
            ItemIdentifier ident = ItemIdentifier.get(entry.getValue1());
            for (ItemIdentifierStack stack : list) {
                if (!stack.getItem().equals(ident))
                    continue;
                int toUse = Math.min(size, stack.getStackSize());
                stack.lowerStackSize(toUse);
                size -= toUse;
            }
        }
        Iterator<ItemIdentifierStack> iter = list.iterator();
        while (iter.hasNext()) {
            if (iter.next().getStackSize() <= 0) {
                iter.remove();
            }
        }
        if (!list.isEmpty()) {
            MainProxy.sendPacketToServer(PacketHandler.getPacket(RequestSubmitListPacket.class).setIdentList(list).setTilePos(_table.container));
            refreshItems();
        }
    }
}
Also used : GuiDiskPopup(logisticspipes.gui.popup.GuiDiskPopup) ChainAddArrayList(logisticspipes.utils.ChainAddArrayList) ArrayList(java.util.ArrayList) CraftingCycleRecipe(logisticspipes.network.packets.block.CraftingCycleRecipe) ClearCraftingGridPacket(logisticspipes.network.packets.block.ClearCraftingGridPacket) RequestMonitorPopup(logisticspipes.gui.popup.RequestMonitorPopup) ItemIdentifier(logisticspipes.utils.item.ItemIdentifier) RequestSubmitListPacket(logisticspipes.network.packets.orderer.RequestSubmitListPacket) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiButton(net.minecraft.client.gui.GuiButton) RequestComponentPacket(logisticspipes.network.packets.orderer.RequestComponentPacket) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox) ItemIdentifierStack(logisticspipes.utils.item.ItemIdentifierStack) ItemStack(net.minecraft.item.ItemStack)

Example 4 with GuiCheckBox

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

the class GuiHUDSettings method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    if (player.inventory.getStackInSlot(slot) != null) {
        IHUDConfig config = new HUDConfig(player.inventory.getStackInSlot(slot));
        buttonList.add(new GuiCheckBox(0, guiLeft + 30, guiTop + 10, 12, 12, config.isHUDChassie()));
        buttonList.add(new GuiCheckBox(1, guiLeft + 30, guiTop + 30, 12, 12, config.isHUDCrafting()));
        buttonList.add(new GuiCheckBox(2, guiLeft + 30, guiTop + 50, 12, 12, config.isHUDInvSysCon()));
        buttonList.add(new GuiCheckBox(3, guiLeft + 30, guiTop + 70, 12, 12, config.isHUDPowerLevel()));
        buttonList.add(new GuiCheckBox(4, guiLeft + 30, guiTop + 90, 12, 12, config.isHUDProvider()));
        buttonList.add(new GuiCheckBox(5, guiLeft + 30, guiTop + 110, 12, 12, config.isHUDSatellite()));
    } else {
        closeGui();
    }
}
Also used : IHUDConfig(logisticspipes.interfaces.IHUDConfig) HUDConfig(logisticspipes.hud.HUDConfig) IHUDConfig(logisticspipes.interfaces.IHUDConfig) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox)

Example 5 with GuiCheckBox

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

the class GuiSecurityStationPopup method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiCheckBox(0, guiLeft + 110, guiTop + 26, 16, 16, false));
    buttonList.add(new GuiCheckBox(1, guiLeft + 110, guiTop + 41, 16, 16, false));
    buttonList.add(new GuiCheckBox(2, guiLeft + 110, guiTop + 56, 16, 16, false));
    buttonList.add(new GuiCheckBox(3, guiLeft + 110, guiTop + 71, 16, 16, false));
    buttonList.add(new GuiCheckBox(4, guiLeft + 110, guiTop + 86, 16, 16, false));
    buttonList.add(new SmallGuiButton(5, guiLeft + 94, guiTop + 103, 30, 10, StringUtils.translate(GuiSecurityStationPopup.PREFIX + "Close")));
    refreshCheckBoxes();
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) GuiCheckBox(logisticspipes.utils.gui.GuiCheckBox)

Aggregations

GuiCheckBox (logisticspipes.utils.gui.GuiCheckBox)9 SmallGuiButton (logisticspipes.utils.gui.SmallGuiButton)6 GuiButton (net.minecraft.client.gui.GuiButton)5 RequestComponentPacket (logisticspipes.network.packets.orderer.RequestComponentPacket)3 ArrayList (java.util.ArrayList)2 GuiDiskPopup (logisticspipes.gui.popup.GuiDiskPopup)2 RequestMonitorPopup (logisticspipes.gui.popup.RequestMonitorPopup)2 ClearCraftingGridPacket (logisticspipes.network.packets.block.ClearCraftingGridPacket)2 CraftingCycleRecipe (logisticspipes.network.packets.block.CraftingCycleRecipe)2 RequestSubmitListPacket (logisticspipes.network.packets.orderer.RequestSubmitListPacket)2 ChainAddArrayList (logisticspipes.utils.ChainAddArrayList)2 ItemDisplay (logisticspipes.utils.gui.ItemDisplay)2 SearchBar (logisticspipes.utils.gui.SearchBar)2 ItemIdentifier (logisticspipes.utils.item.ItemIdentifier)2 ItemIdentifierStack (logisticspipes.utils.item.ItemIdentifierStack)2 ItemStack (net.minecraft.item.ItemStack)2 BitSet (java.util.BitSet)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 Iterator (java.util.Iterator)1