init
This commit is contained in:
47
Media.lua
Normal file
47
Media.lua
Normal file
@@ -0,0 +1,47 @@
|
||||
SFrames.Media = {
|
||||
-- Default ElvUI-like texture
|
||||
-- Default ElvUI-like texture
|
||||
-- Using the standard flat Vanilla UI status bar texture for a clean flat aesthetic
|
||||
statusbar = "Interface\\TargetingFrame\\UI-StatusBar",
|
||||
|
||||
-- Fonts
|
||||
-- We can use a default WoW font, or eventually load a custom one here.
|
||||
font = "Fonts\\ARIALN.TTF",
|
||||
fontOutline = "OUTLINE",
|
||||
}
|
||||
|
||||
function SFrames:GetSharedMedia()
|
||||
if LibStub then
|
||||
local ok, LSM = pcall(function() return LibStub("LibSharedMedia-3.0", true) end)
|
||||
if ok and LSM then return LSM end
|
||||
end
|
||||
return nil
|
||||
end
|
||||
|
||||
function SFrames:GetTexture()
|
||||
if SFramesDB and SFramesDB.barTexture then
|
||||
local LSM = self:GetSharedMedia()
|
||||
if LSM then
|
||||
local path = LSM:Fetch("statusbar", SFramesDB.barTexture, true)
|
||||
if path then return path end
|
||||
end
|
||||
end
|
||||
return self.Media.statusbar
|
||||
end
|
||||
|
||||
function SFrames:GetFont()
|
||||
if SFramesDB and SFramesDB.fontName then
|
||||
local LSM = self:GetSharedMedia()
|
||||
if LSM then
|
||||
local path = LSM:Fetch("font", SFramesDB.fontName, true)
|
||||
if path then return path end
|
||||
end
|
||||
end
|
||||
return self.Media.font
|
||||
end
|
||||
|
||||
function SFrames:GetSharedMediaList(mediaType)
|
||||
local LSM = self:GetSharedMedia()
|
||||
if LSM and LSM.List then return LSM:List(mediaType) end
|
||||
return nil
|
||||
end
|
||||
Reference in New Issue
Block a user