use of forestry.core.gui.tooltips.ToolTip in project ForestryMC by ForestryMC.
the class HabitatSlot method getToolTip.
@Override
public ToolTip getToolTip(int mouseX, int mouseY) {
ToolTip tooltip = new ToolTip();
tooltip.add(name);
return tooltip;
}
use of forestry.core.gui.tooltips.ToolTip in project ForestryMC by ForestryMC.
the class StandardTank method refreshTooltip.
@SideOnly(Side.CLIENT)
protected void refreshTooltip() {
ToolTip toolTip = getToolTip();
toolTip.clear();
int amount = 0;
FluidStack fluidStack = getFluid();
if (fluidStack != null) {
Fluid fluidType = fluidStack.getFluid();
EnumRarity rarity = fluidType.getRarity();
if (rarity == null) {
rarity = EnumRarity.COMMON;
}
toolTip.add(fluidType.getLocalizedName(getFluid()), rarity.rarityColor);
amount = getFluid().amount;
}
String liquidAmount = Translator.translateToLocalFormatted("for.gui.tooltip.liquid.amount", amount, getCapacity());
toolTip.add(liquidAmount);
}
use of forestry.core.gui.tooltips.ToolTip in project ForestryMC by ForestryMC.
the class RuleWidget method getToolTip.
@Override
public ToolTip getToolTip(int mouseX, int mouseY) {
IFilterLogic logic = gui.getLogic();
IFilterRuleType rule = logic.getRule(facing);
ToolTip tooltip = new ToolTip();
tooltip.add(getName(rule));
return tooltip;
}
use of forestry.core.gui.tooltips.ToolTip in project ForestryMC by ForestryMC.
the class SpeciesWidget method getToolTip.
@Nullable
@Override
public ToolTip getToolTip(int mouseX, int mouseY) {
IFilterLogic logic = gui.getLogic();
IAlleleSpecies allele = (IAlleleSpecies) logic.getGenomeFilter(facing, index, active);
if (allele == null) {
return null;
}
ToolTip tooltip = new ToolTip();
tooltip.add(getName(allele));
return tooltip;
}
use of forestry.core.gui.tooltips.ToolTip in project ForestryMC by ForestryMC.
the class ProbeButton method getToolTip.
@Override
public ToolTip getToolTip(int mouseX, int mouseY) {
ToolTip tooltip = new ToolTip();
tooltip.add(Translator.translateToLocal("for.gui.escritoire.probe"));
return tooltip;
}
Aggregations