Search in sources :

Example 6 with ImageChoiceLabel

use of mcjty.lib.gui.widgets.ImageChoiceLabel in project RFTools by McJty.

the class GuiBlockProtector method initRedstoneMode.

private void initRedstoneMode() {
    redstoneMode = new ImageChoiceLabel(mc, this).addChoiceEvent(new ChoiceEvent() {

        @Override
        public void choiceChanged(Widget parent, String newChoice) {
            changeRedstoneMode();
        }
    }).addChoice(RedstoneMode.REDSTONE_IGNORED.getDescription(), "Redstone mode:\nIgnored", iconGuiElements, 0, 0).addChoice(RedstoneMode.REDSTONE_OFFREQUIRED.getDescription(), "Redstone mode:\nOff to activate", iconGuiElements, 16, 0).addChoice(RedstoneMode.REDSTONE_ONREQUIRED.getDescription(), "Redstone mode:\nOn to activate", iconGuiElements, 32, 0);
    redstoneMode.setLayoutHint(new PositionalLayout.PositionalHint(150, 46, 16, 16));
    redstoneMode.setCurrentChoice(tileEntity.getRedstoneMode().ordinal());
}
Also used : ChoiceEvent(mcjty.lib.gui.events.ChoiceEvent) Widget(mcjty.lib.gui.widgets.Widget) PositionalLayout(mcjty.lib.gui.layout.PositionalLayout) ImageChoiceLabel(mcjty.lib.gui.widgets.ImageChoiceLabel)

Aggregations

ImageChoiceLabel (mcjty.lib.gui.widgets.ImageChoiceLabel)6 PositionalLayout (mcjty.lib.gui.layout.PositionalLayout)5 ChoiceEvent (mcjty.lib.gui.events.ChoiceEvent)4 Widget (mcjty.lib.gui.widgets.Widget)4 Window (mcjty.lib.gui.Window)3 Panel (mcjty.lib.gui.widgets.Panel)3 EnergyBar (mcjty.lib.gui.widgets.EnergyBar)1 Argument (mcjty.lib.network.Argument)1 NBTTagCompound (net.minecraft.nbt.NBTTagCompound)1 ForgeDirection (net.minecraftforge.common.util.ForgeDirection)1