use of me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox in project pnc-repressurized by TeamPneumatic.
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 = AEApi.instance().definitions().parts().cableGlass().item(AEColor.TRANSPARENT);
if (item == null) {
Log.warning("AE2 cable couldn't be found!");
item = Itemss.LOGISTICS_FRAME_REQUESTER;
}
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"));
}
}
}
use of me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox in project pnc-repressurized by TeamPneumatic.
the class GuiPressureModule method initGui.
@Override
public void initGui() {
super.initGui();
int xStart = (width - xSize) / 2;
int yStart = (height - ySize) / 2;
addLabel("lower", guiLeft + 10, guiTop + 30);
addLabel("bar", guiLeft + 45, guiTop + 42);
addLabel("higher", guiLeft + 140, guiTop + 30);
String title = I18n.format("item." + module.getType() + ".name");
addLabel(title, width / 2 - fontRenderer.getStringWidth(title) / 2, guiTop + 5);
lowerBoundField = new GuiTextField(-1, fontRenderer, xStart + 10, yStart + 41, 30, 10);
lowerBoundField.setText(PneumaticCraftUtils.roundNumberTo(module.lowerBound, 1));
higherBoundField = new GuiTextField(-1, fontRenderer, xStart + 140, yStart + 41, 30, 10);
higherBoundField.setText(PneumaticCraftUtils.roundNumberTo(module.higherBound, 1));
graphLowY = guiTop + 153;
graphHighY = guiTop + 93;
graphLeft = guiLeft + 22;
graphRight = guiLeft + 172;
addWidget(new WidgetTooltipArea(graphLeft - 20, graphHighY, 25, graphLowY - graphHighY, "gui.redstone"));
addWidget(new WidgetTooltipArea(graphLeft, graphLowY - 5, graphRight - graphLeft, 25, "gui.threshold"));
addWidget((IGuiWidget) new GuiAnimatedStat(this, "gui.tab.info", Textures.GUI_INFO_LOCATION, xStart, yStart + 5, 0xFF8888FF, null, true).setText("gui.tab.info.tubeModule"));
advancedMode = new GuiCheckBox(0, guiLeft + 6, guiTop + 15, 0xFF404040, "gui.tubeModule.advancedConfig").setTooltip(I18n.format("gui.tubeModule.advancedConfig.tooltip"));
advancedMode.checked = true;
addWidget(advancedMode);
}
use of me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox 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());
}
use of me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox in project pnc-repressurized by TeamPneumatic.
the class GuiProgWidgetItemFilter method actionPerformed.
@Override
public void actionPerformed(IGuiWidget guiWidget) {
if (guiWidget instanceof GuiCheckBox) {
GuiCheckBox checkBox = (GuiCheckBox) guiWidget;
switch(checkBox.getID()) {
case 0:
widg.useMetadata = checkBox.checked;
incButton.enabled = checkBoxUseDamage.enabled && checkBoxUseDamage.checked;
decButton.enabled = checkBoxUseDamage.enabled && checkBoxUseDamage.checked;
break;
case 2:
widg.useNBT = checkBox.checked;
break;
case 3:
widg.useOreDict = checkBox.checked;
checkBoxUseDamage.enabled = !checkBox.checked;
checkBoxUseNBT.enabled = !checkBox.checked;
checkBoxUseModSimilarity.enabled = !checkBox.checked;
incButton.enabled = checkBoxUseDamage.enabled && checkBoxUseDamage.checked;
decButton.enabled = checkBoxUseDamage.enabled && checkBoxUseDamage.checked;
break;
case 4:
widg.useModSimilarity = checkBox.checked;
checkBoxUseDamage.enabled = !checkBox.checked;
checkBoxUseNBT.enabled = !checkBox.checked;
checkBoxUseOreDict.enabled = !checkBox.checked;
incButton.enabled = checkBoxUseDamage.enabled && checkBoxUseDamage.checked;
decButton.enabled = checkBoxUseDamage.enabled && checkBoxUseDamage.checked;
break;
}
}
super.actionPerformed(guiWidget);
}
Aggregations