Download
(101 Kb)
Download
Updated: 02-28-10 11:20 PM
Pictures
File Info
Updated:02-28-10 11:20 PM
Created:unknown
Downloads:39,269
Favorites:214
MD5:
RantTooltip  Popular! (More than 5000 hits)
Version: 0.28
by: Stuck [More]
RantTooltip (GUI) Options here.

(NOTE: If you plan on using a layout other than the default layout, you need to delete the RantTooltip_Layout folder first.)

RantTooltip is a tooltip addon that was influenced by oUF to include a layout system for tooltips. 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.

The documentation included in the zip file should give you all the information you need on how you create your own tooltip layout.

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

-[Rum] (Stuck)
0.28 - "<" and ">" will now be colored according to the tag variable the encompass.
- The last player's talent spec will now be cached. This will stop the "Loading" text from flashing in some cases.

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 (1)
File Name
Version
Size
Author
Date
Type
1.0d
14kB
11-11-10 03:35 AM
Addon


Archived Files (17)
File Name
Version
Size
Author
Date
0.27
101kB
Stuck
01-28-10 02:38 AM
0.26
97kB
Stuck
01-26-10 02:30 AM
0.25
97kB
Stuck
01-13-10 08:00 PM
0.24
97kB
Stuck
01-10-10 10:52 PM
0.23
76kB
Stuck
01-09-10 01:09 AM
0.22
76kB
Stuck
12-31-09 05:37 PM
0.21
76kB
Stuck
12-31-09 08:58 AM
0.2
76kB
Stuck
12-29-09 03:05 PM
0.2
76kB
Stuck
12-29-09 12:36 PM
0.2
76kB
Stuck
12-29-09 11:33 AM
66
23kB
Stuck
08-05-09 04:56 PM
65
21kB
Stuck
04-16-09 11:25 AM
65
17kB
Stuck
04-15-09 11:40 PM
65
21kB
Stuck
04-15-09 08:33 AM
r64
16kB
Stuck
11-27-08 01:16 PM
r64
16kB
Stuck
11-27-08 08:46 AM
r63
14kB
Stuck
11-18-08 04:01 PM


Post A Reply Comment Options
Unread 02-07-10, 07:49 AM  
apocalipsus
A Murloc Raider
AddOn Author - Click to view AddOns

Forum posts: 5
File comments: 48
Uploads: 3
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  
Reply With Quote
Unread 02-05-10, 10:46 AM  
Hirork
A Kobold Labourer

Forum posts: 0
File comments: 5
Uploads: 0
Did I miss something, but there is no options panel in the "interface/addon" menu
Hirork is offline Report comment to moderator  
Reply With Quote
Unread 02-03-10, 07:09 PM  
Stuck
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 127
Uploads: 14
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 offline Report comment to moderator  
Reply With Quote
Unread 02-01-10, 08:11 PM  
Hexe
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 14
File comments: 27
Uploads: 2
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-10 at 02:54 PM.
Hexe is offline Report comment to moderator  
Reply With Quote
Unread 01-30-10, 10:33 AM  
Gregory
A Kobold Labourer

Forum posts: 0
File comments: 67
Uploads: 0
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  
Reply With Quote
Unread 01-30-10, 10:06 AM  
Stuck
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 127
Uploads: 14
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.

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-10 at 10:07 AM.
Stuck is offline Report comment to moderator  
Reply With Quote
Unread 01-30-10, 09: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-10 at 09:40 AM.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Unread 01-30-10, 03:56 AM  
Gregory
A Kobold Labourer

Forum posts: 0
File comments: 67
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  
Reply With Quote
Unread 01-29-10, 09:43 PM  
Stuck
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 127
Uploads: 14
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-10 at 09:47 PM.
Stuck is offline Report comment to moderator  
Reply With Quote
Unread 01-29-10, 07:30 PM  
Riokou
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 2
Uploads: 6
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.


Originally posted by Amenity
Hi there, remember me from the WoW forums?
/wave
Last edited by Riokou : 01-29-10 at 08:57 PM.
Riokou is offline Report comment to moderator  
Reply With Quote
Unread 01-29-10, 07:01 PM  
Amenity
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
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-10 at 07:07 PM.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Unread 01-29-10, 06:41 PM  
Stuck
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 127
Uploads: 14
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-10 at 06:45 PM.
Stuck is offline Report comment to moderator  
Reply With Quote
Unread 01-29-10, 06:34 PM  
Riokou
A Deviate Faerie Dragon
AddOn Author - Click to view AddOns

Forum posts: 13
File comments: 2
Uploads: 6
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-10 at 06:46 PM.
Riokou is offline Report comment to moderator  
Reply With Quote
Unread 01-29-10, 06:33 PM  
Stuck
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 127
Uploads: 14
Amenity,

edit: Nevermind, I'm gonna PM you to make sure you see this.
Last edited by Stuck : 01-29-10 at 06:42 PM.
Stuck is offline Report comment to moderator  
Reply With Quote
Unread 01-29-10, 06:22 PM  
Amenity
Guest

Join Date: Not Yet
Forum posts: 0
File comments: 0
Uploads: 0
Originally posted by Stuck
I don't know what to tell you, using PostOnSizeChanged to change the border color works fine with the RantTooltip_Classic layout. The problem is either with your layout or your other addons. Try using RantTooltip_Classic and see if it changes item tooltip border colors properly. If it does, the problem is with your layout, if it doesn't, the problem is with some other addon you have that may be interfering.

Very possible. Through all this stuff this poor little layout has been hacked nine ways to Sunday. I'm gonna spend a few hours late tonight cleaning her up.

Ahh, didn't realize that would happen. Sorry about that. I'll be fixing this for the next update then. For now:

Code:
if self:IsObjectType("GameTooltip") then
--put the OnTooltipSetItem and OnHide functions here
end
Eureka!



lua Code:
  1. if self:IsObjectType("GameTooltip") then
  2.     self:SetScript("OnTooltipSetItem", function()
  3.         if self:GetItem() then
  4.             local link = select(2,self:GetItem())
  5.             local rarity = select(3,GetItemInfo(link)) or 1
  6.             self:SetBackdropBorderColor(GetItemQualityColor(rarity))
  7.         end
  8.     end)
  9.  
  10.     self:SetScript("OnHide", function()
  11.         if self:GetItem() then
  12.         self:SetBackdropBorderColor(1, 1, 1, 1)
  13.         end
  14.     end)
  15. end
Perfect.

**EDIT: Also, <3 <3 <3 <3 Thank you for your help!
Last edited by : 01-29-10 at 06:24 PM.
Report comment to moderator  
Edit/Delete Message Reply With Quote
Post A Reply



Category Jump: