Search in sources :

Example 1 with GuiProgWidgetCondition

use of pneumaticCraft.client.gui.programmer.GuiProgWidgetCondition in project PneumaticCraft by MineMaarten.

the class ProgWidgetBlockCondition method getOptionWindow.

@Override
@SideOnly(Side.CLIENT)
public GuiScreen getOptionWindow(GuiProgrammer guiProgrammer) {
    return new GuiProgWidgetCondition(this, guiProgrammer) {

        @Override
        public void initGui() {
            super.initGui();
            addWidget(new GuiCheckBox(500, guiLeft + 5, guiTop + 60, 0xFF000000, I18n.format("gui.progWidget.conditionBlock.checkForAir")).setChecked(checkingForAir).setTooltip(I18n.format("gui.progWidget.conditionBlock.checkForAir.tooltip")));
            addWidget(new GuiCheckBox(501, guiLeft + 5, guiTop + 72, 0xFF000000, I18n.format("gui.progWidget.conditionBlock.checkForLiquids")).setChecked(checkingForLiquids).setTooltip(I18n.format("gui.progWidget.conditionBlock.checkForLiquids.tooltip")));
        }

        @Override
        protected boolean requiresNumber() {
            return false;
        }

        @Override
        protected boolean isSidedWidget() {
            return false;
        }

        @Override
        public void actionPerformed(IGuiWidget widget) {
            if (widget.getID() == 500)
                checkingForAir = !checkingForAir;
            if (widget.getID() == 501)
                checkingForLiquids = !checkingForLiquids;
            else
                super.actionPerformed(widget);
        }
    };
}
Also used : IGuiWidget(pneumaticCraft.client.gui.widget.IGuiWidget) GuiProgWidgetCondition(pneumaticCraft.client.gui.programmer.GuiProgWidgetCondition) GuiCheckBox(pneumaticCraft.client.gui.widget.GuiCheckBox) SideOnly(cpw.mods.fml.relauncher.SideOnly)

Aggregations

SideOnly (cpw.mods.fml.relauncher.SideOnly)1 GuiProgWidgetCondition (pneumaticCraft.client.gui.programmer.GuiProgWidgetCondition)1 GuiCheckBox (pneumaticCraft.client.gui.widget.GuiCheckBox)1 IGuiWidget (pneumaticCraft.client.gui.widget.IGuiWidget)1