Search in sources :

Example 11 with GuiCheckBox

use of me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox in project pnc-repressurized by TeamPneumatic.

the class GuiProgWidgetBlockRightClick method initGui.

@Override
public void initGui() {
    super.initGui();
    checkboxSneaking = new GuiCheckBox(15, guiLeft + 100, guiTop + 20, 0xFF000000, I18n.format("gui.progWidget.blockRightClick.sneaking"));
    checkboxSneaking.setChecked(widget.isSneaking());
    checkboxSneaking.setTooltip(I18n.format("gui.progWidget.blockRightClick.sneaking.tooltip"));
    addWidget(checkboxSneaking);
}
Also used : GuiCheckBox(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)

Example 12 with GuiCheckBox

use of me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox in project pnc-repressurized by TeamPneumatic.

the class GuiProgWidgetDigAndPlace method initGui.

@Override
public void initGui() {
    super.initGui();
    List<GuiRadioButton> radioButtons = new ArrayList<>();
    ProgWidgetDigAndPlace.EnumOrder[] orders = ProgWidgetDigAndPlace.EnumOrder.values();
    for (int i = 0; i < orders.length; i++) {
        GuiRadioButton radioButton = new GuiRadioButton(i, guiLeft + 4, guiTop + 30 + i * 12, 0xFF404040, orders[i].getLocalizedName());
        radioButton.checked = orders[i] == widget.getOrder();
        addWidget(radioButton);
        radioButtons.add(radioButton);
        radioButton.otherChoices = radioButtons;
    }
    useMaxActions = new GuiCheckBox(16, guiLeft + (moveActionsToSide() ? 54 : 4), guiTop + 115, 0xFF404040, I18n.format("gui.progWidget.digAndPlace.useMaxActions"));
    useMaxActions.setTooltip("gui.progWidget.digAndPlace.useMaxActions.tooltip");
    useMaxActions.checked = widget.useMaxActions();
    addWidget(useMaxActions);
    textField = new WidgetTextFieldNumber(Minecraft.getMinecraft().fontRenderer, guiLeft + (moveActionsToSide() ? 57 : 7), guiTop + 128, 50, 11);
    textField.setValue(widget.getMaxActions());
    textField.setEnabled(useMaxActions.checked);
    addWidget(textField);
}
Also used : WidgetTextFieldNumber(me.desht.pneumaticcraft.client.gui.widget.WidgetTextFieldNumber) ArrayList(java.util.ArrayList) GuiRadioButton(me.desht.pneumaticcraft.client.gui.widget.GuiRadioButton) GuiCheckBox(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)

Example 13 with GuiCheckBox

use of me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox in project pnc-repressurized by TeamPneumatic.

the class GuiRemoteEditor method initGui.

@Override
public void initGui() {
    if (pastebinGui != null && pastebinGui.outputTag != null) {
        NBTTagCompound tag = remote.getTagCompound();
        if (tag == null) {
            tag = new NBTTagCompound();
            remote.setTagCompound(tag);
        }
        tag.setTag("actionWidgets", pastebinGui.outputTag.getTagList("main", 10));
    } else if (remoteLayout != null) {
        NBTTagCompound tag = remote.getTagCompound();
        if (tag == null) {
            tag = new NBTTagCompound();
            remote.setTagCompound(tag);
        }
        tag.setTag("actionWidgets", remoteLayout.toNBT(oldGuiLeft, oldGuiTop).getTagList("actionWidgets", 10));
    }
    if (invSearchGui != null && invSearchGui.getSearchStack() != null && invSearchGui.getSearchStack().getItem() == Itemss.REMOTE) {
        if (ItemRemote.hasSameSecuritySettings(remote, invSearchGui.getSearchStack())) {
            remoteLayout = new RemoteLayout(invSearchGui.getSearchStack(), guiLeft, guiTop);
        } else {
            mc.player.sendStatusMessage(new TextComponentString("gui.remote.differentSecuritySettings"), false);
        }
    }
    super.initGui();
    oldGuiLeft = guiLeft;
    oldGuiTop = guiTop;
    visibleSpawnWidgets.clear();
    visibleSpawnWidgets.add(new ActionWidgetCheckBox(new GuiCheckBox(-1, guiLeft + 200, guiTop + 10, 0xFF000000, I18n.format("remote.checkbox.name"))));
    visibleSpawnWidgets.add(new ActionWidgetLabel(new WidgetLabelVariable(guiLeft + 200, guiTop + 25, I18n.format("remote.label.name"))));
    visibleSpawnWidgets.add(new ActionWidgetButton(new GuiButtonSpecial(-1, guiLeft + 200, guiTop + 40, 50, 20, I18n.format("remote.button.name"))));
    visibleSpawnWidgets.add(new ActionWidgetDropdown(new WidgetComboBox(fontRenderer, guiLeft + 200, guiTop + 70, 70, fontRenderer.FONT_HEIGHT + 1).setFixedOptions()));
    for (ActionWidget actionWidget : visibleSpawnWidgets) {
        addWidget(actionWidget.getWidget());
    }
    GuiButtonSpecial importRemoteButton = new GuiButtonSpecial(0, guiLeft - 24, guiTop + 20, 20, 20, "");
    importRemoteButton.setTooltipText(I18n.format("gui.remote.button.importRemoteButton"));
    importRemoteButton.setRenderStacks(new ItemStack(Itemss.REMOTE));
    buttonList.add(importRemoteButton);
    GuiButtonSpecial pastebinButton = new GuiButtonSpecial(1, guiLeft - 24, guiTop + 44, 20, 20, "");
    pastebinButton.setTooltipText(I18n.format("gui.remote.button.pastebinButton"));
    // pastebinButton.setRenderStacks(new ItemStack(Itemss.advancedPCB));
    pastebinButton.setRenderedIcon(Textures.GUI_PASTEBIN_ICON_LOCATION);
    buttonList.add(pastebinButton);
}
Also used : PacketUpdateRemoteLayout(me.desht.pneumaticcraft.common.network.PacketUpdateRemoteLayout) NBTTagCompound(net.minecraft.nbt.NBTTagCompound) TextComponentString(net.minecraft.util.text.TextComponentString) GuiCheckBox(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox) ItemStack(net.minecraft.item.ItemStack) WidgetComboBox(me.desht.pneumaticcraft.client.gui.widget.WidgetComboBox)

Example 14 with GuiCheckBox

use of me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox in project pnc-repressurized by TeamPneumatic.

the class GuiWidgetCoordinateCondition method initGui.

@Override
public void initGui() {
    super.initGui();
    checkingAxis[0] = new GuiCheckBox(0, guiLeft + 10, guiTop + 30, 0xFF404040, "X");
    checkingAxis[1] = new GuiCheckBox(1, guiLeft + 10, guiTop + 42, 0xFF404040, "Y");
    checkingAxis[2] = new GuiCheckBox(2, guiLeft + 10, guiTop + 54, 0xFF404040, "Z");
    for (int i = 0; i < 3; i++) {
        checkingAxis[i] = new GuiCheckBox(i, guiLeft + 10, guiTop + 30 + i * 12, 0xFF404040, i == 0 ? "X" : i == 1 ? "Y" : "Z");
        addWidget(checkingAxis[i]);
        checkingAxis[i].setChecked(widget.checkingAxis[i]);
    }
    radioButtons = new ArrayList<>();
    for (int i = 0; i < ICondition.Operator.values().length; i++) {
        GuiRadioButton radioButton = new GuiRadioButton(3 + i, guiLeft + 80, guiTop + 30 + i * 12, 0xFF404040, ICondition.Operator.values()[i].toString());
        radioButton.checked = widget.getOperator().ordinal() == i;
        addWidget(radioButton);
        radioButtons.add(radioButton);
        radioButton.otherChoices = radioButtons;
    }
}
Also used : GuiCheckBox(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox) GuiRadioButton(me.desht.pneumaticcraft.client.gui.widget.GuiRadioButton)

Example 15 with GuiCheckBox

use of me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox in project pnc-repressurized by TeamPneumatic.

the class GuiLogisticsBase method initGui.

@Override
public void initGui() {
    super.initGui();
    if (searchGui != null) {
        inventorySlots.getSlot(editingSlot).putStack(searchGui.getSearchStack());
        NetworkHandler.sendToServer(new PacketSetLogisticsFilterStack(logistics, searchGui.getSearchStack(), editingSlot));
        searchGui = null;
    }
    if (fluidSearchGui != null && fluidSearchGui.getFilter() != null) {
        FluidStack filter = new FluidStack(fluidSearchGui.getFilter(), 1000);
        logistics.setFilter(editingSlot, filter);
        NetworkHandler.sendToServer(new PacketSetLogisticsFluidFilterStack(logistics, filter, editingSlot));
        fluidSearchGui = null;
    }
    String invisibleText = I18n.format("gui.logistic_frame.invisible");
    addWidget(invisible = new GuiCheckBox(9, guiLeft + xSize - 15 - fontRenderer.getStringWidth(invisibleText), guiTop + 7, 0xFF404040, invisibleText));
    invisible.setTooltip(Arrays.asList(WordUtils.wrap(I18n.format("gui.logistic_frame.invisible.tooltip"), 40).split(System.getProperty("line.separator"))));
    addWidget(new WidgetLabel(guiLeft + 8, guiTop + 18, I18n.format(String.format("gui.%s.filters", SemiBlockManager.getKeyForSemiBlock(logistics)))));
    addWidget(new WidgetLabel(guiLeft + 8, guiTop + 90, I18n.format("gui.logistic_frame.liquid")));
    for (int i = 0; i < 9; i++) {
        addWidget(new WidgetFluidStack(i, guiLeft + i * 18 + 8, guiTop + 101, logistics.getTankFilter(i)));
    }
    addInfoTab(I18n.format("gui.tab.info." + SemiBlockManager.getKeyForSemiBlock(logistics)));
}
Also used : WidgetLabel(me.desht.pneumaticcraft.client.gui.widget.WidgetLabel) PacketSetLogisticsFilterStack(me.desht.pneumaticcraft.common.network.PacketSetLogisticsFilterStack) PacketSetLogisticsFluidFilterStack(me.desht.pneumaticcraft.common.network.PacketSetLogisticsFluidFilterStack) WidgetFluidStack(me.desht.pneumaticcraft.client.gui.widget.WidgetFluidStack) FluidStack(net.minecraftforge.fluids.FluidStack) WidgetFluidStack(me.desht.pneumaticcraft.client.gui.widget.WidgetFluidStack) GuiCheckBox(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)

Aggregations

GuiCheckBox (me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)19 GuiRadioButton (me.desht.pneumaticcraft.client.gui.widget.GuiRadioButton)4 ArrayList (java.util.ArrayList)3 GuiAnimatedStat (me.desht.pneumaticcraft.client.gui.widget.GuiAnimatedStat)3 WidgetTextFieldNumber (me.desht.pneumaticcraft.client.gui.widget.WidgetTextFieldNumber)3 ItemStack (net.minecraft.item.ItemStack)3 WidgetComboBox (me.desht.pneumaticcraft.client.gui.widget.WidgetComboBox)2 WidgetTextField (me.desht.pneumaticcraft.client.gui.widget.WidgetTextField)2 GuiButton (net.minecraft.client.gui.GuiButton)2 Point (java.awt.Point)1 GuiButtonSpecial (me.desht.pneumaticcraft.client.gui.GuiButtonSpecial)1 GuiProgWidgetCondition (me.desht.pneumaticcraft.client.gui.programmer.GuiProgWidgetCondition)1 IGuiWidget (me.desht.pneumaticcraft.client.gui.widget.IGuiWidget)1 WidgetFluidStack (me.desht.pneumaticcraft.client.gui.widget.WidgetFluidStack)1 WidgetLabel (me.desht.pneumaticcraft.client.gui.widget.WidgetLabel)1 WidgetTank (me.desht.pneumaticcraft.client.gui.widget.WidgetTank)1 WidgetTemperature (me.desht.pneumaticcraft.client.gui.widget.WidgetTemperature)1 WidgetTooltipArea (me.desht.pneumaticcraft.client.gui.widget.WidgetTooltipArea)1 TubeModuleRedstoneReceiving (me.desht.pneumaticcraft.common.block.tubes.TubeModuleRedstoneReceiving)1 PacketGuiButton (me.desht.pneumaticcraft.common.network.PacketGuiButton)1