Пример #1
0
 @Override
 public void actionPerformed(GuiButton guiButton) {
   super.actionPerformed(guiButton);
   if (guiButton.id == ID_COLOR_BUTTON && cb != null) {
     occon.setSignalColor(gui.getDir(), DyeColor.values()[cb.getColorIndex()]);
     PacketHandler.INSTANCE.sendToServer(new PacketOCConduitSignalColor(occon, gui.getDir()));
   }
 }
Пример #2
0
  public OCSettings(GuiExternalConnection gui, IConduit con) {
    super(IconEIO.WRENCH_OVERLAY_OC, EnderIO.lang.localize("itemOCConduit.name"), gui, con);
    occon = (IOCConduit) con;

    int x = 0;
    int y = customTop;

    x += gap + gap + 2 + gui.getFontRenderer().getStringWidth(signalColorStr);
    cb = new ColorButton(gui, ID_COLOR_BUTTON, x, y);
    cb.setToolTipHeading(EnderIO.lang.localize("gui.conduit.redstone.signalColor"));
    DyeColor sigCol = occon.getSignalColor(gui.getDir());
    cb.setColorIndex(sigCol.ordinal());
    x += cb.getButtonWidth();
  }