Package crazypants.enderio.machine.hypercube.TileHyperCube

Examples of crazypants.enderio.machine.hypercube.TileHyperCube.IoMode


    privateChannelList.addSelectionListener(selectionListener);

  }

  private void updateIoButtons() {
    IoMode mode = cube.getModeForChannel(SubChannel.POWER);
    if(mode.isRecieveEnabled() || mode.isSendEnabled()) {
      powerB.setIcon(IconEIO.WRENCH_OVERLAY_POWER);
    } else {
      powerB.setIcon(IconEIO.WRENCH_OVERLAY_POWER_OFF);
    }
    powerB.setToolTip(Lang.localize("gui.trans.powerMode"), mode.getLocalisedName());

    mode = cube.getModeForChannel(SubChannel.FLUID);
    if(mode.isRecieveEnabled() || mode.isSendEnabled()) {
      fluidB.setIcon(IconEIO.WRENCH_OVERLAY_FLUID);
    } else {
      fluidB.setIcon(IconEIO.WRENCH_OVERLAY_FLUID_OFF);
    }
    fluidB.setToolTip(Lang.localize("gui.trans.fluidMode"), mode.getLocalisedName());

    mode = cube.getModeForChannel(SubChannel.ITEM);
    if(mode.isRecieveEnabled() || mode.isSendEnabled()) {
      itemB.setIcon(IconEIO.WRENCH_OVERLAY_ITEM);
    } else {
      itemB.setIcon(IconEIO.WRENCH_OVERLAY_ITEM_OFF);
    }
    itemB.setToolTip(Lang.localize("gui.trans.itemMode"), mode.getLocalisedName());
  }
View Full Code Here


  @Override
  protected void actionPerformed(GuiButton par1GuiButton) {

    if(par1GuiButton.id == FLUID_MODE_BUTTON_ID) {

      IoMode curMode = cube.getModeForChannel(SubChannel.FLUID);
      IoMode nextMode = curMode.next();
      cube.setModeForChannel(SubChannel.FLUID, nextMode);

      updateIoButtons();
      PacketHandler.INSTANCE.sendToServer(new PacketClientState(cube));

    } else if(par1GuiButton.id == POWER_MODE_BUTTON_ID) {

      IoMode curMode = cube.getModeForChannel(SubChannel.POWER);
      IoMode nextMode = curMode.next();
      cube.setModeForChannel(SubChannel.POWER, nextMode);

      updateIoButtons();
      PacketHandler.INSTANCE.sendToServer(new PacketClientState(cube));

    } else if(par1GuiButton.id == ITEM_MODE_BUTTON_ID) {

      IoMode curMode = cube.getModeForChannel(SubChannel.ITEM);
      IoMode nextMode = curMode.next();
      cube.setModeForChannel(SubChannel.ITEM, nextMode);

      updateIoButtons();
      PacketHandler.INSTANCE.sendToServer(new PacketClientState(cube));
View Full Code Here

    drawString(getFontRenderer(), Lang.localize("gui.trans.publicHeading"), x, y, rgb);

    x += 109;
    drawString(getFontRenderer(), Lang.localize("gui.trans.privateHeading"), x, y, rgb);

    IoMode fluidMode = cube.getModeForChannel(SubChannel.FLUID);
    IoMode powerMode = cube.getModeForChannel(SubChannel.POWER);
    IoMode itemMode = cube.getModeForChannel(SubChannel.ITEM);

    x = 163;
    if(itemMode.isRecieveEnabled()) {
      IconEIO.INPUT.renderIcon(guiLeft + x + 15, guiTop + 4 + 7, -15, -7, 0, true);
    }
    x += 18;
    if(powerMode.isRecieveEnabled()) {
      IconEIO.INPUT.renderIcon(guiLeft + x + 15, guiTop + 4 + 7, -15, -7, 0, true);
    }
    x += 18;
    if(fluidMode.isRecieveEnabled()) {
      IconEIO.INPUT.renderIcon(guiLeft + x + 15, guiTop + 4 + 7, -15, -7, 0, true);
    }

    x = 163;
    if(itemMode.isSendEnabled()) {
      IconEIO.OUTPUT.renderIcon(guiLeft + x, guiTop + 29, 15, 7, 0, true);
    }
    x += 18;
    if(powerMode.isSendEnabled()) {
      IconEIO.OUTPUT.renderIcon(guiLeft + x, guiTop + 29, 15, 7, 0, true);
View Full Code Here

      TileHyperCube hc = (TileHyperCube) te;

      SubChannel[] vals = SubChannel.values();
      for (int i = 0; i < vals.length; i++) {
        SubChannel sc = vals[i];
        IoMode mode = message.modes.get(i);
        hc.setModeForChannel(sc, mode);
      }

      hc.setChannel(message.selectedChannel);
View Full Code Here

TOP

Related Classes of crazypants.enderio.machine.hypercube.TileHyperCube.IoMode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.