Search in sources :

Example 11 with WidgetComboBox

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

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 + 87, 10, 12, "-");
    incButton = new GuiButton(3, guiLeft + 167, guiTop + 87, 10, 12, "+");
    buttonList.add(decButton);
    buttonList.add(incButton);
    checkBoxUseDamage = new GuiCheckBox(0, guiLeft + 4, guiTop + 72, 0xFF404040, "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, 0xFF404040, "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, 0xFF404040, "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, 0xFF404040, "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(fontRenderer, guiLeft + 90, guiTop + 56, 80, fontRenderer.FONT_HEIGHT + 1);
    variableField.setElements(guiProgrammer.te.getAllVariables());
    variableField.setText(widg.getVariable());
    if (ConfigHandler.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(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox) WidgetComboBox(me.desht.pneumaticcraft.client.gui.widget.WidgetComboBox)

Aggregations

WidgetComboBox (me.desht.pneumaticcraft.client.gui.widget.WidgetComboBox)11 ArrayList (java.util.ArrayList)4 GuiCheckBox (me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)2 GuiRadioButton (me.desht.pneumaticcraft.client.gui.widget.GuiRadioButton)2 IGuiWidget (me.desht.pneumaticcraft.client.gui.widget.IGuiWidget)2 WidgetLabel (me.desht.pneumaticcraft.client.gui.widget.WidgetLabel)2 WidgetTextFieldNumber (me.desht.pneumaticcraft.client.gui.widget.WidgetTextFieldNumber)2 AreaType (me.desht.pneumaticcraft.common.progwidgets.area.AreaType)2 AreaTypeWidget (me.desht.pneumaticcraft.common.progwidgets.area.AreaType.AreaTypeWidget)2 AreaTypeWidgetEnum (me.desht.pneumaticcraft.common.progwidgets.area.AreaType.AreaTypeWidgetEnum)2 AreaTypeWidgetInteger (me.desht.pneumaticcraft.common.progwidgets.area.AreaType.AreaTypeWidgetInteger)2 ItemStack (net.minecraft.item.ItemStack)2 List (java.util.List)1 GuiButtonSpecial (me.desht.pneumaticcraft.client.gui.GuiButtonSpecial)1 WidgetTextField (me.desht.pneumaticcraft.client.gui.widget.WidgetTextField)1 PacketUpdateRemoteLayout (me.desht.pneumaticcraft.common.network.PacketUpdateRemoteLayout)1 IActionWidgetLabeled (me.desht.pneumaticcraft.common.remote.IActionWidgetLabeled)1 GuiButton (net.minecraft.client.gui.GuiButton)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 BlockPos (net.minecraft.util.math.BlockPos)1