Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion CallbackHandler-1.0/CallbackHandler-1.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,20 @@ if not CallbackHandler then return end -- No upgrade needed
local meta = {__index = function(tbl, key) tbl[key] = {} return tbl[key] end}

-- Lua APIs
local securecallfunction, error = securecallfunction, error
local xpcall = xpcall
local geterrorhandler = geterrorhandler
-- securecallfunction does not exist in WoW 3.3.5a; provide a fallback that preserves error-isolation semantics
local securecallfunction = securecallfunction or function(func, ...)
if geterrorhandler then
local errorhandler = geterrorhandler()
if errorhandler then
xpcall(func, errorhandler, ...)
return
end
end
return func(...)
end
local error = error
local setmetatable, rawget = setmetatable, rawget
local next, select, pairs, type, tostring = next, select, pairs, type, tostring

Expand Down
2 changes: 1 addition & 1 deletion LibSharedMedia-3.0.toc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Interface: 11508, 11507, 20505, 30405, 38000, 40402, 50503, 50502, 120001, 110207, 120000
## Interface: 30300, 11508, 11507, 20505, 30405, 38000, 40402, 50503, 50502, 120001, 110207, 120000
## LoadOnDemand: 1

## Title: Lib: SharedMedia-3.0
Expand Down
13 changes: 4 additions & 9 deletions LibSharedMedia-3.0/LibSharedMedia-3.0.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Dependencies: LibStub, CallbackHandler-1.0
License: LGPL v2.1
]]

local MAJOR, MINOR = "LibSharedMedia-3.0", 12000001 -- 12.0.0 v1 / increase manually on changes
local MAJOR, MINOR = "LibSharedMedia-3.0", 12000002 -- 3.0.0 v1 / increase manually on changes
local lib = LibStub:NewLibrary(MAJOR, MINOR)

if not lib then return end
Expand Down Expand Up @@ -61,18 +61,13 @@ lib.MediaType.SOUND = "sound" -- sound files
-- BACKGROUND
if not lib.MediaTable.background then lib.MediaTable.background = {} end
lib.MediaTable.background["None"] = [[]]
lib.MediaTable.background["Blizzard Collections Background"] = [[Interface\Collections\CollectionsBackgroundTile]]
lib.MediaTable.background["Blizzard Dialog Background"] = [[Interface\DialogFrame\UI-DialogBox-Background]]
lib.MediaTable.background["Blizzard Dialog Background Dark"] = [[Interface\DialogFrame\UI-DialogBox-Background-Dark]]
lib.MediaTable.background["Blizzard Dialog Background Gold"] = [[Interface\DialogFrame\UI-DialogBox-Gold-Background]]
lib.MediaTable.background["Blizzard Garrison Background"] = [[Interface\Garrison\GarrisonUIBackground]]
lib.MediaTable.background["Blizzard Garrison Background 2"] = [[Interface\Garrison\GarrisonUIBackground2]]
lib.MediaTable.background["Blizzard Garrison Background 3"] = [[Interface\Garrison\GarrisonMissionUIInfoBoxBackgroundTile]]
lib.MediaTable.background["Blizzard Low Health"] = [[Interface\FullScreenTextures\LowHealth]]
lib.MediaTable.background["Blizzard Marble"] = [[Interface\FrameGeneral\UI-Background-Marble]]
lib.MediaTable.background["Blizzard Out of Control"] = [[Interface\FullScreenTextures\OutOfControl]]
lib.MediaTable.background["Blizzard Parchment"] = [[Interface\AchievementFrame\UI-Achievement-Parchment-Horizontal]]
lib.MediaTable.background["Blizzard Parchment 2"] = [[Interface\AchievementFrame\UI-GuildAchievement-Parchment-Horizontal]]
lib.MediaTable.background["Blizzard Rock"] = [[Interface\FrameGeneral\UI-Background-Rock]]
lib.MediaTable.background["Blizzard Tabard Background"] = [[Interface\TabardFrame\TabardFrameBackground]]
lib.MediaTable.background["Blizzard Tooltip"] = [[Interface\Tooltips\UI-Tooltip-Background]]
Expand Down Expand Up @@ -181,9 +176,9 @@ else
SML_MT_font["Arial Narrow"] = [[Fonts\ARIALN.TTF]]
SML_MT_font["Friz Quadrata TT"] = [[Fonts\FRIZQT__.TTF]]
SML_MT_font["MoK"] = [[Fonts\K_Pagetext.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS_CYR.TTF]]
SML_MT_font["Morpheus"] = [[Fonts\MORPHEUS.TTF]]
SML_MT_font["Nimrod MT"] = [[Fonts\NIM_____.ttf]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI_CYR.TTF]]
SML_MT_font["Skurri"] = [[Fonts\SKURRI.TTF]]
--
lib.DefaultMedia.font = "Friz Quadrata TT"
--
Expand All @@ -199,7 +194,7 @@ lib.DefaultMedia.statusbar = "Blizzard"

-- SOUND
if not lib.MediaTable.sound then lib.MediaTable.sound = {} end
lib.MediaTable.sound["None"] = 1 -- Relies on the fact that PlaySoundFile doesn't error on this value
lib.MediaTable.sound["None"] = [[Interface\Quiet.ogg]] -- non-empty string so Fetch returns a value; file absent in 3.3.5a so no sound plays
lib.DefaultMedia.sound = "None"

local function buildMediaList(mediatype)
Expand Down