Search in sources :

Example 86 with GuiButton

use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.

the class GuiRequestPopup method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiButton(0, xCenter - 55, bottom - 25, 50, 20, "OK"));
    buttonList.add(new GuiButton(1, xCenter + 5, bottom - 25, 50, 20, "Log"));
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton)

Example 87 with GuiButton

use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.

the class GuiAdvancedExtractor method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    //Default item toggle:
    buttonList.clear();
    buttonList.add(new GuiStringHandlerButton(0, width / 2 + 20, height / 2 - 34, 60, 20, () -> _advancedExtractor.areItemsIncluded() ? "Included" : "Excluded"));
    buttonList.add(new GuiButton(1, width / 2 - 25, height / 2 - 34, 40, 20, "Sneaky"));
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiStringHandlerButton(logisticspipes.utils.gui.GuiStringHandlerButton)

Example 88 with GuiButton

use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.

the class GuiProvider method initGui.

@SuppressWarnings("unchecked")
@Override
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiStringHandlerButton(0, width / 2 + 40, height / 2 - 59, 45, 20, () -> _provider.isExcludeFilter() ? "Exclude" : "Include"));
    /*
		buttonList.add(new GuiStringHandlerButton(2, width / 2 + 50, height / 2 - 38, 45, 20, new GuiStringHandlerButton.StringHandler() {
		@Override
		public String getContent() {
			return _provider.isActive() ? "Send" : "Hold";
		}
		}));
		 */
    buttonList.add(new GuiButton(1, width / 2 - 90, height / 2 - 41, 38, 20, "Switch"));
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiStringHandlerButton(logisticspipes.utils.gui.GuiStringHandlerButton)

Example 89 with GuiButton

use of net.minecraft.client.gui.GuiButton in project LogisticsPipes by RS485.

the class RequestMonitorPopup method initGui.

@Override
@SuppressWarnings("unchecked")
public void initGui() {
    super.initGui();
    buttonList.clear();
    buttonList.add(new GuiButton(0, width / 2 - 90, height / 2 + 74, 80, 20, "Close"));
    buttonList.add(new GuiButton(1, width / 2 + 10, height / 2 + 74, 80, 20, "Save as Image"));
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton)

Example 90 with GuiButton

use of net.minecraft.client.gui.GuiButton in project AgriCraft by AgriCraft.

the class GuiPeripheral method updateButtons.

private void updateButtons() {
    for (int i = 1; i < buttonList.size(); i++) {
        Object obj = buttonList.get(i);
        if (obj == null) {
            continue;
        }
        GuiButton button = (GuiButton) obj;
        if (button instanceof GuiButtonMethod) {
            if (!guideActive) {
                ((GuiButtonMethod) button).disable();
            } else {
                int index = i - BUTTON_ID_SCROLL_TOP - 1;
                if (index >= scrollPosition && index < scrollPosition + BUTTON_AMOUNT) {
                    ((GuiButtonMethod) button).enable(this.guiTop + 8 + 16 * (index - scrollPosition));
                } else {
                    ((GuiButtonMethod) button).disable();
                }
            }
        } else {
            button.visible = guideActive;
        }
    }
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton)

Aggregations

GuiButton (net.minecraft.client.gui.GuiButton)132 GuiTextField (net.minecraft.client.gui.GuiTextField)17 SmallGuiButton (logisticspipes.utils.gui.SmallGuiButton)12 ArrayList (java.util.ArrayList)10 ItemStack (net.minecraft.item.ItemStack)9 Point (java.awt.Point)7 GuiElementInfoRegionMP (stevekung.mods.moreplanets.util.client.gui.GuiElementInfoRegionMP)7 ItemDisplay (logisticspipes.utils.gui.ItemDisplay)6 GuiCheckBox (logisticspipes.utils.gui.GuiCheckBox)5 Bounds (ivorius.reccomplex.gui.table.Bounds)4 Rectangle (java.awt.Rectangle)4 SearchBar (logisticspipes.utils.gui.SearchBar)4 ItemIdentifierStack (logisticspipes.utils.item.ItemIdentifierStack)3 GuiButtonVariableDims (am2.guis.controls.GuiButtonVariableDims)2 GuiSlideControl (am2.guis.controls.GuiSlideControl)2 IOException (java.io.IOException)2 BitSet (java.util.BitSet)2 GuiDiskPopup (logisticspipes.gui.popup.GuiDiskPopup)2 RequestMonitorPopup (logisticspipes.gui.popup.RequestMonitorPopup)2 ClearCraftingGridPacket (logisticspipes.network.packets.block.ClearCraftingGridPacket)2