Exemplo n.º 1
0
  @Override
  public void addTooltip(List<String> list) {

    if (!isFullyOpened()) {
      list.add(StringHelper.localize("info.cofh.information"));
      return;
    }
  }
Exemplo n.º 2
0
  public TabInfo(GuiBase gui, int side, String infoString) {

    super(gui, side);
    setVisible(enable);

    backgroundColor = 0x555555;
    maxHeight += 4 + StringHelper.getSplitStringHeight(getFontRenderer(), infoString, maxWidth);
    myInfo = infoString;
  }
Exemplo n.º 3
0
  @Override
  public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean check) {

    if (StringHelper.displayShiftForDetail && !StringHelper.isShiftKeyDown()) {
      list.add(StringHelper.shiftForDetails());
    }
    if (!StringHelper.isShiftKeyDown()) {
      return;
    }
    if (stack.stackTagCompound == null) {
      EnergyHelper.setDefaultEnergyTag(stack, 0);
    }
    list.add(
        StringHelper.localize("info.cofh.charge")
            + ": "
            + stack.stackTagCompound.getInteger("Energy")
            + " / "
            + maxEnergy
            + " RF");

    list.add(
        StringHelper.ORANGE
            + getEnergyPerUse(stack)
            + " "
            + StringHelper.localize("info.redstonearsenal.tool.energyPerUse")
            + StringHelper.END);
    if (isEmpowered(stack)) {
      list.add(
          StringHelper.YELLOW
              + StringHelper.ITALIC
              + StringHelper.localize("info.cofh.press")
              + " "
              + Keyboard.getKeyName(KeyBindingEmpower.instance.getKey())
              + " "
              + StringHelper.localize("info.redstonearsenal.tool.chargeOff")
              + StringHelper.END);
    } else {
      list.add(
          StringHelper.BRIGHT_BLUE
              + StringHelper.ITALIC
              + StringHelper.localize("info.cofh.press")
              + " "
              + Keyboard.getKeyName(KeyBindingEmpower.instance.getKey())
              + " "
              + StringHelper.localize("info.redstonearsenal.tool.chargeOn")
              + StringHelper.END);
    }
  }
  @Override
  public void addTooltip(List<String> list) {

    if (tooltip != null) {
      if (tooltipLocalized) {
        list.add(tooltip);
      } else {
        list.add(StringHelper.localize(tooltip));
      }
    }
  }
Exemplo n.º 5
0
  @Override
  public void draw() {

    if (!isVisible()) {
      return;
    }
    drawBackground();
    drawTabIcon("IconInformation");
    if (!isFullyOpened()) {
      return;
    }
    getFontRenderer()
        .drawStringWithShadow(
            StringHelper.localize("info.cofh.information"),
            posXOffset() + 18,
            posY + 6,
            headerColor);
    getFontRenderer().drawSplitString(myInfo, posXOffset() + 2, posY + 20, maxWidth - 8, textColor);
    GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
  }