Search in sources :

Example 6 with SmallGuiButton

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

the class GuiChassiPipe method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    left = width / 2 - xSize / 2;
    top = height / 2 - ySize / 2;
    buttonList.clear();
    for (int i = 0; i < _chassiPipe.getChassiSize(); i++) {
        buttonList.add(new SmallGuiButton(i, left + 5, top + 12 + 20 * i, 10, 10, "!"));
        if (_moduleInventory == null) {
            continue;
        }
        ItemStack module = _moduleInventory.getStackInSlot(i);
        if (module == null || _chassiPipe.getLogisticsModule().getSubModule(i) == null) {
            ((SmallGuiButton) buttonList.get(i)).visible = false;
        } else {
            ((SmallGuiButton) buttonList.get(i)).visible = _chassiPipe.getLogisticsModule().getSubModule(i).hasGui();
        }
    }
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) ItemStack(net.minecraft.item.ItemStack)

Example 7 with SmallGuiButton

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

the class GuiFluidSupplierMk2Pipe method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiButton(0, width / 2 - 48, guiTop + ySize - 115, 30, 20, logic.isRequestingPartials() ? StringUtils.translate(GuiFluidSupplierMk2Pipe.PREFIX + "Yes") : StringUtils.translate(GuiFluidSupplierMk2Pipe.PREFIX + "No")));
    buttonList.add(new GuiButton(1, width / 2 + 30, guiTop + ySize - 115, 55, 20, StringUtils.translate(GuiFluidSupplierMk2Pipe.PREFIX + logic.getMinMode().name())));
    buttonList.add(new SmallGuiButton(10, guiLeft + 40, guiTop + 37, 10, 10, "1"));
    buttonList.add(new SmallGuiButton(11, guiLeft + 40, guiTop + 48, 10, 10, "1"));
    buttonList.add(new SmallGuiButton(20, guiLeft + 51, guiTop + 37, 20, 10, "10"));
    buttonList.add(new SmallGuiButton(21, guiLeft + 51, guiTop + 48, 20, 10, "10"));
    buttonList.add(new SmallGuiButton(30, guiLeft + 72, guiTop + 37, 30, 10, "100"));
    buttonList.add(new SmallGuiButton(31, guiLeft + 72, guiTop + 48, 30, 10, "100"));
    buttonList.add(new SmallGuiButton(40, guiLeft + 103, guiTop + 37, 40, 10, "1000"));
    buttonList.add(new SmallGuiButton(41, guiLeft + 103, guiTop + 48, 40, 10, "1000"));
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton) SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton)

Example 8 with SmallGuiButton

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

the class GuiLogisticsCraftingTable method initGui.

@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    (sycleButtons[0] = addButton(new SmallGuiButton(0, guiLeft + 144, guiTop + 25, 15, 10, "/\\"))).visible = false;
    (sycleButtons[1] = addButton(new SmallGuiButton(1, guiLeft + 144, guiTop + 37, 15, 10, "\\/"))).visible = false;
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton)

Example 9 with SmallGuiButton

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

the class GuiCCBasedQuickSort method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    int left = width / 2 - xSize / 2;
    int top = height / 2 - ySize / 2;
    buttonList.add(new SmallGuiButton(0, left + 18, top + 22, 15, 10, "++"));
    buttonList.add(new SmallGuiButton(1, left + 18, top + 37, 15, 10, "+"));
    buttonList.add(new SmallGuiButton(2, left + 87, top + 22, 15, 10, "--"));
    buttonList.add(new SmallGuiButton(3, left + 87, top + 37, 15, 10, "-"));
}
Also used : SmallGuiButton(logisticspipes.utils.gui.SmallGuiButton)

Example 10 with SmallGuiButton

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

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