View Single Post
10-25-09, 12:40 PM   #2
MidgetMage55
Grinch!
 
MidgetMage55's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2007
Posts: 1,498
Shared Media is a collection of textures. Addons "talk" to shared media and have access to those textures. Think of it like a master list of textures. Not all addons have shared media support. It's something that has to be programmed in. It does not pull from one addon to another like in your example but instead has all those textures within its own folders.

To use it you simply install it and it just works. Providing that the other addons you use have support for it coded in.

So lets use an example like pitbull (a unit frame addon) ill elaborate on the first section to show how it works. With pitbull installed by it self you have only the fonts, textures and backgrounds pitbull provides within its configuration options. Installing shared media and the options will increase. Adding something like quartz after that will not change the options available as shared media is what is providing the additional textures options.

Each version generally has different texture packs. The libsharedmedia is mainly used for coding purposes.

To use Mymedia you take your textures you wish to use and place them in the Mymedia folder in the appropriate sub folders. Then you open the Mymedia.lua file and add the name of the texture and its path to the file otherwise the addon does not know its there. Simply look at the examples in the file on how to do it. I personaly just go to each section (you'll see this in the file) copy a line, paste it at the bottom of that list and just change the names of the file locations. Here's an example from the file. Ill show which you need to change in the example.

SharedMedia:Register("font","Roadway", [[Interface\Addons\SharedMedia\MyMedia\Font\Roadway_.ttf]])
The highlighted section is generally all you have to change if you use the provided Mymedia folders for you various textures and fonts. So lets say i wanted to add a font called BigUglyFont to my Mymedia folder. I would copy the font file in to the font folder within the mymedia folder, open the Mymedia.lua file and scroll down to the fonts section and copy/paste one of the lines of code like in my example then change the highlighted sections to the name of the font in question. Same applies for status bars and so on.

As for the last part taking a bit from another UI will depend highly on what part you want to use. With the exceptions of backgrounds you can easily addons your fonts and textures to mymedia. It also supports backgrounds but in many cases if your after a large piece of art its better to use a panel mod like kgPanels or Litepanels. For example the smoke art you linked you would use a panel mod for.

Hope that helps some.
__________________

I think Hong Kong Phooey was a ninja AND a pirate. That was just too much awesome. - Yhor

Last edited by MidgetMage55 : 10-25-09 at 12:44 PM. Reason: Cleaning up the mess.
  Reply With Quote