WoW:API GameTooltip AddLine: Difference between revisions
Jump to navigation
Jump to search
(WoW 2.0 update) |
m (Move page script moved page API GameTooltip AddLine to API GameTooltip AddLine without leaving a redirect) |
||
(3 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{widgetmethod}} | {{widgetmethod}} | ||
GameTooltip:AddLine(text [, red, green, blue [, wrapText]]); | |||
Appends a line of text to tooltip. | |||
== Arguments == | |||
:;text : {{api|string|t=t}} - text which will appear in new tooltip line | |||
:;red : number range 0 to 1 - red color value for text string | |||
:;green : number range 0 to 1 - green color value for text string | |||
:;blue : number range 0 to 1 - blue color value for text string | |||
:;wrapText : {{api|boolean|t=t}} - 'true' to wrap text. | |||
== Returns == | |||
:none | |||
== Examples == | |||
:( | MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT") | ||
MyTooltip:AddLine("New tooltip line", 1, 1, 1) | |||
MyTooltip:Show() | |||
== Details == | |||
Note that this only appends the new line to the tooltip. It does not update the tooltip's height/width, so that the newly added line initially appears underneath (outside of) the tooltip. | |||
: | A subsequent call to [[API_Region_Show|GameTooltip:Show()]] will update the tooltip's borders correctly. | ||
== Notes == | |||
* As of WoW 2.0, there is no longer a maximum number of lines. | |||
* As of 6.0 uses Lua boolean, rather than WoW Boolean (nil or 1) for wrap text setting. | |||
Latest revision as of 04:45, 15 August 2023
← Widget API ← GameTooltip < AddLine
GameTooltip:AddLine(text [, red, green, blue [, wrapText]]);
Appends a line of text to tooltip.
Arguments[edit]
Returns[edit]
- none
Examples[edit]
MyTooltip:SetOwner(TargetFrame, "ANCHOR_RIGHT") MyTooltip:AddLine("New tooltip line", 1, 1, 1) MyTooltip:Show()
Details[edit]
Note that this only appends the new line to the tooltip. It does not update the tooltip's height/width, so that the newly added line initially appears underneath (outside of) the tooltip.
A subsequent call to GameTooltip:Show() will update the tooltip's borders correctly.
Notes[edit]
- As of WoW 2.0, there is no longer a maximum number of lines.
- As of 6.0 uses Lua boolean, rather than WoW Boolean (nil or 1) for wrap text setting.