Thread Tools Display Modes
10-31-05, 04:32 AM   #1
xmlover
A Fallenroot Satyr
Join Date: Oct 2005
Posts: 25
hmmm, how to make the TOOLTIP not too long...

Code:
function Wisp_ShowToolTip()
	GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT");
	GameTooltip:SetText(text1, 1.00, 0.95, 0.95);
	GameTooltip:AddLine(text2, 0.26, 0.86, 0.26);
	GameTooltip:Show();
end
this is the function i use to show a tooltip with two lines...

but i find when a sentence is too long....it will display it in one line....and all over the frame is a long long long long tooltip....

hmmm....how to make the tooltip displays a long sentences in several lines?
(which like the tooltip of the UI List menu of the LogIn window?)
  Reply With Quote
10-31-05, 05:22 AM   #2
Gello
A Molten Giant
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 521
Try changing the first SetText to an AddLine.

I'm 99% sure it wraps by default, but if it doesn't add a 1 as a fifth parameter:

GameTooltip:AddLine(text1, 1.00, 0.95, 0.95,1)
  Reply With Quote
11-01-05, 02:29 AM   #3
xmlover
A Fallenroot Satyr
Join Date: Oct 2005
Posts: 25
Code:
Wisp_ShowTooltip = function(text1,text2)
	GameTooltip:SetOwner(this, "ANCHOR_BOTTOMRIGHT");
	GameTooltip:AddLine(text1, 1.00, 0.95, 0.95,1);
	GameTooltip:AddLine(text2, 0.26, 0.86, 0.26);
	GameTooltip:Show();
end;
IT WORKS !!

THX A LOT Gello!!

when add the "addline" and the MAGIC "1"
  Reply With Quote
12-31-05, 03:09 PM   #4
WavArt
A Deviate Faerie Dragon
 
WavArt's Avatar
Join Date: Mar 2005
Posts: 10
tool tip to long

the above fix .. I've had no luck with..

Here's the rundown of my issue.
My tool tip runs off the page bigtime.
Allot of information I can't trim down as its also the post.
I cannot use the \n break in my text source because I'm posting in Raids via CT_RA and it disconnnects me.
The \n break was great as it made the post look nicely formated.

in my .lua i have

Code:
function Jazz_ShowTooltip()
	GameTooltip:SetOwner(this, "ANCHOR_RIGHT");
	GameTooltip:AddLine(text1, 1.00, 0.95, 0.95,1);
	GameTooltip:AddLine(text2, 0.26, 0.86, 0.26);
	GameTooltip:Show();
end
in my .xml i have

Code:
<Scripts>
					<OnClick>
						Jazz_Msghandler(Jazz_MADNESSTEXT_11)
					</OnClick>
					<OnEnter>
						
						Jazz_ShowToolTip(Jazz_MADNESSTEXT_11)
						
					</OnEnter>
					<OnLeave>
						GameTooltip:Hide();
					</OnLeave>
				</Scripts>
Moving things around i'm getting various error msg's. or the tool tip will not show at all.

Calling to the Global error msg makes me think I'm pretty close.
Any help would be great thanks in advance. btw this is my first attempt at this style of coding.

Last edited by WavArt : 01-01-06 at 12:08 PM.
  Reply With Quote
01-05-06, 03:41 AM   #5
xmlover
A Fallenroot Satyr
Join Date: Oct 2005
Posts: 25
with just one :AddLine ()

try this

text = "text1".."\n".."text2".."\n".."text3"

just .."\n".. forever if you wanna show more message


then :AddLine() this message
  Reply With Quote
01-06-06, 12:04 AM   #6
WavArt
A Deviate Faerie Dragon
 
WavArt's Avatar
Join Date: Mar 2005
Posts: 10
Thanks for the info.. however it still does a no no. that way also..

Posting the info via CT_Raid Assist. the \n or .."\n".. makes no difference at all.

Result is disconnect from server.

The \n or .."\n".. fixes the tooltip to wrap in the places I want it to for the
Tooltip
Local post in channel and onscreen.

however the on click function when i'm raid leader or assitant disconnects client.

Will try more things I guess.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » hmmm, how to make the TOOLTIP not too long...


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off