WoW:API GameTooltip AddLine: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
m (typo in argument list)
Line 1: Line 1:
<center>'''Title''' ''-Documentation by [[user:Goatus|Goatus]]-''</center>
<center>'''GameTooltip:AddLine''' ''-Documentation by [[user:Goatus|Goatus]]-''</center>
<center>'''Title''' ''-Edited by [[user:ThePooBurner|ThePooBurner]]-''</center>


<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->
<!-- List return values and arguments as well as function name, follow Blizzard usage convention for args -->


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


<!-- 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 -->
Line 15: Line 14:
<!-- List each argument, together with its type -->
<!-- List each argument, together with its type -->


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




Line 38: Line 37:


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


----
4-1-05: Removed the "wrapText" argument as it isn't real. There is no argument after the color with this command. I tested this extensivly when creating custum tooltips for my mod's options pane.
----
----
{{Template:WoW API}}
{{Template:WoW API}}

Revision as of 11:46, 8 June 2006

GameTooltip:AddLine -Documentation by Goatus-


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


Adds Line with text to tooltip.


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();

Template:WoW API