Search in sources :

Example 16 with GuiCheckBox

use of pneumaticCraft.client.gui.widget.GuiCheckBox in project PneumaticCraft by MineMaarten.

the class GuiProgWidgetItemFilter method initGui.

@Override
public void initGui() {
    super.initGui();
    // metaInfoStat = new GuiAnimatedStat(this, "Metadata?", Textures.GUI_INFO_LOCATION, xStart + xSize, yStart + 5, 0xFF00AA00, null, false);
    buttonList.add(new GuiButton(0, guiLeft + 4, guiTop + 20, 70, 20, "Search item..."));
    buttonList.add(new GuiButton(1, guiLeft + 78, guiTop + 20, 100, 20, "Search inventory..."));
    decButton = new GuiButton(2, guiLeft + 140, guiTop + 85, 10, 20, "-");
    incButton = new GuiButton(3, guiLeft + 167, guiTop + 85, 10, 20, "+");
    buttonList.add(decButton);
    buttonList.add(incButton);
    checkBoxUseDamage = new GuiCheckBox(0, guiLeft + 4, guiTop + 72, 0xFF000000, "Use metadata / damage values");
    checkBoxUseDamage.setTooltip(Arrays.asList(new String[] { "Check to handle differently damaged tools", "or different colors of Wool as different." }));
    checkBoxUseDamage.checked = widg.useMetadata;
    addWidget(checkBoxUseDamage);
    checkBoxUseNBT = new GuiCheckBox(2, guiLeft + 4, guiTop + 108, 0xFF000000, "Use NBT");
    checkBoxUseNBT.setTooltip(Arrays.asList(new String[] { "Check to handle items like Enchanted Books", "or Firework as different." }));
    checkBoxUseNBT.checked = widg.useNBT;
    addWidget(checkBoxUseNBT);
    checkBoxUseOreDict = new GuiCheckBox(3, guiLeft + 4, guiTop + 120, 0xFF000000, "Use Ore Dictionary");
    checkBoxUseOreDict.setTooltip(Arrays.asList(new String[] { "Check to handle items registered in the", "Ore Dictionary (like Wood) as the same." }));
    checkBoxUseOreDict.checked = widg.useOreDict;
    addWidget(checkBoxUseOreDict);
    checkBoxUseModSimilarity = new GuiCheckBox(4, guiLeft + 4, guiTop + 132, 0xFF000000, "Use Mod similarity");
    checkBoxUseModSimilarity.setTooltip(Arrays.asList(new String[] { "Check to handle items from the", "same mod as the same." }));
    checkBoxUseModSimilarity.checked = widg.useModSimilarity;
    addWidget(checkBoxUseModSimilarity);
    variableField = new WidgetComboBox(fontRendererObj, guiLeft + 90, guiTop + 56, 80, fontRendererObj.FONT_HEIGHT + 1);
    variableField.setElements(guiProgrammer.te.getAllVariables());
    variableField.setText(widg.getVariable());
    if (Config.getProgrammerDifficulty() == 2) {
        addWidget(variableField);
    }
    checkBoxUseDamage.enabled = !checkBoxUseOreDict.checked && !checkBoxUseModSimilarity.checked;
    incButton.enabled = checkBoxUseDamage.enabled && checkBoxUseDamage.checked;
    decButton.enabled = checkBoxUseDamage.enabled && checkBoxUseDamage.checked;
    checkBoxUseNBT.enabled = !checkBoxUseOreDict.checked && !checkBoxUseModSimilarity.checked;
    checkBoxUseOreDict.enabled = !checkBoxUseModSimilarity.checked;
    checkBoxUseModSimilarity.enabled = !checkBoxUseOreDict.checked;
    if (searchGui != null)
        widg.setFilter(searchGui.getSearchStack());
    if (invSearchGui != null)
        widg.setFilter(invSearchGui.getSearchStack());
}
Also used : GuiButton(net.minecraft.client.gui.GuiButton) GuiCheckBox(pneumaticCraft.client.gui.widget.GuiCheckBox) WidgetComboBox(pneumaticCraft.client.gui.widget.WidgetComboBox)

Example 17 with GuiCheckBox

use of pneumaticCraft.client.gui.widget.GuiCheckBox in project PneumaticCraft by MineMaarten.

the class GuiLogisticsRequester method initGui.

@Override
public void initGui() {
    super.initGui();
    addAnimatedStat("gui.tab.info.ghostSlotInteraction.title", new ItemStack(Blocks.hopper), 0xFF00AAFF, true).setText("gui.tab.info.ghostSlotInteraction");
    if (Loader.isModLoaded(ModIds.AE2)) {
        if (logistics.isPlacedOnInterface()) {
            Item item = GameRegistry.findItem(ModIds.AE2, "item.ItemMultiPart");
            if (item == null) {
                Log.warning("AE2 cable couldn't be found!");
                item = Itemss.logisticsFrameRequester;
            }
            GuiAnimatedStat stat = addAnimatedStat("gui.tab.info.logisticsRequester.aeIntegration.title", new ItemStack(item, 1, 16), 0xFF00AAFF, false);
            List<String> text = new ArrayList<String>();
            for (int i = 0; i < 2; i++) text.add("");
            text.add("gui.tab.info.logisticsRequester.aeIntegration");
            stat.setText(text);
            stat.addWidget(aeIntegration = new GuiCheckBox(1, 16, 13, 0xFF000000, "gui.tab.info.logisticsRequester.aeIntegration.enable"));
        }
    }
}
Also used : Item(net.minecraft.item.Item) ArrayList(java.util.ArrayList) GuiCheckBox(pneumaticCraft.client.gui.widget.GuiCheckBox) ItemStack(net.minecraft.item.ItemStack) GuiAnimatedStat(pneumaticCraft.client.gui.widget.GuiAnimatedStat)

Example 18 with GuiCheckBox

use of pneumaticCraft.client.gui.widget.GuiCheckBox in project PneumaticCraft by MineMaarten.

the class GuiPressureModuleSimple method initGui.

@Override
public void initGui() {
    super.initGui();
    String title = I18n.format("item." + module.getType() + ".name");
    addLabel(title, width / 2 - fontRendererObj.getStringWidth(title) / 2, guiTop + 5);
    advancedMode = new GuiCheckBox(0, guiLeft + 6, guiTop + 15, 0xFF000000, "gui.tubeModule.advancedConfig").setTooltip(I18n.format("gui.tubeModule.advancedConfig.tooltip"));
    advancedMode.checked = false;
    addWidget(advancedMode);
    thresholdField = new WidgetTextFieldNumber(fontRendererObj, guiLeft + 110, guiTop + 33, 30, fontRendererObj.FONT_HEIGHT).setDecimals(1);
    addWidget(thresholdField);
    if (module instanceof TubeModuleRedstoneReceiving) {
        thresholdField.setValue(((TubeModuleRedstoneReceiving) module).getThreshold());
        addLabel(I18n.format("gui.tubeModule.simpleConfig.threshold"), guiLeft + 6, guiTop + 33);
    } else {
        thresholdField.setValue(module.lowerBound);
        addLabel(I18n.format("gui.tubeModule.simpleConfig.turn"), guiLeft + 6, guiTop + 33);
        moreOrLessButton = new GuiButtonSpecial(1, guiLeft + 85, guiTop + 28, 20, 20, module.lowerBound < module.higherBound ? ">" : "<");
        moreOrLessButton.setTooltipText(I18n.format(module.lowerBound < module.higherBound ? "gui.tubeModule.simpleConfig.higherThan" : "gui.tubeModule.simpleConfig.lowerThan"));
        addWidget(moreOrLessButton);
    }
    addLabel(I18n.format("gui.general.bar"), guiLeft + 145, guiTop + 34);
}
Also used : WidgetTextFieldNumber(pneumaticCraft.client.gui.widget.WidgetTextFieldNumber) TubeModuleRedstoneReceiving(pneumaticCraft.common.block.tubes.TubeModuleRedstoneReceiving) GuiCheckBox(pneumaticCraft.client.gui.widget.GuiCheckBox) GuiButtonSpecial(pneumaticCraft.client.gui.GuiButtonSpecial)

Example 19 with GuiCheckBox

use of pneumaticCraft.client.gui.widget.GuiCheckBox in project PneumaticCraft by MineMaarten.

the class GuiPlasticMixer method initGui.

@Override
public void initGui() {
    super.initGui();
    addWidget(new WidgetTemperature(0, guiLeft + 55, guiTop + 25, 295, 500, te.getLogic(0)));
    addWidget(new WidgetTemperature(1, guiLeft + 82, guiTop + 25, 295, 500, te.getLogic(1), PneumaticValues.PLASTIC_MIXER_MELTING_TEMP));
    addWidget(new WidgetTank(3, guiLeft + 152, guiTop + 14, te.getFluidTank()));
    GuiAnimatedStat stat = addAnimatedStat("gui.tab.plasticMixer.plasticSelection", new ItemStack(Itemss.plastic, 1, 1), 0xFF005500, false);
    List<String> text = new ArrayList<String>();
    for (int i = 0; i < 12; i++) {
        text.add("                      ");
    }
    stat.setTextWithoutCuttingString(text);
    buttons = new GuiButtonSpecial[16];
    for (int x = 0; x < 4; x++) {
        for (int y = 0; y < 4; y++) {
            int index = y * 4 + x;
            ItemStack plastic = new ItemStack(Itemss.plastic, 1, index);
            buttons[index] = new GuiButtonSpecial(index + 1, x * 21 + 4, y * 21 + 30, 20, 20, "").setRenderStacks(plastic).setTooltipText(plastic.getDisplayName());
            stat.addWidget(buttons[index]);
        }
    }
    stat.addWidget(lockSelection = new GuiCheckBox(17, 4, 18, 0xFF000000, "gui.plasticMixer.lockSelection").setChecked(te.lockSelection).setTooltip(I18n.format("gui.plasticMixer.lockSelection.tooltip")));
}
Also used : WidgetTemperature(pneumaticCraft.client.gui.widget.WidgetTemperature) ArrayList(java.util.ArrayList) GuiCheckBox(pneumaticCraft.client.gui.widget.GuiCheckBox) WidgetTank(pneumaticCraft.client.gui.widget.WidgetTank) GuiAnimatedStat(pneumaticCraft.client.gui.widget.GuiAnimatedStat) ItemStack(net.minecraft.item.ItemStack) Point(java.awt.Point)

Aggregations

GuiCheckBox (pneumaticCraft.client.gui.widget.GuiCheckBox)19 GuiRadioButton (pneumaticCraft.client.gui.widget.GuiRadioButton)4 ArrayList (java.util.ArrayList)3 ItemStack (net.minecraft.item.ItemStack)3 GuiAnimatedStat (pneumaticCraft.client.gui.widget.GuiAnimatedStat)3 WidgetTextFieldNumber (pneumaticCraft.client.gui.widget.WidgetTextFieldNumber)3 Point (java.awt.Point)2 GuiButton (net.minecraft.client.gui.GuiButton)2 WidgetComboBox (pneumaticCraft.client.gui.widget.WidgetComboBox)2 WidgetTextField (pneumaticCraft.client.gui.widget.WidgetTextField)2 SideOnly (cpw.mods.fml.relauncher.SideOnly)1 GuiTextField (net.minecraft.client.gui.GuiTextField)1 Item (net.minecraft.item.Item)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 ChatComponentTranslation (net.minecraft.util.ChatComponentTranslation)1 FluidStack (net.minecraftforge.fluids.FluidStack)1 GuiButtonSpecial (pneumaticCraft.client.gui.GuiButtonSpecial)1 GuiProgWidgetCondition (pneumaticCraft.client.gui.programmer.GuiProgWidgetCondition)1 IGuiWidget (pneumaticCraft.client.gui.widget.IGuiWidget)1 WidgetFluidStack (pneumaticCraft.client.gui.widget.WidgetFluidStack)1