Library: Zasurus' Useful Functions (LibZasUsefulFuncs)

Development Tools Login to Add Favorites
  • 0 Likes
  • World of Warcraft
  • 38 Monthly Downloads
  • Supports: 4.2
  • 1,584 Total Downloads
  • Updated 12/2/2011 4:04:00 PM
  • Created 12/14/2010 5:50:25 PM
  • 0 Favorites
  • Project Site
  • Release Type: Beta
  • License: All Rights Reserved
  • Newest File: V0.1-9 BETA
or

About Library: Zasurus' Useful Functions (LibZasUsefulFuncs)

This library is a few useful functions that most AddOns could use at one point or another. I use them in lots of my AddOns and to keep the newest version in all my AddOns I decided to make this library and if it exists it may as well get published for others to use! ;)

So far the functions that exist are:

function TableCount(tableToCount) -- Counts table members

function TableMax(tableToGetMax) -- Pulls back the maximun number (index) for the table specified (Like TableCount() but works when all the table entrys are not in sequencial or contain none Numbers

function TblLowCheck(TestTable, TestValue) -- Checks a table to see if the key is the "TestValue" in any case

function CopyTable(src) -- Copys a table (instead of just pointing to it)

function StrFirstUpper(str) -- Returns the string with the first letter in upper case and the rest in lower case

function ReturnChatFrame(ChatFrameNumber) -- Given a number this returns the ChatFrame for that number. e.g. if 1 is given it will return ChatFrame1

function Round(Number, DecimalPlaces, Type) -- Round to # dicimal places and convert to number

function GetAddonVersion(AddonName) -- Takes an addon's Name as a string (the toc file name) and returns the version and weather it's an ALPHA, BETA or RELEASE. It assumes the toc field "## Version: " is filled in and it's in the form "V1.0.1 BETA" or something like that.

function SetRotation(Texture, Angle, bMirror, bInvertRotation) -- Rotates the given texture to the angle given. NOTE: Not BY the angel given but TO the angle given. Positive numbers move it Counter Clock Wise. So 90 will move a picture of a vertical line going from the center of the image to the top of the image point from the center to the left (3 o'clock)

Also when loaded "/rl" from the console reloads the UI...

I will update these function to make them more efficient and add functionality as and when I can. If you have surgestions then feel free to discuse it in the forum and then post a ticket.

2011-12-02  Zasurus  <Zasurus>

[dce9427358d4] [V0.1-9 BETA]
* History.txt LibZasUsefulFuncs.lua

- Corrected version (hadn't released V0.1-9 yet so can use that!)

Learn how to disable ads
Learn how to disable ads
Login to Curse

Don't have an account? Create One.

Get an epic experience with Curse Premium
  • Faster addon downloads
  • Premium-Only Beta Giveaways
  • Ad-Free Curse experience
  • Premium Curse Client
  • and many More Features
  • Learn More »

Diablo III Giveaway

Enter Now!