X-Git-Url: https://www.aleksib.fi/git/wowui.git/blobdiff_plain/625925f9e5095f719067ca840de5fd75bb1eb578:/RaidFrameCustomization/Indicators.lua..b8c70450d10559c08516416bf92fb95434bd3034:/OmaRF/Indicators.lua?ds=sidebyside diff --git a/RaidFrameCustomization/Indicators.lua b/OmaRF/Indicators.lua similarity index 92% rename from RaidFrameCustomization/Indicators.lua rename to OmaRF/Indicators.lua index 3a013e7..ba89735 100644 --- a/RaidFrameCustomization/Indicators.lua +++ b/OmaRF/Indicators.lua @@ -1,6 +1,6 @@ local media = LibStub:GetLibrary("LibSharedMedia-3.0"); -local f = RaidFrameCustomization.frames; -local positions = RaidFrameCustomization.positions; +local f = OmaRF.frames; +local positions = OmaRF.positions; local pad = 2; local paddings = { TOPLEFT = {pad, -pad}, @@ -11,7 +11,7 @@ local paddings = { }; local watchedAuras; -- all watched auras local auraFilters = {"HELPFUL", "HARMFUL"}; -local DEFAULT_ICON = "Interface\\AddOns\\RaidFrameCustomization\\images\\rhomb"; +local DEFAULT_ICON = "Interface\\AddOns\\OmaRF\\images\\rhomb"; local _; -- global functions used every update @@ -32,7 +32,7 @@ local function configureIndicators(frame, name) local frameName = name or frame:GetName(); if not f[frameName] then return end - local config = RaidFrameCustomization.db.profile; + local config = OmaRF.db.profile; local font = media and media:Fetch('font', config.indicatorFont) or STANDARD_TEXT_FONT; for pos, ind in pairs(f[frameName]) do ind.text:SetFont(font, config[pos]["textSize"]); @@ -88,7 +88,7 @@ local function updateIndicators(frame) if not id then break end local pos = watchedAuras[name] or watchedAuras[id] or watchedAuras[debuff]; if pos then - local config = RaidFrameCustomization.db.profile[pos]; + local config = OmaRF.db.profile[pos]; if not config.mine or UnitIsPlayer(caster) then if config.showIcon and not config.useDefaultIcon then -- show icon @@ -121,7 +121,7 @@ local function updateIndicators(frame) end -- Update all indicators -function RaidFrameCustomization:UpdateAllIndicators() +function OmaRF:UpdateAllIndicators() CompactRaidFrameContainer_ApplyToFrames(CompactRaidFrameContainer, "normal", updateIndicators); if self.running then C_TimerAfter(0.15, self:UpdateAllIndicators); @@ -129,7 +129,7 @@ function RaidFrameCustomization:UpdateAllIndicators() end -- Used to update everything that is affected by the configuration -function RaidFrameCustomization:RefreshConfig() +function OmaRF:RefreshConfig() self:OnDisable(); -- clear everything if self.db.profile.enabled then CompactRaidFrameContainer_ApplyToFrames(CompactRaidFrameContainer, "normal", configureIndicators);