Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(3 Kb)
Download
Updated: 01-13-10 08:02 PM
Pictures
File Info
Updated:01-13-10 08:02 PM
Created:08-05-09 04:52 PM
Downloads:1,708
Favorites:7
MD5:

RantTooltip Library

Version: 0.04
by: Stuck [More]

Stand-alone version of the tooltip functions used by RantTooltip.

This hopefully makes for easier coding of tooltip addons.

GameTooltip functions:
GameTooltip.DeleteLine(lineNumber or lineObject or "lineText"[, exact]) - Does just what it says. Deletes the line.
AddLine has been hooked to ensure DeleteLine works correctly. If text is entered, DeleteLine will search
the tooltip for the first line it finds with said string in it. If exact is true, it will search each a line which
equals that exact string.

GameTooltip.DeleteAllLines() - Deletes all lines. Similar to ClearLines, however, this clears text only.

GameTooltip:AddLine("tooltipText"[, r, g, b[, wrapText]]) - Will now return the newly added line.

GameTooltip:InsertLine(lineNumber, "tooltipText"[, r, g, b]) - Just like AddLine, except you can insert
this line anywhere into the tooltip.

GameTooltip:FindLine("lineText"[, exact, startFrom]) - Searches every line on the tooltip for certain text.
You can have it search for an exact line and you can also choose which like it begins searching at.

GameTooltip:GetLine(lineNumber or "lineNumber" or lineObject) - Returns the line object if the line
number is input. It works in reverse if the line object is input, and returns the number.

GameTooltip:AdjustStatusBars(offset) - Offsets the built in status bars on the tooltip by however many lines.

GameTooltip:NumLines(ignoreDeleted) - If ignoreDeleted is set to true, NumLines will only return the
real, visible lines. The original NumLines would sometimes return a number that would include lines
that were hidden or deleted. This ignores all lines equal to "".

GameTooltip:GetUnit() - Just like the old GetUnit with the same returns, however, this one works
a bit differently. It returns the unit attribute from ALL secure unit frames and not just simply,
"mouseover", for some. It also returns the unit for raid group buttons.

0.04 - Text will now stay wrapped after using DeleteLine.
- When using InsertLine or using AddLine to overwrite a deleted line, wrapping the text will now work properly.

0.03 - Fixed an issue concerning GameTooltip.FindLine.

0.02 - Fixed GetUnit by using a prehook instead of posthook.
- Now sets GameTooltip.unit to the current unit.

0.01 - Initial release.
Archived Files (3)
File Name
Version
Size
Author
Date
0.03
3kB
Stuck
01-10-10 10:53 PM
0.02
3kB
Stuck
01-09-10 01:11 AM
0.01
3kB
Stuck
12-29-09 07:06 AM


There have been no comments posted to this file.
Be the first to add one.



Category Jump: