Download
(101Kb)
Download
Updated: 02-28-10 11:20 PM
Pictures
File Info
Updated:02-28-10 11:20 PM
Created:unknown
Downloads:42,701
Favorites:207
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 (0)


Post A Reply Comment Options
Unread 12-31-09, 01:13 PM  
strawberrie
A Kobold Labourer

Forum posts: 0
File comments: 17
Uploads: 0
Hi I'm a little new to the lua coding.

StatusBar.Tags = ""

what script would i put in there to make it show me health values and not the 100% text?

this tooltip looks great. I can't wait for when gearscore works with it. I use a lot of mods and i'm always finding ways to replace memory hog addons with lighter ones.
Last edited by strawberrie : 12-31-09 at 01:14 PM.
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 01:09 PM  
Manaman
An Aku'mai Servant
AddOn Author - Click to view AddOns

Forum posts: 39
File comments: 160
Uploads: 1
I like the look of these new tooltips. Any chance you could replace the look of the Outfitter equipment tooltips and the Atlasloot tips, as they both seem to default to the default UI look?
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 12:41 PM  
-Raz-
A Kobold Labourer
 
-Raz-'s Avatar

Forum posts: 0
File comments: 49
Uploads: 0
Originally posted by Stuck
You'll have to change the tag function itself. Put this in your layout...

Code:
RantTooltip.Tags["$pvp"] = function(unit) return UnitIsPVP(unit) and "|cff00ff00PvP|r" end
That will make the pvp line green.

On a side note, you can do this for other functions too. Just as an example, if the function isn't so simple, you could do it this way:

Code:
local tag = RantTooltip.Tags["$pvp"]
RantTooltip.Tags["$pvp"] = function(unit) return (tag(unit) or ""):gsub("|c%x%x%x%x%x%x%x%x", "|cff00ff00") end
thx! now i got everything setup the way i like it, i love this mod and the new layout is great, lol
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 12:28 PM  
Stuck
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 127
Uploads: 14
Originally posted by -Raz-
hmm trying to change the red pvp tag line to green, is #00FF00 the right code ? seems about right but not 100% sure
You'll have to change the tag function itself. Put this in your layout...

Code:
RantTooltip.Tags["$pvp"] = function(unit) return UnitIsPVP(unit) and "|cff00ff00PvP|r" end
That will make the pvp line green.

On a side note, you can do this for other functions too. Just as an example, if the function isn't so simple, you could do it this way:

Code:
local tag = RantTooltip.Tags["$pvp"]
RantTooltip.Tags["$pvp"] = function(unit) return (tag(unit) or ""):gsub("|c%x%x%x%x%x%x%x%x", "|cff00ff00") end
Last edited by Stuck : 12-31-09 at 12:37 PM.
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 11:55 AM  
-Raz-
A Kobold Labourer
 
-Raz-'s Avatar

Forum posts: 0
File comments: 49
Uploads: 0
hmm trying to change the red pvp tag line to green, is #00FF00 the right code ? seems about right but not 100% sure
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 11:04 AM  
Stuck
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 127
Uploads: 14
Originally posted by copystring
Have you planned to add dynamic anchoring of the tooltip?
I'd like to have the tooltip in it's default position when hovering a unit in my unitframes but have it anchored to mouse when hovering the actual player in the world.
Right now i have to hook in GameTooltip_SetDefaultAnchor which isn't a nice way of doing this ...
Could you think of any practical way to have dynamic tooltip anchoring as an option? If you can, I'll add it.

Originally posted by torin
Could you put information in the Info tab so I don't have to glean what this does through reading 16 pages of comments?
I'm working on it.

Originally posted by leks0d
How to change anchor point to "BOTTOMRIGHT", UIParent, "RIGHT", -20, 200?
I imagine it would be something like:

Code:
RantTooltip:SetInitialAnchor{"RIGHT", -20, 235}
I'll change SetInitialAnchor in the future to allow other points.
Last edited by Stuck : 12-31-09 at 11:05 AM.
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 09:34 AM  
copystring
A Defias Bandit
AddOn Author - Click to view AddOns

Forum posts: 2
File comments: 68
Uploads: 1
Have you planned to add dynamic anchoring of the tooltip?
I'd like to have the tooltip in it's default position when hovering a unit in my unitframes but have it anchored to mouse when hovering the actual player in the world.
Right now i have to hook in GameTooltip_SetDefaultAnchor which isn't a nice way of doing this ...
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 08:04 AM  
Skylinee
A Murloc Raider

Forum posts: 5
File comments: 371
Uploads: 0
Originally posted by Meglivorn
Thanks. I'll look for another tooltip then. Wish all good for the new year and good luck
What exactly do you want to change? I'm sure if you just ask here, you'll get plenty of help.
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 07:38 AM  
Meglivorn
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
Originally posted by Stuck
There aren't any GUI options anymore. Everything is now configured in the layout instead.
Thanks. I'll look for another tooltip then. Wish all good for the new year and good luck
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 05:04 AM  
Skylinee
A Murloc Raider

Forum posts: 5
File comments: 371
Uploads: 0
Originally posted by Stuck
Are you sure? Quest information was on the tooltip in the screenshot you posted.
That's very weird, but i'm very sure i did a ''kill X amount of mobs'' type of quest and it didn't say how many i've killed.
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 03:50 AM  
torin
Premium Member
 
torin's Avatar
Premium Member

Forum posts: 4
File comments: 22
Uploads: 0
What's it do?

Could you put information in the Info tab so I don't have to glean what this does through reading 16 pages of comments?
Report comment to moderator  
Reply With Quote
Unread 12-31-09, 01:33 AM  
leks0d
A Kobold Labourer
 
leks0d's Avatar

Forum posts: 1
File comments: 71
Uploads: 0
How to change anchor point to "BOTTOMRIGHT", UIParent, "RIGHT", -20, 200?
Report comment to moderator  
Reply With Quote
Unread 12-30-09, 11:37 PM  
Stuck
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 127
Uploads: 14
Updated.

Fixed a few things:
Text with multiple variables on the line will now have the correct color.
Fixed the health bar text.
Some other minor things.
Report comment to moderator  
Reply With Quote
Unread 12-30-09, 08:46 PM  
Stuck
A Kobold Labourer
AddOn Author - Click to view AddOns

Forum posts: 1
File comments: 127
Uploads: 14
Originally posted by -Raz-
is there any way to make it display values in the power bar ? even if they are shrunk down to fit the smaller size
The current power values? Look in your layout file. Under the "Health" conditional of the "for" for the statusbars, there should be a line that says something like,
Code:
statusBar.Tags = "{$miss }$perc%"
Copy and paste that line below, under "else" and change the variables to whatever you want, of course.

edit: Forgot to mention you need to put a text region there too. The code under the "else" should look something like this:
Code:
else
	statusBar.Anchor = { 0, 25 }
	statusBar.unitColors = true
	statusBar.powerColors = false
	
	statusBar.bg:SetTexture("Interface\\ChatFrame\\ChatFrameBackground")
	statusBar.bg.color = 0.3
			
	statusBar:SetHeight(12) --set a bigger height
	statusBar:SetPoint("TOPLEFT", self.HealthBar, "BOTTOMLEFT", 0, -1)
	statusBar:SetPoint("TOPRIGHT", self.HealthBar, "BOTTOMRIGHT", 0, -1)
				
	statusBar.text = statusBar.text or statusBar:CreateFontString(nil, "OVERLAY")
	statusBar.text:SetFont(font, 12, "OUTLINE")
	statusBar.text:SetJustifyH("CENTER")
	statusBar.text:SetAllPoints(statusBar)
	statusBar.Tags = "{$miss }$perc%"
end
edit: another thing, is there any way to display this line properly
Code:
"{[$guild]}{ ($rank)}",
nm what i try either the line does not display at all, the [] brackets around the guild name display in orange or the 1st ( of the rank displays in purple
This was hard to code for me for me because the actual variable tags return the color, not the constant text like "[" or "]", so I had to figure out a way to color the rest of the text using the color that the variable function returned. As of right now, it only works with single variable lines, which is why it doesn't work properly with $rank in there too. I just fixed this for the next update which will be soon.

edit2: any way to make hostile NPC name colors actually red ? they seem to be displayed in the orangeish hostile faction color (instead of red for hated)

that reaction color "bug" might be related to the error richerich posted, said error only pops up when targeting NPCs or mobs, but not for players [/b]
Yes. If you liked the old reaction colors, there is a way to change them. Open your layout, and the default reaction colors for that layout look like this:
Code:
RantTooltip.ReactionColors[2] = {1, 0, 0}
RantTooltip.ReactionColors[4] = {1, 1, 0}
RantTooltip.ReactionColors[5] = {0, 1, 0}
Delete all of those lines and replace them with:
Code:
RantTooltip.ReactionColors = {
	{ 1, 0, 0 },
	{ 1, 0, 0 },
	{ 1, 0.5, 0 }, 
	{ 1, 1, 0 },
	{ 0, 1, 0 },
	{ 0, 1, 0 },
	{ 0, 1, 0 }, 
	{ 0, 1, 0 },
}
Originally posted by Skylinee
Will this be fixed aswell?

http://img163.yfrog.com/img163/3725/sfdsfdsfsd.jpg
I'm assuming you're referring to the health text. Yes, it is already fixed and ready for the next update.

Quest information seems to be missing from the tooltip also.
Are you sure? Quest information was on the tooltip in the screenshot you posted.

Originally posted by Meglivorn
is it only me or really no options gui in this version? In the old addon I could setup in the game interface/addons tab, but now I can't find options anywhere.
There aren't any GUI options anymore. Everything is now configured in the layout instead.


I'll have to look at the conflicts with GearScore and Clique. From just looking at the code I can't see anything that would conflict with RantTooltip. When do these errors occur using gearscore or clique?
Last edited by Stuck : 12-31-09 at 09:28 AM.
Report comment to moderator  
Reply With Quote
Unread 12-30-09, 02:29 PM  
Meglivorn
A Kobold Labourer

Forum posts: 0
File comments: 4
Uploads: 0
is it only me or really no options gui in this version? In the old addon I could setup in the game interface/addons tab, but now I can't find options anywhere.
Last edited by Meglivorn : 12-30-09 at 05:37 PM.
Report comment to moderator  
Reply With Quote
Post A Reply



Category Jump: