Search in sources :

Example 1 with GuiSorterFilerSelect

use of mekanism.client.gui.element.window.filter.transporter.GuiSorterFilerSelect in project Mekanism by mekanism.

the class GuiLogisticalSorter method addGuiElements.

@Override
protected void addGuiElements() {
    super.addGuiElements();
    addButton(new GuiSlot(SlotType.NORMAL, this, 12, 136).setRenderAboveSlots());
    addButton(new TranslationButton(this, 56, 136, 96, 20, MekanismLang.BUTTON_NEW_FILTER, () -> addWindow(new GuiSorterFilerSelect(this, tile))));
    addButton(new MekanismImageButton(this, 12, 58, 14, getButtonLocation("single"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.SINGLE_ITEM_BUTTON, tile)), getOnHover(MekanismLang.SORTER_SINGLE_ITEM_DESCRIPTION)));
    addButton(new MekanismImageButton(this, 12, 84, 14, getButtonLocation("round_robin"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.ROUND_ROBIN_BUTTON, tile)), getOnHover(MekanismLang.SORTER_ROUND_ROBIN_DESCRIPTION)));
    addButton(new MekanismImageButton(this, 12, 110, 14, getButtonLocation("auto_eject"), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.AUTO_EJECT_BUTTON, tile)), getOnHover(MekanismLang.SORTER_AUTO_EJECT_DESCRIPTION)));
    addButton(new ColorButton(this, 13, 137, 16, 16, () -> tile.color, () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.CHANGE_COLOR, tile, hasShiftDown() ? -1 : TransporterUtils.getColorIndex(TransporterUtils.increment(tile.color)))), () -> Mekanism.packetHandler.sendToServer(new PacketGuiInteract(GuiInteraction.CHANGE_COLOR, tile, TransporterUtils.getColorIndex(TransporterUtils.decrement(tile.color))))));
}
Also used : ColorButton(mekanism.client.gui.element.button.ColorButton) TranslationButton(mekanism.client.gui.element.button.TranslationButton) GuiSlot(mekanism.client.gui.element.slot.GuiSlot) MekanismImageButton(mekanism.client.gui.element.button.MekanismImageButton) PacketGuiInteract(mekanism.common.network.to_server.PacketGuiInteract) GuiSorterFilerSelect(mekanism.client.gui.element.window.filter.transporter.GuiSorterFilerSelect)

Aggregations

ColorButton (mekanism.client.gui.element.button.ColorButton)1 MekanismImageButton (mekanism.client.gui.element.button.MekanismImageButton)1 TranslationButton (mekanism.client.gui.element.button.TranslationButton)1 GuiSlot (mekanism.client.gui.element.slot.GuiSlot)1 GuiSorterFilerSelect (mekanism.client.gui.element.window.filter.transporter.GuiSorterFilerSelect)1 PacketGuiInteract (mekanism.common.network.to_server.PacketGuiInteract)1