WoW:API GameTooltip AddLine: Difference between revisions
Jump to navigation
Jump to search
Title -Documentation by Goatus-
Title -Edited by ThePooBurner-
(Added wrapText argument, which was previously undefined.) |
No edit summary |
||
Line 1: | Line 1: | ||
<center>'''Title''' ''-Documentation by [[user:Goatus|Goatus]]-''</center> | <center>'''Title''' ''-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.b]); | |||
<!-- 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 14: | Line 15: | ||
<!-- 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 22: | Line 23: | ||
:;textColor.g : range 0 to 1 - green 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 | :;textColor.b : range 0 to 1 - blue color value for text string | ||
---- | ---- | ||
Line 37: | Line 37: | ||
MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT"); | MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT"); | ||
MyTooltip:AddLine("New tooltip line" | 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}} | ||
<!-- Update the category to the appropriate subsection, and be sure to put the function name as the label for the category link. Multiple subcategories are okay if appropriate, please dont link functions to the API Functions category directly. --> | <!-- Update the category to the appropriate subsection, and be sure to put the function name as the label for the category link. Multiple subcategories are okay if appropriate, please dont link functions to the API Functions category directly. --> | ||
[[Category:API Functions|Empty Template]] | [[Category:API Functions|Empty Template]] |
Revision as of 05:51, 2 April 2005
GameTooltip:AddLine(tooltipText [, textColor.r, textColor.g, textColor.b]);
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
- Returns
- nothing
- Example
MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT"); MyTooltip:AddLine("New tooltip line", 1,1,1); 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.