Examples of TooltipLine


Examples of buildcraft.core.gui.tooltips.ToolTipLine

  @Override
  public void initGui() {
    super.initGui();

    tool = new GuiBetterButton(0, guiLeft + 5, guiTop + 20, 20, "+");
    tool.setToolTip(new ToolTip(new ToolTipLine(StringUtils.localize("tip.tool.add"))));
    buttonList.add(tool);

    savedButtonList = buttonList;
  }
View Full Code Here

Examples of buildcraft.core.gui.tooltips.ToolTipLine

  protected void actionPerformed(GuiButton button) {
    if (button == tool) {
      if (tool.displayString.equals("+")) {
        tool.displayString = "-";
        tool.getToolTip().remove(0);
        tool.getToolTip().add(new ToolTipLine(StringUtils.localize("tip.tool.remove")));
      } else {
        tool.displayString = "+";
        tool.getToolTip().remove(0);
        tool.getToolTip().add(new ToolTipLine(StringUtils.localize("tip.tool.add")));
      }
    }
  }
View Full Code Here

Examples of buildcraft.core.gui.tooltips.ToolTipLine

  protected void refreshTooltip() {
    toolTip.clear();
    int amount = 0;
    if (getFluid() != null && getFluid().amount > 0) {
      ToolTipLine fluidName = new ToolTipLine(getFluid().getFluid().getLocalizedName(getFluid()));
      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

Examples of buildcraft.core.gui.tooltips.ToolTipLine

    optionExcavate = new GuiBetterButton(1, guiLeft + 5, guiTop + 55, 79, "");
    buttonList.add(optionExcavate);

    optionAllowCreative = new GuiBetterButton(2, guiLeft + 5, guiTop + 80, 79, "");
    optionAllowCreative.setToolTip(new ToolTip(500,
        new ToolTipLine(StringUtils.localize("tile.architect.tooltip.allowCreative.1")),
        new ToolTipLine(StringUtils.localize("tile.architect.tooltip.allowCreative.2"))
    ));
    buttonList.add(optionAllowCreative);
   
    textField = new GuiTextField(this.fontRendererObj, TEXT_X, TEXT_Y, TEXT_WIDTH, TEXT_HEIGHT);
    textField.setMaxStringLength(BuildCraftBuilders.MAX_BLUEPRINTS_NAME_SIZE);
View Full Code Here

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

Examples of forestry.core.gui.tooltips.ToolTipLine

    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

Examples of mods.railcraft.common.gui.tooltips.ToolTipLine

        if (getFluid() != null && getFluid().amount > 0 && getFluid().getFluid() != null) {
            Fluid fluidType = getFluidType();
            EnumRarity rarity = fluidType.getRarity();
            if (rarity == null)
                rarity = EnumRarity.common;
            ToolTipLine fluidName = new ToolTipLine(fluidType.getLocalizedName(), 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

Examples of mods.railcraft.common.gui.tooltips.ToolTipLine

        int amount = 0;
        if (filter != null) {
            EnumRarity rarity = filter.getRarity();
            if (rarity == null)
                rarity = EnumRarity.common;
            ToolTipLine name = new ToolTipLine(filter.getLocalizedName(), 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

Examples of org.terasology.rendering.nui.widgets.TooltipLine

    public GetItemTooltip() {
        tooltipLines = new ArrayList<>();
    }

    public GetItemTooltip(String defaultTooltip) {
        this.tooltipLines = new ArrayList<>(Arrays.asList(new TooltipLine(defaultTooltip)));
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.