View Single Post
Unread 07-22-12, 10:22 PM   #19
suicidalkatt
A Rage Talon Dragon Guard
 
suicidalkatt's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2008
Posts: 317
Originally Posted by Meorawr View Post
Already possible:
Lua Code:
  1. --- Registers a new texture set. If the set already exists, it is replaced.
  2. -- @param name The name of the texture set.
  3. -- @param iter Iterator function for accessing texture paths.
  4. function PowerAuras:RegisterTextureSet(name, iter);
  5.  
  6. --- Registers a new sound set. If the set already exists, it is replaced.
  7. -- @param name The name of the sound set.
  8. -- @param iter Iterator function for accessing sound paths.
  9. function PowerAuras:RegisterSoundSet(name, iter);

There's also one for fonts and 'counters' (timer/stack fonts basically). Iterator returns vary based upon the resource type, but for sounds it's "index (number), path (string), name (string)". For textures, it's just the first two items. The PowerAuras/Media.lua file contains the default ones.

The function is safe to call immediately, don't need to wait for ADDON_LOADED so long as the dependency on it is there.
Interesting! But a nice dropdown menu for a texture set would be awesome! (I haven't tested this release so I have no idea what you've implemented).

Originally Posted by Meorawr View Post
Texcoords were kinda planned but I backed out of them, I'll reconsider it. Issue is exposing them in a 'pretty' way.
Perhaps a simple 'advanced' button or checkbox to enable some hidden options.
suicidalkatt is offline