diff --git a/IceHUD.lua b/IceHUD.lua index d9962b7..3a26c0b 100644 --- a/IceHUD.lua +++ b/IceHUD.lua @@ -897,6 +897,9 @@ function IceHUD:OnInitialize() self:SyncSettingsVersions() self:InitLDB() + if SML then + SML.RegisterCallback(self, "LibSharedMedia_Registered", "UpdateMedia") + end end @@ -1230,3 +1233,19 @@ function IceHUD:RegisterPendingModules() end pendingModuleLoads = {} end + +function IceHUD:UpdateMedia(event, mediatype, key) + if not self.db.profile or not self.IceCore.enabled then + return + end + + if mediatype == "font" then + if key == self.db.profile.fontFamily then + IceHUD.IceCore:SetFontFamily(key) + end + elseif mediatype == "statusbar" then + if self.TargetOfTarget and self.TargetOfTarget.enabled and key == self.TargetOfTarget.moduleSettings.texture then + self.TargetOfTarget:Redraw() + end + end +end