Loading...
Forum Rules:
You may only create a new thread here if you have created a guide on how to do something AddOn or WoW related. A guide here should not be dependent on either Tukui or ElvUI. Do not create a thread here if you just want to ask how to do something.

[Guide] Adding Fonts, Textures and Sounds through SharedMedia

#1
Adding Fonts, Textures and Sounds through SharedMedia


First Things First
  1. Download and install the SharedMedia AddOn.
  2. If you don't know how to install AddOns, then see this guide: http://www.curse.com/faqs/wow-addons

Automatic Method (For Windows)
  1. Open the SharedMedia folder (World of Warcraft / Interface / Addons / SharedMedia) and rename MyMedia.bat.txt to MyMedia.bat (make sure you have Windows set to show all file extensions)
  2. Run MyMedia.bat to create the necessary folders
  3. Put your media files into the sub-folders found at: World of Warcraft / Interface / Addons / SharedMedia_MyMedia
  4. Run MyMedia.bat again to create the MyMedia.lua file, which contains the necessary code to register your files
  5. Optional: If you want to edit the in-game name of your newly added media, then open the MyMedia.lua file and change the text in the 2nd set of quotes (see image 5)

Automatic Method: Images
Image

Manual Method
  1. Create a folder named "SharedMedia_MyMedia" inside your addons folder (World of Warcraft / Interface / Addons / SharedMedia_MyMedia)
  2. Create subfolders named "background", "border", "font", "sound" and "statusbar"
  3. Place your media files into the corresponding folders
  4. Create a new text file called "MyMedia.lua", then remove the .txt from the name so the extension becomes .lua. Open the file and insert the following code:

    Code: Select all

    ----------------------------------------------------------------------------
    -- Copy this section of the file to a file called MyMedia.lua, and enter
    -- your medias information, using the examples shown below.
    ----------------------------------------------------------------------------
    
    local LSM = LibStub("LibSharedMedia-3.0")
    
    -- START of the section that you should be editing
    --
    --    NB: any line beginning with "--" is ignored - so the lines
    --    below are just comments!
    --
    
    --background:
    
    --border:
    
    --font:
    
    --sound:
    
    --statusbar:
    
    -- END of the section that you should be editing
    
  5. Use the examples below to add information about your newly added media. You should only need to change anything between the lines marked "START" and "END".
  6. Each item of media that you want to add should have its own line that uses the relevant example as a template. To add details about more than one item, just add another line to that section, changing the specific details (eg, the font name and path).

Manual Method: Examples
  • LSM:Register("background", "my background's name", [[Interface\Addons\SharedMedia_MyMedia\background\mybackground.tga]])
  • LSM:Register("border", "my border's name", [[Interface\Addons\SharedMedia_MyMedia files\myborder.tga]])
  • LSM:Register("font", "my font's name", [[Interface\Addons\SharedMedia_MyMedia\font\myfont.ttf]])
  • LSM:Register("font", "my friend's font", [[Interface\Addons\SharedMedia_MyMedia\font\friendsfont.ttf]])
  • LSM:Register("sound", "my sound's name", [[Interface\Addons\SharedMedia_MyMedia\sound\mysound.mp3]])
  • LSM:Register("statusbar", "my statusbar texture's name", [[Interface\Addons\SharedMedia_MyMedia\statusbar\mytexture.tga]])
Last edited by Blazeflack on Mon Jul 17, 2017 3:25 pm, edited 2 times in total.

Who is online

Users browsing this forum: No registered users and 1 guest