Simple Media Lib
A simple library for the sharing of media files amongst add-ons.
Also provided is SimpleMedia-RoM provides some media that are standard Runes of Magic files.
and SimpleMedia-FontPack provides 32 new fonts for use with RoM.
What it is
On its own, this add-on does very little. It maintains a list of media files that other add-ons may query in order to use these media files. Further, add-ons may register their own media files with Simple Media Lib in order to allow other add-ons to use these media files as well. The more add-ons that are Simple Media Lib aware, the more this add-on will be useful.
For Users
Just download and install Simple Media Lib like any other add-on. That's it really. Nothing fancy to do.
For Developers
In order to make your add-on Simple Media Lib aware, you will first need to load LibStub into your add-on and do the following:
local smlib = LibStub:GetLibrary("SimpleMediaLib", true);
If smlib is nil, then the library isn't loaded.
Simple Media Lib provides some iterators for the media types it maintains, so you may retrieve a list of fonts by doing:
for _, entry in smlib:Fonts() do
DEFAULT_CHAT_FRAME:AddMessage("Font Name: "..entry.name);
end
See Using SML.txt for details