@Override
 protected void actionPerformed(GuiButton button) {
   switch (button.id) {
     case ID_COLORS:
       GuiScreen colorGui = new GuiScreenColor(this, container.panel);
       mc.displayGuiScreen(colorGui);
       break;
     case ID_SETTINGS:
       ItemStack card = getActiveCard();
       if (card == null) return;
       if (card != null && card.getItem() instanceof IAdvancedCardSettings) {
         ICardWrapper helper = new CardWrapperImpl(card, activeTab);
         Object guiObject = ((IAdvancedCardSettings) card.getItem()).getSettingsScreen(helper);
         if (!(guiObject instanceof GuiScreen)) {
           FMLLog.warning("Invalid card, getSettingsScreen method should return GuiScreen object");
           return;
         }
         GuiScreen gui = (GuiScreen) guiObject;
         ICardSettingsWrapper wrapper =
             new CardSettingsWrapperImpl(card, container.panel, this, activeTab);
         ((ICardGui) gui).setCardSettingsHelper(wrapper);
         mc.displayGuiScreen(gui);
       }
       break;
     case ID_LABELS:
       boolean checked = !container.panel.getShowLabels();
       if (button instanceof IconButton) {
         IconButton iButton = (IconButton) button;
         iButton.textureTop = getIconLabelsTopOffset(checked);
       }
       int value = checked ? -1 : -2;
       container.panel.setShowLabels(checked);
       NetworkHelper.initiateClientTileEntityEvent(container.panel, value);
       break;
     case ID_POWER:
       byte mode = ((TileEntityAdvancedInfoPanel) container.panel).getNextPowerMode();
       if (button instanceof IconButton) {
         IconButton iButton = (IconButton) button;
         iButton.textureTop = getIconPowerTopOffset(mode);
       }
       NetworkHelper.initiateClientTileEntityEvent(container.panel, mode);
       break;
     case ID_SLOPE:
       GuiPanelSlope slopeGui =
           new GuiPanelSlope(this, (TileEntityAdvancedInfoPanel) container.panel);
       mc.displayGuiScreen(slopeGui);
       break;
   }
 }
 @Override
 public boolean mousePressed(Minecraft minecraft, int i, int j) {
   if (super.mousePressed(minecraft, i, j)) {
     checked = !checked;
     int value = checked ? -1 : -2;
     panel.setShowLabels(checked);
     NetworkHelper.initiateClientTileEntityEvent(panel, value);
     return true;
   } else {
     return false;
   }
 }