wowpedia
Main Menu


Appends a line of text to the tooltip widget.

GameTooltip:AddLine(tooltipText [, r, g, b, wrapText])

Arguments

tooltipText
string - Text to appear in new line.
r
number - Red color component (between 0 and 1).
g
number - Green color component (between 0 and 1).
b
number - Blue color component (between 0 and 1).
wrapText
boolean - True allows the new line to wrap, false widens the tooltip as necessary to fit the line.

Details

Example

GameTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT")
GameTooltip:AddLine("First line")
GameTooltip:AddLine("Subsequent line", 1, 1, 1)
GameTooltip:Show()

References

 
  1. ^ GameTooltip_CalculatePadding() in FrameXML/GameTooltip.lua, archived at Townlong-Yak