Search in sources :

Example 1 with ProgWidgetInventoryBase

use of pneumaticCraft.common.progwidgets.ProgWidgetInventoryBase in project PneumaticCraft by MineMaarten.

the class GuiProgWidgetImportExport method initGui.

@Override
public void initGui() {
    super.initGui();
    if (showSides()) {
        for (int i = 0; i < 6; i++) {
            String sideName = PneumaticCraftUtils.getOrientationName(ForgeDirection.getOrientation(i));
            GuiCheckBox checkBox = new GuiCheckBox(i, guiLeft + 4, guiTop + 30 + i * 12, 0xFF000000, sideName);
            checkBox.checked = ((ProgWidgetInventoryBase) widget).getSides()[i];
            addWidget(checkBox);
        }
    }
    useItemCount = new GuiCheckBox(6, guiLeft + 4, guiTop + (showSides() ? 115 : 30), 0xFF000000, I18n.format("gui.progWidget.itemFilter.useItemCount"));
    useItemCount.setTooltip("gui.progWidget.itemFilter.useItemCount.tooltip");
    useItemCount.checked = ((ICountWidget) widget).useCount();
    addWidget(useItemCount);
    textField = new WidgetTextFieldNumber(Minecraft.getMinecraft().fontRenderer, guiLeft + 7, guiTop + (showSides() ? 128 : 43), 50, 11);
    textField.setValue(((ICountWidget) widget).getCount());
    textField.setEnabled(useItemCount.checked);
    addWidget(textField);
}
Also used : ProgWidgetInventoryBase(pneumaticCraft.common.progwidgets.ProgWidgetInventoryBase) WidgetTextFieldNumber(pneumaticCraft.client.gui.widget.WidgetTextFieldNumber) GuiCheckBox(pneumaticCraft.client.gui.widget.GuiCheckBox)

Aggregations

GuiCheckBox (pneumaticCraft.client.gui.widget.GuiCheckBox)1 WidgetTextFieldNumber (pneumaticCraft.client.gui.widget.WidgetTextFieldNumber)1 ProgWidgetInventoryBase (pneumaticCraft.common.progwidgets.ProgWidgetInventoryBase)1