diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index 15433c2..96852a0 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -568,6 +568,7 @@ local function UpdateSizing() end; function MOD:RefreshMiniMap() + if(not SuperVillain.db.SVMap.enable) then return; end if(InCombatLockdown()) then self.CombatLocked = true return @@ -807,6 +808,7 @@ function MOD:ADDON_LOADED(event, addon) FeedbackUIButton:MUNG() end self:UpdateMinimapButtonSettings() + print(SuperVillain.db.SVMap.enable) end function MOD:PLAYER_REGEN_ENABLED() @@ -830,12 +832,12 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:ReLoad() - if(not self.db.enable) then return; end + if(not SuperVillain.db.SVMap.enable) then return; end self:RefreshMiniMap() end -function MOD:PriorityLoad() - if(not self.db.enable) then +function MOD:Load() + if(not SuperVillain.db.SVMap.enable) then Minimap:SetMaskTexture('Textures\\MinimapMask') return end diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index f3692af..a808366 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -168,10 +168,8 @@ local function AddEnemyScan(guid, timestamp) if(EnemyCache[guid]) then return EnemyCache[guid] end - local class, key, _, race, sex, name, realm = GetPlayerInfoByGUID(guid) - -- local key = class:upper() - -- key = key:gsub("%s+", "") - local colors = classColor[key] or fallbackColor + local class, classToken, race, raceToken, sex, name, realm = GetPlayerInfoByGUID(guid) + local colors = classColor[classToken] or fallbackColor EnemyCache[guid] = { ["name"] = name, ["realm"] = realm, @@ -179,7 +177,7 @@ local function AddEnemyScan(guid, timestamp) ["race"] = race, ["sex"] = sex, ["colors"] = colors, - ["time"] = timestampa + ["time"] = timestamp } PLUGIN:ScannerLog(EnemyCache[guid]) return EnemyCache[guid]; @@ -273,6 +271,7 @@ function PLUGIN:ResetLogs() end function PLUGIN:ScannerLog(enemy) + if(not enemy.name or not enemy.race or not enemy.class) then return end local hex = ("%s - %s %s"):format(enemy.name, enemy.race, enemy.class) self.LogWindow:AddMessage(hex, enemy.colors.r, enemy.colors.g, enemy.colors.b); EnemyAlarm(enemy.name, enemy.class, enemy.colors) @@ -348,16 +347,13 @@ function PLUGIN:UpdateZoneStatus() local zonePvP = GetZonePVPInfo() if(zonePvP == "sanctuary" or zoneText == "") then PLUGIN.Scanning = false - PLUGIN.VS = false else PLUGIN.Scanning = true local inInstance, instanceType = IsInInstance() if(inInstance and ((instanceType == "party") or (instanceType == "raid"))) then PLUGIN.Scanning = false - PLUGIN.VS = false elseif (not zonePvP or (zonePvP == "friendly") or (not UnitIsPVP("player"))) then PLUGIN.Scanning = false - PLUGIN.VS = false elseif(instanceType == "pvp" and not PLUGIN.InPVP and PLUGIN.Scanning == true) then PLUGIN:UpdateCommunicator() end @@ -393,10 +389,6 @@ local function ParseIncomingLog(timestamp, event, eGuid, eName, pGuid) HeadsUpAlarm(incoming, CombatText_StandardScroll, 1, 0.05, 0, "crit") end end - - if(pGuid == playerGUID and event == "UNIT_DIED") then - SaveEnemyScan(eGuid, timestamp) - end end local function GetSourceType(guid) @@ -417,13 +409,14 @@ function PLUGIN:CombatLogScanner(timestamp, event, _, srcGUID, srcName, srcFlags local isHostile = CombatLog_Object_IsA(srcFlags, COMBATLOG_FILTER_HOSTILE_PLAYERS) local srcType = GetSourceType(srcGUID) if((srcType == 0 or srcType == 8) and isHostile) then - if(event == "SPELL_AURA_APPLIED") then - if(spellName == L["Stealth"] or spellName == L["Prowl"]) then - StealthAlarm(spellName) - end + if(event == "SPELL_AURA_APPLIED" and (spellName == L["Stealth"] or spellName == L["Prowl"])) then + StealthAlarm(spellName) + end + if(dstGUID == playerGUID) then + PLUGIN.HitBy = srcGUID end if(not PLUGIN.Scanning) then return end - ParseIncomingLog(timestamp, event, srcGUID, srcName, dstGUID, srcType) + ParseIncomingLog(timestamp, event, srcGUID, srcName, dstGUID) end end @@ -431,7 +424,7 @@ function PLUGIN:CombatLogScanner(timestamp, event, _, srcGUID, srcName, srcFlags local isHostile = CombatLog_Object_IsA(dstFlags, COMBATLOG_FILTER_HOSTILE_PLAYERS) local srcType = GetSourceType(dstGUID) if((srcType == 0 or srcType == 8) and isHostile) then - ParseIncomingLog(timestamp, event, dstGUID, dstName, srcGUID, srcType) + ParseIncomingLog(timestamp, event, dstGUID, dstName, srcGUID) end end end @@ -456,13 +449,13 @@ function PLUGIN:TargetChanged() end end -SVUIAddonEventHandler:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") -SVUIAddonEventHandler:RegisterEvent("ZONE_CHANGED") -SVUIAddonEventHandler:RegisterEvent("ZONE_CHANGED_NEW_AREA") -SVUIAddonEventHandler:RegisterEvent("PLAYER_ENTERING_WORLD") -SVUIAddonEventHandler:RegisterEvent("PLAYER_TARGET_CHANGED") -SVUIAddonEventHandler:RegisterEvent("UNIT_FACTION") -SVUIAddonEventHandler:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") +function PLUGIN:TheyGotMe() + local guid = PLUGIN.HitBy + if(guid and guid ~= "") then + local stamp = time() + SaveEnemyScan(guid, stamp) + end +end local Registry_OnEvent = function(self, event, ...) if(event == "PLAYER_TARGET_CHANGED") then @@ -471,6 +464,10 @@ local Registry_OnEvent = function(self, event, ...) PLUGIN:CombatLogScanner(...) elseif(event == "PLAYER_ENTERING_WORLD" or event == "UPDATE_BATTLEFIELD_SCORE") then PLUGIN:UpdateCommunicator() + elseif(event == "PLAYER_DEAD") then + PLUGIN:TheyGotMe() + elseif(event == "PLAYER_REGEN_ENABLED") then + PLUGIN.HitBy = false; else PLUGIN:UpdateZoneStatus() end @@ -575,6 +572,16 @@ local function MakeLogWindow() PLUGIN.TitleWindow = title PLUGIN.SummaryWindow = summary PLUGIN.LogWindow = log + + SVUIAddonEventHandler:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + SVUIAddonEventHandler:RegisterEvent("ZONE_CHANGED") + SVUIAddonEventHandler:RegisterEvent("ZONE_CHANGED_NEW_AREA") + SVUIAddonEventHandler:RegisterEvent("PLAYER_ENTERING_WORLD") + SVUIAddonEventHandler:RegisterEvent("PLAYER_TARGET_CHANGED") + SVUIAddonEventHandler:RegisterEvent("PLAYER_REGEN_ENABLED") + SVUIAddonEventHandler:RegisterEvent("PLAYER_DEAD") + SVUIAddonEventHandler:RegisterEvent("UNIT_FACTION") + SVUIAddonEventHandler:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") end --[[ ########################################################## @@ -599,12 +606,13 @@ local function LoadOptions() end local function LoadWarVillain() + if(not SuperVillain.db.SVAOW.enable) then return end PLUGIN.db = SuperVillain.db.SVAOW if(not SVAOW_Data) then SVAOW_Data = {} end if(not SVAOW_Cache) then SVAOW_Cache = {} end - PLUGIN.VS = false; + PLUGIN.HitBy = false; PLUGIN.Scanning = false; PLUGIN.InPVP = false @@ -697,8 +705,6 @@ local function LoadWarVillain() holder:Hide() PLUGIN:ResetLogs() - - end CONFIGS["SVAOW"] = { diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua index 835158e..525891d 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua @@ -69,7 +69,7 @@ SuperVillain.Options.args.SVMap = { name = L['Enable'], desc = L['Enable/Disable the Custom Minimap.'], get = function(a)return SuperVillain.db.SVMap.enable end, - set = function(a,b)SuperVillain.db.SVMap.enable=b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + set = function(a,b)SuperVillain.db.SVMap.enable=b; SuperVillain:StaticPopup_Show("RL_CLIENT") end }, common = { order = 3, diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua index a89f812..836e296 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua @@ -545,6 +545,7 @@ local function LoadOptions() end function LoadLaborVillain() + if(not SuperVillain.db.SVLaborer.enable) then return end PLUGIN.db = SuperVillain.db.SVLaborer lastClickTime = nil; PLUGIN.WornItems = {}; diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua index e2d3851..5b682f2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua @@ -55,10 +55,10 @@ CORE DATA PLUGIN.DockedParent = {} PLUGIN.AddOnQueue = {}; PLUGIN.AddOnEvents = {}; -PLUGIN.BlizzardQueue = {}; PLUGIN.CustomQueue = {}; PLUGIN.EventListeners = {}; -PLUGIN.PassiveAddons = {}; +PLUGIN.OnLoadAddons = {}; +PLUGIN.StyledAddons = {}; PLUGIN.OptionsCache = { order = 4, type = "group", @@ -75,24 +75,64 @@ PLUGIN.OptionsCache = { }, } }; +local DBug = false --[[ ########################################################## CORE FUNCTIONS ########################################################## ]]-- +local charming = {"Spiffy", "Pimped Out", "Fancy", "Awesome", "Bad Ass", "Sparkly", "Gorgeous", "Handsome", "Shiny"} +local styleMessage = '|cff00FF00%s|r Is Now %s!' + +local function SendAddonMessage(msg, prefix) + if(type(msg) == "table") then + msg = tostring(msg) + end + + if(not msg) then return end + + if(prefix) then + local outbound = ("%s %s"):format(prefix, msg); + print(outbound) + else + print(msg) + end +end + +function PLUGIN:AddonMessage(msg) + local outbound = ("|cffffcc1a%s:|r"):format("Style-O-Matic") + SendAddonMessage(msg, outbound) +end + function PLUGIN:LoadAlert(MainText, Function) self.Alert.Text:SetText(MainText) self.Alert.Accept:SetScript('OnClick', Function) self.Alert:Show() end -function PLUGIN:IsAddonReady(this, ...) +function PLUGIN:Style(style, fn, ...) + local pass, error = pcall(fn, ...) + if(pass and (not style:find("Blizzard")) and not self.StyledAddons[style]) then + self.StyledAddons[style] = true + local verb = charming[math.random(1,#charming)] + self:AddonMessage(styleMessage:format(style, verb)) + else + if DBug then + local message = '%s: |cffff0000There was an error in the|r |cff0affff%s|r |cffff0000skin|r.' + SuperVillain:AddonMessage(message:format(version, style)) + local errormessage = '%s Error: %s' + SuperVillain:AddonMessage(errormessage:format(style, error)) + end + end +end + +function PLUGIN:IsAddonReady(addon, ...) for i = 1, select('#', ...) do local a = select(i, ...) if not a then break end if not IsAddOnLoaded(a) then return false end end - return SuperVillain.db.SVStyle.addons[this] + return SuperVillain.db.SVStyle.addons[addon] end function PLUGIN:SaveAddonStyle(addon, fn, force, passive, ...) @@ -102,40 +142,40 @@ function PLUGIN:SaveAddonStyle(addon, fn, force, passive, ...) if event then args[event] = true hasEvent = true; - end; - end; - if passive then self.PassiveAddons[addon] = true end; - if not self.AddOnEvents[addon] then - self.AddOnEvents[addon] = {}; - self.AddOnEvents[addon]["complete"] = false; - if hasEvent then - self.AddOnEvents[addon]["events"] = args; - end + if(event == "ADDON_LOADED") then + passive = true + end + end end + + if(hasEvent and not self.AddOnEvents[addon]) then + self.AddOnEvents[addon] = {events = args}; + end + if force then fn() - self.AddOnQueue[addon] = nil - else - self.AddOnQueue[addon] = fn + else + if(passive) then + self.OnLoadAddons[addon] = fn + end + self.AddOnQueue[addon] = fn end -end; +end -function PLUGIN:SaveBlizzardStyle(addon, fn, force, passive, preload) - if passive then self.PassiveAddons[addon] = true end; +function PLUGIN:SaveBlizzardStyle(addon, fn, force) if force then - if(preload and not IsAddOnLoaded(addon)) then + if(not IsAddOnLoaded(addon)) then LoadAddOn(addon) end fn() - self.BlizzardQueue[addon] = nil - else - self.BlizzardQueue[addon] = fn + else + self.OnLoadAddons[addon] = fn end -end; +end function PLUGIN:SaveCustomStyle(fn) tinsert(PLUGIN.CustomQueue, fn) -end; +end function PLUGIN:DefineEventFunction(addonEvent, addon) if(not self.EventListeners[addonEvent]) then @@ -147,18 +187,18 @@ function PLUGIN:DefineEventFunction(addonEvent, addon) if(not self[addonEvent]) then self[addonEvent] = function(self, event, ...) for addon,fn in pairs(self.AddOnQueue)do - if self:IsAddonReady(addon) and self.EventListeners[event] and self.EventListeners[event][addon] then - local _,error = pcall(fn, event, ...) + if self:IsAddonReady(addon) and self.EventListeners[event] and self.EventListeners[event][addon] then + self:Style(addon, fn, event, ...) end end - end; + end SVUIAddonEventHandler:RegisterEvent(addonEvent); end end function PLUGIN:SafeEventRemoval(addon, event) - if not self.EventListeners[event] then return end; - if not self.EventListeners[event][addon] then return end; + if not self.EventListeners[event] then return end + if not self.EventListeners[event][addon] then return end self.EventListeners[event][addon] = nil; local defined = false; for name,_ in pairs(self.EventListeners[event]) do @@ -166,42 +206,50 @@ function PLUGIN:SafeEventRemoval(addon, event) defined = true; break end - end; + end if not defined then SVUIAddonEventHandler:UnregisterEvent(event) end -end; +end function PLUGIN:RefreshAddonStyles() for addon,fn in pairs(self.AddOnQueue) do - if(SuperVillain.db.SVStyle.addons[addon] == true) then - if IsAddOnLoaded(addon) then - local _,error = pcall(fn, "PLAYER_ENTERING_WORLD") - end + if(self:IsAddonReady(addon)) then + self:Style(addon, fn) end end end -function PLUGIN:LoadStyles() - for addon,fn in pairs(self.BlizzardQueue) do - if IsAddOnLoaded(addon) then - fn() - self.BlizzardQueue[addon]=nil +function PLUGIN:ToggleStyle(addon, value) + SuperVillain.db.SVStyle.addons[addon] = value +end + +function PLUGIN:PLAYER_ENTERING_WORLD(event, ...) + for addon,fn in pairs(self.OnLoadAddons) do + if(SuperVillain.db.SVStyle.blizzard[addon] == nil) then + SuperVillain.db.SVStyle.blizzard[addon] = true + end + if(IsAddOnLoaded(addon) and SuperVillain.db.SVStyle.blizzard[addon]) then + fn(event, addon) + self.OnLoadAddons[addon] = nil end - end; + end + for _,fn in pairs(self.CustomQueue)do - fn() - end; + fn(event) + end + twipe(self.CustomQueue) + for addon,fn in pairs(self.AddOnQueue)do PLUGIN:AppendAddonOption(addon) - if IsAddOnLoaded(addon) then - if(SuperVillain.db.SVStyle.addons[addon] == nil) then - SuperVillain.db.SVStyle.addons[addon] = true - end - if(SuperVillain.db.SVStyle.addons[addon] == true) then + if(SuperVillain.db.SVStyle.addons[addon] == nil) then + SuperVillain.db.SVStyle.addons[addon] = true + end + if(self:IsAddonReady(addon)) then + if(self.AddOnEvents[addon]) then if(not self.AddOnEvents[addon]["complete"]) then - if self.AddOnEvents[addon]["events"] then + if(self.AddOnEvents[addon]["events"]) then for event,_ in pairs(self.AddOnEvents[addon]["events"]) do self:DefineEventFunction(event, addon) end @@ -209,14 +257,19 @@ function PLUGIN:LoadStyles() self.AddOnEvents[addon]["complete"] = true end end + self:Style(addon, fn, event, ...) end - end; - self:RefreshAddonStyles() + end + collectgarbage("collect") end -function PLUGIN:ToggleStyle(addon, value) - SuperVillain.db.SVStyle.addons[addon] = value -end; +function PLUGIN:ADDON_LOADED(event, addon) + for name, fn in pairs(self.OnLoadAddons) do + if(addon:find(name)) then + self:Style(name, fn, event, addon) + end + end +end --[[ ########################################################## OPTIONS CREATION @@ -237,7 +290,7 @@ function PLUGIN:AppendAddonOption(addon) end end } -end; +end local RegisterAddonDocklets = function() local MAIN = _G["SuperDockletMain"]; @@ -245,7 +298,7 @@ local RegisterAddonDocklets = function() local main = SuperVillain.db.SVDock.docklets.DockletMain; local alternate = SuperVillain.db.SVDock.docklets.enableExtra and SuperVillain.db.SVDock.docklets.DockletExtra or ""; local tipLeft, tipRight = "", ""; - if main == nil or main == "None" then return end; + if main == nil or main == "None" then return end if find(main, "Skada") or find(alternate, "Skada") then if SuperVillain:IsDockletReady("Skada") then @@ -260,8 +313,8 @@ local RegisterAddonDocklets = function() SuperVillain:RegisterMainDocklet("SkadaHolder") --PLUGIN.DockedParent["Skada"] = MAIN end - end; - end; + end + end if main == "Omen" or alternate == "Omen" then if SuperVillain:IsDockletReady("Omen") then if alternate == "Omen" and EXTRA.FrameName ~= "OmenAnchor" then @@ -275,8 +328,8 @@ local RegisterAddonDocklets = function() PLUGIN:Docklet_Omen(MAIN) PLUGIN.DockedParent["Omen"] = MAIN end - end; - end; + end + end if main == "Recount" or alternate == "Recount" then if SuperVillain:IsDockletReady("Recount") then if alternate == "Recount" and EXTRA.FrameName ~= "Recount_MainWindow" then @@ -290,8 +343,8 @@ local RegisterAddonDocklets = function() PLUGIN:Docklet_Recount(MAIN) PLUGIN.DockedParent["Recount"] = MAIN end - end; - end; + end + end if main == "TinyDPS" or alternate == "TinyDPS" then if SuperVillain:IsDockletReady("TinyDPS") then if alternate == "TinyDPS" and EXTRA.FrameName ~= "tdpsFrame" then @@ -305,8 +358,8 @@ local RegisterAddonDocklets = function() PLUGIN:Docklet_TinyDPS(MAIN) PLUGIN.DockedParent["TinyDPS"] = MAIN end - end; - end; + end + end if main == "alDamageMeter" or alternate == "alDamageMeter" then if SuperVillain:IsDockletReady("alDamageMeter") then if alternate == "alDamageMeter" and EXTRA.FrameName ~= "alDamagerMeterFrame" then @@ -320,30 +373,20 @@ local RegisterAddonDocklets = function() PLUGIN:Docklet_alDamageMeter(MAIN) PLUGIN.DockedParent["alDamageMeter"] = MAIN end - end; - end; + end + end if(_G["SVUI_AddonDocklet"]) then _G["SVUI_AddonDocklet"].TText = ("%s%s"):format(tipLeft, tipRight) end -end; +end --[[ ########################################################## BUILD FUNCTION ########################################################## ]]-- local Registry_OnEvent = function(self, event, ...) - if(event == "ADDON_LOADED") then - local addon = select(1, ...) - if PLUGIN.PassiveAddons[addon] then - PLUGIN.BlizzardQueue[addon]() - PLUGIN.BlizzardQueue[addon] = nil; - return - end; - if not SuperVillain.AddonLaunched or not PLUGIN.BlizzardQueue[addon] then return end; - PLUGIN.BlizzardQueue[addon]() - PLUGIN.BlizzardQueue[addon] = nil - elseif(PLUGIN[event]) then + if(PLUGIN[event]) then PLUGIN[event](PLUGIN, event, ...) end end @@ -690,13 +733,12 @@ local function LoadStyleOMatic() alert:Hide(); PLUGIN.Alert = alert; - PLUGIN:LoadStyles(); - NewHook(SuperVillain, "ReloadDocklets", RegisterAddonDocklets); SuperVillain:ReloadDocklets(); SuperVillain.DynamicOptions["SVStyle"] = {key = "addons", data = PLUGIN.OptionsCache}; SVUIAddonEventHandler:RegisterEvent('ADDON_LOADED'); + SVUIAddonEventHandler:RegisterEvent('PLAYER_ENTERING_WORLD'); end CONFIGS["SVStyle"] = { @@ -774,7 +816,9 @@ CONFIGS["SVStyle"] = { ["Clique"] = true, ["CoolLine"] = true, ["ACP"] = true, - ["DXE"] = true, + ["DXE"] = true, + ["DBM-Core"] = true, + ["VEM"] = true, ["MogIt"] = true, ["alDamageMeter"] = true, ["Omen"] = true, diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua index f529b9a..3156060 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua @@ -146,6 +146,6 @@ end; STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle('Blizzard_PVPUI', PVPFrameStyle, true, nil, true) +STYLE:SaveBlizzardStyle('Blizzard_PVPUI', PVPFrameStyle, true) -- /script StaticPopupSpecial_Show(PVPReadyDialog) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua index e5149df..cfce66b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua @@ -21,53 +21,58 @@ HELPERS ########################################################## ]]-- local function Tab_OnEnter(this) - this.backdrop:SetPanelColor("highlight") + this.backdrop:SetBackdropColor(unpack(SuperVillain.Media.color.highlight)) this.backdrop:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) end local function Tab_OnLeave(this) - this.backdrop:SetPanelColor("dark") + this.backdrop:SetBackdropColor(0,0,0,1) this.backdrop:SetBackdropBorderColor(0,0,0,1) end local function ChangeTabHelper(this) this:Formula409() - this:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - this:GetNormalTexture():FillInner() + local nTex = this:GetNormalTexture() + if(nTex) then + nTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + nTex:FillInner() + end + this.pushed = true; + this.backdrop = CreateFrame("Frame", nil, this) this.backdrop:WrapOuter(this,1,1) - local level = this:GetFrameLevel() - if(level > 0) then - this.backdrop:SetFrameLevel(level - 1) - else - this.backdrop:SetFrameLevel(0) - end - this.backdrop:SetFixedPanelTemplate("Component", true) - this.backdrop:SetPanelColor("dark") - this:HookScript("OnEnter",Tab_OnEnter) - this:HookScript("OnLeave",Tab_OnLeave) - hooksecurefunc(this:GetHighlightTexture(), "SetTexture", function(i, w) - if w ~= nil then - i:SetTexture(0,0,0,0) - end - end) - hooksecurefunc(this:GetCheckedTexture(), "SetTexture", function(i, w) - if w ~= nil then - i:SetTexture(0,0,0,0) - end - end) + this.backdrop:SetFrameLevel(0) + this.backdrop:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeFile = [[Interface\AddOns\SVUI\assets\artwork\Template\GLOW]], + edgeSize = 3, + insets = { + left = 0, + right = 0, + top = 0, + bottom = 0 + } + }); + this.backdrop:SetBackdropColor(0,0,0,1) + this.backdrop:SetBackdropBorderColor(0,0,0,1) + this:SetScript("OnEnter", Tab_OnEnter) + this:SetScript("OnLeave", Tab_OnLeave) + local a,b,c,d,e = this:GetPoint() this:Point(a,b,c,1,e) end; -local function GetSpecTabHelper(tab) - local i = SpellBookCoreAbilitiesFrame.SpecTabs[tab] - ChangeTabHelper(i) - if tab > 1 then - local o, Y, Z, h, s = i:GetPoint() - i:ClearAllPoints() - i:SetPoint(o, Y, Z, 0, s) +local function GetSpecTabHelper(index) + local tab = SpellBookCoreAbilitiesFrame.SpecTabs[index] + if(not tab) then return end + ChangeTabHelper(tab) + if index > 1 then + local o, Y, Z, h, s = tab:GetPoint() + tab:ClearAllPoints() + tab:SetPoint(o, Y, Z, 0, s) end end; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua index 1ab650e..9cfa41c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua @@ -317,7 +317,7 @@ end; STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle("Blizzard_TalentUI",TalentFrameStyle) +STYLE:SaveBlizzardStyle("Blizzard_TalentUI", TalentFrameStyle) local function GlyphStyle() GlyphFrame.background:ClearAllPoints() @@ -359,4 +359,4 @@ local function GlyphStyle() GlyphFrameScrollFrame:SetPanelTemplate("Inset", false, 3, 2, 2) end; -STYLE:SaveBlizzardStyle("Blizzard_GlyphUI",GlyphStyle) \ No newline at end of file +STYLE:SaveBlizzardStyle("Blizzard_GlyphUI", GlyphStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua index d4a3c0a..2b4e388 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua @@ -33,37 +33,40 @@ local STYLE = _G.StyleVillain; ACP ########################################################## ]]-- -local function StyleACP() - local function cbResize(self,elapsed) - self.timeLapse = self.timeLapse + elapsed - if(self.timeLapse < 2) then - return - else - self.timeLapse = 0 - end - for i=1,20,1 do - local d=_G["ACP_AddonListEntry"..i.."Enabled"] - local e=_G["ACP_AddonListEntry"..i.."Collapse"] - local f=_G["ACP_AddonListEntry"..i.."Security"] - local g="" - if g=="" then - d:SetPoint("LEFT",5,0) - if e:IsShown()then - d:SetWidth(26) - d:SetHeight(26) - else - d:SetPoint("LEFT",15,0) - d:SetWidth(20) - d:SetHeight(20) - end - end; - if f:IsShown()then - d:SetPoint("LEFT",5,0) +local function cbResize(self,elapsed) + self.timeLapse = self.timeLapse + elapsed + if(self.timeLapse < 2) then + return + else + self.timeLapse = 0 + end + for i=1,20,1 do + local d=_G["ACP_AddonListEntry"..i.."Enabled"] + local e=_G["ACP_AddonListEntry"..i.."Collapse"] + local f=_G["ACP_AddonListEntry"..i.."Security"] + local g="" + if g=="" then + d:SetPoint("LEFT",5,0) + if e:IsShown()then d:SetWidth(26) d:SetHeight(26) + else + d:SetPoint("LEFT",15,0) + d:SetWidth(20) + d:SetHeight(20) end + end; + if f:IsShown()then + d:SetPoint("LEFT",5,0) + d:SetWidth(26) + d:SetHeight(26) end - end; + end +end + +local function StyleACP() + assert(ACP_AddonList, "AddOn Not Loaded") + STYLE:ApplyFrameStyle(ACP_AddonList) STYLE:ApplyFrameStyle(ACP_AddonList_ScrollFrame) local h={"ACP_AddonListSetButton","ACP_AddonListDisableAll","ACP_AddonListEnableAll","ACP_AddonList_ReloadUI","ACP_AddonListBottomClose"} @@ -96,4 +99,5 @@ local function StyleACP() ACP_AddonListBottomClose:Point("BOTTOMRIGHT",ACP_AddonList,"BOTTOMRIGHT",-50,8) ACP_AddonListBottomClose:SetHeight(25)ACP_AddonList:SetParent(UIParent) end + STYLE:SaveAddonStyle("ACP", StyleACP) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua index bcc38f9..f3f2edd 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua @@ -33,92 +33,119 @@ local STYLE = _G.StyleVillain; ATLASLOOT ########################################################## ]]-- -LoadAddOn("AtlasLoot") -local function StyleAtlasLoot() - local function AL_OnShow(self, event, ...) - AtlasLootPanel:Point("TOP", AtlasLootDefaultFrame, "BOTTOM", 0, -1) - AtlasLootQuickLooksButton:Point("BOTTOM", AtlasLootItemsFrame, "BOTTOM", 53, 33) - AtlasLootPanelSearch_Box:ClearAllPoints() - AtlasLootPanelSearch_Box:Point("TOP", AtlasLoot_PanelButton_7, "BOTTOM", 80, -10) - AtlasLootPanelSearch_SearchButton:Point("LEFT", AtlasLootPanelSearch_Box, "RIGHT", 5, 0) - AtlasLootPanelSearch_SelectModuel:Point("LEFT", AtlasLootPanelSearch_SearchButton, "RIGHT", 5, 0) - AtlasLootPanelSearch_ClearButton:Point("LEFT", AtlasLootPanelSearch_SelectModuel, "RIGHT", 5, 0) - AtlasLootPanelSearch_LastResultButton:Point("LEFT", AtlasLootPanelSearch_ClearButton, "RIGHT", 5, 0) - AtlasLoot10Man25ManSwitch:Point("BOTTOM", AtlasLootItemsFrame, "BOTTOM", -130, 4) - if AtlasLoot_PanelButton_2 then AtlasLoot_PanelButton_2:Point("LEFT", AtlasLoot_PanelButton_1, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_3 then AtlasLoot_PanelButton_3:Point("LEFT", AtlasLoot_PanelButton_2, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_4 then AtlasLoot_PanelButton_4:Point("LEFT", AtlasLoot_PanelButton_3, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_5 then AtlasLoot_PanelButton_5:Point("LEFT", AtlasLoot_PanelButton_4, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_6 then AtlasLoot_PanelButton_6:Point("LEFT", AtlasLoot_PanelButton_5, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_8 then AtlasLoot_PanelButton_8:Point("LEFT", AtlasLoot_PanelButton_7, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_9 then AtlasLoot_PanelButton_9:Point("LEFT", AtlasLoot_PanelButton_8, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_10 then AtlasLoot_PanelButton_10:Point("LEFT", AtlasLoot_PanelButton_9, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_11 then AtlasLoot_PanelButton_11:Point("LEFT", AtlasLoot_PanelButton_10, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_12 then AtlasLoot_PanelButton_12:Point("LEFT", AtlasLoot_PanelButton_11, "RIGHT", 1, 0) end - AtlasLootCompareFrameSortButton_Rarity:Point("LEFT", AtlasLootCompareFrameSortButton_Name, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_Rarity:Width(80) - AtlasLootCompareFrameSortButton_Name:Width(80) - AtlasLootCompareFrameSortButton_1:Point("LEFT", AtlasLootCompareFrameSortButton_Rarity, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_2:Point("LEFT", AtlasLootCompareFrameSortButton_1, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_3:Point("LEFT", AtlasLootCompareFrameSortButton_2, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_4:Point("LEFT", AtlasLootCompareFrameSortButton_3, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_5:Point("LEFT", AtlasLootCompareFrameSortButton_4, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_6:Point("LEFT", AtlasLootCompareFrameSortButton_5, "RIGHT", 1, 0) - AtlasLootCompareFrame_CloseButton2:Point("BOTTOMRIGHT", AtlasLootCompareFrame, "BOTTOMRIGHT", -7, 10) - AtlasLootCompareFrame_WishlistButton:Point("RIGHT", AtlasLootCompareFrame_CloseButton2, "LEFT", -1, 0) - AtlasLootCompareFrameSearch_SearchButton:Point("LEFT", AtlasLootCompareFrameSearch_Box, "RIGHT", 5, 0) - AtlasLootCompareFrameSearch_SelectModuel:Point("LEFT", AtlasLootCompareFrameSearch_SearchButton, "RIGHT", 5, 0) - AtlasLootDefaultFrame_CloseButton:ClearAllPoints() - AtlasLootDefaultFrame_CloseButton:SetPoint("TOPRIGHT", AtlasLootDefaultFrame, "TOPRIGHT", -5 -2) - AtlasLootDefaultFrame:SetFrameLevel(0) - AtlasLootItemsFrame:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - for i = 1, 30 do if _G["AtlasLootDefaultFrame_ScrollLine"..i] then _G["AtlasLootDefaultFrame_ScrollLine"..i]:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1)end end; +local timeLapse = 0; + +local function AL_OnShow(self, event, ...) + AtlasLootPanel:Point("TOP", AtlasLootDefaultFrame, "BOTTOM", 0, -1) + AtlasLootQuickLooksButton:Point("BOTTOM", AtlasLootItemsFrame, "BOTTOM", 53, 33) + AtlasLootPanelSearch_Box:ClearAllPoints() + AtlasLootPanelSearch_Box:Point("TOP", AtlasLoot_PanelButton_7, "BOTTOM", 80, -10) + AtlasLootPanelSearch_SearchButton:Point("LEFT", AtlasLootPanelSearch_Box, "RIGHT", 5, 0) + AtlasLootPanelSearch_SelectModuel:Point("LEFT", AtlasLootPanelSearch_SearchButton, "RIGHT", 5, 0) + AtlasLootPanelSearch_ClearButton:Point("LEFT", AtlasLootPanelSearch_SelectModuel, "RIGHT", 5, 0) + AtlasLootPanelSearch_LastResultButton:Point("LEFT", AtlasLootPanelSearch_ClearButton, "RIGHT", 5, 0) + AtlasLoot10Man25ManSwitch:Point("BOTTOM", AtlasLootItemsFrame, "BOTTOM", -130, 4) + if AtlasLoot_PanelButton_2 then AtlasLoot_PanelButton_2:Point("LEFT", AtlasLoot_PanelButton_1, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_3 then AtlasLoot_PanelButton_3:Point("LEFT", AtlasLoot_PanelButton_2, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_4 then AtlasLoot_PanelButton_4:Point("LEFT", AtlasLoot_PanelButton_3, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_5 then AtlasLoot_PanelButton_5:Point("LEFT", AtlasLoot_PanelButton_4, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_6 then AtlasLoot_PanelButton_6:Point("LEFT", AtlasLoot_PanelButton_5, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_8 then AtlasLoot_PanelButton_8:Point("LEFT", AtlasLoot_PanelButton_7, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_9 then AtlasLoot_PanelButton_9:Point("LEFT", AtlasLoot_PanelButton_8, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_10 then AtlasLoot_PanelButton_10:Point("LEFT", AtlasLoot_PanelButton_9, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_11 then AtlasLoot_PanelButton_11:Point("LEFT", AtlasLoot_PanelButton_10, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_12 then AtlasLoot_PanelButton_12:Point("LEFT", AtlasLoot_PanelButton_11, "RIGHT", 1, 0) end + AtlasLootCompareFrameSortButton_Rarity:Point("LEFT", AtlasLootCompareFrameSortButton_Name, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_Rarity:Width(80) + AtlasLootCompareFrameSortButton_Name:Width(80) + AtlasLootCompareFrameSortButton_1:Point("LEFT", AtlasLootCompareFrameSortButton_Rarity, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_2:Point("LEFT", AtlasLootCompareFrameSortButton_1, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_3:Point("LEFT", AtlasLootCompareFrameSortButton_2, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_4:Point("LEFT", AtlasLootCompareFrameSortButton_3, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_5:Point("LEFT", AtlasLootCompareFrameSortButton_4, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_6:Point("LEFT", AtlasLootCompareFrameSortButton_5, "RIGHT", 1, 0) + AtlasLootCompareFrame_CloseButton2:Point("BOTTOMRIGHT", AtlasLootCompareFrame, "BOTTOMRIGHT", -7, 10) + AtlasLootCompareFrame_WishlistButton:Point("RIGHT", AtlasLootCompareFrame_CloseButton2, "LEFT", -1, 0) + AtlasLootCompareFrameSearch_SearchButton:Point("LEFT", AtlasLootCompareFrameSearch_Box, "RIGHT", 5, 0) + AtlasLootCompareFrameSearch_SelectModuel:Point("LEFT", AtlasLootCompareFrameSearch_SearchButton, "RIGHT", 5, 0) + AtlasLootDefaultFrame_CloseButton:ClearAllPoints() + AtlasLootDefaultFrame_CloseButton:SetPoint("TOPRIGHT", AtlasLootDefaultFrame, "TOPRIGHT", -5 -2) + AtlasLootDefaultFrame:SetFrameLevel(0) + AtlasLootItemsFrame:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) + for i = 1, 30 do if _G["AtlasLootDefaultFrame_ScrollLine"..i] then _G["AtlasLootDefaultFrame_ScrollLine"..i]:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1)end end; + + if(AtlasLootDefaultFrame_PackageSelect) then AtlasLootDefaultFrame_PackageSelect:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - AtlasLootDefaultFrame_InstanceSelect:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - AtlasLoot_AtlasInfoFrame_ToggleALButton:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - AtlasLootDefaultFrame_CompareFrame:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - AtlasLootPanelSearch_Box:SetHeight(16) - AtlasLootPanel:SetWidth(921) end - local timeLapse = 0; - local function Nine_IsThere(self, elapsed) - self.timeLapse = self.timeLapse + elapsed - if(self.timeLapse < 2) then - return - else - self.timeLapse = 0 - end - for i = 1, 9 do local f = _G["AtlasLootCompareFrameSortButton_"..i]f:SetWidth(44.44)end; - local nineisthere={"AtlasLootCompareFrameSortButton_7","AtlasLootCompareFrameSortButton_8","AtlasLootCompareFrameSortButton_9"} - for _, object in pairs(nineisthere) do STYLE:ApplyFrameStyle(_G[object])end; - AtlasLootCompareFrameSortButton_7:Point("LEFT", AtlasLootCompareFrameSortButton_6, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_8:Point("LEFT", AtlasLootCompareFrameSortButton_7, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_9:Point("LEFT", AtlasLootCompareFrameSortButton_8, "RIGHT", 1, 0) + AtlasLootDefaultFrame_InstanceSelect:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) + AtlasLoot_AtlasInfoFrame_ToggleALButton:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) + AtlasLootDefaultFrame_CompareFrame:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) + AtlasLootPanelSearch_Box:SetHeight(16) + AtlasLootPanel:SetWidth(921) +end + +local function Nine_IsThere(self, elapsed) + self.timeLapse = self.timeLapse + elapsed + if(self.timeLapse < 2) then + return + else + self.timeLapse = 0 end - local function Compare_OnShow(self, event, ...) - for i = 1, 6 do _G["AtlasLootCompareFrameSortButton_"..i]:SetWidth(40)end; - local Nine = AtlasLootCompareFrameSortButton_9 - if Nine ~= nil then - Nine.timeLapse = 0 - Nine:SetScript("OnUpdate", Nine_IsThere) - end; + for i = 1, 9 do local f = _G["AtlasLootCompareFrameSortButton_"..i]f:SetWidth(44.44)end; + local nineisthere={"AtlasLootCompareFrameSortButton_7","AtlasLootCompareFrameSortButton_8","AtlasLootCompareFrameSortButton_9"} + for _, object in pairs(nineisthere) do STYLE:ApplyFrameStyle(_G[object])end; + AtlasLootCompareFrameSortButton_7:Point("LEFT", AtlasLootCompareFrameSortButton_6, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_8:Point("LEFT", AtlasLootCompareFrameSortButton_7, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_9:Point("LEFT", AtlasLootCompareFrameSortButton_8, "RIGHT", 1, 0) +end + +local function Compare_OnShow(self, event, ...) + for i = 1, 6 do _G["AtlasLootCompareFrameSortButton_"..i]:SetWidth(40)end; + local Nine = AtlasLootCompareFrameSortButton_9 + if Nine ~= nil then + Nine.timeLapse = 0 + Nine:SetScript("OnUpdate", Nine_IsThere) + end; +end + +local _hook_ALPanel = function(self,_,parent,_,_,_,breaker) + if not breaker then + self:ClearAllPoints() + self:SetPoint("TOP",parent,"BOTTOM",0,-1,true) + end +end + +local _hook_OnUpdate = function(self, elapsed) + self.timeLapse = self.timeLapse + elapsed + if(self.timeLapse < 2) then + return + else + self.timeLapse = 0 end - local StripAllTextures={"AtlasLootDefaultFrame","AtlasLootDefaultFrame_ScrollFrame","AtlasLootItemsFrame","AtlasLootPanel","AtlasLootCompareFrame","AtlasLootCompareFrame_ScrollFrameMainFilterScrollChildFrame","AtlasLootCompareFrame_ScrollFrameItemFrame","AtlasLootCompareFrame_ScrollFrameMainFilter","AtlasLootCompareFrameSortButton_Name","AtlasLootCompareFrameSortButton_Rarity","AtlasLootCompareFrameSortButton_1","AtlasLootCompareFrameSortButton_2","AtlasLootCompareFrameSortButton_3","AtlasLootCompareFrameSortButton_4","AtlasLootCompareFrameSortButton_5","AtlasLootCompareFrameSortButton_6"} - local SetTemplateDefault={"AtlasLootCompareFrameSortButton_Name","AtlasLootCompareFrameSortButton_Rarity","AtlasLootCompareFrameSortButton_1","AtlasLootCompareFrameSortButton_2","AtlasLootCompareFrameSortButton_3","AtlasLootCompareFrameSortButton_4","AtlasLootCompareFrameSortButton_5","AtlasLootCompareFrameSortButton_6"} - local buttons={"AtlasLoot_AtlasInfoFrame_ToggleALButton","AtlasLootPanelSearch_SearchButton","AtlasLootDefaultFrame_CompareFrame","AtlasLootPanelSearch_ClearButton","AtlasLootPanelSearch_LastResultButton","AtlasLoot10Man25ManSwitch","AtlasLootItemsFrame_BACK","AtlasLootCompareFrameSearch_ClearButton","AtlasLootCompareFrameSearch_SearchButton","AtlasLootCompareFrame_WishlistButton","AtlasLootCompareFrame_CloseButton2"} + self:SetWidth(AtlasLootDefaultFrame:GetWidth()) +end + +LoadAddOn("AtlasLoot") + +local function StyleAtlasLoot() + assert(AtlasLootPanel, "AddOn Not Loaded") + + local StripAllTextures = {"AtlasLootDefaultFrame","AtlasLootDefaultFrame_ScrollFrame","AtlasLootItemsFrame","AtlasLootPanel","AtlasLootCompareFrame","AtlasLootCompareFrame_ScrollFrameMainFilterScrollChildFrame","AtlasLootCompareFrame_ScrollFrameItemFrame","AtlasLootCompareFrame_ScrollFrameMainFilter","AtlasLootCompareFrameSortButton_Name","AtlasLootCompareFrameSortButton_Rarity","AtlasLootCompareFrameSortButton_1","AtlasLootCompareFrameSortButton_2","AtlasLootCompareFrameSortButton_3","AtlasLootCompareFrameSortButton_4","AtlasLootCompareFrameSortButton_5","AtlasLootCompareFrameSortButton_6"} + + local SetTemplateDefault = {"AtlasLootCompareFrameSortButton_Name","AtlasLootCompareFrameSortButton_Rarity","AtlasLootCompareFrameSortButton_1","AtlasLootCompareFrameSortButton_2","AtlasLootCompareFrameSortButton_3","AtlasLootCompareFrameSortButton_4","AtlasLootCompareFrameSortButton_5","AtlasLootCompareFrameSortButton_6"} + + local buttons = {"AtlasLoot_AtlasInfoFrame_ToggleALButton","AtlasLootPanelSearch_SearchButton","AtlasLootDefaultFrame_CompareFrame","AtlasLootPanelSearch_ClearButton","AtlasLootPanelSearch_LastResultButton","AtlasLoot10Man25ManSwitch","AtlasLootItemsFrame_BACK","AtlasLootCompareFrameSearch_ClearButton","AtlasLootCompareFrameSearch_SearchButton","AtlasLootCompareFrame_WishlistButton","AtlasLootCompareFrame_CloseButton2"} + for _, object in pairs(StripAllTextures) do _G[object]:Formula409()end; for _, object in pairs(SetTemplateDefault) do STYLE:ApplyFrameStyle(_G[object], "Default")end; for _, button in pairs(buttons) do _G[button]:SetButtonTemplate()end; + -- Manipulate the main frames STYLE:ApplyFrameStyle(_G["AtlasLootDefaultFrame"], "Action"); STYLE:ApplyFrameStyle(_G["AtlasLootItemsFrame"], "Button"); STYLE:ApplyFrameStyle(_G["AtlasLootPanel"], "Transparent"); - hooksecurefunc(_G["AtlasLootPanel"],"SetPoint",function(self,_,parent,_,_,_,breaker) - if not breaker then - self:ClearAllPoints() - self:SetPoint("TOP",parent,"BOTTOM",0,-1,true) - end - end); + hooksecurefunc(_G["AtlasLootPanel"], "SetPoint", _hook_ALPanel); + _G["AtlasLootPanel"]:SetPoint("TOP",_G["AtlasLootDefaultFrame"],"BOTTOM",0,-1); -- Back to the rest STYLE:ApplyFrameStyle(_G["AtlasLootCompareFrame"], "Transparent"); @@ -134,7 +161,9 @@ local function StyleAtlasLoot() if AtlasLoot_PanelButton_10 then AtlasLoot_PanelButton_10:SetButtonTemplate() end if AtlasLoot_PanelButton_11 then AtlasLoot_PanelButton_11:SetButtonTemplate() end if AtlasLoot_PanelButton_12 then AtlasLoot_PanelButton_12:SetButtonTemplate() end - for i = 1, 15 do local f = _G["AtlasLootCompareFrameMainFilterButton"..i]f:Formula409()end; + + for i = 1, 15 do local f = _G["AtlasLootCompareFrameMainFilterButton"..i]f:Formula409() end; + STYLE:ApplyCloseButtonStyle(AtlasLootDefaultFrame_CloseButton) STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton) STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton_Wishlist) @@ -146,10 +175,14 @@ local function StyleAtlasLoot() AtlasLootItemsFrame_PREV:SetWidth(25) AtlasLootItemsFrame_PREV:SetHeight(25) STYLE:ApplyPaginationStyle(AtlasLootPanelSearch_SelectModuel) - STYLE:ApplyPaginationStyle(AtlasLootCompareFrameSearch_SelectModuel) - STYLE:ApplyDropdownStyle(AtlasLootDefaultFrame_PackageSelect) - AtlasLootDefaultFrame_PackageSelect:SetWidth(240) - AtlasLootDefaultFrame_PackageSelect:SetPoint("TOPLEFT", AtlasLootDefaultFrame, "TOPLEFT", 50, -50) + STYLE:ApplyPaginationStyle(AtlasLootCompareFrameSearch_SelectModuel) + + if(AtlasLootDefaultFrame_PackageSelect) then + STYLE:ApplyDropdownStyle(AtlasLootDefaultFrame_PackageSelect) + AtlasLootDefaultFrame_PackageSelect:SetWidth(240) + AtlasLootDefaultFrame_PackageSelect:SetPoint("TOPLEFT", AtlasLootDefaultFrame, "TOPLEFT", 50, -50) + end + STYLE:ApplyDropdownStyle(AtlasLootDefaultFrame_InstanceSelect,240) --AtlasLootDefaultFrame_InstanceSelect:SetWidth(240) STYLE:ApplyDropdownStyle(AtlasLootCompareFrameSearch_StatsListDropDown) @@ -158,11 +191,22 @@ local function StyleAtlasLoot() AtlasLootCompareFrame_WishlistDropDown:SetWidth(240) AtlasLootPanelSearch_Box:SetEditboxTemplate() AtlasLootCompareFrameSearch_Box:SetEditboxTemplate() - if AtlasLootFilterCheck then AtlasLootFilterCheck:SetCheckboxTemplate(true) end - if AtlasLootItemsFrame_Heroic then AtlasLootItemsFrame_Heroic:SetCheckboxTemplate(true) end - if AtlasLootCompareFrameSearch_FilterCheck then AtlasLootCompareFrameSearch_FilterCheck:SetCheckboxTemplate(true) end - if AtlasLootItemsFrame_RaidFinder then AtlasLootItemsFrame_RaidFinder:SetCheckboxTemplate(true) end - if AtlasLootItemsFrame_Thunderforged then AtlasLootItemsFrame_Thunderforged:SetCheckboxTemplate(true) end + + if AtlasLootFilterCheck then + AtlasLootFilterCheck:SetCheckboxTemplate(true) + end + if AtlasLootItemsFrame_Heroic then + AtlasLootItemsFrame_Heroic:SetCheckboxTemplate(true) + end + if AtlasLootCompareFrameSearch_FilterCheck then AtlasLootCompareFrameSearch_FilterCheck:SetCheckboxTemplate(true) + end + if AtlasLootItemsFrame_RaidFinder then + AtlasLootItemsFrame_RaidFinder:SetCheckboxTemplate(true) + end + if AtlasLootItemsFrame_Thunderforged then + AtlasLootItemsFrame_Thunderforged:SetCheckboxTemplate(true) + end + AtlasLootPanel.Titel:SetTextColor(23/255, 132/255, 209/255) AtlasLootPanel.Titel:SetPoint("BOTTOM", AtlasLootPanel.TitelBg, "BOTTOM", 0, 40) STYLE:ApplyScrollStyle(AtlasLootCompareFrame_ScrollFrameItemFrameScrollBar) @@ -170,15 +214,11 @@ local function StyleAtlasLoot() AtlasLootDefaultFrame:HookScript("OnShow", AL_OnShow) AtlasLootCompareFrame:HookScript("OnShow", Compare_OnShow) AtlasLootPanel.timeLapse = 0; - AtlasLootPanel:HookScript("OnUpdate", function(self, elapsed) - self.timeLapse = self.timeLapse + elapsed - if(self.timeLapse < 2) then - return - else - self.timeLapse = 0 - end - self:SetWidth(AtlasLootDefaultFrame:GetWidth()) - end) - if AtlasLootTooltip:GetName() ~= "GameTooltip" then STYLE:ApplyTooltipStyle(AtlasLootTooltip) end + + AtlasLootPanel:HookScript("OnUpdate", _hook_OnUpdate) + + if(AtlasLootTooltip:GetName() ~= "GameTooltip") then + STYLE:ApplyTooltipStyle(AtlasLootTooltip) + end end STYLE:SaveAddonStyle("AtlasLoot", StyleAtlasLoot) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua index cd52cd9..ed039d6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua @@ -45,6 +45,7 @@ local function BGHelper(parent) end local function StyleAuctionLite(event, ...) + assert(AuctionFrameTab4, "AddOn Not Loaded") if(not event or (event and event == 'PLAYER_ENTERING_WORLD')) then return; end BuyName:SetEditboxTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua index df3e815..63a58ff 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua @@ -32,90 +32,95 @@ local STYLE = _G.StyleVillain BIGWIGS ########################################################## ]]-- -local BigWigsLoaded; -local function StyleBigWigs(event, addon) - local ButtonSize = 20 - local FreeBG = {} - local function freestyle(bar) - local bg = bar:Get("bigwigs:elvui:barbg") - if bg then - bg:ClearAllPoints() - bg:SetParent(SVUI[1].UIParent) - bg:Hide() - FreeBG[#FreeBG + 1] = bg - end +local FreeBG +local BigWigsLoaded - local ibg = bar:Get("bigwigs:elvui:iconbg") - if ibg then - ibg:ClearAllPoints() - ibg:SetParent(SVUI[1].UIParent) - ibg:Hide() - FreeBG[#FreeBG + 1] = ibg - end - bar.candyBarIconFrame.SetWidth = bar.candyBarIconFrame.OldSetWidth - bar.candyBarBar.SetPoint = bar.candyBarBar.OldSetPoint - bar.candyBarIconFrame:ClearAllPoints() - bar.candyBarIconFrame:SetPoint("TOPLEFT") - bar.candyBarIconFrame:SetPoint("BOTTOMLEFT") - bar.candyBarIconFrame:SetTexCoord(0.1,0.9,0.1,0.9) - bar.candyBarBar:ClearAllPoints() - bar.candyBarBar:SetPoint("TOPRIGHT") - bar.candyBarBar:SetPoint("BOTTOMRIGHT") - bar.candyBarBackground:SetAllPoints() - bar.candyBarDuration:ClearAllPoints() - bar.candyBarDuration:SetPoint("RIGHT", bar.candyBarBar, "RIGHT", -2, 0) - bar.candyBarLabel:ClearAllPoints() - bar.candyBarLabel:SetPoint("LEFT", bar.candyBarBar, "LEFT", 2, 0) - bar.candyBarLabel:SetPoint("RIGHT", bar.candyBarBar, "RIGHT", -2, 0) +local function freestyle(bar) + if not FreeBG then FreeBG = {} end + local bg = bar:Get("bigwigs:elvui:barbg") + if bg then + bg:ClearAllPoints() + bg:SetParent(SVUI[1].UIParent) + bg:Hide() + FreeBG[#FreeBG + 1] = bg end - local function applystyle(bar) - bar:Height(ButtonSize) - local bg = nil + + local ibg = bar:Get("bigwigs:elvui:iconbg") + if ibg then + ibg:ClearAllPoints() + ibg:SetParent(SVUI[1].UIParent) + ibg:Hide() + FreeBG[#FreeBG + 1] = ibg + end + bar.candyBarIconFrame.SetWidth = bar.candyBarIconFrame.OldSetWidth + bar.candyBarBar.SetPoint = bar.candyBarBar.OldSetPoint + bar.candyBarIconFrame:ClearAllPoints() + bar.candyBarIconFrame:SetPoint("TOPLEFT") + bar.candyBarIconFrame:SetPoint("BOTTOMLEFT") + bar.candyBarIconFrame:SetTexCoord(0.1,0.9,0.1,0.9) + bar.candyBarBar:ClearAllPoints() + bar.candyBarBar:SetPoint("TOPRIGHT") + bar.candyBarBar:SetPoint("BOTTOMRIGHT") + bar.candyBarBackground:SetAllPoints() + bar.candyBarDuration:ClearAllPoints() + bar.candyBarDuration:SetPoint("RIGHT", bar.candyBarBar, "RIGHT", -2, 0) + bar.candyBarLabel:ClearAllPoints() + bar.candyBarLabel:SetPoint("LEFT", bar.candyBarBar, "LEFT", 2, 0) + bar.candyBarLabel:SetPoint("RIGHT", bar.candyBarBar, "RIGHT", -2, 0) +end + +local function applystyle(bar) + if not FreeBG then FreeBG = {} end + bar:Height(20) + local bg = nil + if #FreeBG > 0 then + bg = tremove(FreeBG) + else + bg = CreateFrame("Frame") + end + bg:SetFixedPanelTemplate('Transparent', true) + bg:SetParent(bar) + bg:WrapOuter(bar) + bg:SetFrameLevel(bar:GetFrameLevel() - 1) + bg:SetFrameStrata(bar:GetFrameStrata()) + bg:Show() + bar:Set("bigwigs:elvui:barbg", bg) + local ibg = nil + if bar.candyBarIconFrame:GetTexture() then if #FreeBG > 0 then - bg = tremove(FreeBG) + ibg = tremove(FreeBG) else - bg = CreateFrame("Frame") - end - bg:SetFixedPanelTemplate('Transparent', true) - bg:SetParent(bar) - bg:WrapOuter(bar) - bg:SetFrameLevel(bar:GetFrameLevel() - 1) - bg:SetFrameStrata(bar:GetFrameStrata()) - bg:Show() - bar:Set("bigwigs:elvui:barbg", bg) - local ibg = nil - if bar.candyBarIconFrame:GetTexture() then - if #FreeBG > 0 then - ibg = tremove(FreeBG) - else - ibg = CreateFrame("Frame") - end - ibg:SetParent(bar) - ibg:SetFixedPanelTemplate('Transparent', true) - ibg:SetBackdropColor(0, 0, 0, 0) - ibg:WrapOuter(bar.candyBarIconFrame) - ibg:SetFrameLevel(bar:GetFrameLevel() - 1) - ibg:SetFrameStrata(bar:GetFrameStrata()) - ibg:Show() - bar:Set("bigwigs:elvui:iconbg", ibg) + ibg = CreateFrame("Frame") end - bar.candyBarLabel:SetJustifyH("LEFT") - bar.candyBarLabel:ClearAllPoints() - bar.candyBarDuration:SetJustifyH("RIGHT") - bar.candyBarDuration:ClearAllPoints() - bar.candyBarLabel:Point("LEFT", bar, "LEFT", 4, 0) - bar.candyBarDuration:Point("RIGHT", bar, "RIGHT", -4, 0) - bar.candyBarBar:ClearAllPoints() - bar.candyBarBar:SetAllPoints(bar) - bar.candyBarBar.OldSetPoint = bar.candyBarBar.SetPoint - bar.candyBarBar.SetPoint = SuperVillain.fubar - bar.candyBarIconFrame.OldSetWidth = bar.candyBarIconFrame.SetWidth - bar.candyBarIconFrame.SetWidth = SuperVillain.fubar - bar.candyBarIconFrame:ClearAllPoints() - bar.candyBarIconFrame:Point("BOTTOMRIGHT", bar, "BOTTOMLEFT", -1, 0) - bar.candyBarIconFrame:SetSize(ButtonSize, ButtonSize) - bar.candyBarIconFrame:SetTexCoord(0.1,0.9,0.1,0.9) + ibg:SetParent(bar) + ibg:SetFixedPanelTemplate('Transparent', true) + ibg:SetBackdropColor(0, 0, 0, 0) + ibg:WrapOuter(bar.candyBarIconFrame) + ibg:SetFrameLevel(bar:GetFrameLevel() - 1) + ibg:SetFrameStrata(bar:GetFrameStrata()) + ibg:Show() + bar:Set("bigwigs:elvui:iconbg", ibg) end + bar.candyBarLabel:SetJustifyH("LEFT") + bar.candyBarLabel:ClearAllPoints() + bar.candyBarDuration:SetJustifyH("RIGHT") + bar.candyBarDuration:ClearAllPoints() + bar.candyBarLabel:Point("LEFT", bar, "LEFT", 4, 0) + bar.candyBarDuration:Point("RIGHT", bar, "RIGHT", -4, 0) + bar.candyBarBar:ClearAllPoints() + bar.candyBarBar:SetAllPoints(bar) + bar.candyBarBar.OldSetPoint = bar.candyBarBar.SetPoint + bar.candyBarBar.SetPoint = SuperVillain.fubar + bar.candyBarIconFrame.OldSetWidth = bar.candyBarIconFrame.SetWidth + bar.candyBarIconFrame.SetWidth = SuperVillain.fubar + bar.candyBarIconFrame:ClearAllPoints() + bar.candyBarIconFrame:Point("BOTTOMRIGHT", bar, "BOTTOMLEFT", -1, 0) + bar.candyBarIconFrame:SetSize(20, 20) + bar.candyBarIconFrame:SetTexCoord(0.1,0.9,0.1,0.9) +end + +local function StyleBigWigs(event, addon) + assert(BigWigs, "AddOn Not Loaded") if (IsAddOnLoaded('BigWigs_Plugins') or event == "ADDON_LOADED" and addon == 'BigWigs_Plugins') then local BigWigsBars = BigWigs:GetPlugin('Bars') if BigWigsLoaded then return end @@ -135,4 +140,5 @@ local function StyleBigWigs(event, addon) STYLE:SafeEventRemoval("BigWigs", "PLAYER_ENTERING_WORLD") end end -STYLE:SaveAddonStyle("BigWigs", StyleBigWigs, "ADDON_LOADED") \ No newline at end of file + +STYLE:SaveAddonStyle("BigWigs", StyleBigWigs, nil, nil, "ADDON_LOADED") \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua index c6527af..0fe5b66 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua @@ -37,6 +37,8 @@ CLIQUE ########################################################## ]]-- local function StyleClique() + assert(CliqueDialog, "AddOn Not Loaded") + local Frames = { "CliqueDialog", "CliqueConfig", @@ -113,4 +115,5 @@ local function StyleClique() CliqueSpellTab.Panel:SetAllPoints() CliqueSpellTab:SetButtonTemplate() end + STYLE:SaveAddonStyle("Clique", StyleClique) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua index cb2ce77..8a1c7ff 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua @@ -37,6 +37,8 @@ COOLINE ########################################################## ]]-- local function StyleCoolLine() + assert(CoolLineDB, "AddOn Not Loaded") + CoolLineDB.bgcolor = { r = 0, g = 0, b = 0, a = 0, } CoolLineDB.border = "None" CoolLine.updatelook() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua index 9c711cf..54670b0 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua @@ -36,170 +36,175 @@ local STYLE = _G.StyleVillain; DBM ########################################################## ]]-- -local function StyleDBM(event, addon) - local croprwicons = true - local buttonsize = 22 - local function StyleBars(self) - for bar in self:GetBarIterator() do - if not bar.injected then - bar.ApplyStyle = function() - local frame = bar.frame - local tbar = _G[frame:GetName()..'Bar'] - local spark = _G[frame:GetName()..'BarSpark'] - local texture = _G[frame:GetName()..'BarTexture'] - local icon1 = _G[frame:GetName()..'BarIcon1'] - local icon2 = _G[frame:GetName()..'BarIcon2'] - local name = _G[frame:GetName()..'BarName'] - local timer = _G[frame:GetName()..'BarTimer'] - if not icon1.overlay then - icon1.overlay = CreateFrame('Frame', '$parentIcon1Overlay', tbar) - icon1.overlay:Size(buttonsize) - icon1.overlay:SetPanelTemplate("Button") - icon1.overlay:SetFrameLevel(0) - icon1.overlay:Point('BOTTOMRIGHT', frame, 'BOTTOMLEFT', -2, 0) - end - if not icon2.overlay then - icon2.overlay = CreateFrame('Frame', '$parentIcon2Overlay', tbar) - icon2.overlay:Size(buttonsize) - icon2.overlay:SetPanelTemplate("Button") - icon2.overlay:SetFrameLevel(0) - icon2.overlay:Point('BOTTOMLEFT', frame, 'BOTTOMRIGHT', 2, 0) - end - if bar.color then - tbar:SetStatusBarColor(bar.color.r, bar.color.g, bar.color.b) - else - tbar:SetStatusBarColor(bar.owner.options.StartColorR, bar.owner.options.StartColorG, bar.owner.options.StartColorB) - end - if bar.enlarged then - frame:SetWidth(bar.owner.options.HugeWidth) - tbar:SetWidth(bar.owner.options.HugeWidth) - frame:SetScale(bar.owner.options.HugeScale) - else - frame:SetWidth(bar.owner.options.Width) - tbar:SetWidth(bar.owner.options.Width) - frame:SetScale(bar.owner.options.Scale) - end - spark:SetAlpha(0) - spark:SetTexture(0,0,0,0) - icon1:SetTexCoord(0.1,0.9,0.1,0.9) - icon1:ClearAllPoints() - icon1:SetAllPoints(icon1.overlay) - icon2:SetTexCoord(0.1,0.9,0.1,0.9) - icon2:ClearAllPoints() - icon2:SetAllPoints(icon2.overlay) - texture:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - tbar:SetAllPoints(frame) - frame:SetPanelTemplate("Bar") - name:ClearAllPoints() - name:SetWidth(165) - name:SetHeight(8) - name:SetJustifyH('LEFT') - name:SetShadowColor(0, 0, 0, 0) - timer:ClearAllPoints() - timer:SetJustifyH('RIGHT') - timer:SetShadowColor(0, 0, 0, 0) - frame:SetHeight(buttonsize) - name:Point('LEFT', frame, 'LEFT', 4, 0) - timer:Point('RIGHT', frame, 'RIGHT', -4, 0) - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - name:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) - timer:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) - if bar.owner.options.IconLeft then icon1:Show() icon1.overlay:Show() else icon1:Hide() icon1.overlay:Hide() end - if bar.owner.options.IconRight then icon2:Show() icon2.overlay:Show() else icon2:Hide() icon2.overlay:Hide() end - tbar:SetAlpha(1) - frame:SetAlpha(1) - texture:SetAlpha(1) - frame:Show() - bar:Update(0) - bar.injected = true +local function StyleBars(self) + for bar in self:GetBarIterator() do + if not bar.injected then + bar.ApplyStyle = function() + local frame = bar.frame + local tbar = _G[frame:GetName()..'Bar'] + local spark = _G[frame:GetName()..'BarSpark'] + local texture = _G[frame:GetName()..'BarTexture'] + local icon1 = _G[frame:GetName()..'BarIcon1'] + local icon2 = _G[frame:GetName()..'BarIcon2'] + local name = _G[frame:GetName()..'BarName'] + local timer = _G[frame:GetName()..'BarTimer'] + if not icon1.overlay then + icon1.overlay = CreateFrame('Frame', '$parentIcon1Overlay', tbar) + icon1.overlay:Size(22) + icon1.overlay:SetPanelTemplate("Button") + icon1.overlay:SetFrameLevel(0) + icon1.overlay:Point('BOTTOMRIGHT', frame, 'BOTTOMLEFT', -2, 0) + end + if not icon2.overlay then + icon2.overlay = CreateFrame('Frame', '$parentIcon2Overlay', tbar) + icon2.overlay:Size(22) + icon2.overlay:SetPanelTemplate("Button") + icon2.overlay:SetFrameLevel(0) + icon2.overlay:Point('BOTTOMLEFT', frame, 'BOTTOMRIGHT', 2, 0) + end + if bar.color then + tbar:SetStatusBarColor(bar.color.r, bar.color.g, bar.color.b) + else + tbar:SetStatusBarColor(bar.owner.options.StartColorR, bar.owner.options.StartColorG, bar.owner.options.StartColorB) end - bar:ApplyStyle() + if bar.enlarged then + frame:SetWidth(bar.owner.options.HugeWidth) + tbar:SetWidth(bar.owner.options.HugeWidth) + frame:SetScale(bar.owner.options.HugeScale) + else + frame:SetWidth(bar.owner.options.Width) + tbar:SetWidth(bar.owner.options.Width) + frame:SetScale(bar.owner.options.Scale) + end + spark:SetAlpha(0) + spark:SetTexture(0,0,0,0) + icon1:SetTexCoord(0.1,0.9,0.1,0.9) + icon1:ClearAllPoints() + icon1:SetAllPoints(icon1.overlay) + icon2:SetTexCoord(0.1,0.9,0.1,0.9) + icon2:ClearAllPoints() + icon2:SetAllPoints(icon2.overlay) + texture:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + tbar:SetAllPoints(frame) + frame:SetPanelTemplate("Bar") + name:ClearAllPoints() + name:SetWidth(165) + name:SetHeight(8) + name:SetJustifyH('LEFT') + name:SetShadowColor(0, 0, 0, 0) + timer:ClearAllPoints() + timer:SetJustifyH('RIGHT') + timer:SetShadowColor(0, 0, 0, 0) + frame:SetHeight(22) + name:Point('LEFT', frame, 'LEFT', 4, 0) + timer:Point('RIGHT', frame, 'RIGHT', -4, 0) + name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + name:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) + timer:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) + if bar.owner.options.IconLeft then icon1:Show() icon1.overlay:Show() else icon1:Hide() icon1.overlay:Hide() end + if bar.owner.options.IconRight then icon2:Show() icon2.overlay:Show() else icon2:Hide() icon2.overlay:Hide() end + tbar:SetAlpha(1) + frame:SetAlpha(1) + texture:SetAlpha(1) + frame:Show() + bar:Update(0) + bar.injected = true end + bar:ApplyStyle() end end - local StyleBossTitle = function() - local anchor = DBMBossHealthDropdown:GetParent() - if not anchor.styled then - local header = {anchor:GetRegions()} - if header[1]:IsObjectType('FontString') then - header[1]:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - header[1]:SetTextColor(1, 1, 1) - header[1]:SetShadowColor(0, 0, 0, 0) - anchor.styled = true - end - header = nil +end + +local StyleBossTitle = function() + local anchor = DBMBossHealthDropdown:GetParent() + if not anchor.styled then + local header = {anchor:GetRegions()} + if header[1]:IsObjectType('FontString') then + header[1]:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + header[1]:SetTextColor(1, 1, 1) + header[1]:SetShadowColor(0, 0, 0, 0) + anchor.styled = true end - anchor = nil + header = nil end - local StyleBoss = function() - local count = 1 - while _G[format('DBM_BossHealth_Bar_%d', count)] do - local bar = _G[format('DBM_BossHealth_Bar_%d', count)] - local background = _G[bar:GetName()..'BarBorder'] - local progress = _G[bar:GetName()..'Bar'] - local name = _G[bar:GetName()..'BarName'] - local timer = _G[bar:GetName()..'BarTimer'] - local prev = _G[format('DBM_BossHealth_Bar_%d', count-1)] - local _, anch, _ ,_, _ = bar:GetPoint() - bar:ClearAllPoints() - if count == 1 then - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point('BOTTOM', anch, 'TOP' , 0 , 12) - else - bar:Point('TOP', anch, 'BOTTOM' , 0, -buttonsize) - end + anchor = nil +end + +local StyleBoss = function() + local count = 1 + while _G[format('DBM_BossHealth_Bar_%d', count)] do + local bar = _G[format('DBM_BossHealth_Bar_%d', count)] + local background = _G[bar:GetName()..'BarBorder'] + local progress = _G[bar:GetName()..'Bar'] + local name = _G[bar:GetName()..'BarName'] + local timer = _G[bar:GetName()..'BarTimer'] + local prev = _G[format('DBM_BossHealth_Bar_%d', count-1)] + local _, anch, _ ,_, _ = bar:GetPoint() + bar:ClearAllPoints() + if count == 1 then + if DBM_SavedOptions.HealthFrameGrowUp then + bar:Point('BOTTOM', anch, 'TOP' , 0 , 12) else - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, buttonsize + 4) - else - bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, -(buttonsize + 4)) - end + bar:Point('TOP', anch, 'BOTTOM' , 0, -22) + end + else + if DBM_SavedOptions.HealthFrameGrowUp then + bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, 22 + 4) + else + bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, -(22 + 4)) end - bar:SetFixedPanelTemplate('Transparent') - background:SetNormalTexture(nil) - progress:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - progress:ClearAllPoints() - progress:FillInner(bar) - name:ClearAllPoints() - name:SetJustifyH('LEFT') - name:SetShadowColor(0, 0, 0, 0) - timer:ClearAllPoints() - timer:SetJustifyH('RIGHT') - timer:SetShadowColor(0, 0, 0, 0) - bar:SetHeight(buttonsize) - name:Point('LEFT', bar, 'LEFT', 4, 0) - timer:Point('RIGHT', bar, 'RIGHT', -4, 0) - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - count = count + 1 end + bar:SetFixedPanelTemplate('Transparent') + background:SetNormalTexture(nil) + progress:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + progress:ClearAllPoints() + progress:FillInner(bar) + name:ClearAllPoints() + name:SetJustifyH('LEFT') + name:SetShadowColor(0, 0, 0, 0) + timer:ClearAllPoints() + timer:SetJustifyH('RIGHT') + timer:SetShadowColor(0, 0, 0, 0) + bar:SetHeight(22) + name:Point('LEFT', bar, 'LEFT', 4, 0) + timer:Point('RIGHT', bar, 'RIGHT', -4, 0) + name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + count = count + 1 end +end + +local function StyleDBM(event, addon) + assert(DBM, "AddOn Not Loaded") + hooksecurefunc(DBT, 'CreateBar', StyleBars) hooksecurefunc(DBM.BossHealth, 'Show', StyleBossTitle) hooksecurefunc(DBM.BossHealth, 'AddBoss', StyleBoss) hooksecurefunc(DBM.BossHealth, 'UpdateSettings', StyleBoss) + if not DBM_SavedOptions['DontShowRangeFrame'] then DBM.RangeCheck:Show() DBM.RangeCheck:Hide() DBMRangeCheck:HookScript('OnShow', function(self) self:SetFixedPanelTemplate('Transparent') end) DBMRangeCheckRadar:SetFixedPanelTemplate('Transparent') end + if not DBM_SavedOptions['DontShowInfoFrame'] then DBM.InfoFrame:Show(5, 'test') DBM.InfoFrame:Hide() DBMInfoFrame:HookScript('OnShow', function(self) self:SetFixedPanelTemplate('Transparent') end) end - if croprwicons then - local RaidNotice_AddMessage_ = RaidNotice_AddMessage - RaidNotice_AddMessage = function(noticeFrame, textString, colorInfo) - if textString:find(' |T') then - textString = gsub(textString,'(:12:12)',':18:18:0:0:64:64:5:59:5:59') - end - return RaidNotice_AddMessage_(noticeFrame, textString, colorInfo) + + local RaidNotice_AddMessage_ = RaidNotice_AddMessage + RaidNotice_AddMessage = function(noticeFrame, textString, colorInfo) + if textString:find(' |T') then + textString = gsub(textString,'(:12:12)',':18:18:0:0:64:64:5:59:5:59') end + return RaidNotice_AddMessage_(noticeFrame, textString, colorInfo) end - STYLE:SafeEventRemoval("DBM-Core", event) + + STYLE:SafeEventRemoval("DBM", event) end -STYLE:SaveAddonStyle("DBM-Core", StyleDBM, false, false, "PLAYER_ENTERING_WORLD", "ADDON_LOADED") \ No newline at end of file +STYLE:SaveAddonStyle("DBM", StyleDBM, false, false, "PLAYER_ENTERING_WORLD", "ADDON_LOADED") \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua index c6e53c5..38c03e4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua @@ -39,35 +39,56 @@ local playerKey = ("%s - %s"):format(playerName, playerRealm) DXE ########################################################## ]]-- +local function StyleDXEBar(bar) + bar:SetFixedPanelTemplate("Transparent") + bar.bg:SetTexture(0,0,0,0) + bar.border.Show = SuperVillain.fubar + bar.border:Hide() + bar.statusbar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + bar.statusbar:ClearAllPoints() + bar.statusbar:FillInner() + bar.righticon:SetFixedPanelTemplate("Default") + bar.righticon.border.Show = SuperVillain.fubar + bar.righticon.border:Hide() + bar.righticon:ClearAllPoints() + bar.righticon:SetPoint("LEFT", bar, "RIGHT", 2, 0) + bar.righticon.t:SetTexCoord(0.1,0.9,0.1,0.9) + bar.righticon.t:ClearAllPoints() + bar.righticon.t:FillInner() + bar.righticon.t:SetDrawLayer("ARTWORK") + bar.lefticon:SetFixedPanelTemplate("Default") + bar.lefticon.border.Show = SuperVillain.fubar + bar.lefticon.border:Hide() + bar.lefticon:ClearAllPoints() + bar.lefticon:SetPoint("RIGHT", bar, "LEFT", -2, 0) + bar.lefticon.t:SetTexCoord(0.1,0.9,0.1,0.9) + bar.lefticon.t:ClearAllPoints() + bar.lefticon.t:FillInner() + bar.lefticon.t:SetDrawLayer("ARTWORK") +end + +local function RefreshDXEBars(frame) + if frame.refreshing then return end + frame.refreshing = true + local i = 1 + while _G["DXEAlertBar"..i] do + local bar = _G["DXEAlertBar"..i] + if not bar.styled then + bar:SetScale(1) + bar.SetScale = SuperVillain.fubar + StyleDXEBar(bar) + bar.styled = true + end + i = i + 1 + end + frame.refreshing = false +end + LoadAddOn("DXE") + local function StyleDXE() - local function StyleDXEBar(bar) - bar:SetFixedPanelTemplate("Transparent") - bar.bg:SetTexture(0,0,0,0) - bar.border.Show = SuperVillain.fubar - bar.border:Hide() - bar.statusbar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - bar.statusbar:ClearAllPoints() - bar.statusbar:FillInner() - bar.righticon:SetFixedPanelTemplate("Default") - bar.righticon.border.Show = SuperVillain.fubar - bar.righticon.border:Hide() - bar.righticon:ClearAllPoints() - bar.righticon:SetPoint("LEFT", bar, "RIGHT", 2, 0) - bar.righticon.t:SetTexCoord(0.1,0.9,0.1,0.9) - bar.righticon.t:ClearAllPoints() - bar.righticon.t:FillInner() - bar.righticon.t:SetDrawLayer("ARTWORK") - bar.lefticon:SetFixedPanelTemplate("Default") - bar.lefticon.border.Show = SuperVillain.fubar - bar.lefticon.border:Hide() - bar.lefticon:ClearAllPoints() - bar.lefticon:SetPoint("RIGHT", bar, "LEFT", -2, 0) - bar.lefticon.t:SetTexCoord(0.1,0.9,0.1,0.9) - bar.lefticon.t:ClearAllPoints() - bar.lefticon.t:FillInner() - bar.lefticon.t:SetDrawLayer("ARTWORK") - end + assert(DXE, "AddOn Not Loaded") + DXE.LayoutHealthWatchers_ = DXE.LayoutHealthWatchers DXE.LayoutHealthWatchers = function(frame) DXE:LayoutHealthWatchers_() @@ -80,24 +101,10 @@ local function StyleDXE() end end end - local function RefreshDXEBars(frame) - if frame.refreshing then return end - frame.refreshing = true - local i = 1 - while _G["DXEAlertBar"..i] do - local bar = _G["DXEAlertBar"..i] - if not bar.styled then - bar:SetScale(1) - bar.SetScale = SuperVillain.fubar - StyleDXEBar(bar) - bar.styled = true - end - i = i + 1 - end - frame.refreshing = false - end + local DXEAlerts = DXE:GetModule("Alerts") local frame = CreateFrame("Frame") + frame.elapsed = 1 frame:SetScript("OnUpdate", function(frame,elapsed) frame.elapsed = frame.elapsed + elapsed @@ -106,14 +113,17 @@ local function StyleDXE() frame.elapsed = 0 end end) + hooksecurefunc(DXEAlerts, "Simple", RefreshDXEBars) hooksecurefunc(DXEAlerts, "RefreshBars", RefreshDXEBars) DXE:LayoutHealthWatchers() DXE.Alerts:RefreshBars() + if not DXEDB then DXEDB = {} end if not DXEDB["profiles"] then DXEDB["profiles"] = {} end if not DXEDB["profiles"][playerKey] then DXEDB["profiles"][playerKey] = {} end if not DXEDB["profiles"][playerKey]["Globals"] then DXEDB["profiles"][playerKey]["Globals"] = {} end + DXEDB["profiles"][playerKey]["Globals"]["BackgroundTexture"] = [[Interface\BUTTONS\WHITE8X8]] DXEDB["profiles"][playerKey]["Globals"]["BarTexture"] = [[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]] DXEDB["profiles"][playerKey]["Globals"]["Border"] = "None" diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua index 697364e..126e8f3 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua @@ -52,31 +52,37 @@ local function DoDis(self, elapsed) end local function StyleLightHeaded() + assert(LightHeadedFrame, "AddOn Not Loaded") + + local lhframe = _G["LightHeadedFrame"] + local lhsub = _G["LightHeadedFrameSub"] + local lhopts = _G["LightHeaded_Panel"] + STYLE:ApplyFrameStyle(LightHeadedFrame) STYLE:ApplyFrameStyle(LightHeadedFrameSub) STYLE:ApplyFrameStyle(LightHeadedSearchBox) STYLE:ApplyTooltipStyle(LightHeadedTooltip) LightHeadedScrollFrame:Formula409() - local lhframe = LightHeadedFrame + lhframe.close:Hide() STYLE:ApplyCloseButtonStyle(lhframe.close) lhframe.handle:Hide() - local lhframe = LightHeadedFrameSub - STYLE:ApplyPaginationStyle(lhframe.prev) - STYLE:ApplyPaginationStyle(lhframe.next) - lhframe.prev:SetWidth(16) - lhframe.prev:SetHeight(16) - lhframe.next:SetWidth(16) - lhframe.next:SetHeight(16) - lhframe.prev:SetPoint("RIGHT", lhframe.page, "LEFT", -25, 0) - lhframe.next:SetPoint("LEFT", lhframe.page, "RIGHT", 25, 0) + + STYLE:ApplyPaginationStyle(lhsub.prev) + STYLE:ApplyPaginationStyle(lhsub.next) + lhsub.prev:SetWidth(16) + lhsub.prev:SetHeight(16) + lhsub.next:SetWidth(16) + lhsub.next:SetHeight(16) + lhsub.prev:SetPoint("RIGHT", lhsub.page, "LEFT", -25, 0) + lhsub.next:SetPoint("LEFT", lhsub.page, "RIGHT", 25, 0) STYLE:ApplyScrollStyle(LightHeadedScrollFrameScrollBar, 5) - lhframe.title:SetTextColor(23/255, 132/255, 209/255) - local LH_OnLoad = _G["LightHeadedFrame"] - LH_OnLoad.timeLapse = 0; - LH_OnLoad:SetScript("OnUpdate", DoDis) - local LH_Options = _G["LightHeaded_Panel"] - if LH_Options:IsVisible() then + lhsub.title:SetTextColor(23/255, 132/255, 209/255) + + lhframe.timeLapse = 0; + lhframe:SetScript("OnUpdate", DoDis) + + if lhopts:IsVisible() then for i = 1, 9 do local cbox = _G["LightHeaded_Panel_Toggle"..i] cbox:SetCheckboxTemplate(true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua index e64eb74..2b073ea 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua @@ -36,41 +36,45 @@ local STYLE = _G.StyleVillain; MOGIT ########################################################## ]]-- +local function StyleMogItPreview() + for i = 1, 99 do + local MogItGearSlots = { + "HeadSlot", + "ShoulderSlot", + "BackSlot", + "ChestSlot", + "ShirtSlot", + "TabardSlot", + "WristSlot", + "HandsSlot", + "WaistSlot", + "LegsSlot", + "FeetSlot", + "MainHandSlot", + "SecondaryHandSlot", + } + for _, object in pairs(MogItGearSlots) do + if _G["MogItPreview"..i..object] then + STYLE:ApplyLinkButtonStyle(_G["MogItPreview"..i..object]) + _G["MogItPreview"..i..object]:SetPushedTexture(nil) + _G["MogItPreview"..i..object]:SetHighlightTexture(nil) + end + end + if _G["MogItPreview"..i] then STYLE:ApplyFrameStyle(_G["MogItPreview"..i]) end + if _G["MogItPreview"..i.."CloseButton"] then STYLE:ApplyCloseButtonStyle(_G["MogItPreview"..i.."CloseButton"]) end + if _G["MogItPreview"..i.."Inset"] then _G["MogItPreview"..i.."Inset"]:Formula409(true) end + if _G["MogItPreview"..i.."Activate"] then _G["MogItPreview"..i.."Activate"]:SetButtonTemplate() end + end +end + local function StyleMogIt() + assert(MogItFrame, "AddOn Not Loaded") + STYLE:ApplyFrameStyle(MogItFrame) MogItFrameInset:Formula409(true) STYLE:ApplyFrameStyle(MogItFilters) MogItFiltersInset:Formula409(true) - local function StyleMogItPreview() - for i = 1, 99 do - local MogItGearSlots = { - "HeadSlot", - "ShoulderSlot", - "BackSlot", - "ChestSlot", - "ShirtSlot", - "TabardSlot", - "WristSlot", - "HandsSlot", - "WaistSlot", - "LegsSlot", - "FeetSlot", - "MainHandSlot", - "SecondaryHandSlot", - } - for _, object in pairs(MogItGearSlots) do - if _G["MogItPreview"..i..object] then - STYLE:ApplyLinkButtonStyle(_G["MogItPreview"..i..object]) - _G["MogItPreview"..i..object]:SetPushedTexture(nil) - _G["MogItPreview"..i..object]:SetHighlightTexture(nil) - end - end - if _G["MogItPreview"..i] then STYLE:ApplyFrameStyle(_G["MogItPreview"..i]) end - if _G["MogItPreview"..i.."CloseButton"] then STYLE:ApplyCloseButtonStyle(_G["MogItPreview"..i.."CloseButton"]) end - if _G["MogItPreview"..i.."Inset"] then _G["MogItPreview"..i.."Inset"]:Formula409(true) end - if _G["MogItPreview"..i.."Activate"] then _G["MogItPreview"..i.."Activate"]:SetButtonTemplate() end - end - end + hooksecurefunc(MogIt, "CreatePreview", StyleMogItPreview) STYLE:ApplyTooltipStyle(MogItTooltip) STYLE:ApplyCloseButtonStyle(MogItFrameCloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua index e14bf1b..e8af2eb 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua @@ -37,6 +37,8 @@ OMEN ########################################################## ]]-- local function StyleOmen() + assert(Omen, "AddOn Not Loaded") + Omen.db.profile.Scale = 1 Omen.db.profile.Bar.Spacing = 1 Omen.db.profile.Background.EdgeSize = 2 diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua index 5ffb382..8acfaf2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua @@ -37,6 +37,8 @@ OUTFITTER ########################################################## ]]-- local function StyleOutfitter() + assert(OutfitterFrame, "AddOn Not Loaded") + CharacterFrame:HookScript("OnShow", function(self) PaperDollSidebarTabs:SetPoint("BOTTOMRIGHT", CharacterFrameInsetRight, "TOPRIGHT", -14, 0) end) OutfitterFrame:HookScript("OnShow", function(self) STYLE:ApplyFrameStyle(OutfitterFrame) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua index 189ed2a..62cbed9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua @@ -37,8 +37,11 @@ POSTAL ########################################################## ]]-- local function StylePostal() + assert(PostalOpenAllButton, "AddOn Not Loaded") + InboxPrevPageButton:Point("CENTER", InboxFrame, "BOTTOMLEFT", 45, 112) InboxNextPageButton:Point("CENTER", InboxFrame, "BOTTOMLEFT", 295, 112) + for i = 1, INBOXITEMS_TO_DISPLAY do local b = _G["MailItem"..i.."ExpireTime"] b:SetPoint("TOPRIGHT", "MailItem"..i, "TOPRIGHT", -5, -10) @@ -81,4 +84,4 @@ local function StylePostal() Postal_BlackBookButton:SetPoint('LEFT', SendMailNameEditBox, 'RIGHT', 5, 2) end end -STYLE:SaveAddonStyle("Postal", StylePostal, 'MAIL_SHOW') \ No newline at end of file +STYLE:SaveAddonStyle("Postal", StylePostal, nil, nil, 'MAIL_SHOW') \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua index 78e4692..59a9487 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua @@ -39,7 +39,10 @@ QUARTZ local function StyleQuartz() local AceAddon = LibStub("AceAddon-3.0") if(not AceAddon) then return end - local Quartz3 = AceAddon:GetAddon("Quartz3") + local Quartz3 = AceAddon:GetAddon("Quartz3", true) + + assert(Quartz3, "AddOn Not Loaded") + local GCD = Quartz3:GetModule("GCD") local CastBar = Quartz3.CastBarTemplate.template local function StyleQuartzBar(self) @@ -57,9 +60,11 @@ local function StyleQuartz() self.IconBorder:Show() end end + hooksecurefunc(CastBar, 'ApplySettings', StyleQuartzBar) hooksecurefunc(CastBar, 'UNIT_SPELLCAST_START', StyleQuartzBar) hooksecurefunc(CastBar, 'UNIT_SPELLCAST_CHANNEL_START', StyleQuartzBar) + if GCD then hooksecurefunc(GCD, 'CheckGCD', function() if not Quartz3GCDBar.backdrop then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua index b1e52bc..736a240 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua @@ -50,7 +50,8 @@ local function NoColor(a) end; local function StyleRecount() - + assert(Recount, "AddOn Not Loaded") + function Recount:ShowReset() STYLE:LoadAlert(L['Reset Recount?'], function(self) Recount:ResetData() self:GetParent():Hide() end) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua index 90e55f8..09ed020 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua @@ -36,52 +36,59 @@ local STYLE = _G.StyleVillain; SEXYCOOLDOWN ########################################################## ]]-- -local function StyleSexyCooldown() - local function SCDStripStyleSettings(bar) - bar.optionsTable.args.icon.args.borderheader = nil - bar.optionsTable.args.icon.args.border = nil - bar.optionsTable.args.icon.args.borderColor = nil - bar.optionsTable.args.icon.args.borderSize = nil - bar.optionsTable.args.icon.args.borderInset = nil - bar.optionsTable.args.bar.args.bnbheader = nil - bar.optionsTable.args.bar.args.texture = nil - bar.optionsTable.args.bar.args.backgroundColor = nil - bar.optionsTable.args.bar.args.border = nil - bar.optionsTable.args.bar.args.borderColor = nil - bar.optionsTable.args.bar.args.borderSize = nil - bar.optionsTable.args.bar.args.borderInset = nil - end - local function StyleSexyCooldownBar(bar) - SCDStripStyleSettings(bar) - STYLE:ApplyFrameStyle(bar) - SuperVillain:AddToDisplayAudit(bar) - if STYLE:IsAddonReady("DockletSexyCooldown") then - bar:ClearAllPoints() - bar:Point('BOTTOMRIGHT', SVUI_ActionBar1, 'TOPRIGHT', 0, 2) - bar:Point("BOTTOMLEFT", SVUI_ActionBar1, "TOPLEFT", 0, 2) - bar:SetHeight(SVUI_ActionBar1Button1:GetHeight()) - end - end - local function StyleSexyCooldownIcon(bar, icon) - if not icon.styled then - STYLE:ApplyFrameStyle(icon, false, true) - STYLE:ApplyFrameStyle(icon.overlay,"Transparent",true) - icon.styled = true - end - icon.overlay.tex:SetTexCoord(0.1,0.9,0.1,0.9) - icon.tex:SetTexCoord(0.1,0.9,0.1,0.9) - end - local function StyleSexyCooldownBackdrop(bar) - bar:SetFixedPanelTemplate("Transparent") +local function SCDStripStyleSettings(bar) + bar.optionsTable.args.icon.args.borderheader = nil + bar.optionsTable.args.icon.args.border = nil + bar.optionsTable.args.icon.args.borderColor = nil + bar.optionsTable.args.icon.args.borderSize = nil + bar.optionsTable.args.icon.args.borderInset = nil + bar.optionsTable.args.bar.args.bnbheader = nil + bar.optionsTable.args.bar.args.texture = nil + bar.optionsTable.args.bar.args.backgroundColor = nil + bar.optionsTable.args.bar.args.border = nil + bar.optionsTable.args.bar.args.borderColor = nil + bar.optionsTable.args.bar.args.borderSize = nil + bar.optionsTable.args.bar.args.borderInset = nil +end + +local function StyleSexyCooldownBar(bar) + SCDStripStyleSettings(bar) + STYLE:ApplyFrameStyle(bar) + SuperVillain:AddToDisplayAudit(bar) + if STYLE:IsAddonReady("DockletSexyCooldown") then + bar:ClearAllPoints() + bar:Point('BOTTOMRIGHT', SVUI_ActionBar1, 'TOPRIGHT', 0, 2) + bar:Point("BOTTOMLEFT", SVUI_ActionBar1, "TOPLEFT", 0, 2) + bar:SetHeight(SVUI_ActionBar1Button1:GetHeight()) end - local function HookSCDBar(bar) - if bar.hooked then return end - hooksecurefunc(bar, "UpdateBarLook", StyleSexyCooldownBar) - hooksecurefunc(bar, "UpdateSingleIconLook", StyleSexyCooldownIcon) - hooksecurefunc(bar, "UpdateBarBackdrop", StyleSexyCooldownBackdrop) - bar.settings.icon.borderInset = 0 - bar.hooked = true +end + +local function StyleSexyCooldownIcon(bar, icon) + if not icon.styled then + STYLE:ApplyFrameStyle(icon, false, true) + STYLE:ApplyFrameStyle(icon.overlay,"Transparent",true) + icon.styled = true end + icon.overlay.tex:SetTexCoord(0.1,0.9,0.1,0.9) + icon.tex:SetTexCoord(0.1,0.9,0.1,0.9) +end + +local function StyleSexyCooldownBackdrop(bar) + bar:SetFixedPanelTemplate("Transparent") +end + +local function HookSCDBar(bar) + if bar.hooked then return end + hooksecurefunc(bar, "UpdateBarLook", StyleSexyCooldownBar) + hooksecurefunc(bar, "UpdateSingleIconLook", StyleSexyCooldownIcon) + hooksecurefunc(bar, "UpdateBarBackdrop", StyleSexyCooldownBackdrop) + bar.settings.icon.borderInset = 0 + bar.hooked = true +end + +local function StyleSexyCooldown() + assert(SexyCooldown2, "AddOn Not Loaded") + for _, bar in ipairs(SexyCooldown2.bars) do HookSCDBar(bar) bar:UpdateBarLook() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua index dde4bc7..00dd257 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua @@ -72,6 +72,8 @@ local function skada_panel_loader(holder, window, parent) end local function StyleSkada() + assert(Skada, "AddOn Not Loaded") + if(not SkadaHolder) then local SkadaHolder = CreateFrame("Frame", "SkadaHolder", UIParent) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua index 2d7a62d..493fa90 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua @@ -37,17 +37,22 @@ TINYDPS ########################################################## ]]-- local function StyleTinyDPS() + assert(tdpsFrame, "AddOn Not Loaded") + STYLE:ApplyFrameStyle(tdpsFrame) + tdpsFrame:HookScript("OnShow", function() if InCombatLockdown() then return end; if SuperVillain.CurrentlyDocked["tdpsFrame"] then SuperDockWindowRight:Show() end - end) + end) + if tdpsStatusBar then tdpsStatusBar:SetBackdrop({bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]], edgeFile = S.Blank, tile = false, tileSize = 0, edgeSize = 1}) tdpsStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) end + tdpsRefresh() end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua index 3d35340..91df25e 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua @@ -37,8 +37,7 @@ TOMTOM ########################################################## ]]-- local function StyleTomTom() - if TomTomBlock then - STYLE:ApplyFrameStyle(TomTomBlock) - end + assert(TomTomBlock, "AddOn Not Loaded") + STYLE:ApplyFrameStyle(TomTomBlock) end STYLE:SaveAddonStyle("TomTom", StyleTomTom) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua index 73c6b44..9ba5cf9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua @@ -37,6 +37,8 @@ TSDW ########################################################## ]]-- local function StyleTradeSkillDW() + assert(TradeSkillDW_QueueFrame, "AddOn Not Loaded") + TradeSkillFrame:SetPanelTemplate("Action") TradeSkillListScrollFrame:Formula409(true) TradeSkillDetailScrollFrame:Formula409(true) @@ -114,8 +116,11 @@ local function StyleTradeSkillDW() _G["TradeSkillReagent"..i.."NameFrame"]:MUNG() end end) + TradeSkillDW_QueueFrame:HookScript("OnShow", function() STYLE:ApplyFrameStyle(TradeSkillDW_QueueFrame,"Transparent") end) + STYLE:ApplyCloseButtonStyle(TradeSkillDW_QueueFrameCloseButton) + TradeSkillDW_QueueFrameInset:Formula409() TradeSkillDW_QueueFrameClear:SetButtonTemplate() TradeSkillDW_QueueFrameDown:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua index cf5721a..da72f35 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua @@ -36,183 +36,200 @@ local STYLE = _G.StyleVillain; VEM ########################################################## ]]-- -local function StyleVEM(event, addon) - if event == 'PLAYER_ENTERING_WORLD' then - local croprwicons = true - local buttonsize = 22 - local function StyleBars(self) - for bar in self:GetBarIterator() do - if not bar.injected then - bar.ApplyStyle = function() - local frame = bar.frame - local tbar = _G[frame:GetName()..'Bar'] - local spark = _G[frame:GetName()..'BarSpark'] - local texture = _G[frame:GetName()..'BarTexture'] - local icon1 = _G[frame:GetName()..'BarIcon1'] - local icon2 = _G[frame:GetName()..'BarIcon2'] - local name = _G[frame:GetName()..'BarName'] - local timer = _G[frame:GetName()..'BarTimer'] - if not icon1.overlay then - icon1.overlay = CreateFrame('Frame', '$parentIcon1Overlay', tbar) - icon1.overlay:SetFixedPanelTemplate() - icon1.overlay:SetFrameLevel(0) - icon1.overlay:Size(buttonsize) - icon1.overlay:Point('BOTTOMRIGHT', frame, 'BOTTOMLEFT', -2, 0) - end - if not icon2.overlay then - icon2.overlay = CreateFrame('Frame', '$parentIcon2Overlay', tbar) - icon2.overlay:SetFixedPanelTemplate() - icon2.overlay:SetFrameLevel(0) - icon2.overlay:Size(buttonsize) - icon2.overlay:Point('BOTTOMLEFT', frame, 'BOTTOMRIGHT', 2, 0) - end - if bar.color then - tbar:SetStatusBarColor(bar.color.r, bar.color.g, bar.color.b) - else - tbar:SetStatusBarColor(bar.owner.options.StartColorR, bar.owner.options.StartColorG, bar.owner.options.StartColorB) - end - if bar.enlarged then - frame:SetWidth(bar.owner.options.HugeWidth) - tbar:SetWidth(bar.owner.options.HugeWidth) - frame:SetScale(bar.owner.options.HugeScale) - else - frame:SetWidth(bar.owner.options.Width) - tbar:SetWidth(bar.owner.options.Width) - frame:SetScale(bar.owner.options.Scale) - end - spark:SetAlpha(0) - spark:SetTexture(0,0,0,0) - icon1:SetTexCoord(0.1,0.9,0.1,0.9) - icon1:ClearAllPoints() - icon1:FillInner(icon1.overlay) - icon2:SetTexCoord(0.1,0.9,0.1,0.9) - icon2:ClearAllPoints() - icon2:FillInner(icon2.overlay) - texture:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - tbar:FillInner(frame) - frame:SetFixedPanelTemplate() - name:ClearAllPoints() - name:SetWidth(165) - name:SetHeight(8) - name:SetJustifyH('LEFT') - name:SetShadowColor(0, 0, 0, 0) - timer:ClearAllPoints() - timer:SetJustifyH('RIGHT') - timer:SetShadowColor(0, 0, 0, 0) - if STYLE:IsAddonReady('DBMHalfBar') then - frame:SetHeight(buttonsize / 3) - name:Point('BOTTOMLEFT', frame, 'TOPLEFT', 0, 4) - timer:Point('BOTTOMRIGHT', frame, 'TOPRIGHT', -1, 2) - else - frame:SetHeight(buttonsize) - name:Point('LEFT', frame, 'LEFT', 4, 0) - timer:Point('RIGHT', frame, 'RIGHT', -4, 0) - end - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - name:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) - timer:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) - if bar.owner.options.IconLeft then icon1:Show() icon1.overlay:Show() else icon1:Hide() icon1.overlay:Hide() end - if bar.owner.options.IconRight then icon2:Show() icon2.overlay:Show() else icon2:Hide() icon2.overlay:Hide() end - tbar:SetAlpha(1) - frame:SetAlpha(1) - texture:SetAlpha(1) - frame:Show() - bar:Update(0) - bar.injected = true - end - bar:ApplyStyle() +local RaidNotice_AddMessage_ = RaidNotice_AddMessage +local NewHook = hooksecurefunc + +local function StyleBars(self) + for bar in self:GetBarIterator() do + if not bar.injected then + bar.ApplyStyle = function() + local frame = bar.frame + local tbar = _G[frame:GetName()..'Bar'] + local spark = _G[frame:GetName()..'BarSpark'] + local texture = _G[frame:GetName()..'BarTexture'] + local icon1 = _G[frame:GetName()..'BarIcon1'] + local icon2 = _G[frame:GetName()..'BarIcon2'] + local name = _G[frame:GetName()..'BarName'] + local timer = _G[frame:GetName()..'BarTimer'] + + if not icon1.overlay then + icon1.overlay = CreateFrame('Frame', '$parentIcon1Overlay', tbar) + icon1.overlay:SetFixedPanelTemplate() + icon1.overlay:SetFrameLevel(0) + icon1.overlay:Size(22) + icon1.overlay:Point('BOTTOMRIGHT', frame, 'BOTTOMLEFT', -2, 0) end - end - end - local StyleBossTitle = function() - local anchor = VEMBossHealthDropdown:GetParent() - if not anchor.styled then - local header = {anchor:GetRegions()} - if header[1]:IsObjectType('FontString') then - header[1]:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - header[1]:SetTextColor(1, 1, 1) - header[1]:SetShadowColor(0, 0, 0, 0) - anchor.styled = true + if not icon2.overlay then + icon2.overlay = CreateFrame('Frame', '$parentIcon2Overlay', tbar) + icon2.overlay:SetFixedPanelTemplate() + icon2.overlay:SetFrameLevel(0) + icon2.overlay:Size(22) + icon2.overlay:Point('BOTTOMLEFT', frame, 'BOTTOMRIGHT', 2, 0) end - header = nil - end - anchor = nil - end - local StyleBoss = function() - local count = 1 - while _G[format('VEM_BossHealth_Bar_%d', count)] do - local bar = _G[format('VEM_BossHealth_Bar_%d', count)] - local background = _G[bar:GetName()..'BarBorder'] - local progress = _G[bar:GetName()..'Bar'] - local name = _G[bar:GetName()..'BarName'] - local timer = _G[bar:GetName()..'BarTimer'] - local prev = _G[format('VEM_BossHealth_Bar_%d', count-1)] - local _, anch, _ ,_, _ = bar:GetPoint() - bar:ClearAllPoints() - if count == 1 then - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point('BOTTOM', anch, 'TOP' , 0 , 12) - else - bar:Point('TOP', anch, 'BOTTOM' , 0, -buttonsize) - end + + if bar.color then + tbar:SetStatusBarColor(bar.color.r, bar.color.g, bar.color.b) else - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, buttonsize + 4) - else - bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, -(buttonsize + 4)) - end + tbar:SetStatusBarColor(bar.owner.options.StartColorR, bar.owner.options.StartColorG, bar.owner.options.StartColorB) end - bar:SetFixedPanelTemplate('Transparent') - background:SetNormalTexture(nil) - progress:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - progress:ClearAllPoints() - progress:FillInner(bar) + + if bar.enlarged then + frame:SetWidth(bar.owner.options.HugeWidth) + tbar:SetWidth(bar.owner.options.HugeWidth) + frame:SetScale(bar.owner.options.HugeScale) + else + frame:SetWidth(bar.owner.options.Width) + tbar:SetWidth(bar.owner.options.Width) + frame:SetScale(bar.owner.options.Scale) + end + + spark:SetAlpha(0) + spark:SetTexture(0,0,0,0) + + icon1:SetTexCoord(0.1,0.9,0.1,0.9) + icon1:ClearAllPoints() + icon1:FillInner(icon1.overlay) + + icon2:SetTexCoord(0.1,0.9,0.1,0.9) + icon2:ClearAllPoints() + icon2:FillInner(icon2.overlay) + + texture:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + tbar:FillInner(frame) + + frame:SetFixedPanelTemplate() + name:ClearAllPoints() + name:SetWidth(165) + name:SetHeight(8) name:SetJustifyH('LEFT') name:SetShadowColor(0, 0, 0, 0) timer:ClearAllPoints() timer:SetJustifyH('RIGHT') timer:SetShadowColor(0, 0, 0, 0) - if STYLE:IsAddonReady('DBMHalfBar') then - bar:SetHeight(buttonsize / 3) - name:Point('BOTTOMLEFT', bar, 'TOPLEFT', 4, 0) - timer:Point('BOTTOMRIGHT', bar, 'TOPRIGHT', -4, 0) - else - bar:SetHeight(buttonsize) - name:Point('LEFT', bar, 'LEFT', 4, 0) - timer:Point('RIGHT', bar, 'RIGHT', -4, 0) - end - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - count = count + 1 + + frame:SetHeight(22) + name:Point('LEFT', frame, 'LEFT', 4, 0) + timer:Point('RIGHT', frame, 'RIGHT', -4, 0) + + name:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + timer:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + + name:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) + timer:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) + + if bar.owner.options.IconLeft then icon1:Show() icon1.overlay:Show() else icon1:Hide() icon1.overlay:Hide() end + if bar.owner.options.IconRight then icon2:Show() icon2.overlay:Show() else icon2:Hide() icon2.overlay:Hide() end + + tbar:SetAlpha(1) + frame:SetAlpha(1) + texture:SetAlpha(1) + frame:Show() + bar:Update(0) + bar.injected = true end + bar:ApplyStyle() + end + end +end + +local StyleBossTitle = function() + local anchor = VEMBossHealthDropdown:GetParent() + if not anchor.styled then + local header = {anchor:GetRegions()} + if header[1]:IsObjectType('FontString') then + header[1]:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + header[1]:SetTextColor(1, 1, 1) + header[1]:SetShadowColor(0, 0, 0, 0) + anchor.styled = true end - hooksecurefunc(DBT, 'CreateBar', StyleBars) - hooksecurefunc(VEM.BossHealth, 'Show', StyleBossTitle) - hooksecurefunc(VEM.BossHealth, 'AddBoss', StyleBoss) - hooksecurefunc(VEM.BossHealth, 'UpdateSettings', StyleBoss) + header = nil + end + anchor = nil +end + +local StyleBoss = function() + local count = 1 + while _G[format('VEM_BossHealth_Bar_%d', count)] do + local bar = _G[format('VEM_BossHealth_Bar_%d', count)] + local background = _G[bar:GetName()..'BarBorder'] + local progress = _G[bar:GetName()..'Bar'] + local name = _G[bar:GetName()..'BarName'] + local timer = _G[bar:GetName()..'BarTimer'] + local prev = _G[format('VEM_BossHealth_Bar_%d', count-1)] + local _, anch, _ ,_, _ = bar:GetPoint() + bar:ClearAllPoints() + if count == 1 then + if VEM_SavedOptions.HealthFrameGrowUp then + bar:Point('BOTTOM', anch, 'TOP' , 0 , 12) + else + bar:Point('TOP', anch, 'BOTTOM' , 0, -22) + end + else + if VEM_SavedOptions.HealthFrameGrowUp then + bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, 26) + else + bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, -26) + end + end + bar:SetFixedPanelTemplate('Transparent') + background:SetNormalTexture(nil) + progress:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + progress:ClearAllPoints() + progress:FillInner(bar) + name:ClearAllPoints() + name:SetJustifyH('LEFT') + name:SetShadowColor(0, 0, 0, 0) + timer:ClearAllPoints() + timer:SetJustifyH('RIGHT') + timer:SetShadowColor(0, 0, 0, 0) + + bar:SetHeight(22) + name:Point('LEFT', bar, 'LEFT', 4, 0) + timer:Point('RIGHT', bar, 'RIGHT', -4, 0) + + name:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + timer:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + count = count + 1 + end +end + +local _hook_OnShow = function(self) + if(not self.Panel) then + self:SetFixedPanelTemplate('Transparent') + end +end + +local function StyleVEM(event, addon) + assert(VEM, "AddOn Not Loaded") + + if event == 'PLAYER_ENTERING_WORLD' then + NewHook(DBT, 'CreateBar', StyleBars) + NewHook(VEM.BossHealth, 'Show', StyleBossTitle) + NewHook(VEM.BossHealth, 'AddBoss', StyleBoss) + NewHook(VEM.BossHealth, 'UpdateSettings', StyleBoss) + if not VEM_SavedOptions['DontShowRangeFrame'] then VEM.RangeCheck:Show() VEM.RangeCheck:Hide() - VEMRangeCheck:HookScript('OnShow', function(self) self:SetFixedPanelTemplate('Transparent') end) + VEMRangeCheck:HookScript('OnShow', _hook_OnShow) VEMRangeCheckRadar:SetFixedPanelTemplate('Transparent') end + if not VEM_SavedOptions['DontShowInfoFrame'] then VEM.InfoFrame:Show(5, 'test') VEM.InfoFrame:Hide() - VEMInfoFrame:HookScript('OnShow', function(self) self:SetFixedPanelTemplate('Transparent') end) + VEMInfoFrame:HookScript('OnShow', _hook_OnShow) end - if croprwicons then - local RaidNotice_AddMessage_ = RaidNotice_AddMessage - RaidNotice_AddMessage = function(noticeFrame, textString, colorInfo) - if textString:find(' |T') then - textString = gsub(textString,'(:12:12)',':18:18:0:0:64:64:5:59:5:59') - end - return RaidNotice_AddMessage_(noticeFrame, textString, colorInfo) + + RaidNotice_AddMessage = function(noticeFrame, textString, colorInfo) + if textString:find(' |T') then + textString = gsub(textString,'(:12:12)',':18:18:0:0:64:64:5:59:5:59') end + return RaidNotice_AddMessage_(noticeFrame, textString, colorInfo) end end + if addon == 'VEM-GUI' then VEM_GUI_OptionsFrame:HookScript('OnShow', function() STYLE:ApplyFrameStyle(VEM_GUI_OptionsFrame) @@ -228,4 +245,4 @@ local function StyleVEM(event, addon) STYLE:SafeEventRemoval("VEM", event) end end -STYLE:SaveAddonStyle("VEM", StyleVEM, 'ADDON_LOADED') \ No newline at end of file +STYLE:SaveAddonStyle("VEM", StyleVEM, nil, nil, "PLAYER_ENTERING_WORLD", "ADDON_LOADED") \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua index b3c9fe2..82ea63a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua @@ -36,29 +36,34 @@ local STYLE = _G.StyleVillain; WEAKAURAS ########################################################## ]]-- -local function StyleWeakAuras() - local function Style_WeakAuras(frame) - if not frame.Panel then - STYLE:ApplyFrameStyle(frame,"Transparent") - frame.icon.OldAlpha = frame.icon.SetAlpha - frame.icon.SetAlpha = function(self, ...) - frame.icon.OldAlpha(self, ...) - frame.Panel:SetAlpha(...) - end +local function Style_WeakAuras(frame) + if not frame.Panel then + STYLE:ApplyFrameStyle(frame,"Transparent") + frame.icon.OldAlpha = frame.icon.SetAlpha + frame.icon.SetAlpha = function(self, ...) + frame.icon.OldAlpha(self, ...) + frame.Panel:SetAlpha(...) end - SuperVillain:AddCD(frame.cooldown) - frame.icon:SetTexCoord(0.1,0.9,0.1,0.9) - frame.icon.SetTexCoord = SuperVillain.fubar - end - local function Create_WeakAuras(parent, data) - local region = WeakAuras.regionTypes.icon.OldCreate(parent, data) - Style_WeakAuras(region) - return region - end - local function Modify_WeakAuras(parent, region, data) - WeakAuras.regionTypes.icon.OldModify(parent, region, data) - Style_WeakAuras(region) end + SuperVillain:AddCD(frame.cooldown) + frame.icon:SetTexCoord(0.1,0.9,0.1,0.9) + frame.icon.SetTexCoord = SuperVillain.fubar +end + +local function Create_WeakAuras(parent, data) + local region = WeakAuras.regionTypes.icon.OldCreate(parent, data) + Style_WeakAuras(region) + return region +end + +local function Modify_WeakAuras(parent, region, data) + WeakAuras.regionTypes.icon.OldModify(parent, region, data) + Style_WeakAuras(region) +end + +local function StyleWeakAuras() + assert(WeakAuras, "AddOn Not Loaded") + WeakAuras.regionTypes.icon.OldCreate = WeakAuras.regionTypes.icon.create WeakAuras.regionTypes.icon.create = Create_WeakAuras WeakAuras.regionTypes.icon.OldModify = WeakAuras.regionTypes.icon.modify diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua index c56c14b..0f07d92 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua @@ -37,6 +37,8 @@ ALDAMAGEMETER ########################################################## ]]-- local function StyleALDamageMeter() + assert(_G['alDamagerMeterFrame'], "AddOn Not Loaded") + alDamageMeterFrame.bg:MUNG() STYLE:ApplyFrameStyle(alDamageMeterFrame) alDamageMeterFrame:HookScript('OnShow', function() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua index 9c8f398..175a916 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua @@ -89,4 +89,4 @@ end; STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle("Blizzard_ItemAlterationUI",TransmogStyle) \ No newline at end of file +STYLE:SaveBlizzardStyle("Blizzard_ItemAlterationUI", TransmogStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua index 5c3e725..54b7cef 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua @@ -82,4 +82,4 @@ end; STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle("Blizzard_VoidStorageUI",VoidStorageStyle) \ No newline at end of file +STYLE:SaveBlizzardStyle("Blizzard_VoidStorageUI", VoidStorageStyle) \ No newline at end of file