API GameTooltip SetText

Sets the text of a tooltip. GameTooltip:SetText(text[, r, g, b[, alpha[, textWrap]]])

Arguments

 * text : String - The text for the tooltip.
 * r: Number - Optional. Red color value for text, between 0 and 1.
 * g: Number - Optional. Green color value for text, between 0 and 1.
 * b: Number - Optional. Blue color value for text, between 0 and 1.
 * alpha: Number - Optional. Alpha value for the text, between 0 (transparent) and 1 (fully opaque).
 * textWrap: Boolean - Optional. True specifies that text should be wrapped. False specifies the text shouldn't be wrapped.

Example
The following snippet would display a semi transparent, greyish colored tooltip that should wrap to a second line due to the textWrap flag and the length of the text: GameTooltip:SetText("This is a sample tooltip with wrapping text.", 0.5, 0.5, 0.5, 0.75, true); GameTooltip:Show;

Details

 * The default color for the text is NORMAL_FONT_COLOR (1.0, 0.82, 0.0).
 * The default alpha value is 1.
 * When using the textWrap flag, the tooltip width is set to a preset value, which is about the width of the ability tooltips on spells. Long tooltips will go off the side of the screen if this is not set. Alternatively you can simply use a "\n" in the text argument to force a new line.