Goatus22319@legacy41542957 (talk | contribs) (Tooltip:AddLine()) |
WoWWiki-Calamus@legacy41583066 (talk | contribs) (Added wrapText argument, which was previously undefined.) |
||
Line 3: | Line 3: | ||
<!-- 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 --> |
||
− | tooltip:AddLine(tooltipText, textColor.r, textColor.g, textColor.b |
+ | tooltip: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 14: | Line 14: | ||
<!-- List each argument, together with its type --> |
<!-- List each argument, together with its type --> |
||
− | :(tooltipText, textColor.r, textColor.g, textColor.b |
+ | :(tooltipText, textColor.r, textColor.g, textColor.b , wrapText) |
Line 22: | Line 22: | ||
:;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 |
||
+ | :;wrapText : Boolean specifying whether to wrap the text string to fit the tooltip box. 1 = Wrap, 0 = Don't wrap. Default: 0 |
||
− | :;{x} :1 or 0 - unknow (no idea what it's for) |
||
---- |
---- |
||
Line 37: | 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, 1); |
MyTooltip:Show(): |
MyTooltip:Show(): |
||
Revision as of 18:57, 27 January 2005
tooltip: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
- Boolean specifying whether to wrap the text string to fit the tooltip box. 1 = Wrap, 0 = Don't wrap. Default: 0
- Returns
- nothing
- Example
MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT"); MyTooltip:AddLine("New tooltip line", 1,1,1, 1); MyTooltip:Show():
Template:WoW API