Package forestry.core.gui.tooltips

Examples of forestry.core.gui.tooltips.ToolTipLine


    if (hasFluid()) {
      Fluid fluidType = getFluidType();
      EnumRarity rarity = fluidType.getRarity();
      if (rarity == null)
        rarity = EnumRarity.common;
      ToolTipLine fluidName = new ToolTipLine(fluidType.getLocalizedName(getFluid()), rarity.rarityColor);
      fluidName.setSpacing(2);
      toolTip.add(fluidName);
      amount = getFluid().amount;
    }
    toolTip.add(new ToolTipLine(String.format(Locale.ENGLISH, "%,d / %,d", amount, getCapacity())));
  }
View Full Code Here


    for (Fluid filter : filters) {
      EnumRarity rarity = filter.getRarity();
      if (rarity == null)
        rarity = EnumRarity.common;
      FluidStack filterFluidStack = FluidRegistry.getFluidStack(filter.getName(), 0);
      ToolTipLine name = new ToolTipLine(filter.getLocalizedName(filterFluidStack), rarity.rarityColor);
      name.setSpacing(2);
      toolTip.add(name);
      if (getFluid() != null)
        amount = getFluid().amount;
    }

    toolTip.add(new ToolTipLine(String.format("%,d", amount) + " / " + String.format("%,d", getCapacity())));
  }
View Full Code Here

TOP

Related Classes of forestry.core.gui.tooltips.ToolTipLine

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.