Category: ToolTip
Addon Information
Works with 3.3
Download Latest Version.
To add favorites please register for a free account. If you already have one you need to login. How do I install this? (FAQ)
Author:
Version:
0.27
Date:
01-28-2010 03:38 AM
Size:
100.97 Kb
Downloads:
31,195
Favorites:
238
MD5:
Pictures
example unit tooltip
RantTooltip   Popular! (More than 5000 hits)
Tags and layouts are now fully explained in the documentation included with RantTooltip.

Another Update: I've decided to go another direction with RantTooltip. Recently, I was inspired by oUF to recode RantTooltip in such a way that it includes a layout system. You'll find it very similar to oUF. A sample layout is included, based on p3lim's oUF layout. It was designed to match p3lim's layout due to my personal use of it. I take no credit for the design.

For everyone who prefers the original RantTooltip look, I've uploaded a layout called RantTooltip Classic.

This new version of RantTooltip includes a tagging system. Variables are denoted by a dollar sign ($) (i.e. "$name" for a unit's name). {} brackets encompass conditionals. Text inside the conditional brackets will only display if every conditional inside them has a return value. For example: "{Target: $target}" - The target line will only display if there is a target. Or: "$name{: $target}" - Again, the colon and target name will only display if the unit actually has a target.

-[Rum] (Stuck)
  Change Log - RantTooltip
0.27 - Colons next to tag variables are no longer colored to be consistent with the adjacent variable. This was conflicting with tag updates.
- Added two more new tags: $curshort and $maxshort. These variables will display health and power values but will reduce their size if necessary.
- For example: 125000 becomes 125k. 1500000 becomes 1.5m.
- Added a $spec tag which will display the player's current spec - their talent tree with the most points in it.
- Do not use $spec and $talents in the same conditional. It will not work. If you want them on the same line, put them in separate conditionals, like this:
Code:
"{Talents: [$spec]}{ ($talents)}",
instead of:
Code:
"{Talents: [$spec] ($talents)}",

0.26 - Added $talents tag which displays the player's talents.
- Fixed a small issue with tag updates.
- Fixed an error concerning layouts without raid icons or combat icons.
- Various small changes.

0.25 - Fixed a few errors involving the DeleteLine function and unit tags.
- Updated the library.
- Other minor changes.

0.24 - Fixed a tag update issues that concerned "$target".
- Added PreOnSizeChanged and PostOnSizeChanged functions for every tooltip.
- Fixed an issue concerning GameTooltip.FindLine in the library.

0.23 - Updated a few things.
- Colons are now colored according to the tag variable to the left of them.
- Fixed and changed the library.
- Cleaned up code.
- Other miscellaneous changes.

0.22 - Fixed a conflict with GearScore. GearScore tooltip text now displays properly.
-Add override functions (i.e.):
GameTooltip.OverrideSetDefaultAnchor(self, parent)
GameTooltip:PreSetUnit(unit)
GameTooltip:PostSetUnit(unit)
GameTooltip:PreOnShow()
GameTooltip:PostOnShow()
GameTooltip:PreOnHide()
GameTooltip:PostOnHide()
GameTooltip:OverrideUpdateHealthBar(bar, cur, max)
GameTooltip:PreUpdateHealthBar(bar, cur, max)
GameTooltip:PostUpdateHealthBar(bar, cur, max)
GameTooltip:OverrideUpdatePowerBar(bar, cur, max)
GameTooltip:PreUpdatePowerBar(bar, cur, max)
GameTooltip:PostUpdatePowerBar(bar, cur, max)

0.21 - Fixed health bar text, fixed text color, and a few other things changed.

0.2 - Updated to fix memory problem.
  Optional Files - RantTooltip
File Name
Version
Size
Author
Date
Type
1.0b
7kB
01-28-2010 06:01 AM
Addon
1.1
44kB
01-10-2010 06:15 PM
Addon
  Archived Versions - RantTooltip
File Name
Version
Size
Author
Date
0.26
97kB
Stuck
01-26-2010 03:30 AM
0.25
97kB
Stuck
01-13-2010 09:00 PM
0.24
97kB
Stuck
01-10-2010 11:52 PM
0.23
76kB
Stuck
01-09-2010 02:09 AM
0.22
76kB
Stuck
12-31-2009 06:37 PM
0.21
76kB
Stuck
12-31-2009 09:58 AM
0.2
76kB
Stuck
12-29-2009 04:05 PM
0.2
76kB
Stuck
12-29-2009 01:36 PM
0.2
76kB
Stuck
12-29-2009 12:33 PM
66
23kB
Stuck
08-05-2009 06:56 PM
65
21kB
Stuck
04-16-2009 01:25 PM
65
17kB
Stuck
04-16-2009 01:40 AM
65
21kB
Stuck
04-15-2009 10:33 AM
r64
16kB
Stuck
11-27-2008 02:16 PM
r64
16kB
Stuck
11-27-2008 09:46 AM
r63
14kB
Stuck
11-18-2008 05:01 PM
  Comments - RantTooltip
Post A Reply Comment Options
Old Yesterday, 01:16 PM  
mightymousie
A Kobold Labourer

Forum posts: 0
File comments: 1
Uploads: 0
I no longer have tooltips for spells and abilities on actionbars. How do I edit/fix/add this in the lua? Or is this an error?
mightymousie is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 02-07-2010, 03:16 PM  
Hirork
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Quote:
Originally posted by apocalipsus
Theres no option menu with this addon. The changes are made on the lua file of the layout
I'm sure there was an option menu... well then i have to find another tooltip addon, though this one was one of the best...
Hirork is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 02-07-2010, 08:49 AM  
apocalipsus
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Quote:
Originally posted by Hirork
Did I miss something, but there is no options panel in the "interface/addon" menu
Theres no option menu with this addon. The changes are made on the lua file of the layout
apocalipsus is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 02-05-2010, 11:46 AM  
Hirork
A Kobold Labourer

Forum posts: 0
File comments: 2
Uploads: 0
Did I miss something, but there is no options panel in the "interface/addon" menu
Hirork is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 02-03-2010, 08:09 PM  
Stuck
A Kobold Labourer
Interface Author - Click to view interfaces

Forum posts: 1
File comments: 125
Uploads: 13
Quote:
Originally posted by Hexe
I'm having a problem between RantTooltip and Questhelper.
It seems to happen whenever the questhelper line in the tooltip would need to change (Island Shoveltusk Meat 3/6 - for example).

Edit: After further testing, it seems to happen for any tooltip that has the questhelper info on it, whether it just updated or not. Turning off the questhelper tooltip info gets rid of the error, so just doing that for now.
Fixed for next update.
Stuck is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 02-01-2010, 09:11 PM  
Hexe
A Deviate Faerie Dragon

Forum posts: 11
File comments: 12
Uploads: 0
I'm having a problem between RantTooltip and Questhelper.
It seems to happen whenever the questhelper line in the tooltip would need to change (Island Shoveltusk Meat 3/6 - for example).


Code:
Message: Interface\AddOns\RantTooltip\RantTooltip.lua:161: attempt to index local 'text' (a nil value)
Time: 02/01/10 20:06:13
Count: 22
Stack: (tail call): ?
[C]: ?
Interface\AddOns\RantTooltip\RantTooltip.lua:161: in function `GetUnitInfo'
Interface\AddOns\RantTooltip\RantTooltip.lua:452: in function `SetUnit'
Interface\AddOns\RantTooltip\RantTooltip.lua:542: in function <Interface\AddOns\RantTooltip\RantTooltip.lua:541>
[C]: in function `func'
Interface\AddOns\QuestHelper\manager_event.lua:22: in function `QH_Hook_NotMyFault'
Interface\AddOns\QuestHelper\tooltip.lua:371: in function `func'
Interface\AddOns\QuestHelper\manager_event.lua:43: in function <Interface\AddOns\QuestHelper\manager_event.lua:25>
Interface\AddOns\QuestHelper\manager_event.lua:163: in function <Interface\AddOns\QuestHelper\manager_event.lua:163>

Locals: (*temporary) = nil
(*temporary) = <function> defined =[C]:-1
Edit: After further testing, it seems to happen for any tooltip that has the questhelper info on it, whether it just updated or not. Turning off the questhelper tooltip info gets rid of the error, so just doing that for now.

Last edited by Hexe : 02-02-2010 at 03:54 PM.
Hexe is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-30-2010, 11:33 AM  
Gregory
A Kobold Labourer

Forum posts: 0
File comments: 39
Uploads: 0
Quote:
Originally posted by Stuck

RantTooltip shouldn't be interfering with that addon. I can't think of anything that RantTooltip would be doing that would conflict with that addon. Does it work correctly when RantTooltip is disabled?

Well, without Rant tooltips show in corner. But other tooltip anchoring mods bring it to cursor.
Gregory is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-30-2010, 11:06 AM  
Stuck
A Kobold Labourer
Interface Author - Click to view interfaces

Forum posts: 1
File comments: 125
Uploads: 13
Quote:
Originally posted by Amenity
Ok, Stuck...what have I done now? (lol)



(Note: According to those references, has something to do with hiding the tooltip when mouseover = worldframe)

And things were going SO well for my layout revision today!

**EDIT: Also, how can I remove the status bar borders when statusBarsInTooltip = true?
I can't really tell you whats wrong without seeing your layout. What were the latest changes you made before you started getting that error?

RantTooltip_Classic wasn't really made to be the basis for other layouts. Those statusbars in the tooltip aren't created by RantTooltip, they're created by the default statusbar function. I wouldn't recommend modifying RantTooltip_Classic if you're working on your own layout. It has a lot of good specific examples for particular things you might want to do with your layout, but it's kind of complicated and messy too.

Quote:
Originally posted by Gregory
Hello, Stuck !

Was in party yesterday and party frames have same problem not always showing tooltips. I'm not sure, but may be it somehow range related because tooltips often (but not always) doesn't shown for units not in range.

About Skada bars tooltip I've made screenshot. It shows detailed damage stats on tooltip when you mouseover bar and tooltip should appear near cursor. I've drawn mouse cursor myself because it doesn't got screenshooted
RantTooltip shouldn't be interfering with that addon. I can't think of anything that RantTooltip would be doing that would conflict with that addon. Does it work correctly when RantTooltip is disabled?

As for the problem of the tooltip not showing on certain unit frames, I'll still look into it and try to figure it out.

Last edited by Stuck : 01-30-2010 at 11:07 AM.
Stuck is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-30-2010, 10:00 AM  
Amenity
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Ok, Stuck...what have I done now? (lol)

Code:
Error occured in: Global
Message: C stack overflow
Debug:
   [C]: ?
   [C]: ?
   ...
   [C]: ?
   [C]: ?
   [C]: Hide()
   RantTooltip\RantTooltip.lua:560:
      RantTooltip\RantTooltip.lua:545


(Note: According to those references, has something to do with hiding the tooltip when mouseover = worldframe)

And things were going SO well for my layout revision today!

**EDIT: Also, how can I remove the status bar borders when statusBarsInTooltip = true?

Last edited by : 01-30-2010 at 10:40 AM.
Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-30-2010, 04:56 AM  
Gregory
A Kobold Labourer

Forum posts: 0
File comments: 39
Uploads: 0
Hello, Stuck !

Was in party yesterday and party frames have same problem not always showing tooltips. I'm not sure, but may be it somehow range related because tooltips often (but not always) doesn't shown for units not in range.

About Skada bars tooltip I've made screenshot. It shows detailed damage stats on tooltip when you mouseover bar and tooltip should appear near cursor. I've drawn mouse cursor myself because it doesn't got screenshooted

Gregory is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-29-2010, 10:43 PM  
Stuck
A Kobold Labourer
Interface Author - Click to view interfaces

Forum posts: 1
File comments: 125
Uploads: 13
Quote:
Originally posted by Riokou
Ugg... I spent about 20 minutes messing with lib.lua and I managed to set up DoubleLine functionality... But then I realized one small odd bug and spent an hour or so trying to fix it with no luck...

I decided to use "!" as a left/right line divider. For some reason if you don't put one in your custom tags, things get messed up when adding lines to a tooltip when it is already shown. So really, all you have to do is add a "!" to the end of all of your tags (if it doesn't have one already) and there won't be any problems. I have no idea why I can't get it to work right... I even tried adding a bit of code in different places to add a "!" to each tag if it didn't have one and that wouldn't fix it.

Here's my code (lib.lua):

And also...

If anyone can pick out the problem, please do. I don't know my way around this addon very well since I didn't write it, so the answer isn't obvious.


/wave
Having the lines split in the AddLine hook is not a good idea. That will affect other addons that may use AddLine. Instead, I had the lines split in RantTooltip.ReplaceTags. If there is a "|", it will return 2 values, the strings for the left and right lines. "|" turned out to not be a very good symbol to use because of hex colors. Didn't realize that at the time. I may use "&" or "#" instead.

I've already rewritten DeleteLine so it deletes both lines and moves every other line, including the right lines, up correctly. I've added an InsertDoubleLine, and hooked AddDoubleLine properly. Changed InsertLine so it also works properly when interacting with double lines.

Everything is working so far. The only problem so far, is the UpdateTag function. In other words, it all works perfectly so far, the tags just aren't updating.

Last edited by Stuck : 01-29-2010 at 10:47 PM.
Stuck is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-29-2010, 08:30 PM  
Riokou
A Murloc Raider
Interface Author - Click to view interfaces

Forum posts: 5
File comments: 2
Uploads: 5
Ugg... I spent about 20 minutes messing with lib.lua and I managed to set up DoubleLine functionality... But then I realized one small odd bug and spent an hour or so trying to fix it with no luck...

I decided to use "!" as a left/right line divider. For some reason if you don't put one in your custom tags, things get messed up when adding lines to a tooltip when it is already shown. So really, all you have to do is add a "!" to the end of all of your tags (if it doesn't have one already) and there won't be any problems. I have no idea why I can't get it to work right... I even tried adding a bit of code in different places to add a "!" to each tag if it didn't have one and that wouldn't fix it.

Here's my code (lib.lua):

lua Code:
  1. GameTooltip["AddLine"] = function(self, msg, r, g, b, wrap)
  2.     local left, right = strmatch(msg, "(.*)!(.*)")
  3.     left = left or msg
  4.     right = right or ""
  5.     local numLines = self:NumLines()
  6.     for i = 1, numLines do
  7.         local line = _G["GameTooltipTextLeft"..i]
  8.         if line.deleted then
  9.             local line2 = _G["GameTooltipTextRight"..i]
  10.             line.deleted = nil
  11.             line:SetText(left)         
  12.             line2:SetText(right)
  13.             line:SetTextColor(r or 1, g or 0.82, b or 0)
  14.             line2:SetTextColor(r or 1, g or 0.82, b or 0)
  15.             line:Show()
  16.             line2:Show()
  17.             return line
  18.         end
  19.     end
  20.     _AddDoubleLine(self, left, right)
  21.     return self:GetLine(numLines+1)
  22. end
And also...
lua Code:
  1. GameTooltip["DeleteLine"] = function(self, line, exact)
  2.     local numLines, originalNum, barNum, lineR = self:NumLines()
  3.     if type(line) == "number" then
  4.         line = _G["GameTooltipTextLeft"..line]
  5.     elseif type(line) == "string" then
  6.         line = self:FindLine(line, exact)
  7.     end
  8.     if line then
  9.         originalNum = self:GetLine(line)
  10.         if line ~= _G["GameTooltipTextLeft"..numLines] then
  11.             local number = self:GetLine(line)
  12.             local tbl, tbl2 = {},{}
  13.             for i = number+1, numLines do
  14.                 tbl[i-1] = _G["GameTooltipTextLeft"..i]
  15.                 tbl2[i-1] = _G["GameTooltipTextRight"..i]
  16.             end
  17.             for k, v in pairs(tbl) do
  18.                 local text = v:GetText()
  19.                 local newLine = _G["GameTooltipTextLeft"..k]
  20.                 if v:GetStringHeight() > select(2,v:GetFont()) then
  21.                     --text = wrapText(text)
  22.                 end
  23.                 newLine.deleted = v.deleted
  24.                 newLine:SetText(text)
  25.                 newLine:SetTextColor(v:GetTextColor())
  26.                 if tbl2[k] then
  27.                     local text2 = tbl2[k]:GetText()                
  28.                     local newLine2 = _G["GameTooltipTextRight"..k]
  29.                     newLine2:SetText(text2)                
  30.                     newLine2:SetTextColor(tbl2[k]:GetTextColor())
  31.                 end
  32.             end
  33.             line = _G["GameTooltipTextLeft"..numLines]
  34.             lineR = _G["GameTooltipTextRight"..numLines]
  35.             if not line then return end
  36.         end
  37.         line.deleted = true
  38.         line:SetText("")   
  39.         line:Hide()
  40.         if lineR then
  41.             lineR:SetText("")          
  42.             lineR:Hide()
  43.         end
  44.         self:Show()
  45.         barNum = select(2, self:FindLine(" ", true))
  46.         if barNum and originalNum <= barNum then
  47.             self:AdjustStatusBars(-1)
  48.         end
  49.     end
  50. end
If anyone can pick out the problem, please do. I don't know my way around this addon very well since I didn't write it, so the answer isn't obvious.


Quote:
Originally posted by Amenity
Hi there, remember me from the WoW forums?
/wave

Last edited by Riokou : 01-29-2010 at 09:57 PM.
Riokou is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-29-2010, 08:01 PM  
Amenity
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Quote:
Originally posted by Riokou
(CowTip has a memory leak that makes me crash in raids ).
Hi there, remember me from the WoW forums?

Last edited by : 01-29-2010 at 08:07 PM.
Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-29-2010, 07:41 PM  
Stuck
A Kobold Labourer
Interface Author - Click to view interfaces

Forum posts: 1
File comments: 125
Uploads: 13
Quote:
Originally posted by Riokou
I'm guessing some function would need to be added to lib.lua, and the core file would need to be edited too... I'm not sure what the best notation for adding a double line would be either... any ideas? Maybe something like "$tab" to designate what is after it should be on the right side.
You're right. I would need to add new functions in lib.lua, such as GameTooltip.DeleteDoubleLine, or maybe just change DeleteLine so it deleted both left and right lines if necessary. I've contemplated adding double line functionality in the past, but never got around to it. Right now I'm thinking I could have "|" be the symbol that separates the two lines in SetUnitTags. i.e.

Code:
"$name|$target",
This is definitely possible, but I'll have to work on it a bit and figure it out.

Last edited by Stuck : 01-29-2010 at 07:45 PM.
Stuck is online now Report comment to moderator   Edit/Delete Message Reply With Quote
Old 01-29-2010, 07:34 PM  
Riokou
A Murloc Raider
Interface Author - Click to view interfaces

Forum posts: 5
File comments: 2
Uploads: 5
How would I go about adding "DoubleLine" functionality to this? (i.e. GameTooltip:AddDoubleLine()) I'm not sure exactly what goes on in the inner workings of this addon or what would need to be done to add double lines, so I figured it would be better to ask here rather than tinker with it myself.

I'm guessing some function would need to be added to lib.lua, and the core file would need to be edited too... I'm not sure what the best notation for adding a double line would be either... any ideas? Maybe something like "$tab" to designate what is after it should be on the right side.

Now that I think about it, what would work (for me at least) would be to simply change all normal "lines" to double lines... thats how CowTip worked and I'd like to match that if possible (CowTip has a memory leak that makes me crash in raids ).

Last edited by Riokou : 01-29-2010 at 07:46 PM.
Riokou is offline Report comment to moderator   Edit/Delete Message Reply With Quote
Post A Reply



Category Jump:




The Network:
EQInterface | EQ2Interface | LoTROInterface | MMOInterface | War.MMOUI | WoWInterface | VGInterface | Allakhazam | Thottbot | Wowhead | Zam


©2009 MMOUI / ZAM Network
vBulletin - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.