Thread Tools Display Modes
07-25-06, 03:14 PM   #1
Dialos
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 10
Gametooltip help

I've created an addon that uses EnhTooltip to add data to the GameTooltip. The problem is that EnhTooltip limits how I can format the data output at the bottom of the GameTooltip and I'm not a huge fan of embedding more text into the already sometimes long GameTooltip (Set item descriptions, auctioneer, sellvalue). There's already too much and the text of my mod seems to fall off the end when there are a lot of lines in the tooltip already.

So, what I'm wanting to do is create a tooltip that is anchored to the right side of the Blizzard GameTooltip when a weapon or piece of armor is moused over. That way I don't have to worry about running out of space for my output. Also making sure it stays in the viewable area of the screen is always a plus.

The problem is that I'm not all that great with XML so I have had problems figuring out how to create my own tooltip and get it to sit next to the GameTooltip when I want it to. I've looked over this entire forum and several others for any clue as to how to work with the GameTooltip and think I have some good starting places, but I'm still not sure how to go about creating the tooltip. The number of lines in it would definitely be dynamic, because I would never know how my lines I would need to display until an item is moused over.

To get an idea of what I'm trying to do check out my addon as it is now with EnhTooltip.
http://www.wowinterface.com/download...are_Stats.html

If someone could point me to something that could help me or suggest a mod that I can look at.
Any help would be appreciated. Thanks.
  Reply With Quote
07-25-06, 04:27 PM   #2
Esamynn
Featured Artist
Premium Member
Featured
Join Date: Jan 2005
Posts: 395
XML definition of your tooltip frame:
Code:
<GameTooltip name="SomeTooltip" inherits="GameTooltipTemplate">
	<Anchors>
		<Anchor point="TOPLEFT" relativeTo="GameTooltip" relativePoint="TOPRIGHT">
			<Offset>
				<AbsDimension x="5" y="0"/>
			</Offset>
		</Anchor>
	</Anchors>
</GameTooltip>
This default tooltip template allows upto 24 lines, which should be enough for whatever you are doing. If not, you can always look into the GameTooltip:AddFontStrings widget method. The offset in the anchor is for spacing purposes and might need to be tweeked.

Then, whenever you goto add stuff to your tooltip, do the following first.
Code:
SomeTooltip:ClearLines();
SomeTooltip:SetOwner(GameTooltip, "ANCHOR_PRESERVE");
Also remember to use
Code:
SomeTooltip:Show();
after you finish adding lines so that your tooltip can resize itself correctly.
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Gametooltip help


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