Quantcast
Retrieve media registered with LibSharedMedia-3.0 - WoWInterface
Thread Tools Display Modes
03-22-16, 04:31 PM   #1
Benalish
A Theradrim Guardian
 
Benalish's Avatar
Join Date: Dec 2012
Posts: 60
Retrieve media registered with LibSharedMedia-3.0

Hello everyone.
Since the explanation in the documentation is a little vague, I would like to know how I can do to recover a blackground registered with LibSharedMedia-3.0. Here's my method:

Code:
local LSM = LibStub("LibSharedMedia-3.0")
LSM:Register("LSM.MediaType.BCKGROUND", "logo", [["Interface\AddOns\MyMod\logo.tga"]])
How do I use the file you just registered? Something similar to

f.texture:SetTexture("mediaregistered")

Thank you in advance

Last edited by Benalish : 03-22-16 at 04:35 PM.
  Reply With Quote
03-22-16, 06:05 PM   #2
Lombra
A Molten Giant
 
Lombra's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 554
You use the Fetch method to return the path to the media.
Code:
:Fetch("mediatype", "key")
Code:
f.texture:SetTexture(LSM:Fetch("BACKGROUND", "logo"))
__________________
Grab your sword and fight the Horde!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Retrieve media registered with LibSharedMedia-3.0

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off