Minion Beta! - Help us test our new AddOn updater. Get it now!
Download
(3 Kb)
Download
Updated: 07-03-08 12:02 AM
Pictures
File Info
Updated:07-03-08 12:02 AM
Created:unknown
Downloads:1,387
Favorites:2
MD5:
ScrollTip
Version: 1.0
by: Shaktar [More]
ScrollTip is a simple function which displays a large movable scrollable tooltip given a multi-line string. This string is usually instructions for a ui mod. If kept in a separate file, these instructions are known as a "read me" or help file. ScrollTip lets ui mod authors include the "read me" within the ui mod itself.

The user can scroll the text within the tooltip by using the mouse wheel. Since ScrollTip is rather simple, there is no scroll bar. The text can be quite long but if it's enormously long, the user would get tired of rolling the mouse wheel to scroll to the bottom of the text. If your text is so long that scrolling with the mouse wheel takes far too much time, then you would have to break up the text into smaller chunks, or use a more advanced function than ScrollTip.

The text can include three very simple html tags: big, b, i. Text within these tags are not displayed bigger, bolder or italicized, however. Since ScrollTip is rather simple, those tags are just turned into appropriately colorized text. For example, big is displayed in bright yellow, b in pastel yellow, and i in translucent yellow.

The size of the scrollable tooltip can be 'small', 'medium', or 'large'. If the size is omitted, medium is assumed. If the size is small, a small font is used because the normal font does not scroll well in a small tooltip. The normal font is used in medium and large tooltips.

ScrollTip is really easy to add to your ui mod.
1) Put ScrollTip.lua in your ui mod directory
2) Add ScrollTip.lua to your .toc file.
3) In your lua code, call ScrollTip(YourHelpString)

Once ScrollTip has been added to your ui mod and your ui mod is running, you can type /scrolltip to display these instructions and information on using ScrollTip. You can also type /scrolltip small to view a small tooltip and /scrolltip large to view a large tooltip. This way you can compare the sizes and see which size works best for you.

The ScrollTip function returns the frame containing the scrollable tooltip but it can be ignored since the user can close the tooltip themselves.

Example function calls:
ScrollTip('Hello World!', 'small')
ScrollTip('<big</big>big</big</big>')
tip = ScrollTip('save return value to close tip later')

ScrollTip is just a simple function to easily display a help file and there are no plans to add any features. I hope ScrollTip fits your needs.

----------------------------
If you upload a mod here at wowinterface that makes use of this library, I'd be very grateful to know the name of the mod as I am curious as to whether people will actually make use of this library. So, if you'd like to tell me, you can either post in the comments or send me a private message. Thanks in advance.
There have been no comments posted to this file.
Be the first to add one.



Category Jump: