Search in sources :

Example 1 with ProgWidgetInventoryBase

use of me.desht.pneumaticcraft.common.progwidgets.ProgWidgetInventoryBase in project pnc-repressurized by TeamPneumatic.

the class GuiProgWidgetImportExport method initGui.

@Override
public void initGui() {
    super.initGui();
    if (showSides()) {
        for (int i = 0; i < 6; i++) {
            String sideName = PneumaticCraftUtils.getOrientationName(EnumFacing.getFront(i));
            GuiCheckBox checkBox = new GuiCheckBox(i, guiLeft + 4, guiTop + 30 + i * 12, 0xFF404040, sideName);
            checkBox.checked = ((ProgWidgetInventoryBase) widget).getSides()[i];
            addWidget(checkBox);
        }
    }
    useItemCount = new GuiCheckBox(6, guiLeft + 4, guiTop + (showSides() ? 115 : 30), 0xFF404040, 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(me.desht.pneumaticcraft.common.progwidgets.ProgWidgetInventoryBase) WidgetTextFieldNumber(me.desht.pneumaticcraft.client.gui.widget.WidgetTextFieldNumber) GuiCheckBox(me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)

Aggregations

GuiCheckBox (me.desht.pneumaticcraft.client.gui.widget.GuiCheckBox)1 WidgetTextFieldNumber (me.desht.pneumaticcraft.client.gui.widget.WidgetTextFieldNumber)1 ProgWidgetInventoryBase (me.desht.pneumaticcraft.common.progwidgets.ProgWidgetInventoryBase)1