WoW:API GameTooltip AddLine: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
({{widgetmethod}})
No edit summary
Line 9: Line 9:
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->
<!-- Describe the purpose of the function, though exhausting detail can be saved for a later section -->


Adds Line with text to tooltip.  
Appends a line of text to tooltip.  If the tooltip already has its maximum number of
lines, this function silently fails.


----
----

Revision as of 20:12, 19 August 2006

Widget API ← GameTooltip < AddLine

GameTooltip:AddLine -Documentation by Goatus-


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


Appends a line of text to tooltip. If the tooltip already has its maximum number of lines, this function silently fails.


Arguments


(tooltipText [, textColor.r, textColor.g, textColor.b [, wrapText]])


tooltipText
String - string which will appear in new tooltip line
textColor.r
range 0 to 1 - red color value for text string
textColor.g
range 0 to 1 - green color value for text string
textColor.b
range 0 to 1 - blue color value for text string
wrapText
nil or 1 - Set to 1 to wrap text.

Returns


nothing

Example


MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT");
MyTooltip:AddLine("New tooltip line", 1, 1, 1);
MyTooltip:Show();