This commit is contained in:
rucky
2026-03-16 13:48:46 +08:00
commit 2a55dd6dad
93 changed files with 75075 additions and 0 deletions

47
Media.lua Normal file
View 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