Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API GameTooltip SetText

Last wiki revision 2021-08-09

Sets the text of a tooltip. GameTooltip:SetText(text [, r, g, b, alpha, textWrap])

  • text : String - The text for the tooltip.
  • r: - Optional red color value for text, between 0 and 1.
  • g: - Optional green color value for text, between 0 and 1.
  • b: - Optional blue color value for text, between 0 and 1.
  • alpha: - Optional alpha value for the text, between 0 (transparent) and 1 (fully opaque).
  • textWrap: - True if text should wrap; false if the tooltip must widen to fit it.
  • The default color for the text is NORMAL_FONT_COLOR (1.0, 0.82, 0.0).
  • The default alpha value is 1.
  • When using the textWrap flag, the tooltip width is set to a preset value, which is about the width of the ability tooltips on spells. Long tooltips will go off the side of the screen if this is not set. Alternatively you can simply use a "\n" in the text argument to force a new line.

Displays a semi-transparent, greyish-font tooltip that wraps to accomodate the length of text:

Source

https://warcraft.wiki.gg/wiki/API_GameTooltip_SetText · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.