diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua index 0fed82a..65c3e76 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_AuraBars/oUF_AuraBars.lua @@ -120,7 +120,8 @@ local function CreateAuraBar(oUF, anchor) local statusBar = CreateFrame("StatusBar", nil, frame) statusBar:SetStatusBarTexture(auraBarParent.barTexture or [[Interface\TargetingFrame\UI-StatusBar]]) statusBar:SetAlpha(auraBarParent.fgalpha or 1) - statusBar:SetAllPoints(frame) + statusBar:SetPoint("TOPLEFT", frame, "TOPLEFT", 1, -1) + statusBar:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -1, 1) frame.statusBar = statusBar if auraBarParent.down == true then @@ -157,10 +158,11 @@ local function CreateAuraBar(oUF, anchor) statusBar.icon = statusBar.iconHolder:CreateTexture(nil, 'OVERLAY') statusBar.icon:SetTexCoord(.1, .9, .1, .9) - statusBar.icon:SetAllPoints(statusBar.iconHolder) + statusBar.icon:SetPoint("TOPLEFT", statusBar.iconHolder, "TOPLEFT", 1, -1) + statusBar.icon:SetPoint("BOTTOMRIGHT", statusBar.iconHolder, "BOTTOMRIGHT", -1, 1) statusBar.spelltime = statusBar:CreateFontString(nil, 'ARTWORK') - statusBar.spelltime:SetFont(auraBarParent.textFont or [[Fonts\FRIZQT__.TTF]], auraBarParent.textSize or 10, auraBarParent.textOutline or "NONE") + statusBar.spelltime:SetFont(auraBarParent.timeFont or [[Fonts\FRIZQT__.TTF]], auraBarParent.textSize or 10, auraBarParent.textOutline or "NONE") statusBar.spelltime:SetTextColor(1 ,1, 1) statusBar.spelltime:SetShadowOffset(1, -1) statusBar.spelltime:SetShadowColor(0, 0, 0) diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua index 84672ec..b1c6478 100644 --- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua +++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua @@ -225,6 +225,15 @@ function MOD:CreateSuperBorders() MOD:BottomPanelVisibility() end +local function BorderColorUpdates() + SVUITopPanel:SetBackdropColor(unpack(SuperVillain.Media.color.special)) + SVUITopPanel:SetBackdropBorderColor(0,0,0,1) + SVUIBottomPanel:SetBackdropColor(unpack(SuperVillain.Media.color.special)) + SVUIBottomPanel:SetBackdropBorderColor(0,0,0,1) +end + +SuperVillain.Registry:SetCallback(BorderColorUpdates) + function MOD:CreateDockPanels() MOD.SuperDockFaded = SVUI_Cache["Dock"].SuperDockFaded local leftWidth = MOD.db.dockLeftWidth or 350; diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index e0e5a23..bab35dd 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -306,10 +306,11 @@ function MOD:RefreshAllUnitMedia() for unit,frame in pairs(self.Units)do if self.db[frame.___key].enable then frame:MediaUpdate() + frame:UpdateAllElements() end end for _,group in pairs(self.Headers) do - group:MediaUpdate() + group:MediaUpdate(true) end collectgarbage("collect") end @@ -347,7 +348,7 @@ function MOD:RefreshUnitFrames() collectgarbage("collect") end -function MOD:RefreshUnitMedia(unitName) +function MOD:RefreshUnitMedia(unitName, updateElements) local db = MOD.db local key = unitName or self.___key if(not (db and db.enable) or not self) then return end @@ -380,12 +381,32 @@ function MOD:RefreshUnitMedia(unitName) if(self.Power and (unitDB.power and unitDB.power.enable)) then self.Power:SetStatusBarTexture(CURRENT_BAR_TEXTURE) end + if(self.Castbar and (unitDB.castbar)) then + if(unitDB.castbar.useCustomColor) then + cr,cg,cb = unitDB.castbar.castingColor[1], unitDB.castbar.castingColor[2], unitDB.castbar.castingColor[3]; + self.Castbar.CastColor = {cr,cg,cb} + cr,cg,cb = unitDB.castbar.sparkColor[1], unitDB.castbar.sparkColor[2], unitDB.castbar.sparkColor[3]; + self.Castbar.SparkColor = {cr,cg,cb} + else + self.Castbar.CastColor = oUF_SuperVillain.colors.casting + self.Castbar.SparkColor = oUF_SuperVillain.colors.spark + end + end if(self.AuraBars and (unitDB.aurabar and unitDB.aurabar.enable)) then local ab = self.AuraBars ab.auraBarTexture = CURRENT_AURABAR_TEXTURE ab.textFont = CURRENT_AURABAR_FONT ab.textSize = db.auraFontSize ab.textOutline = db.auraFontOutline + ab.buffColor = oUF_SuperVillain.colors.buff_bars + + if MOD.db.auraBarByType then + ab.debuffColor = nil; + ab.defaultDebuffColor = oUF_SuperVillain.colors.debuff_bars + else + ab.debuffColor = oUF_SuperVillain.colors.debuff_bars + ab.defaultDebuffColor = nil + end end if(self.Buffs and (unitDB.buffs and unitDB.buffs.enable)) then local buffs = self.Buffs @@ -404,6 +425,9 @@ function MOD:RefreshUnitMedia(unitName) rdebuffs.count:SetFont(CURRENT_AURABAR_FONT, db.auraFontSize, db.auraFontOutline) rdebuffs.time:SetFont(CURRENT_AURABAR_FONT, db.auraFontSize, db.auraFontOutline) end + if(updateElements) then + self:UpdateAllElements() + end end end @@ -554,10 +578,7 @@ function MOD:RefreshUnitLayout(frame, template) health.colorClass = nil; health.colorReaction = nil; health.colorOverlay = nil; - health.overlayAnimation = overlayAnimation; - health.colors.health = oUF_SuperVillain.colors.health - health.colors.tapped = oUF_SuperVillain.colors.tapped - health.colors.disconnected = oUF_SuperVillain.colors.disconnected + health.overlayAnimation = overlayAnimation if(db.health and (db.health.frequentUpdates ~= nil)) then end if(frame.HealPrediction) then diff --git a/Interface/AddOns/SVUI/packages/unit/common/aurabars.lua b/Interface/AddOns/SVUI/packages/unit/common/aurabars.lua index b42913e..8971f5e 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/aurabars.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/aurabars.lua @@ -35,11 +35,10 @@ BUILD FUNCTION ]]-- local AuraRemover_OnClick = function(self) if not IsShiftKeyDown() then return end - local n = self:GetParent().aura.name; - local id = self:GetParent().aura.spellID; - if id then - SuperVillain:AddonMessage(format(L["The spell '%s' has been added to the Blocked unitframe aura filter."], n)) - SuperVillain:ChangeFilter("Blocked", id, {["enable"] = true, ["priority"] = 0}) + local name = self:GetParent().aura.name + if name then + SuperVillain:AddonMessage(format(L["The spell '%s' has been added to the Blocked unitframe aura filter."], name)) + SuperVillain.Filters["Blocked"][name] = {["enable"] = true, ["priority"] = 0} MOD:RefreshUnitFrames() end end @@ -159,12 +158,13 @@ function MOD:CreateAuraBarHeader(frame, unitName) local auraBarParent = CreateFrame("Frame", nil, frame) auraBarParent.parent = frame; auraBarParent.PostCreateBar = PostCreateAuraBars; - auraBarParent.gap = 1; + auraBarParent.gap = 2; auraBarParent.spacing = 1; auraBarParent.spark = true; auraBarParent.filter = CustomBarFilter; auraBarParent.PostUpdate = ColorizeAuraBars; auraBarParent.barTexture = SuperVillain.Shared:Fetch("statusbar", MOD.db.auraBarStatusbar) + auraBarParent.timeFont = SuperVillain.Shared:Fetch("font", "Roboto") auraBarParent.textFont = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) auraBarParent.textSize = MOD.db.auraFontSize auraBarParent.textOutline = MOD.db.auraFontOutline diff --git a/Interface/AddOns/SVUI/packages/unit/common/auras.lua b/Interface/AddOns/SVUI/packages/unit/common/auras.lua index 8895ff8..ac50ef2 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/auras.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/auras.lua @@ -86,7 +86,7 @@ local AuraRemover_OnClick = function(self) local name = self.name; if name then SuperVillain:AddonMessage(format(L["The spell '%s' has been added to the Blocked unitframe aura filter."], name)) - SuperVillain:ChangeFilter("Blocked", name, {["enable"] = true, ["priority"] = 0}) + SuperVillain.Filters["Blocked"][name] = {["enable"] = true, ["priority"] = 0}; MOD:RefreshUnitFrames() end end diff --git a/Interface/AddOns/SVUI/packages/unit/common/health.lua b/Interface/AddOns/SVUI/packages/unit/common/health.lua index b6207ea..d60ee72 100644 --- a/Interface/AddOns/SVUI/packages/unit/common/health.lua +++ b/Interface/AddOns/SVUI/packages/unit/common/health.lua @@ -184,7 +184,7 @@ local CustomUpdate = function(self, event, unit) health:SetStatusBarColor(0.6,0.4,1,0.5) health.animation[1]:SetVertexColor(0.8,0.3,1,0.4) elseif(health.colorOverlay) then - local t = health.colors.health + local t = oUF_SuperVillain.colors.health health:SetStatusBarColor(t[1], t[2], t[3], 0.9) else health:SetStatusBarColor(1, 0.25 * mu, 0, 0.85) @@ -242,14 +242,14 @@ local Update = function(self, event, unit) local r, g, b, t, t2; if(health.colorTapping and not UnitPlayerControlled(unit) and UnitIsTapped(unit) and not UnitIsTappedByPlayer(unit) and not UnitIsTappedByAllThreatList(unit)) then - t = health.colors.tapped + t = oUF_SuperVillain.colors.tapped elseif(health.colorDisconnected and not UnitIsConnected(unit)) then - t = health.colors.disconnected + t = oUF_SuperVillain.colors.disconnected elseif(health.colorClass and UnitIsPlayer(unit)) or (health.colorClassNPC and not UnitIsPlayer(unit)) or (health.colorClassPet and UnitPlayerControlled(unit) and not UnitIsPlayer(unit)) then local _, class = UnitClass(unit) - local tmp = oUF_SuperVillain.colors.class[class] or health.colors.health + local tmp = oUF_SuperVillain.colors.class[class] or oUF_SuperVillain.colors.health t = {(tmp[1] * 0.75),(tmp[2] * 0.75),(tmp[3] * 0.75)} if(bg and db.classbackdrop and UnitIsPlayer(unit)) then t2 = t @@ -262,7 +262,7 @@ local Update = function(self, event, unit) elseif(health.colorSmooth) then r, g, b = oUF_SuperVillain.ColorGradient(min, max, unpack(health.smoothGradient or oUF_SuperVillain.colors.smooth)) elseif(health.colorHealth) then - t = health.colors.health + t = oUF_SuperVillain.colors.health end if(t) then @@ -303,10 +303,6 @@ function MOD:CreateHealthBar(frame, hasbg, reverse) local healthBar = CreateFrame("StatusBar", nil, frame) healthBar:SetFrameStrata("LOW") healthBar:SetFrameLevel(4) - healthBar.colors = {} - healthBar.colors.health = oUF_SuperVillain.colors.health - healthBar.colors.tapped = oUF_SuperVillain.colors.tapped - healthBar.colors.disconnected = oUF_SuperVillain.colors.disconnected healthBar:SetStatusBarTexture(SuperVillain.Media.bar.default) if hasbg then healthBar.bg = healthBar:CreateTexture(nil, "BORDER") diff --git a/Interface/AddOns/SVUI/packages/unit/frames/groups.lua b/Interface/AddOns/SVUI/packages/unit/frames/groups.lua index c9349d4..dd7820d 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames/groups.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames/groups.lua @@ -108,17 +108,17 @@ local _GSORT = { ALL UNIT HELPERS ########################################################## ]]-- -local GroupMediaUpdate = function(self) +local GroupMediaUpdate = function(self, updateElements) local key = self.___key local index = 1; local childFrame = self:GetAttribute("child"..index) while childFrame do - MOD.RefreshUnitMedia(childFrame, key) + MOD.RefreshUnitMedia(childFrame, key, updateElements) if(_G[childFrame:GetName().."Pet"]) then - MOD.RefreshUnitMedia(_G[childFrame:GetName().."Pet"], key) + MOD.RefreshUnitMedia(_G[childFrame:GetName().."Pet"], key, updateElements) end if(_G[childFrame:GetName().."Target"]) then - MOD.RefreshUnitMedia(_G[childFrame:GetName().."Target"], key) + MOD.RefreshUnitMedia(_G[childFrame:GetName().."Target"], key, updateElements) end index = index + 1; childFrame = self:GetAttribute("child"..index) diff --git a/Interface/AddOns/SVUI/system/classes/Filters.lua b/Interface/AddOns/SVUI/system/classes/Filters.lua index 54f0181..bc24b74 100644 --- a/Interface/AddOns/SVUI/system/classes/Filters.lua +++ b/Interface/AddOns/SVUI/system/classes/Filters.lua @@ -670,22 +670,21 @@ end local METAFILTERS = function(sv) for k, x in pairs(FilterIDs) do - if (not sv[k]) then sv[k] = {} end - local src = {}; - for id in gmatch(x, '([^,]+)') do - if(id) then - local saved - local n = safename(id); - local p = FilterOverrides[tostring(id)] or 0; - if k == "Strict" then - saved = {['enable'] = true, ['spellID'] = id, ['priority'] = p} - else - saved = {['enable'] = true, ['priority'] = p} - end - if (not sv[k][n]) then src[n] = saved else src[n] = sv[k][n] end - end + if (not sv[k]) then + for id in gmatch(x, '([^,]+)') do + if(id) then + local saved + local n = safename(id); + local p = FilterOverrides[tostring(id)] or 0; + if k == "Strict" then + saved = {['enable'] = true, ['spellID'] = id, ['priority'] = p} + else + saved = {['enable'] = true, ['priority'] = p} + end + sv[k][n] = saved + end + end end - sv[k] = src end return sv @@ -693,7 +692,8 @@ end function SuperVillain:ChangeFilter(k, id, v) local name = safename(id) - self.Filters[k][name] = v + if (not self.Filters[k]) then self.Filters[k] = {} end + self.Filters[k][name] = tcopy(v) end function SuperVillain:SetFilterObjects(init) diff --git a/Interface/AddOns/SVUI/system/mentalo.lua b/Interface/AddOns/SVUI/system/mentalo.lua index 586a24f..0e38032 100644 --- a/Interface/AddOns/SVUI/system/mentalo.lua +++ b/Interface/AddOns/SVUI/system/mentalo.lua @@ -228,7 +228,9 @@ local DraggableFrames = { "VoidStorageFrame", --"WorldStateAlwaysUpFrame" }; - +-- local MentaloUIFrames = { +-- "ArcheologyDigsiteProgressBar", +-- }; local theHand = CreateFrame("Frame", "SVUI_HandOfMentalo", SuperVillain.UIParent) theHand:SetFrameStrata("DIALOG") theHand:SetFrameLevel(99) @@ -686,16 +688,16 @@ function SuperVillain:LoadMovables() theHand.energy = theHand:CreateTexture(nil, "OVERLAY") theHand.energy:SetAllPoints(theHand) theHand.energy:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-ENERGY]]) - SuperVillain.Animate:Orbit(theHand.energy, 10) + self.Animate:Orbit(theHand.energy, 10) theHand.flash = theHand.energy.anim; theHand.energy:Hide() theHand.elapsedTime = 0; theHand.flash:Stop() theHand:Hide() - for name, _ in pairs(SuperVillain.MentaloFrames)do + for name, _ in pairs(self.MentaloFrames)do local parent, text, overlay, snapoffset, postdrag; - for key, value in pairs(SuperVillain.MentaloFrames[name])do + for key, value in pairs(self.MentaloFrames[name])do if(key == "parent") then parent = value elseif(key == "text") then @@ -708,9 +710,12 @@ function SuperVillain:LoadMovables() postdrag = value end end - SuperVillain:SetMentaloAlphas() + self:SetMentaloAlphas() SetSVMovable(parent, name, text, overlay, snapoffset, postdrag) end + -- for _, name in pairs(MentaloUIFrames) do + -- self:SetSVMovable(_G[name], name .. "_MOVE", name) + -- end end function SuperVillain:UseMentalo(isConfigMode, configType) diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua index 86eb4ec..1c9f044 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua @@ -1767,7 +1767,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.health = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, tapped = { @@ -1780,7 +1780,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.tapped = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, disconnected = { @@ -1793,7 +1793,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.disconnected = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, } } @@ -1827,7 +1827,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.power["MANA"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, RAGE = { @@ -1840,7 +1840,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.power["RAGE"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, FOCUS = { @@ -1853,7 +1853,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.power["FOCUS"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, ENERGY = { @@ -1866,7 +1866,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.power["ENERGY"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, RUNIC_POWER = { @@ -1879,7 +1879,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.power["RUNIC_POWER"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, } } @@ -1913,7 +1913,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.casting = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, spark = { @@ -1926,7 +1926,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.spark = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, interrupt = { @@ -1939,7 +1939,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.interrupt = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, } } @@ -1986,7 +1986,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.buff_bars = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, debuff_bars = { @@ -1999,7 +1999,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.debuff_bars = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, }, shield_bars = { @@ -2012,7 +2012,7 @@ SuperVillain.Options.args.SVUnit = { end, set = function(key, rValue, gValue, bValue) SuperVillain.db.media.unitframes.shield_bars = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() + MOD:RefreshAllUnitMedia() end, } } diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua index 5ca66fe..046d3ec 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua @@ -66,6 +66,7 @@ local function ArchaeologyStyle() -- ArcheologyDigsiteProgressBar:Formula409() -- ArcheologyDigsiteProgressBar.BarBackground:SetTexture([[Interface\Archeology\ArcheologyToast]]) -- ArcheologyDigsiteProgressBar.BarBorderAndOverlay:SetTexture([[Interface\Archeology\ArcheologyToast]]) + SuperVillain:SetSVMovable(ArcheologyDigsiteProgressBar, "ArcheologyProgressBar_MOVE", "Archeology Progress Bar") end; --[[ ##########################################################