wowpedia
Main Menu


Add a line to a GameTooltip consisting of a left-aligned part and a right-aligned part.

GameTooltip:AddDoubleLine(leftText, rightText [, leftR, leftG, leftB [, rightR, rightG, rightB]])

Arguments

leftText
string - Text to be displayed on the left.
rightText
string - Text to be displayed on the right.
leftR
number?Optional. Could be nil. - Red color component for the left text, between 0 and 1.
leftG
number?Optional. Could be nil. - Green color component for the left text, between 0 and 1.
leftB
number?Optional. Could be nil. - Blue color component for the left text, between 0 and 1.
rightR
number?Optional. Could be nil. - Red color component for the right text, between 0 and 1.
rightG
number?Optional. Could be nil. - Green color component for the right text, between 0 and 1.
rightB
number?Optional. Could be nil. - Blue color component for the right text, between 0 and 1.

Example

The following snippet would display a tooltip to the right of the cursor, with the word "Left" in red on the left side and the word "Right" in blue on the right side:

GameTooltip:ClearLines();
GameTooltip:SetOwner(UIParent, "ANCHOR_CURSOR_RIGHT");
GameTooltip:AddDoubleLine("Left", "Right", 1, 0, 0, 0 ,0, 1);
GameTooltip:Show();

Details

See also