diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua index e043bf4..1112741 100644 --- a/Interface/AddOns/SVUI/SVUI.lua +++ b/Interface/AddOns/SVUI/SVUI.lua @@ -202,7 +202,7 @@ local Core_ResetUI = function(self, confirmed) return end self.Mentalo:Reset() -end +end local Core_ImportProfile = function(self, key) self.SystemAlert["COPY_PROFILE_PROMPT"].text = "Are you sure you want to copy the profile '" .. key .. "'?" diff --git a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua index 7facab1..3c27e64 100644 --- a/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua +++ b/Interface/AddOns/SVUI/libs/LibSuperVillain-1.0/LibSuperVillain-1.0.lua @@ -276,11 +276,13 @@ It's main purpose is to keep all methods and logic needed to properly maintain valid data outside of the core object. --]] ---DATABASE STORAGE -local IndexExceptions = {}; - --DATABASE LOCAL HELPERS -local function tablecopy(d, s) +local function tablecopy(d, s, debug) + if(debug) then + print(debug) + assert(type(s) == "table", "tablecopy ERROR: source (" .. debug .. ") is not a table") + assert(type(d) == "table", "tablecopy ERROR: destination (" .. debug .. ") is not a table") + end if(type(s) ~= "table") then return end if(type(d) ~= "table") then return end for k, v in pairs(s) do @@ -365,13 +367,27 @@ local meta_database = { end, } +local meta_cache = { + __index = function(t, k) + if(not k or k == "") then return end + local sv = rawget(t, "data") + if(not sv[k]) then sv[k] = {} end + rawset(t, k, sv[k]) + return rawget(t, k) + end, +} + --DATABASE PUBLIC METHODS function lib:Remove(key) if(GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = nil end + if(GLOBAL_SV.cache[key]) then GLOBAL_SV.cache[key] = nil end twipe(GLOBAL_SV.profileKeys) for k,v in pairs(GLOBAL_SV.profiles) do GLOBAL_SV.profileKeys[k] = k end + for k,v in pairs(GLOBAL_SV.cache) do + GLOBAL_SV.profileKeys[k] = k + end end function lib:GetProfiles() @@ -390,44 +406,50 @@ end function lib:ImportDatabase(key) if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; - local import = GLOBAL_SV.profiles[key]; - local saved = CoreObject.db; + PROFILE_SV.STORED[SOURCE_KEY] = GLOBAL_SV.profiles[key] - import.importTest = true; --Testing value, will be removed next time the UI is reloaded - tablecopy(saved, import); + if(not GLOBAL_SV.cache[key]) then GLOBAL_SV.cache[key] = {} end; + CACHE_SV.STORED[SOURCE_KEY] = GLOBAL_SV.cache[key] - --Ensure that import was successful - if(not CoreObject.db.importTest) then - --If no test value found, might need reloading - --Not the most clever thing in the world but.... - ReloadUI() - else - print("Profile Successfully Copied") - end + ReloadUI() end function lib:ExportDatabase(key) + local export, saved + if(not GLOBAL_SV.profiles[key]) then GLOBAL_SV.profiles[key] = {} end; - local export = rawget(CoreObject.db, "data"); - local saved = GLOBAL_SV.profiles[key]; + export = rawget(CoreObject.db, "data"); + saved = GLOBAL_SV.profiles[key]; + tablecopy(saved, export); + + if not GLOBAL_SV.cache[key] then GLOBAL_SV.cache[key] = {} end + export = rawget(CoreObject.cache, "data") + saved = GLOBAL_SV.cache[key] tablecopy(saved, export); + twipe(GLOBAL_SV.profileKeys) for k,v in pairs(GLOBAL_SV.profiles) do GLOBAL_SV.profileKeys[k] = k end + for k,v in pairs(GLOBAL_SV.cache) do + GLOBAL_SV.profileKeys[k] = k + end end function lib:WipeDatabase() - local sv = rawget(CoreObject.db, "data") - for k,v in pairs(sv) do - sv[k] = nil + for k,v in pairs(PROFILE_SV.STORED[SOURCE_KEY]) do + PROFILE_SV.STORED[SOURCE_KEY][k] = nil end end -function lib:WipeCache() - for k,v in pairs(CACHE_SV) do - CACHE_SV[k] = nil +function lib:WipeCache(index) + if(index) then + CACHE_SV.STORED[SOURCE_KEY][index] = nil + else + for k,v in pairs(CACHE_SV.STORED[SOURCE_KEY]) do + CACHE_SV.STORED[SOURCE_KEY][k] = nil + end end end @@ -448,18 +470,42 @@ function lib:UpdateDatabase(event) removedefaults(sv[k], src[k]) end end + for k,v in pairs(CACHE_SV) do + if(k ~= "STORED") then + CACHE_SV[k] = nil + end + end elseif(event == "ACTIVE_TALENT_GROUP_CHANGED") then + local LastKey = SOURCE_KEY if(PROFILE_SV.SAFEDATA and PROFILE_SV.SAFEDATA.dualSpecEnabled) then - SOURCE_KEY = GetSpecialization() or 1 + SOURCE_KEY = GetSpecialization() self.EventManager:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") + + if(not SOURCE_KEY) then + SOURCE_KEY = 1 + end + + if(LastKey ~= SOURCE_KEY) then + --construct core dataset + local db = setmetatable({}, meta_database) + db.data = PROFILE_SV.STORED[SOURCE_KEY] + db.defaults = CoreObject.configs + CoreObject.db = db + + local cache = setmetatable({}, meta_cache) + cache.data = CACHE_SV.STORED[SOURCE_KEY] + CoreObject.cache = cache + + if(CoreObject.ReLoad) then + CoreObject:ReLoad() + end + + self:RefreshAll() + end else SOURCE_KEY = 1 self.EventManager:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED") end - - local data = CoreObject.db - local source = PROFILE_SV.STORED[SOURCE_KEY] - rawset(data, "data", source) end end @@ -482,14 +528,6 @@ function lib:CheckData(schema, key) print("______SAVED_____") end -function lib:NewCache(index) - index = index or CoreObject.Schema - if(not CACHE_SV[index]) then - CACHE_SV[index] = {} - end - return CACHE_SV[index] -end - function lib:NewGlobal(index) index = index or CoreObject.Schema if(not GLOBAL_SV[index]) then @@ -632,23 +670,28 @@ function lib:RunCallbacks() end end -function lib:Update(schema) +function lib:RefreshModule(schema) local obj = CoreObject[schema] if obj and obj.ReLoad then obj:ReLoad() end end -function lib:UpdateAll() +function lib:RefreshPlugin(schema) + local obj = _G[schema] + if obj and obj.ReLoad then + obj:ReLoad() + end +end + +function lib:RefreshAll() for _,schema in pairs(MODULES) do local obj = CoreObject[schema] if obj and obj.ReLoad then obj:ReLoad() end end -end -function lib:UpdatePlugins() for _,schema in pairs(PLUGINS) do local obj = _G[schema] if obj and obj.ReLoad then @@ -685,7 +728,6 @@ function lib:LoadQueuedModules() local schema = MODULES[i] local obj = CoreObject[schema] if obj and not obj.initialized then - obj.initialized = true; local halt = false local data = CoreObject.db[schema] if(data and data.incompatible) then @@ -693,11 +735,9 @@ function lib:LoadQueuedModules() if IsAddOnLoaded(addon) then halt = true end end end - if(obj.Load) then - if(not halt) then - obj:Load() - obj.Load = nil - end + if(obj.Load and (not halt)) then + obj:Load() + obj.initialized = true end end end @@ -710,7 +750,6 @@ function lib:LoadQueuedPlugins() local schema = PLUGINS[i] local obj = _G[schema] if obj and not obj.initialized then - obj.initialized = true; local halt = false local data = CoreObject.db[schema] if(data and data.incompatible) then @@ -718,11 +757,9 @@ function lib:LoadQueuedPlugins() if IsAddOnLoaded(addon) then halt = true end end end - if(obj.Load) then - if(not halt) then - obj:Load() - obj.Load = nil - end + if(obj.Load and (not halt)) then + obj:Load() + obj.initialized = true end end end @@ -972,14 +1009,32 @@ function lib:Initialize() end GLOBAL_SV.profiles = GLOBAL_SV.profiles or {} - for k,v in pairs(GLOBAL_SV.profiles) do GLOBAL_SV.profileKeys[k] = k end + GLOBAL_SV.cache = GLOBAL_SV.cache or {} + for k,v in pairs(GLOBAL_SV.cache) do + GLOBAL_SV.profileKeys[k] = k + end + --CACHE SAVED VARIABLES if not _G[CACHE_FILENAME] then _G[CACHE_FILENAME] = {} end CACHE_SV = _G[CACHE_FILENAME] + if(not CACHE_SV.STORED) then + CACHE_SV.STORED = {} + CACHE_SV.STORED[1] = {} + CACHE_SV.STORED[2] = {} + CACHE_SV.STORED[3] = {} + if playerClass == "DRUID" then + CACHE_SV.STORED[4] = {} + end + for k,v in pairs(CACHE_SV) do + if(k ~= "STORED") then + CACHE_SV.STORED[1][k] = v + end + end + end --PROFILE SAVED VARIABLES if not _G[PROFILE_FILENAME] then _G[PROFILE_FILENAME] = {} end @@ -1049,10 +1104,14 @@ function lib:Initialize() end --construct core dataset - local db = setmetatable({}, meta_database) - db.data = PROFILE_SV.STORED[SOURCE_KEY] - db.defaults = CoreObject.configs - CoreObject.db = db + local db = setmetatable({}, meta_database) + db.data = PROFILE_SV.STORED[SOURCE_KEY] + db.defaults = CoreObject.configs + CoreObject.db = db + + local cache = setmetatable({}, meta_cache) + cache.data = CACHE_SV.STORED[SOURCE_KEY] + CoreObject.cache = cache --check for LOD plugins local addonCount = GetNumAddOns() diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index 98d7083..421cc81 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -363,10 +363,10 @@ function MOD:Layout(isBank, isReagent) if (not isReagent and (not isBank and bagID <= 3) or (isBank and bagID ~= -1 and numContainerSlots >= 1 and not (i - 1 > numContainerSlots))) then if not f.ContainerHolder[i] then if isBank then - globalName = "SuperBankBag" .. (bagID - 4); + globalName = "SVUI_BankBag" .. (bagID - 4); f.ContainerHolder[i] = NewFrame("CheckButton", globalName, f.ContainerHolder, "BankItemButtonBagTemplate") else - globalName = "SuperMainBag" .. bagID .. "Slot"; + globalName = "SVUI_MainBag" .. bagID .. "Slot"; f.ContainerHolder[i] = NewFrame("CheckButton", globalName, f.ContainerHolder, "BagSlotButtonTemplate") end --f.ContainerHolder[i]:SetSlotTemplate(true, 2, 4, 4, true) @@ -375,15 +375,11 @@ function MOD:Layout(isBank, isReagent) f.ContainerHolder[i]:SetPushedTexture("") f.ContainerHolder[i]:SetScript("OnClick", nil) f.ContainerHolder[i].id = isBank and bagID or bagID + 1; - f.ContainerHolder[i]:HookScript("OnEnter", function(self) - MOD.UseSlotFading(self, f) end) - f.ContainerHolder[i]:HookScript("OnLeave", function(self) - MOD.FlushSlotFading(self, f) end) - if isBank then - f.ContainerHolder[i]:SetID(bagID) - if not f.ContainerHolder[i].tooltipText then - f.ContainerHolder[i].tooltipText = "" - end + f.ContainerHolder[i]:SetID(isBank and bagID or (bagID + 1)) + f.ContainerHolder[i]:HookScript("OnEnter", function(self) MOD.UseSlotFading(self, f) end) + f.ContainerHolder[i]:HookScript("OnLeave", function(self) MOD.FlushSlotFading(self, f) end) + if(isBank and (not f.ContainerHolder[i].tooltipText)) then + f.ContainerHolder[i].tooltipText = "" end f.ContainerHolder[i].iconTexture = _G[f.ContainerHolder[i]:GetName().."IconTexture"]; f.ContainerHolder[i].iconTexture:FillInner() diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua index ac1f6e7..080b9eb 100644 --- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua +++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua @@ -114,12 +114,12 @@ end local ToggleDocks = function(self) GameTooltip:Hide() - if MOD.Cache.SuperDockFaded then - MOD.Cache.SuperDockFaded = nil; + if SV.cache.Docks.SuperDockFaded then + SV.cache.Docks.SuperDockFaded = nil; SV:SecureFadeIn(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 1) SV:SecureFadeIn(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 1) else - MOD.Cache.SuperDockFaded = true; + SV.cache.Docks.SuperDockFaded = true; SV:SecureFadeOut(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 0, true) SV:SecureFadeOut(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 0, true) end @@ -156,7 +156,7 @@ local DockButtonDeactivate = function(self) end local DockletButton_OnEnter = function(self, ...) - if MOD.Cache.SuperDockFaded then + if SV.cache.Docks.SuperDockFaded then LeftSuperDock:Show() SV:SecureFadeIn(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 1) RightSuperDock:Show() @@ -177,7 +177,7 @@ local DockletButton_OnEnter = function(self, ...) end local DockletButton_OnLeave = function(self, ...) - if MOD.Cache.SuperDockFaded then + if SV.cache.Docks.SuperDockFaded then SV:SecureFadeOut(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 0, true) SV:SecureFadeOut(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 0, true) end @@ -529,7 +529,7 @@ function MOD:CreateDockPanels() rightwindow:Size(rightWidth, rightHeight) rightdock.backdrop = SetSuperDockStyle(rightwindow) - if self.Cache.SuperDockFaded then LeftSuperDock:Hide() RightSuperDock:Hide() end + if SV.cache.Docks.SuperDockFaded then LeftSuperDock:Hide() RightSuperDock:Hide() end local toolbarTop = CreateFrame("Frame", "SuperDockToolBarTop", SV.UIParent) toolbarTop:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 2, -4) @@ -958,10 +958,12 @@ function MOD:ReLoad() end function MOD:Load() - self.Cache = LibSuperVillain:NewCache("Docks") - if(not self.Cache.SuperDockFaded) then - self.Cache.SuperDockFaded = false + SV.cache.Docks = SV.cache.Docks or {} + + if(not SV.cache.Docks.SuperDockFaded) then + SV.cache.Docks.SuperDockFaded = false end + self:CreateSuperBorders() self:CreateDockPanels() local width = RightSuperDock:GetWidth(); diff --git a/Interface/AddOns/SVUI/scripts/mounts.lua b/Interface/AddOns/SVUI/scripts/mounts.lua index 423d4b6..6a98ada 100644 --- a/Interface/AddOns/SVUI/scripts/mounts.lua +++ b/Interface/AddOns/SVUI/scripts/mounts.lua @@ -63,36 +63,36 @@ local function UpdateMountCheckboxes(button, index) bar["SPECIAL"].index = index bar["SPECIAL"].name = creatureName - if(MountCache.names["GROUND"] == creatureName) then - if(MountCache.types["GROUND"] ~= index) then - MountCache.types["GROUND"] = index + if(SV.cache.Mounts.names["GROUND"] == creatureName) then + if(SV.cache.Mounts.types["GROUND"] ~= index) then + SV.cache.Mounts.types["GROUND"] = index end bar["GROUND"]:SetChecked(1) else bar["GROUND"]:SetChecked(0) end - if(MountCache.names["FLYING"] == creatureName) then - if(MountCache.types["FLYING"] ~= index) then - MountCache.types["FLYING"] = index + if(SV.cache.Mounts.names["FLYING"] == creatureName) then + if(SV.cache.Mounts.types["FLYING"] ~= index) then + SV.cache.Mounts.types["FLYING"] = index end bar["FLYING"]:SetChecked(1) else bar["FLYING"]:SetChecked(0) end - if(MountCache.names["SWIMMING"] == creatureName) then - if(MountCache.types["SWIMMING"] ~= index) then - MountCache.types["SWIMMING"] = index + if(SV.cache.Mounts.names["SWIMMING"] == creatureName) then + if(SV.cache.Mounts.types["SWIMMING"] ~= index) then + SV.cache.Mounts.types["SWIMMING"] = index end bar["SWIMMING"]:SetChecked(1) else bar["SWIMMING"]:SetChecked(0) end - if(MountCache.names["SPECIAL"] == creatureName) then - if(MountCache.types["SPECIAL"] ~= index) then - MountCache.types["SPECIAL"] = index + if(SV.cache.Mounts.names["SPECIAL"] == creatureName) then + if(SV.cache.Mounts.types["SPECIAL"] ~= index) then + SV.cache.Mounts.types["SPECIAL"] = index end bar["SPECIAL"]:SetChecked(1) else @@ -101,29 +101,29 @@ local function UpdateMountCheckboxes(button, index) end end -local function UpdateMountCache() +local function UpdateMountsCache() if(not MountJournal or not MountJournal.cachedMounts) then return end local num = GetNumCompanions("MOUNT") for index = 1, num, 1 do local _, info, id = GetCompanionInfo("MOUNT", index) - if(MountCache.names["GROUND"] == info) then - if(MountCache.types["GROUND"] ~= index) then - MountCache.types["GROUND"] = index + if(SV.cache.Mounts.names["GROUND"] == info) then + if(SV.cache.Mounts.types["GROUND"] ~= index) then + SV.cache.Mounts.types["GROUND"] = index end end - if(MountCache.names["FLYING"] == info) then - if(MountCache.types["FLYING"] ~= index) then - MountCache.types["FLYING"] = index + if(SV.cache.Mounts.names["FLYING"] == info) then + if(SV.cache.Mounts.types["FLYING"] ~= index) then + SV.cache.Mounts.types["FLYING"] = index end end - if(MountCache.names["SWIMMING"] == info) then - if(MountCache.types["SWIMMING"] ~= index) then - MountCache.types["SWIMMING"] = index + if(SV.cache.Mounts.names["SWIMMING"] == info) then + if(SV.cache.Mounts.types["SWIMMING"] ~= index) then + SV.cache.Mounts.types["SWIMMING"] = index end end - if(MountCache.names["SPECIAL"] == info) then - if(MountCache.types["SPECIAL"] ~= index) then - MountCache.types["SPECIAL"] = index + if(SV.cache.Mounts.names["SPECIAL"] == info) then + if(SV.cache.Mounts.types["SPECIAL"] ~= index) then + SV.cache.Mounts.types["SPECIAL"] = index end end end @@ -148,7 +148,7 @@ end local ProxyUpdate_Mounts = function(self, event, ...) if(event == "COMPANION_LEARNED" or event == "COMPANION_UNLEARNED") then - UpdateMountCache() + UpdateMountsCache() end Update_MountCheckButtons() end @@ -157,29 +157,29 @@ local function UpdateCurrentMountSelection() ttSummary = "" local creatureName - if(MountCache.types["FLYING"]) then - creatureName = MountCache.names["FLYING"] + if(SV.cache.Mounts.types["FLYING"]) then + creatureName = SV.cache.Mounts.names["FLYING"] if(creatureName) then ttSummary = ttSummary .. "\nFlying: " .. creatureName end end - if(MountCache.types["SWIMMING"]) then - creatureName = MountCache.names["SWIMMING"] + if(SV.cache.Mounts.types["SWIMMING"]) then + creatureName = SV.cache.Mounts.names["SWIMMING"] if(creatureName) then ttSummary = ttSummary .. "\nSwimming: " .. creatureName end end - if(MountCache.types["GROUND"]) then - creatureName = MountCache.names["GROUND"] + if(SV.cache.Mounts.types["GROUND"]) then + creatureName = SV.cache.Mounts.names["GROUND"] if(creatureName) then ttSummary = ttSummary .. "\nGround: " .. creatureName end end - if(MountCache.types["SPECIAL"]) then - creatureName = MountCache.names["SPECIAL"] + if(SV.cache.Mounts.types["SPECIAL"]) then + creatureName = SV.cache.Mounts.names["SPECIAL"] if(creatureName) then ttSummary = ttSummary .. "\nSpecial: " .. creatureName end @@ -193,11 +193,11 @@ local CheckButton_OnClick = function(self) if(index) then if(self:GetChecked() == 1) then - MountCache.types[key] = index - MountCache.names[key] = name + SV.cache.Mounts.types[key] = index + SV.cache.Mounts.names[key] = name else - MountCache.types[key] = false - MountCache.names[key] = "" + SV.cache.Mounts.types[key] = false + SV.cache.Mounts.names[key] = "" end Update_MountCheckButtons() UpdateCurrentMountSelection() @@ -232,17 +232,18 @@ ADDING CHECKBOXES TO JOURNAL ########################################################## ]]-- local function SetMountCheckButtons() - MountCache = LibSuperVillain:NewCache("Mounts") - if not MountCache.types then - MountCache.types = { + SV.cache.Mounts = SV.cache.Mounts or {} + + if not SV.cache.Mounts.types then + SV.cache.Mounts.types = { ["GROUND"] = false, ["FLYING"] = false, ["SWIMMING"] = false, ["SPECIAL"] = false } end - if not MountCache.names then - MountCache.names = { + if not SV.cache.Mounts.names then + SV.cache.Mounts.names = { ["GROUND"] = "", ["FLYING"] = "", ["SWIMMING"] = "", @@ -250,7 +251,7 @@ local function SetMountCheckButtons() } end - UpdateMountCache() + UpdateMountsCache() local scrollFrame = MountJournal.ListScrollFrame; local scrollBar = _G["MountJournalListScrollFrameScrollBar"] @@ -361,7 +362,7 @@ SLASH FUNCTION ########################################################## ]]-- function SVUILetsRide() - local checkList = MountCache.types + local checkList = SV.cache.Mounts.types local letsFly, letsSwim, letsSeahorse, vjZone, IbelieveIcantFly local maxMounts = GetNumCompanions("MOUNT") if(not maxMounts or IsMounted()) then diff --git a/Interface/AddOns/SVUI/scripts/spellbind.lua b/Interface/AddOns/SVUI/scripts/spellbind.lua index 122d625..006f15c 100644 --- a/Interface/AddOns/SVUI/scripts/spellbind.lua +++ b/Interface/AddOns/SVUI/scripts/spellbind.lua @@ -81,8 +81,6 @@ SpellBinder.list.child = CreateFrame("Frame", nil, SpellBinder.list) SpellBinder.list:SetPoint("TOPLEFT", _G["SVUI_SpellBinderInset"], "TOPLEFT", 0, -5) SpellBinder.list:SetPoint("BOTTOMRIGHT", _G["SVUI_SpellBinderInset"], "BOTTOMRIGHT", -30, 5) SpellBinder.list:SetScrollChild(SpellBinder.list.child) - -local SpellBinderCache; --[[ ########################################################## SCRIPT HANDLERS @@ -168,9 +166,9 @@ local SpellBindMask_OnClick = function(self, button) button = SecureButton_GetButtonSuffix(button) end - for i, v in pairs(SpellBinderCache.spells) do if v.spell == spellname then return end end + for i, v in pairs(SV.cache.SpellBinder.spells) do if v.spell == spellname then return end end - tinsert(SpellBinderCache.spells, {["id"] = slot, ["modifier"] = modifier, ["button"] = button, ["spell"] = spellname, ["rank"] = rank, ["texture"] = texture, ["origbutton"] = originalbutton,}) + tinsert(SV.cache.SpellBinder.spells, {["id"] = slot, ["modifier"] = modifier, ["button"] = button, ["spell"] = spellname, ["rank"] = rank, ["texture"] = texture, ["origbutton"] = originalbutton,}) SpellBinder:BuildSpells(false) end end @@ -178,7 +176,7 @@ end local SpellBindDelete_OnClick = function(self) local spell = self.spell - for j, k in ipairs(SpellBinderCache.spells) do + for j, k in ipairs(SV.cache.SpellBinder.spells) do if k ~= spell.spell then k.checked = false _G[j.."_cbs"]:SetBackdropColor(0, 0, 0, 0) @@ -201,7 +199,14 @@ METHODS ########################################################## ]]-- function SpellBinder:BuildSpells(delete) - if(not SpellBinderCache) then return end + if(not SV.cache.SpellBinder) then return end + + if(not SV.cache.SpellBinder.spells) then + SV.cache.SpellBinder.spells = {} + SV.cache.SpellBinder.frames = {} + SV.cache.SpellBinder.keys = {} + end + local oldb, spellName local scroll = self.list.child scroll:SetPoint("TOPLEFT") @@ -219,7 +224,7 @@ function SpellBinder:BuildSpells(delete) end end - for i, spell in ipairs(SpellBinderCache.spells) do + for i, spell in ipairs(SV.cache.SpellBinder.spells) do spellName = spell.spell if spellName then local bf = _G[i.."_cbs"] or CreateFrame("Button", i.."_cbs", scroll) @@ -259,7 +264,7 @@ function SpellBinder:BuildSpells(delete) bf.fs:SetPoint("RIGHT", bf.delete, "LEFT", -4, 0) for frame,_ in pairs(ClickCastFrames) do - if frame and SpellBinderCache.frames[frame] then + if frame and SV.cache.SpellBinder.frames[frame] then if frame:CanChangeAttribute() or frame:CanChangeProtectedState() then if frame:GetAttribute(spell.modifier.."type"..spell.button) ~= "menu" then --frame:RegisterForClicks("AnyDown") @@ -268,15 +273,15 @@ function SpellBinder:BuildSpells(delete) frame:SetAttribute(spell.modifier.."type-"..spell.spell, "spell") frame:SetAttribute(spell.modifier.."spell-"..spell.spell, spell.spell) - SpellBinderCache.keys[spell.modifier..spell.button] = spell.spell - SpellBinderCache.keys[spell.modifier.."type-"..spell.spell] = "spell" - SpellBinderCache.keys[spell.modifier.."spell-"..spell.spell] = spell.spell + SV.cache.SpellBinder.keys[spell.modifier..spell.button] = spell.spell + SV.cache.SpellBinder.keys[spell.modifier.."type-"..spell.spell] = "spell" + SV.cache.SpellBinder.keys[spell.modifier.."spell-"..spell.spell] = spell.spell else frame:SetAttribute(spell.modifier.."type"..spell.button, "spell") frame:SetAttribute(spell.modifier.."spell"..spell.button, spell.spell) - SpellBinderCache.keys[spell.modifier.."type"..spell.button] = "spell" - SpellBinderCache.keys[spell.modifier.."spell"..spell.button] = spell.spell + SV.cache.SpellBinder.keys[spell.modifier.."type"..spell.button] = "spell" + SV.cache.SpellBinder.keys[spell.modifier.."spell"..spell.button] = spell.spell end end end @@ -290,9 +295,9 @@ function SpellBinder:BuildSpells(delete) end function SpellBinder:BuildList() - if(SpellBinderCache and SpellBinderCache.frames) then + if(SV.cache.SpellBinder and SV.cache.SpellBinder.frames) then for frame,_ in pairs(ClickCastFrames) do - SpellBinderCache.frames[frame] = SpellBinderCache.frames[frame] or true + SV.cache.SpellBinder.frames[frame] = SV.cache.SpellBinder.frames[frame] or true end end end @@ -318,8 +323,8 @@ function SpellBinder:ToggleButtons() end function SpellBinder:DeleteSpell() - local count = table.getn(SpellBinderCache.spells) - for i, spell in ipairs(SpellBinderCache.spells) do + local count = table.getn(SV.cache.SpellBinder.spells) + for i, spell in ipairs(SV.cache.SpellBinder.spells) do if spell.checked then for frame,_ in pairs(ClickCastFrames) do local f @@ -339,7 +344,7 @@ function SpellBinder:DeleteSpell() end end end - tremove(SpellBinderCache.spells, i) + tremove(SV.cache.SpellBinder.spells, i) end end self:BuildSpells(true) @@ -427,11 +432,11 @@ SpellBinder:RegisterEvent("ZONE_CHANGED_NEW_AREA") SpellBinder:RegisterEvent("ZONE_CHANGED") local function LoadSpellBinder() - SpellBinderCache = SVLib:NewCache("SpellBinder") - SpellBinderCache.spells = SpellBinderCache.spells or {} - SpellBinderCache.frames = SpellBinderCache.frames or {} - SpellBinderCache.keys = SpellBinderCache.keys or {} - + SV.cache.SpellBinder = SV.cache.SpellBinder or {} + SV.cache.SpellBinder.spells = SV.cache.SpellBinder.spells or {} + SV.cache.SpellBinder.frames = SV.cache.SpellBinder.frames or {} + SV.cache.SpellBinder.keys = SV.cache.SpellBinder.keys or {} + SpellBinder:BuildList() SpellBinder:BuildSpells(true) diff --git a/Interface/AddOns/SVUI/setup/installer.lua b/Interface/AddOns/SVUI/setup/installer.lua index 267adcc..3ab0d4e 100644 --- a/Interface/AddOns/SVUI/setup/installer.lua +++ b/Interface/AddOns/SVUI/setup/installer.lua @@ -117,7 +117,7 @@ local function BarShuffle() local tH = SV.db.SVBar.Bar1.buttonsize + (base - bS); local b2h = bar2 and tH or base; local sph = (400 - b2h); - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors if not anchors then anchors = {} end anchors.SVUI_SpecialAbility_MOVE = "BOTTOMSVUIParentBOTTOM0"..sph; anchors.SVUI_ActionBar2_MOVE = "BOTTOMSVUI_ActionBar1TOP0"..(-bS); @@ -133,7 +133,7 @@ local function BarShuffle() end local function UFMoveBottomQuadrant(toggle) - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors if not toggle then anchors.SVUI_Player_MOVE = "BOTTOMSVUIParentBOTTOM-278182" anchors.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM-278122" @@ -168,7 +168,7 @@ local function UFMoveBottomQuadrant(toggle) end local function UFMoveLeftQuadrant(toggle) - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors if not toggle then anchors.SVUI_Assist_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-250" anchors.SVUI_Tank_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-175" @@ -189,7 +189,7 @@ local function UFMoveLeftQuadrant(toggle) end local function UFMoveTopQuadrant(toggle) - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors if not toggle then anchors.GM_MOVE = "TOPLEFTSVUIParentTOPLEFT250-25" anchors.SVUI_LootFrame_MOVE = "BOTTOMSVUIParentBOTTOM0350" @@ -206,7 +206,7 @@ local function UFMoveTopQuadrant(toggle) end local function UFMoveRightQuadrant(toggle) - local anchors = SV.Mentalo.Anchors + local anchors = SV.cache.Anchors local dH = SV.db.SVDock.dockRightHeight + 60 if not toggle or toggle == "high" then anchors.SVUI_BossHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" @@ -281,10 +281,10 @@ function SV.Setup:UserScreen(rez, preserve) if(not preserve and not mungs) then BarShuffle() SV.Mentalo:SetPositions() - SVLib:Update('SVDock') - SVLib:Update('SVAura') - SVLib:Update('SVBar') - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVDock') + SVLib:RefreshModule('SVAura') + SVLib:RefreshModule('SVBar') + SVLib:RefreshModule('SVUnit') SV:SavedPopup() end end @@ -431,8 +431,8 @@ function SV.Setup:ColorTheme(style, preserve) if(not mungs) then SV:MediaUpdate() - SVLib:Update('SVStats') - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVStats') + SVLib:RefreshModule('SVUnit') if(not preserve) then SV:SavedPopup() end @@ -467,8 +467,8 @@ function SV.Setup:UnitframeLayout(style, preserve) end SV.Mentalo:SetPositions() end - SVLib:Update('SVStats') - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVStats') + SVLib:RefreshModule('SVUnit') if(not preserve) then SV:SavedPopup() end @@ -482,7 +482,7 @@ function SV.Setup:GroupframeLayout(style, preserve) SV.db.LAYOUT.groupstyle = style if(not mungs) then - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVUnit') if(not preserve) then SV:SavedPopup() end @@ -515,8 +515,8 @@ function SV.Setup:BarLayout(style, preserve) BarShuffle() SV.Mentalo:SetPositions() end - SVLib:Update('SVStats') - SVLib:Update('SVBar') + SVLib:RefreshModule('SVStats') + SVLib:RefreshModule('SVBar') if(not preserve) then SV:SavedPopup() end @@ -530,9 +530,9 @@ function SV.Setup:Auralayout(style, preserve) SV.db.LAYOUT.aurastyle = style; if(not mungs) then - SVLib:Update('SVStats') - SVLib:Update('SVAura') - SVLib:Update('SVUnit') + SVLib:RefreshModule('SVStats') + SVLib:RefreshModule('SVAura') + SVLib:RefreshModule('SVUnit') if(not preserve) then SV:SavedPopup() end diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index 35131c5..f8197a2 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -193,6 +193,8 @@ SV.SystemAlert["RESET_PROFILE_PROMPT"] = { hideOnEscape = 1, OnAccept = function() SVLib:WipeDatabase() + SVLib:WipeCache("Anchors") + ReloadUI() end }; SV.SystemAlert["COPY_PROFILE_PROMPT"] = { diff --git a/Interface/AddOns/SVUI/system/common.lua b/Interface/AddOns/SVUI/system/common.lua index cc63c59..8dca0d5 100644 --- a/Interface/AddOns/SVUI/system/common.lua +++ b/Interface/AddOns/SVUI/system/common.lua @@ -1322,10 +1322,7 @@ local function SetButtonTemplate(self, invisible, overridePadding, xOffset, yOff FillInner(hover, self.Panel) self.hover = hover; end - - local color = SV.Media.color.highlight - self.hover:SetTexture(color[1], color[2], color[3], 0.5) - + self.hover:SetTexture(0.1, 0.8, 0.8, 0.5) self:SetHighlightTexture(self.hover) end @@ -1390,7 +1387,7 @@ local function SetCheckboxTemplate(self, underlay, x, y) self.__hooked = true end -local function SetEditboxTemplate(self, x, y) +local function SetEditboxTemplate(self, x, y, fixed) if(not self or (self and self.Panel)) then return end if self.TopLeftTex then Die(self.TopLeftTex) end @@ -1402,8 +1399,9 @@ local function SetEditboxTemplate(self, x, y) if self.LeftTex then Die(self.LeftTex) end if self.RightTex then Die(self.RightTex) end if self.MiddleTex then Die(self.MiddleTex) end - - CreatePanelTemplate(self, "Inset", true, true, 1, x, y) + local underlay = true + if(fixed ~= nil) then underlay = fixed end + CreatePanelTemplate(self, "Inset", underlay, true, 1, x, y) local globalName = self:GetName(); if globalName then diff --git a/Interface/AddOns/SVUI/system/load.lua b/Interface/AddOns/SVUI/system/load.lua index eea477c..c9c5db0 100644 --- a/Interface/AddOns/SVUI/system/load.lua +++ b/Interface/AddOns/SVUI/system/load.lua @@ -77,7 +77,7 @@ function SV:RefreshEverything(bypass) self:RefreshAllSystemMedia(); self.UIParent:Hide(); self.Mentalo:SetPositions(); - SVLib:UpdateAll(); + SVLib:RefreshAll(); self.UIParent:Show(); if not bypass then self:VersionCheck() @@ -88,6 +88,13 @@ end SVUI LOAD PROCESS ########################################################## ]]-- +function SV:ReLoad() + self.Timers:ClearAllTimers(); + self:RefreshAllSystemMedia(); + self.Mentalo:SetPositions(); + self:AddonMessage("All user settings reloaded"); +end + function SV:Load() self.Timers:ClearAllTimers() @@ -139,7 +146,7 @@ function SV:Launch() self.UIParent:RegisterEvent("UNIT_INVENTORY_CHANGED"); self.UIParent:RegisterEvent("UPDATE_BONUS_ACTIONBAR"); - SVLib:Update("SVMap"); + SVLib:RefreshModule("SVMap"); collectgarbage("collect") diff --git a/Interface/AddOns/SVUI/system/mentalo.lua b/Interface/AddOns/SVUI/system/mentalo.lua index 2c26bed..ca44714 100644 --- a/Interface/AddOns/SVUI/system/mentalo.lua +++ b/Interface/AddOns/SVUI/system/mentalo.lua @@ -545,13 +545,13 @@ function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) end local anchor1, anchorParent, anchor2, xPos, yPos = split("\031", CurrentPosition(frame)) - if(self.Anchors and self.Anchors[moveName]) then - if(type(self.Anchors[moveName]) == "table") then - movable:SetPoint(self.Anchors[moveName]["p"], SV.UIParent, self.Anchors[moveName]["p2"], self.Anchors[moveName]["p3"], self.Anchors[moveName]["p4"]) - self.Anchors[moveName] = CurrentPosition(movable) + if(SV.cache.Anchors and SV.cache.Anchors[moveName]) then + if(type(SV.cache.Anchors[moveName]) == "table") then + movable:SetPoint(SV.cache.Anchors[moveName]["p"], SV.UIParent, SV.cache.Anchors[moveName]["p2"], SV.cache.Anchors[moveName]["p3"], SV.cache.Anchors[moveName]["p4"]) + SV.cache.Anchors[moveName] = CurrentPosition(movable) movable:ClearAllPoints() end - anchor1, anchorParent, anchor2, xPos, yPos = split("\031", self.Anchors[moveName]) + anchor1, anchorParent, anchor2, xPos, yPos = split("\031", SV.cache.Anchors[moveName]) movable:SetPoint(anchor1, anchorParent, anchor2, xPos, yPos) else movable:SetPoint(anchor1, anchorParent, anchor2, xPos, yPos) @@ -603,7 +603,7 @@ function Mentalo:New(frame, moveName, title, raised, snap, dragStopFunc) end function Mentalo:HasMoved(frame) - if self.Anchors and self.Anchors[frame] then + if SV.cache.Anchors and SV.cache.Anchors[frame] then return true else return false @@ -611,8 +611,8 @@ function Mentalo:HasMoved(frame) end function Mentalo:SaveMovable(frame) - if(not _G[frame] or not self.Anchors) then return end - self.Anchors[frame] = CurrentPosition(_G[frame]) + if(not _G[frame] or not SV.cache.Anchors) then return end + SV.cache.Anchors[frame] = CurrentPosition(_G[frame]) end function Mentalo:ChangeSnapOffset(frame, snapOffset) @@ -668,8 +668,8 @@ function Mentalo:Reset(request) end end end - if(self.Anchors) then - self.Anchors = {} + if(SV.cache.Anchors) then + SV.cache.Anchors = {} end else for name, _ in pairs(self.Frames)do @@ -682,8 +682,8 @@ function Mentalo:Reset(request) local u, v, w, x, y = split("\031", self.Frames[name]["point"]) frame:ClearAllPoints() frame:SetPoint(u, v, w, x, y) - if(self.Anchors and self.Anchors[name]) then - self.Anchors[name] = nil + if(SV.cache.Anchors and SV.cache.Anchors[name]) then + SV.cache.Anchors[name] = nil end if (self.Frames[name]["postdrag"] ~= nil and type(self.Frames[name]["postdrag"]) == "function")then self.Frames[name]["postdrag"](frame, Pinpoint(frame)) @@ -701,8 +701,8 @@ function Mentalo:SetPositions() local frame = _G[name]; local anchor1, parent, anchor2, x, y; if frame then - if (self.Anchors and self.Anchors[name] and type(self.Anchors[name]) == "string") then - anchor1, parent, anchor2, x, y = split("\031", self.Anchors[name]) + if (SV.cache.Anchors and SV.cache.Anchors[name] and type(SV.cache.Anchors[name]) == "string") then + anchor1, parent, anchor2, x, y = split("\031", SV.cache.Anchors[name]) frame:ClearAllPoints() frame:SetPoint(anchor1, parent, anchor2, x, y) elseif self.Frames[name]["point"] then @@ -845,7 +845,7 @@ function Mentalo:Initialize() SVUI_MentaloPrecisionLeftButton:SetButtonTemplate() SVUI_MentaloPrecisionRightButton:SetButtonTemplate() - self.Anchors = LibSuperVillain:NewCache("Anchors") + SV.cache.Anchors = SV.cache.Anchors or {} for name, _ in pairs(self.Frames)do local parent, text, overlay, snapoffset, postdrag; diff --git a/Interface/AddOns/SVUI_ChatOMatic/Loader.lua b/Interface/AddOns/SVUI_ChatOMatic/Loader.lua index a303795..fe4dfea 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_ChatOMatic/Loader.lua @@ -32,6 +32,8 @@ CONFIG DATA ]]-- SV.configs[Schema] = { ["enable"] = true, + ["saveChats"] = true, + ["service"] = true, ["autoAnswer"] = false, ["prefix"] = true } @@ -40,8 +42,24 @@ SV.configs[Schema] = { CONFIG OPTIONS ########################################################## ]]-- -SV.Options.args.plugins.args.pluginOptions.args[Schema].args["autoAnswer"] = { +SV.Options.args.plugins.args.pluginOptions.args[Schema].args["saveChats"] = { order = 2, + name = "Save Chat History", + type = "toggle", + get = function(key) return SV.db[Schema][key[#key]] end, + set = function(key,value) SV.db[Schema][key[#key]] = value end +} + +SV.Options.args.plugins.args.pluginOptions.args[Schema].args["service"] = { + order = 3, + name = "Answering Service", + type = "toggle", + get = function(key) return SV.db[Schema][key[#key]] end, + set = function(key,value) SV.db[Schema][key[#key]] = value end +} + +SV.Options.args.plugins.args.pluginOptions.args[Schema].args["autoAnswer"] = { + order = 4, name = "Auto Answer", type = "toggle", get = function(key) return SV.db[Schema][key[#key]] end, @@ -49,7 +67,7 @@ SV.Options.args.plugins.args.pluginOptions.args[Schema].args["autoAnswer"] = { } SV.Options.args.plugins.args.pluginOptions.args[Schema].args["prefix"] = { - order = 3, + order = 5, name = "Prefix Messages", type = "toggle", get = function(key) return SV.db[Schema][key[#key]] end, diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua index 5b1397b..78a9038 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua +++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.lua @@ -20,864 +20,36 @@ LOCALIZED LUA FUNCTIONS local _G = _G; local unpack = _G.unpack; local select = _G.select; -local pairs = _G.pairs; -local ipairs = _G.ipairs; -local type = _G.type; -local error = _G.error; -local pcall = _G.pcall; -local assert = _G.assert; -local tostring = _G.tostring; -local tonumber = _G.tonumber; -local tinsert = _G.tinsert; -local string = _G.string; -local math = _G.math; -local table = _G.table; ---[[ STRING METHODS ]]-- -local lower, upper = string.lower, string.upper; -local find, format, len, split = string.find, string.format, string.len, string.split; -local match, sub, join = string.match, string.sub, string.join; -local gmatch, gsub = string.gmatch, string.gsub; ---[[ MATH METHODS ]]-- -local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round; -- Basic -local random = math.random; -- Uncommon ---[[ TABLE METHODS ]]-- -local tremove, tcopy, twipe = table.remove, table.copy, table.wipe; --[[ ########################################################## GET ADDON DATA ########################################################## ]]-- local PLUGIN = select(2, ...) - local Schema = PLUGIN.Schema; -local PlayersName = UnitName("player") - local SV = _G["SVUI"] local L = SV.L --[[ ########################################################## -LOCAL VARS -########################################################## -]]-- -local playerName = UnitName("player"); -local playerRealm = GetRealmName(); - -local ConjugationKeys = {[1]={[1]="are",[2]="am",[3]="were",[4]="was",[5]="I",[6]="me",[7]="you",[8]="my",[9]="your",[10]="mine",[11]="your's",[12]="I'm",[13]="you're",[14]="I've",[15]="you've",[16]="I'll",[17]="you'll",[18]="myself",[19]="yourself"},[2]={[1]="am",[2]="are",[3]="was",[4]="were",[5]="you",[6]="you",[7]="me",[8]="your",[9]="my",[10]="your's",[11]="mine",[12]="you're",[13]="I'm",[14]="you've",[15]="I've",[16]="you'll",[17]="I'll",[18]="yourself",[19]="myself"},[3]={[1]="me am",[2]="am me",[3]="mecan",[4]="can me",[5]="me have",[6]="me will",[7]="will me"},[4]={[1]="I am",[2]="am I",[3]="I can",[4]="can I",[5]="I have",[6]="I will",[7]="will I"}}; -local punctuations = {[1]={pattern="%.",value="."},[2]={pattern=",",value=","},[3]={pattern="!",value="!"},[4]={pattern="%?",value="?"},[5]={pattern=":",value=":"},[6]={pattern=";",value=";"},[7]={pattern="&",value="&"},[8]={pattern="\"",value="\""},[9]={pattern="@",value="@"},[10]={pattern="#",value="#"},[11]={pattern="%(",value="("},[12]={pattern="%)",value=")"}}; - -local PhoneLines = {}; -local ResponseQueue = {}; - -local ICON_FILE = [[Interface\AddOns\SVUI_ChatOMatic\artwork\DOCK-CALL]] -local DEFAULT_GRADIENT = {"VERTICAL", 0.08, 0.08, 0.08, 0.22, 0.22, 0.22} -local GREEN_GRADIENT = {"VERTICAL", 0.08, 0.5, 0, 0.25, 0.9, 0.08} -local YELLOW_GRADIENT = {"VERTICAL", 1, 0.3, 0, 1, 1, 0} ---[[ -########################################################## -DIALOG TABLES -########################################################## -]]-- -local OneLiners = { - [1] = "I've got to sit down and work out where I stand.", - [2] = "If I save time, when do I get it back?", - [3] = "I am not prejudice. I hate everyone equally.", - [4] = "Take my advice, I don't use it anyway.", - [5] = "The statement below is true. The statement above is false.", - [6] = "As I said before, I never repeat myself.", - [7] = "If at first you don't succeed, avoid skydiving.", - [8] = "War doesn't determine who's right. War determines who's left.", - [9] = "Best way to prevent a hangover is to stay drunk.", - [10] = "Doesn't expecting the unexpected make the unexpected become the expected?", - [11] = "I was born intelligent... education ruined me.", - [12] = "A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station... What more can I say?", - [13] = "If it's true that we are here to help others, then, what exactly are the others here for?", - [14] = "Since light travels faster than sound, people appear bright Until you hear them speak.", - [15] = "How come \"abbreviated\" is such a long word?", - [16] = "Living on Earth may be expensive... but it includes an annual free trip around the Sun.", - [17] = "Your future depends on your dreams So go to sleep!", - [18] = "A good discussion is like a miniskirt, short enough to hold interest and long enough to cover the subject.", - [19] = "A good time to keep your mouth shut is when you are in deep water.", - [20] = "How come we choose from just two people for President and 50 for Miss America?", - [21] = "No one ever says \"it's just a game\" when they are winning.", - [22] = "Suicidal twin kills sister by mistake!", - [23] = "He who laughs last thinks slowest!", - [24] = "Always remember you're unique, just like everyone else.", - [25] = "Hard work has a future payoff. Laziness pays off now.", - [26] = "Don't take life too seriously, you won't get out alive.", - [27] = "I don't suffer from insanity. I enjoy every minute of it.", - [28] = "I'm as confused as a baby in a topless bar.", - [29] = "90% of all statistics are made up.", - [30] = "If you can't convince them, confuse them.", - [31] = "If at first you don't succeed, destroy all evidence that you tried" -} - -local Excuse = { - -- OPENERS - [1] = "I'd love to, but ", - [2] = "I'm being told that ", - [3] = "The voices say that ", - [4] = "Hang on a sec ", - [5] = "You should know that ", - [6] = "I just found out that ", - [7] = "I would but ", - [8] = "Umm... ", - [9] = "I don't know about you but ", - [10] = "Can't talk right now, ", - -- PUNCHLINES - [11] = "I have to floss my cat", - [12] = "I've dedicated my life to linguini", - [13] = "I want to spend more time with my blender", - [14] = "the President said he might drop in", - [15] = "the man on television told me to say tuned", - [16] = "I've been scheduled for a karma transplant", - [17] = "I'm staying home to work on my cottage cheese sculpture", - [18] = "it's my parakeet's bowling night", - [19] = "it wouldn't be fair to the other Beautiful People", - [20] = "I'm building a pig from a kit", - [21] = "I did my own thing and now I've got to undo it", - [22] = "I'm enrolled in aerobic scream therapy", - [23] = "there's a disturbance in the Force", - [24] = "I'm doing door-to-door collecting for static cling", - [25] = "I have to go to the post office to see if I'm still wanted", - [26] = "I'm teaching my ferret to yodel", - [27] = "I have to check the freshness dates on my dairy products", - [28] = "I'm going through cherry cheesecake withdrawl", - [29] = "I'm planning to go downtown to try on gloves", - [30] = "my crayons all melted together", - [31] = "I'm trying to see how long I can go without saying yes", - [32] = "I'm in training to be a household pest", - [33] = "I'm getting my overalls overhauled", - [34] = "my patent is pending", - [35] = "I'm attending the opening of my garage door", - [36] = "I'm sandblasting my oven", - [37] = "I'm worried about my vertical hold", - [38] = "I'm going down to the bakery to watch the buns rise", - [39] = "I'm being deported", - [40] = "the grunion are running", - [41] = "I'll be looking for a parking space", - [42] = "my Millard Filmore Fan Club meets then", - [43] = "the monsters haven't turned blue yet, and I have to eat more dots", - [44] = "I'm taking punk totem pole carving", - [45] = "I have to fluff my shower cap", - [46] = "I'm converting my calendar watch from Julian to Gregorian", - [47] = "I've come down with a really horrible case of something or other", - [48] = "I made an appointment with a cuticle specialist", - [49] = "my plot to take over the world is thickening", - [50] = "I have to fulfill my potential", - [51] = "I don't want to leave my comfort zone", - [52] = "it's too close to the turn of the century", - [53] = "I have some real hard words to look up in the dictionary", - [54] = "my subconscious says no", - [55] = "I'm giving nuisance lessons at a convenience store", - [56] = "I left my body in my other clothes", - [57] = "the last time I went, I never came back", - [58] = "I've got a Friends of Rutabaga meeting", - [59] = "I have to answer all of my 'occupant' letters", - [60] = "none of my socks match", - [61] = "I have to be on the next train to Bermuda", - [62] = "I'm having all my plants neutered", - [63] = "people are blaming me for the Spanish-American War", - [64] = "I changed the lock on my door and now I can't get out", - [65] = "I'm making a home movie called 'The Thing That Grew in My Refrigerator'", - [66] = "I'm attending a perfume convention as guest sniffer", - [67] = "my yucca plant is feeling yucky", - [68] = "I'm touring China with a wok band", - [69] = "my chocolate-appreciation class meets that night", - [70] = "I never go out on days that end in 'Y'", - [71] = "my mother would never let me hear the end of it", - [72] = "I'm running off to Yugoslavia with a foreign-exchange student named Basil Metabolism", - [73] = "I just picked up a book called 'Glue in Many Lands' and I can't put it down", - [74] = "I'm too evil for that stuff", - [75] = "I have to torment my hair", - [76] = "I have too much guilt", - [77] = "there are important world issues that need worrying about", - [78] = "I have to draw 'Cubby' for an art scholarship", - [79] = "I'm uncomfortable when I'm alone or with others", - [80] = "I promised to help a friend fold road maps", - [81] = "I feel a song coming on", - [82] = "I'm trying to be less popular", - [83] = "my bathroom tiles need grouting", - [84] = "I have to bleach my hare", - [85] = "I'm waiting to see if I'm already a winner", - [86] = "I'm writing a love letter to Richard Simmons", - [87] = "you know how we psychos are", - [88] = "my favorite commercial is on TV", - [89] = "I have to study for a blood test", - [90] = "I'm going to be old someday", - [91] = "I've been traded to Cincinnati", - [92] = "I'm observing National Apathy Week", - [93] = "I have to rotate my crops", - [94] = "my uncle escaped again", - [95] = "I'm up to my elbows in waxy buildup", - [96] = "I have to knit some dust bunnies for a charity bazaar", - [97] = "I'm having my baby shoes bronzed", - [98] = "I have to go to court for kitty littering", - [99] = "I'm going to count the bristles in my toothbrush", - [100] = "I have to thaw some karate chops for dinner", - [101] = "having fun gives me prickly heat", - [102] = "I'm going to the Missing Persons Bureau to see if anyone is looking for me", - [103] = "I have to jog my memory", - [104] = "my palm reader advised against it", - [105] = "my Dress For Obscurity class meets then", - [106] = "I have to stay home and see if I snore", - [107] = "I prefer to remain an enigma", - [108] = "I think you want the OTHER " .. playerName, - [109] = "I have to sit up with a sick ant", - [110] = "I'm trying to cut down", - [111] = ".. well, maybe", -}; - -local Phrases = { - [1] = "I don't really want to<*", - [2] = "Are you going to<*", - [3] = "I don't know, should I<*", - [4] = "So you are not going to<*", - [5] = "Why don't you<*", - [6] = "So you think I'm<*", - [7] = "What's it to you if I'm<*", - [8] = "Did you wanna<*", - [9] = "Do you wanna<*", - [10] = "Don't you really<*", - [11] = "Why don't you<*", - [12] = "I bet you can't<*", - [13] = "UMADBRO?", - [14] = "I'm marginally listening.", - [15] = "Let me get this straight, you feel<*", - [16] = "Stop feeling<*", - [17] = "Why would I<*", - [18] = "If your lucky I just might<@", - [19] = "So, your really asking me to<*", - [20] = "Is there a reason why YOU don't<*", - [21] = "Why can't you<*", - [22] = "Why are you interested in whether or not I am<*", - [23] = "Would you prefer if I were not<*", - [24] = "Perhaps in your fantasies I am<*", - [25] = "How do you know you can't<*", - [26] = "Have you tried?", - [27] = "Perhaps you can now<*", - [28] = "Did you come to me because you are<*", - [29] = "How long have you been<*", - [30] = "Do you believe it is normal to be<*", - [31] = "Do you enjoy being<*", - [32] = "We were discussing you, not me.", - [33] = "Oh... <*", - [34] = "Doesn't sound like me though, does it?", - [35] = "How awesome would it be if you got<*", - [36] = "Why do you want<*", - [37] = "Suppose you got<*", - [38] = "What if you never got<*", - [39] = "I sometimes also want<@", - [40] = "Whay are you asking me?", - [41] = "Does it really matter?", - [42] = "Is there a right answer?", - [43] = "What do you think?", - [44] = "You are asking the wrong questions, wanna try again?", - [45] = "What is it that you really want to know?", - [46] = "Who else have you asked?", - [47] = "Am I the first person you have asked this?", - [48] = "Don't you already know the aswer to that?", - [49] = "The names aren't important.", - [50] = "I won't remember any names, do continue.", - [51] = "Is that the real reason?", - [52] = "Don't any other reasons come to mind?", - [53] = "Does that reason explain anything else?", - [54] = "What other reasons might there be?", - [55] = "Please don't apologise!", - [56] = "Apologies are not necessary.", - [57] = "What feelings do you have when you apologise?", - [58] = "Don't be so defensive!", - [59] = "What does that dream suggest to you?", - [60] = "Do you dream often?", - [61] = "What persons appear in your dreams?", - [62] = "Are you disturbed by your dreams?", - [63] = "What?", - [64] = "You don't seem quite certain.", - [65] = "Why the uncertain tone?", - [66] = "Can't you be more positive?", - [67] = "You aren't sure?", - [68] = "Don't you know?", - [69] = "Are you saying no just to be negative?", - [70] = "You are being a bit negative.", - [71] = "Why not?", - [72] = "Are you sure?", - [73] = "Why no?", - [74] = "Why are you concerned about my<*", - [75] = "What about your own<*", - [76] = "Can you think of a specific example?", - [77] = "When?", - [78] = "What are you thinking of?", - [79] = "Really, always?", - [80] = "Think so?", - [81] = "You thought<*", - [82] = "You really think<*", - [83] = "In what way?", - [84] = "What resemblence do you see?", - [85] = "What does the similarity suggest to you?", - [86] = "What other connections do you see?", - [87] = "Could there really be some connection?", - [88] = "How?", - [89] = "You seem quite positive.", - [90] = "ORLY?", - [91] = "OIC.", - [92] = "Word.", - [93] = "You dont have any friends.", - [94] = "Why would I care about your friends?", - [95] = "Are you sure you know what 'friend' means?", - [96] = "Are you sure you have any friends?", - [97] = "Do your friends usually get really quiet when you are around?", - [98] = "I'm willing to bet your friends hate you.", - [99] = "Who still uses the word noob?", - [100] = "Are you talking about me specifically?", - [101] = "I dunno. What are YOU doing?", - [102] = "Would't you like to know?", - [103] = "What do you think?", - [104] = "I'm guessing you want something from me?", - [105] = "I'm playing World of Warcraft... you seriously didn't know that?", - [106] = "No kidding? Fo' realz? That's dope fresh son!", - [107] = "And what did you learn?", - [108] = "Gotcha.", - [109] = "MmmmHmmm", - [110] = "I don't follow...", - [111] = "I'm gonna need a bit more context. Do you know what context means?", - [112] = "Wow... just ...wow.", - [113] = "Same question huh?", - [114] = "Deja Vu!", - [115] = "Yeah, lets try this again shall we?", - [116] = "Have you recently suffered a head injury?", - [117] = "Im hearing an echo I think....", - [118] = "Cant all classes heal themselves now?", - [119] = "Bandages FTW!", - [120] = "Why are you asking me?", - [121] = "Thats adorable how excited you are about it!", - [122] = "What do you think?", - [123] = "What is it that you really want to know?", - [124] = "What is your level?", - [125] = "Is this your first character?", - [126] = "Most guilds are just full of high school kids with nothing better to do.", - [127] = "What is a guild?", - [128] = "What is the name?", - [129] = "Oh really?", - [130] = "Great story.", - [131] = "Meh.", - [132] = "No clue." -}; - -local Responses = { - [1] = {Key = "**NO KEY**", Question = false, Dialog = {106,107,108,109,110,111,112,129,130,131,132}}, - [2] = {Key = "**REPEAT**", Question = false, Dialog = {113,114,115,116,117}}, - [3] = {Key = "YOU'RE", Question = false, Dialog = {6,7,8,9}}, - [4] = {Key = "I DON'T", Question = false, Dialog = {10,11,12,13}}, - [5] = {Key = "I FEEL", Question = false, Dialog = {14,15,16 }}, - [6] = {Key = "WHY DON'T YOU", Question = false, Dialog = {17,18,19}}, - [7] = {Key = "WHY CAN'T I", Question = false, Dialog = {20,21 }}, - [8] = {Key = "ARE YOU", Question = false, Dialog = {22,23,24}}, - [9] = {Key = "I CAN'T", Question = false, Dialog = {25,26,27}}, - [10] = {Key = "I AM", Question = false, Dialog = {28,29,30,31}}, - [11] = {Key = "I'M", Question = false, Dialog = {28,29,30,31}}, - [12] = {Key = "YOU", Question = false, Dialog = {32,33,34}}, - [13] = {Key = "I WANT", Question = false, Dialog = {35,36,37,38,39 }}, - [14] = {Key = "WHAT", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [15] = {Key = "HOW", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [16] = {Key = "WHO", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [17] = {Key = "WHERE", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [18] = {Key = "WHEN", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [19] = {Key = "WHY", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, - [20] = {Key = "NAME", Question = false, Dialog = {49,50}}, - [21] = {Key = "CAUSE", Question = false, Dialog = {51,52,53,54}}, - [22] = {Key = "SORRY", Question = false, Dialog = {55,56,57,58}}, - [23] = {Key = "DREAM", Question = false, Dialog = {59,60,61,62}}, - [24] = {Key = "HELLO", Question = false, Dialog = {63}}, - [25] = {Key = "HI", Question = false, Dialog = {63}}, - [26] = {Key = "MAYBE", Question = false, Dialog = {64,65,66,67,68}}, - [27] = {Key = "NO", Question = false, Dialog = {69,70,71,72,73}}, - [28] = {Key = "YOUR", Question = false, Dialog = {74,75}}, - [29] = {Key = "ALWAYS", Question = false, Dialog = {76,77,78,79}}, - [30] = {Key = "THINK", Question = false, Dialog = {80,81,82}}, - [31] = {Key = "ALIKE", Question = false, Dialog = {83,84,85,86,87,88,89}}, - [32] = {Key = "YES", Question = false, Dialog = {90,91,92}}, - [33] = {Key = "FRIEND", Question = false, Dialog = {93,94,95,96,97,98}}, - [34] = {Key = "NOOB", Question = false, Dialog = {99}}, - [35] = {Key = "CAN I", Question = false, Dialog = {4,5}}, - [36] = {Key = "CAN YOU", Question = false, Dialog = {1,2,3}}, - [37] = {Key = "WILL YOU", Question = false, Dialog = {1,2,3}}, - [38] = {Key = "WOULD YOU", Question = false, Dialog = {1,2,3}}, - [39] = {Key = "COULD YOU", Question = false, Dialog = {1,2,3}}, - [40] = {Key = "YOU ARE", Question = false, Dialog = {6,7,8,9 }}, - [41] = {Key = "HEALER", Question = false, Dialog = {118,119}}, - [42] = {Key = "HOLY", Question = false, Dialog = {118,119}}, - [43] = {Key = "RESTORATION", Question = false, Dialog = {118,119}}, - [44] = {Key = "HEAL", Question = false, Dialog = {118,119}}, - [45] = {Key = "PORT", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [46] = {Key = "PORTAL", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [47] = {Key = "WATER", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [48] = {Key = "FOOD", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [49] = {Key = "MONEY", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [50] = {Key = "GOLD", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, - [51] = {Key = "PVP", Question = false, Dialog = {120,121,122,123,124,125}}, - [52] = {Key = "RAID", Question = false, Dialog = {120,121,122,123,124,125}}, - [53] = {Key = "KNOW", Question = false, Dialog = {64,65,66,67,68}}, - [54] = {Key = "POSSIBLE", Question = false, Dialog = {64,65,66,67,68}}, - [55] = {Key = "WTF", Question = false, Dialog = {64,65,66,67,68}}, - [56] = {Key = "LOL", Question = false, Dialog = {64,65,66,67,68}}, - [57] = {Key = "GUILD", Question = false, Dialog = {126,127,128}}, - [58] = {Key = "TOON", Question = false, Dialog = {49,50}}, - [59] = {Key = "CHARACTER", Question = false, Dialog = {49,50}}, - [60] = {Key = "PLAYER", Question = false, Dialog = {49,50}}, - [61] = {Key = "DOING", Question = false, Dialog = {100,101,102,103,104,105}}, - [62] = {Key = "UP TO", Question = false, Dialog = {100,101,102,103,104,105}}, -}; ---[[ -########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local function ServiceMessage(msg) - local msgFrom = SV.db[Schema].prefix == true and "Minion Answering Service" or ""; - print("|cffffcc1a" .. msgFrom .. ":|r", msg) -end - -local function ClearResponses(caller) - for x = 1, #ResponseQueue, 1 do - if ResponseQueue[x] then - if ResponseQueue[x].CID == caller then - tremove(ResponseQueue, x) - end - end - end -end - -local function RemoveCaller(caller) - ClearResponses(caller) - - if PhoneLines[caller] then - local data = PhoneLines[caller] - local btn = _G["HenchmenPhoneLine"..data.Line]; - btn.Text:SetText("Empty Phone Line"); - btn:SetPanelColor("default"); - PhoneLines[caller] = nil - ServiceMessage("Caller ("..caller..") was disconnected."); - end -end ---[[ -########################################################## -MESSAGE PROCESSING -########################################################## -]]-- -do - local function Conjugate(parse) - for i,cj in pairs(ConjugationKeys[1]) do - parse = gsub(parse, cj, "#@&"..i) - end - for i,cj in pairs(ConjugationKeys[2]) do - parse = gsub(parse, "#@&"..i, cj) - end - for i,cj in pairs(ConjugationKeys[3]) do - parse = gsub(parse, cj, "#@&"..i) - end - for i,cj in pairs(ConjugationKeys[4]) do - parse = gsub(parse, "#@&"..i, cj) - end - return parse - end - - local function PadString(strng) - aString = " "..strng.." " - for i = 1, 12, 1 do - aString = gsub(aString, punctuations[i].pattern, " "..punctuations[i].value.." ") - end - return " "..aString.." " - end - - local function UnPadString(strng) - aString = strng - aString = gsub(aString, " ", " ") - if sub(aString, 1, 1) == " " then - aString = sub(aString, 2) - end - if sub(aString, -1, -1) == " " then - aString = sub(aString, 1, len(aString)-1) - end - for i = 1, 12, 1 do - aString = gsub(aString, " "..punctuations[i].pattern, punctuations[i].value) - end - return aString - end - - local function TrimString(orgString, unpad) - local tmpChars = ".,!?:;&\"@#()^$+-%= " - local x = 1 - local found = true - - if(unpad) then - orgString = UnPadString(orgString) - end - - while found == true do - local tchar = sub(orgString, -(x), -(x)) - if tchar == "(" or tchar == ")" or tchar == "." or tchar == "%" or tchar == "+" or tchar == "-" or tchar == "*" or tchar == "?" or tchar == "[" or tchar == "]" or tchar == "^" or tchar == "$" then - tchar = "%"..tchar - end - found = find(tchar,tmpChars) and (len(orgString) - x) > 0 - x = x + 1 - end - x = x - 1 - if (len(orgString) - x) > 0 then - orgString = sub(orgString, 1, len(orgString) - x + 1) - end - x = 1 - while find(sub(orgString, x, x),tmpChars) and (len(orgString) - x) > 0 do - x = x + 1 - end - if (len(orgString) - x) > 0 then - orgString = sub(orgString, x) - end - return orgString - end - - local function PhraseSearch(sString, keyid, data) - local thisstr = ""; - local phrase; - local wordkey = Responses[keyid].Key; - local links = Responses[keyid].Dialog; - idrange = #links - if idrange > 1 then - while(not phrase) do - local mod = floor(random(1, idrange)) - if links[mod] ~= data.LastKey then - phrase = Phrases[links[mod]] - data.LastKey = links[mod] - end - end - else - data.LastKey = 1 - end - local tempt = sub(phrase, -1, -1) - local sTemp = "" - if tempt == "*" or tempt == "@" then - sTemp = PadString(sString) - local wTemp = upper(sTemp) - local strpstr = find(wTemp, " "..wordkey.." ") - if not strpstr then - strpstr = find(wTemp, " "..wordkey) - end - if not strpstr then - strpstr = find(wTemp, wordkey.." ") - end - strpstr = strpstr + len(wordkey) + 1 - thisstr = Conjugate(sub(sTemp, strpstr)) - thisstr = TrimString(thisstr, true) - if tempt == "*" then - sTemp = gsub(phrase, "<%*", " "..thisstr.."?") - else - sTemp = gsub(phrase, "<@", " "..thisstr..".") - end - else - sTemp = phrase - end - return sTemp - end - - local function KeywordSearch(wString) - for k, v in gmatch(wString, "([%w']+ [%w']+ [%w']+ [%w']+ [%w']+)") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - for k, v in gmatch(wString, "([%w']+ [%w']+ [%w']+ [%w']+)") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - for k, v in gmatch(wString, "([%w']+ [%w']+ [%w']+)") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - for k, v in gmatch(wString, "([%w']+ [%w']+)") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - for k, v in gmatch(wString, "([%w]-) ") do - for x = 1, 62, 1 do - if Responses[x].Key == k then - return x - end - end - end - return 1 - end - - local function MakeExcuse(sInput) - local joke = random(100) - if(joke <= 31) then - return OneLiners[joke]; - end - local word_list = {} - for k, v in gmatch(sInput, "([%w']+)") do - tinsert(word_list, k) - end - local tBestQuotes = {} - local mxWords = 0 - for x = 11, 101, 1 do - local count = 0 - for y = 1, #word_list, 1 do - if find(Excuse[x], word_list[y]) then - count = count + 1 - end - end - if count > mxWords then - tBestQuotes = {} - mxWords = count - tinsert(tBestQuotes, x) - elseif count == mxWords then - tinsert(tBestQuotes, x) - end - end - - local response = Excuse[random(1,10)] - local mod = random(11,101) - if #tBestQuotes > 0 then - mod = tBestQuotes[random(#tBestQuotes)] - end - response = response .. Excuse[mod] - return response; - end - - local function MessageBuilder(data, inbound) - local sInput = TrimString(inbound); - local outbound; - local mapkey = 1; - if sInput ~= "" and sInput ~= " " and sInput ~= " " and sInput ~= "." and sInput ~= "," then - local wInput = PadString(upper(sInput)); - mapkey = KeywordSearch(wInput); - if Responses[mapkey].Question == true then - if sub(inbound, -1, -1) ~= "?" then - mapkey = 1 - end - end - if(inbound == data.InBound or inbound == data.OutBound) then - mapkey = 2 - elseif mapkey == 1 then - if data.FirstResponse == true then - outbound = ":)"; - else - if(20 >= random(100)) then - outbound = MakeExcuse(sInput) - end - end - end - data.FirstResponse = false - end - if(not outbound) then - outbound = PhraseSearch(sInput, mapkey, data) - end - if(SV.db[Schema].prefix == true) then - return ("%s's Answering Service: %s"):format(PlayersName, outbound) - else - return outbound - end - end - - function PLUGIN:TakeAMessage(caller, inbound) - ClearResponses(caller) - local data = PhoneLines[caller]; - if(data) then - if(data.InUse) then - local data = PhoneLines[caller]; - local outbound = MessageBuilder(data, inbound) - data.OutBound = outbound - local tm = (floor(GetTime()) + ((len(outbound)/400) * 60)); - tinsert(ResponseQueue, {["ETA"] = tm, ["MSG"] = outbound, ["CID"] = caller}) - end - data.InBound = inbound - data.TimeStamp = GetTime() - end - end -end - -function PLUGIN:AddCaller(caller) - local state_text = "now on hold."; - local call_answered = false - PhoneLines[caller] = { - Line = 1, - InUse = false, - FirstResponse = true, - Caller = caller, - InBound = "", - OutBound = "", - LastKey = 1, - TimeStamp = 0 - }; - for x = 1, 5, 1 do - local btn = _G["HenchmenPhoneLine"..x]; - if(btn.Text:GetText() ~= caller) then - btn.Text:SetText(caller); - PhoneLines[caller].Line = x - call_answered = true - if SV.db[Schema].autoAnswer == true then - PhoneLines[caller].InUse = true; - btn:SetPanelColor("green"); - self.Docklet:SetPanelColor("green"); - self.Docklet.stateColor = GREEN_GRADIENT - state_text = "on the line."; - PlaySoundFile("Sound\\interface\\iQuestUpdate.wav") - end - break; - end - end - if(not call_answered) then - ServiceMessage("All lines are busy. New caller ("..caller..") was disconnected.") - else - ServiceMessage("New caller ("..caller..") is "..state_text) - end -end - -function PLUGIN:GetServiceState() - local inUse = false - local onHold = false - for x = 1, 5, 1 do - local btn = _G["HenchmenPhoneLine"..x]; - local caller = btn.Text:GetText() - if(PhoneLines[caller]) then - inUse = true - if(not PhoneLines[caller].InUse) then - onHold = true - end - end - end - - if inUse then - if onHold then - self.Docklet:SetPanelColor("yellow") - self.Docklet.icon:SetGradient(unpack(YELLOW_GRADIENT)) - self.Docklet.stateColor = YELLOW_GRADIENT - else - self.Docklet:SetPanelColor("green") - self.Docklet.icon:SetGradient(unpack(GREEN_GRADIENT)) - self.Docklet.stateColor = GREEN_GRADIENT - end - else - self.Docklet:SetPanelColor("default") - self.Docklet.stateColor = DEFAULT_GRADIENT - end - return inUse,onHold -end - -function PLUGIN:HangUp(caller,ignored) - RemoveCaller(caller) - local inUse,onHold = self:GetServiceState() - - if inUse == false then - self.Window:Hide() - elseif onHold == true then - self.Window:Show() - else - self.Window:Show() - end - - if(ignored) then - ServiceMessage(caller.." is now ignoring you! MwaaHaHa!") - PlaySoundFile("Sound\\interface\\RaidWarning.wav") - end -end ---[[ -########################################################## EVENTS ########################################################## ]]-- -function PLUGIN:PhoneTimeUpdate() - local timer = 300; - local ttime = GetTime() - if #ResponseQueue > 0 then - for x = 1, #ResponseQueue, 1 do - if ResponseQueue[x] then - if ResponseQueue[x].ETA < ttime then - SendChatMessage(ResponseQueue[x].MSG, "WHISPER", nil, ResponseQueue[x].CID) - tremove(ResponseQueue, x) - end - end - end - end - if ttime > timer then - for x = 1, 5, 1 do - local btn = _G["HenchmenPhoneLine"..x]; - local caller = btn.Text:GetText() - if(PhoneLines[caller]) then - if PhoneLines[caller].TimeStamp < (ttime - timer) then - self:HangUp(caller) - end - end - end - end -end - -function PLUGIN:CHAT_MSG_IGNORED(event, inbound_message, caller, ...) - if(PhoneLines[caller] and PhoneLines[caller].InUse) then - self:HangUp(caller,true) +function PLUGIN:CHAT_MSG_WHISPER(event, ...) + if(SV.db.SVChat.enable and SV.db[Schema].saveChats) then + self:SAVE_CHAT_HISTORY(event, ...) end -end - -function PLUGIN:CHAT_MSG_WHISPER(event, inbound_message, caller) - if not UnitIsAFK("player") and not UnitIsDND("player") then - if (not PhoneLines[caller]) then - self:AddCaller(caller) - end - self:TakeAMessage(caller, inbound_message) + if(SV.db[Schema].service) then + self:AUTO_MSG_WHISPER(event, ...) end end -function PLUGIN:CHAT_MSG_BN_WHISPER(event, inbound_message, sender, _, _, _, _, _, _, _, _, _, _, presenceID) - if(not presenceID) then return end - if not UnitIsAFK("player") and not UnitIsDND("player") then - local _, bnToon = BNGetToonInfo(presenceID); - local caller = bnToon or sender; - if (not PhoneLines[caller]) then - self:AddCaller(caller) - end - self:TakeAMessage(caller, inbound_message) - end -end ---[[ -########################################################## -OTHER HANDLERS -########################################################## -]]-- -local AnsweringOnClick = function() - if(not PLUGIN.Window) then return end - if(PLUGIN.Window:IsShown()) then - PLUGIN.Window:Hide() - else - PLUGIN.Window:Show() +function PLUGIN:CHAT_MSG_BN_WHISPER(event, ...) + if(SV.db.SVChat.enable and SV.db[Schema].saveChats) then + self:SAVE_CHAT_HISTORY(event, ...) end -end - -local PhoneLineClick = function(self, button) - local caller = self.Text:GetText() - if((caller == "Empty Phone Line") or not PhoneLines[caller]) then return; end - if button == "LeftButton" then - if(not PhoneLines[caller].InUse) then - self:SetPanelColor("green"); - PhoneLines[caller].InUse = true - ServiceMessage("Let the torment of "..caller.." begin!") - PLUGIN:TakeAMessage(caller, PhoneLines[caller].InBound) - else - self:SetPanelColor("yellow"); - PhoneLines[caller].InUse = false - ServiceMessage(caller.." is now on hold") - end - elseif button == "RightButton" then - PLUGIN:HangUp(caller) + if(SV.db[Schema].service) then + self:AUTO_MSG_BN_WHISPER(event, ...) end - PLUGIN:GetServiceState() end --[[ ########################################################## @@ -885,85 +57,17 @@ LOAD AND CONSTRUCT ########################################################## ]]-- function PLUGIN:Load() + if not ChatOMatic_Cache then ChatOMatic_Cache = {} end if(not SV.db[Schema].enable) then return end - - SV.db[Schema] = SV.db[Schema] - - self:RegisterEvent("CHAT_MSG_WHISPER") - self:RegisterEvent("CHAT_MSG_BN_WHISPER") - self:RegisterEvent("CHAT_MSG_IGNORED") - self:RegisterUpdate("PhoneTimeUpdate", 4) - - local buttonsize = SuperDockToolBarLeft.currentSize - - local docklet = CreateFrame("Button", nil, UIParent) - docklet:SetParent(SuperDockToolBarLeft) - docklet:Point("LEFT", SuperDockToolBarLeft, "LEFT", 3, 0) - docklet:Size(buttonsize, buttonsize) - docklet:SetFramedButtonTemplate() - docklet.icon = docklet:CreateTexture(nil, "OVERLAY") - docklet.icon:FillInner(docklet,2,2) - docklet.icon:SetTexture(ICON_FILE) - docklet.stateColor = {"VERTICAL", 0.33, 0.25, 0.13, 0.47, 0.39, 0.27} - docklet.TText = L["Show / Hide Phone Lines"] - docklet:RegisterForClicks("AnyUp") - - SV.SVDock:ActivateDockletButton(docklet, AnsweringOnClick) - - SuperDockToolBarLeft:SetWidth(buttonsize + 4) - - self.Docklet = docklet - local window = CreateFrame("Frame", nil, UIParent) - window:SetFrameStrata("MEDIUM") - window:SetWidth(128) - window:SetHeight(145) - window:SetScript("OnDragStart", function(this) this:StartMoving() end) - window:SetScript("OnDragStop", function(this) this:StopMovingOrSizing() end) - window:SetPoint("BOTTOMRIGHT", LeftSuperDock, "TOPRIGHT", 0, 6) - window:SetFixedPanelTemplate("Transparent") - window:SetMovable(true) - window:EnableMouse(true) - window:SetClampedToScreen(true) - window:RegisterForDrag("LeftButton") - - local title = window:CreateFontString("HenchmenOperatorText") - title:SetWidth(128) - title:SetHeight(50) - title:SetFontObject(GameFontNormal) - title:SetTextColor(0.5, 0.5, 1, 1) - title:SetJustifyH("CENTER") - title:SetJustifyV("TOP") - title:SetPoint("TOP", window, "TOP", 0, -2) - title:SetText("Henchman Answering Service") - - for x = 1, 5, 1 do - local phLn = CreateFrame("Button", "HenchmenPhoneLine"..x, window) - phLn:SetWidth(124) - phLn:SetHeight(20) - phLn:SetPoint("TOPLEFT", window, "TOPLEFT", 2, ((-16) - (x * 21))) - phLn:RegisterForClicks("AnyUp") - phLn:SetScript("OnClick", PhoneLineClick) - phLn:SetFixedPanelTemplate("Button") - phLn.Text = phLn:CreateFontString() - phLn.Text:SetWidth(124) - phLn.Text:SetHeight(20) - phLn.Text:SetFontObject(GameFontNormalSmall) - phLn.Text:SetTextColor(1, 1, 1, 1) - phLn.Text:SetJustifyH("CENTER") - phLn.Text:SetJustifyV("MIDDLE") - phLn.Text:SetPoint("TOP", "HenchmenPhoneLine"..x, "TOP") - phLn.Text:SetText("Empty Phone Line") + if(SV.db.SVChat.enable and SV.db[Schema].saveChats) then + self:EnableChatHistory() end - - self.Window = window - self.Window:Hide() - local strMsg - if SV.db[Schema].autoAnswer == true then - strMsg = "The Henchmen Operators Are Screening Your Calls.." - else - strMsg = "The Henchmen Operators Are Standing By.." + if(SV.db[Schema].service) then + self:EnableAnsweringService() end - SV:AddonMessage(strMsg) + + self:RegisterEvent("CHAT_MSG_WHISPER") + self:RegisterEvent("CHAT_MSG_BN_WHISPER") end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc index b0f87ae..b061970 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc +++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.toc @@ -2,7 +2,9 @@ ## Author: Munglunch ## Version: 4.8 ## Title: |cffFF9900SVUI |r|cffFFEF00Chat-O-Matic|r -## Notes: Supervillain UI [|cff9911FFAuto-Chat Gadgets|r] +## Notes: Supervillain UI [|cff9911FFVarious Chat Gadgets|r] +## SavedVariables: ChatOMatic_Data +## SavedVariablesPerCharacter: ChatOMatic_Cache ## RequiredDeps: SVUI ## LoadOnDemand: 1 ## X-Email: munglunch@gmail.com diff --git a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.xml b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.xml index 24ce5a6..18a0238 100644 --- a/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.xml +++ b/Interface/AddOns/SVUI_ChatOMatic/SVUI_ChatOMatic.xml @@ -1,4 +1,5 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Script file='Loader.lua'/> <Script file='SVUI_ChatOMatic.lua'/> + <Include file='components\_load.xml'/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ChatOMatic/components/_load.xml b/Interface/AddOns/SVUI_ChatOMatic/components/_load.xml new file mode 100644 index 0000000..8889662 --- /dev/null +++ b/Interface/AddOns/SVUI_ChatOMatic/components/_load.xml @@ -0,0 +1,4 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file="answering_service.lua"/> + <Script file="chat_history.lua"/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua b/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua new file mode 100644 index 0000000..3830b53 --- /dev/null +++ b/Interface/AddOns/SVUI_ChatOMatic/components/answering_service.lua @@ -0,0 +1,968 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local ipairs = _G.ipairs; +local type = _G.type; +local error = _G.error; +local pcall = _G.pcall; +local assert = _G.assert; +local tostring = _G.tostring; +local tonumber = _G.tonumber; +local tinsert = _G.tinsert; +local string = _G.string; +local math = _G.math; +local table = _G.table; +--[[ STRING METHODS ]]-- +local lower, upper = string.lower, string.upper; +local find, format, len, split = string.find, string.format, string.len, string.split; +local match, sub, join = string.match, string.sub, string.join; +local gmatch, gsub = string.gmatch, string.gsub; +--[[ MATH METHODS ]]-- +local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round; -- Basic +local random = math.random; -- Uncommon +--[[ TABLE METHODS ]]-- +local tremove, tcopy, twipe = table.remove, table.copy, table.wipe; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local PLUGIN = select(2, ...) + +local Schema = PLUGIN.Schema; +local PlayersName = UnitName("player") + +local SV = _G["SVUI"] +local L = SV.L +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local playerName = UnitName("player"); +local playerRealm = GetRealmName(); + +local ConjugationKeys = {[1]={[1]="are",[2]="am",[3]="were",[4]="was",[5]="I",[6]="me",[7]="you",[8]="my",[9]="your",[10]="mine",[11]="your's",[12]="I'm",[13]="you're",[14]="I've",[15]="you've",[16]="I'll",[17]="you'll",[18]="myself",[19]="yourself"},[2]={[1]="am",[2]="are",[3]="was",[4]="were",[5]="you",[6]="you",[7]="me",[8]="your",[9]="my",[10]="your's",[11]="mine",[12]="you're",[13]="I'm",[14]="you've",[15]="I've",[16]="you'll",[17]="I'll",[18]="yourself",[19]="myself"},[3]={[1]="me am",[2]="am me",[3]="mecan",[4]="can me",[5]="me have",[6]="me will",[7]="will me"},[4]={[1]="I am",[2]="am I",[3]="I can",[4]="can I",[5]="I have",[6]="I will",[7]="will I"}}; +local punctuations = {[1]={pattern="%.",value="."},[2]={pattern=",",value=","},[3]={pattern="!",value="!"},[4]={pattern="%?",value="?"},[5]={pattern=":",value=":"},[6]={pattern=";",value=";"},[7]={pattern="&",value="&"},[8]={pattern="\"",value="\""},[9]={pattern="@",value="@"},[10]={pattern="#",value="#"},[11]={pattern="%(",value="("},[12]={pattern="%)",value=")"}}; + +local PhoneLines = {}; +local ResponseQueue = {}; + +local ICON_FILE = [[Interface\AddOns\SVUI_ChatOMatic\artwork\DOCK-CALL]] +local DEFAULT_GRADIENT = {"VERTICAL", 0.08, 0.08, 0.08, 0.22, 0.22, 0.22} +local GREEN_GRADIENT = {"VERTICAL", 0.08, 0.5, 0, 0.25, 0.9, 0.08} +local YELLOW_GRADIENT = {"VERTICAL", 1, 0.3, 0, 1, 1, 0} +--[[ +########################################################## +DIALOG TABLES +########################################################## +]]-- +local OneLiners = { + [1] = "I've got to sit down and work out where I stand.", + [2] = "If I save time, when do I get it back?", + [3] = "I am not prejudice. I hate everyone equally.", + [4] = "Take my advice, I don't use it anyway.", + [5] = "The statement below is true. The statement above is false.", + [6] = "As I said before, I never repeat myself.", + [7] = "If at first you don't succeed, avoid skydiving.", + [8] = "War doesn't determine who's right. War determines who's left.", + [9] = "Best way to prevent a hangover is to stay drunk.", + [10] = "Doesn't expecting the unexpected make the unexpected become the expected?", + [11] = "I was born intelligent... education ruined me.", + [12] = "A bus station is where a bus stops. A train station is where a train stops. On my desk, I have a work station... What more can I say?", + [13] = "If it's true that we are here to help others, then, what exactly are the others here for?", + [14] = "Since light travels faster than sound, people appear bright Until you hear them speak.", + [15] = "How come \"abbreviated\" is such a long word?", + [16] = "Living on Earth may be expensive... but it includes an annual free trip around the Sun.", + [17] = "Your future depends on your dreams So go to sleep!", + [18] = "A good discussion is like a miniskirt, short enough to hold interest and long enough to cover the subject.", + [19] = "A good time to keep your mouth shut is when you are in deep water.", + [20] = "How come we choose from just two people for President and 50 for Miss America?", + [21] = "No one ever says \"it's just a game\" when they are winning.", + [22] = "Suicidal twin kills sister by mistake!", + [23] = "He who laughs last thinks slowest!", + [24] = "Always remember you're unique, just like everyone else.", + [25] = "Hard work has a future payoff. Laziness pays off now.", + [26] = "Don't take life too seriously, you won't get out alive.", + [27] = "I don't suffer from insanity. I enjoy every minute of it.", + [28] = "I'm as confused as a baby in a topless bar.", + [29] = "90% of all statistics are made up.", + [30] = "If you can't convince them, confuse them.", + [31] = "If at first you don't succeed, destroy all evidence that you tried" +} + +local Excuse = { + -- OPENERS + [1] = "I'd love to, but ", + [2] = "I'm being told that ", + [3] = "The voices say that ", + [4] = "Hang on a sec ", + [5] = "You should know that ", + [6] = "I just found out that ", + [7] = "I would but ", + [8] = "Umm... ", + [9] = "I don't know about you but ", + [10] = "Can't talk right now, ", + -- PUNCHLINES + [11] = "I have to floss my cat", + [12] = "I've dedicated my life to linguini", + [13] = "I want to spend more time with my blender", + [14] = "the President said he might drop in", + [15] = "the man on television told me to say tuned", + [16] = "I've been scheduled for a karma transplant", + [17] = "I'm staying home to work on my cottage cheese sculpture", + [18] = "it's my parakeet's bowling night", + [19] = "it wouldn't be fair to the other Beautiful People", + [20] = "I'm building a pig from a kit", + [21] = "I did my own thing and now I've got to undo it", + [22] = "I'm enrolled in aerobic scream therapy", + [23] = "there's a disturbance in the Force", + [24] = "I'm doing door-to-door collecting for static cling", + [25] = "I have to go to the post office to see if I'm still wanted", + [26] = "I'm teaching my ferret to yodel", + [27] = "I have to check the freshness dates on my dairy products", + [28] = "I'm going through cherry cheesecake withdrawl", + [29] = "I'm planning to go downtown to try on gloves", + [30] = "my crayons all melted together", + [31] = "I'm trying to see how long I can go without saying yes", + [32] = "I'm in training to be a household pest", + [33] = "I'm getting my overalls overhauled", + [34] = "my patent is pending", + [35] = "I'm attending the opening of my garage door", + [36] = "I'm sandblasting my oven", + [37] = "I'm worried about my vertical hold", + [38] = "I'm going down to the bakery to watch the buns rise", + [39] = "I'm being deported", + [40] = "the grunion are running", + [41] = "I'll be looking for a parking space", + [42] = "my Millard Filmore Fan Club meets then", + [43] = "the monsters haven't turned blue yet, and I have to eat more dots", + [44] = "I'm taking punk totem pole carving", + [45] = "I have to fluff my shower cap", + [46] = "I'm converting my calendar watch from Julian to Gregorian", + [47] = "I've come down with a really horrible case of something or other", + [48] = "I made an appointment with a cuticle specialist", + [49] = "my plot to take over the world is thickening", + [50] = "I have to fulfill my potential", + [51] = "I don't want to leave my comfort zone", + [52] = "it's too close to the turn of the century", + [53] = "I have some real hard words to look up in the dictionary", + [54] = "my subconscious says no", + [55] = "I'm giving nuisance lessons at a convenience store", + [56] = "I left my body in my other clothes", + [57] = "the last time I went, I never came back", + [58] = "I've got a Friends of Rutabaga meeting", + [59] = "I have to answer all of my 'occupant' letters", + [60] = "none of my socks match", + [61] = "I have to be on the next train to Bermuda", + [62] = "I'm having all my plants neutered", + [63] = "people are blaming me for the Spanish-American War", + [64] = "I changed the lock on my door and now I can't get out", + [65] = "I'm making a home movie called 'The Thing That Grew in My Refrigerator'", + [66] = "I'm attending a perfume convention as guest sniffer", + [67] = "my yucca plant is feeling yucky", + [68] = "I'm touring China with a wok band", + [69] = "my chocolate-appreciation class meets that night", + [70] = "I never go out on days that end in 'Y'", + [71] = "my mother would never let me hear the end of it", + [72] = "I'm running off to Yugoslavia with a foreign-exchange student named Basil Metabolism", + [73] = "I just picked up a book called 'Glue in Many Lands' and I can't put it down", + [74] = "I'm too evil for that stuff", + [75] = "I have to torment my hair", + [76] = "I have too much guilt", + [77] = "there are important world issues that need worrying about", + [78] = "I have to draw 'Cubby' for an art scholarship", + [79] = "I'm uncomfortable when I'm alone or with others", + [80] = "I promised to help a friend fold road maps", + [81] = "I feel a song coming on", + [82] = "I'm trying to be less popular", + [83] = "my bathroom tiles need grouting", + [84] = "I have to bleach my hare", + [85] = "I'm waiting to see if I'm already a winner", + [86] = "I'm writing a love letter to Richard Simmons", + [87] = "you know how we psychos are", + [88] = "my favorite commercial is on TV", + [89] = "I have to study for a blood test", + [90] = "I'm going to be old someday", + [91] = "I've been traded to Cincinnati", + [92] = "I'm observing National Apathy Week", + [93] = "I have to rotate my crops", + [94] = "my uncle escaped again", + [95] = "I'm up to my elbows in waxy buildup", + [96] = "I have to knit some dust bunnies for a charity bazaar", + [97] = "I'm having my baby shoes bronzed", + [98] = "I have to go to court for kitty littering", + [99] = "I'm going to count the bristles in my toothbrush", + [100] = "I have to thaw some karate chops for dinner", + [101] = "having fun gives me prickly heat", + [102] = "I'm going to the Missing Persons Bureau to see if anyone is looking for me", + [103] = "I have to jog my memory", + [104] = "my palm reader advised against it", + [105] = "my Dress For Obscurity class meets then", + [106] = "I have to stay home and see if I snore", + [107] = "I prefer to remain an enigma", + [108] = "I think you want the OTHER " .. playerName, + [109] = "I have to sit up with a sick ant", + [110] = "I'm trying to cut down", + [111] = ".. well, maybe", +}; + +local Phrases = { + [1] = "I don't really want to<*", + [2] = "Are you going to<*", + [3] = "I don't know, should I<*", + [4] = "So you are not going to<*", + [5] = "Why don't you<*", + [6] = "So you think I'm<*", + [7] = "What's it to you if I'm<*", + [8] = "Did you wanna<*", + [9] = "Do you wanna<*", + [10] = "Don't you really<*", + [11] = "Why don't you<*", + [12] = "I bet you can't<*", + [13] = "UMADBRO?", + [14] = "I'm marginally listening.", + [15] = "Let me get this straight, you feel<*", + [16] = "Stop feeling<*", + [17] = "Why would I<*", + [18] = "If your lucky I just might<@", + [19] = "So, your really asking me to<*", + [20] = "Is there a reason why YOU don't<*", + [21] = "Why can't you<*", + [22] = "Why are you interested in whether or not I am<*", + [23] = "Would you prefer if I were not<*", + [24] = "Perhaps in your fantasies I am<*", + [25] = "How do you know you can't<*", + [26] = "Have you tried?", + [27] = "Perhaps you can now<*", + [28] = "Did you come to me because you are<*", + [29] = "How long have you been<*", + [30] = "Do you believe it is normal to be<*", + [31] = "Do you enjoy being<*", + [32] = "We were discussing you, not me.", + [33] = "Oh... <*", + [34] = "Doesn't sound like me though, does it?", + [35] = "How awesome would it be if you got<*", + [36] = "Why do you want<*", + [37] = "Suppose you got<*", + [38] = "What if you never got<*", + [39] = "I sometimes also want<@", + [40] = "Whay are you asking me?", + [41] = "Does it really matter?", + [42] = "Is there a right answer?", + [43] = "What do you think?", + [44] = "You are asking the wrong questions, wanna try again?", + [45] = "What is it that you really want to know?", + [46] = "Who else have you asked?", + [47] = "Am I the first person you have asked this?", + [48] = "Don't you already know the aswer to that?", + [49] = "The names aren't important.", + [50] = "I won't remember any names, do continue.", + [51] = "Is that the real reason?", + [52] = "Don't any other reasons come to mind?", + [53] = "Does that reason explain anything else?", + [54] = "What other reasons might there be?", + [55] = "Please don't apologise!", + [56] = "Apologies are not necessary.", + [57] = "What feelings do you have when you apologise?", + [58] = "Don't be so defensive!", + [59] = "What does that dream suggest to you?", + [60] = "Do you dream often?", + [61] = "What persons appear in your dreams?", + [62] = "Are you disturbed by your dreams?", + [63] = "What?", + [64] = "You don't seem quite certain.", + [65] = "Why the uncertain tone?", + [66] = "Can't you be more positive?", + [67] = "You aren't sure?", + [68] = "Don't you know?", + [69] = "Are you saying no just to be negative?", + [70] = "You are being a bit negative.", + [71] = "Why not?", + [72] = "Are you sure?", + [73] = "Why no?", + [74] = "Why are you concerned about my<*", + [75] = "What about your own<*", + [76] = "Can you think of a specific example?", + [77] = "When?", + [78] = "What are you thinking of?", + [79] = "Really, always?", + [80] = "Think so?", + [81] = "You thought<*", + [82] = "You really think<*", + [83] = "In what way?", + [84] = "What resemblence do you see?", + [85] = "What does the similarity suggest to you?", + [86] = "What other connections do you see?", + [87] = "Could there really be some connection?", + [88] = "How?", + [89] = "You seem quite positive.", + [90] = "ORLY?", + [91] = "OIC.", + [92] = "Word.", + [93] = "You dont have any friends.", + [94] = "Why would I care about your friends?", + [95] = "Are you sure you know what 'friend' means?", + [96] = "Are you sure you have any friends?", + [97] = "Do your friends usually get really quiet when you are around?", + [98] = "I'm willing to bet your friends hate you.", + [99] = "Who still uses the word noob?", + [100] = "Are you talking about me specifically?", + [101] = "I dunno. What are YOU doing?", + [102] = "Would't you like to know?", + [103] = "What do you think?", + [104] = "I'm guessing you want something from me?", + [105] = "I'm playing World of Warcraft... you seriously didn't know that?", + [106] = "No kidding? Fo' realz? That's dope fresh son!", + [107] = "And what did you learn?", + [108] = "Gotcha.", + [109] = "MmmmHmmm", + [110] = "I don't follow...", + [111] = "I'm gonna need a bit more context. Do you know what context means?", + [112] = "Wow... just ...wow.", + [113] = "Same question huh?", + [114] = "Deja Vu!", + [115] = "Yeah, lets try this again shall we?", + [116] = "Have you recently suffered a head injury?", + [117] = "Im hearing an echo I think....", + [118] = "Cant all classes heal themselves now?", + [119] = "Bandages FTW!", + [120] = "Why are you asking me?", + [121] = "Thats adorable how excited you are about it!", + [122] = "What do you think?", + [123] = "What is it that you really want to know?", + [124] = "What is your level?", + [125] = "Is this your first character?", + [126] = "Most guilds are just full of high school kids with nothing better to do.", + [127] = "What is a guild?", + [128] = "What is the name?", + [129] = "Oh really?", + [130] = "Great story.", + [131] = "Meh.", + [132] = "No clue." +}; + +local Responses = { + [1] = {Key = "**NO KEY**", Question = false, Dialog = {106,107,108,109,110,111,112,129,130,131,132}}, + [2] = {Key = "**REPEAT**", Question = false, Dialog = {113,114,115,116,117}}, + [3] = {Key = "YOU'RE", Question = false, Dialog = {6,7,8,9}}, + [4] = {Key = "I DON'T", Question = false, Dialog = {10,11,12,13}}, + [5] = {Key = "I FEEL", Question = false, Dialog = {14,15,16 }}, + [6] = {Key = "WHY DON'T YOU", Question = false, Dialog = {17,18,19}}, + [7] = {Key = "WHY CAN'T I", Question = false, Dialog = {20,21 }}, + [8] = {Key = "ARE YOU", Question = false, Dialog = {22,23,24}}, + [9] = {Key = "I CAN'T", Question = false, Dialog = {25,26,27}}, + [10] = {Key = "I AM", Question = false, Dialog = {28,29,30,31}}, + [11] = {Key = "I'M", Question = false, Dialog = {28,29,30,31}}, + [12] = {Key = "YOU", Question = false, Dialog = {32,33,34}}, + [13] = {Key = "I WANT", Question = false, Dialog = {35,36,37,38,39 }}, + [14] = {Key = "WHAT", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, + [15] = {Key = "HOW", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, + [16] = {Key = "WHO", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, + [17] = {Key = "WHERE", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, + [18] = {Key = "WHEN", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, + [19] = {Key = "WHY", Question = true, Dialog = {40,41,42,43,44,45,46,47,48}}, + [20] = {Key = "NAME", Question = false, Dialog = {49,50}}, + [21] = {Key = "CAUSE", Question = false, Dialog = {51,52,53,54}}, + [22] = {Key = "SORRY", Question = false, Dialog = {55,56,57,58}}, + [23] = {Key = "DREAM", Question = false, Dialog = {59,60,61,62}}, + [24] = {Key = "HELLO", Question = false, Dialog = {63}}, + [25] = {Key = "HI", Question = false, Dialog = {63}}, + [26] = {Key = "MAYBE", Question = false, Dialog = {64,65,66,67,68}}, + [27] = {Key = "NO", Question = false, Dialog = {69,70,71,72,73}}, + [28] = {Key = "YOUR", Question = false, Dialog = {74,75}}, + [29] = {Key = "ALWAYS", Question = false, Dialog = {76,77,78,79}}, + [30] = {Key = "THINK", Question = false, Dialog = {80,81,82}}, + [31] = {Key = "ALIKE", Question = false, Dialog = {83,84,85,86,87,88,89}}, + [32] = {Key = "YES", Question = false, Dialog = {90,91,92}}, + [33] = {Key = "FRIEND", Question = false, Dialog = {93,94,95,96,97,98}}, + [34] = {Key = "NOOB", Question = false, Dialog = {99}}, + [35] = {Key = "CAN I", Question = false, Dialog = {4,5}}, + [36] = {Key = "CAN YOU", Question = false, Dialog = {1,2,3}}, + [37] = {Key = "WILL YOU", Question = false, Dialog = {1,2,3}}, + [38] = {Key = "WOULD YOU", Question = false, Dialog = {1,2,3}}, + [39] = {Key = "COULD YOU", Question = false, Dialog = {1,2,3}}, + [40] = {Key = "YOU ARE", Question = false, Dialog = {6,7,8,9 }}, + [41] = {Key = "HEALER", Question = false, Dialog = {118,119}}, + [42] = {Key = "HOLY", Question = false, Dialog = {118,119}}, + [43] = {Key = "RESTORATION", Question = false, Dialog = {118,119}}, + [44] = {Key = "HEAL", Question = false, Dialog = {118,119}}, + [45] = {Key = "PORT", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, + [46] = {Key = "PORTAL", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, + [47] = {Key = "WATER", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, + [48] = {Key = "FOOD", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, + [49] = {Key = "MONEY", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, + [50] = {Key = "GOLD", Question = false, Dialog = {40,41,42,43,44,45,46,47,48}}, + [51] = {Key = "PVP", Question = false, Dialog = {120,121,122,123,124,125}}, + [52] = {Key = "RAID", Question = false, Dialog = {120,121,122,123,124,125}}, + [53] = {Key = "KNOW", Question = false, Dialog = {64,65,66,67,68}}, + [54] = {Key = "POSSIBLE", Question = false, Dialog = {64,65,66,67,68}}, + [55] = {Key = "WTF", Question = false, Dialog = {64,65,66,67,68}}, + [56] = {Key = "LOL", Question = false, Dialog = {64,65,66,67,68}}, + [57] = {Key = "GUILD", Question = false, Dialog = {126,127,128}}, + [58] = {Key = "TOON", Question = false, Dialog = {49,50}}, + [59] = {Key = "CHARACTER", Question = false, Dialog = {49,50}}, + [60] = {Key = "PLAYER", Question = false, Dialog = {49,50}}, + [61] = {Key = "DOING", Question = false, Dialog = {100,101,102,103,104,105}}, + [62] = {Key = "UP TO", Question = false, Dialog = {100,101,102,103,104,105}}, +}; +--[[ +########################################################## +LOCAL FUNCTIONS +########################################################## +]]-- +local function ServiceMessage(msg) + local msgFrom = SV.db[Schema].prefix == true and "Minion Answering Service" or ""; + print("|cffffcc1a" .. msgFrom .. ":|r", msg) +end + +local function ClearResponses(caller) + for x = 1, #ResponseQueue, 1 do + if ResponseQueue[x] then + if ResponseQueue[x].CID == caller then + tremove(ResponseQueue, x) + end + end + end +end + +local function RemoveCaller(caller) + ClearResponses(caller) + + if PhoneLines[caller] then + local data = PhoneLines[caller] + local btn = _G["HenchmenPhoneLine"..data.Line]; + btn.Text:SetText("Empty Phone Line"); + btn:SetPanelColor("default"); + PhoneLines[caller] = nil + ServiceMessage("Caller ("..caller..") was disconnected."); + end +end +--[[ +########################################################## +MESSAGE PROCESSING +########################################################## +]]-- +do + local function Conjugate(parse) + for i,cj in pairs(ConjugationKeys[1]) do + parse = gsub(parse, cj, "#@&"..i) + end + for i,cj in pairs(ConjugationKeys[2]) do + parse = gsub(parse, "#@&"..i, cj) + end + for i,cj in pairs(ConjugationKeys[3]) do + parse = gsub(parse, cj, "#@&"..i) + end + for i,cj in pairs(ConjugationKeys[4]) do + parse = gsub(parse, "#@&"..i, cj) + end + return parse + end + + local function PadString(strng) + aString = " "..strng.." " + for i = 1, 12, 1 do + aString = gsub(aString, punctuations[i].pattern, " "..punctuations[i].value.." ") + end + return " "..aString.." " + end + + local function UnPadString(strng) + aString = strng + aString = gsub(aString, " ", " ") + if sub(aString, 1, 1) == " " then + aString = sub(aString, 2) + end + if sub(aString, -1, -1) == " " then + aString = sub(aString, 1, len(aString)-1) + end + for i = 1, 12, 1 do + aString = gsub(aString, " "..punctuations[i].pattern, punctuations[i].value) + end + return aString + end + + local function TrimString(orgString, unpad) + local tmpChars = ".,!?:;&\"@#()^$+-%= " + local x = 1 + local found = true + + if(unpad) then + orgString = UnPadString(orgString) + end + + while found == true do + local tchar = sub(orgString, -(x), -(x)) + if tchar == "(" or tchar == ")" or tchar == "." or tchar == "%" or tchar == "+" or tchar == "-" or tchar == "*" or tchar == "?" or tchar == "[" or tchar == "]" or tchar == "^" or tchar == "$" then + tchar = "%"..tchar + end + found = find(tchar,tmpChars) and (len(orgString) - x) > 0 + x = x + 1 + end + x = x - 1 + if (len(orgString) - x) > 0 then + orgString = sub(orgString, 1, len(orgString) - x + 1) + end + x = 1 + while find(sub(orgString, x, x),tmpChars) and (len(orgString) - x) > 0 do + x = x + 1 + end + if (len(orgString) - x) > 0 then + orgString = sub(orgString, x) + end + return orgString + end + + local function PhraseSearch(sString, keyid, data) + local thisstr = ""; + local phrase; + local wordkey = Responses[keyid].Key; + local links = Responses[keyid].Dialog; + idrange = #links + if idrange > 1 then + while(not phrase) do + local mod = floor(random(1, idrange)) + if links[mod] ~= data.LastKey then + phrase = Phrases[links[mod]] + data.LastKey = links[mod] + end + end + else + data.LastKey = 1 + end + local tempt = sub(phrase, -1, -1) + local sTemp = "" + if tempt == "*" or tempt == "@" then + sTemp = PadString(sString) + local wTemp = upper(sTemp) + local strpstr = find(wTemp, " "..wordkey.." ") + if not strpstr then + strpstr = find(wTemp, " "..wordkey) + end + if not strpstr then + strpstr = find(wTemp, wordkey.." ") + end + strpstr = strpstr + len(wordkey) + 1 + thisstr = Conjugate(sub(sTemp, strpstr)) + thisstr = TrimString(thisstr, true) + if tempt == "*" then + sTemp = gsub(phrase, "<%*", " "..thisstr.."?") + else + sTemp = gsub(phrase, "<@", " "..thisstr..".") + end + else + sTemp = phrase + end + return sTemp + end + + local function KeywordSearch(wString) + for k, v in gmatch(wString, "([%w']+ [%w']+ [%w']+ [%w']+ [%w']+)") do + for x = 1, 62, 1 do + if Responses[x].Key == k then + return x + end + end + end + for k, v in gmatch(wString, "([%w']+ [%w']+ [%w']+ [%w']+)") do + for x = 1, 62, 1 do + if Responses[x].Key == k then + return x + end + end + end + for k, v in gmatch(wString, "([%w']+ [%w']+ [%w']+)") do + for x = 1, 62, 1 do + if Responses[x].Key == k then + return x + end + end + end + for k, v in gmatch(wString, "([%w']+ [%w']+)") do + for x = 1, 62, 1 do + if Responses[x].Key == k then + return x + end + end + end + for k, v in gmatch(wString, "([%w]-) ") do + for x = 1, 62, 1 do + if Responses[x].Key == k then + return x + end + end + end + return 1 + end + + local function MakeExcuse(sInput) + local joke = random(100) + if(joke <= 31) then + return OneLiners[joke]; + end + local word_list = {} + for k, v in gmatch(sInput, "([%w']+)") do + tinsert(word_list, k) + end + local tBestQuotes = {} + local mxWords = 0 + for x = 11, 101, 1 do + local count = 0 + for y = 1, #word_list, 1 do + if find(Excuse[x], word_list[y]) then + count = count + 1 + end + end + if count > mxWords then + tBestQuotes = {} + mxWords = count + tinsert(tBestQuotes, x) + elseif count == mxWords then + tinsert(tBestQuotes, x) + end + end + + local response = Excuse[random(1,10)] + local mod = random(11,101) + if #tBestQuotes > 0 then + mod = tBestQuotes[random(#tBestQuotes)] + end + response = response .. Excuse[mod] + return response; + end + + local function MessageBuilder(data, inbound) + local sInput = TrimString(inbound); + local outbound; + local mapkey = 1; + if sInput ~= "" and sInput ~= " " and sInput ~= " " and sInput ~= "." and sInput ~= "," then + local wInput = PadString(upper(sInput)); + mapkey = KeywordSearch(wInput); + if Responses[mapkey].Question == true then + if sub(inbound, -1, -1) ~= "?" then + mapkey = 1 + end + end + if(inbound == data.InBound or inbound == data.OutBound) then + mapkey = 2 + elseif mapkey == 1 then + if data.FirstResponse == true then + outbound = ":)"; + else + if(20 >= random(100)) then + outbound = MakeExcuse(sInput) + end + end + end + data.FirstResponse = false + end + if(not outbound) then + outbound = PhraseSearch(sInput, mapkey, data) + end + if(SV.db[Schema].prefix == true) then + return ("%s's Answering Service: %s"):format(PlayersName, outbound) + else + return outbound + end + end + + function PLUGIN:TakeAMessage(caller, inbound) + ClearResponses(caller) + local data = PhoneLines[caller]; + if(data) then + if(data.InUse) then + local data = PhoneLines[caller]; + local outbound = MessageBuilder(data, inbound) + data.OutBound = outbound + local tm = (floor(GetTime()) + ((len(outbound)/400) * 60)); + tinsert(ResponseQueue, {["ETA"] = tm, ["MSG"] = outbound, ["CID"] = caller}) + end + data.InBound = inbound + data.TimeStamp = GetTime() + end + end +end + +function PLUGIN:AddCaller(caller) + local state_text = "now on hold."; + local call_answered = false + PhoneLines[caller] = { + Line = 1, + InUse = false, + FirstResponse = true, + Caller = caller, + InBound = "", + OutBound = "", + LastKey = 1, + TimeStamp = 0 + }; + for x = 1, 5, 1 do + local btn = _G["HenchmenPhoneLine"..x]; + if(btn.Text:GetText() ~= caller) then + btn.Text:SetText(caller); + PhoneLines[caller].Line = x + call_answered = true + if SV.db[Schema].autoAnswer == true then + PhoneLines[caller].InUse = true; + btn:SetPanelColor("green"); + self.Docklet:SetPanelColor("green"); + self.Docklet.stateColor = GREEN_GRADIENT + state_text = "on the line."; + PlaySoundFile("Sound\\interface\\iQuestUpdate.wav") + end + break; + end + end + if(not call_answered) then + ServiceMessage("All lines are busy. New caller ("..caller..") was disconnected.") + else + ServiceMessage("New caller ("..caller..") is "..state_text) + end +end + +function PLUGIN:GetServiceState() + local inUse = false + local onHold = false + for x = 1, 5, 1 do + local btn = _G["HenchmenPhoneLine"..x]; + local caller = btn.Text:GetText() + if(PhoneLines[caller]) then + inUse = true + if(not PhoneLines[caller].InUse) then + onHold = true + end + end + end + + if inUse then + if onHold then + self.Docklet:SetPanelColor("yellow") + self.Docklet.icon:SetGradient(unpack(YELLOW_GRADIENT)) + self.Docklet.stateColor = YELLOW_GRADIENT + else + self.Docklet:SetPanelColor("green") + self.Docklet.icon:SetGradient(unpack(GREEN_GRADIENT)) + self.Docklet.stateColor = GREEN_GRADIENT + end + else + self.Docklet:SetPanelColor("default") + self.Docklet.stateColor = DEFAULT_GRADIENT + end + return inUse,onHold +end + +function PLUGIN:HangUp(caller,ignored) + RemoveCaller(caller) + local inUse,onHold = self:GetServiceState() + + if inUse == false then + self.Window:Hide() + elseif onHold == true then + self.Window:Show() + else + self.Window:Show() + end + + if(ignored) then + ServiceMessage(caller.." is now ignoring you! MwaaHaHa!") + PlaySoundFile("Sound\\interface\\RaidWarning.wav") + end +end +--[[ +########################################################## +EVENTS +########################################################## +]]-- +function PLUGIN:PhoneTimeUpdate() + local timer = 300; + local ttime = GetTime() + if #ResponseQueue > 0 then + for x = 1, #ResponseQueue, 1 do + if ResponseQueue[x] then + if ResponseQueue[x].ETA < ttime then + SendChatMessage(ResponseQueue[x].MSG, "WHISPER", nil, ResponseQueue[x].CID) + tremove(ResponseQueue, x) + end + end + end + end + if ttime > timer then + for x = 1, 5, 1 do + local btn = _G["HenchmenPhoneLine"..x]; + local caller = btn.Text:GetText() + if(PhoneLines[caller]) then + if PhoneLines[caller].TimeStamp < (ttime - timer) then + self:HangUp(caller) + end + end + end + end +end + +function PLUGIN:CHAT_MSG_IGNORED(event, inbound_message, caller, ...) + if(PhoneLines[caller] and PhoneLines[caller].InUse) then + self:HangUp(caller,true) + end +end + +function PLUGIN:AUTO_MSG_WHISPER(event, inbound_message, caller) + if not UnitIsAFK("player") and not UnitIsDND("player") then + if (not PhoneLines[caller]) then + self:AddCaller(caller) + end + self:TakeAMessage(caller, inbound_message) + end +end + +function PLUGIN:AUTO_MSG_BN_WHISPER(event, inbound_message, sender, _, _, _, _, _, _, _, _, _, _, presenceID) + if(not presenceID) then return end + if not UnitIsAFK("player") and not UnitIsDND("player") then + local _, bnToon = BNGetToonInfo(presenceID); + local caller = bnToon or sender; + if (not PhoneLines[caller]) then + self:AddCaller(caller) + end + self:TakeAMessage(caller, inbound_message) + end +end +--[[ +########################################################## +OTHER HANDLERS +########################################################## +]]-- +local AnsweringOnClick = function() + if(not PLUGIN.Window) then return end + if(PLUGIN.Window:IsShown()) then + PLUGIN.Window:Hide() + else + PLUGIN.Window:Show() + end +end + +local PhoneLineClick = function(self, button) + local caller = self.Text:GetText() + if((caller == "Empty Phone Line") or not PhoneLines[caller]) then return; end + if button == "LeftButton" then + if(not PhoneLines[caller].InUse) then + self:SetPanelColor("green"); + PhoneLines[caller].InUse = true + ServiceMessage("Let the torment of "..caller.." begin!") + PLUGIN:TakeAMessage(caller, PhoneLines[caller].InBound) + else + self:SetPanelColor("yellow"); + PhoneLines[caller].InUse = false + ServiceMessage(caller.." is now on hold") + end + elseif button == "RightButton" then + PLUGIN:HangUp(caller) + end + PLUGIN:GetServiceState() +end +--[[ +########################################################## +LOAD AND CONSTRUCT +########################################################## +]]-- +function PLUGIN:EnableAnsweringService() + self:RegisterEvent("CHAT_MSG_IGNORED") + self:RegisterUpdate("PhoneTimeUpdate", 4) + + local buttonsize = SuperDockToolBarLeft.currentSize + + local docklet = CreateFrame("Button", nil, UIParent) + docklet:SetParent(SuperDockToolBarLeft) + docklet:Point("LEFT", SuperDockToolBarLeft, "LEFT", 3, 0) + docklet:Size(buttonsize, buttonsize) + docklet:SetFramedButtonTemplate() + docklet.icon = docklet:CreateTexture(nil, "OVERLAY") + docklet.icon:FillInner(docklet,2,2) + docklet.icon:SetTexture(ICON_FILE) + docklet.stateColor = {"VERTICAL", 0.33, 0.25, 0.13, 0.47, 0.39, 0.27} + docklet.TText = L["Show / Hide Phone Lines"] + docklet:RegisterForClicks("AnyUp") + + SV.SVDock:ActivateDockletButton(docklet, AnsweringOnClick) + + SuperDockToolBarLeft:SetWidth(buttonsize + 4) + + self.Docklet = docklet + + local window = CreateFrame("Frame", nil, UIParent) + window:SetFrameStrata("MEDIUM") + window:SetWidth(128) + window:SetHeight(145) + window:SetScript("OnDragStart", function(this) this:StartMoving() end) + window:SetScript("OnDragStop", function(this) this:StopMovingOrSizing() end) + window:SetPoint("BOTTOMRIGHT", LeftSuperDock, "TOPRIGHT", 0, 6) + window:SetFixedPanelTemplate("Transparent") + window:SetMovable(true) + window:EnableMouse(true) + window:SetClampedToScreen(true) + window:RegisterForDrag("LeftButton") + + local title = window:CreateFontString("HenchmenOperatorText") + title:SetWidth(128) + title:SetHeight(50) + title:SetFontObject(GameFontNormal) + title:SetTextColor(0.5, 0.5, 1, 1) + title:SetJustifyH("CENTER") + title:SetJustifyV("TOP") + title:SetPoint("TOP", window, "TOP", 0, -2) + title:SetText("Henchman Answering Service") + + for x = 1, 5, 1 do + local phLn = CreateFrame("Button", "HenchmenPhoneLine"..x, window) + phLn:SetWidth(124) + phLn:SetHeight(20) + phLn:SetPoint("TOPLEFT", window, "TOPLEFT", 2, ((-16) - (x * 21))) + phLn:RegisterForClicks("AnyUp") + phLn:SetScript("OnClick", PhoneLineClick) + phLn:SetFixedPanelTemplate("Button") + phLn.Text = phLn:CreateFontString() + phLn.Text:SetWidth(124) + phLn.Text:SetHeight(20) + phLn.Text:SetFontObject(GameFontNormalSmall) + phLn.Text:SetTextColor(1, 1, 1, 1) + phLn.Text:SetJustifyH("CENTER") + phLn.Text:SetJustifyV("MIDDLE") + phLn.Text:SetPoint("TOP", "HenchmenPhoneLine"..x, "TOP") + phLn.Text:SetText("Empty Phone Line") + end + + self.Window = window + self.Window:Hide() + + local strMsg + if SV.db[Schema].autoAnswer == true then + strMsg = "The Henchmen Operators Are Screening Your Calls.." + else + strMsg = "The Henchmen Operators Are Standing By.." + end + SV:AddonMessage(strMsg) +end + +function PLUGIN:DisableAnsweringService() + self:UnregisterEvent("CHAT_MSG_IGNORED") + self:UnregisterUpdate("PhoneTimeUpdate") +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ChatOMatic/components/chat_history.lua b/Interface/AddOns/SVUI_ChatOMatic/components/chat_history.lua new file mode 100644 index 0000000..d267cb8 --- /dev/null +++ b/Interface/AddOns/SVUI_ChatOMatic/components/chat_history.lua @@ -0,0 +1,154 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local type = _G.type; +local tinsert = _G.tinsert; +local string = _G.string; +local math = _G.math; +local table = _G.table; +--[[ STRING METHODS ]]-- +local format, split = string.format, string.split; +--[[ MATH METHODS ]]-- +local floor, random = math.floor, math.random; +--[[ TABLE METHODS ]]-- +local twipe, tcopy, tsort = table.wipe, table.copy, table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local PLUGIN = select(2, ...) +local Schema = PLUGIN.Schema; + +local SV = _G["SVUI"]; +local L = SV.L; +--[[ +########################################################## +CHAT HISTORY +########################################################## +]]-- +local function MessageTimeStamp() + local timestamp, current; + local actual = time(); + local estimate = GetTime() + if(not estimate) then + current = random(1, 999) + else + current = select(2, ("."):split(estimate, 2)) or 0 + end + timestamp = ("%d.%d"):format(actual, current) + return timestamp; +end + +function PLUGIN:SAVE_CHAT_HISTORY(event, ...) + local temp_cache = {} + for i = 1, select('#', ...) do + temp_cache[i] = select(i, ...) or false + end + if(#temp_cache > 0) then + temp_cache[20] = event + local timestamp = MessageTimeStamp() + local lineNum, lineID = 0 + + self.ChatHistory[timestamp] = temp_cache + + local history = self.ChatHistory + for id, data in pairs(history) do + lineNum = lineNum + 1 + if((not lineID) or lineID > id) then + lineID = id + end + end + + if(lineNum > 128) then + self.ChatHistory[lineID] = nil + end + end + temp_cache = nil +end + +function PLUGIN:PLAYER_ENTERING_WORLD() + local history = self.ChatHistory + local temp_cache, data_cache = {} + for id, _ in pairs(history) do + tinsert(temp_cache, tonumber(id)) + end + tsort(temp_cache, function(a, b) + return a < b + end) + for i = 1, #temp_cache do + data_cache = history[tostring(temp_cache[i])] + if type(data_cache) == "table" and data_cache[20] ~= nil then + ChatFrame_MessageEventHandler(DEFAULT_CHAT_FRAME, data_cache[20], unpack(data_cache)) + end + end + temp_cache = nil + data_cache = nil + self:UnregisterEvent("PLAYER_ENTERING_WORLD") +end + +function PLUGIN:EnableChatHistory() + if not ChatOMatic_Cache["chat"] then ChatOMatic_Cache["chat"] = {} end + + self.ChatHistory = ChatOMatic_Cache["chat"] + + self:RegisterEvent("CHAT_MSG_CHANNEL", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_EMOTE", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_GUILD_ACHIEVEMENT", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_RAID_WARNING", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_SAY", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_YELL", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_WHISPER_INFORM", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_GUILD", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_OFFICER", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_PARTY", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_PARTY_LEADER", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_RAID", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_RAID_LEADER", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_INSTANCE_CHAT", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_INSTANCE_CHAT_LEADER", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_BN_CONVERSATION", "SAVE_CHAT_HISTORY") + self:RegisterEvent("CHAT_MSG_BN_WHISPER_INFORM", "SAVE_CHAT_HISTORY") + self:RegisterEvent("PLAYER_ENTERING_WORLD") +end + +function PLUGIN:DisableChatHistory() + self:UnregisterEvent("CHAT_MSG_CHANNEL") + self:UnregisterEvent("CHAT_MSG_EMOTE") + self:UnregisterEvent("CHAT_MSG_GUILD_ACHIEVEMENT") + self:UnregisterEvent("CHAT_MSG_RAID_WARNING") + self:UnregisterEvent("CHAT_MSG_SAY") + self:UnregisterEvent("CHAT_MSG_YELL") + self:UnregisterEvent("CHAT_MSG_WHISPER_INFORM") + self:UnregisterEvent("CHAT_MSG_GUILD") + self:UnregisterEvent("CHAT_MSG_OFFICER") + self:UnregisterEvent("CHAT_MSG_PARTY") + self:UnregisterEvent("CHAT_MSG_PARTY_LEADER") + self:UnregisterEvent("CHAT_MSG_RAID") + self:UnregisterEvent("CHAT_MSG_RAID_LEADER") + self:UnregisterEvent("CHAT_MSG_INSTANCE_CHAT") + self:UnregisterEvent("CHAT_MSG_INSTANCE_CHAT_LEADER") + self:UnregisterEvent("CHAT_MSG_BN_CONVERSATION") + self:UnregisterEvent("CHAT_MSG_BN_WHISPER_INFORM") + self:UnregisterEvent("PLAYER_ENTERING_WORLD") +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua index a1375b6..9b30328 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua @@ -35,6 +35,7 @@ local Ace3Config = LibStub("AceConfig-3.0"); local Ace3ConfigDialog = LibStub("AceConfigDialog-3.0"); Ace3Config:RegisterOptionsTable(SV.NameID, SV.Options); Ace3ConfigDialog:SetDefaultSize(SV.NameID, 890, 651); + local AceGUI = LibStub("AceGUI-3.0", true); local posOpts = {TOPLEFT='TOPLEFT',LEFT='LEFT',BOTTOMLEFT='BOTTOMLEFT',RIGHT='RIGHT',TOPRIGHT='TOPRIGHT',BOTTOMRIGHT='BOTTOMRIGHT',CENTER='CENTER',TOP='TOP',BOTTOM='BOTTOM'}; local GEAR = SV.SVGear; diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.xml b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.xml index 1157f0d..8eac23d 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.xml +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.xml @@ -2,5 +2,5 @@ <Include file='libs\_load.xml'/> <Include file='language\_load.xml'/> <Script file='SVUI_ConfigOMatic.lua'/> - <Include file='modules\_load.xml'/> + <Include file='components\_load.xml'/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/_load.xml b/Interface/AddOns/SVUI_ConfigOMatic/components/_load.xml new file mode 100644 index 0000000..a350879 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/_load.xml @@ -0,0 +1,15 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file='map.lua'/> + <Script file='bar.lua'/> + <Script file='aura.lua'/> + <Script file='bag.lua'/> + <Script file='dock.lua'/> + <Script file='chat.lua'/> + <Script file='henchmen.lua'/> + <Script file='stat.lua'/> + <Script file='filter.lua'/> + <Script file='plate.lua'/> + <Script file='tip.lua'/> + <Include file='units\_load.xml'/> + <Script file='profiles.lua'/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/aura.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/aura.lua new file mode 100644 index 0000000..995723b --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/aura.lua @@ -0,0 +1,318 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVAura; +local MAP = SV.SVMap; +--[[ +########################################################## +SET PACKAGE OPTIONS +########################################################## +]]-- +local auraOptionsTemplate = { + scaleGroup = { + order = 1, + guiInline = true, + type = "group", + name = L["Scale Options"], + args = { + size = { + type = "range", + name = L["Size"], + desc = L["Set the size of the individual auras."], + min = 16, + max = 60, + step = 2, + order = 1 + }, + wrapXOffset = { + order = 2, + type = "range", + name = L["Horizontal Spacing"], + min = 0, + max = 50, + step = 1 + }, + wrapYOffset = { + order = 3, + type = "range", + name = L["Vertical Spacing"], + min = 0, + max = 50, + step = 1 + }, + } + }, + layoutGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Directional Options"], + args = { + showBy = { + type = "select", + order = 1, + name = L["Growth Direction"], + desc = L["The direction the auras will grow and then the direction they will grow after they reach the wrap after limit."], + values = { + DOWN_RIGHT = format(L["%s and then %s"], L["Down"], L["Right"]), + DOWN_LEFT = format(L["%s and then %s"], L["Down"], L["Left"]), + UP_RIGHT = format(L["%s and then %s"], L["Up"], L["Right"]), + UP_LEFT = format(L["%s and then %s"], L["Up"], L["Left"]), + RIGHT_DOWN = format(L["%s and then %s"], L["Right"], L["Down"]), + RIGHT_UP = format(L["%s and then %s"], L["Right"], L["Up"]), + LEFT_DOWN = format(L["%s and then %s"], L["Left"], L["Down"]), + LEFT_UP = format(L["%s and then %s"], L["Left"], L["Up"]) + } + }, + wrapAfter = { + type = "range", + order = 2, + name = L["Wrap After"], + desc = L["Begin a new row or column after this many auras."], + min = 1, + max = 32, + step = 1 + }, + maxWraps = { + name = L["Max Wraps"], + order = 3, + desc = L["Limit the number of rows or columns."], + type = "range", + min = 1, + max = 32, + step = 1 + }, + } + }, + sortGroup = { + order = 1, + guiInline = true, + type = "group", + name = L["Sorting Options"], + args = { + sortMethod = { + order = 1, + name = L["Sort Method"], + desc = L["Defines how the group is sorted."], + type = "select", + values = { + ["INDEX"] = L["Index"], + ["TIME"] = L["Time"], + ["NAME"] = L["Name"] + } + }, + sortDir = { + order = 2, + name = L["Sort Direction"], + desc = L["Defines the sort order of the selected sort method."], + type = "select", + values = { + ["+"] = L["Ascending"], + ["-"] = L["Descending"] + } + }, + isolate = { + order = 3, + name = L["Seperate"], + desc = L["Indicate whether buffs you cast yourself should be separated before or after."], + type = "select", + values = { + [-1] = L["Other's First"], + [0] = L["No Sorting"], + [1] = L["Your Auras First"] + } + } + } + }, +} + +SV.Options.args.SVAura = { + type = "group", + name = MOD.TitleID, + childGroups = "tab", + get = function(a)return SV.db.SVAura[a[#a]]end, + set = function(a,b) + MOD:ChangeDBVar(b,a[#a]); + MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs") + MOD:UpdateAuraHeader(SVUI_PlayerDebuffs, "debuffs") + end, + args = { + intro = { + order = 1, + type = "description", + name = L["AURAS_DESC"] + }, + enable = { + order = 2, + type = "toggle", + name = L["Enable"], + get = function(a)return SV.db.SVAura.enable end, + set = function(a,b)SV.db.SVAura.enable = b;SV:StaticPopup_Show("RL_CLIENT")end + }, + disableBlizzard = { + order = 3, + type = "toggle", + name = L["Disabled Blizzard"], + get = function(a)return SV.db.SVAura.disableBlizzard end, + set = function(a,b)SV.db.SVAura.disableBlizzard = b;SV:StaticPopup_Show("RL_CLIENT")end + }, + auraGroups = { + order = 4, + type = "group", + name = L["Options"], + childGroups = "tree", + args = { + common = { + order = 10, + type = "group", + name = L["General"], + args = { + fadeBy = { + type = "range", + name = L["Fade Threshold"], + desc = L["Threshold before text changes red, goes into decimal form, and the icon will fade. Set to -1 to disable."], + min = -1, + max = 30, + step = 1, + order = 1 + }, + font = { + type = "select", + dialogControl = "LSM30_Font", + order = 2, + name = L["Font"], + values = AceGUIWidgetLSMlists.font + }, + fontSize = { + order = 3, + name = L["Font Size"], + type = "range", + min = 6, + max = 22, + step = 1 + }, + fontOutline = { + order = 4, + name = L["Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = { + ["NONE"] = L["None"], + ["OUTLINE"] = "OUTLINE", + ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", + ["THICKOUTLINE"] = "THICKOUTLINE" + } + }, + timeOffsetH = { + order = 5, + name = L["Time xOffset"], + type = "range", + min = -60, + max = 60, + step = 1 + }, + timeOffsetV = { + order = 6, + name = L["Time yOffset"], + type = "range", + min = -60, + max = 60, + step = 1 + }, + countOffsetH = { + order = 7, + name = L["Count xOffset"], + type = "range", + min = -60, + max = 60, + step = 1 + }, + countOffsetV = { + order = 8, + name = L["Count yOffset"], + type = "range", + min = -60, + max = 60, + step = 1 + } + } + }, + hyperBuffs = { + order = 20, + type = "group", + name = L["Hyper Buffs"], + get = function(b)return SV.db.SVAura.hyperBuffs[b[#b]]end, + set = function(a,b) + MOD:ChangeDBVar(b,a[#a],"hyperBuffs"); + MOD:ToggleConsolidatedBuffs(); + SV.SVMap:ReLoad(); + MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs") + end, + args = { + enable = { + order = 1, + type = "toggle", + name = L["Enable"], + desc = L["Display the consolidated buffs bar."], + disabled = function()return not SV.db.SVMap.enable end, + }, + filter = { + order = 2, + name = L["Filter Hyper"], + desc = L["Only show consolidated icons on the consolidated bar that your class/spec is interested in. This is useful for raid leading."], + type = "toggle", + disabled = function()return not SV.db.SVAura.hyperBuffs.enable end, + } + } + }, + buffs = { + order = 30, + type = "group", + name = L["Buffs"], + get = function(b)return SV.db.SVAura.buffs[b[#b]]end, + set = function(a,b)MOD:ChangeDBVar(b,a[#a],"buffs");MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs")end, + args = auraOptionsTemplate + }, + debuffs = { + order = 40, + type = "group", + name = L["Debuffs"], + get = function(b)return SV.db.SVAura.debuffs[b[#b]]end, + set = function(a,b)MOD:ChangeDBVar(b,a[#a],"debuffs");MOD:UpdateAuraHeader(SVUI_PlayerDebuffs, "debuffs")end, + args = auraOptionsTemplate + } + } + }, + } +} + \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/bag.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/bag.lua new file mode 100644 index 0000000..ee248ce --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/bag.lua @@ -0,0 +1,312 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; + +local MOD = SV.SVBag + +local pointList = { + ["TOPLEFT"] = "TOPLEFT", + ["TOPRIGHT"] = "TOPRIGHT", + ["BOTTOMLEFT"] = "BOTTOMLEFT", + ["BOTTOMRIGHT"] = "BOTTOMRIGHT", +} + +SV.Options.args.SVBag = { + type = 'group', + name = MOD.TitleID, + childGroups = "tab", + get = function(a)return SV.db.SVBag[a[#a]]end, + set = function(a,b)MOD:ChangeDBVar(b,a[#a]) end, + args = { + intro = { + order = 1, + type = "description", + name = L["BAGS_DESC"] + }, + enable = { + order = 2, + type = "toggle", + name = L["Enable"], + desc = L["Enable/Disable the all-in-one bag."], + get = function(a)return SV.db.SVBag.enable end, + set = function(a,b)SV.db.SVBag.enable = b;SV:StaticPopup_Show("RL_CLIENT")end + }, + bagGroups={ + order = 3, + type = 'group', + name = L['Bag Options'], + guiInline = true, + args = { + common={ + order = 1, + type = "group", + guiInline = true, + name = L["General"], + disabled = function()return not SV.db.SVBag.enable end, + args = { + bagSize = { + order = 1, + type = "range", + name = L["Button Size (Bag)"], + desc = L["The size of the individual buttons on the bag frame."], + min = 15, + max = 45, + step = 1, + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()end + }, + bankSize = { + order = 2, + type = "range", + name = L["Button Size (Bank)"], + desc = L["The size of the individual buttons on the bank frame."], + min = 15, + max = 45, + step = 1, + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout(true)end + }, + sortInverted = { + order = 3, + type = "toggle", + name = L["Sort Inverted"], + desc = L["Direction the bag sorting will use to allocate the items."] + }, + bagWidth = { + order = 4, + type = "range", + name = L["Panel Width (Bags)"], + desc = L["Adjust the width of the bag frame."], + min = 150, + max = 700, + step = 1, + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()end, + disabled = function()return SV.db.SVBag.alignToChat end + }, + bankWidth = { + order = 5, + type = "range", + name = L["Panel Width (Bank)"], + desc = L["Adjust the width of the bank frame."], + min = 150, + max = 700, + step = 1, + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout(true)end, + disabled = function()return SV.db.SVBag.alignToChat end + }, + currencyFormat = { + order = 6, + type = "select", + name = L["Currency Format"], + desc = L["The display format of the currency icons that get displayed below the main bag. (You have to be watching a currency for this to display)"], + values = { + ["ICON"] = L["Icons Only"], + ["ICON_TEXT"] = L["Icons and Text"] + }, + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:RefreshTokens()end + }, + bagTools = { + order = 7, + type = "toggle", + name = L["Profession Tools"], + desc = L["Enable/Disable Prospecting, Disenchanting and Milling buttons on the bag frame."], + set = function(a,b)MOD:ChangeDBVar(b,a[#a])SV:StaticPopup_Show("RL_CLIENT")end + }, + ignoreItems = { + order = 100, + name = L["Ignore Items"], + desc = L["List of items to ignore when sorting. If you wish to add multiple items you must seperate the word with a comma."], + type = "input", + width = "full", + multiline = true, + set = function(a,b) SV.db.SVBag[a[#a]] = b end + } + } + }, + position = { + order = 2, + type = "group", + guiInline = true, + name = L["Bag/Bank Positioning"], + disabled = function()return not SV.db.SVBag.enable end, + args = { + alignToChat = { + order = 1, + type = "toggle", + name = L["Align To Chat"], + desc = L["Align the width of the bag frame to fit inside the chat box."], + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()MOD:Layout(true)end + }, + bags = { + order = 2, + type = "group", + name = L["Bag Position"], + guiInline = true, + get = function(key) return SV.db.SVBag.bags[key[#key]] end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bags"); MOD:ModifyBags() end, + disabled = function() return not SV.db.SVBag.enable end, + args = { + point = { + order = 1, + name = L["Anchor Point"], + type = "select", + values = pointList, + }, + xOffset = { + order = 2, + type = "range", + name = L["X Offset"], + width = "full", + min = -600, + max = 600, + step = 1, + }, + yOffset = { + order = 3, + type = "range", + name = L["Y Offset"], + width = "full", + min = -600, + max = 600, + step = 1, + }, + } + }, + bank = { + order = 3, + type = "group", + name = L["Bank Position"], + guiInline = true, + get = function(key) return SV.db.SVBag.bank[key[#key]] end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bank"); MOD:ModifyBags() end, + disabled = function() return not SV.db.SVBag.enable end, + args = { + point = { + order = 1, + name = L["Anchor Point"], + type = "select", + values = pointList, + }, + xOffset = { + order = 2, + type = "range", + name = L["X Offset"], + width = "full", + min = -600, + max = 600, + step = 1, + }, + yOffset = { + order = 3, + type = "range", + name = L["Y Offset"], + width = "full", + min = -600, + max = 600, + step = 1, + }, + } + }, + } + }, + + bagBar = { + order = 4, + type = "group", + name = L["Bag-Bar"], + guiInline = true, + get = function(key) return SV.db.SVBag.bagBar[key[#key]] end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bagBar"); MOD:ModifyBagBar() end, + args={ + enable = { + order = 1, + type = "toggle", + name = L["Enable"], + desc = L["Enable/Disable the Bag-Bar."], + get = function() return SV.db.SVBag.bagBar.enable end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bagBar"); SV:StaticPopup_Show("RL_CLIENT")end + }, + mouseover = { + order = 2, + name = L["Mouse Over"], + desc = L["Hidden unless you mouse over the frame."], + type = "toggle" + }, + showBackdrop = { + order = 3, + name = L["Backdrop"], + desc = L["Show/Hide bag bar backdrop"], + type = "toggle" + }, + size = { + order = 4, + type = "range", + name = L["Button Size"], + desc = L["Set the size of your bag buttons."], + min = 24, + max = 60, + step = 1 + }, + spacing = { + order = 5, + type = "range", + name = L["Button Spacing"], + desc = L["The spacing between buttons."], + min = 1, + max = 10, + step = 1 + }, + sortDirection = { + order = 6, + type = "select", + name = L["Sort Direction"], + desc = L["The direction that the bag frames will grow from the anchor."], + values = { + ["ASCENDING"] = L["Ascending"], + ["DESCENDING"] = L["Descending"] + } + }, + showBy = { + order = 7, + type = "select", + name = L["Bar Direction"], + desc = L["The direction that the bag frames be (Horizontal or Vertical)."], + values = { + ["VERTICAL"] = L["Vertical"], + ["HORIZONTAL"] = L["Horizontal"] + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/bar.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/bar.lua new file mode 100644 index 0000000..b6e59a7 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/bar.lua @@ -0,0 +1,799 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local SVLib = LibSuperVillain; +local L = SV.L; +local MOD = SV.SVBar; +--[[ +########################################################## +SET PACKAGE OPTIONS +########################################################## +]]-- +local bar_configs; +local function BarConfigLoader() + local b = {["TOPLEFT"] = "TOPLEFT", ["TOPRIGHT"] = "TOPRIGHT", ["BOTTOMLEFT"] = "BOTTOMLEFT", ["BOTTOMRIGHT"] = "BOTTOMRIGHT"} + for d = 1, 6 do + local name = L["Bar "]..d; + bar_configs["Bar"..d] = { + order = d, + name = name, + type = "group", + order = (d + 10), + guiInline = false, + disabled = function()return not SV.db.SVBar.enable end, + get = function(key) + return SV.db.SVBar["Bar"..d][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], "Bar"..d); + MOD:RefreshBar("Bar"..d) + end, + args = { + enable = { + order = 1, + type = "toggle", + name = L["Enable"], + }, + backdrop = { + order = 2, + name = L["Background"], + type = "toggle", + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, + }, + mouseover = { + order = 3, + name = L["Mouse Over"], + desc = L["The frame is not shown unless you mouse over the frame."], + type = "toggle", + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, + }, + restorePosition = { + order = 4, + type = "execute", + name = L["Restore Bar"], + desc = L["Restore the actionbars default settings"], + func = function() + SV:ResetData("SVBar", "Bar"..d) + SV.Mentalo:Reset("Bar "..d) + MOD:RefreshBar("Bar"..d) + end, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, + }, + adjustGroup = { + name = L["Bar Adjustments"], + type = "group", + order = 5, + guiInline = true, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, + args = { + point = { + order = 1, + type = "select", + name = L["Anchor Point"], + desc = L["The first button anchors itself to this point on the bar."], + values = b + }, + buttons = { + order = 2, + type = "range", + name = L["Buttons"], + desc = L["The amount of buttons to display."], + min = 1, + max = NUM_ACTIONBAR_BUTTONS, + step = 1 + }, + buttonsPerRow = { + order = 3, + type = "range", + name = L["Buttons Per Row"], + desc = L["The amount of buttons to display per row."], + min = 1, + max = NUM_ACTIONBAR_BUTTONS, + step = 1 + }, + buttonsize = { + type = "range", + name = L["Button Size"], + desc = L["The size of the action buttons."], + min = 15, + max = 60, + step = 1, + order = 4 + }, + buttonspacing = { + type = "range", + name = L["Button Spacing"], + desc = L["The spacing between buttons."], + min = 1, + max = 10, + step = 1, + order = 5 + }, + alpha = { + order = 6, + type = "range", + name = L["Alpha"], + isPercent = true, + min = 0, + max = 1, + step = 0.01 + }, + } + }, + pagingGroup = { + name = L["Bar Paging"], + type = "group", + order = 6, + guiInline = true, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, + args = { + useCustomPaging = { + order = 1, + type = "toggle", + name = L["Enable"], + desc = L["Allow the use of custom paging for this bar"], + get = function()return SV.db.SVBar["Bar"..d].useCustomPaging end, + set = function(e, f) + SV.db.SVBar["Bar"..d].useCustomPaging = f; + MOD:UpdateBarPagingDefaults(); + MOD:RefreshBar("Bar"..d) + end + }, + resetStates = { + order = 2, + type = "execute", + name = L["Restore Defaults"], + desc = L["Restore default paging attributes for this bar"], + func = function() + SV:ResetData("SVBar", "Bar"..d, "customPaging") + MOD:UpdateBarPagingDefaults(); + MOD:RefreshBar("Bar"..d) + end + }, + customPaging = { + order = 3, + type = "input", + width = "full", + name = L["Paging"], + desc = L["|cffFF0000ADVANCED:|r Set the paging attributes for this bar"], + get = function(e)return SV.db.SVBar["Bar"..d].customPaging[SV.class] end, + set = function(e, f) + SV.db.SVBar["Bar"..d].customPaging[SV.class] = f; + MOD:UpdateBarPagingDefaults(); + MOD:RefreshBar("Bar"..d) + end, + disabled = function()return not SV.db.SVBar["Bar"..d].useCustomPaging end, + }, + useCustomVisibility = { + order = 4, + type = "toggle", + name = L["Enable"], + desc = L["Allow the use of custom paging for this bar"], + get = function()return SV.db.SVBar["Bar"..d].useCustomVisibility end, + set = function(e, f) + SV.db.SVBar["Bar"..d].useCustomVisibility = f; + MOD:UpdateBarPagingDefaults(); + MOD:RefreshBar("Bar"..d) + end + }, + resetVisibility = { + order = 5, + type = "execute", + name = L["Restore Defaults"], + desc = L["Restore default visibility attributes for this bar"], + func = function() + SV:ResetData("SVBar", "Bar"..d, "customVisibility") + MOD:UpdateBarPagingDefaults(); + MOD:RefreshBar("Bar"..d) + end + }, + customVisibility = { + order = 6, + type = "input", + width = "full", + name = L["Visibility"], + desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], + get = function(e)return SV.db.SVBar["Bar"..d].customVisibility end, + set = function(e, f) + SV.db.SVBar["Bar"..d].customVisibility = f; + MOD:UpdateBarPagingDefaults(); + MOD:RefreshBar("Bar"..d) + end, + disabled = function()return not SV.db.SVBar["Bar"..d].useCustomVisibility end, + }, + + } + } + } + } + end + + bar_configs["Micro"] = { + order = d, + name = L["Micro Menu"], + type = "group", + order = 100, + guiInline = false, + disabled = function()return not SV.db.SVBar.enable end, + get = function(key) + return SV.db.SVBar["Micro"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], "Micro"); + MOD:UpdateMicroButtons() + end, + args = { + enable = { + order = 1, + type = "toggle", + name = L["Enable"] + }, + mouseover = { + order = 2, + name = L["Mouse Over"], + desc = L["The frame is not shown unless you mouse over the frame."], + disabled = function()return not SV.db.SVBar["Micro"].enable end, + type = "toggle" + }, + buttonsize = { + order = 3, + type = "range", + name = L["Button Size"], + desc = L["The size of the action buttons."], + min = 15, + max = 60, + step = 1, + disabled = function()return not SV.db.SVBar["Micro"].enable end, + }, + buttonspacing = { + order = 4, + type = "range", + name = L["Button Spacing"], + desc = L["The spacing between buttons."], + min = 1, + max = 10, + step = 1, + disabled = function()return not SV.db.SVBar["Micro"].enable end, + }, + } + }; + + bar_configs["Pet"] = { + order = d, + name = L["Pet Bar"], + type = "group", + order = 200, + guiInline = false, + disabled = function()return not SV.db.SVBar.enable end, + get = function(e)return SV.db.SVBar["Pet"][e[#e]]end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], "Pet"); + MOD:RefreshBar("Pet") + end, + args = { + enable = { + order = 1, + type = "toggle", + name = L["Enable"] + }, + backdrop = { + order = 2, + name = L["Background"], + type = "toggle", + disabled = function()return not SV.db.SVBar["Pet"].enable end, + }, + mouseover = { + order = 3, + name = L["Mouse Over"], + desc = L["The frame is not shown unless you mouse over the frame."], + type = "toggle", + disabled = function()return not SV.db.SVBar["Pet"].enable end, + }, + restorePosition = { + order = 4, + type = "execute", + name = L["Restore Bar"], + desc = L["Restore the actionbars default settings"], + func = function() + SV:ResetData("SVBar", "Pet") + SV.Mentalo:Reset("Pet Bar") + MOD:RefreshBar("Pet") + end, + disabled = function()return not SV.db.SVBar["Pet"].enable end, + }, + adjustGroup = { + name = L["Bar Adjustments"], + type = "group", + order = 5, + guiInline = true, + disabled = function()return not SV.db.SVBar["Pet"].enable end, + args = { + point = { + order = 1, + type = "select", + name = L["Anchor Point"], + desc = L["The first button anchors itself to this point on the bar."], + values = b + }, + buttons = { + order = 2, + type = "range", + name = L["Buttons"], + desc = L["The amount of buttons to display."], + min = 1, + max = NUM_PET_ACTION_SLOTS, + step = 1 + }, + buttonsPerRow = { + order = 3, + type = "range", + name = L["Buttons Per Row"], + desc = L["The amount of buttons to display per row."], + min = 1, + max = NUM_PET_ACTION_SLOTS, + step = 1 + }, + buttonsize = { + order = 4, + type = "range", + name = L["Button Size"], + desc = L["The size of the action buttons."], + min = 15, + max = 60, + step = 1, + disabled = function()return not SV.db.SVBar.enable end + }, + buttonspacing = { + order = 5, + type = "range", + name = L["Button Spacing"], + desc = L["The spacing between buttons."], + min = 1, + max = 10, + step = 1, + disabled = function()return not SV.db.SVBar.enable end + }, + alpha = { + order = 6, + type = "range", + name = L["Alpha"], + isPercent = true, + min = 0, + max = 1, + step = 0.01 + }, + } + }, + customGroup = { + name = L["Visibility Options"], + type = "group", + order = 6, + guiInline = true, + args = { + useCustomVisibility = { + order = 1, + type = "toggle", + name = L["Enable"], + desc = L["Allow the use of custom paging for this bar"], + get = function()return SV.db.SVBar["Pet"].useCustomVisibility end, + set = function(e,f) + SV.db.SVBar["Pet"].useCustomVisibility = f; + MOD:RefreshBar("Pet") + end + }, + resetVisibility = { + order = 2, + type = "execute", + name = L["Restore Defaults"], + desc = L["Restore default visibility attributes for this bar"], + func = function() + SV:ResetData("SVBar", "Pet", "customVisibility") + MOD:RefreshBar("Pet") + end + }, + customVisibility = { + order = 3, + type = "input", + width = "full", + name = L["Visibility"], + desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], + get = function(e)return SV.db.SVBar["Pet"].customVisibility end, + set = function(e,f) + SV.db.SVBar["Pet"].customVisibility = f; + MOD:RefreshBar("Pet") + end, + disabled = function()return not SV.db.SVBar["Pet"].useCustomVisibility end, + }, + } + } + } + }; + + bar_configs["Stance"] = { + order = d, + name = L["Stance Bar"], + type = "group", + order = 300, + guiInline = false, + disabled = function()return not SV.db.SVBar.enable end, + get = function(e)return SV.db.SVBar["Stance"][e[#e]]end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], "Stance"); + MOD:RefreshBar("Stance") + end, + args = { + enable = { + order = 1, + type = "toggle", + name = L["Enable"] + }, + backdrop = { + order = 2, + name = L["Background"], + type = "toggle", + disabled = function()return not SV.db.SVBar["Stance"].enable end, + }, + mouseover = { + order = 3, + name = L["Mouse Over"], + desc = L["The frame is not shown unless you mouse over the frame."], + type = "toggle", + disabled = function()return not SV.db.SVBar["Stance"].enable end, + }, + restorePosition = { + order = 4, + type = "execute", + name = L["Restore Bar"], + desc = L["Restore the actionbars default settings"], + func = function() + SVLib:SetDefault("SVBar","Stance") + SV.Mentalo:Reset("Stance Bar") + MOD:RefreshBar("Stance") + end, + disabled = function()return not SV.db.SVBar["Stance"].enable end, + }, + adjustGroup = { + name = L["Bar Adjustments"], + type = "group", + order = 5, + guiInline = true, + disabled = function()return not SV.db.SVBar["Stance"].enable end, + args = { + point = { + order = 1, + type = "select", + name = L["Anchor Point"], + desc = L["The first button anchors itself to this point on the bar."], + values = b + }, + buttons = { + order = 2, + type = "range", + name = L["Buttons"], + desc = L["The amount of buttons to display."], + min = 1, + max = NUM_STANCE_SLOTS, + step = 1 + }, + buttonsPerRow = { + order = 3, + type = "range", + name = L["Buttons Per Row"], + desc = L["The amount of buttons to display per row."], + min = 1, + max = NUM_STANCE_SLOTS, + step = 1 + }, + buttonsize = { + order = 4, + type = "range", + name = L["Button Size"], + desc = L["The size of the action buttons."], + min = 15, + max = 60, + step = 1 + }, + buttonspacing = { + order = 5, + type = "range", + name = L["Button Spacing"], + desc = L["The spacing between buttons."], + min = 1, + max = 10, + step = 1 + }, + alpha = { + order = 6, + type = "range", + name = L["Alpha"], + isPercent = true, + min = 0, + max = 1, + step = 0.01 + }, + } + }, + customGroup = { + name = L["Visibility Options"], + type = "group", + order = 6, + guiInline = true, + disabled = function()return not SV.db.SVBar["Stance"].enable end, + args = { + style = { + order = 1, + type = "select", + name = L["Style"], + desc = L["This setting will be updated upon changing stances."], + values = { + ["darkenInactive"] = L["Darken Inactive"], + ["classic"] = L["Classic"] + } + }, + spacer1 = { + order = 2, + type = "description", + name = "", + }, + spacer2 = { + order = 3, + type = "description", + name = "", + }, + useCustomVisibility = { + order = 4, + type = "toggle", + name = L["Enable"], + desc = L["Allow the use of custom paging for this bar"], + get = function()return SV.db.SVBar["Stance"].useCustomVisibility end, + set = function(e,f) + SV.db.SVBar["Stance"].useCustomVisibility = f; + MOD:RefreshBar("Stance") + end + }, + resetVisibility = { + order = 5, + type = "execute", + name = L["Restore Defaults"], + desc = L["Restore default visibility attributes for this bar"], + func = function() + SV:ResetData("SVBar", "Stance", "customVisibility") + MOD:RefreshBar("Stance") + end + }, + customVisibility = { + order = 6, + type = "input", + width = "full", + name = L["Visibility"], + desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], + get = function(e)return SV.db.SVBar["Stance"].customVisibility end, + set = function(e,f) + SV.db.SVBar["Stance"].customVisibility = f; + MOD:RefreshBar("Stance") + end, + disabled = function()return not SV.db.SVBar["Stance"].useCustomVisibility end, + }, + } + } + } + } +end + +SV.Options.args.SVBar = { + type = "group", + name = MOD.TitleID, + childGroups = "tab", + get = function(key) + return SV.db.SVBar[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshActionBars() + end, + args = { + enable = { + order = 1, + type = "toggle", + name = L["Enable"], + get = function(e)return SV.db.SVBar[e[#e]]end, + set = function(e, f)SV.db.SVBar[e[#e]] = f;SV:StaticPopup_Show("RL_CLIENT")end + }, + barGroup = { + order = 2, + type = "group", + name = L["Bar Options"], + childGroups = "tree", + disabled = function()return not SV.db.SVBar.enable end, + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + macrotext = { + type = "toggle", + name = L["Macro Text"], + desc = L["Display macro names on action buttons."], + order = 2 + }, + hotkeytext = { + type = "toggle", + name = L["Keybind Text"], + desc = L["Display bind names on action buttons."], + order = 3 + }, + keyDown = { + type = "toggle", + name = L["Key Down"], + desc = OPTION_TOOLTIP_ACTION_BUTTON_USE_KEY_DOWN, + order = 4 + }, + showGrid = { + type = "toggle", + name = ALWAYS_SHOW_MULTIBARS_TEXT, + desc = OPTION_TOOLTIP_ALWAYS_SHOW_MULTIBARS, + order = 5 + }, + unlock = { + type = "select", + width = "full", + name = PICKUP_ACTION_KEY_TEXT, + desc = L["The button you must hold down in order to drag an ability to another action button."], + order = 6, + values = { + ["SHIFT"] = SHIFT_KEY, + ["ALT"] = ALT_KEY, + ["CTRL"] = CTRL_KEY + } + }, + unc = { + type = "color", + order = 7, + name = L["Out of Range"], + desc = L["Color of the actionbutton when out of range."], + hasAlpha = true, + get = function(key) + local color = SV.db.SVBar[key[#key]] + return color[1], color[2], color[3], color[4] + end, + set = function(key, rValue, gValue, bValue, aValue) + SV.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} + MOD:RefreshActionBars() + end, + }, + unpc = { + type = "color", + order = 8, + name = L["Out of Power"], + desc = L["Color of the actionbutton when out of power (Mana, Rage, Focus, Holy Power)."], + hasAlpha = true, + get = function(key) + local color = SV.db.SVBar[key[#key]] + return color[1], color[2], color[3], color[4] + end, + set = function(key, rValue, gValue, bValue, aValue) + SV.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} + MOD:RefreshActionBars() + end, + }, + rightClickSelf = { + type = "toggle", + name = L["Self Cast"], + desc = L["Right-click any action button to self cast"], + order = 9 + } + } + }, + fontGroup = { + order = 2, + type = "group", + disabled = function()return not SV.db.SVBar.enable end, + name = L["Fonts"], + args = { + font = { + type = "select", + width = "full", + dialogControl = "LSM30_Font", + order = 1, + name = L["Font"], + values = AceGUIWidgetLSMlists.font + }, + fontSize = { + order = 2, + width = "full", + name = L["Font Size"], + type = "range", + min = 6, + max = 22, + step = 1 + }, + fontOutline = { + order = 3, + width = "full", + name = L["Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = { + ["NONE"] = L["None"], + ["OUTLINE"] = "OUTLINE", + ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", + ["THICKOUTLINE"] = "THICKOUTLINE" + } + }, + countFont = { + type = "select", + width = "full", + dialogControl = "LSM30_Font", + order = 4, + name = L["Count Font"], + values = AceGUIWidgetLSMlists.font + }, + countFontSize = { + order = 5, + width = "full", + name = L["Count Font Size"], + type = "range", + min = 6, + max = 22, + step = 1 + }, + countFontOutline = { + order = 6, + width = "full", + name = L["Count Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = { + ["NONE"] = L["None"], + ["OUTLINE"] = "OUTLINE", + ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", + ["THICKOUTLINE"] = "THICKOUTLINE" + } + }, + cooldownSize = { + order = 7, + width = "full", + name = L["Cooldown Font Size"], + type = "range", + min = 6, + max = 22, + step = 1 + }, + } + } + } + } + } +} +bar_configs = SV.Options.args.SVBar.args.barGroup.args +BarConfigLoader(); \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/chat.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/chat.lua new file mode 100644 index 0000000..490d6d0 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/chat.lua @@ -0,0 +1,200 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVChat; +--[[ +########################################################## +SET PACKAGE OPTIONS +########################################################## +]]-- +SV.Options.args.SVChat={ + type = "group", + name = MOD.TitleID, + get = function(a)return SV.db.SVChat[a[#a]]end, + set = function(a,b)MOD:ChangeDBVar(b,a[#a]); end, + args = { + intro = { + order = 1, + type = "description", + name = L["CHAT_DESC"] + }, + enable = { + order = 2, + type = "toggle", + name = L["Enable"], + get = function(a)return SV.db.SVChat.enable end, + set = function(a,b)SV.db.SVChat.enable = b;SV:StaticPopup_Show("RL_CLIENT")end + }, + common = { + order = 3, + type = "group", + name = L["General"], + guiInline = true, + args = { + sticky = { + order = 1, + type = "toggle", + name = L["Sticky Chat"], + desc = L["When opening the Chat Editbox to type a message having this option set means it will retain the last channel you spoke in. If this option is turned off opening the Chat Editbox should always default to the SAY channel."] + }, + url = { + order = 2, + type = "toggle", + name = L["URL Links"], + desc = L["Attempt to create URL links inside the chat."], + set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end + }, + hyperlinkHover = { + order = 3, + type = "toggle", + name = L["Hyperlink Hover"], + desc = L["Display the hyperlink tooltip while hovering over a hyperlink."], + set = function(a,b) MOD:ChangeDBVar(b,a[#a]); MOD:ToggleHyperlinks(b); end + }, + smileys = { + order = 4, + type = "toggle", + name = L["Emotion Icons"], + desc = L["Display emotion icons in chat."] + }, + tabStyled = { + order = 5, + type = "toggle", + name = L["Custom Tab Style"], + set = function(a,b) MOD:ChangeDBVar(b,a[#a]);SV:StaticPopup_Show("RL_CLIENT") end, + }, + timeStampFormat = { + order = 6, + type = "select", + name = TIMESTAMPS_LABEL, + desc = OPTION_TOOLTIP_TIMESTAMPS, + values = { + ["NONE"] = NONE, + ["%I:%M "] = "03:27", + ["%I:%M:%S "] = "03:27:32", + ["%I:%M %p "] = "03:27 PM", + ["%I:%M:%S %p "] = "03:27:32 PM", + ["%H:%M "] = "15:27", + ["%H:%M:%S "] = "15:27:32" + } + }, + psst = { + order = 7, + type = "select", + dialogControl = "LSM30_Sound", + name = L["Whisper Alert"], + disabled = function()return not SV.db.SVChat.psst end, + values = AceGUIWidgetLSMlists.sound, + set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end + }, + spacer2 = { + order = 8, + type = "description", + name = "" + }, + throttleInterval = { + order = 9, + type = "range", + name = L["Spam Interval"], + desc = L["Prevent the same messages from displaying in chat more than once within this set amount of seconds, set to zero to disable."], + min = 0, + max = 120, + step = 1, + width = "full", + set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end + }, + } + }, + fontGroup = { + order = 4, + type = "group", + guiInline = true, + name = L["Fonts"], + set = function(a,b)MOD:ChangeDBVar(b,a[#a]);MOD:RefreshChatFrames()end, + args = { + font = { + type = "select", + dialogControl = "LSM30_Font", + order = 1, + name = L["Font"], + values = AceGUIWidgetLSMlists.font + }, + fontOutline = { + order = 2, + name = L["Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = { + ["NONE"] = L["None"], + ["OUTLINE"] = "OUTLINE", + ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", + ["THINOUTLINE"] = "THINOUTLINE", + ["THICKOUTLINE"] = "THICKOUTLINE" + } + }, + fontSpacer = { + type = "description", + order = 3, + name = "", + }, + tabFont = { + type = "select", + dialogControl = "LSM30_Font", + order = 4, + name = L["Tab Font"], + values = AceGUIWidgetLSMlists.font + }, + tabFontSize = { + order = 5, + name = L["Tab Font Size"], + type = "range", + min = 6, + max = 22, + step = 1 + }, + tabFontOutline = { + order = 6, + name = L["Tab Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = { + ["NONE"] = L["None"], + ["OUTLINE"] = "OUTLINE", + ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", + ["THICKOUTLINE"] = "THICKOUTLINE" + } + } + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua new file mode 100644 index 0000000..9e71d08 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/dock.lua @@ -0,0 +1,302 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVDock +local CHAT = SV.SVChat +local BAG = SV.SVBag + +SV.Options.args.SVDock = { + type = "group", + name = MOD.TitleID, + args = {} +} + +SV.Options.args.SVDock.args["intro"] = { + order = 1, + type = "description", + name = "Configure the various frame docks around the screen" +}; + +SV.Options.args.SVDock.args["common"] = { + order = 2, + type = "group", + name = "General", + guiInline = true, + args = { + bottomPanel = { + order = 1, + type = 'toggle', + name = L['Bottom Panel'], + desc = L['Display a border across the bottom of the screen.'], + get = function(j)return SV.db.SVDock.bottomPanel end, + set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:BottomPanelVisibility()end + }, + topPanel = { + order = 2, + type = 'toggle', + name = L['Top Panel'], + desc = L['Display a border across the top of the screen.'], + get = function(j)return SV.db.SVDock.topPanel end, + set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:TopPanelVisibility()end + }, + dockStatWidth = { + order = 3, + type = "range", + name = L["Bottom Stats Width"], + desc = L["PANEL_DESC"], + min = 150, + max = 1200, + step = 1, + width = "full", + get = function()return SV.db.SVDock.dockStatWidth end, + set = function(key,value) + MOD:ChangeDBVar(value,key[#key]); + MOD:UpdateSuperDock(true) + end, + }, + } +}; + +SV.Options.args.SVDock.args["leftDockGroup"] = { + order = 3, + type = "group", + name = L["Left Dock"], + guiInline = true, + args = { + leftDockBackdrop = { + order = 1, + type = 'toggle', + name = L['Left Dock Backdrop'], + desc = L['Display a backdrop behind the left-side dock.'], + get = function(j)return SV.db.SVDock.leftDockBackdrop end, + set = function(key,value) + MOD:ChangeDBVar(value,key[#key]); + MOD:UpdateDockBackdrops() + end + }, + dockLeftHeight = { + order = 2, + type = "range", + name = L["Left Dock Height"], + desc = L["PANEL_DESC"], + min = 150, + max = 600, + step = 1, + width = "full", + get = function()return SV.db.SVDock.dockLeftHeight;end, + set = function(key,value) + MOD:ChangeDBVar(value,key[#key]); + MOD:UpdateSuperDock(true) + CHAT:RefreshChatFrames(true) + end, + }, + dockLeftWidth = { + order = 3, + type = "range", + name = L["Left Dock Width"], + desc = L["PANEL_DESC"], + min = 150, + max = 700, + step = 1, + width = "full", + get = function()return SV.db.SVDock.dockLeftWidth;end, + set = function(key,value) + MOD:ChangeDBVar(value,key[#key]); + MOD:UpdateSuperDock(true) + CHAT:RefreshChatFrames(true) + end, + }, + } + }; + +local acceptableDocklets = { + ["alDamageMeter"] = L["alDamageMeter"], + ["Skada"] = L["Skada"], + ["Recount"] = L["Recount"], + ["TinyDPS"] = L["TinyDPS"], + ["Omen"] = L["Omen"] +}; + +local function GetLiveDockletsA() + local test = SV.db.SVDock.docklets.DockletExtra; + local t = {["None"] = L["None"]}; + for n,l in pairs(acceptableDocklets) do + if IsAddOnLoaded(n) or IsAddOnLoaded(l) then + if n=="Skada" and Skada then + for index,window in pairs(Skada:GetWindows()) do + local key = window.db.name + t["Skada"..key] = (key=="Skada") and "Skada - Main" or "Skada - "..key; + end + elseif (test ~= n and test ~= l) then + t[n] = l; + end + end + end + return t; +end + +local function GetLiveDockletsB() + local test = SV.db.SVDock.docklets.DockletMain; + local t = {["None"] = L["None"]}; + for n,l in pairs(acceptableDocklets) do + if IsAddOnLoaded(n) or IsAddOnLoaded(l) then + if n=="Skada" and Skada then + for index,window in pairs(Skada:GetWindows()) do + local key = window.db.name + t["Skada"..key] = (key=="Skada") and "Skada - Main" or "Skada - "..key; + end + elseif (test ~= n and test ~= l) then + t[n] = l; + end + end + end + return t; +end + +SV.Options.args.SVDock.args["rightDockGroup"] = { + order = 4, + type = "group", + name = L["Right Dock"], + guiInline = true, + args = { + rightDockBackdrop = { + order = 1, + type = 'toggle', + name = L['Right Dock Backdrop'], + desc = L['Display a backdrop behind the right-side dock.'], + get = function(j)return SV.db.SVDock.rightDockBackdrop end, + set = function(key,value) + MOD:ChangeDBVar(value,key[#key]); + MOD:UpdateDockBackdrops() + end + }, + dockRightHeight = { + order = 2, + type = "range", + name = L["Right Dock Height"], + desc = L["PANEL_DESC"], + min = 150, + max = 600, + step = 1, + width = "full", + get = function()return SV.db.SVDock.dockRightHeight;end, + set = function(key,value) + MOD:ChangeDBVar(value,key[#key]); + MOD:UpdateSuperDock(true) + CHAT:RefreshChatFrames(true) + end, + }, + dockRightWidth = { + order = 3, + type = "range", + name = L["Right Dock Width"], + desc = L["PANEL_DESC"], + min = 150, + max = 700, + step = 1, + width = "full", + get = function()return SV.db.SVDock.dockRightWidth;end, + set = function(key,value) + MOD:ChangeDBVar(value,key[#key]); + MOD:UpdateSuperDock(true) + CHAT:RefreshChatFrames(true) + BAG:Layout() + BAG:Layout(true) + end, + }, + quest = { + order = 4, + type = "group", + name = L['Quest Watch Docklet'], + args = { + enable = { + order = 1, + type = "toggle", + name = L["Enable"], + get = function()return SV.db.general.questWatch end, + set = function(j, value) SV.db.general.questWatch = value; SV:StaticPopup_Show("RL_CLIENT") end + } + } + }, + docklets = { + order = 100, + type = 'group', + name = 'Addon Docklets', + guiInline=true, + args = { + docked = { + order=0, + type='group', + name='Docklet Settings', + guiInline=true, + args = { + DockletMain = { + type = "select", + order = 1, + name = "Primary Docklet", + desc = "Select an addon to occupy the primary docklet window", + values = function()return GetLiveDockletsA()end, + get = function()return SV.db.SVDock.docklets.DockletMain end, + set = function(a,value)SV.db.SVDock.docklets.DockletMain = value;SV:ReloadDocklets()end, + }, + DockletCombatFade = { + type = "toggle", + order = 2, + name = "Out of Combat (Hide)", + get = function()return SV.db.SVDock.docklets.DockletCombatFade end, + set = function(a,value)SV.db.SVDock.docklets.DockletCombatFade = value;end + }, + enableExtra = { + type = "toggle", + order = 3, + name = "Split Docklet", + desc = "Split the primary docklet window for 2 addons.", + get = function()return SV.db.SVDock.docklets.enableExtra end, + set = function(a,value)SV.db.SVDock.docklets.enableExtra = value;SV:ReloadDocklets()end, + }, + DockletExtra = { + type = "select", + order = 4, + name = "Secondary Docklet", + desc = "Select another addon", + disabled = function()return (not SV.db.SVDock.docklets.enableExtra or SV.db.SVDock.docklets.DockletMain == "None") end, + values = function()return GetLiveDockletsB()end, + get = function()return SV.db.SVDock.docklets.DockletExtra end, + set = function(a,value)SV.db.SVDock.docklets.DockletExtra = value;SV:ReloadDocklets()end, + } + } + } + } + } + } +}; \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/filter.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/filter.lua new file mode 100644 index 0000000..a59fabb --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/filter.lua @@ -0,0 +1,781 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ...; +local selectedSpell,filterType,filters; +local nameMapping = { + ["CC"] = "Control Type Auras", + ["Shield"] = "Defensive Auras", + ["Player"] = "Player Only Auras", + ["Blocked"] = "Blocked Auras", + ["Allowed"] = "Always Allowed Auras", + ["Strict"] = "Specific Auras", + ["Raid"] = "Raid Buffs/Debuffs", + ["BuffWatch"] = "(AuraWatch) Player Buffs", + ["PetBuffWatch"] = "(AuraWatch) Pet Buffs", +} + +local function generateFilterOptions() + if filterType == 'AuraBar Colors' then + + SV.Options.args.filters.args.filterGroup = { + type = "group", + name = filterType, + guiInline = true, + order = 10, + args = { + addSpell = { + order = 1, + name = L["Add Spell"], + desc = L["Add a spell to the filter."], + type = "input", + guiInline = true, + get = function(e)return""end, + set = function(e, arg) + if not SV.db.media.unitframes.spellcolor[arg] then + SV.db.media.unitframes.spellcolor[arg] = false + end + generateFilterOptions() + MOD:SetUnitFrame("player") + MOD:SetUnitFrame("target") + MOD:SetUnitFrame("focus") + end + }, + removeSpell = { + order = 2, + name = L["Remove Spell"], + desc = L["Remove a spell from the filter."], + type = "input", + guiInline = true, + get = function(e)return""end, + set = function(e, arg) + if SV.db.media.unitframes.spellcolor[arg]then + SV.db.media.unitframes.spellcolor[arg] = false; + SV:AddonMessage(L["You may not remove a spell from a default filter that is not customly added. Setting spell to false instead."]) + else + SV.db.media.unitframes.spellcolor[arg] = nil + end + selectedSpell = nil; + generateFilterOptions() + MOD:SetUnitFrame("player") + MOD:SetUnitFrame("target") + MOD:SetUnitFrame("focus") + end + }, + selectSpell = { + name = L["Select Spell"], + type = "select", + order = 3, + guiInline = true, + get = function(e)return selectedSpell end, + set = function(e, arg) + selectedSpell = arg; + generateFilterOptions() + end, + values = function() + local filters = {} + filters[""] = NONE; + for g in pairs(SV.db.media.unitframes.spellcolor)do + filters[g] = g + end + return filters + end + } + } + } + + if not selectedSpell or SV.db.media.unitframes.spellcolor[selectedSpell] == nil then + SV.Options.args.filters.args.spellGroup = nil; + return + end + + SV.Options.args.filters.args.spellGroup = { + type = "group", + name = selectedSpell, + order = 15, + guiInline = true, + args = { + color = { + name = L["Color"], + type = "color", + order = 1, + get = function(e) + local abColor = SV.db.media.unitframes.spellcolor[selectedSpell] + if type(abColor) == "boolean"then + return 0, 0, 0, 1 + else + return abColor[1], abColor[2], abColor[3], abColor[4] + end + end, + set = function(e, r, g, b) + if type(SV.db.media.unitframes.spellcolor[selectedSpell]) ~= "table"then + SV.db.media.unitframes.spellcolor[selectedSpell] = {} + end + local abColor = {r, g, b} + SV.db.media.unitframes.spellcolor[selectedSpell] = abColor + MOD:SetUnitFrame("player") + MOD:SetUnitFrame("target") + MOD:SetUnitFrame("focus") + end + }, + removeColor = { + type = "execute", + order = 2, + name = L["Restore Defaults"], + func = function(e, arg) + SV.db.media.unitframes.spellcolor[selectedSpell] = false; + MOD:SetUnitFrame("player") + MOD:SetUnitFrame("target") + MOD:SetUnitFrame("focus") + end + } + } + } + + elseif filterType == 'PetBuffWatch' then + + local watchedBuffs = {} + + if not SV.db.filter.PetBuffWatch then + SV.db.filter.PetBuffWatch = {} + end + for o,f in pairs(SV.db.filter.PetBuffWatch)do + tinsert(watchedBuffs,f) + end + + SV.Options.args.filters.args.filterGroup = { + type = "group", + name = filterType, + guiInline = true, + order = -10, + childGroups = "tab", + args = { + addSpellID = { + order = 1, + name = L["Add SpellID"], + desc = L["Add a spell to the filter."], + type = "input", + get = function(e)return""end, + set = function(e, arg) + if not tonumber(arg) then + SV:AddonMessage(L["Value must be a number"]) + elseif not GetSpellInfo(arg)then + SV:AddonMessage(L["Not valid spell id"]) + else + tinsert(SV.db.filter.PetBuffWatch, {["enable"] = true, ["id"] = tonumber(arg), ["point"] = "TOPRIGHT", ["color"] = {["r"] = 1, ["g"] = 0, ["b"] = 0}, ["anyUnit"] = true}) + generateFilterOptions() + MOD:SetUnitFrame("pet") + selectedSpell = nil + end + end + }, + removeSpellID = { + order = 2, + name = L["Remove SpellID"], + desc = L["Remove a spell from the filter."], + type = "input", + get = function(e)return""end, + set = function(e, arg) + if not tonumber(arg)then + SV:AddonMessage(L["Value must be a number"]) + elseif not GetSpellInfo(arg)then + SV:AddonMessage(L["Not valid spell id"]) + else + local p; + for q, r in pairs(SV.db.filter.PetBuffWatch)do + if r["id"] == tonumber(arg)then + p = r; + if SV.db.filter.PetBuffWatch[q]then + SV.db.filter.PetBuffWatch[q].enable = false; + else + SV.db.filter.PetBuffWatch[q] = nil + end + end + end + if p == nil then + SV:AddonMessage(L["Spell not found in list."]) + else + generateFilterOptions() + end + end + selectedSpell = nil; + generateFilterOptions() + MOD:SetUnitFrame("pet") + end + }, + selectSpell = { + name = L["Select Spell"], + type = "select", + order = 3, + values = function() + local v = {} + watchedBuffs = {} + for o, f in pairs(SV.db.filter.PetBuffWatch)do + tinsert(watchedBuffs, f) + end + for o, l in pairs(watchedBuffs)do + if l.id then + local name = GetSpellInfo(l.id) + v[l.id] = name + end + end + return v + end, + get = function(e)return selectedSpell end, + set = function(e, arg)selectedSpell = arg; generateFilterOptions()end + } + } + } + + local registeredSpell; + + for t,l in pairs(SV.db.filter.PetBuffWatch)do + if l.id == selectedSpell then + registeredSpell = t + end + end + + if selectedSpell and registeredSpell then + local currentSpell = GetSpellInfo(selectedSpell) + SV.Options.args.filters.args.filterGroup.args[currentSpell] = { + name = currentSpell.." ("..selectedSpell..")", + type = "group", + get = function(e)return SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] end, + set = function(e, arg) + SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] = arg; + MOD:SetUnitFrame("pet") + end, + order = -10, + args = { + enable = { + name = L["Enable"], + order = 0, + type = "toggle" + }, + point = { + name = L["Anchor Point"], + order = 1, + type = "select", + values = { + ["TOPLEFT"] = "TOPLEFT", + ["TOPRIGHT"] = "TOPRIGHT", + ["BOTTOMLEFT"] = "BOTTOMLEFT", + ["BOTTOMRIGHT"] = "BOTTOMRIGHT", + ["LEFT"] = "LEFT", + ["RIGHT"] = "RIGHT", + ["TOP"] = "TOP", + ["BOTTOM"] = "BOTTOM" + } + }, + xOffset = {order = 2, type = "range", name = L["xOffset"], min = -75, max = 75, step = 1}, + yOffset = {order = 2, type = "range", name = L["yOffset"], min = -75, max = 75, step = 1}, + style = { + name = L["Style"], + order = 3, + type = "select", + values = {["coloredIcon"] = L["Colored Icon"], ["texturedIcon"] = L["Textured Icon"], [""] = NONE} + }, + color = { + name = L["Color"], + type = "color", + order = 4, + get = function(e) + local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] + return abColor.r, abColor.g, abColor.b, abColor.a + end, + set = function(e, i, j, k) + local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] + abColor.r, abColor.g, abColor.b = i, j, k; + MOD:SetUnitFrame("pet") + end + }, + displayText = { + name = L["Display Text"], + type = "toggle", + order = 5 + }, + textColor = { + name = L["Text Color"], + type = "color", + order = 6, + get = function(e) + local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] + if abColor then + return abColor.r,abColor.g,abColor.b,abColor.a + else + return 1,1,1,1 + end + end, + set = function(e,i,j,k) + local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] + abColor.r,abColor.g,abColor.b = i,j,k; + MOD:SetUnitFrame("pet") + end + }, + textThreshold = { + name = L["Text Threshold"], + desc = L["At what point should the text be displayed. Set to -1 to disable."], + type = "range", + order = 6, + min = -1, + max = 60, + step = 1 + }, + anyUnit = { + name = L["Show Aura From Other Players"], + order = 7, + type = "toggle" + }, + onlyShowMissing = { + name = L["Show When Not Active"], + order = 8, + type = "toggle", + disabled = function()return SV.db.filter.PetBuffWatch[registeredSpell].style == "text"end + } + } + } + end + + watchedBuffs = nil; + + elseif filterType == 'BuffWatch' then + + local watchedBuffs={} + + if not SV.db.filter.BuffWatch then + SV.db.filter.BuffWatch = {} + end + for o,f in pairs(SV.db.filter.BuffWatch) do + tinsert(watchedBuffs,f) + end + + SV.Options.args.filters.args.filterGroup = { + type = "group", + name = filterType, + guiInline = true, + order = -10, + childGroups = "tab", + args = { + addSpellID = { + order = 1, + name = L["Add SpellID"], + desc = L["Add a spell to the filter."], + type = "input", + get = function(e)return""end, + set = function(e, arg) + if not tonumber(arg)then + SV:AddonMessage(L["Value must be a number"]) + elseif not GetSpellInfo(arg)then + SV:AddonMessage(L["Not valid spell id"]) + else + tinsert(SV.db.filter.BuffWatch, {["enable"] = true, ["id"] = tonumber(arg), ["point"] = "TOPRIGHT", ["color"] = {["r"] = 1, ["g"] = 0, ["b"] = 0}, ["anyUnit"] = false}) + generateFilterOptions() + for t = 10, 40, 15 do + MOD:UpdateGroupAuraWatch("raid"..t) + end + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) + selectedSpell = nil + end + end + }, + removeSpellID = { + order = 2, + name = L["Remove SpellID"], + desc = L["Remove a spell from the filter."], + type = "input", + get = function(e)return""end, + set = function(e, arg) + if not tonumber(arg)then + SV:AddonMessage(L["Value must be a number"]) + elseif not GetSpellInfo(arg)then + SV:AddonMessage(L["Not valid spell id"]) + else + local p; + for q, r in pairs(SV.db.filter.BuffWatch)do + if r["id"] == tonumber(arg)then + p = r; + if SV.db.filter.BuffWatch[q]then + SV.db.filter.BuffWatch[q].enable = false; + else + SV.db.filter.BuffWatch[q] = nil + end + end + end + if p == nil then + SV:AddonMessage(L["Spell not found in list."]) + else + generateFilterOptions() + end + end + selectedSpell = nil; + generateFilterOptions() + for t = 10, 40, 15 do + MOD:UpdateGroupAuraWatch("raid"..t) + end + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) + end + }, + selectSpell = { + name = L["Select Spell"], + type = "select", + order = 3, + values = function() + local v = {} + watchedBuffs = {} + for o, f in pairs(SV.db.filter.BuffWatch)do + tinsert(watchedBuffs, f) + end + for o, l in pairs(watchedBuffs)do + if l.id then + local name = GetSpellInfo(l.id) + v[l.id] = name + end + end + return v + end, + get = function(e)return selectedSpell end, + set = function(e, arg)selectedSpell = arg;generateFilterOptions()end + } + } + } + local registeredSpell; + for t,l in pairs(SV.db.filter.BuffWatch)do if l.id==selectedSpell then registeredSpell=t end end + if selectedSpell and registeredSpell then + local currentSpell=GetSpellInfo(selectedSpell) + SV.Options.args.filters.args.filterGroup.args[currentSpell] = { + name = currentSpell.." ("..selectedSpell..")", + type = "group", + get = function(e)return SV.db.filter.BuffWatch[registeredSpell][e[#e]]end, + set = function(e, arg) + SV.db.filter.BuffWatch[registeredSpell][e[#e]] = arg; + for t = 10, 40, 15 do + MOD:UpdateGroupAuraWatch("raid"..t) + end + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) + end, + order = -10, + args = { + enable = {name = L["Enable"], order = 0, type = "toggle"}, + point = { + name = L["Anchor Point"], + order = 1, + type = "select", + values = { + ["TOPLEFT"] = "TOPLEFT", + ["TOPRIGHT"] = "TOPRIGHT", + ["BOTTOMLEFT"] = "BOTTOMLEFT", + ["BOTTOMRIGHT"] = "BOTTOMRIGHT", + ["LEFT"] = "LEFT", + ["RIGHT"] = "RIGHT", + ["TOP"] = "TOP", + ["BOTTOM"] = "BOTTOM" + } + }, + xOffset = {order = 2, type = "range", name = L["xOffset"], min = -75, max = 75, step = 1}, + yOffset = {order = 2, type = "range", name = L["yOffset"], min = -75, max = 75, step = 1}, + style = {name = L["Style"], order = 3, type = "select", values = {["coloredIcon"] = L["Colored Icon"], ["texturedIcon"] = L["Textured Icon"], [""] = NONE}}, + color = { + name = L["Color"], + type = "color", + order = 4, + get = function(e) + local abColor = SV.db.filter.BuffWatch[registeredSpell][e[#e]] + return abColor.r, abColor.g, abColor.b, abColor.a + end, + set = function(e, i, j, k) + local abColor = SV.db.filter.BuffWatch[registeredSpell][e[#e]] + abColor.r, abColor.g, abColor.b = i, j, k; + for t = 10, 40, 15 do + MOD:UpdateGroupAuraWatch("raid"..t) + end + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) + end + }, + displayText = { + name = L["Display Text"], + type = "toggle", + order = 5 + }, + textColor = { + name = L["Text Color"], + type = "color", + order = 6, + get = function(e) + local abColor = SV.db.filter.BuffWatch[registeredSpell][e[#e]] + if abColor then + return abColor.r, abColor.g, abColor.b, abColor.a + else + return 1, 1, 1, 1 + end + end, + set = function(e, i, j, k) + SV.db.filter.BuffWatch[registeredSpell][e[#e]] = SV.db.filter.BuffWatch[registeredSpell][e[#e]] or {} + local abColor = SV.db.filter.BuffWatch[registeredSpell][e[#e]] + abColor.r, abColor.g, abColor.b = i, j, k; + for t = 10, 40, 15 do + MOD:UpdateGroupAuraWatch("raid"..t) + end + MOD:UpdateGroupAuraWatch("party") + MOD:UpdateGroupAuraWatch("raidpet", true) + end + }, + textThreshold = { + name = L["Text Threshold"], + desc = L["At what point should the text be displayed. Set to -1 to disable."], + type = "range", + order = 6, + min = -1, + max = 60, + step = 1 + }, + anyUnit = { + name = L["Show Aura From Other Players"], + order = 7, + type = "toggle" + }, + onlyShowMissing = { + name = L["Show When Not Active"], + order = 8, + type = "toggle", + disabled = function()return SV.db.filter.BuffWatch[registeredSpell].style == "text" end + } + } + } + end + watchedBuffs=nil + else + if not filterType or not SV.db.filter[filterType]then + SV.Options.args.filters.args.filterGroup = nil; + SV.Options.args.filters.args.spellGroup = nil; + return + end + SV.Options.args.filters.args.filterGroup = { + type = "group", + name = filterType, + guiInline = true, + order = 10, + args = { + addSpell = { + order = 1, + name = L["Add Spell"], + desc = L["Add a spell to the filter."], + type = "input", + get = function(e)return""end, + set = function(e, arg) + if not SV.db.filter[filterType][arg]then + SV.db.filter[filterType][arg] = { + ["enable"] = true, + ["priority"] = 0 + } + end + generateFilterOptions() + MOD:RefreshUnitFrames() + end + }, + removeSpell = { + order = 2, + name = L["Remove Spell"], + desc = L["Remove a spell from the filter."], + type = "input", + get = function(e)return""end, + set = function(e, arg) + if SV.db.filter[filterType] then + if SV.db.filter[filterType][arg] then + SV.db.filter[filterType][arg].enable = false; + SV:AddonMessage(L["You may not remove a spell from a default filter that is not customly added. Setting spell to false instead."]) + else + SV.db.filter[filterType][arg] = nil + end + else + SV.db.filter[filterType][arg] = nil + end + generateFilterOptions() + MOD:RefreshUnitFrames() + end + }, + selectSpell = { + name = L["Select Spell"], + type = "select", + order = 3, + guiInline = true, + get = function(e)return selectedSpell end, + set = function(e, arg) + selectedSpell = arg; + generateFilterOptions() + end, + values = function() + local filters = {} + local list = SV.db.filter[filterType] + filters[""] = NONE; + for g in pairs(list)do + filters[g] = g + end + return filters + end + } + } + } + + if not selectedSpell or not SV.db.filter[filterType][selectedSpell] then + SV.Options.args.filters.args.spellGroup = nil; + return + end + + SV.Options.args.filters.args.spellGroup = { + type = "group", + name = selectedSpell, + order = 15, + guiInline = true, + args = { + enable = { + name = L["Enable"], + type = "toggle", + get = function() + if selectedFolder or not selectedSpell then + return false + else + return SV.db.filter[filterType][selectedSpell].enable + end + end, + set = function(e, arg) + SV.db.filter[filterType][selectedSpell].enable = arg; + generateFilterOptions() + MOD:RefreshUnitFrames() + end + }, + priority = { + name = L["Priority"], + type = "range", + get = function() + if selectedFolder or not selectedSpell then + return 0 + else + return SV.db.filter[filterType][selectedSpell].priority + end + end, + set = function(e, arg) + SV.db.filter[filterType][selectedSpell].priority = arg; + generateFilterOptions() + MOD:RefreshUnitFrames() + end, + min = 0, + max = 99, + step = 1, + desc = L["Set the priority order of the spell, please note that prioritys are only used for the raid debuff package, not the standard buff/debuff package. If you want to disable set to zero."] + } + } + } + end + MOD:RefreshUnitFrames() + collectgarbage("collect") +end +SV.Options.args.filters = { + type = "group", + name = L["Filters"], + order = -10, + args = { + createFilter = { + order = 1, + name = L["Create Filter"], + desc = L["Create a filter, once created a filter can be set inside the buffs/debuffs section of each unit."], + type = "input", + get = function(e)return""end, + set = function(e, arg) + SV.db.filter[arg] = {} + SV.db.filter[arg]["spells"] = {} + end + }, + deleteFilter = { + type = "select", + order = 2, + name = L["Delete Filter"], + desc = L["Delete a created filter, you cannot delete pre-existing filters, only custom ones."], + get = function(e)return""end, + set = function(e, arg) + if SV.db.filter[arg] then + SV:AddonMessage(L["You can't remove a pre-existing filter."]) + else + SV.db.filter[arg] = nil; + filterType = nil; + selectedSpell = nil; + SV.Options.args.filters.args.filterGroup = nil + end + end, + values = function() + filters = {} + filters[""] = NONE; + for g in pairs(SV.db.filter) do + filters[g] = nameMapping[g] or g + end + return filters + end + }, + selectFilter = { + order = 3, + type = "select", + name = L["Select Filter"], + get = function(e)return filterType end, + set = function(e, arg) + if arg == "" then + filterType = nil; + selectedSpell = nil + else + filterType = arg + end + generateFilterOptions() + end, + values = function() + filters = {} + filters[""] = NONE; + for g in pairs(SV.db.filter) do + filters[g] = nameMapping[g] or g + end + filters["AuraBar Colors"] = "AuraBar Colors" + return filters + end + } + } +} + + +function ns:SetToFilterConfig(newFilter) + filterType = newFilter or "BuffWatch" + generateFilterOptions() + LibStub("AceConfigDialog-3.0"):SelectGroup(SV.NameID, "filters") +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/henchmen.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/henchmen.lua new file mode 100644 index 0000000..ae30fcd --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/henchmen.lua @@ -0,0 +1,186 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVHenchmen; +--[[ +########################################################## +SET PACKAGE OPTIONS +########################################################## +]]-- +SV.Options.args.SVHenchmen={ + type = "group", + name = MOD.TitleID, + get = function(a)return SV.db.SVHenchmen[a[#a]]end, + set = function(a,b)MOD:ChangeDBVar(b,a[#a]); end, + args = { + intro = { + order = 1, + type = "description", + name = L["Adjust the behavior and features that your henchmen will use."] + }, + common = { + order = 2, + type = "group", + name = L["General"], + guiInline = true, + args = { + automationGroup1 = { + order = 1, + type = "group", + guiInline = true, + name = L["Task Minions"], + desc = L['Minions that can make certain tasks easier by handling them automatically.'], + args = { + mailOpener = { + order = 1, + type = 'toggle', + name = L["Enable Mail Helper"], + get = function(j)return SV.db.SVHenchmen.mailOpener end, + set = function(j,value)SV.db.SVHenchmen.mailOpener = value;MOD:ToggleMailMinions()end + }, + autoAcceptInvite = { + order = 2, + name = L['Accept Invites'], + desc = L['Automatically accept invites from guild/friends.'], + type = 'toggle', + get = function(j)return SV.db.SVHenchmen.autoAcceptInvite end, + set = function(j,value)SV.db.SVHenchmen.autoAcceptInvite = value end + }, + vendorGrays = { + order = 3, + name = L['Vendor Grays'], + desc = L['Automatically vendor gray items when visiting a vendor.'], + type = 'toggle', + get = function(j)return SV.db.SVHenchmen.vendorGrays end, + set = function(j,value)SV.db.SVHenchmen.vendorGrays = value end + }, + autoRoll = { + order = 4, + name = L['Auto Greed/DE'], + desc = L['Automatically select greed or disenchant (when available) on green quality items. This will only work if you are the max level.'], + type = 'toggle', + get = function(j)return SV.db.SVHenchmen.autoRoll end, + set = function(j,value)SV.db.SVHenchmen.autoRoll = value end, + disabled = function()return not SV.db.SVOverride.lootRoll end + }, + pvpautorelease = { + order = 5, + type = "toggle", + name = L['PvP Autorelease'], + desc = L['Automatically release body when killed inside a battleground.'], + get = function(j)return SV.db.SVHenchmen.pvpautorelease end, + set = function(j,value)SV.db.SVHenchmen.pvpautorelease = value;SV:StaticPopup_Show("RL_CLIENT")end + }, + autorepchange = { + order = 6, + type = "toggle", + name = L['Track Reputation'], + desc = L['Automatically change your watched faction on the reputation bar to the faction you got reputation points for.'], + get = function(j)return SV.db.SVHenchmen.autorepchange end, + set = function(j,value)SV.db.SVHenchmen.autorepchange = value end + }, + skipcinematics = { + order = 7, + type = "toggle", + name = L['Skip Cinematics'], + desc = L['Automatically skip any cinematic sequences.'], + get = function(j)return SV.db.SVHenchmen.skipcinematics end, + set = function(j,value)SV.db.SVHenchmen.skipcinematics = value;SV:StaticPopup_Show("RL_CLIENT") end + }, + autoRepair = { + order = 8, + name = L['Auto Repair'], + desc = L['Automatically repair using the following method when visiting a merchant.'], + type = 'select', + values = { + ['NONE'] = NONE, + ['GUILD'] = GUILD, + ['PLAYER'] = PLAYER + }, + get = function(j)return SV.db.SVHenchmen.autoRepair end, + set = function(j,value)SV.db.SVHenchmen.autoRepair = value end + }, + } + }, + automationGroup2 = { + order = 2, + type = "group", + guiInline = true, + name = L["Quest Minions"], + desc = L['Minions that can make questing easier by automatically accepting/completing quests.'], + args = { + autoquestaccept = { + order = 1, + type = "toggle", + name = L['Accept Quests'], + desc = L['Automatically accepts quests as they are presented to you.'], + get = function(j)return SV.db.SVHenchmen.autoquestaccept end, + set = function(j,value) SV.db.SVHenchmen.autoquestaccept = value end + }, + autoquestcomplete = { + order = 2, + type = "toggle", + name = L['Complete Quests'], + desc = L['Automatically complete quests when possible.'], + get = function(j)return SV.db.SVHenchmen.autoquestcomplete end, + set = function(j,value)SV.db.SVHenchmen.autoquestcomplete = value end + }, + autoquestreward = { + order = 3, + type = "toggle", + name = L['Select Quest Reward'], + desc = L['Automatically select the quest reward with the highest vendor sell value.'], + get = function(j)return SV.db.SVHenchmen.autoquestreward end, + set = function(j,value)SV.db.SVHenchmen.autoquestreward = value end + }, + autodailyquests = { + order = 4, + type = "toggle", + name = L['Only Automate Dailies'], + desc = L['Force the auto accept functions to only respond to daily quests. NOTE: This does not apply to daily heroics for some reason.'], + get = function(j)return SV.db.SVHenchmen.autodailyquests end, + set = function(j,value)SV.db.SVHenchmen.autodailyquests = value end + }, + autopvpquests = { + order = 5, + type = "toggle", + name = L['Accept PVP Quests'], + get = function(j)return SV.db.SVHenchmen.autopvpquests end, + set = function(j,value)SV.db.SVHenchmen.autopvpquests = value end + }, + } + }, + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/map.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/map.lua new file mode 100644 index 0000000..8a5a340 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/map.lua @@ -0,0 +1,239 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVMap +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local textSelect = { + ['HIDE'] = L['Hide This'], + ['CUSTOM'] = L['Use Custom Style'], + ['SIMPLE'] = L['Use Simple Style'] +}; +local colorSelect = { + ['light'] = L['Light'], + ['dark'] = L['Dark'], + ['class'] = L['Class'] +}; +--[[ +########################################################## +OPTIONS TABLE +########################################################## +]]-- +SV.Options.args.SVMap = { + type = 'group', + childGroups = "tree", + name = MOD.TitleID, + get = function(a)return SV.db.SVMap[a[#a]]end, + set = function(a,b)MOD:ChangeDBVar(b,a[#a]);MOD:ReLoad()end, + args={ + intro={ + order = 1, + type = 'description', + name = L["Options for the Minimap"] + }, + enable={ + type = "toggle", + order = 2, + name = L['Enable'], + desc = L['Enable/Disable the Custom Minimap.'], + get = function(a)return SV.db.SVMap.enable end, + set = function(a,b)SV.db.SVMap.enable=b; SV:StaticPopup_Show("RL_CLIENT") end + }, + common = { + order = 3, + type = "group", + name = MINIMAP_LABEL, + desc = L['General display settings'], + guiInline = true, + disabled = function()return not SV.db.SVMap.enable end, + args = { + size = { + order = 1, + type = "range", + name = L["Size"], + desc = L['Adjust the size of the minimap.'], + min = 120, + max = 240, + width = "full", + step = 1 + }, + bordersize = { + order = 2, + type = "range", + name = "Border Size", + desc = "Adjust the size of the minimap's outer border", + min = 0, + max = 20, + step = 1, + width = "full" + }, + bordercolor = { + order = 3, + type = 'select', + name = "Border Color", + desc = "Adjust the color of the minimap's outer border", + values = colorSelect, + }, + customshape = { + order = 4, + type = "toggle", + name = "Custom Shape", + desc = "Toggle the use of either rectangular or square minimap.", + } + } + }, + spacer1 = { + order = 4, + type = "group", + name = "", + guiInline = true, + args = {} + }, + common2 = { + order = 5, + type = "group", + name = "Labels and Info", + desc = L['Configure various minimap texts'], + guiInline = true, + disabled = function()return not SV.db.SVMap.enable end, + args = { + locationText = { + order = 1, + type = "select", + name = L["Location Text"], + values = textSelect, + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:ReLoad()end + }, + playercoords = { + order = 2, + type = "select", + name = L["Player Coords"], + values = textSelect, + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:ReLoad()end + } + } + }, + spacer2 = { + order = 6, + type = "group", + name = "", + guiInline = true, + args = {} + }, + mmButtons = { + order = 7, + type = "group", + name = "Minimap Buttons", + get = function(j)return SV.db.SVMap.minimapbar[j[#j]]end, + guiInline = true, + disabled = function()return not SV.db.SVMap.enable end, + args = { + enable = { + order = 1, + type = 'toggle', + name = L['Buttons Styled'], + desc = L['Style the minimap buttons.'], + set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")SV:StaticPopup_Show("RL_CLIENT")end, + }, + mouseover = { + order = 2, + name = L["Mouse Over"], + desc = L["Hidden unless you mouse over the frame."], + type = "toggle", + set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")MOD:UpdateMinimapButtonSettings()end, + }, + styleType = { + order = 3, + type = 'select', + name = L['Button Bar Layout'], + desc = L['Change settings for how the minimap buttons are styled.'], + set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")MOD:UpdateMinimapButtonSettings()end, + disabled = function()return not SV.db.SVMap.minimapbar.enable end, + values = { + ['NOANCHOR'] = L['No Anchor Bar'], + ['HORIZONTAL'] = L['Horizontal Anchor Bar'], + ['VERTICAL'] = L['Vertical Anchor Bar'] + } + }, + buttonSize = { + order = 4, + type = 'range', + name = L['Buttons Size'], + desc = L['The size of the minimap buttons.'], + min = 16, + max = 40, + step = 1, + width = "full", + set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")MOD:UpdateMinimapButtonSettings()end, + disabled = function()return not SV.db.SVMap.minimapbar.enable or SV.db.SVMap.minimapbar.styleType == 'NOANCHOR'end + }, + } + }, + spacer3 = { + order = 8, + type = "group", + name = "", + guiInline = true, + args = {} + }, + worldMap = { + order = 9, + type = "group", + name = "WorldMap", + guiInline = true, + args = { + tinyWorldMap = { + order = 1, + type = "toggle", + name = L["Tiny Map"], + desc = L["Don't scale the large world map to block out sides of the screen."], + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:ReLoad()end + }, + mapAlpha = { + order = 2, + name = L['Map Alpha While Moving'], + desc = L['Controls what the transparency of the worldmap will be set to when you are moving.'], + type = 'range', + isPercent = true, + min = 0, + max = 1, + step = 0.01, + set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:ReLoad()end + }, + } + }, + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/plate.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/plate.lua new file mode 100644 index 0000000..3f5e41c --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/plate.lua @@ -0,0 +1,736 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVPlate; +local _, ns = ...; +--[[ +########################################################## +SET PACKAGE OPTIONS +########################################################## +]]-- +local positionTable = { + TOPLEFT = "TOPLEFT", + LEFT = "LEFT", + BOTTOMLEFT = "BOTTOMLEFT", + RIGHT = "RIGHT", + TOPRIGHT = "TOPRIGHT", + BOTTOMRIGHT = "BOTTOMRIGHT", + CENTER = "CENTER", + TOP = "TOP", + BOTTOM = "BOTTOM", + RIGHTTOP = "RIGHTTOP", + LEFTTOP = "LEFTTOP", + RIGHTBOTTOM = "RIGHTBOTTOM", + LEFTBOTTOM = "LEFTBOTTOM" +}; + +local activeFilter,filters; + +local function UpdateFilterGroupOptions() + if not activeFilter or not SV.db['SVPlate']['filter'][activeFilter] then + SV.Options.args.SVPlate.args.filters.args.filterGroup=nil; + return + end + SV.Options.args.SVPlate.args.filters.args.filterGroup = { + type = "group", + name = activeFilter, + guiInline = true, + order = -10, + get = function(d)return SV.db["SVPlate"]["filter"][activeFilter][d[#d]] end, + set = function(d,e) + SV.db["SVPlate"]["filter"][activeFilter][d[#d]] = e; + MOD:PlateIteration("AssertFiltering") + MOD:UpdateAllPlates() + UpdateFilterGroupOptions() + end, + args = { + enable = { + type = "toggle", + order = 1, + name = L["Enable"], + desc = L["Use this filter."] + }, + hide = { + type = "toggle", + order = 2, + name = L["Hide"], + desc = L["Prevent any nameplate with this unit name from showing."] + }, + customColor = { + type = "toggle", + order = 3, + name = L["Custom Color"], + desc = L["Disable threat coloring for this plate and use the custom color."] + }, + color = { + type = "color", + order = 4, + name = L["Color"], + get = function(key) + local color = SV.db["SVPlate"]["filter"][activeFilter][key[#key]] + if color then + return color[1],color[2],color[3],color[4] + end + end, + set = function(key,r,g,b) + SV.db["SVPlate"]["filter"][activeFilter][key[#key]] = {} + local color = SV.db["SVPlate"]["filter"][activeFilter][key[#key]] + if color then + color = {r,g,b}; + UpdateFilterGroupOptions() + MOD:PlateIteration("CheckFilterAndHealers") + MOD:UpdateAllPlates() + end + end + }, + customScale = { + type = "range", + name = L["Custom Scale"], + desc = L["Set the scale of the nameplate."], + min = 0.67, + max = 2, + step = 0.01 + } + } + } +end + +SV.Options.args.SVPlate = { + type = "group", + name = MOD.TitleID, + childGroups = "tab", + args = { + commonGroup = { + order = 1, + type = 'group', + name = L['NamePlate Options'], + childGroups = "tree", + args = { + intro = {order = 1, type = "description", name = L["NAMEPLATE_DESC"]}, + enable={ + order=2,type="toggle",name=L["Enable"], + get=function(d)return SV.db.SVPlate[d[#d]]end, + set=function(d,e)SV.db.SVPlate[d[#d]]=e;SV:StaticPopup_Show("RL_CLIENT")end, + }, + common = { + order = 1, + type = "group", + name = L["General"], + get = function(d)return SV.db.SVPlate[d[#d]]end, + set = function(d,e)MOD:ChangeDBVar(e,d[#d]);MOD:UpdateAllPlates() end, + disabled = function()return not SV.db.SVPlate.enable end, + args = { + combatHide = { + type = "toggle", + order = 1, + name = L["Combat Toggle"], + desc = L["Toggle the nameplates to be visible outside of combat and visible inside combat."], + set = function(d,e)MOD:ChangeDBVar(e,d[#d])MOD:CombatToggle()end + }, + comboPoints = { + type = "toggle", + order = 2, + name = L["Combo Points"], + desc = L["Display combo points on nameplates."] + }, + colorNameByValue = { + type = "toggle", + order = 3, + name = L["Color Name By Health Value"] + }, + targetcount = { + type = "toggle", + order = 4, + name = L["Target Count"], + desc = L["Display the number of party / raid members targetting the nameplate unit."] + }, + showthreat = { + type = "toggle", + order = 5, + name = L["Threat Text"], + desc = L["Display threat level as text on targeted, boss or mouseover nameplate."] + }, + nonTargetAlpha = { + type = "range", + order = 6, + name = L["Non-Target Alpha"], + desc = L["Alpha of nameplates that are not your current target."], + min = 0, + max = 1, + step = 0.01, + isPercent = true + }, + fontGroup = { + order = 100, + type = "group", + guiInline = true, + name = L["Fonts"], + args = { + font = { + type = "select", + dialogControl = "LSM30_Font", + order = 4, + name = L["Font"], + values = AceGUIWidgetLSMlists.font + }, + fontSize = { + order = 5, + name = L["Font Size"], + type = "range", + min = 6, + max = 22, + step = 1 + }, + fontOutline = { + order = 6, + name = L["Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = { + ["NONE"] = L["None"], + ["OUTLINE"] = "OUTLINE", + ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", + ["THICKOUTLINE"] = "THICKOUTLINE" + } + } + } + }, + reactions = { + order = 200, + type = "group", + name = L["Reaction Coloring"], + guiInline = true, + get = function(key) + local color = SV.db.SVPlate.reactions[key[#key]] + if color then + return color[1],color[2],color[3],color[4] + end + end, + set = function(key,r,g,b) + local color = {r,g,b} + MOD:ChangeDBVar(color, key[#key], "reactions") + MOD:UpdateAllPlates() + end, + args = { + friendlyNPC = { + type = "color", + order = 1, + name = L["Friendly NPC"], + hasAlpha = false + }, + friendlyPlayer = { + name = L["Friendly Player"], + order = 2, + type = "color", + hasAlpha = false + }, + neutral = { + name = L["Neutral"], + order = 3, + type = "color", + hasAlpha = false + }, + enemy = { + name = L["Enemy"], + order = 4, + type = "color", + hasAlpha = false + }, + tapped = { + name = L["Tagged NPC"], + order = 5, + type = "color", + hasAlpha = false + } + } + }, + } + }, + healthBar = { + type = "group", + order = 2, + name = L["Health Bar"], + disabled = function()return not SV.db.SVPlate.enable end, + get = function(d)return SV.db.SVPlate.healthBar[d[#d]]end, + set = function(d,e)MOD:ChangeDBVar(e,d[#d],"healthBar");MOD:UpdateAllPlates()end, + args = { + width = { + type = "range", + order = 1, + name = L["Width"], + desc = L["Controls the width of the nameplate"], + type = "range", + min = 50, + max = 125, + step = 1 + }, + height = { + type = "range", + order = 2, + name = L["Height"], + desc = L["Controls the height of the nameplate"], + type = "range", + min = 4, + max = 30, + step = 1 + }, + lowThreshold = { + type = "range", + order = 3, + name = L["Low Health Threshold"], + desc = L["Color the border of the nameplate yellow when it reaches this point,it will be colored red when it reaches half this value."], + isPercent = true, + min = 0, + max = 1, + step = 0.01 + }, + fontGroup = { + order = 4, + type = "group", + name = L["Fonts"], + guiInline = true, + get = function(d)return SV.db.SVPlate.healthBar.text[d[#d]]end, + set = function(d,e)MOD:ChangeDBVar(e,d[#d],"healthBar","text");MOD:UpdateAllPlates()end, + args = { + enable = { + type = "toggle", + name = L["Enable"], + order = 1 + }, + attachTo = { + type = "select", + order = 2, + name = L["Attach To"], + values = { + TOPLEFT = "TOPLEFT", + LEFT = "LEFT", + BOTTOMLEFT = "BOTTOMLEFT", + RIGHT = "RIGHT", + TOPRIGHT = "TOPRIGHT", + BOTTOMRIGHT = "BOTTOMRIGHT", + CENTER = "CENTER", + TOP = "TOP", + BOTTOM = "BOTTOM" + } + }, + format = { + type = "select", + order = 3, + name = L["Format"], + values = { + ["CURRENT_MAX_PERCENT"] = L["Current - Max | Percent"], + ["CURRENT_PERCENT"] = L["Current - Percent"], + ["CURRENT_MAX"] = L["Current - Max"], + ["CURRENT"] = L["Current"], + ["PERCENT"] = L["Percent"], + ["DEFICIT"] = L["Deficit"] + } + }, + xOffset = { + type = "range", + order = 4, + name = L["X-Offset"], + min = -150, + max = 150, + step = 1 + }, + yOffset = { + type = "range", + order = 5, + name = L["Y-Offset"], + min = -150, + max = 150, + step = 1 + } + } + } + } + }, + castBar = { + type = "group", + order = 3, + name = L["Cast Bar"], + disabled = function()return not SV.db.SVPlate.enable end, + get = function(d)return SV.db.SVPlate.castBar[d[#d]]end, + set = function(d,e)MOD:ChangeDBVar(e,d[#d],"castBar");MOD:UpdateAllPlates()end, + args = { + height = { + type = "range", + order = 1, + name = L["Height"], + type = "range", + min = 4, + max = 30, + step = 1 + }, + colors = { + order = 100, + type = "group", + name = L["Colors"], + guiInline = true, + get = function(key) + local color = SV.db.SVPlate.castBar[key[#key]] + if color then + return color[1],color[2],color[3],color[4] + end + end, + set = function(key,r,g,b) + local color = {r,g,b} + MOD:ChangeDBVar(color, key[#key], "castBar") + MOD:UpdateAllPlates() + end, + args = { + color = { + type = "color", + order = 1, + name = L["Can Interrupt"], + hasAlpha = false + }, + noInterrupt = { + name = "No Interrupt", + order = 2, + type = "color", + hasAlpha = false + } + } + } + } + }, + pointer = { + type = "group", + order = 4, + name = L["Target Indicator"], + get = function(d)return SV.db.SVPlate.pointer[d[#d]]end, + set = function(d,e)MOD:ChangeDBVar(e,d[#d],"pointer");WorldFrame.elapsed = 3;MOD:UpdateAllPlates()end, + args = { + enable = { + order = 1, + type = "toggle", + name = L["Enable"] + }, + colorMatchHealthBar = { + order = 2, + type = "toggle", + name = L["Color By Healthbar"], + desc = L["Match the color of the healthbar."], + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], "pointer"); + if value then + WorldFrame.elapsed = 3 + end + end + }, + color = { + type = "color", + name = L["Color"], + order = 3, + disabled = function()return SV.db.SVPlate.pointer.colorMatchHealthBar end, + get = function(key) + local color = SV.db.SVPlate.pointer[key[#key]] + if color then + return color[1],color[2],color[3],color[4] + end + end, + set = function(key,r,g,b) + local color = {r,g,b} + MOD:ChangeDBVar(color, key[#key], "pointer") + MOD:UpdateAllPlates() + end, + } + } + }, + raidHealIcon = { + type = "group", + order = 5, + name = L["Raid Icon"], + get = function(d)return SV.db.SVPlate.raidHealIcon[d[#d]]end, + set = function(d,e)MOD:ChangeDBVar(e,d[#d],"raidHealIcon")MOD:UpdateAllPlates()end, + args = { + attachTo = { + type = "select", + order = 1, + name = L["Attach To"], + values = positionTable + }, + xOffset = { + type = "range", + order = 2, + name = L["X-Offset"], + min = -150, + max = 150, + step = 1 + }, + yOffset = { + type = "range", + order = 3, + name = L["Y-Offset"], + min = -150, + max = 150, + step = 1 + }, + size = { + order = 4, + type = "range", + name = L["Size"], + width = "full", + min = 10, + max = 200, + step = 1 + }, + } + }, + auras = { + type = "group", + order = 4, + name = L["Auras"], + get = function(d)return SV.db.SVPlate.auras[d[#d]]end, + set = function(d,e)MOD:ChangeDBVar(e,d[#d],"auras")MOD:UpdateAllPlates()end, + args = { + numAuras = { + type = "range", + order = 1, + name = L["Number of Auras"], + min = 2, + max = 8, + step = 1 + }, + additionalFilter = { + type = "select", + order = 2, + name = L["Additional Filter"], + values = function() + filters = {} + filters[""] = NONE; + for j in pairs(SV.db.filter) do + filters[j] = j + end + return filters + end + }, + configureButton = { + order = 4, + name = L["Configure Selected Filter"], + type = "execute", + width = "full", + func = function()ns:SetToFilterConfig(SV.db.SVPlate.auras.additionalFilter)end + }, + fontGroup = { + order = 100, + type = "group", + guiInline = true, + name = L["Fonts"], + args = { + font = { + type = "select", + dialogControl = "LSM30_Font", + order = 4, + name = L["Font"], + values = AceGUIWidgetLSMlists.font + }, + fontSize = { + order = 5, + name = L["Font Size"], + type = "range", + min = 6, + max = 22, + step = 1 + }, + fontOutline = { + order = 6, + name = L["Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = { + ["NONE"] = L["None"], + ["OUTLINE"] = "OUTLINE", + ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", + ["THICKOUTLINE"] = "THICKOUTLINE" + } + } + } + } + } + }, + threat = { + type = "group", + order = 6, + name = L["Threat"], + get = function(d)return SV.db.SVPlate.threat[d[#d]]end, + set = function(d,e)MOD:ChangeDBVar(e,d[#d],"threat")MOD:UpdateAllPlates()end, + args = { + enable = { + type = "toggle", + order = 1, + name = L["Enable"] + }, + scaling = { + type = "group", + name = L["Scaling"], + guiInline = true, + order = 2, + args = { + goodScale = { + type = "range", + name = L["Good"], + order = 1, + min = 0.5, + max = 1.5, + step = 0.01, + isPercent = true + }, + badScale = { + type = "range", + name = L["Bad"], + order = 1, + min = 0.5, + max = 1.5, + step = 0.01, + isPercent = true + } + } + }, + colors = { + order = 3, + type = "group", + name = L["Colors"], + guiInline = true, + get = function(key) + local color = SV.db.SVPlate.threat[key[#key]] + if color then + return color[1],color[2],color[3],color[4] + end + end, + set = function(key,r,g,b) + local color = {r,g,b} + MOD:ChangeDBVar(color, key[#key], "threat") + MOD:UpdateAllPlates() + end, + args = { + goodColor = { + type = "color", + order = 1, + name = L["Good"], + hasAlpha = false + }, + badColor = { + name = L["Bad"], + order = 2, + type = "color", + hasAlpha = false + }, + goodTransitionColor = { + name = L["Good Transition"], + order = 3, + type = "color", + hasAlpha = false + }, + badTransitionColor = { + name = L["Bad Transition"], + order = 4, + type = "color", + hasAlpha = false + } + } + } + } + }, + filters = { + type = "group", + order = 200, + name = L["Filters"], + disabled = function()return not SV.db.SVPlate.enable end, + args = { + addname = { + type = "input", + order = 1, + name = L["Add Name"], + get = function(d)return""end, + set = function(d,e) + if SV.db["SVPlate"]["filter"][e]then + SV:AddonMessage(L["Filter already exists!"]) + return + end + SV.db["SVPlate"]["filter"][e] = { + ["enable"] = true, + ["hide"] = false, + ["customColor"] = false, + ["customScale"] = 1, + ["color"] = { + g = 104/255, + h = 138/255, + i = 217/255 + } + } + UpdateFilterGroupOptions() + MOD:UpdateAllPlates() + end + }, + deletename = { + type = "input", + order = 2, + name = L["Remove Name"], + get = function(d)return""end, + set = function(d,e) + if G["SVPlate"]["filter"][e]then + SV.db["SVPlate"]["filter"][e].enable = false; + SV:AddonMessage(L["You can't remove a default name from the filter,disabling the name."]) + else + SV.db["SVPlate"]["filter"][e] = nil; + SV.Options.args.SVPlate.args.filters.args.filterGroup = nil + end + UpdateFilterGroupOptions() + MOD:UpdateAllPlates() + end + }, + selectFilter = { + order = 3, + type = "select", + name = L["Select Filter"], + get = function(d)return activeFilter end, + set = function(d,e)activeFilter = e;UpdateFilterGroupOptions()end, + values = function() + filters = {} + if(SV.db["SVPlate"]["filter"]) then + for j in pairs(SV.db["SVPlate"]["filter"])do + filters[j] = j + end + end + return filters + end + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/profiles.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/profiles.lua new file mode 100644 index 0000000..d19affc --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/profiles.lua @@ -0,0 +1,144 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local SVLib = LibSuperVillain; +local L = SV.L; + +local playerRealm = GetRealmName() +local playerName = UnitName("player") +local profileKey = ("%s - %s"):format(playerName, playerRealm) + +SV.Options.args.profiles = { + order = 9999, + type = "group", + name = L["profiles"], + childGroups = "tab", + args = { + desc = { + order = 1, + type = "description", + name = L["intro"] .. "\n", + }, + spacer1 = { + order = 2, + type = "description", + name = "", + width = "full", + }, + importdesc = { + order = 3, + type = "description", + name = "\n" .. L["import_desc"], + width = "full" + }, + save = { + order = 4, + type = "execute", + name = SAVE, + desc = function() return SAVE .. " " .. L["current"] .. " " .. NORMAL_FONT_COLOR_CODE .. profileKey .. FONT_COLOR_CODE_CLOSE end, + func = function() SVLib:ExportDatabase(profileKey) SV:SavedPopup() end, + }, + export = { + name = L["export"], + desc = L["export_sub"], + type = "input", + order = 5, + get = false, + set = function(key, value) SVLib:ExportDatabase(value) SV:SavedPopup() end, + }, + import = { + name = L["import"], + desc = L["import_sub"], + type = "select", + order = 6, + get = function() return " SELECT ONE" end, + set = function(key, value) SV:ImportProfile(value) end, + disabled = function() local t = SVLib:CheckProfiles() return (not t) end, + values = SVLib:GetProfiles(), + }, + spacer2 = { + order = 7, + type = "description", + name = "", + width = "full", + }, + deldesc = { + order = 8, + type = "description", + name = "\n" .. L["delete_desc"], + }, + delete = { + order = 9, + type = "select", + name = L["delete"], + desc = L["delete_sub"], + get = function() return " SELECT ONE" end, + set = function(key, value) SVLib:Remove(value) end, + values = SVLib:GetProfiles(), + disabled = function() local t = SVLib:CheckProfiles() return (not t) end, + confirm = true, + confirmText = L["delete_confirm"], + }, + spacer3 = { + order = 10, + type = "description", + name = "", + width = "full", + }, + descreset = { + order = 11, + type = "description", + name = L["reset_desc"], + }, + reset = { + order = 12, + type = "execute", + name = function() return L["reset"] .. " " .. NORMAL_FONT_COLOR_CODE .. profileKey .. FONT_COLOR_CODE_CLOSE end, + desc = L["reset_sub"], + func = function() SV:StaticPopup_Show("RESET_PROFILE_PROMPT") end, + width = "full", + }, + spacer4 = { + order = 13, + type = "description", + name = "", + width = "full", + }, + dualSpec = { + order = 14, + type = "toggle", + name = "Dual-Spec Switching", + get = function() return SVLib:CheckDualProfile() end, + set = function(key, value) SVLib:ToggleDualProfile(value) end, + }, + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/stat.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/stat.lua new file mode 100644 index 0000000..590e554 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/stat.lua @@ -0,0 +1,158 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local string = _G.string; +local upper = string.upper; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVStats; +--[[ +########################################################## +SET PACKAGE OPTIONS +########################################################## +]]-- +SV.Options.args.SVStats = { + type = "group", + name = MOD.TitleID, + childGroups = "tab", + get = function(key) return SV.db.SVStats[key[#key]] end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key]); MOD:Generate() end, + args = { + intro = { + order = 1, + type = "description", + name = L["STATS_DESC"] + }, + time24 = { + order = 2, + type = "toggle", + name = L["24-Hour Time"], + desc = L["Toggle 24-hour mode for the time datatext."] + }, + localtime = { + order = 3, + type = "toggle", + name = L["Local Time"], + desc = L["If not set to true then the server time will be displayed instead."] + }, + battleground = { + order = 4, + type = "toggle", + name = L["Battleground Texts"], + desc = L["When inside a battleground display personal scoreboard information on the main datatext bars."] + }, + showBackground = { + order = 5, + name = "Show Backgrounds", + desc = L["Display statistic background textures"], + type = "toggle", + set = function(key, value) MOD:ChangeDBVar(value, key[#key]); SV:StaticPopup_Show("RL_CLIENT") end, + }, + shortGold = { + order = 6, + type = "toggle", + name = L["Shortened Gold Text"], + }, + fontGroup = { + order = 7, + type = "group", + guiInline = true, + name = L["Fonts"], + set = function(key, value) MOD:ChangeDBVar(value, key[#key]); MOD:Generate() end, + args = { + font = { + type = "select", + dialogControl = "LSM30_Font", + order = 4, + name = L["Font"], + values = AceGUIWidgetLSMlists.font + }, + fontSize = { + order = 5, + name = L["Font Size"], + type = "range", + min = 6, + max = 22, + step = 1 + }, + fontOutline = { + order = 6, + name = L["Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = { + ["NONE"] = L["None"], + ["OUTLINE"] = "OUTLINE", + ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", + ["THICKOUTLINE"] = "THICKOUTLINE" + } + } + } + }, + panels = { + type = "group", + name = L["Panels"], + order = 100, + args = {}, + guiInline = true + }, + } +} + +do + local orderIncrement = 0; + local statValues = MOD.StatListing + local configTable = SV.db.SVStats.panels; + local optionTable = SV.Options.args.SVStats.args.panels.args; + + for panelName, panelPositions in pairs(configTable)do + orderIncrement = orderIncrement + 1; + if(not _G[panelName]) then + optionTable[panelName] = nil; + return + end + if(type(panelPositions) == "table") then + optionTable[panelName] = { + type = 'group', + args = {}, + name = L[panelName] or panelName, + guiInline = true, + order = (orderIncrement + 10) + } + for position,_ in pairs(panelPositions) do + optionTable[panelName].args[position] = { + type = 'select', + name = L[position] or upper(position), + values = statValues, + get = function(key) return SV.db.SVStats.panels[panelName][key[#key]] end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key], "panels", panelName); MOD:Generate() end + } + end + end + end +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/tip.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/tip.lua new file mode 100644 index 0000000..6fe229a --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/tip.lua @@ -0,0 +1,179 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVTip; +local LSM = LibStub("LibSharedMedia-3.0"); +--[[ +########################################################## +SET PACKAGE OPTIONS +########################################################## +]]-- +SV.Options.args.SVTip = { + type = "group", + name = MOD.TitleID, + childGroups = "tab", + get = function(a)return SV.db.SVTip[a[#a]] end, + set = function(a, b)SV.db.SVTip[a[#a]] = b end, + args = { + commonGroup = { + order = 1, + type = "group", + name = L["Tooltip Options"], + childGroups = "tree", + args = { + intro = { + order = 1, + type = "description", + name = L["TOOLTIP_DESC"] + }, + enable = { + order = 2, + type = "toggle", + name = L["Enable"], + get = function(a)return SV.db.SVTip[a[#a]]end, + set = function(a, b)SV.db.SVTip[a[#a]] = b;SV:StaticPopup_Show("RL_CLIENT") end + }, + common = { + order = 3, + type = "group", + name = L["General"], + disabled = function() return not SV.db.SVTip.enable end, + args = { + cursorAnchor = { + order = 1, + type = "toggle", + name = L["Cursor Anchor"], + desc = L["Should tooltip be anchored to mouse cursor"] + }, + targetInfo = { + order = 2, + type = "toggle", + name = L["Target Info"], + desc = L["When in a raid group display if anyone in your raid is targeting the current tooltip unit."] + }, + playerTitles = { + order = 3, + type = "toggle", + name = L["Player Titles"], + desc = L["Display player titles."] + }, + guildRanks = { + order = 4, + type = "toggle", + name = L["Guild Ranks"], + desc = L["Display guild ranks if a unit is guilded."] + }, + inspectInfo = { + order = 5, + type = "toggle", + name = L["Talent Spec"], + desc = L["Display the players talent spec in the tooltip, this may not immediately update when mousing over a unit."] + }, + spellID = { + order = 6, + type = "toggle", + name = L["Spell/Item IDs"], + desc = L["Display the spell or item ID when mousing over a spell or item tooltip."], + get = function(a)return SV.db.SVTip.spellID end, + set = function(a, b)SV.db.SVTip.spellID = b;SV:StaticPopup_Show("RL_CLIENT") end, + } + } + + }, + visibility={ + order=100, + type="group", + name=L["Visibility"], + get=function(a)return SV.db.SVTip.visibility[a[#a]]end, + set=function(a,b)SV.db.SVTip.visibility[a[#a]]=b end, + args={ + combat={order=1,type='toggle',name=COMBAT,desc=L["Hide tooltip while in combat."]}, + unitFrames={order=2,type='select',name=L['Unitframes'],desc=L["Don't display the tooltip when mousing over a unitframe."],values={['ALL']=L['Always Hide'],['NONE']=L['Never Hide'],['SHIFT']=SHIFT_KEY,['ALT']=ALT_KEY,['CTRL']=CTRL_KEY}} + } + }, + healthBar={ + order=200, + type="group", + name=L["Health Bar"], + get=function(a)return SV.db.SVTip.healthBar[a[#a]]end, + set=function(a,b)SV.db.SVTip.healthBar[a[#a]]=b end, + args={ + height = { + order = 1, + name = L["Height"], + type = "range", + min = 1, + max = 15, + step = 1, + width = "full", + set = function(a,b)SV.db.SVTip.healthBar.height = b;GameTooltipStatusBar:Height(b)end + }, + fontGroup = { + order = 2, + name = L["Fonts"], + type = "group", + guiInline = true, + args = { + text = { + order = 1, + type = "toggle", + name = L["Text"], + set = function(a,b)SV.db.SVTip.healthBar.text = b;if b then GameTooltipStatusBar.text:Show()else GameTooltipStatusBar.text:Hide()end end + }, + font = { + type = "select", + dialogControl = "LSM30_Font", + order = 2, + width = "full", + name = L["Font"], + values = AceGUIWidgetLSMlists.font, + set = function(a,b)SV.db.SVTip.healthBar.font = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SV.db.SVTip.healthBar.font), SV.db.SVTip.healthBar.fontSize,"OUTLINE")end + }, + fontSize = { + order = 3, + name = L["Font Size"], + type = "range", + min = 6, + max = 22, + step = 1, + width = "full", + set = function(a,b)SV.db.SVTip.healthBar.fontSize = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SV.db.SVTip.healthBar.font),SV.db.SVTip.healthBar.fontSize,"OUTLINE")end + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/_load.xml b/Interface/AddOns/SVUI_ConfigOMatic/components/units/_load.xml new file mode 100644 index 0000000..e835fb5 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/_load.xml @@ -0,0 +1,11 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file='core.lua'/> + <Script file='player.lua'/> + <Script file='target.lua'/> + <Script file='focus.lua'/> + <Script file='pet.lua'/> + <Script file='party.lua'/> + <Script file='raid.lua'/> + <Script file='other.lua'/> + <Script file='grid.lua'/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua new file mode 100644 index 0000000..8cdabd8 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/core.lua @@ -0,0 +1,2090 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +local string = _G.string; +local find,gsub,upper = string.find, string.gsub, string.upper; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ...; +local ACD = LibStub("AceConfigDialog-3.0"); +--[[ +########################################################## +LOCAL VARS/FUNCTIONS +########################################################## +]]-- +local filterList = {}; +local textStringFormats = { + ["none"] = "None", + ["current"] = "Current", + ["deficit"] = "Deficit", + ["percent"] = "Percent", + ["curpercent"] = "Current - Percent", + ["curmax"] = "Current - Maximum", + ["curmax-percent"] = "Current - Maximum | %", +} +--[[ +########################################################## +SET PACKAGE OPTIONS +########################################################## +]]-- +function ns:SetCastbarConfigGroup(updateFunction, unitName, count) + local configTable = { + order = 800, + type = "group", + name = L["Castbar"], + get = function(key) + return SV.db.SVUnit[unitName]["castbar"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "castbar") + updateFunction(MOD, unitName, count) + end, + args = { + enable = { + type = "toggle", + order = 1, + name = L["Enable"] + }, + commonGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Base Settings"], + args = { + forceshow = { + order = 1, + name = SHOW.." / "..HIDE, + type = "execute", + func = function() + local v = unitName:gsub("(.)", upper, 1) + v = "SVUI_"..v; + v = v:gsub("t(arget)", "T%1") + if count then + for w = 1, count do + local castbar = _G[v..w].Castbar; + if not castbar.oldHide then + castbar.oldHide = castbar.Hide; + castbar.Hide = castbar.Show; + castbar:Show() + else + castbar.Hide = castbar.oldHide; + castbar.oldHide = nil; + castbar:Hide() + castbar.lastUpdate = 0 + end + end + else + local castbar = _G[v].Castbar; + if not castbar.oldHide then + castbar.oldHide = castbar.Hide; + castbar.Hide = castbar.Show; + castbar:Show() + else + castbar.Hide = castbar.oldHide; + castbar.oldHide = nil; + castbar:Hide() + castbar.lastUpdate = 0 + end + end + end, + }, + icon = { + order = 2, + name = L["Icon"], + type = "toggle" + }, + latency = { + order = 3, + name = L["Latency"], + type = "toggle" + }, + spark = { + order = 4, + type = "toggle", + name = L["Spark"] + }, + } + }, + sizeGroup = { + order = 3, + guiInline = true, + type = "group", + name = L["Size Settings"], + args = { + matchFrameWidth = { + order = 1, + name = L["Auto Width"], + desc = "Force the castbar to ALWAYS match its unitframes width.", + type = "toggle", + }, + matchsize = { + order = 2, + type = "execute", + name = L["Match Frame Width"], + desc = "Set the castbar width to match its unitframe.", + func = function() + SV.db.SVUnit[unitName]["castbar"]["width"] = SV.db.SVUnit[unitName]["width"] + updateFunction(MOD, unitName, count) + end + }, + width = { + order = 3, + name = L["Width"], + type = "range", + width = "full", + min = 50, + max = 600, + step = 1, + disabled = function() return SV.db.SVUnit[unitName]["castbar"].matchFrameWidth end + }, + height = { + order = 4, + name = L["Height"], + type = "range", + width = "full", + min = 10, + max = 85, + step = 1 + }, + } + }, + colorGroup = { + order = 4, + type = "group", + guiInline = true, + name = L["Custom Coloring"], + args = { + useCustomColor = { + type = "toggle", + order = 1, + name = L["Enable"] + }, + castingColor = { + order = 2, + name = L["Custom Bar Color"], + type = "color", + get = function(key) + local color = SV.db.SVUnit[unitName]["castbar"]["castingColor"] + return color[1], color[2], color[3], color[4] + end, + set = function(key, rValue, gValue, bValue) + SV.db.SVUnit[unitName]["castbar"]["castingColor"] = {rValue, gValue, bValue} + MOD:RefreshUnitFrames() + end, + disabled = function() return not SV.db.SVUnit[unitName]["castbar"].useCustomColor end + }, + sparkColor = { + order = 3, + name = L["Custom Spark Color"], + type = "color", + get = function(key) + local color = SV.db.SVUnit[unitName]["castbar"]["sparkColor"] + return color[1], color[2], color[3], color[4] + end, + set = function(key, rValue, gValue, bValue) + SV.db.SVUnit[unitName]["castbar"]["sparkColor"] = {rValue, gValue, bValue} + MOD:RefreshUnitFrames() + end, + disabled = function() return not SV.db.SVUnit[unitName]["castbar"].useCustomColor end + }, + } + }, + formatGroup = { + order = 4, + guiInline = true, + type = "group", + name = L["Text Settings"], + args = { + format = { + order = 1, + type = "select", + name = L["Format"], + values = { ["CURRENTMAX"] = L["Current / Max"], ["CURRENT"] = L["Current"], ["REMAINING"] = L["Remaining"] } + }, + } + } + } + } + if(unitName == "player") then + configTable.args.commonGroup.args.ticks = { + order = 6, + type = "toggle", + name = L["Ticks"], + desc = L["Display tick marks on the castbar."] + } + configTable.args.commonGroup.args.displayTarget = { + order = 7, + type = "toggle", + name = L["Display Target"], + desc = L["Display the target of your current cast."] + } + end + return configTable +end + +function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitName, count) + local configTable = { + order = auraType == "buffs" and 600 or 700, + type = "group", + name = auraType == "buffs" and L["Buffs"] or L["Debuffs"], + get = function(key) + return SV.db.SVUnit[unitName][auraType][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, auraType) + updateFunction(MOD, unitName, count) + end, + args = { + enable = { + type = "toggle", + order = 1, + name = L["Enable"] + }, + commonGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Base Settings"], + args = { + verticalGrowth = {type = "select", order = 1, name = L["Vertical Growth"], desc = L["The vertical direction that the auras will position themselves"], values = {UP = "UP", DOWN = "DOWN"}}, + horizontalGrowth = {type = "select", order = 2, name = L["Horizontal Growth"], desc = L["The horizontal direction that the auras will position themselves"], values = {LEFT = "LEFT", RIGHT = "RIGHT"}}, + perrow = {type = "range", order = 3, width = "full", name = L["Per Row"], min = 1, max = 20, step = 1}, + numrows = {type = "range", order = 4, width = "full", name = L["Num Rows"], min = 1, max = 4, step = 1}, + sizeOverride = {type = "range", order = 5, width = "full", name = L["Size Override"], desc = L["If not set to 0 then override the size of the aura icon to this."], min = 0, max = 60, step = 1}, + } + }, + positionGroup = { + order = 3, + guiInline = true, + type = "group", + name = L["Position Settings"], + args = { + xOffset = {order = 1, type = "range", name = L["xOffset"], width = "full", min = -60, max = 60, step = 1}, + yOffset = {order = 2, type = "range", name = L["yOffset"], width = "full", min = -60, max = 60, step = 1}, + anchorPoint = {type = "select", order = 3, name = L["Anchor Point"], desc = L["What point to anchor to the frame you set to attach to."], values = SV.PointIndexes}, + } + }, + filters = {name = L["Filters"], guiInline = true, type = "group", order = 500, args = {}} + } + } + if auraType == "buffs"then + configTable.args.positionGroup.args.attachTo = {type = "select", order = 7, name = L["Attach To"], desc = L["What to attach the buff anchor frame to."], values = {["FRAME"] = L["Frame"], ["DEBUFFS"] = L["Debuffs"]}} + else + configTable.args.positionGroup.args.attachTo = {type = "select", order = 7, name = L["Attach To"], desc = L["What to attach the buff anchor frame to."], values = {["FRAME"] = L["Frame"], ["BUFFS"] = L["Buffs"]}} + end + if custom then + configTable.args.filters.args.filterPlayer = {order = 10, type = "toggle", name = L["Only Show Your Auras"], desc = L["Don't display auras that are not yours."]} + configTable.args.filters.args.filterBlocked = {order = 11, type = "toggle", name = L["Force Blocked List"], desc = L["Don't display any auras found on the Blocked filter."]} + configTable.args.filters.args.filterAllowed = {order = 12, type = "toggle", name = L["Force Allowed List"], desc = L["If no other filter options are being used then it will block anything not on the Allowed filter."]} + configTable.args.filters.args.filterInfinite = {order = 13, type = "toggle", name = L["Block Auras Without Duration"], desc = L["Don't display auras that have no duration."]} + configTable.args.filters.args.filterDispellable = {order = 13, type = "toggle", name = L["Block Non-Dispellable Auras"], desc = L["Don't display auras that cannot be purged or dispelled by your class."]} + if auraType == "buffs"then + configTable.args.filters.args.filterRaid = {order = 14, type = "toggle", name = L["Block Raid Buffs"], desc = L["Don't display raid buffs."]} + end + configTable.args.filters.args.useFilter = { + order = 15, + name = L["Additional Filter"], + desc = L["Select an additional filter to use."], + type = "select", + values = function() + filterList = {} + filterList[""] = NONE; + for n in pairs(SV.db.filter) do + filterList[n] = n + end + return filterList + end + } + + else + configTable.args.filters.args.filterPlayer = { + order = 10, + guiInline = true, + type = "group", + name = L["Only Show Your Auras"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], + desc = L["If the unit is friendly to you."].." "..L["Don't display auras that are not yours."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterPlayer.friendly end, + set = function(l, m) + SV.db.SVUnit[unitName][auraType].filterPlayer.friendly = m; + updateFunction(MOD, unitName, count) + end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], + desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that are not yours."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterPlayer.enemy end, + set = function(l, m) + SV.db.SVUnit[unitName][auraType].filterPlayer.enemy = m; + updateFunction(MOD, unitName, count) + end + } + } + } + configTable.args.filters.args.filterBlocked = { + order = 11, + guiInline = true, + type = "group", + name = L["Force Blocked List"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], + desc = L["If the unit is friendly to you."].." "..L["Don't display any auras found on the Blocked filter."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterBlocked.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterBlocked.friendly = m;updateFunction(MOD, unitName, count)end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], + desc = L["If the unit is an enemy to you."].." "..L["Don't display any auras found on the Blocked filter."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterBlocked.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterBlocked.enemy = m;updateFunction(MOD, unitName, count)end + } + } + } + configTable.args.filters.args.filterAllowed = { + order = 12, + guiInline = true, + type = "group", + name = L["Force Allowed List"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], + desc = L["If the unit is friendly to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterAllowed.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterAllowed.friendly = m;updateFunction(MOD, unitName, count)end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], + desc = L["If the unit is an enemy to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterAllowed.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterAllowed.enemy = m;updateFunction(MOD, unitName, count)end + } + } + } + configTable.args.filters.args.filterInfinite = { + order = 13, + guiInline = true, + type = "group", + name = L["Block Auras Without Duration"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], + desc = L["If the unit is friendly to you."].." "..L["Don't display auras that have no duration."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterInfinite.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterInfinite.friendly = m;updateFunction(MOD, unitName, count)end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], + desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that have no duration."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterInfinite.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterInfinite.enemy = m;updateFunction(MOD, unitName, count)end + } + } + } + configTable.args.filters.args.filterDispellable = { + order = 13, + guiInline = true, + type = "group", + name = L["Block Non-Dispellable Auras"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], + desc = L["If the unit is friendly to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterDispellable.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterDispellable.friendly = m;updateFunction(MOD, unitName, count)end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], + desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterDispellable.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterDispellable.enemy = m;updateFunction(MOD, unitName, count)end + } + } + } + if(auraType == "buffs") then + configTable.args.filters.args.filterRaid = { + order = 14, + guiInline = true, + type = "group", + name = L["Block Raid Buffs"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], + desc = L["If the unit is friendly to you."].." "..L["Don't display raid (consolidated) buffs."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterRaid.friendly end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterRaid.friendly = m;updateFunction(MOD, unitName, count)end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display raid (consolidated) buffs."], + get = function(l)return SV.db.SVUnit[unitName][auraType].filterRaid.enemy end, + set = function(l, m)SV.db.SVUnit[unitName][auraType].filterRaid.enemy = m;updateFunction(MOD, unitName, count)end + } + } + } + end + configTable.args.filters.args.useFilter = { + order = 15, + name = L["Additional Filter"], + desc = L["Select an additional filter to use."], + type = "select", + values = function() + filterList = {} + filterList[""] = NONE; + for n in pairs(SV.db.filter) do + filterList[n] = n + end + return filterList + end + } + end + return configTable +end + +function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) + local miscGroup = { + order = 99, + type = "group", + name = L["Misc Text"], + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); + local tag = "" + local pc = SV.db.SVUnit[unitName]["formatting"].threat and "[threat]" or ""; + tag = tag .. pc; + local ap = SV.db.SVUnit[unitName]["formatting"].absorbs and "[absorbs]" or ""; + tag = tag .. ap; + local cp = SV.db.SVUnit[unitName]["formatting"].incoming and "[incoming]" or ""; + tag = tag .. cp; + + MOD:ChangeDBVar(tag, "tags", unitName, "misc"); + updateFunction(MOD, unitName, count) + end, + args = { + incoming = { + order = 1, + name = L["Show Incoming Heals"], + type = "toggle", + get = function() return SV.db.SVUnit[unitName]["formatting"].incoming end, + }, + absorbs = { + order = 2, + name = L["Show Absorbs"], + type = "toggle", + get = function() return SV.db.SVUnit[unitName]["formatting"].absorbs end, + }, + threat = { + order = 3, + name = L["Show Threat"], + type = "toggle", + get = function() return SV.db.SVUnit[unitName]["formatting"].threat end, + }, + xOffset = { + order = 4, + type = "range", + width = "full", + name = L["Misc Text X Offset"], + desc = L["Offset position for text."], + min = -300, + max = 300, + step = 1, + get = function() return SV.db.SVUnit[unitName]["formatting"].xOffset end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); end, + }, + yOffset = { + order = 5, + type = "range", + width = "full", + name = L["Misc Text Y Offset"], + desc = L["Offset position for text."], + min = -300, + max = 300, + step = 1, + get = function() return SV.db.SVUnit[unitName]["formatting"].yOffset end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); end, + }, + } + } + return miscGroup +end + +function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) + local healthOptions = { + order = 100, + type = "group", + name = L["Health"], + get = function(key) + return SV.db.SVUnit[unitName]["health"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "health"); + updateFunction(MOD, unitName, count) + end, + args = { + commonGroup = { + order = 2, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + reversed = {type = "toggle", order = 1, name = L["Reverse Fill"], desc = L["Invert this bars fill direction"]}, + position = {type = "select", order = 2, name = L["Text Position"], desc = L["Set the anchor for this bars value text"], values = SV.PointIndexes}, + configureButton = { + order = 4, + width = "full", + name = L["Coloring"], + type = "execute", + func = function() ACD:SelectGroup(SV.NameID, "SVUnit", "common", "allColorsGroup", "healthGroup") end + }, + xOffset = {order = 5, type = "range", width = "full", name = L["Text xOffset"], desc = L["Offset position for text."], min = -300, max = 300, step = 1}, + yOffset = {order = 6, type = "range", width = "full", name = L["Text yOffset"], desc = L["Offset position for text."], min = -300, max = 300, step = 1}, + } + }, + formatGroup = { + order = 100, + type = "group", + guiInline = true, + name = L["Text Settings"], + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); + local tag = "" + local pc = SV.db.SVUnit[unitName]["formatting"].health_colored and "[health:color]" or ""; + tag = tag .. pc; + + local pt = SV.db.SVUnit[unitName]["formatting"].health_type; + if(pt and pt ~= "none") then + tag = tag .. "[health:" .. pt .. "]" + end + + MOD:ChangeDBVar(tag, "tags", unitName, "health"); + updateFunction(MOD, unitName, count) + end, + args = { + health_colored = { + order = 1, + name = L["Colored"], + type = "toggle", + get = function() return SV.db.SVUnit[unitName]["formatting"].health_colored end, + desc = L["Use various name coloring methods"] + }, + health_type = { + order = 3, + name = L["Text Format"], + type = "select", + get = function() return SV.db.SVUnit[unitName]["formatting"].health_type end, + desc = L["TEXT_FORMAT_DESC"], + values = textStringFormats, + } + } + } + } + } + if partyRaid then + healthOptions.args.frequentUpdates = { + type = "toggle", + order = 1, + name = L["Frequent Updates"], + desc = L["Rapidly update the health, uses more memory and cpu. Only recommended for healing."] + } + healthOptions.args.orientation = { + type = "select", + order = 2, + name = L["Orientation"], + desc = L["Direction the health bar moves when gaining/losing health."], + values = {["HORIZONTAL"] = L["Horizontal"], ["VERTICAL"] = L["Vertical"]} + } + end + return healthOptions +end + +function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) + local powerOptions = { + order = 200, + type = "group", + name = L["Power"], + get = function(key) + return SV.db.SVUnit[unitName]["power"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "power"); + updateFunction(MOD, unitName, count) + end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + commonGroup = { + order = 2, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + position = {type = "select", order = 3, name = L["Text Position"], desc = L["Set the anchor for this bars value text"], values = SV.PointIndexes}, + configureButton = { + order = 4, + name = L["Coloring"], + width = "full", + type = "execute", + func = function()ACD:SelectGroup(SV.NameID, "SVUnit", "common", "allColorsGroup", "powerGroup")end + }, + height = { + type = "range", + name = L["Height"], + order = 5, + width = "full", + min = 3, + max = 50, + step = 1 + }, + xOffset = {order = 6, type = "range", width = "full", name = L["Text xOffset"], desc = L["Offset position for text."], min = -300, max = 300, step = 1}, + yOffset = {order = 7, type = "range", width = "full", name = L["Text yOffset"], desc = L["Offset position for text."], min = -300, max = 300, step = 1}, + } + }, + formatGroup = { + order = 100, + type = "group", + guiInline = true, + name = L["Text Settings"], + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); + local tag = "" + local cp = SV.db.SVUnit[unitName]["formatting"].power_class and "[classpower]" or ""; + tag = tag .. cp; + local ap = SV.db.SVUnit[unitName]["formatting"].power_alt and "[altpower]" or ""; + tag = tag .. ap; + local pc = SV.db.SVUnit[unitName]["formatting"].power_colored and "[power:color]" or ""; + tag = tag .. pc; + + local pt = SV.db.SVUnit[unitName]["formatting"].power_type; + if(pt and pt ~= "none") then + tag = tag .. "[power:" .. pt .. "]" + end + + MOD:ChangeDBVar(tag, "tags", unitName, "power"); + updateFunction(MOD, unitName, count) + end, + args = { + power_colored = { + order = 1, + name = L["Colored"], + type = "toggle", + get = function() return SV.db.SVUnit[unitName]["formatting"].power_colored end, + desc = L["Use various name coloring methods"] + }, + power_class = { + order = 1, + name = L["Show Class Power"], + type = "toggle", + get = function() return SV.db.SVUnit[unitName]["formatting"].power_class end, + }, + power_alt = { + order = 1, + name = L["Show Alt Power"], + type = "toggle", + get = function() return SV.db.SVUnit[unitName]["formatting"].power_alt end, + }, + power_type = { + order = 3, + name = L["Text Format"], + type = "select", + get = function() return SV.db.SVUnit[unitName]["formatting"].power_type end, + desc = L["TEXT_FORMAT_DESC"], + values = textStringFormats, + } + } + } + } + } + + if(playerTarget) then + powerOptions.args.formatGroup.args.attachTextToPower = { + type = "toggle", + order = 2, + name = L["Attach Text to Power"], + get = function(key) + return SV.db.SVUnit[unitName]["power"].attachTextToPower + end, + set = function(key, value) + MOD:ChangeDBVar(value, "attachTextToPower", unitName, "power"); + updateFunction(MOD, unitName, count) + end, + } + end + + return powerOptions +end + +function ns:SetNameConfigGroup(updateFunction, unitName, count) + local k = { + order = 400, + type = "group", + name = L["Name"], + get = function(key) + return SV.db.SVUnit[unitName]["name"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "name"); + updateFunction(MOD, unitName, count) + end, + args = { + commonGroup = { + order = 2, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + position = { + type = "select", + order = 3, + name = L["Text Position"], + desc = L["Set the anchor for this units name text"], + values = SV.PointIndexes + }, + xOffset = { + order = 6, + type = "range", + width = "full", + name = L["Text xOffset"], + desc = L["Offset position for text."], + min = -300, + max = 300, + step = 1 + }, + yOffset = { + order = 7, + type = "range", + width = "full", + name = L["Text yOffset"], + desc = L["Offset position for text."], + min = -300, + max = 300, + step = 1 + }, + } + }, + fontGroup = { + order = 4, + type = "group", + guiInline = true, + name = L["Fonts"], + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "name"); + MOD:RefreshAllUnitMedia() + end, + args = { + font = { + type = "select", + dialogControl = "LSM30_Font", + order = 0, + name = L["Default Font"], + desc = L["The font used to show unit names."], + values = AceGUIWidgetLSMlists.font + }, + fontOutline = { + order = 1, + name = L["Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = {["NONE"] = L["None"], ["OUTLINE"] = "OUTLINE", ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", ["THICKOUTLINE"] = "THICKOUTLINE"} + }, + fontSize = { + order = 2, + name = L["Font Size"], + desc = L["Set the font size."], + type = "range", + width = "full", + min = 6, + max = 22, + step = 1 + } + } + }, + formatGroup = { + order = 100, + type = "group", + guiInline = true, + name = L["Text Settings"], + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); + local tag = "" + tag = SV.db.SVUnit[unitName]["formatting"].name_colored and "[name:color]" or ""; + + local length = SV.db.SVUnit[unitName]["formatting"].name_length; + tag = tag .. "[name:" .. length .. "]" + local lvl = SV.db.SVUnit[unitName]["formatting"].smartlevel and "[smartlevel]" or ""; + tag = tag .. lvl + + MOD:ChangeDBVar(tag, "tags", unitName, "name"); + updateFunction(MOD, unitName, count) + end, + args = { + name_colored = { + order = 1, + name = L["Colored"], + type = "toggle", + get = function() return SV.db.SVUnit[unitName]["formatting"].name_colored end, + desc = L["Use various name coloring methods"] + }, + smartlevel = { + order = 2, + name = L["Unit Level"], + type = "toggle", + get = function() return SV.db.SVUnit[unitName]["formatting"].smartlevel end, + desc = L["Display the units level"] + }, + name_length = { + order = 3, + name = L["Name Length"], + desc = L["TEXT_FORMAT_DESC"], + type = "range", + width = "full", + get = function() return SV.db.SVUnit[unitName]["formatting"].name_length end, + min = 1, + max = 30, + step = 1 + } + } + } + } + } + return k +end + +local function getAvailablePortraitConfig(unit) + local db = SV.db.SVUnit[unit].portrait; + if db.overlay then + return {["3D"] = L["3D"]} + else + return {["2D"] = L["2D"], ["3D"] = L["3D"]} + end +end + +function ns:SetPortraitConfigGroup(updateFunction, unitName, count) + local k = { + order = 400, + type = "group", + name = L["Portrait"], + get = function(key) + return SV.db.SVUnit[unitName]["portrait"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "portrait") + updateFunction(MOD, unitName, count) + end, + args = { + enable = { + type = "toggle", + order = 1, + name = L["Enable"] + }, + styleGroup = { + order = 2, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + style = { + order = 1, + type = "select", + name = L["Style"], + desc = L["Select the display method of the portrait. NOTE: if overlay is set then only 3D will be available"], + values = function() return getAvailablePortraitConfig(unitName) end + }, + overlay = { + order = 2, + type = "toggle", + name = L["Overlay"], + desc = L["Overlay the healthbar"], + disabled = function() return SV.db.SVUnit[unitName]["portrait"].style == "2D" end + }, + width = { + order = 3, + type = "range", + width = "full", + name = L["Width"], + min = 15, + max = 150, + step = 1, + disabled = function() return SV.db.SVUnit[unitName]["portrait"].overlay == true end + } + } + }, + modGroup = { + order = 3, + type = "group", + guiInline = true, + name = L["3D Settings"], + disabled = function() return SV.db.SVUnit[unitName]["portrait"].style == "2D" end, + args = { + rotation = { + order = 1, + type = "range", + name = L["Model Rotation"], + min = 0, + max = 360, + step = 1 + }, + camDistanceScale = { + order = 2, + type = "range", + name = L["Camera Distance Scale"], + desc = L["How far away the portrait is from the camera."], + min = 0.01, + max = 4, + step = 0.01 + }, + } + } + } + } + return k +end + +function ns:SetIconConfigGroup(updateFunction, unitName, count) + local iconGroup = SV.db.SVUnit[unitName]["icons"] + local grouporder = 1 + local k = { + order = 5000, + type = "group", + name = L["Icons"], + get = function(key) + return SV.db.SVUnit[unitName]["icons"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "icons") + updateFunction(MOD, unitName, count) + end, + args = {} + }; + + if(iconGroup["raidicon"]) then + k.args.raidicon = { + order = grouporder, + type = "group", + guiInline = true, + name = L["Raid Marker"], + get = function(key) + return SV.db.SVUnit[unitName]["icons"]["raidicon"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "icons", "raidicon") + updateFunction(MOD, unitName, count) + end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, + size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, + xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, + yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} + } + } + grouporder = grouporder + 1 + end + + if(iconGroup["combatIcon"]) then + k.args.combatIcon = { + order = grouporder, + type = "group", + guiInline = true, + name = L["Combat"], + get = function(key) + return SV.db.SVUnit[unitName]["icons"]["combatIcon"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "icons", "combatIcon") + updateFunction(MOD, unitName, count) + end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, + size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, + xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, + yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} + } + } + grouporder = grouporder + 1 + end + + if(iconGroup["restIcon"]) then + k.args.restIcon = { + order = grouporder, + type = "group", + guiInline = true, + name = L["Resting"], + get = function(key) + return SV.db.SVUnit[unitName]["icons"]["restIcon"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "icons", "restIcon") + updateFunction(MOD, unitName, count) + end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, + size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, + xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, + yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} + } + } + grouporder = grouporder + 1 + end + + if(iconGroup["classicon"]) then + k.args.classicon = { + order = grouporder, + type = "group", + guiInline = true, + name = L["Class"], + get = function(key) + return SV.db.SVUnit[unitName]["icons"]["classicon"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "icons", "classicon") + updateFunction(MOD, unitName, count) + end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, + size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, + xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, + yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} + } + } + grouporder = grouporder + 1 + end + + if(iconGroup["eliteicon"]) then + k.args.eliteicon = { + order = grouporder, + type = "group", + guiInline = true, + name = L["Elite / Rare"], + get = function(key) + return SV.db.SVUnit[unitName]["icons"]["eliteicon"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "icons", "eliteicon") + updateFunction(MOD, unitName, count) + end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, + size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, + xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, + yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} + } + } + grouporder = grouporder + 1 + end + + if(iconGroup["roleIcon"]) then + k.args.roleIcon = { + order = grouporder, + type = "group", + guiInline = true, + name = L["Role"], + get = function(key) + return SV.db.SVUnit[unitName]["icons"]["roleIcon"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "icons", "roleIcon") + updateFunction(MOD, unitName, count) + end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, + size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, + xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, + yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} + } + } + grouporder = grouporder + 1 + end + + if(iconGroup["raidRoleIcons"]) then + k.args.raidRoleIcons = { + order = grouporder, + type = "group", + guiInline = true, + name = L["Leader / MasterLooter"], + get = function(key) + return SV.db.SVUnit[unitName]["icons"]["raidRoleIcons"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "icons", "raidRoleIcons") + updateFunction(MOD, unitName, count) + end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, + size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, + xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, + yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} + } + } + grouporder = grouporder + 1 + end + + return k +end + +function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) + local k = { + order = 1100, + type = "group", + name = L["Aura Bars"], + get = function(key) + return SV.db.SVUnit[unitName]["aurabar"][key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], unitName, "aurabar") + updateFunction(MOD, unitName, count) + MOD:RefreshUnitFrames() + end, + args = { + enable = { + type = "toggle", + order = 1, + name = L["Enable"] + }, + commonGroup = { + order = 2, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + configureButton1 = { + order = 1, + name = L["Coloring"], + type = "execute", func = function()ACD:SelectGroup(SV.NameID, "SVUnit", "common", "allColorsGroup", "auraBars")end + }, + configureButton2 = { + order = 2, + name = L["Coloring (Specific)"], + type = "execute", func = function()ns:SetToFilterConfig("AuraBar Colors")end + }, + anchorPoint = { + type = "select", + order = 3, + name = L["Anchor Point"], desc = L["What point to anchor to the frame you set to attach to."], values = {["ABOVE"] = L["Above"], ["BELOW"] = L["Below"]} + }, + attachTo = { + type = "select", + order = 4, + name = L["Attach To"], desc = L["The object you want to attach to."], + values = {["FRAME"] = L["Frame"], ["DEBUFFS"] = L["Debuffs"], ["BUFFS"] = L["Buffs"]} + }, + height = { + type = "range", + order = 5, + name = L["Height"], min = 6, max = 40, step = 1 + }, + statusbar = { + type = "select", + dialogControl = "LSM30_Statusbar", + order = 6, + name = L["StatusBar Texture"], + desc = L["Aurabar texture."], + values = AceGUIWidgetLSMlists.statusbar + } + } + }, + filterGroup = { + order = 3, + type = "group", + guiInline = true, + name = L["Filtering and Sorting"], + args = { + sort = { + type = "select", + order = 7, + name = L["Sort Method"], + values = {["TIME_REMAINING"] = L["Time Remaining"], ["TIME_REMAINING_REVERSE"] = L["Time Remaining Reverse"], ["TIME_DURATION"] = L["Duration"], ["TIME_DURATION_REVERSE"] = L["Duration Reverse"], ["NAME"] = NAME, ["NONE"] = NONE} + }, + filters = { + name = L["Filters"], + guiInline = true, + type = "group", + order = 500, + args = {} + }, + friendlyAuraType = { + type = "select", + order = 16, + name = L["Friendly Aura Type"], desc = L["Set the type of auras to show when a unit is friendly."], values = {["HARMFUL"] = L["Debuffs"], ["HELPFUL"] = L["Buffs"]} + }, + enemyAuraType = { + type = "select", + order = 17, + name = L["Enemy Aura Type"], desc = L["Set the type of auras to show when a unit is a foe."], values = {["HARMFUL"] = L["Debuffs"], ["HELPFUL"] = L["Buffs"]} + } + } + } + } + }; + if custom then + k.args.filterGroup.args.filters.args.filterPlayer = { + order = 10, + type = "toggle", + name = L["Only Show Your Auras"], desc = L["Don't display auras that are not yours."] + } + k.args.filterGroup.args.filters.args.filterBlocked = { + order = 11, + type = "toggle", + name = L["Force Blocked List"], desc = L["Don't display any auras found on the Blocked filter."] + } + k.args.filterGroup.args.filters.args.filterAllowed = { + order = 12, + type = "toggle", + name = L["Force Allowed List"], desc = L["If no other filter options are being used then it will block anything not on the Allowed filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."] + } + k.args.filterGroup.args.filters.args.filterInfinite = { + order = 13, + type = "toggle", + name = L["Block Auras Without Duration"], desc = L["Don't display auras that have no duration."] + } + k.args.filterGroup.args.filters.args.filterDispellable = { + order = 13, + type = "toggle", + name = L["Block Non-Dispellable Auras"], desc = L["Don't display auras that cannot be purged or dispelled by your class."] + } + k.args.filterGroup.args.filters.args.filterRaid = { + order = 14, + type = "toggle", + name = L["Block Raid Buffs"], desc = L["Don't display raid buffs such as Blessing of Kings or Mark of the Wild."] + } + k.args.filterGroup.args.filters.args.useFilter = { + order = 15, + name = L["Additional Filter"], + desc = L["Select an additional filter to use. If the selected filter is a whitelist and no other filters are being used (with the exception of Only Show Your Auras) then it will block anything not on the whitelist, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], + type = "select", + values = function() + filterList = {} + filterList[""] = NONE; + for n in pairs(SV.db.filter) do + filterList[n] = n + end + return filterList + end + } + else + k.args.filterGroup.args.filters.args.filterPlayer = { + order = 10, guiInline = true, + type = "group", + name = L["Only Show Your Auras"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that are not yours."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterPlayer.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterPlayer.friendly = m;updateFunction(MOD, unitName)end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that are not yours."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterPlayer.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterPlayer.enemy = m;updateFunction(MOD, unitName)end + } + } + } + k.args.filterGroup.args.filters.args.filterBlocked = { + order = 11, guiInline = true, + type = "group", + name = L["Force Blocked List"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display any auras found on the Blocked filter."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterBlocked.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterBlocked.friendly = m;updateFunction(MOD, unitName)end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display any auras found on the Blocked filter."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterBlocked.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterBlocked.enemy = m;updateFunction(MOD, unitName)end + } + } + } + k.args.filterGroup.args.filters.args.filterAllowed = { + order = 12, guiInline = true, + type = "group", + name = L["Force Allowed List"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterAllowed.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterAllowed.friendly = m;updateFunction(MOD, unitName)end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterAllowed.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterAllowed.enemy = m;updateFunction(MOD, unitName)end + } + } + } + k.args.filterGroup.args.filters.args.filterInfinite = { + order = 13, guiInline = true, + type = "group", + name = L["Block Auras Without Duration"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that have no duration."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterInfinite.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterInfinite.friendly = m;updateFunction(MOD, unitName)end + }, + enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that have no duration."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterInfinite.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterInfinite.enemy = m;updateFunction(MOD, unitName)end + } + } + } + k.args.filterGroup.args.filters.args.filterDispellable = { + order = 13, guiInline = true, + type = "group", + name = L["Block Non-Dispellable Auras"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterDispellable.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterDispellable.friendly = m;updateFunction(MOD, unitName)end}, enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterDispellable.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterDispellable.enemy = m;updateFunction(MOD, unitName)end} + } + } + k.args.filterGroup.args.filters.args.filterRaid = { + order = 14, guiInline = true, + type = "group", + name = L["Block Raid Buffs"], + args = { + friendly = { + order = 2, + type = "toggle", + name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display raid buffs such as Blessing of Kings or Mark of the Wild."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterRaid.friendly end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterRaid.friendly = m;updateFunction(MOD, unitName)end}, enemy = { + order = 3, + type = "toggle", + name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display raid buffs such as Blessing of Kings or Mark of the Wild."], + get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterRaid.enemy end, + set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterRaid.enemy = m;updateFunction(MOD, unitName)end} + } + } + k.args.filterGroup.args.filters.args.useFilter = { + order = 15, + name = L["Additional Filter"], + desc = L["Select an additional filter to use. If the selected filter is a whitelist and no other filters are being used (with the exception of Only Show Your Auras) then it will block anything not on the whitelist, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], + type = "select", + values = function() + filterList = {} + filterList[""] = NONE; + for n in pairs(SV.db.filter) do + filterList[n] = n + end + return filterList + end + } + end + return k +end + +SV.Options.args.SVUnit = { + type = "group", + name = MOD.TitleID, + childGroups = "tree", + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames(); + end, + args = { + enable = { + order = 1, + type = "toggle", + name = L["Enable"], + get = function(l) + return SV.db.SVUnit.enable end, + set = function(l, m) + SV.db.SVUnit.enable = m; + SV:StaticPopup_Show("RL_CLIENT") + end + }, + common = { + order = 2, + type = "group", + name = L["General"], + guiInline = true, + disabled = function() + return not SV.db.SVUnit.enable + end, + args = { + commonGroup = { + order = 1, + type = "group", + guiInline = true, + name = L["General"], + args = { + disableBlizzard = { + order = 1, + name = L["Disable Blizzard"], + desc = L["Disables the blizzard party/raid frames."], + type = "toggle", + get = function(key) + return SV.db.SVUnit.disableBlizzard + end, + set = function(key, value) + MOD:ChangeDBVar(value, "disableBlizzard"); + SV:StaticPopup_Show("RL_CLIENT") + end + }, + fastClickTarget = { + order = 2, + name = L["Fast Clicks"], + desc = L["Immediate mouse-click-targeting"], + type = "toggle" + }, + debuffHighlighting = { + order = 3, + name = L["Debuff Highlight"], + desc = L["Color the unit if there is a debuff that can be dispelled by your class."], + type = "toggle" + }, + xrayFocus = { + order = 4, + name = L["X-Ray Specs"], + desc = L["Use handy graphics to focus the current target, or clear the current focus"], + type = "toggle" + }, + OORAlpha = { + order = 5, + name = L["Range Fading"], + desc = L["The transparency of units that are out of range."], + type = "range", + min = 0, + max = 1, + step = 0.01, + width = "full", + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + end + }, + groupOORAlpha = { + order = 6, + name = L["Group Range Fading"], + desc = L["The transparency of group units that are out of range."], + type = "range", + min = 0, + max = 1, + step = 0.01, + width = "full", + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + end + }, + } + }, + backgroundGroup = { + order = 2, + type = "group", + guiInline = true, + name = "Unit Backgrounds (3D Portraits Only)", + get = function(key) + return SV.db.media.textures[key[#key]] + end, + set = function(key, value) + SV.db.media.textures[key[#key]] = {"background", value} + SV:RefreshEverything(true) + end, + args = { + unitlarge = { + type = "select", + dialogControl = "LSM30_Background", + order = 2, + name = "Unit Background", + values = AceGUIWidgetLSMlists.background, + }, + unitsmall = { + type = "select", + dialogControl = "LSM30_Background", + order = 3, + name = "Small Unit Background", + values = AceGUIWidgetLSMlists.background, + } + } + }, + barGroup = { + order = 3, + type = "group", + guiInline = true, + name = L["Bars"], + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshAllUnitMedia() + end, + args = { + smoothbars = { + type = "toggle", + order = 1, + name = L["Smooth Bars"], + desc = L["Bars will transition smoothly."] + }, + statusbar = { + type = "select", + dialogControl = "LSM30_Statusbar", + order = 2, + name = L["StatusBar Texture"], + desc = L["Main statusbar texture."], + values = AceGUIWidgetLSMlists.statusbar + }, + auraBarStatusbar = { + type = "select", + dialogControl = "LSM30_Statusbar", + order = 3, + name = L["AuraBar Texture"], + desc = L["Main statusbar texture."], + values = AceGUIWidgetLSMlists.statusbar + }, + } + }, + fontGroup = { + order = 4, + type = "group", + guiInline = true, + name = L["Fonts"], + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshAllUnitMedia() + end, + args = { + font = { + type = "select", + dialogControl = "LSM30_Font", + order = 1, + name = L["Default Font"], + desc = L["The font that the unitframes will use."], + values = AceGUIWidgetLSMlists.font, + }, + fontOutline = { + order = 2, + name = L["Font Outline"], + desc = L["Set the font outline."], + type = "select", + values = { + ["NONE"] = L["None"], ["OUTLINE"] = "OUTLINE", ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", ["THICKOUTLINE"] = "THICKOUTLINE" + }, + }, + fontSize = { + order = 3, + name = L["Font Size"], + desc = L["Set the font size for unitframes."], + type = "range", + min = 6, + max = 22, + step = 1, + }, + auraFont = { + type = "select", + dialogControl = "LSM30_Font", + order = 4, + name = L["Aura Font"], + desc = L["The font that the aura icons and aurabar will use."], + values = AceGUIWidgetLSMlists.font, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshAllUnitMedia() + end, + }, + auraFontOutline = { + order = 5, + name = L["Aura Font Outline"], + desc = L["Set the aura icons and aurabar font outline."], + type = "select", + values = { + ["NONE"] = L["None"], ["OUTLINE"] = "OUTLINE", ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", ["THICKOUTLINE"] = "THICKOUTLINE" + }, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshAllUnitMedia() + end, + }, + auraFontSize = { + order = 6, + name = L["Aura Font Size"], + desc = L["Set the font size for aura icons and aurabars."], + type = "range", + min = 6, + max = 22, + step = 1, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshAllUnitMedia() + end, + }, + } + }, + allColorsGroup = { + order = 5, + type = "group", + guiInline = true, + name = L["Colors"], + args = { + healthGroup = { + order = 9, + type = "group", guiInline = true, + name = HEALTH, + args = { + healthclass = { + order = 1, + type = "toggle", + name = L["Class Health"], + desc = L["Color health by classcolor or reaction."], + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames() + end + }, + colorhealthbyvalue = { + order = 2, + type = "toggle", + name = L["Health By Value"], + desc = L["Color health by amount remaining."], + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames() + end + }, + classbackdrop = { + order = 3, + type = "toggle", + name = L["Class Backdrop"], + desc = L["Color the health backdrop by class or reaction."], + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames() + end + }, + forceHealthColor = { + order = 4, + type = "toggle", + name = L["Overlay Health Color"], + desc = L["Force custom health color when using portrait overlays."], + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames() + end + }, + overlayAnimation = { + order = 5, + type = "toggle", + name = L["Overlay Animations"], + desc = L["Toggle health animations on portrait overlays."], + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames() + end + }, + health = { + order = 7, + type = "color", + name = L["Health"], + get = function(key) + local color = SV.db.media.unitframes.health + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.health = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + tapped = { + order = 8, + type = "color", + name = L["Tapped"], + get = function(key) + local color = SV.db.media.unitframes.tapped + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.tapped = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + disconnected = { + order = 9, + type = "color", + name = L["Disconnected"], + get = function(key) + local color = SV.db.media.unitframes.disconnected + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.disconnected = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + } + } + }, + powerGroup = { + order = 10, + type = "group", + guiInline = true, + name = L["Powers"], + args = { + powerclass = { + order = 0, + type = "toggle", + name = L["Class Power"], + desc = L["Color power by classcolor or reaction."], + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames() + end + }, + MANA = { + order = 2, + name = MANA, + type = "color", + get = function(key) + local color = SV.db.media.unitframes.power["MANA"] + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.power["MANA"] = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + RAGE = { + order = 3, + name = RAGE, + type = "color", + get = function(key) + local color = SV.db.media.unitframes.power["RAGE"] + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.power["RAGE"] = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + FOCUS = { + order = 4, + name = FOCUS, + type = "color", + get = function(key) + local color = SV.db.media.unitframes.power["FOCUS"] + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.power["FOCUS"] = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + ENERGY = { + order = 5, + name = ENERGY, + type = "color", + get = function(key) + local color = SV.db.media.unitframes.power["ENERGY"] + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.power["ENERGY"] = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + RUNIC_POWER = { + order = 6, + name = RUNIC_POWER, + type = "color", + get = function(key) + local color = SV.db.media.unitframes.power["RUNIC_POWER"] + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.power["RUNIC_POWER"] = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + } + } + }, + castBars = { + order = 11, + type = "group", + guiInline = true, + name = L["Castbar"], + args = { + castClassColor = { + order = 0, + type = "toggle", + name = L["Class Castbars"], + desc = L["Color castbars by the class or reaction type of the unit."], + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames() + end + }, + casting = { + order = 3, + name = L["Interruptable"], + type = "color", + get = function(key) + local color = SV.db.media.unitframes.casting + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.casting = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + spark = { + order = 4, + name = "Spark Color", + type = "color", + get = function(key) + local color = SV.db.media.unitframes.spark + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.spark = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + interrupt = { + order = 5, + name = L["Non-Interruptable"], + type = "color", + get = function(key) + local color = SV.db.media.unitframes.interrupt + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.interrupt = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + } + } + }, + auraBars = { + order = 11, + type = "group", + guiInline = true, + name = L["Aura Bars"], + args = { + auraBarByType = { + order = 1, + name = L["By Type"], + desc = L["Color aurabar debuffs by type."], + type = "toggle", + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames() + end + }, + auraBarShield = { + order = 2, + name = L["Color Shield Buffs"], + desc = L["Color all buffs that reduce incoming damage."], + type = "toggle", + get = function(key) + return SV.db.SVUnit[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key]); + MOD:RefreshUnitFrames() + end + }, + buff_bars = { + order = 10, + name = L["Buffs"], + type = "color", + get = function(key) + local color = SV.db.media.unitframes.buff_bars + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.buff_bars = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + debuff_bars = { + order = 11, + name = L["Debuffs"], + type = "color", + get = function(key) + local color = SV.db.media.unitframes.debuff_bars + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.debuff_bars = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + }, + shield_bars = { + order = 12, + name = L["Shield Buffs Color"], + type = "color", + get = function(key) + local color = SV.db.media.unitframes.shield_bars + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.shield_bars = {rValue, gValue, bValue} + MOD:RefreshAllUnitMedia() + end, + } + } + }, + predict = { + order = 12, + name = L["Heal Prediction"], + type = "group", + args = { + personal = { + order = 1, + name = L["Personal"], + type = "color", + hasAlpha = true, + get = function(key) + local color = SV.db.media.unitframes.predict["personal"] + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.predict["personal"] = {rValue, gValue, bValue} + MOD:RefreshUnitFrames() + end, + }, + others = { + order = 2, + name = L["Others"], + type = "color", + hasAlpha = true, + get = function(key) + local color = SV.db.media.unitframes.predict["others"] + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.predict["others"] = {rValue, gValue, bValue} + MOD:RefreshUnitFrames() + end, + }, + absorbs = { + order = 2, + name = L["Absorbs"], + type = "color", + hasAlpha = true, + get = function(key) + local color = SV.db.media.unitframes.predict["absorbs"] + return color[1],color[2],color[3] + end, + set = function(key, rValue, gValue, bValue) + SV.db.media.unitframes.predict["absorbs"] = {rValue, gValue, bValue} + MOD:RefreshUnitFrames() + end, + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/focus.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/focus.lua new file mode 100644 index 0000000..55531c3 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/focus.lua @@ -0,0 +1,215 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ... +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.focus = { + name = L["Focus Frame"], + type = "group", + order = 9, + childGroups = "tab", + get = function(l)return SV.db.SVUnit["focus"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "focus");MOD:SetUnitFrame("focus")end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("focus");SV.Mentalo:Reset("Focus Frame")end}, + tabGroups = { + order = 3, + type = "group", + name = L["Unit Options"], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + baseGroup = { + order = 1, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + showAuras = { + order = 1, + type = "execute", + name = L["Show Auras"], + func = function()local U = SVUI_Focus;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("focus")end + }, + smartAuraDisplay = { + type = "select", + name = L["Smart Auras"], + desc = L["When set the Buffs and Debuffs will toggle being displayed depending on if the unit is friendly or an enemy. This will not effect the aurabars package."], + order = 2, + values = {["DISABLED"] = L["Disabled"], ["SHOW_DEBUFFS_ON_FRIENDLIES"] = L["Friendlies: Show Debuffs"], ["SHOW_BUFFS_ON_FRIENDLIES"] = L["Friendlies: Show Buffs"]} + }, + rangeCheck = { + order = 3, + name = L["Range Check"], + desc = L["Check if you are in range to cast spells on this specific unit."], + type = "toggle" + }, + predict = { + order = 4, + name = L["Heal Prediction"], + desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], + type = "toggle" + }, + hideonnpc = { + type = "toggle", + order = 5, + name = L["Text Toggle On NPC"], + desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], + get = function(l)return SV.db.SVUnit["focus"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["focus"]["power"].hideonnpc = m;MOD:SetUnitFrame("focus")end + }, + threatEnabled = { + type = "toggle", + order = 6, + name = L["Show Threat"] + } + } + }, + sizeGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Size Settings"], + args = { + width = { + order = 1, + name = L["Width"], + type = "range", + width = "full", + min = 50, + max = 500, + step = 1, + }, + height = { + order = 2, + name = L["Height"], + type = "range", + width = "full", + min = 10, + max = 250, + step = 1 + }, + } + }, + } + }, + misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "focus"), + health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "focus"), + power = ns:SetPowerConfigGroup(nil, MOD.SetUnitFrame, "focus"), + name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "focus"), + buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "focus"), + debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "focus"), + castbar = ns:SetCastbarConfigGroup(MOD.SetUnitFrame, "focus"), + aurabar = ns:SetAurabarConfigGroup(false, MOD.SetUnitFrame, "focus"), + icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "focus") + } + } + } +} +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.focustarget = { + name = L["FocusTarget Frame"], + type = "group", + order = 10, + childGroups = "tab", + get = function(l)return SV.db.SVUnit["focustarget"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "focustarget");MOD:SetUnitFrame("focustarget")end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("focustarget")SV.Mentalo:Reset("FocusTarget Frame")end}, + tabGroups = { + order = 3, + type = "group", + name = L["Unit Options"], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + baseGroup = { + order = 1, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + showAuras = {order = 1, type = "execute", name = L["Show Auras"], func = function()local U = SVUI_FocusTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("focustarget")end}, + spacer1 = { + order = 2, + type = "description", + name = "", + }, + rangeCheck = {order = 3, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, + hideonnpc = {type = "toggle", order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.db.SVUnit["focustarget"]["power"].hideonnpc end, set = function(l, m)SV.db.SVUnit["focustarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("focustarget")end}, + threatEnabled = {type = "toggle", order = 5, name = L["Show Threat"]} + } + }, + sizeGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Size Settings"], + args = { + width = {order = 1, width = "full", name = L["Width"], type = "range", min = 50, max = 500, step = 1}, + height = {order = 2, width = "full", name = L["Height"], type = "range", min = 10, max = 250, step = 1}, + } + }, + } + }, + misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "focustarget"), + health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "focustarget"), + power = ns:SetPowerConfigGroup(false, MOD.SetUnitFrame, "focustarget"), + name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "focustarget"), + buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "focustarget"), + debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "focustarget"), + icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "focustarget") + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/grid.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/grid.lua new file mode 100644 index 0000000..ca47fef --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/grid.lua @@ -0,0 +1,173 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ... +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.grid = { + name = L["Grid Frames"], + type = "group", + order = 1200, + childGroups = "tab", + args = { + configureToggle = { + order = 1, + type = "execute", + name = L["Display Frames"], + func = function()MOD:UpdateGroupConfig(_G["SVUI_Raid40"], _G["SVUI_Raid40"].forceShow ~= true or nil)end, + }, + gridCommon = { + order = 2, + type = "group", + guiInline = true, + name = L["General Settings"], + get = function(key) + return SV.db.SVUnit.grid[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key] , "grid"); + MOD:RefreshUnitFrames(); + end, + args = { + enable = { + order = 1, + name = L["Enable Grid Mode"], + desc = L["Converts party, party pet, raid, raid pet, tank and assist frames into symmetrical squares. Ideal for healers."], + type = "toggle" + }, + shownames = { + order = 2, + name = L["Show Grid Names"], + desc = L["Grid frames will show name texts."], + type = "toggle", + set = function(key, value) + if(SV.db.SVUnit.grid.size < 30) then MOD:ChangeDBVar(30, "size", "grid"); end + MOD:ChangeDBVar(value, "shownames", "grid"); + MOD:RefreshUnitFrames(); + end + }, + size = { + order = 3, + name = L["Grid Size"], + desc = L["The universal size of grid squares."], + type = "range", + min = 10, + max = 70, + step = 1, + width = "full" + }, + } + }, + gridAllowed = { + order = 3, + type = "group", + guiInline = true, + name = L["Allowed Frames"], + get = function(key) + return SV.db.SVUnit.grid[key[#key]] + end, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key] , "grid"); + MOD:RefreshUnitFrames(); + end, + args = { + party = { + type = 'toggle', + order = 1, + name = L['Party Grid'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(key) return SV.db.SVUnit.party.gridAllowed end, + set = function(key, value) SV.db.SVUnit.party.gridAllowed = value; MOD:SetGroupFrame("party") end, + }, + partypets = { + type = 'toggle', + order = 2, + name = L['Party Pets Grid'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(key) return SV.db.SVUnit.party.petsGroup.gridAllowed end, + set = function(key, value) SV.db.SVUnit.party.petsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, + }, + partytargets = { + type = 'toggle', + order = 3, + name = L['Party Targets Grid'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(key) return SV.db.SVUnit.party.targetsGroup.gridAllowed end, + set = function(key, value) SV.db.SVUnit.party.targetsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, + }, + raid10 = { + type = 'toggle', + order = 4, + name = L['Raid 10 Grid'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(key) return SV.db.SVUnit.raid10.gridAllowed end, + set = function(key, value) SV.db.SVUnit.raid10.gridAllowed = value; MOD:SetGroupFrame("raid10") end, + }, + raid25 = { + type = 'toggle', + order = 5, + name = L['Raid 25 Grid'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(key) return SV.db.SVUnit.raid25.gridAllowed end, + set = function(key, value) SV.db.SVUnit.raid25.gridAllowed = value; MOD:SetGroupFrame("raid25") end, + }, + raid40 = { + type = 'toggle', + order = 6, + name = L['Raid 40 Grid'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(key) return SV.db.SVUnit.raid40.gridAllowed end, + set = function(key, value) SV.db.SVUnit.raid40.gridAllowed = value; MOD:SetGroupFrame("raid40") end, + }, + raidpet = { + type = 'toggle', + order = 4, + name = L['Raid Pet Grid'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(key) return SV.db.SVUnit.raidpet.gridAllowed end, + set = function(key, value) SV.db.SVUnit.raidpet.gridAllowed = value; MOD:SetGroupFrame("raidpet") end, + }, + } + }, + } +} +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/other.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/other.lua new file mode 100644 index 0000000..b0e76cb --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/other.lua @@ -0,0 +1,376 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ... +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.boss = { + name = L["Boss Frames"], + type = "group", + order = 1000, + childGroups = "tab", + get = function(l)return SV.db.SVUnit["boss"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "boss");MOD:SetEnemyFrames("boss", MAX_BOSS_FRAMES)end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + displayFrames = {type = "execute", order = 2, name = L["Display Frames"], desc = L["Force the frames to show, they will act as if they are the player frame."], func = function()MOD:SwapElement("boss", 4)end}, + resetSettings = {type = "execute", order = 3, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("boss")SV.Mentalo:Reset("Boss Frames")end}, + tabGroups = { + order = 3, + type = "group", + name = L["Unit Options"], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + baseGroup = { + order = 1, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + showBy = {order = 1, name = L["Growth Direction"], type = "select", values = {["UP"] = L["Up"], ["DOWN"] = L["Down"]}}, + spacer1 = { + order = 2, + type = "description", + name = "", + }, + rangeCheck = {order = 3, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, + hideonnpc = {type = "toggle", order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.db.SVUnit["boss"]["power"].hideonnpc end, set = function(l, m)SV.db.SVUnit["boss"]["power"].hideonnpc = m;MOD:SetEnemyFrames("boss")end}, + threatEnabled = {type = "toggle", order = 5, name = L["Show Threat"]} + } + }, + sizeGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Size Settings"], + args = { + width = {order = 1, width = "full", name = L["Width"], type = "range", min = 50, max = 500, step = 1}, + height = {order = 2, width = "full", name = L["Height"], type = "range", min = 10, max = 250, step = 1}, + } + }, + } + }, + misc = ns:SetMiscConfigGroup(false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), + health = ns:SetHealthConfigGroup(false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), + power = ns:SetPowerConfigGroup(false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), + name = ns:SetNameConfigGroup(MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), + portrait = ns:SetPortraitConfigGroup(MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), + buffs = ns:SetAuraConfigGroup(true, "buffs", false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), + debuffs = ns:SetAuraConfigGroup(true, "debuffs", false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), + castbar = ns:SetCastbarConfigGroup(MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), + icons = ns:SetIconConfigGroup(MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES) + } + } + } +} +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.arena = { + name = L["Arena Frames"], + type = "group", + order = 1100, + childGroups = "tab", + get = function(l)return SV.db.SVUnit["arena"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "arena");MOD:SetEnemyFrames("arena", 5)end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + displayFrames = {type = "execute", order = 2, name = L["Display Frames"], desc = L["Force the frames to show, they will act as if they are the player frame."], func = function()MOD:SwapElement("arena", 5)end}, + resetSettings = {type = "execute", order = 3, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("arena")SV.Mentalo:Reset("Arena Frames")end}, + tabGroups = { + order = 3, + type = "group", + name = L["Unit Options"], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + baseGroup = { + order = 1, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + showBy = {order = 1, name = L["Growth Direction"], type = "select", values = {["UP"] = L["Up"], ["DOWN"] = L["Down"]}}, + spacer1 = { + order = 2, + type = "description", + name = "", + }, + predict = {order = 3, name = L["Heal Prediction"], desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], type = "toggle"}, + rangeCheck = {order = 4, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, + hideonnpc = {type = "toggle", order = 5, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.db.SVUnit["arena"]["power"].hideonnpc end, set = function(l, m)SV.db.SVUnit["arena"]["power"].hideonnpc = m;MOD:SetEnemyFrames("arena")end}, + threatEnabled = {type = "toggle", order = 6, name = L["Show Threat"]} + } + }, + sizeGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Size Settings"], + args = { + width = {order = 1, width = "full", name = L["Width"], type = "range", min = 50, max = 500, step = 1}, + height = {order = 2, width = "full", name = L["Height"], type = "range", min = 10, max = 250, step = 1}, + } + }, + pvp = { + order = 3, + guiInline = true, + type = "group", + name = L["PVP Indicators"], + args = { + enable = { + type = "toggle", + order = 1, + name = L["Enable"], + get = function(l)return SV.db.SVUnit.arena.pvp.enable end, + set = function(l, m)MOD:ChangeDBVar(m, "enable", "arena", "pvp");MOD:SetEnemyFrames("arena", 5)end, + }, + trinketGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Trinkets"], + get = function(l)return SV.db.SVUnit.arena.pvp[l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "arena", "pvp");MOD:SetEnemyFrames("arena", 5)end, + disabled = function() return not SV.db.SVUnit.arena.pvp.enable end, + args = { + trinketPosition = { + type = "select", + order = 1, + name = L["Position"], + values = { + ["LEFT"] = L["Left"], + ["RIGHT"] = L["Right"] + } + }, + trinketSize = { + order = 2, + type = "range", + name = L["Size"], + min = 10, + max = 60, + step = 1 + }, + trinketX = { + order = 3, + type = "range", + name = L["xOffset"], + min = -60, + max = 60, + step = 1 + }, + trinketY = { + order = 4, + type = "range", + name = L["yOffset"], + min = -60, + max = 60, + step = 1 + } + } + }, + specGroup = { + order = 3, + guiInline = true, + type = "group", + name = L["Enemy Specs"], + get = function(l)return SV.db.SVUnit.arena.pvp[l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "arena", "pvp");MOD:SetEnemyFrames("arena", 5)end, + disabled = function() return not SV.db.SVUnit.arena.pvp.enable end, + args = { + specPosition = { + type = "select", + order = 1, + name = L["Position"], + values = { + ["LEFT"] = L["Left"], + ["RIGHT"] = L["Right"] + } + }, + specSize = { + order = 2, + type = "range", + name = L["Size"], + min = 10, + max = 60, + step = 1 + }, + specX = { + order = 3, + type = "range", + name = L["xOffset"], + min = -60, + max = 60, + step = 1 + }, + specY = { + order = 4, + type = "range", + name = L["yOffset"], + min = -60, + max = 60, + step = 1 + } + } + } + } + }, + } + }, + misc = ns:SetMiscConfigGroup(false, MOD.SetEnemyFrames, "arena", 5), + health = ns:SetHealthConfigGroup(false, MOD.SetEnemyFrames, "arena", 5), + power = ns:SetPowerConfigGroup(false, MOD.SetEnemyFrames, "arena", 5), + name = ns:SetNameConfigGroup(MOD.SetEnemyFrames, "arena", 5), + buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetEnemyFrames, "arena", 5), + debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetEnemyFrames, "arena", 5), + castbar = ns:SetCastbarConfigGroup(MOD.SetEnemyFrames, "arena", 5) + } + } + } +} +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.tank = { + name = L["Tank Frames"], + type = "group", + order = 1200, + childGroups = "tab", + get = function(l)return SV.db.SVUnit["tank"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "tank");MOD:SetGroupFrame("tank")end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("tank")end}, + tabGroups = { + order = 3, + type = "group", + name = L["Unit Options"], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + width = {order = 2, name = L["Width"], type = "range", min = 50, max = 500, step = 1}, + height = {order = 3, name = L["Height"], type = "range", min = 10, max = 250, step = 1} + } + }, + targetsGroup = { + order = 2, + type = "group", + name = L["Tank Target"], + guiInline = true, + get = function(l)return SV.db.SVUnit["tank"]["targetsGroup"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "tank", "targetsGroup");MOD:SetGroupFrame("tank")end, + args = { + enable = {type = "toggle", name = L["Enable"], order = 1}, + width = {order = 2, name = L["Width"], type = "range", min = 10, max = 500, step = 1}, + height = {order = 3, name = L["Height"], type = "range", min = 10, max = 250, step = 1}, + anchorPoint = {type = "select", order = 5, name = L["Anchor Point"], desc = L["What point to anchor to the frame you set to attach to."], values = {TOPLEFT = "TOPLEFT", LEFT = "LEFT", BOTTOMLEFT = "BOTTOMLEFT", RIGHT = "RIGHT", TOPRIGHT = "TOPRIGHT", BOTTOMRIGHT = "BOTTOMRIGHT", CENTER = "CENTER", TOP = "TOP", BOTTOM = "BOTTOM"}}, + xOffset = {order = 6, type = "range", name = L["xOffset"], desc = L["An X offset (in pixels) to be used when anchoring new frames."], min = -500, max = 500, step = 1}, + yOffset = {order = 7, type = "range", name = L["yOffset"], desc = L["An Y offset (in pixels) to be used when anchoring new frames."], min = -500, max = 500, step = 1} + } + } + } + } + } +} +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.assist = { + name = L["Assist Frames"], + type = "group", + order = 1300, + childGroups = "tab", + get = function(l)return SV.db.SVUnit["assist"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "assist");MOD:SetGroupFrame("assist")end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("assist")end}, + tabGroups = { + order = 3, + type = "group", + name = L["Unit Options"], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + width = {order = 2, name = L["Width"], type = "range", min = 50, max = 500, step = 1}, + height = {order = 3, name = L["Height"], type = "range", min = 10, max = 250, step = 1} + } + }, + targetsGroup = { + order = 4, + type = "group", + name = L["Assist Target"], + guiInline = true, + get = function(l)return SV.db.SVUnit["assist"]["targetsGroup"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "assist", "targetsGroup");MOD:SetGroupFrame("assist")end, + args = { + enable = {type = "toggle", name = L["Enable"], order = 1}, + width = {order = 2, name = L["Width"], type = "range", min = 10, max = 500, step = 1}, + height = {order = 3, name = L["Height"], type = "range", min = 10, max = 250, step = 1}, + anchorPoint = {type = "select", order = 5, name = L["Anchor Point"], desc = L["What point to anchor to the frame you set to attach to."], values = {TOPLEFT = "TOPLEFT", LEFT = "LEFT", BOTTOMLEFT = "BOTTOMLEFT", RIGHT = "RIGHT", TOPRIGHT = "TOPRIGHT", BOTTOMRIGHT = "BOTTOMRIGHT", CENTER = "CENTER", TOP = "TOP", BOTTOM = "BOTTOM"}}, + xOffset = {order = 6, type = "range", name = L["xOffset"], desc = L["An X offset (in pixels) to be used when anchoring new frames."], min = -500, max = 500, step = 1}, + yOffset = {order = 7, type = "range", name = L["yOffset"], desc = L["An Y offset (in pixels) to be used when anchoring new frames."], min = -500, max = 500, step = 1} + } + } + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/party.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/party.lua new file mode 100644 index 0000000..66b399f --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/party.lua @@ -0,0 +1,485 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ... + +SV.Options.args.SVUnit.args.party = { + name = L['Party Frames'], + type = 'group', + order = 11, + childGroups = "tab", + get = function(l)return + SV.db.SVUnit['party'][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, + args = { + enable = { + type = 'toggle', + order = 1, + name = L['Enable'], + }, + configureToggle = { + order = 2, + type = 'execute', + name = L['Display Frames'], + func = function() + MOD:UpdateGroupConfig(SVUI_Party, SVUI_Party.forceShow ~= true or nil) + end, + }, + resetSettings = { + type = 'execute', + order = 3, + name = L['Restore Defaults'], + func = function(l, m)MOD:ResetUnitOptions('party')SV.Mentalo:Reset('Party Frames')end, + }, + tabGroups= { + order=3, + type='group', + name=L['Unit Options'], + childGroups="tree", + args= { + common = { + order = 4, + type = 'group', + name = L['General'], + args = { + hideonnpc = { + type = 'toggle', + order = 2, + name = L['Text Toggle On NPC'], + desc = L['Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point.'], + get = function(l)return SV.db.SVUnit['party']['power'].hideonnpc end, + set = function(l, m)SV.db.SVUnit['party']['power'].hideonnpc = m;MOD:SetGroupFrame('party')end, + }, + rangeCheck = { + order = 3, + name = L["Range Check"], + desc = L["Check if you are in range to cast spells on this specific unit."], + type = "toggle", + }, + gps = { + order = 4, + name = "GPS Tracking", + desc = "Show an arrow giving the direction and distance to the frames unit.", + type = "toggle", + }, + predict = { + order = 5, + name = L['Heal Prediction'], + desc = L['Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals.'], + type = 'toggle', + }, + threatEnabled = { + type = 'toggle', + order = 6, + name = L['Show Threat'], + }, + colorOverride = { + order = 7, + name = L['Class Color Override'], + desc = L['Override the default class color setting.'], + type = 'select', + values = { + ['USE_DEFAULT'] = L['Use Default'], + ['FORCE_ON'] = L['Force On'], + ['FORCE_OFF'] = L['Force Off'], + }, + }, + positionsGroup = { + order = 100, + name = L['Size and Positions'], + type = 'group', + guiInline = true, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party', nil, nil, true)end, + args = { + width = { + order = 1, + name = L['Width'], + type = 'range', + min = 10, + max = 500, + step = 1, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, + }, + height = { + order = 2, + name = L['Height'], + type = 'range', + min = 10, + max = 500, + step = 1, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, + }, + spacer = { + order = 3, + name = '', + type = 'description', + width = 'full', + }, + showBy = { + order = 4, + name = L['Growth Direction'], + desc = L['Growth direction from the first unitframe.'], + type = 'select', + values = { + DOWN_RIGHT = format(L['%s and then %s'], L['Down'], L['Right']), + DOWN_LEFT = format(L['%s and then %s'], L['Down'], L['Left']), + UP_RIGHT = format(L['%s and then %s'], L['Up'], L['Right']), + UP_LEFT = format(L['%s and then %s'], L['Up'], L['Left']), + RIGHT_DOWN = format(L['%s and then %s'], L['Right'], L['Down']), + RIGHT_UP = format(L['%s and then %s'], L['Right'], L['Up']), + LEFT_DOWN = format(L['%s and then %s'], L['Left'], L['Down']), + LEFT_UP = format(L['%s and then %s'], L['Left'], L['Up']), + }, + }, + groupCount = { + order = 5, + type = 'range', + name = L['Number of Groups'], + min = 1, + max = 8, + step = 1, + set = function(l, m) + MOD:ChangeDBVar(m, l[#l], "party"); + MOD:SetGroupFrame('party') + if SVUI_Party.isForced then + MOD:UpdateGroupConfig(SVUI_Party) + MOD:UpdateGroupConfig(SVUI_Party, true) + end + end, + }, + gRowCol = { + order = 6, + type = 'range', + name = L['Groups Per Row/Column'], + min = 1, + max = 8, + step = 1, + set = function(l, m) + MOD:ChangeDBVar(m, l[#l], "party"); + MOD:SetGroupFrame('party') + if SVUI_Party.isForced then + MOD:UpdateGroupConfig(SVUI_Party) + MOD:UpdateGroupConfig(SVUI_Party, true) + end + end, + }, + wrapXOffset = { + order = 7, + type = 'range', + name = L['Horizontal Spacing'], + min = 0, + max = 50, + step = 1, + }, + wrapYOffset = { + order = 8, + type = 'range', + name = L['Vertical Spacing'], + min = 0, + max = 50, + step = 1, + }, + }, + }, + visibilityGroup = { + order = 200, + name = L['Visibility'], + type = 'group', + guiInline = true, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party', nil, nil, true)end, + args = { + showPlayer = { + order = 1, + type = 'toggle', + name = L['Display Player'], + desc = L['When true, the header includes the player when not in a raid.'], + }, + visibility = { + order = 2, + type = 'input', + name = L['Visibility'], + desc = L['The following macro must be true in order for the group to be shown, in addition to any filter that may already be set.'], + width = 'full', + desc = L['TEXT_FORMAT_DESC'], + }, + }, + }, + sortingGroup = { + order = 300, + type = 'group', + guiInline = true, + name = L['Grouping & Sorting'], + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party', nil, nil, true)end, + args = { + sortMethod = { + order = 1, + name = L['Group By'], + desc = L['Set the order that the group will sort.'], + type = 'select', + values = { + ["CLASS"] = CLASS, + ["ROLE"] = ROLE.."(Tanks, Healers, DPS)", + ["ROLE_TDH"] = ROLE.."(Tanks, DPS, Healers)", + ["ROLE_HDT"] = ROLE.."(Healers, DPS, Tanks)", + ["ROLE_HTD"] = ROLE.."(Healers, Tanks, DPS)", + ["NAME"] = NAME, + ["GROUP"] = GROUP, + }, + }, + sortDir = { + order = 2, + name = L['Sort Direction'], + desc = L['Defines the sort order of the selected sort method.'], + type = 'select', + values = { + ['ASC'] = L['Ascending'], + ['DESC'] = L['Descending'], + }, + }, + spacer = { + order = 3, + type = 'description', + width = 'full', + name = ' ', + }, + customSorting = { + order = 4, + name = L['Custom Sorting'], + desc = L['Enabling this allows unique sorting.'], + type = 'toggle', + }, + invertGroupingOrder = { + order = 5, + name = L['Invert Grouping Order'], + desc = L['Enabling this inverts the sorting order.'], + disabled = function()return not SV.db.SVUnit['party'].customSorting end, + type = 'toggle', + }, + startFromCenter = { + order = 6, + name = L['Start Near Center'], + desc = L['The initial group will start near the center and grow out.'], + disabled = function()return not SV.db.SVUnit['party'].customSorting end, + type = 'toggle', + }, + }, + }, + + }, + }, + auraWatch = { + order = 600, + type = 'group', + name = L['Aura Watch'], + get = function(l)return + SV.db.SVUnit['party']['auraWatch'][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "auraWatch");MOD:SetGroupFrame('party')end, + args = { + enable = { + type = 'toggle', + name = L['Enable'], + order = 1, + }, + size = { + type = 'range', + name = L['Size'], + desc = L['Size of the indicator icon.'], + order = 2, + min = 4, + max = 15, + step = 1, + }, + configureButton = { + type = 'execute', + name = L['Configure Auras'], + func = function()ns:SetToFilterConfig('BuffWatch')end, + order = 3, + }, + + }, + }, + misc = ns:SetMiscConfigGroup(true, MOD.SetGroupFrame, 'party'), + health = ns:SetHealthConfigGroup(true, MOD.SetGroupFrame, 'party'), + power = ns:SetPowerConfigGroup(false, MOD.SetGroupFrame, 'party'), + name = ns:SetNameConfigGroup(MOD.SetGroupFrame, 'party'), + portrait = ns:SetPortraitConfigGroup(MOD.SetGroupFrame, 'party'), + buffs = ns:SetAuraConfigGroup(true, 'buffs', true, MOD.SetGroupFrame, 'party'), + debuffs = ns:SetAuraConfigGroup(true, 'debuffs', true, MOD.SetGroupFrame, 'party'), + petsGroup = { + order = 800, + type = 'group', + name = L['Party Pets'], + get = function(l)return SV.db.SVUnit['party']['petsGroup'][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "petsGroup");MOD:SetGroupFrame('party')end, + args = { + enable = { + type = 'toggle', + name = L['Enable'], + order = 1, + }, + width = { + order = 3, + name = L['Width'], + type = 'range', + min = 10, + max = 500, + step = 1, + }, + height = { + order = 4, + name = L['Height'], + type = 'range', + min = 10, + max = 250, + step = 1, + }, + anchorPoint = { + type = 'select', + order = 5, + name = L['Anchor Point'], + desc = L['What point to anchor to the frame you set to attach to.'], + values = {TOPLEFT='TOPLEFT',LEFT='LEFT',BOTTOMLEFT='BOTTOMLEFT',RIGHT='RIGHT',TOPRIGHT='TOPRIGHT',BOTTOMRIGHT='BOTTOMRIGHT',CENTER='CENTER',TOP='TOP',BOTTOM='BOTTOM'}, + }, + xOffset = { + order = 6, + type = 'range', + name = L['xOffset'], + desc = L['An X offset (in pixels) to be used when anchoring new frames.'], + min = - 500, + max = 500, + step = 1, + }, + yOffset = { + order = 7, + type = 'range', + name = L['yOffset'], + desc = L['An Y offset (in pixels) to be used when anchoring new frames.'], + min = - 500, + max = 500, + step = 1, + }, + name_length = { + order = 8, + name = L["Name Length"], + desc = L["TEXT_FORMAT_DESC"], + type = "range", + width = "full", + min = 1, + max = 30, + step = 1, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], "party", "petsGroup"); + local tag = "[name:" .. value .. "]"; + MOD:ChangeDBVar(tag, "tags", "party", "petsGroup"); + end, + } + }, + }, + targetsGroup = { + order = 900, + type = 'group', + name = L['Party Targets'], + get = function(l)return + SV.db.SVUnit['party']['targetsGroup'][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "targetsGroup");MOD:SetGroupFrame('party')end, + args = { + enable = { + type = 'toggle', + name = L['Enable'], + order = 1, + }, + width = { + order = 3, + name = L['Width'], + type = 'range', + min = 10, + max = 500, + step = 1, + }, + height = { + order = 4, + name = L['Height'], + type = 'range', + min = 10, + max = 250, + step = 1, + }, + anchorPoint = { + type = 'select', + order = 5, + name = L['Anchor Point'], + desc = L['What point to anchor to the frame you set to attach to.'], + values = {TOPLEFT='TOPLEFT',LEFT='LEFT',BOTTOMLEFT='BOTTOMLEFT',RIGHT='RIGHT',TOPRIGHT='TOPRIGHT',BOTTOMRIGHT='BOTTOMRIGHT',CENTER='CENTER',TOP='TOP',BOTTOM='BOTTOM'}, + }, + xOffset = { + order = 6, + type = 'range', + name = L['xOffset'], + desc = L['An X offset (in pixels) to be used when anchoring new frames.'], + min = - 500, + max = 500, + step = 1, + }, + yOffset = { + order = 7, + type = 'range', + name = L['yOffset'], + desc = L['An Y offset (in pixels) to be used when anchoring new frames.'], + min = - 500, + max = 500, + step = 1, + }, + name_length = { + order = 8, + name = L["Name Length"], + desc = L["TEXT_FORMAT_DESC"], + type = "range", + width = "full", + min = 1, + max = 30, + step = 1, + set = function(key, value) + MOD:ChangeDBVar(value, key[#key], "party", "targetsGroup"); + local tag = "[name:" .. value .. "]"; + MOD:ChangeDBVar(tag, "tags", "party", "targetsGroup"); + end, + } + }, + }, + icons = ns:SetIconConfigGroup(MOD.SetGroupFrame, 'party') + } + } + }, +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/pet.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/pet.lua new file mode 100644 index 0000000..68a370f --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/pet.lua @@ -0,0 +1,253 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ... +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.pet = { + name = L["Pet Frame"], + type = "group", + order = 4, + childGroups = "tab", + get = function(l)return SV.db.SVUnit["pet"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "pet");MOD:SetUnitFrame("pet")end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("pet")SV.Mentalo:Reset("Pet Frame")end}, + tabGroups = { + order = 3, + type = "group", + name = L["Unit Options"], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + showAuras = { + order = 1, + type = "execute", + name = L["Show Auras"], + func = function()local U = SVUI_Pet;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("pet")end + }, + miscGroup = { + order = 2, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + rangeCheck = { + order = 2, + name = L["Range Check"], + desc = L["Check if you are in range to cast spells on this specific unit."], + type = "toggle" + }, + predict = { + order = 3, + name = L["Heal Prediction"], + desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], + type = "toggle" + }, + hideonnpc = { + type = "toggle", + order = 4, + name = L["Text Toggle On NPC"], + desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], + get = function(l)return SV.db.SVUnit["pet"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["pet"]["power"].hideonnpc = m;MOD:SetUnitFrame("pet")end + }, + threatEnabled = { + type = "toggle", + order = 5, + name = L["Show Threat"] + }, + } + }, + scaleGroup = { + order = 6, + type = "group", + guiInline = true, + name = L["Frame Size"], + args = { + width = {order = 1, name = L["Width"], width = "full", type = "range", min = 50, max = 500, step = 1}, + height = {order = 2, name = L["Height"], width = "full", type = "range", min = 10, max = 250, step = 1}, + } + }, + watchGroup = { + order = 8, + type = "group", + guiInline = true, + name = L["Aura Watch"], + get = function(l)return SV.db.SVUnit["pet"]["auraWatch"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "pet", "auraWatch");MOD:SetUnitFrame("pet")end, + args = { + enable = { + type = "toggle", + name = L["Enable"], + order = 1 + }, + size = { + type = "range", + name = L["Size"], + desc = L["Size of the indicator icon."], + order = 2, + min = 4, + max = 15, + step = 1 + } + } + }, + }, + }, + misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "pet"), + health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "pet"), + power = ns:SetPowerConfigGroup(false, MOD.SetUnitFrame, "pet"), + portrait = ns:SetPortraitConfigGroup(MOD.SetUnitFrame, "pet"), + name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "pet"), + buffs = ns:SetAuraConfigGroup(true, "buffs", false, MOD.SetUnitFrame, "pet"), + debuffs = ns:SetAuraConfigGroup(true, "debuffs", false, MOD.SetUnitFrame, "pet") + } + } + } +} +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.pettarget = { + name = L["PetTarget Frame"], + type = "group", order = 5, + childGroups = "tab", + get = function(l)return SV.db.SVUnit["pettarget"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "pettarget");MOD:SetUnitFrame("pettarget")end, + args = { + enable = {type = "toggle", order = 1, name = L["Enable"]}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("pettarget")SV.Mentalo:Reset("PetTarget Frame")end}, + tabGroups = { + order = 3, + type = "group", + name = L["Unit Options"], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + showAuras = { + order = 3, + type = "execute", + name = L["Show Auras"], + func = function()local U = SVUI_PetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("pettarget")end + }, + width = {order = 4, name = L["Width"], type = "range", min = 50, max = 500, step = 1}, + height = {order = 5, name = L["Height"], type = "range", min = 10, max = 250, step = 1}, + rangeCheck = {order = 6, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, + hideonnpc = { + type = "toggle", + order = 7, + name = L["Text Toggle On NPC"], + desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], + get = function(l)return SV.db.SVUnit["pettarget"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end + }, + threatEnabled = {type = "toggle", order = 13, name = L["Show Threat"]} + } + }, + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + showAuras = { + order = 1, + type = "execute", + name = L["Show Auras"], + func = function()local U = SVUI_PetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("pettarget")end + }, + miscGroup = { + order = 2, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + rangeCheck = { + order = 2, + name = L["Range Check"], + desc = L["Check if you are in range to cast spells on this specific unit."], + type = "toggle" + }, + hideonnpc = { + type = "toggle", + order = 4, + name = L["Text Toggle On NPC"], + desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], + get = function(l)return SV.db.SVUnit["pettarget"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end + }, + threatEnabled = { + type = "toggle", + order = 5, + name = L["Show Threat"] + }, + } + }, + scaleGroup = { + order = 3, + type = "group", + guiInline = true, + name = L["Frame Size"], + args = { + width = {order = 1, name = L["Width"], width = "full", type = "range", min = 50, max = 500, step = 1}, + height = {order = 2, name = L["Height"], width = "full", type = "range", min = 10, max = 250, step = 1}, + } + }, + }, + }, + misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "pettarget"), + health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "pettarget"), + power = ns:SetPowerConfigGroup(false, MOD.SetUnitFrame, "pettarget"), + name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "pettarget"), + buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "pettarget"), + debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "pettarget") + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/player.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/player.lua new file mode 100644 index 0000000..5e78f46 --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/player.lua @@ -0,0 +1,298 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ... +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.player={ + name = L['Player Frame'], + type = 'group', + order = 3, + childGroups = "tab", + get = function(l)return SV.db.SVUnit['player'][l[#l]]end, + set = function(l,m)MOD:ChangeDBVar(m, l[#l], "player");MOD:SetUnitFrame('player')end, + args = { + enable = { + type = 'toggle', + order = 1, + name = L['Enable'] + }, + resetSettings = { + type = 'execute', + order = 2, + name = L['Restore Defaults'], + func = function(l,m) + MOD:ResetUnitOptions('player') + SV.Mentalo:Reset('Player Frame') + end + }, + tabGroups = { + order = 3, + type = 'group', + name = L['Unit Options'], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = 'group', + name = L['General Settings'], + args = { + baseGroup = { + order = 1, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + showAuras = { + order = 1, + type = "execute", + name = L["Show Auras"], + func = function()local U = SVUI_Player;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("player")end + }, + lowmana = { + order = 2, + name = L["Low Mana Threshold"], + desc = L["When you mana falls below this point, text will flash on the player frame."], + type = "range", + min = 0, + max = 100, + step = 1 + }, + combatfade = { + order = 3, + name = L["Combat Fade"], + desc = L["Fade the unitframe when out of combat, not casting, no target exists."], + type = "toggle", + set = function(l, m) + MOD:ChangeDBVar(m, l[#l], "player"); + MOD:SetUnitFrame("player") + if m == true then + SVUI_Pet:SetParent(SVUI_Player) + else + SVUI_Pet:SetParent(SVUI_UnitFrameParent) + end + end + }, + predict = { + order = 4, + name = L["Heal Prediction"], + desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], + type = "toggle" + }, + hideonnpc = { + type = "toggle", + order = 5, + name = L["Text Toggle On NPC"], + desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], + get = function(l)return SV.db.SVUnit["player"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["player"]["power"].hideonnpc = m;MOD:SetUnitFrame("player")end + }, + threatEnabled = { + type = "toggle", + order = 6, + name = L["Show Threat"] + }, + playerExpBar = { + order = 7, + name = "Playerframe Experience Bar", + desc = "Show player experience on power bar mouseover", + type = "toggle", + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player");SV:StaticPopup_Show("RL_CLIENT")end + }, + playerRepBar = { + order = 8, + name = "Playerframe Reputation Bar", + desc = "Show player reputations on power bar mouseover", + type = "toggle", + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player");SV:StaticPopup_Show("RL_CLIENT")end + } + } + }, + sizeGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Size Settings"], + args = { + width = { + order = 1, + name = L["Width"], + type = "range", + width = "full", + min = 50, + max = 500, + step = 1, + set = function(l, m) + if SV.db.SVUnit["player"].castbar.width == SV.db.SVUnit["player"][l[#l]] then + SV.db.SVUnit["player"].castbar.width = m + end + MOD:ChangeDBVar(m, l[#l], "player"); + MOD:SetUnitFrame("player") + end + }, + height = { + order = 2, + name = L["Height"], + type = "range", + width = "full", + min = 10, + max = 250, + step = 1 + }, + } + }, + pvpGroup = { + order = 3, + type = "group", + guiInline = true, + name = PVP, + get = function(l)return SV.db.SVUnit["player"]["pvp"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player", "pvp");MOD:SetUnitFrame("player")end, + args = { + position = { + type = "select", + order = 2, + name = L["Position"], + values = { + TOPLEFT = "TOPLEFT", + LEFT = "LEFT", + BOTTOMLEFT = "BOTTOMLEFT", + RIGHT = "RIGHT", + TOPRIGHT = "TOPRIGHT", + BOTTOMRIGHT = "BOTTOMRIGHT", + CENTER = "CENTER", + TOP = "TOP", + BOTTOM = "BOTTOM" + } + }, + tags = { + order = 100, + name = L["Text Format"], + type = "input", + width = "full", + desc = L["TEXT_FORMAT_DESC"] + } + } + } + } + }, + misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "player"), + health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "player"), + power = ns:SetPowerConfigGroup(true, MOD.SetUnitFrame, "player"), + name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "player"), + portrait = ns:SetPortraitConfigGroup(MOD.SetUnitFrame, "player"), + buffs = ns:SetAuraConfigGroup(true, "buffs", false, MOD.SetUnitFrame, "player"), + debuffs = ns:SetAuraConfigGroup(true, "debuffs", false, MOD.SetUnitFrame, "player"), + castbar = ns:SetCastbarConfigGroup(MOD.SetUnitFrame, "player"), + aurabar = ns:SetAurabarConfigGroup(true, MOD.SetUnitFrame, "player"), + icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "player"), + classbar = { + order = 1000, + type = "group", + name = L["Classbar"], + get = function(l)return SV.db.SVUnit["player"]["classbar"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player", "classbar");MOD:SetUnitFrame("player")end, + args = { + enable = { + type = "toggle", + order = 1, + name = L["Enable"] + }, + commonGroup = { + order = 2, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + slideLeft = { + type = "toggle", + order = 1, + name = L["Slide Left"] + }, + detachFromFrame = { + type = "toggle", + order = 2, + name = L["Detach From Frame"] + }, + stagger = { + type = "toggle", + order = 3, + name = L["Stagger Bar"], + get = function(l)return SV.db.SVUnit["player"]["stagger"].enable end, + set = function(l, m)MOD:ChangeDBVar(m, "enable", "player", "stagger");MOD:SetUnitFrame("player")end, + disabled = SV.class ~= "MONK", + }, + druidMana = { + type = "toggle", + order = 12, + name = L["Druid Mana"], + desc = L["Display druid mana bar when in cat or bear form and when mana is not 100%."], + get = function(key) + return SV.db.SVUnit["player"]["power"].druidMana + end, + set = function(key, value) + MOD:ChangeDBVar(value, "druidMana", "player", "power"); + MOD:SetUnitFrame("player") + end, + disabled = SV.class ~= "DRUID", + } + } + }, + sizeGroup = { + order = 3, + guiInline = true, + type = "group", + name = L["Size Settings"], + args = { + height = { + type = "range", + order = 4, + width = "full", + name = L["Size"], + min = 15, + max = 45, + step = 1 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/raid.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/raid.lua new file mode 100644 index 0000000..927758e --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/raid.lua @@ -0,0 +1,736 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ... + +local subOrder = 11; +for w=10,40,15 do + subOrder = subOrder + 1 + SV.Options.args.SVUnit.args["raid" .. w] = { + name = L["Raid-" .. w .. " Frames"], + type = "group", + order = subOrder, + childGroups = "tab", + get = function(l) return SV.db.SVUnit["raid" .. w][l[#l]] end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w)end, + args = { + enable = + { + type = "toggle", + order = 1, + name = L["Enable"], + }, + configureToggle = { + order = 2, + type = "execute", + name = L["Display Frames"], + func = function()MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w], _G["SVUI_Raid" .. w].forceShow ~= true or nil)end, + }, + resetSettings = { + type = "execute", + order = 3, + name = L["Restore Defaults"], + func = function(l, m)MOD:ResetUnitOptions("raid" .. w)SV.Mentalo:Reset("Raid 1-" .. w .. " Frames")end, + }, + tabGroups = { + order = 3, + type = "group", + name = L["Unit Options"], + childGroups = "tree", + args = { + commonGroup = { + order = 1, + type = "group", + name = L["General Settings"], + args = { + hideonnpc = + { + type = "toggle", + order = 1, + name = L["Text Toggle On NPC"], + desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], + get = function(l)return SV.db.SVUnit["raid" .. w]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["raid" .. w]["power"].hideonnpc = m;MOD:SetGroupFrame("raid" .. w)end, + }, + rangeCheck = { + order = 2, + name = L["Range Check"], + desc = L["Check if you are in range to cast spells on this specific unit."], + type = "toggle", + }, + gps = { + order = 3, + name = "GPS Tracking", + desc = "Show an arrow giving the direction and distance to the frames unit.", + type = "toggle", + }, + predict = { + order = 4, + name = L["Heal Prediction"], + desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], + type = "toggle", + }, + threatEnabled = { + type = "toggle", + order = 5, + name = L["Show Threat"], + }, + colorOverride = { + order = 6, + name = L["Class Color Override"], + desc = L["Override the default class color setting."], + type = "select", + values = + { + ["USE_DEFAULT"] = L["Use Default"], + ["FORCE_ON"] = L["Force On"], + ["FORCE_OFF"] = L["Force Off"], + }, + }, + positionsGroup = { + order = 100, + name = L["Size and Positions"], + type = "group", + guiInline = true, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w, nil, nil, true)end, + args = + { + width = + { + order = 1, + name = L["Width"], + type = "range", + min = 10, + max = 500, + step = 1, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w)end, + }, + height = + { + order = 2, + name = L["Height"], + type = "range", + min = 10, + max = 500, + step = 1, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w)end, + }, + spacer = + { + order = 3, + name = "", + type = "description", + width = "full", + }, + showBy = + { + order = 4, + name = L["Growth Direction"], + desc = L["Growth direction from the first unitframe."], + type = "select", + values = + { + DOWN_RIGHT = format(L["%s and then %s"], L["Down"], L["Right"]), + DOWN_LEFT = format(L["%s and then %s"], L["Down"], L["Left"]), + UP_RIGHT = format(L["%s and then %s"], L["Up"], L["Right"]), + UP_LEFT = format(L["%s and then %s"], L["Up"], L["Left"]), + RIGHT_DOWN = format(L["%s and then %s"], L["Right"], L["Down"]), + RIGHT_UP = format(L["%s and then %s"], L["Right"], L["Up"]), + LEFT_DOWN = format(L["%s and then %s"], L["Left"], L["Down"]), + LEFT_UP = format(L["%s and then %s"], L["Left"], L["Up"]), + }, + }, + groupCount = + { + order = 5, + type = "range", + name = L["Number of Groups"], + min = 1, + max = 8, + step = 1, + set = function(l, m) + MOD:ChangeDBVar(m, l[#l], "raid" .. w); + MOD:SetGroupFrame("raid" .. w) + if _G["SVUI_Raid" .. w].isForced then + MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w]) + MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w], true) + end + end, + }, + gRowCol = + { + order = 6, + type = "range", + name = L["Groups Per Row / Column"], + min = 1, + max = 8, + step = 1, + set = function(l, m) + MOD:ChangeDBVar(m, l[#l], "raid" .. w); + MOD:SetGroupFrame("raid" .. w) + if _G["SVUI_Raid" .. w].isForced then + MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w]) + MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w], true) + end + end, + }, + wrapXOffset = + { + order = 7, + type = "range", + name = L["Horizontal Spacing"], + min = 0, + max = 50, + step = 1, + }, + wrapYOffset = + { + order = 8, + type = "range", + name = L["Vertical Spacing"], + min = 0, + max = 50, + step = 1, + }, + }, + }, + visibilityGroup = { + order = 200, + name = L["Visibility"], + type = "group", + guiInline = true, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w, nil, nil, true)end, + args = + { + showPlayer = + { + order = 1, + type = "toggle", + name = L["Display Player"], + desc = L["When true, the header includes the player when not in a raid."], + }, + visibility = + { + order = 2, + type = "input", + name = L["Visibility"], + desc = L["The following macro must be true in order for the group to be shown, in addition to any filter that may already be set."], + width = "full", + desc = L["TEXT_FORMAT_DESC"], + }, + }, + }, + sortingGroup = { + order = 300, + type = "group", + guiInline = true, + name = L["Sorting"], + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w, nil, nil, true)end, + args = + { + sortMethod = + { + order = 1, + name = L["Group By"], + desc = L["Set the order that the group will sort."], + type = "select", + values = + { + ["CLASS"] = CLASS, + ["ROLE"] = ROLE.."(Tanks, Healers, DPS)", + ["ROLE_TDH"] = ROLE.."(Tanks, DPS, Healers)", + ["ROLE_HDT"] = ROLE.."(Healers, DPS, Tanks)", + ["ROLE_HTD"] = ROLE.."(Healers, Tanks, DPS)", + ["NAME"] = NAME, + ["MTMA"] = L["Main Tanks / Main Assist"], + ["GROUP"] = GROUP, + }, + }, + sortDir = + { + order = 2, + name = L["Sort Direction"], + desc = L["Defines the sort order of the selected sort method."], + type = "select", + values = + { + ["ASC"] = L["Ascending"], + ["DESC"] = L["Descending"], + }, + }, + spacer = + { + order = 3, + type = "description", + width = "full", + name = " ", + }, + customSorting = + { + order = 4, + name = L["Raid-Wide Sorting"], + desc = L["Enabling this allows raid-wide sorting however you will not be able to distinguish between groups."], + type = "toggle", + }, + invertGroupingOrder = + { + order = 5, + name = L["Invert Grouping Order"], + desc = L["Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from."], + disabled = function()return not SV.db.SVUnit["raid" .. w].customSorting end, + type = "toggle", + }, + startFromCenter = + { + order = 6, + name = L["Start Near Center"], + desc = L["The initial group will start near the center and grow out."], + disabled = function()return not SV.db.SVUnit["raid" .. w].customSorting end, + type = "toggle", + }, + }, + } + } + }, + misc = ns:SetMiscConfigGroup(true, MOD.SetGroupFrame, "raid" .. w), + health = ns:SetHealthConfigGroup(true, MOD.SetGroupFrame, "raid" .. w), + power = ns:SetPowerConfigGroup(false, MOD.SetGroupFrame, "raid" .. w), + name = ns:SetNameConfigGroup(MOD.SetGroupFrame, "raid" .. w), + buffs = ns:SetAuraConfigGroup(true, "buffs", true, MOD.SetGroupFrame, "raid" .. w), + debuffs = ns:SetAuraConfigGroup(true, "debuffs", true, MOD.SetGroupFrame, "raid" .. w), + auraWatch = { + order = 600, + type = "group", + name = L["Aura Watch"], + args = { + enable = { + type = "toggle", + name = L["Enable"], + order = 1, + get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.enable end, + set = function(l, m)MOD:ChangeDBVar(m, "enable", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, + }, + size = { + type = "range", + name = L["Size"], + desc = L["Size of the indicator icon."], + order = 2, + min = 4, + max = 15, + step = 1, + get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.size end, + set = function(l, m)MOD:ChangeDBVar(m, "size", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, + }, + configureButton = { + type = "execute", + name = L["Configure Auras"], + func = function()ns:SetToFilterConfig("BuffWatch")end, + order = 3, + }, + + }, + }, + rdebuffs = { + order = 800, + type = "group", + name = L["RaidDebuff Indicator"], + get = function(l)return + SV.db.SVUnit["raid" .. w]["rdebuffs"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w, "rdebuffs");MOD:SetGroupFrame("raid" .. w)end, + args = { + enable = { + type = "toggle", + name = L["Enable"], + order = 1, + }, + size = { + type = "range", + name = L["Size"], + order = 2, + min = 8, + max = 35, + step = 1, + }, + fontSize = { + type = "range", + name = L["Font Size"], + order = 3, + min = 7, + max = 22, + step = 1, + }, + xOffset = { + order = 4, + type = "range", + name = L["xOffset"], + min = - 300, + max = 300, + step = 1, + }, + yOffset = { + order = 5, + type = "range", + name = L["yOffset"], + min = - 300, + max = 300, + step = 1, + }, + configureButton = { + type = "execute", + name = L["Configure Auras"], + func = function()ns:SetToFilterConfig("Raid")end, + order = 7, + }, + }, + }, + icons = ns:SetIconConfigGroup(MOD.SetGroupFrame, "raid" .. w), + }, + }, + }, + } +end + +subOrder = subOrder + 1 +SV.Options.args.SVUnit.args.raidpet ={ + order = subOrder, + type = 'group', + name = L['Raid Pet Frames'], + childGroups = "tab", + get = function(l)return + SV.db.SVUnit['raidpet'][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')end, + args ={ + enable ={ + type = 'toggle', + order = 1, + name = L['Enable'], + }, + configureToggle ={ + order = 2, + type = 'execute', + name = L['Display Frames'], + func = function()MOD:UpdateGroupConfig(SVUI_Raidpet, SVUI_Raidpet.forceShow ~= true or nil)end, + }, + resetSettings ={ + type = 'execute', + order = 3, + name = L['Restore Defaults'], + func = function(l, m)MOD:ResetUnitOptions('raidpet')SV.Mentalo:Reset('Raid Pet Frames')MOD:SetGroupFrame('raidpet', nil, nil, true)end, + }, + tabGroups={ + order=3, + type='group', + name=L['Unit Options'], + childGroups="tree", + args={ + commonGroup={ + order=1, + type='group', + name=L['General Settings'], + args={ + rangeCheck ={ + order = 3, + name = L["Range Check"], + desc = L["Check if you are in range to cast spells on this specific unit."], + type = "toggle", + }, + predict ={ + order = 4, + name = L['Heal Prediction'], + desc = L['Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals.'], + type = 'toggle', + }, + threatEnabled ={ + type = 'toggle', + order = 5, + name = L['Show Threat'], + }, + colorOverride ={ + order = 6, + name = L['Class Color Override'], + desc = L['Override the default class color setting.'], + type = 'select', + values ={ + ['USE_DEFAULT'] = L['Use Default'], + ['FORCE_ON'] = L['Force On'], + ['FORCE_OFF'] = L['Force Off'], + }, + }, + positionsGroup ={ + order = 100, + name = L['Size and Positions'], + type = 'group', + guiInline = true, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet', nil, nil, true)end, + args ={ + width ={ + order = 1, + name = L['Width'], + type = 'range', + min = 10, + max = 500, + step = 1, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')end, + }, + height ={ + order = 2, + name = L['Height'], + type = 'range', + min = 10, + max = 500, + step = 1, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')end, + }, + spacer ={ + order = 3, + name = '', + type = 'description', + width = 'full', + }, + showBy ={ + order = 4, + name = L['Growth Direction'], + desc = L['Growth direction from the first unitframe.'], + type = 'select', + values ={ + DOWN_RIGHT = format(L['%s and then %s'], L['Down'], L['Right']), + DOWN_LEFT = format(L['%s and then %s'], L['Down'], L['Left']), + UP_RIGHT = format(L['%s and then %s'], L['Up'], L['Right']), + UP_LEFT = format(L['%s and then %s'], L['Up'], L['Left']), + RIGHT_DOWN = format(L['%s and then %s'], L['Right'], L['Down']), + RIGHT_UP = format(L['%s and then %s'], L['Right'], L['Up']), + LEFT_DOWN = format(L['%s and then %s'], L['Left'], L['Down']), + LEFT_UP = format(L['%s and then %s'], L['Left'], L['Up']), + }, + }, + groupCount ={ + order = 7, + type = 'range', + name = L['Number of Groups'], + min = 1, + max = 8, + step = 1, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')if + SVUI_Raidpet.isForced then MOD:UpdateGroupConfig(SVUI_Raidpet)MOD:UpdateGroupConfig(SVUI_Raidpet, true)end end, + }, + gRowCol ={ + order = 8, + type = 'range', + name = L['Groups Per Row/Column'], + min = 1, + max = 8, + step = 1, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')if + SVUI_Raidpet.isForced then MOD:UpdateGroupConfig(SVUI_Raidpet)MOD:UpdateGroupConfig(SVUI_Raidpet, true)end end, + }, + wrapXOffset ={ + order = 9, + type = 'range', + name = L['Horizontal Spacing'], + min = 0, + max = 50, + step = 1, + }, + wrapYOffset ={ + order = 10, + type = 'range', + name = L['Vertical Spacing'], + min = 0, + max = 50, + step = 1, + }, + }, + }, + visibilityGroup ={ + order = 200, + name = L['Visibility'], + type = 'group', + guiInline = true, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet', nil, nil, true)end, + args ={ + visibility ={ + order = 2, + type = 'input', + name = L['Visibility'], + desc = L['The following macro must be true in order for the group to be shown, in addition to any filter that may already be set.'], + width = 'full', + desc = L['TEXT_FORMAT_DESC'], + }, + }, + }, + sortingGroup ={ + order = 300, + type = 'group', + guiInline = true, + name = L['Grouping & Sorting'], + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet', nil, nil, true)end, + args ={ + sortMethod ={ + order = 1, + name = L['Group By'], + desc = L['Set the order that the group will sort.'], + type = 'select', + values ={ + ['NAME'] = L['Owners Name'], + ['PETNAME'] = L['Pet Name'], + ['GROUP'] = GROUP, + }, + }, + sortDir ={ + order = 2, + name = L['Sort Direction'], + desc = L['Defines the sort order of the selected sort method.'], + type = 'select', + values ={ + ['ASC'] = L['Ascending'], + ['DESC'] = L['Descending'], + }, + }, + spacer ={ + order = 3, + type = 'description', + width = 'full', + name = ' ', + }, + customSorting ={ + order = 4, + name = L['Raid-Wide Sorting'], + desc = L['Enabling this allows raid-wide sorting however you will not be able to distinguish between groups.'], + type = 'toggle', + }, + invertGroupingOrder ={ + order = 5, + name = L['Invert Grouping Order'], + desc = L['Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from.'], + disabled = function()return not SV.db.SVUnit['raidpet'].customSorting end, + type = 'toggle', + }, + startFromCenter ={ + order = 6, + name = L['Start Near Center'], + desc = L['The initial group will start near the center and grow out.'], + disabled = function()return not SV.db.SVUnit['raidpet'].customSorting end, + type = 'toggle', + }, + }, + } + } + }, + misc = ns:SetMiscConfigGroup(true, MOD.SetGroupFrame, 'raidpet'), + health = ns:SetHealthConfigGroup(true, MOD.SetGroupFrame, 'raidpet'), + name = ns:SetNameConfigGroup(MOD.SetGroupFrame, 'raidpet'), + buffs = ns:SetAuraConfigGroup(true, 'buffs', true, MOD.SetGroupFrame, 'raidpet'), + debuffs = ns:SetAuraConfigGroup(true, 'debuffs', true, MOD.SetGroupFrame, 'raidpet'), + auraWatch ={ + order = 600, + type = 'group', + name = L['Aura Watch'], + args ={ + enable = { + type = "toggle", + name = L["Enable"], + order = 1, + get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.enable end, + set = function(l, m)MOD:ChangeDBVar(m, "enable", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, + }, + size = { + type = "range", + name = L["Size"], + desc = L["Size of the indicator icon."], + order = 2, + min = 4, + max = 15, + step = 1, + get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.size end, + set = function(l, m)MOD:ChangeDBVar(m, "size", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, + }, + configureButton ={ + type = 'execute', + name = L['Configure Auras'], + func = function()ns:SetToFilterConfig('BuffWatch')end, + order = 3, + }, + }, + }, + rdebuffs ={ + order = 700, + type = 'group', + name = L['RaidDebuff Indicator'], + get = function(l)return + SV.db.SVUnit['raidpet']['rdebuffs'][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet", "rdebuffs");MOD:SetGroupFrame('raidpet')end, + args ={ + enable ={ + type = 'toggle', + name = L['Enable'], + order = 1, + }, + size ={ + type = 'range', + name = L['Size'], + order = 2, + min = 8, + max = 35, + step = 1, + }, + xOffset ={ + order = 3, + type = 'range', + name = L['xOffset'], + min = - 300, + max = 300, + step = 1, + }, + yOffset ={ + order = 4, + type = 'range', + name = L['yOffset'], + min = - 300, + max = 300, + step = 1, + }, + configureButton ={ + type = 'execute', + name = L['Configure Auras'], + func = function()ns:SetToFilterConfig('Raid')end, + order = 5, + }, + }, + }, + icons = ns:SetIconConfigGroup(MOD.SetGroupFrame, 'raidpet'), + }, + }, + }, +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/components/units/target.lua b/Interface/AddOns/SVUI_ConfigOMatic/components/units/target.lua new file mode 100644 index 0000000..aeb7efa --- /dev/null +++ b/Interface/AddOns/SVUI_ConfigOMatic/components/units/target.lua @@ -0,0 +1,305 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local pairs = _G.pairs; +local tinsert = _G.tinsert; +local table = _G.table; +--[[ TABLE METHODS ]]-- +local tsort = table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local MOD = SV.SVUnit +if(not MOD) then return end +local _, ns = ... +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.target={ + name = L['Target Frame'], + type = 'group', + order = 6, + childGroups = "tab", + get=function(l)return SV.db.SVUnit['target'][l[#l]]end, + set=function(l,m)MOD:ChangeDBVar(m, l[#l], "target");MOD:SetUnitFrame('target')end, + args={ + enable={type='toggle',order=1,name=L['Enable']}, + resetSettings={type='execute',order=2,name=L['Restore Defaults'],func=function(l,m)MOD:ResetUnitOptions('target')SV.Mentalo:Reset('Target Frame')end}, + tabGroups={ + order=3, + type='group', + name=L['Unit Options'], + childGroups="tree", + args={ + commonGroup = { + order = 1, + type = 'group', + name = L['General Settings'], + args = { + baseGroup = { + order = 1, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + showAuras = { + order = 1, + type = "execute", + name = L["Show Auras"], + func = function()local U = SVUI_Target;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("target")end + }, + smartAuraDisplay = { + type = "select", + name = L["Smart Auras"], + desc = L["When set the Buffs and Debuffs will toggle being displayed depending on if the unit is friendly or an enemy. This will not effect the aurabars package."], + order = 2, + values = { + ["DISABLED"] = L["Disabled"], + ["SHOW_DEBUFFS_ON_FRIENDLIES"] = L["Friendlies: Show Debuffs"], + ["SHOW_BUFFS_ON_FRIENDLIES"] = L["Friendlies: Show Buffs"] + } + }, + gps = { + order = 3, + name = "GPS Tracking", + desc = "Show an arrow giving the direction and distance to the frames unit.", + type = "toggle", + }, + predict = { + order = 4, + name = L["Heal Prediction"], + desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], + type = "toggle" + }, + hideonnpc = { + type = "toggle", + order = 5, + name = L["Text Toggle On NPC"], + desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], + get = function(l)return SV.db.SVUnit["target"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end + }, + threatEnabled = { + type = "toggle", + order = 6, + name = L["Show Threat"] + }, + middleClickFocus = { + order = 7, + name = L["Middle Click - Set Focus"], + desc = L["Middle clicking the unit frame will cause your focus to match the unit."], + type = "toggle", + disabled = function()return IsAddOnLoaded("Clique")end + }, + + } + }, + sizeGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Size Settings"], + args = { + width = { + order = 1, + name = L["Width"], + type = "range", + width = "full", + min = 50, + max = 500, + step = 1, + set = function(l, m) + if SV.db.SVUnit["target"].castbar.width == SV.db.SVUnit["target"][l[#l]] then + SV.db.SVUnit["target"].castbar.width = m + end + MOD:ChangeDBVar(m, l[#l], "target"); + MOD:SetUnitFrame("target") + end + }, + height = { + order = 2, + name = L["Height"], + type = "range", + width = "full", + min = 10, + max = 250, + step = 1 + }, + } + } + } + }, + combobar = { + order = 800, + type = "group", + name = L["Combobar"], + get = function(l)return SV.db.SVUnit["target"]["combobar"][l[#l]]end, + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "target", "combobar");MOD:SetUnitFrame("target")end, + args = { + enable = { + type = "toggle", + order = 1, + name = L["Enable"] + }, + smallIcons = { + type = "toggle", + name = L["Small Points"], + order = 2 + }, + height = { + type = "range", + order = 3, + name = L["Height"], + min = 15, + max = 45, + step = 1 + }, + autoHide = { + type = "toggle", + name = L["Auto-Hide"], + order = 4 + } + } + }, + misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "target"), + health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "target"), + power = ns:SetPowerConfigGroup(true, MOD.SetUnitFrame, "target"), + name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "target"), + portrait = ns:SetPortraitConfigGroup(MOD.SetUnitFrame, "target"), + buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "target"), + debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "target"), + castbar = ns:SetCastbarConfigGroup(MOD.SetUnitFrame, "target"), + aurabar = ns:SetAurabarConfigGroup(false, MOD.SetUnitFrame, "target"), + icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "target") + } + } + } +} +--[[ +################################################################################################## +################################################################################################## +################################################################################################## +]] +SV.Options.args.SVUnit.args.targettarget={ + name=L['TargetTarget Frame'], + type='group', + order=7, + childGroups="tab", + get=function(l)return SV.db.SVUnit['targettarget'][l[#l]]end, + set=function(l,m)MOD:ChangeDBVar(m, l[#l], "targettarget");MOD:SetUnitFrame('targettarget')end, + args={ + enable={type='toggle',order=1,name=L['Enable']}, + resetSettings={type='execute',order=2,name=L['Restore Defaults'],func=function(l,m)MOD:ResetUnitOptions('targettarget')SV.Mentalo:Reset('TargetTarget Frame')end}, + tabGroups={ + order=3, + type='group', + name=L['Unit Options'], + childGroups="tree", + args={ + commonGroup = { + order = 1, + type = 'group', + name = L['General Settings'], + args = { + baseGroup = { + order = 1, + type = "group", + guiInline = true, + name = L["Base Settings"], + args = { + showAuras = { + order = 1, + type = "execute", + name = L["Show Auras"], + func = function()local U = SVUI_TargetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("targettarget")end + }, + spacer1 = { + order = 2, + type = "description", + name = "", + }, + rangeCheck = { + order = 3, + name = L["Range Check"], + desc = L["Check if you are in range to cast spells on this specific unit."], + type = "toggle" + }, + hideonnpc = { + type = "toggle", + order = 4, + name = L["Text Toggle On NPC"], + desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], + get = function(l)return SV.db.SVUnit["target"]["power"].hideonnpc end, + set = function(l, m)SV.db.SVUnit["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end + }, + threatEnabled = { + type = "toggle", + order = 5, + name = L["Show Threat"] + } + } + }, + sizeGroup = { + order = 2, + guiInline = true, + type = "group", + name = L["Size Settings"], + args = { + width = { + order = 1, + name = L["Width"], + type = "range", + width = "full", + min = 50, + max = 500, + step = 1, + }, + height = { + order = 2, + name = L["Height"], + type = "range", + width = "full", + min = 10, + max = 250, + step = 1 + }, + } + } + } + }, + misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "targettarget"), + health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "targettarget"), + power = ns:SetPowerConfigGroup(nil, MOD.SetUnitFrame, "targettarget"), + name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "targettarget"), + portrait = ns:SetPortraitConfigGroup(MOD.SetUnitFrame, "targettarget"), + buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "targettarget"), + debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "targettarget"), + icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "targettarget") + } + } + } +} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/_load.xml b/Interface/AddOns/SVUI_ConfigOMatic/modules/_load.xml deleted file mode 100644 index a350879..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/_load.xml +++ /dev/null @@ -1,15 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file='map.lua'/> - <Script file='bar.lua'/> - <Script file='aura.lua'/> - <Script file='bag.lua'/> - <Script file='dock.lua'/> - <Script file='chat.lua'/> - <Script file='henchmen.lua'/> - <Script file='stat.lua'/> - <Script file='filter.lua'/> - <Script file='plate.lua'/> - <Script file='tip.lua'/> - <Include file='units\_load.xml'/> - <Script file='profiles.lua'/> -</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua deleted file mode 100644 index 995723b..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua +++ /dev/null @@ -1,318 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVAura; -local MAP = SV.SVMap; ---[[ -########################################################## -SET PACKAGE OPTIONS -########################################################## -]]-- -local auraOptionsTemplate = { - scaleGroup = { - order = 1, - guiInline = true, - type = "group", - name = L["Scale Options"], - args = { - size = { - type = "range", - name = L["Size"], - desc = L["Set the size of the individual auras."], - min = 16, - max = 60, - step = 2, - order = 1 - }, - wrapXOffset = { - order = 2, - type = "range", - name = L["Horizontal Spacing"], - min = 0, - max = 50, - step = 1 - }, - wrapYOffset = { - order = 3, - type = "range", - name = L["Vertical Spacing"], - min = 0, - max = 50, - step = 1 - }, - } - }, - layoutGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Directional Options"], - args = { - showBy = { - type = "select", - order = 1, - name = L["Growth Direction"], - desc = L["The direction the auras will grow and then the direction they will grow after they reach the wrap after limit."], - values = { - DOWN_RIGHT = format(L["%s and then %s"], L["Down"], L["Right"]), - DOWN_LEFT = format(L["%s and then %s"], L["Down"], L["Left"]), - UP_RIGHT = format(L["%s and then %s"], L["Up"], L["Right"]), - UP_LEFT = format(L["%s and then %s"], L["Up"], L["Left"]), - RIGHT_DOWN = format(L["%s and then %s"], L["Right"], L["Down"]), - RIGHT_UP = format(L["%s and then %s"], L["Right"], L["Up"]), - LEFT_DOWN = format(L["%s and then %s"], L["Left"], L["Down"]), - LEFT_UP = format(L["%s and then %s"], L["Left"], L["Up"]) - } - }, - wrapAfter = { - type = "range", - order = 2, - name = L["Wrap After"], - desc = L["Begin a new row or column after this many auras."], - min = 1, - max = 32, - step = 1 - }, - maxWraps = { - name = L["Max Wraps"], - order = 3, - desc = L["Limit the number of rows or columns."], - type = "range", - min = 1, - max = 32, - step = 1 - }, - } - }, - sortGroup = { - order = 1, - guiInline = true, - type = "group", - name = L["Sorting Options"], - args = { - sortMethod = { - order = 1, - name = L["Sort Method"], - desc = L["Defines how the group is sorted."], - type = "select", - values = { - ["INDEX"] = L["Index"], - ["TIME"] = L["Time"], - ["NAME"] = L["Name"] - } - }, - sortDir = { - order = 2, - name = L["Sort Direction"], - desc = L["Defines the sort order of the selected sort method."], - type = "select", - values = { - ["+"] = L["Ascending"], - ["-"] = L["Descending"] - } - }, - isolate = { - order = 3, - name = L["Seperate"], - desc = L["Indicate whether buffs you cast yourself should be separated before or after."], - type = "select", - values = { - [-1] = L["Other's First"], - [0] = L["No Sorting"], - [1] = L["Your Auras First"] - } - } - } - }, -} - -SV.Options.args.SVAura = { - type = "group", - name = MOD.TitleID, - childGroups = "tab", - get = function(a)return SV.db.SVAura[a[#a]]end, - set = function(a,b) - MOD:ChangeDBVar(b,a[#a]); - MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs") - MOD:UpdateAuraHeader(SVUI_PlayerDebuffs, "debuffs") - end, - args = { - intro = { - order = 1, - type = "description", - name = L["AURAS_DESC"] - }, - enable = { - order = 2, - type = "toggle", - name = L["Enable"], - get = function(a)return SV.db.SVAura.enable end, - set = function(a,b)SV.db.SVAura.enable = b;SV:StaticPopup_Show("RL_CLIENT")end - }, - disableBlizzard = { - order = 3, - type = "toggle", - name = L["Disabled Blizzard"], - get = function(a)return SV.db.SVAura.disableBlizzard end, - set = function(a,b)SV.db.SVAura.disableBlizzard = b;SV:StaticPopup_Show("RL_CLIENT")end - }, - auraGroups = { - order = 4, - type = "group", - name = L["Options"], - childGroups = "tree", - args = { - common = { - order = 10, - type = "group", - name = L["General"], - args = { - fadeBy = { - type = "range", - name = L["Fade Threshold"], - desc = L["Threshold before text changes red, goes into decimal form, and the icon will fade. Set to -1 to disable."], - min = -1, - max = 30, - step = 1, - order = 1 - }, - font = { - type = "select", - dialogControl = "LSM30_Font", - order = 2, - name = L["Font"], - values = AceGUIWidgetLSMlists.font - }, - fontSize = { - order = 3, - name = L["Font Size"], - type = "range", - min = 6, - max = 22, - step = 1 - }, - fontOutline = { - order = 4, - name = L["Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = { - ["NONE"] = L["None"], - ["OUTLINE"] = "OUTLINE", - ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", - ["THICKOUTLINE"] = "THICKOUTLINE" - } - }, - timeOffsetH = { - order = 5, - name = L["Time xOffset"], - type = "range", - min = -60, - max = 60, - step = 1 - }, - timeOffsetV = { - order = 6, - name = L["Time yOffset"], - type = "range", - min = -60, - max = 60, - step = 1 - }, - countOffsetH = { - order = 7, - name = L["Count xOffset"], - type = "range", - min = -60, - max = 60, - step = 1 - }, - countOffsetV = { - order = 8, - name = L["Count yOffset"], - type = "range", - min = -60, - max = 60, - step = 1 - } - } - }, - hyperBuffs = { - order = 20, - type = "group", - name = L["Hyper Buffs"], - get = function(b)return SV.db.SVAura.hyperBuffs[b[#b]]end, - set = function(a,b) - MOD:ChangeDBVar(b,a[#a],"hyperBuffs"); - MOD:ToggleConsolidatedBuffs(); - SV.SVMap:ReLoad(); - MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs") - end, - args = { - enable = { - order = 1, - type = "toggle", - name = L["Enable"], - desc = L["Display the consolidated buffs bar."], - disabled = function()return not SV.db.SVMap.enable end, - }, - filter = { - order = 2, - name = L["Filter Hyper"], - desc = L["Only show consolidated icons on the consolidated bar that your class/spec is interested in. This is useful for raid leading."], - type = "toggle", - disabled = function()return not SV.db.SVAura.hyperBuffs.enable end, - } - } - }, - buffs = { - order = 30, - type = "group", - name = L["Buffs"], - get = function(b)return SV.db.SVAura.buffs[b[#b]]end, - set = function(a,b)MOD:ChangeDBVar(b,a[#a],"buffs");MOD:UpdateAuraHeader(SVUI_PlayerBuffs, "buffs")end, - args = auraOptionsTemplate - }, - debuffs = { - order = 40, - type = "group", - name = L["Debuffs"], - get = function(b)return SV.db.SVAura.debuffs[b[#b]]end, - set = function(a,b)MOD:ChangeDBVar(b,a[#a],"debuffs");MOD:UpdateAuraHeader(SVUI_PlayerDebuffs, "debuffs")end, - args = auraOptionsTemplate - } - } - }, - } -} - \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua deleted file mode 100644 index ee248ce..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua +++ /dev/null @@ -1,312 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; - -local MOD = SV.SVBag - -local pointList = { - ["TOPLEFT"] = "TOPLEFT", - ["TOPRIGHT"] = "TOPRIGHT", - ["BOTTOMLEFT"] = "BOTTOMLEFT", - ["BOTTOMRIGHT"] = "BOTTOMRIGHT", -} - -SV.Options.args.SVBag = { - type = 'group', - name = MOD.TitleID, - childGroups = "tab", - get = function(a)return SV.db.SVBag[a[#a]]end, - set = function(a,b)MOD:ChangeDBVar(b,a[#a]) end, - args = { - intro = { - order = 1, - type = "description", - name = L["BAGS_DESC"] - }, - enable = { - order = 2, - type = "toggle", - name = L["Enable"], - desc = L["Enable/Disable the all-in-one bag."], - get = function(a)return SV.db.SVBag.enable end, - set = function(a,b)SV.db.SVBag.enable = b;SV:StaticPopup_Show("RL_CLIENT")end - }, - bagGroups={ - order = 3, - type = 'group', - name = L['Bag Options'], - guiInline = true, - args = { - common={ - order = 1, - type = "group", - guiInline = true, - name = L["General"], - disabled = function()return not SV.db.SVBag.enable end, - args = { - bagSize = { - order = 1, - type = "range", - name = L["Button Size (Bag)"], - desc = L["The size of the individual buttons on the bag frame."], - min = 15, - max = 45, - step = 1, - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()end - }, - bankSize = { - order = 2, - type = "range", - name = L["Button Size (Bank)"], - desc = L["The size of the individual buttons on the bank frame."], - min = 15, - max = 45, - step = 1, - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout(true)end - }, - sortInverted = { - order = 3, - type = "toggle", - name = L["Sort Inverted"], - desc = L["Direction the bag sorting will use to allocate the items."] - }, - bagWidth = { - order = 4, - type = "range", - name = L["Panel Width (Bags)"], - desc = L["Adjust the width of the bag frame."], - min = 150, - max = 700, - step = 1, - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()end, - disabled = function()return SV.db.SVBag.alignToChat end - }, - bankWidth = { - order = 5, - type = "range", - name = L["Panel Width (Bank)"], - desc = L["Adjust the width of the bank frame."], - min = 150, - max = 700, - step = 1, - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout(true)end, - disabled = function()return SV.db.SVBag.alignToChat end - }, - currencyFormat = { - order = 6, - type = "select", - name = L["Currency Format"], - desc = L["The display format of the currency icons that get displayed below the main bag. (You have to be watching a currency for this to display)"], - values = { - ["ICON"] = L["Icons Only"], - ["ICON_TEXT"] = L["Icons and Text"] - }, - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:RefreshTokens()end - }, - bagTools = { - order = 7, - type = "toggle", - name = L["Profession Tools"], - desc = L["Enable/Disable Prospecting, Disenchanting and Milling buttons on the bag frame."], - set = function(a,b)MOD:ChangeDBVar(b,a[#a])SV:StaticPopup_Show("RL_CLIENT")end - }, - ignoreItems = { - order = 100, - name = L["Ignore Items"], - desc = L["List of items to ignore when sorting. If you wish to add multiple items you must seperate the word with a comma."], - type = "input", - width = "full", - multiline = true, - set = function(a,b) SV.db.SVBag[a[#a]] = b end - } - } - }, - position = { - order = 2, - type = "group", - guiInline = true, - name = L["Bag/Bank Positioning"], - disabled = function()return not SV.db.SVBag.enable end, - args = { - alignToChat = { - order = 1, - type = "toggle", - name = L["Align To Chat"], - desc = L["Align the width of the bag frame to fit inside the chat box."], - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()MOD:Layout(true)end - }, - bags = { - order = 2, - type = "group", - name = L["Bag Position"], - guiInline = true, - get = function(key) return SV.db.SVBag.bags[key[#key]] end, - set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bags"); MOD:ModifyBags() end, - disabled = function() return not SV.db.SVBag.enable end, - args = { - point = { - order = 1, - name = L["Anchor Point"], - type = "select", - values = pointList, - }, - xOffset = { - order = 2, - type = "range", - name = L["X Offset"], - width = "full", - min = -600, - max = 600, - step = 1, - }, - yOffset = { - order = 3, - type = "range", - name = L["Y Offset"], - width = "full", - min = -600, - max = 600, - step = 1, - }, - } - }, - bank = { - order = 3, - type = "group", - name = L["Bank Position"], - guiInline = true, - get = function(key) return SV.db.SVBag.bank[key[#key]] end, - set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bank"); MOD:ModifyBags() end, - disabled = function() return not SV.db.SVBag.enable end, - args = { - point = { - order = 1, - name = L["Anchor Point"], - type = "select", - values = pointList, - }, - xOffset = { - order = 2, - type = "range", - name = L["X Offset"], - width = "full", - min = -600, - max = 600, - step = 1, - }, - yOffset = { - order = 3, - type = "range", - name = L["Y Offset"], - width = "full", - min = -600, - max = 600, - step = 1, - }, - } - }, - } - }, - - bagBar = { - order = 4, - type = "group", - name = L["Bag-Bar"], - guiInline = true, - get = function(key) return SV.db.SVBag.bagBar[key[#key]] end, - set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bagBar"); MOD:ModifyBagBar() end, - args={ - enable = { - order = 1, - type = "toggle", - name = L["Enable"], - desc = L["Enable/Disable the Bag-Bar."], - get = function() return SV.db.SVBag.bagBar.enable end, - set = function(key, value) MOD:ChangeDBVar(value, key[#key], "bagBar"); SV:StaticPopup_Show("RL_CLIENT")end - }, - mouseover = { - order = 2, - name = L["Mouse Over"], - desc = L["Hidden unless you mouse over the frame."], - type = "toggle" - }, - showBackdrop = { - order = 3, - name = L["Backdrop"], - desc = L["Show/Hide bag bar backdrop"], - type = "toggle" - }, - size = { - order = 4, - type = "range", - name = L["Button Size"], - desc = L["Set the size of your bag buttons."], - min = 24, - max = 60, - step = 1 - }, - spacing = { - order = 5, - type = "range", - name = L["Button Spacing"], - desc = L["The spacing between buttons."], - min = 1, - max = 10, - step = 1 - }, - sortDirection = { - order = 6, - type = "select", - name = L["Sort Direction"], - desc = L["The direction that the bag frames will grow from the anchor."], - values = { - ["ASCENDING"] = L["Ascending"], - ["DESCENDING"] = L["Descending"] - } - }, - showBy = { - order = 7, - type = "select", - name = L["Bar Direction"], - desc = L["The direction that the bag frames be (Horizontal or Vertical)."], - values = { - ["VERTICAL"] = L["Vertical"], - ["HORIZONTAL"] = L["Horizontal"] - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua deleted file mode 100644 index b6e59a7..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua +++ /dev/null @@ -1,799 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local SVLib = LibSuperVillain; -local L = SV.L; -local MOD = SV.SVBar; ---[[ -########################################################## -SET PACKAGE OPTIONS -########################################################## -]]-- -local bar_configs; -local function BarConfigLoader() - local b = {["TOPLEFT"] = "TOPLEFT", ["TOPRIGHT"] = "TOPRIGHT", ["BOTTOMLEFT"] = "BOTTOMLEFT", ["BOTTOMRIGHT"] = "BOTTOMRIGHT"} - for d = 1, 6 do - local name = L["Bar "]..d; - bar_configs["Bar"..d] = { - order = d, - name = name, - type = "group", - order = (d + 10), - guiInline = false, - disabled = function()return not SV.db.SVBar.enable end, - get = function(key) - return SV.db.SVBar["Bar"..d][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], "Bar"..d); - MOD:RefreshBar("Bar"..d) - end, - args = { - enable = { - order = 1, - type = "toggle", - name = L["Enable"], - }, - backdrop = { - order = 2, - name = L["Background"], - type = "toggle", - disabled = function()return not SV.db.SVBar["Bar"..d].enable end, - }, - mouseover = { - order = 3, - name = L["Mouse Over"], - desc = L["The frame is not shown unless you mouse over the frame."], - type = "toggle", - disabled = function()return not SV.db.SVBar["Bar"..d].enable end, - }, - restorePosition = { - order = 4, - type = "execute", - name = L["Restore Bar"], - desc = L["Restore the actionbars default settings"], - func = function() - SV:ResetData("SVBar", "Bar"..d) - SV.Mentalo:Reset("Bar "..d) - MOD:RefreshBar("Bar"..d) - end, - disabled = function()return not SV.db.SVBar["Bar"..d].enable end, - }, - adjustGroup = { - name = L["Bar Adjustments"], - type = "group", - order = 5, - guiInline = true, - disabled = function()return not SV.db.SVBar["Bar"..d].enable end, - args = { - point = { - order = 1, - type = "select", - name = L["Anchor Point"], - desc = L["The first button anchors itself to this point on the bar."], - values = b - }, - buttons = { - order = 2, - type = "range", - name = L["Buttons"], - desc = L["The amount of buttons to display."], - min = 1, - max = NUM_ACTIONBAR_BUTTONS, - step = 1 - }, - buttonsPerRow = { - order = 3, - type = "range", - name = L["Buttons Per Row"], - desc = L["The amount of buttons to display per row."], - min = 1, - max = NUM_ACTIONBAR_BUTTONS, - step = 1 - }, - buttonsize = { - type = "range", - name = L["Button Size"], - desc = L["The size of the action buttons."], - min = 15, - max = 60, - step = 1, - order = 4 - }, - buttonspacing = { - type = "range", - name = L["Button Spacing"], - desc = L["The spacing between buttons."], - min = 1, - max = 10, - step = 1, - order = 5 - }, - alpha = { - order = 6, - type = "range", - name = L["Alpha"], - isPercent = true, - min = 0, - max = 1, - step = 0.01 - }, - } - }, - pagingGroup = { - name = L["Bar Paging"], - type = "group", - order = 6, - guiInline = true, - disabled = function()return not SV.db.SVBar["Bar"..d].enable end, - args = { - useCustomPaging = { - order = 1, - type = "toggle", - name = L["Enable"], - desc = L["Allow the use of custom paging for this bar"], - get = function()return SV.db.SVBar["Bar"..d].useCustomPaging end, - set = function(e, f) - SV.db.SVBar["Bar"..d].useCustomPaging = f; - MOD:UpdateBarPagingDefaults(); - MOD:RefreshBar("Bar"..d) - end - }, - resetStates = { - order = 2, - type = "execute", - name = L["Restore Defaults"], - desc = L["Restore default paging attributes for this bar"], - func = function() - SV:ResetData("SVBar", "Bar"..d, "customPaging") - MOD:UpdateBarPagingDefaults(); - MOD:RefreshBar("Bar"..d) - end - }, - customPaging = { - order = 3, - type = "input", - width = "full", - name = L["Paging"], - desc = L["|cffFF0000ADVANCED:|r Set the paging attributes for this bar"], - get = function(e)return SV.db.SVBar["Bar"..d].customPaging[SV.class] end, - set = function(e, f) - SV.db.SVBar["Bar"..d].customPaging[SV.class] = f; - MOD:UpdateBarPagingDefaults(); - MOD:RefreshBar("Bar"..d) - end, - disabled = function()return not SV.db.SVBar["Bar"..d].useCustomPaging end, - }, - useCustomVisibility = { - order = 4, - type = "toggle", - name = L["Enable"], - desc = L["Allow the use of custom paging for this bar"], - get = function()return SV.db.SVBar["Bar"..d].useCustomVisibility end, - set = function(e, f) - SV.db.SVBar["Bar"..d].useCustomVisibility = f; - MOD:UpdateBarPagingDefaults(); - MOD:RefreshBar("Bar"..d) - end - }, - resetVisibility = { - order = 5, - type = "execute", - name = L["Restore Defaults"], - desc = L["Restore default visibility attributes for this bar"], - func = function() - SV:ResetData("SVBar", "Bar"..d, "customVisibility") - MOD:UpdateBarPagingDefaults(); - MOD:RefreshBar("Bar"..d) - end - }, - customVisibility = { - order = 6, - type = "input", - width = "full", - name = L["Visibility"], - desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], - get = function(e)return SV.db.SVBar["Bar"..d].customVisibility end, - set = function(e, f) - SV.db.SVBar["Bar"..d].customVisibility = f; - MOD:UpdateBarPagingDefaults(); - MOD:RefreshBar("Bar"..d) - end, - disabled = function()return not SV.db.SVBar["Bar"..d].useCustomVisibility end, - }, - - } - } - } - } - end - - bar_configs["Micro"] = { - order = d, - name = L["Micro Menu"], - type = "group", - order = 100, - guiInline = false, - disabled = function()return not SV.db.SVBar.enable end, - get = function(key) - return SV.db.SVBar["Micro"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], "Micro"); - MOD:UpdateMicroButtons() - end, - args = { - enable = { - order = 1, - type = "toggle", - name = L["Enable"] - }, - mouseover = { - order = 2, - name = L["Mouse Over"], - desc = L["The frame is not shown unless you mouse over the frame."], - disabled = function()return not SV.db.SVBar["Micro"].enable end, - type = "toggle" - }, - buttonsize = { - order = 3, - type = "range", - name = L["Button Size"], - desc = L["The size of the action buttons."], - min = 15, - max = 60, - step = 1, - disabled = function()return not SV.db.SVBar["Micro"].enable end, - }, - buttonspacing = { - order = 4, - type = "range", - name = L["Button Spacing"], - desc = L["The spacing between buttons."], - min = 1, - max = 10, - step = 1, - disabled = function()return not SV.db.SVBar["Micro"].enable end, - }, - } - }; - - bar_configs["Pet"] = { - order = d, - name = L["Pet Bar"], - type = "group", - order = 200, - guiInline = false, - disabled = function()return not SV.db.SVBar.enable end, - get = function(e)return SV.db.SVBar["Pet"][e[#e]]end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], "Pet"); - MOD:RefreshBar("Pet") - end, - args = { - enable = { - order = 1, - type = "toggle", - name = L["Enable"] - }, - backdrop = { - order = 2, - name = L["Background"], - type = "toggle", - disabled = function()return not SV.db.SVBar["Pet"].enable end, - }, - mouseover = { - order = 3, - name = L["Mouse Over"], - desc = L["The frame is not shown unless you mouse over the frame."], - type = "toggle", - disabled = function()return not SV.db.SVBar["Pet"].enable end, - }, - restorePosition = { - order = 4, - type = "execute", - name = L["Restore Bar"], - desc = L["Restore the actionbars default settings"], - func = function() - SV:ResetData("SVBar", "Pet") - SV.Mentalo:Reset("Pet Bar") - MOD:RefreshBar("Pet") - end, - disabled = function()return not SV.db.SVBar["Pet"].enable end, - }, - adjustGroup = { - name = L["Bar Adjustments"], - type = "group", - order = 5, - guiInline = true, - disabled = function()return not SV.db.SVBar["Pet"].enable end, - args = { - point = { - order = 1, - type = "select", - name = L["Anchor Point"], - desc = L["The first button anchors itself to this point on the bar."], - values = b - }, - buttons = { - order = 2, - type = "range", - name = L["Buttons"], - desc = L["The amount of buttons to display."], - min = 1, - max = NUM_PET_ACTION_SLOTS, - step = 1 - }, - buttonsPerRow = { - order = 3, - type = "range", - name = L["Buttons Per Row"], - desc = L["The amount of buttons to display per row."], - min = 1, - max = NUM_PET_ACTION_SLOTS, - step = 1 - }, - buttonsize = { - order = 4, - type = "range", - name = L["Button Size"], - desc = L["The size of the action buttons."], - min = 15, - max = 60, - step = 1, - disabled = function()return not SV.db.SVBar.enable end - }, - buttonspacing = { - order = 5, - type = "range", - name = L["Button Spacing"], - desc = L["The spacing between buttons."], - min = 1, - max = 10, - step = 1, - disabled = function()return not SV.db.SVBar.enable end - }, - alpha = { - order = 6, - type = "range", - name = L["Alpha"], - isPercent = true, - min = 0, - max = 1, - step = 0.01 - }, - } - }, - customGroup = { - name = L["Visibility Options"], - type = "group", - order = 6, - guiInline = true, - args = { - useCustomVisibility = { - order = 1, - type = "toggle", - name = L["Enable"], - desc = L["Allow the use of custom paging for this bar"], - get = function()return SV.db.SVBar["Pet"].useCustomVisibility end, - set = function(e,f) - SV.db.SVBar["Pet"].useCustomVisibility = f; - MOD:RefreshBar("Pet") - end - }, - resetVisibility = { - order = 2, - type = "execute", - name = L["Restore Defaults"], - desc = L["Restore default visibility attributes for this bar"], - func = function() - SV:ResetData("SVBar", "Pet", "customVisibility") - MOD:RefreshBar("Pet") - end - }, - customVisibility = { - order = 3, - type = "input", - width = "full", - name = L["Visibility"], - desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], - get = function(e)return SV.db.SVBar["Pet"].customVisibility end, - set = function(e,f) - SV.db.SVBar["Pet"].customVisibility = f; - MOD:RefreshBar("Pet") - end, - disabled = function()return not SV.db.SVBar["Pet"].useCustomVisibility end, - }, - } - } - } - }; - - bar_configs["Stance"] = { - order = d, - name = L["Stance Bar"], - type = "group", - order = 300, - guiInline = false, - disabled = function()return not SV.db.SVBar.enable end, - get = function(e)return SV.db.SVBar["Stance"][e[#e]]end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], "Stance"); - MOD:RefreshBar("Stance") - end, - args = { - enable = { - order = 1, - type = "toggle", - name = L["Enable"] - }, - backdrop = { - order = 2, - name = L["Background"], - type = "toggle", - disabled = function()return not SV.db.SVBar["Stance"].enable end, - }, - mouseover = { - order = 3, - name = L["Mouse Over"], - desc = L["The frame is not shown unless you mouse over the frame."], - type = "toggle", - disabled = function()return not SV.db.SVBar["Stance"].enable end, - }, - restorePosition = { - order = 4, - type = "execute", - name = L["Restore Bar"], - desc = L["Restore the actionbars default settings"], - func = function() - SVLib:SetDefault("SVBar","Stance") - SV.Mentalo:Reset("Stance Bar") - MOD:RefreshBar("Stance") - end, - disabled = function()return not SV.db.SVBar["Stance"].enable end, - }, - adjustGroup = { - name = L["Bar Adjustments"], - type = "group", - order = 5, - guiInline = true, - disabled = function()return not SV.db.SVBar["Stance"].enable end, - args = { - point = { - order = 1, - type = "select", - name = L["Anchor Point"], - desc = L["The first button anchors itself to this point on the bar."], - values = b - }, - buttons = { - order = 2, - type = "range", - name = L["Buttons"], - desc = L["The amount of buttons to display."], - min = 1, - max = NUM_STANCE_SLOTS, - step = 1 - }, - buttonsPerRow = { - order = 3, - type = "range", - name = L["Buttons Per Row"], - desc = L["The amount of buttons to display per row."], - min = 1, - max = NUM_STANCE_SLOTS, - step = 1 - }, - buttonsize = { - order = 4, - type = "range", - name = L["Button Size"], - desc = L["The size of the action buttons."], - min = 15, - max = 60, - step = 1 - }, - buttonspacing = { - order = 5, - type = "range", - name = L["Button Spacing"], - desc = L["The spacing between buttons."], - min = 1, - max = 10, - step = 1 - }, - alpha = { - order = 6, - type = "range", - name = L["Alpha"], - isPercent = true, - min = 0, - max = 1, - step = 0.01 - }, - } - }, - customGroup = { - name = L["Visibility Options"], - type = "group", - order = 6, - guiInline = true, - disabled = function()return not SV.db.SVBar["Stance"].enable end, - args = { - style = { - order = 1, - type = "select", - name = L["Style"], - desc = L["This setting will be updated upon changing stances."], - values = { - ["darkenInactive"] = L["Darken Inactive"], - ["classic"] = L["Classic"] - } - }, - spacer1 = { - order = 2, - type = "description", - name = "", - }, - spacer2 = { - order = 3, - type = "description", - name = "", - }, - useCustomVisibility = { - order = 4, - type = "toggle", - name = L["Enable"], - desc = L["Allow the use of custom paging for this bar"], - get = function()return SV.db.SVBar["Stance"].useCustomVisibility end, - set = function(e,f) - SV.db.SVBar["Stance"].useCustomVisibility = f; - MOD:RefreshBar("Stance") - end - }, - resetVisibility = { - order = 5, - type = "execute", - name = L["Restore Defaults"], - desc = L["Restore default visibility attributes for this bar"], - func = function() - SV:ResetData("SVBar", "Stance", "customVisibility") - MOD:RefreshBar("Stance") - end - }, - customVisibility = { - order = 6, - type = "input", - width = "full", - name = L["Visibility"], - desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], - get = function(e)return SV.db.SVBar["Stance"].customVisibility end, - set = function(e,f) - SV.db.SVBar["Stance"].customVisibility = f; - MOD:RefreshBar("Stance") - end, - disabled = function()return not SV.db.SVBar["Stance"].useCustomVisibility end, - }, - } - } - } - } -end - -SV.Options.args.SVBar = { - type = "group", - name = MOD.TitleID, - childGroups = "tab", - get = function(key) - return SV.db.SVBar[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshActionBars() - end, - args = { - enable = { - order = 1, - type = "toggle", - name = L["Enable"], - get = function(e)return SV.db.SVBar[e[#e]]end, - set = function(e, f)SV.db.SVBar[e[#e]] = f;SV:StaticPopup_Show("RL_CLIENT")end - }, - barGroup = { - order = 2, - type = "group", - name = L["Bar Options"], - childGroups = "tree", - disabled = function()return not SV.db.SVBar.enable end, - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - macrotext = { - type = "toggle", - name = L["Macro Text"], - desc = L["Display macro names on action buttons."], - order = 2 - }, - hotkeytext = { - type = "toggle", - name = L["Keybind Text"], - desc = L["Display bind names on action buttons."], - order = 3 - }, - keyDown = { - type = "toggle", - name = L["Key Down"], - desc = OPTION_TOOLTIP_ACTION_BUTTON_USE_KEY_DOWN, - order = 4 - }, - showGrid = { - type = "toggle", - name = ALWAYS_SHOW_MULTIBARS_TEXT, - desc = OPTION_TOOLTIP_ALWAYS_SHOW_MULTIBARS, - order = 5 - }, - unlock = { - type = "select", - width = "full", - name = PICKUP_ACTION_KEY_TEXT, - desc = L["The button you must hold down in order to drag an ability to another action button."], - order = 6, - values = { - ["SHIFT"] = SHIFT_KEY, - ["ALT"] = ALT_KEY, - ["CTRL"] = CTRL_KEY - } - }, - unc = { - type = "color", - order = 7, - name = L["Out of Range"], - desc = L["Color of the actionbutton when out of range."], - hasAlpha = true, - get = function(key) - local color = SV.db.SVBar[key[#key]] - return color[1], color[2], color[3], color[4] - end, - set = function(key, rValue, gValue, bValue, aValue) - SV.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} - MOD:RefreshActionBars() - end, - }, - unpc = { - type = "color", - order = 8, - name = L["Out of Power"], - desc = L["Color of the actionbutton when out of power (Mana, Rage, Focus, Holy Power)."], - hasAlpha = true, - get = function(key) - local color = SV.db.SVBar[key[#key]] - return color[1], color[2], color[3], color[4] - end, - set = function(key, rValue, gValue, bValue, aValue) - SV.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} - MOD:RefreshActionBars() - end, - }, - rightClickSelf = { - type = "toggle", - name = L["Self Cast"], - desc = L["Right-click any action button to self cast"], - order = 9 - } - } - }, - fontGroup = { - order = 2, - type = "group", - disabled = function()return not SV.db.SVBar.enable end, - name = L["Fonts"], - args = { - font = { - type = "select", - width = "full", - dialogControl = "LSM30_Font", - order = 1, - name = L["Font"], - values = AceGUIWidgetLSMlists.font - }, - fontSize = { - order = 2, - width = "full", - name = L["Font Size"], - type = "range", - min = 6, - max = 22, - step = 1 - }, - fontOutline = { - order = 3, - width = "full", - name = L["Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = { - ["NONE"] = L["None"], - ["OUTLINE"] = "OUTLINE", - ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", - ["THICKOUTLINE"] = "THICKOUTLINE" - } - }, - countFont = { - type = "select", - width = "full", - dialogControl = "LSM30_Font", - order = 4, - name = L["Count Font"], - values = AceGUIWidgetLSMlists.font - }, - countFontSize = { - order = 5, - width = "full", - name = L["Count Font Size"], - type = "range", - min = 6, - max = 22, - step = 1 - }, - countFontOutline = { - order = 6, - width = "full", - name = L["Count Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = { - ["NONE"] = L["None"], - ["OUTLINE"] = "OUTLINE", - ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", - ["THICKOUTLINE"] = "THICKOUTLINE" - } - }, - cooldownSize = { - order = 7, - width = "full", - name = L["Cooldown Font Size"], - type = "range", - min = 6, - max = 22, - step = 1 - }, - } - } - } - } - } -} -bar_configs = SV.Options.args.SVBar.args.barGroup.args -BarConfigLoader(); \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua deleted file mode 100644 index 490d6d0..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua +++ /dev/null @@ -1,200 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVChat; ---[[ -########################################################## -SET PACKAGE OPTIONS -########################################################## -]]-- -SV.Options.args.SVChat={ - type = "group", - name = MOD.TitleID, - get = function(a)return SV.db.SVChat[a[#a]]end, - set = function(a,b)MOD:ChangeDBVar(b,a[#a]); end, - args = { - intro = { - order = 1, - type = "description", - name = L["CHAT_DESC"] - }, - enable = { - order = 2, - type = "toggle", - name = L["Enable"], - get = function(a)return SV.db.SVChat.enable end, - set = function(a,b)SV.db.SVChat.enable = b;SV:StaticPopup_Show("RL_CLIENT")end - }, - common = { - order = 3, - type = "group", - name = L["General"], - guiInline = true, - args = { - sticky = { - order = 1, - type = "toggle", - name = L["Sticky Chat"], - desc = L["When opening the Chat Editbox to type a message having this option set means it will retain the last channel you spoke in. If this option is turned off opening the Chat Editbox should always default to the SAY channel."] - }, - url = { - order = 2, - type = "toggle", - name = L["URL Links"], - desc = L["Attempt to create URL links inside the chat."], - set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end - }, - hyperlinkHover = { - order = 3, - type = "toggle", - name = L["Hyperlink Hover"], - desc = L["Display the hyperlink tooltip while hovering over a hyperlink."], - set = function(a,b) MOD:ChangeDBVar(b,a[#a]); MOD:ToggleHyperlinks(b); end - }, - smileys = { - order = 4, - type = "toggle", - name = L["Emotion Icons"], - desc = L["Display emotion icons in chat."] - }, - tabStyled = { - order = 5, - type = "toggle", - name = L["Custom Tab Style"], - set = function(a,b) MOD:ChangeDBVar(b,a[#a]);SV:StaticPopup_Show("RL_CLIENT") end, - }, - timeStampFormat = { - order = 6, - type = "select", - name = TIMESTAMPS_LABEL, - desc = OPTION_TOOLTIP_TIMESTAMPS, - values = { - ["NONE"] = NONE, - ["%I:%M "] = "03:27", - ["%I:%M:%S "] = "03:27:32", - ["%I:%M %p "] = "03:27 PM", - ["%I:%M:%S %p "] = "03:27:32 PM", - ["%H:%M "] = "15:27", - ["%H:%M:%S "] = "15:27:32" - } - }, - psst = { - order = 7, - type = "select", - dialogControl = "LSM30_Sound", - name = L["Whisper Alert"], - disabled = function()return not SV.db.SVChat.psst end, - values = AceGUIWidgetLSMlists.sound, - set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end - }, - spacer2 = { - order = 8, - type = "description", - name = "" - }, - throttleInterval = { - order = 9, - type = "range", - name = L["Spam Interval"], - desc = L["Prevent the same messages from displaying in chat more than once within this set amount of seconds, set to zero to disable."], - min = 0, - max = 120, - step = 1, - width = "full", - set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end - }, - } - }, - fontGroup = { - order = 4, - type = "group", - guiInline = true, - name = L["Fonts"], - set = function(a,b)MOD:ChangeDBVar(b,a[#a]);MOD:RefreshChatFrames()end, - args = { - font = { - type = "select", - dialogControl = "LSM30_Font", - order = 1, - name = L["Font"], - values = AceGUIWidgetLSMlists.font - }, - fontOutline = { - order = 2, - name = L["Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = { - ["NONE"] = L["None"], - ["OUTLINE"] = "OUTLINE", - ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", - ["THINOUTLINE"] = "THINOUTLINE", - ["THICKOUTLINE"] = "THICKOUTLINE" - } - }, - fontSpacer = { - type = "description", - order = 3, - name = "", - }, - tabFont = { - type = "select", - dialogControl = "LSM30_Font", - order = 4, - name = L["Tab Font"], - values = AceGUIWidgetLSMlists.font - }, - tabFontSize = { - order = 5, - name = L["Tab Font Size"], - type = "range", - min = 6, - max = 22, - step = 1 - }, - tabFontOutline = { - order = 6, - name = L["Tab Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = { - ["NONE"] = L["None"], - ["OUTLINE"] = "OUTLINE", - ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", - ["THICKOUTLINE"] = "THICKOUTLINE" - } - } - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua deleted file mode 100644 index 9e71d08..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua +++ /dev/null @@ -1,302 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVDock -local CHAT = SV.SVChat -local BAG = SV.SVBag - -SV.Options.args.SVDock = { - type = "group", - name = MOD.TitleID, - args = {} -} - -SV.Options.args.SVDock.args["intro"] = { - order = 1, - type = "description", - name = "Configure the various frame docks around the screen" -}; - -SV.Options.args.SVDock.args["common"] = { - order = 2, - type = "group", - name = "General", - guiInline = true, - args = { - bottomPanel = { - order = 1, - type = 'toggle', - name = L['Bottom Panel'], - desc = L['Display a border across the bottom of the screen.'], - get = function(j)return SV.db.SVDock.bottomPanel end, - set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:BottomPanelVisibility()end - }, - topPanel = { - order = 2, - type = 'toggle', - name = L['Top Panel'], - desc = L['Display a border across the top of the screen.'], - get = function(j)return SV.db.SVDock.topPanel end, - set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:TopPanelVisibility()end - }, - dockStatWidth = { - order = 3, - type = "range", - name = L["Bottom Stats Width"], - desc = L["PANEL_DESC"], - min = 150, - max = 1200, - step = 1, - width = "full", - get = function()return SV.db.SVDock.dockStatWidth end, - set = function(key,value) - MOD:ChangeDBVar(value,key[#key]); - MOD:UpdateSuperDock(true) - end, - }, - } -}; - -SV.Options.args.SVDock.args["leftDockGroup"] = { - order = 3, - type = "group", - name = L["Left Dock"], - guiInline = true, - args = { - leftDockBackdrop = { - order = 1, - type = 'toggle', - name = L['Left Dock Backdrop'], - desc = L['Display a backdrop behind the left-side dock.'], - get = function(j)return SV.db.SVDock.leftDockBackdrop end, - set = function(key,value) - MOD:ChangeDBVar(value,key[#key]); - MOD:UpdateDockBackdrops() - end - }, - dockLeftHeight = { - order = 2, - type = "range", - name = L["Left Dock Height"], - desc = L["PANEL_DESC"], - min = 150, - max = 600, - step = 1, - width = "full", - get = function()return SV.db.SVDock.dockLeftHeight;end, - set = function(key,value) - MOD:ChangeDBVar(value,key[#key]); - MOD:UpdateSuperDock(true) - CHAT:RefreshChatFrames(true) - end, - }, - dockLeftWidth = { - order = 3, - type = "range", - name = L["Left Dock Width"], - desc = L["PANEL_DESC"], - min = 150, - max = 700, - step = 1, - width = "full", - get = function()return SV.db.SVDock.dockLeftWidth;end, - set = function(key,value) - MOD:ChangeDBVar(value,key[#key]); - MOD:UpdateSuperDock(true) - CHAT:RefreshChatFrames(true) - end, - }, - } - }; - -local acceptableDocklets = { - ["alDamageMeter"] = L["alDamageMeter"], - ["Skada"] = L["Skada"], - ["Recount"] = L["Recount"], - ["TinyDPS"] = L["TinyDPS"], - ["Omen"] = L["Omen"] -}; - -local function GetLiveDockletsA() - local test = SV.db.SVDock.docklets.DockletExtra; - local t = {["None"] = L["None"]}; - for n,l in pairs(acceptableDocklets) do - if IsAddOnLoaded(n) or IsAddOnLoaded(l) then - if n=="Skada" and Skada then - for index,window in pairs(Skada:GetWindows()) do - local key = window.db.name - t["Skada"..key] = (key=="Skada") and "Skada - Main" or "Skada - "..key; - end - elseif (test ~= n and test ~= l) then - t[n] = l; - end - end - end - return t; -end - -local function GetLiveDockletsB() - local test = SV.db.SVDock.docklets.DockletMain; - local t = {["None"] = L["None"]}; - for n,l in pairs(acceptableDocklets) do - if IsAddOnLoaded(n) or IsAddOnLoaded(l) then - if n=="Skada" and Skada then - for index,window in pairs(Skada:GetWindows()) do - local key = window.db.name - t["Skada"..key] = (key=="Skada") and "Skada - Main" or "Skada - "..key; - end - elseif (test ~= n and test ~= l) then - t[n] = l; - end - end - end - return t; -end - -SV.Options.args.SVDock.args["rightDockGroup"] = { - order = 4, - type = "group", - name = L["Right Dock"], - guiInline = true, - args = { - rightDockBackdrop = { - order = 1, - type = 'toggle', - name = L['Right Dock Backdrop'], - desc = L['Display a backdrop behind the right-side dock.'], - get = function(j)return SV.db.SVDock.rightDockBackdrop end, - set = function(key,value) - MOD:ChangeDBVar(value,key[#key]); - MOD:UpdateDockBackdrops() - end - }, - dockRightHeight = { - order = 2, - type = "range", - name = L["Right Dock Height"], - desc = L["PANEL_DESC"], - min = 150, - max = 600, - step = 1, - width = "full", - get = function()return SV.db.SVDock.dockRightHeight;end, - set = function(key,value) - MOD:ChangeDBVar(value,key[#key]); - MOD:UpdateSuperDock(true) - CHAT:RefreshChatFrames(true) - end, - }, - dockRightWidth = { - order = 3, - type = "range", - name = L["Right Dock Width"], - desc = L["PANEL_DESC"], - min = 150, - max = 700, - step = 1, - width = "full", - get = function()return SV.db.SVDock.dockRightWidth;end, - set = function(key,value) - MOD:ChangeDBVar(value,key[#key]); - MOD:UpdateSuperDock(true) - CHAT:RefreshChatFrames(true) - BAG:Layout() - BAG:Layout(true) - end, - }, - quest = { - order = 4, - type = "group", - name = L['Quest Watch Docklet'], - args = { - enable = { - order = 1, - type = "toggle", - name = L["Enable"], - get = function()return SV.db.general.questWatch end, - set = function(j, value) SV.db.general.questWatch = value; SV:StaticPopup_Show("RL_CLIENT") end - } - } - }, - docklets = { - order = 100, - type = 'group', - name = 'Addon Docklets', - guiInline=true, - args = { - docked = { - order=0, - type='group', - name='Docklet Settings', - guiInline=true, - args = { - DockletMain = { - type = "select", - order = 1, - name = "Primary Docklet", - desc = "Select an addon to occupy the primary docklet window", - values = function()return GetLiveDockletsA()end, - get = function()return SV.db.SVDock.docklets.DockletMain end, - set = function(a,value)SV.db.SVDock.docklets.DockletMain = value;SV:ReloadDocklets()end, - }, - DockletCombatFade = { - type = "toggle", - order = 2, - name = "Out of Combat (Hide)", - get = function()return SV.db.SVDock.docklets.DockletCombatFade end, - set = function(a,value)SV.db.SVDock.docklets.DockletCombatFade = value;end - }, - enableExtra = { - type = "toggle", - order = 3, - name = "Split Docklet", - desc = "Split the primary docklet window for 2 addons.", - get = function()return SV.db.SVDock.docklets.enableExtra end, - set = function(a,value)SV.db.SVDock.docklets.enableExtra = value;SV:ReloadDocklets()end, - }, - DockletExtra = { - type = "select", - order = 4, - name = "Secondary Docklet", - desc = "Select another addon", - disabled = function()return (not SV.db.SVDock.docklets.enableExtra or SV.db.SVDock.docklets.DockletMain == "None") end, - values = function()return GetLiveDockletsB()end, - get = function()return SV.db.SVDock.docklets.DockletExtra end, - set = function(a,value)SV.db.SVDock.docklets.DockletExtra = value;SV:ReloadDocklets()end, - } - } - } - } - } - } -}; \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua deleted file mode 100644 index a59fabb..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua +++ /dev/null @@ -1,781 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ...; -local selectedSpell,filterType,filters; -local nameMapping = { - ["CC"] = "Control Type Auras", - ["Shield"] = "Defensive Auras", - ["Player"] = "Player Only Auras", - ["Blocked"] = "Blocked Auras", - ["Allowed"] = "Always Allowed Auras", - ["Strict"] = "Specific Auras", - ["Raid"] = "Raid Buffs/Debuffs", - ["BuffWatch"] = "(AuraWatch) Player Buffs", - ["PetBuffWatch"] = "(AuraWatch) Pet Buffs", -} - -local function generateFilterOptions() - if filterType == 'AuraBar Colors' then - - SV.Options.args.filters.args.filterGroup = { - type = "group", - name = filterType, - guiInline = true, - order = 10, - args = { - addSpell = { - order = 1, - name = L["Add Spell"], - desc = L["Add a spell to the filter."], - type = "input", - guiInline = true, - get = function(e)return""end, - set = function(e, arg) - if not SV.db.media.unitframes.spellcolor[arg] then - SV.db.media.unitframes.spellcolor[arg] = false - end - generateFilterOptions() - MOD:SetUnitFrame("player") - MOD:SetUnitFrame("target") - MOD:SetUnitFrame("focus") - end - }, - removeSpell = { - order = 2, - name = L["Remove Spell"], - desc = L["Remove a spell from the filter."], - type = "input", - guiInline = true, - get = function(e)return""end, - set = function(e, arg) - if SV.db.media.unitframes.spellcolor[arg]then - SV.db.media.unitframes.spellcolor[arg] = false; - SV:AddonMessage(L["You may not remove a spell from a default filter that is not customly added. Setting spell to false instead."]) - else - SV.db.media.unitframes.spellcolor[arg] = nil - end - selectedSpell = nil; - generateFilterOptions() - MOD:SetUnitFrame("player") - MOD:SetUnitFrame("target") - MOD:SetUnitFrame("focus") - end - }, - selectSpell = { - name = L["Select Spell"], - type = "select", - order = 3, - guiInline = true, - get = function(e)return selectedSpell end, - set = function(e, arg) - selectedSpell = arg; - generateFilterOptions() - end, - values = function() - local filters = {} - filters[""] = NONE; - for g in pairs(SV.db.media.unitframes.spellcolor)do - filters[g] = g - end - return filters - end - } - } - } - - if not selectedSpell or SV.db.media.unitframes.spellcolor[selectedSpell] == nil then - SV.Options.args.filters.args.spellGroup = nil; - return - end - - SV.Options.args.filters.args.spellGroup = { - type = "group", - name = selectedSpell, - order = 15, - guiInline = true, - args = { - color = { - name = L["Color"], - type = "color", - order = 1, - get = function(e) - local abColor = SV.db.media.unitframes.spellcolor[selectedSpell] - if type(abColor) == "boolean"then - return 0, 0, 0, 1 - else - return abColor[1], abColor[2], abColor[3], abColor[4] - end - end, - set = function(e, r, g, b) - if type(SV.db.media.unitframes.spellcolor[selectedSpell]) ~= "table"then - SV.db.media.unitframes.spellcolor[selectedSpell] = {} - end - local abColor = {r, g, b} - SV.db.media.unitframes.spellcolor[selectedSpell] = abColor - MOD:SetUnitFrame("player") - MOD:SetUnitFrame("target") - MOD:SetUnitFrame("focus") - end - }, - removeColor = { - type = "execute", - order = 2, - name = L["Restore Defaults"], - func = function(e, arg) - SV.db.media.unitframes.spellcolor[selectedSpell] = false; - MOD:SetUnitFrame("player") - MOD:SetUnitFrame("target") - MOD:SetUnitFrame("focus") - end - } - } - } - - elseif filterType == 'PetBuffWatch' then - - local watchedBuffs = {} - - if not SV.db.filter.PetBuffWatch then - SV.db.filter.PetBuffWatch = {} - end - for o,f in pairs(SV.db.filter.PetBuffWatch)do - tinsert(watchedBuffs,f) - end - - SV.Options.args.filters.args.filterGroup = { - type = "group", - name = filterType, - guiInline = true, - order = -10, - childGroups = "tab", - args = { - addSpellID = { - order = 1, - name = L["Add SpellID"], - desc = L["Add a spell to the filter."], - type = "input", - get = function(e)return""end, - set = function(e, arg) - if not tonumber(arg) then - SV:AddonMessage(L["Value must be a number"]) - elseif not GetSpellInfo(arg)then - SV:AddonMessage(L["Not valid spell id"]) - else - tinsert(SV.db.filter.PetBuffWatch, {["enable"] = true, ["id"] = tonumber(arg), ["point"] = "TOPRIGHT", ["color"] = {["r"] = 1, ["g"] = 0, ["b"] = 0}, ["anyUnit"] = true}) - generateFilterOptions() - MOD:SetUnitFrame("pet") - selectedSpell = nil - end - end - }, - removeSpellID = { - order = 2, - name = L["Remove SpellID"], - desc = L["Remove a spell from the filter."], - type = "input", - get = function(e)return""end, - set = function(e, arg) - if not tonumber(arg)then - SV:AddonMessage(L["Value must be a number"]) - elseif not GetSpellInfo(arg)then - SV:AddonMessage(L["Not valid spell id"]) - else - local p; - for q, r in pairs(SV.db.filter.PetBuffWatch)do - if r["id"] == tonumber(arg)then - p = r; - if SV.db.filter.PetBuffWatch[q]then - SV.db.filter.PetBuffWatch[q].enable = false; - else - SV.db.filter.PetBuffWatch[q] = nil - end - end - end - if p == nil then - SV:AddonMessage(L["Spell not found in list."]) - else - generateFilterOptions() - end - end - selectedSpell = nil; - generateFilterOptions() - MOD:SetUnitFrame("pet") - end - }, - selectSpell = { - name = L["Select Spell"], - type = "select", - order = 3, - values = function() - local v = {} - watchedBuffs = {} - for o, f in pairs(SV.db.filter.PetBuffWatch)do - tinsert(watchedBuffs, f) - end - for o, l in pairs(watchedBuffs)do - if l.id then - local name = GetSpellInfo(l.id) - v[l.id] = name - end - end - return v - end, - get = function(e)return selectedSpell end, - set = function(e, arg)selectedSpell = arg; generateFilterOptions()end - } - } - } - - local registeredSpell; - - for t,l in pairs(SV.db.filter.PetBuffWatch)do - if l.id == selectedSpell then - registeredSpell = t - end - end - - if selectedSpell and registeredSpell then - local currentSpell = GetSpellInfo(selectedSpell) - SV.Options.args.filters.args.filterGroup.args[currentSpell] = { - name = currentSpell.." ("..selectedSpell..")", - type = "group", - get = function(e)return SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] end, - set = function(e, arg) - SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] = arg; - MOD:SetUnitFrame("pet") - end, - order = -10, - args = { - enable = { - name = L["Enable"], - order = 0, - type = "toggle" - }, - point = { - name = L["Anchor Point"], - order = 1, - type = "select", - values = { - ["TOPLEFT"] = "TOPLEFT", - ["TOPRIGHT"] = "TOPRIGHT", - ["BOTTOMLEFT"] = "BOTTOMLEFT", - ["BOTTOMRIGHT"] = "BOTTOMRIGHT", - ["LEFT"] = "LEFT", - ["RIGHT"] = "RIGHT", - ["TOP"] = "TOP", - ["BOTTOM"] = "BOTTOM" - } - }, - xOffset = {order = 2, type = "range", name = L["xOffset"], min = -75, max = 75, step = 1}, - yOffset = {order = 2, type = "range", name = L["yOffset"], min = -75, max = 75, step = 1}, - style = { - name = L["Style"], - order = 3, - type = "select", - values = {["coloredIcon"] = L["Colored Icon"], ["texturedIcon"] = L["Textured Icon"], [""] = NONE} - }, - color = { - name = L["Color"], - type = "color", - order = 4, - get = function(e) - local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] - return abColor.r, abColor.g, abColor.b, abColor.a - end, - set = function(e, i, j, k) - local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] - abColor.r, abColor.g, abColor.b = i, j, k; - MOD:SetUnitFrame("pet") - end - }, - displayText = { - name = L["Display Text"], - type = "toggle", - order = 5 - }, - textColor = { - name = L["Text Color"], - type = "color", - order = 6, - get = function(e) - local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] - if abColor then - return abColor.r,abColor.g,abColor.b,abColor.a - else - return 1,1,1,1 - end - end, - set = function(e,i,j,k) - local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] - abColor.r,abColor.g,abColor.b = i,j,k; - MOD:SetUnitFrame("pet") - end - }, - textThreshold = { - name = L["Text Threshold"], - desc = L["At what point should the text be displayed. Set to -1 to disable."], - type = "range", - order = 6, - min = -1, - max = 60, - step = 1 - }, - anyUnit = { - name = L["Show Aura From Other Players"], - order = 7, - type = "toggle" - }, - onlyShowMissing = { - name = L["Show When Not Active"], - order = 8, - type = "toggle", - disabled = function()return SV.db.filter.PetBuffWatch[registeredSpell].style == "text"end - } - } - } - end - - watchedBuffs = nil; - - elseif filterType == 'BuffWatch' then - - local watchedBuffs={} - - if not SV.db.filter.BuffWatch then - SV.db.filter.BuffWatch = {} - end - for o,f in pairs(SV.db.filter.BuffWatch) do - tinsert(watchedBuffs,f) - end - - SV.Options.args.filters.args.filterGroup = { - type = "group", - name = filterType, - guiInline = true, - order = -10, - childGroups = "tab", - args = { - addSpellID = { - order = 1, - name = L["Add SpellID"], - desc = L["Add a spell to the filter."], - type = "input", - get = function(e)return""end, - set = function(e, arg) - if not tonumber(arg)then - SV:AddonMessage(L["Value must be a number"]) - elseif not GetSpellInfo(arg)then - SV:AddonMessage(L["Not valid spell id"]) - else - tinsert(SV.db.filter.BuffWatch, {["enable"] = true, ["id"] = tonumber(arg), ["point"] = "TOPRIGHT", ["color"] = {["r"] = 1, ["g"] = 0, ["b"] = 0}, ["anyUnit"] = false}) - generateFilterOptions() - for t = 10, 40, 15 do - MOD:UpdateGroupAuraWatch("raid"..t) - end - MOD:UpdateGroupAuraWatch("party") - MOD:UpdateGroupAuraWatch("raidpet", true) - selectedSpell = nil - end - end - }, - removeSpellID = { - order = 2, - name = L["Remove SpellID"], - desc = L["Remove a spell from the filter."], - type = "input", - get = function(e)return""end, - set = function(e, arg) - if not tonumber(arg)then - SV:AddonMessage(L["Value must be a number"]) - elseif not GetSpellInfo(arg)then - SV:AddonMessage(L["Not valid spell id"]) - else - local p; - for q, r in pairs(SV.db.filter.BuffWatch)do - if r["id"] == tonumber(arg)then - p = r; - if SV.db.filter.BuffWatch[q]then - SV.db.filter.BuffWatch[q].enable = false; - else - SV.db.filter.BuffWatch[q] = nil - end - end - end - if p == nil then - SV:AddonMessage(L["Spell not found in list."]) - else - generateFilterOptions() - end - end - selectedSpell = nil; - generateFilterOptions() - for t = 10, 40, 15 do - MOD:UpdateGroupAuraWatch("raid"..t) - end - MOD:UpdateGroupAuraWatch("party") - MOD:UpdateGroupAuraWatch("raidpet", true) - end - }, - selectSpell = { - name = L["Select Spell"], - type = "select", - order = 3, - values = function() - local v = {} - watchedBuffs = {} - for o, f in pairs(SV.db.filter.BuffWatch)do - tinsert(watchedBuffs, f) - end - for o, l in pairs(watchedBuffs)do - if l.id then - local name = GetSpellInfo(l.id) - v[l.id] = name - end - end - return v - end, - get = function(e)return selectedSpell end, - set = function(e, arg)selectedSpell = arg;generateFilterOptions()end - } - } - } - local registeredSpell; - for t,l in pairs(SV.db.filter.BuffWatch)do if l.id==selectedSpell then registeredSpell=t end end - if selectedSpell and registeredSpell then - local currentSpell=GetSpellInfo(selectedSpell) - SV.Options.args.filters.args.filterGroup.args[currentSpell] = { - name = currentSpell.." ("..selectedSpell..")", - type = "group", - get = function(e)return SV.db.filter.BuffWatch[registeredSpell][e[#e]]end, - set = function(e, arg) - SV.db.filter.BuffWatch[registeredSpell][e[#e]] = arg; - for t = 10, 40, 15 do - MOD:UpdateGroupAuraWatch("raid"..t) - end - MOD:UpdateGroupAuraWatch("party") - MOD:UpdateGroupAuraWatch("raidpet", true) - end, - order = -10, - args = { - enable = {name = L["Enable"], order = 0, type = "toggle"}, - point = { - name = L["Anchor Point"], - order = 1, - type = "select", - values = { - ["TOPLEFT"] = "TOPLEFT", - ["TOPRIGHT"] = "TOPRIGHT", - ["BOTTOMLEFT"] = "BOTTOMLEFT", - ["BOTTOMRIGHT"] = "BOTTOMRIGHT", - ["LEFT"] = "LEFT", - ["RIGHT"] = "RIGHT", - ["TOP"] = "TOP", - ["BOTTOM"] = "BOTTOM" - } - }, - xOffset = {order = 2, type = "range", name = L["xOffset"], min = -75, max = 75, step = 1}, - yOffset = {order = 2, type = "range", name = L["yOffset"], min = -75, max = 75, step = 1}, - style = {name = L["Style"], order = 3, type = "select", values = {["coloredIcon"] = L["Colored Icon"], ["texturedIcon"] = L["Textured Icon"], [""] = NONE}}, - color = { - name = L["Color"], - type = "color", - order = 4, - get = function(e) - local abColor = SV.db.filter.BuffWatch[registeredSpell][e[#e]] - return abColor.r, abColor.g, abColor.b, abColor.a - end, - set = function(e, i, j, k) - local abColor = SV.db.filter.BuffWatch[registeredSpell][e[#e]] - abColor.r, abColor.g, abColor.b = i, j, k; - for t = 10, 40, 15 do - MOD:UpdateGroupAuraWatch("raid"..t) - end - MOD:UpdateGroupAuraWatch("party") - MOD:UpdateGroupAuraWatch("raidpet", true) - end - }, - displayText = { - name = L["Display Text"], - type = "toggle", - order = 5 - }, - textColor = { - name = L["Text Color"], - type = "color", - order = 6, - get = function(e) - local abColor = SV.db.filter.BuffWatch[registeredSpell][e[#e]] - if abColor then - return abColor.r, abColor.g, abColor.b, abColor.a - else - return 1, 1, 1, 1 - end - end, - set = function(e, i, j, k) - SV.db.filter.BuffWatch[registeredSpell][e[#e]] = SV.db.filter.BuffWatch[registeredSpell][e[#e]] or {} - local abColor = SV.db.filter.BuffWatch[registeredSpell][e[#e]] - abColor.r, abColor.g, abColor.b = i, j, k; - for t = 10, 40, 15 do - MOD:UpdateGroupAuraWatch("raid"..t) - end - MOD:UpdateGroupAuraWatch("party") - MOD:UpdateGroupAuraWatch("raidpet", true) - end - }, - textThreshold = { - name = L["Text Threshold"], - desc = L["At what point should the text be displayed. Set to -1 to disable."], - type = "range", - order = 6, - min = -1, - max = 60, - step = 1 - }, - anyUnit = { - name = L["Show Aura From Other Players"], - order = 7, - type = "toggle" - }, - onlyShowMissing = { - name = L["Show When Not Active"], - order = 8, - type = "toggle", - disabled = function()return SV.db.filter.BuffWatch[registeredSpell].style == "text" end - } - } - } - end - watchedBuffs=nil - else - if not filterType or not SV.db.filter[filterType]then - SV.Options.args.filters.args.filterGroup = nil; - SV.Options.args.filters.args.spellGroup = nil; - return - end - SV.Options.args.filters.args.filterGroup = { - type = "group", - name = filterType, - guiInline = true, - order = 10, - args = { - addSpell = { - order = 1, - name = L["Add Spell"], - desc = L["Add a spell to the filter."], - type = "input", - get = function(e)return""end, - set = function(e, arg) - if not SV.db.filter[filterType][arg]then - SV.db.filter[filterType][arg] = { - ["enable"] = true, - ["priority"] = 0 - } - end - generateFilterOptions() - MOD:RefreshUnitFrames() - end - }, - removeSpell = { - order = 2, - name = L["Remove Spell"], - desc = L["Remove a spell from the filter."], - type = "input", - get = function(e)return""end, - set = function(e, arg) - if SV.db.filter[filterType] then - if SV.db.filter[filterType][arg] then - SV.db.filter[filterType][arg].enable = false; - SV:AddonMessage(L["You may not remove a spell from a default filter that is not customly added. Setting spell to false instead."]) - else - SV.db.filter[filterType][arg] = nil - end - else - SV.db.filter[filterType][arg] = nil - end - generateFilterOptions() - MOD:RefreshUnitFrames() - end - }, - selectSpell = { - name = L["Select Spell"], - type = "select", - order = 3, - guiInline = true, - get = function(e)return selectedSpell end, - set = function(e, arg) - selectedSpell = arg; - generateFilterOptions() - end, - values = function() - local filters = {} - local list = SV.db.filter[filterType] - filters[""] = NONE; - for g in pairs(list)do - filters[g] = g - end - return filters - end - } - } - } - - if not selectedSpell or not SV.db.filter[filterType][selectedSpell] then - SV.Options.args.filters.args.spellGroup = nil; - return - end - - SV.Options.args.filters.args.spellGroup = { - type = "group", - name = selectedSpell, - order = 15, - guiInline = true, - args = { - enable = { - name = L["Enable"], - type = "toggle", - get = function() - if selectedFolder or not selectedSpell then - return false - else - return SV.db.filter[filterType][selectedSpell].enable - end - end, - set = function(e, arg) - SV.db.filter[filterType][selectedSpell].enable = arg; - generateFilterOptions() - MOD:RefreshUnitFrames() - end - }, - priority = { - name = L["Priority"], - type = "range", - get = function() - if selectedFolder or not selectedSpell then - return 0 - else - return SV.db.filter[filterType][selectedSpell].priority - end - end, - set = function(e, arg) - SV.db.filter[filterType][selectedSpell].priority = arg; - generateFilterOptions() - MOD:RefreshUnitFrames() - end, - min = 0, - max = 99, - step = 1, - desc = L["Set the priority order of the spell, please note that prioritys are only used for the raid debuff package, not the standard buff/debuff package. If you want to disable set to zero."] - } - } - } - end - MOD:RefreshUnitFrames() - collectgarbage("collect") -end -SV.Options.args.filters = { - type = "group", - name = L["Filters"], - order = -10, - args = { - createFilter = { - order = 1, - name = L["Create Filter"], - desc = L["Create a filter, once created a filter can be set inside the buffs/debuffs section of each unit."], - type = "input", - get = function(e)return""end, - set = function(e, arg) - SV.db.filter[arg] = {} - SV.db.filter[arg]["spells"] = {} - end - }, - deleteFilter = { - type = "select", - order = 2, - name = L["Delete Filter"], - desc = L["Delete a created filter, you cannot delete pre-existing filters, only custom ones."], - get = function(e)return""end, - set = function(e, arg) - if SV.db.filter[arg] then - SV:AddonMessage(L["You can't remove a pre-existing filter."]) - else - SV.db.filter[arg] = nil; - filterType = nil; - selectedSpell = nil; - SV.Options.args.filters.args.filterGroup = nil - end - end, - values = function() - filters = {} - filters[""] = NONE; - for g in pairs(SV.db.filter) do - filters[g] = nameMapping[g] or g - end - return filters - end - }, - selectFilter = { - order = 3, - type = "select", - name = L["Select Filter"], - get = function(e)return filterType end, - set = function(e, arg) - if arg == "" then - filterType = nil; - selectedSpell = nil - else - filterType = arg - end - generateFilterOptions() - end, - values = function() - filters = {} - filters[""] = NONE; - for g in pairs(SV.db.filter) do - filters[g] = nameMapping[g] or g - end - filters["AuraBar Colors"] = "AuraBar Colors" - return filters - end - } - } -} - - -function ns:SetToFilterConfig(newFilter) - filterType = newFilter or "BuffWatch" - generateFilterOptions() - LibStub("AceConfigDialog-3.0"):SelectGroup(SV.NameID, "filters") -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua deleted file mode 100644 index ae30fcd..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua +++ /dev/null @@ -1,186 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVHenchmen; ---[[ -########################################################## -SET PACKAGE OPTIONS -########################################################## -]]-- -SV.Options.args.SVHenchmen={ - type = "group", - name = MOD.TitleID, - get = function(a)return SV.db.SVHenchmen[a[#a]]end, - set = function(a,b)MOD:ChangeDBVar(b,a[#a]); end, - args = { - intro = { - order = 1, - type = "description", - name = L["Adjust the behavior and features that your henchmen will use."] - }, - common = { - order = 2, - type = "group", - name = L["General"], - guiInline = true, - args = { - automationGroup1 = { - order = 1, - type = "group", - guiInline = true, - name = L["Task Minions"], - desc = L['Minions that can make certain tasks easier by handling them automatically.'], - args = { - mailOpener = { - order = 1, - type = 'toggle', - name = L["Enable Mail Helper"], - get = function(j)return SV.db.SVHenchmen.mailOpener end, - set = function(j,value)SV.db.SVHenchmen.mailOpener = value;MOD:ToggleMailMinions()end - }, - autoAcceptInvite = { - order = 2, - name = L['Accept Invites'], - desc = L['Automatically accept invites from guild/friends.'], - type = 'toggle', - get = function(j)return SV.db.SVHenchmen.autoAcceptInvite end, - set = function(j,value)SV.db.SVHenchmen.autoAcceptInvite = value end - }, - vendorGrays = { - order = 3, - name = L['Vendor Grays'], - desc = L['Automatically vendor gray items when visiting a vendor.'], - type = 'toggle', - get = function(j)return SV.db.SVHenchmen.vendorGrays end, - set = function(j,value)SV.db.SVHenchmen.vendorGrays = value end - }, - autoRoll = { - order = 4, - name = L['Auto Greed/DE'], - desc = L['Automatically select greed or disenchant (when available) on green quality items. This will only work if you are the max level.'], - type = 'toggle', - get = function(j)return SV.db.SVHenchmen.autoRoll end, - set = function(j,value)SV.db.SVHenchmen.autoRoll = value end, - disabled = function()return not SV.db.SVOverride.lootRoll end - }, - pvpautorelease = { - order = 5, - type = "toggle", - name = L['PvP Autorelease'], - desc = L['Automatically release body when killed inside a battleground.'], - get = function(j)return SV.db.SVHenchmen.pvpautorelease end, - set = function(j,value)SV.db.SVHenchmen.pvpautorelease = value;SV:StaticPopup_Show("RL_CLIENT")end - }, - autorepchange = { - order = 6, - type = "toggle", - name = L['Track Reputation'], - desc = L['Automatically change your watched faction on the reputation bar to the faction you got reputation points for.'], - get = function(j)return SV.db.SVHenchmen.autorepchange end, - set = function(j,value)SV.db.SVHenchmen.autorepchange = value end - }, - skipcinematics = { - order = 7, - type = "toggle", - name = L['Skip Cinematics'], - desc = L['Automatically skip any cinematic sequences.'], - get = function(j)return SV.db.SVHenchmen.skipcinematics end, - set = function(j,value)SV.db.SVHenchmen.skipcinematics = value;SV:StaticPopup_Show("RL_CLIENT") end - }, - autoRepair = { - order = 8, - name = L['Auto Repair'], - desc = L['Automatically repair using the following method when visiting a merchant.'], - type = 'select', - values = { - ['NONE'] = NONE, - ['GUILD'] = GUILD, - ['PLAYER'] = PLAYER - }, - get = function(j)return SV.db.SVHenchmen.autoRepair end, - set = function(j,value)SV.db.SVHenchmen.autoRepair = value end - }, - } - }, - automationGroup2 = { - order = 2, - type = "group", - guiInline = true, - name = L["Quest Minions"], - desc = L['Minions that can make questing easier by automatically accepting/completing quests.'], - args = { - autoquestaccept = { - order = 1, - type = "toggle", - name = L['Accept Quests'], - desc = L['Automatically accepts quests as they are presented to you.'], - get = function(j)return SV.db.SVHenchmen.autoquestaccept end, - set = function(j,value) SV.db.SVHenchmen.autoquestaccept = value end - }, - autoquestcomplete = { - order = 2, - type = "toggle", - name = L['Complete Quests'], - desc = L['Automatically complete quests when possible.'], - get = function(j)return SV.db.SVHenchmen.autoquestcomplete end, - set = function(j,value)SV.db.SVHenchmen.autoquestcomplete = value end - }, - autoquestreward = { - order = 3, - type = "toggle", - name = L['Select Quest Reward'], - desc = L['Automatically select the quest reward with the highest vendor sell value.'], - get = function(j)return SV.db.SVHenchmen.autoquestreward end, - set = function(j,value)SV.db.SVHenchmen.autoquestreward = value end - }, - autodailyquests = { - order = 4, - type = "toggle", - name = L['Only Automate Dailies'], - desc = L['Force the auto accept functions to only respond to daily quests. NOTE: This does not apply to daily heroics for some reason.'], - get = function(j)return SV.db.SVHenchmen.autodailyquests end, - set = function(j,value)SV.db.SVHenchmen.autodailyquests = value end - }, - autopvpquests = { - order = 5, - type = "toggle", - name = L['Accept PVP Quests'], - get = function(j)return SV.db.SVHenchmen.autopvpquests end, - set = function(j,value)SV.db.SVHenchmen.autopvpquests = value end - }, - } - }, - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua deleted file mode 100644 index 8a5a340..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua +++ /dev/null @@ -1,239 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVMap ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- -local textSelect = { - ['HIDE'] = L['Hide This'], - ['CUSTOM'] = L['Use Custom Style'], - ['SIMPLE'] = L['Use Simple Style'] -}; -local colorSelect = { - ['light'] = L['Light'], - ['dark'] = L['Dark'], - ['class'] = L['Class'] -}; ---[[ -########################################################## -OPTIONS TABLE -########################################################## -]]-- -SV.Options.args.SVMap = { - type = 'group', - childGroups = "tree", - name = MOD.TitleID, - get = function(a)return SV.db.SVMap[a[#a]]end, - set = function(a,b)MOD:ChangeDBVar(b,a[#a]);MOD:ReLoad()end, - args={ - intro={ - order = 1, - type = 'description', - name = L["Options for the Minimap"] - }, - enable={ - type = "toggle", - order = 2, - name = L['Enable'], - desc = L['Enable/Disable the Custom Minimap.'], - get = function(a)return SV.db.SVMap.enable end, - set = function(a,b)SV.db.SVMap.enable=b; SV:StaticPopup_Show("RL_CLIENT") end - }, - common = { - order = 3, - type = "group", - name = MINIMAP_LABEL, - desc = L['General display settings'], - guiInline = true, - disabled = function()return not SV.db.SVMap.enable end, - args = { - size = { - order = 1, - type = "range", - name = L["Size"], - desc = L['Adjust the size of the minimap.'], - min = 120, - max = 240, - width = "full", - step = 1 - }, - bordersize = { - order = 2, - type = "range", - name = "Border Size", - desc = "Adjust the size of the minimap's outer border", - min = 0, - max = 20, - step = 1, - width = "full" - }, - bordercolor = { - order = 3, - type = 'select', - name = "Border Color", - desc = "Adjust the color of the minimap's outer border", - values = colorSelect, - }, - customshape = { - order = 4, - type = "toggle", - name = "Custom Shape", - desc = "Toggle the use of either rectangular or square minimap.", - } - } - }, - spacer1 = { - order = 4, - type = "group", - name = "", - guiInline = true, - args = {} - }, - common2 = { - order = 5, - type = "group", - name = "Labels and Info", - desc = L['Configure various minimap texts'], - guiInline = true, - disabled = function()return not SV.db.SVMap.enable end, - args = { - locationText = { - order = 1, - type = "select", - name = L["Location Text"], - values = textSelect, - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:ReLoad()end - }, - playercoords = { - order = 2, - type = "select", - name = L["Player Coords"], - values = textSelect, - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:ReLoad()end - } - } - }, - spacer2 = { - order = 6, - type = "group", - name = "", - guiInline = true, - args = {} - }, - mmButtons = { - order = 7, - type = "group", - name = "Minimap Buttons", - get = function(j)return SV.db.SVMap.minimapbar[j[#j]]end, - guiInline = true, - disabled = function()return not SV.db.SVMap.enable end, - args = { - enable = { - order = 1, - type = 'toggle', - name = L['Buttons Styled'], - desc = L['Style the minimap buttons.'], - set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")SV:StaticPopup_Show("RL_CLIENT")end, - }, - mouseover = { - order = 2, - name = L["Mouse Over"], - desc = L["Hidden unless you mouse over the frame."], - type = "toggle", - set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")MOD:UpdateMinimapButtonSettings()end, - }, - styleType = { - order = 3, - type = 'select', - name = L['Button Bar Layout'], - desc = L['Change settings for how the minimap buttons are styled.'], - set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")MOD:UpdateMinimapButtonSettings()end, - disabled = function()return not SV.db.SVMap.minimapbar.enable end, - values = { - ['NOANCHOR'] = L['No Anchor Bar'], - ['HORIZONTAL'] = L['Horizontal Anchor Bar'], - ['VERTICAL'] = L['Vertical Anchor Bar'] - } - }, - buttonSize = { - order = 4, - type = 'range', - name = L['Buttons Size'], - desc = L['The size of the minimap buttons.'], - min = 16, - max = 40, - step = 1, - width = "full", - set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")MOD:UpdateMinimapButtonSettings()end, - disabled = function()return not SV.db.SVMap.minimapbar.enable or SV.db.SVMap.minimapbar.styleType == 'NOANCHOR'end - }, - } - }, - spacer3 = { - order = 8, - type = "group", - name = "", - guiInline = true, - args = {} - }, - worldMap = { - order = 9, - type = "group", - name = "WorldMap", - guiInline = true, - args = { - tinyWorldMap = { - order = 1, - type = "toggle", - name = L["Tiny Map"], - desc = L["Don't scale the large world map to block out sides of the screen."], - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:ReLoad()end - }, - mapAlpha = { - order = 2, - name = L['Map Alpha While Moving'], - desc = L['Controls what the transparency of the worldmap will be set to when you are moving.'], - type = 'range', - isPercent = true, - min = 0, - max = 1, - step = 0.01, - set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:ReLoad()end - }, - } - }, - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua deleted file mode 100644 index 3f5e41c..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua +++ /dev/null @@ -1,736 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVPlate; -local _, ns = ...; ---[[ -########################################################## -SET PACKAGE OPTIONS -########################################################## -]]-- -local positionTable = { - TOPLEFT = "TOPLEFT", - LEFT = "LEFT", - BOTTOMLEFT = "BOTTOMLEFT", - RIGHT = "RIGHT", - TOPRIGHT = "TOPRIGHT", - BOTTOMRIGHT = "BOTTOMRIGHT", - CENTER = "CENTER", - TOP = "TOP", - BOTTOM = "BOTTOM", - RIGHTTOP = "RIGHTTOP", - LEFTTOP = "LEFTTOP", - RIGHTBOTTOM = "RIGHTBOTTOM", - LEFTBOTTOM = "LEFTBOTTOM" -}; - -local activeFilter,filters; - -local function UpdateFilterGroupOptions() - if not activeFilter or not SV.db['SVPlate']['filter'][activeFilter] then - SV.Options.args.SVPlate.args.filters.args.filterGroup=nil; - return - end - SV.Options.args.SVPlate.args.filters.args.filterGroup = { - type = "group", - name = activeFilter, - guiInline = true, - order = -10, - get = function(d)return SV.db["SVPlate"]["filter"][activeFilter][d[#d]] end, - set = function(d,e) - SV.db["SVPlate"]["filter"][activeFilter][d[#d]] = e; - MOD:PlateIteration("AssertFiltering") - MOD:UpdateAllPlates() - UpdateFilterGroupOptions() - end, - args = { - enable = { - type = "toggle", - order = 1, - name = L["Enable"], - desc = L["Use this filter."] - }, - hide = { - type = "toggle", - order = 2, - name = L["Hide"], - desc = L["Prevent any nameplate with this unit name from showing."] - }, - customColor = { - type = "toggle", - order = 3, - name = L["Custom Color"], - desc = L["Disable threat coloring for this plate and use the custom color."] - }, - color = { - type = "color", - order = 4, - name = L["Color"], - get = function(key) - local color = SV.db["SVPlate"]["filter"][activeFilter][key[#key]] - if color then - return color[1],color[2],color[3],color[4] - end - end, - set = function(key,r,g,b) - SV.db["SVPlate"]["filter"][activeFilter][key[#key]] = {} - local color = SV.db["SVPlate"]["filter"][activeFilter][key[#key]] - if color then - color = {r,g,b}; - UpdateFilterGroupOptions() - MOD:PlateIteration("CheckFilterAndHealers") - MOD:UpdateAllPlates() - end - end - }, - customScale = { - type = "range", - name = L["Custom Scale"], - desc = L["Set the scale of the nameplate."], - min = 0.67, - max = 2, - step = 0.01 - } - } - } -end - -SV.Options.args.SVPlate = { - type = "group", - name = MOD.TitleID, - childGroups = "tab", - args = { - commonGroup = { - order = 1, - type = 'group', - name = L['NamePlate Options'], - childGroups = "tree", - args = { - intro = {order = 1, type = "description", name = L["NAMEPLATE_DESC"]}, - enable={ - order=2,type="toggle",name=L["Enable"], - get=function(d)return SV.db.SVPlate[d[#d]]end, - set=function(d,e)SV.db.SVPlate[d[#d]]=e;SV:StaticPopup_Show("RL_CLIENT")end, - }, - common = { - order = 1, - type = "group", - name = L["General"], - get = function(d)return SV.db.SVPlate[d[#d]]end, - set = function(d,e)MOD:ChangeDBVar(e,d[#d]);MOD:UpdateAllPlates() end, - disabled = function()return not SV.db.SVPlate.enable end, - args = { - combatHide = { - type = "toggle", - order = 1, - name = L["Combat Toggle"], - desc = L["Toggle the nameplates to be visible outside of combat and visible inside combat."], - set = function(d,e)MOD:ChangeDBVar(e,d[#d])MOD:CombatToggle()end - }, - comboPoints = { - type = "toggle", - order = 2, - name = L["Combo Points"], - desc = L["Display combo points on nameplates."] - }, - colorNameByValue = { - type = "toggle", - order = 3, - name = L["Color Name By Health Value"] - }, - targetcount = { - type = "toggle", - order = 4, - name = L["Target Count"], - desc = L["Display the number of party / raid members targetting the nameplate unit."] - }, - showthreat = { - type = "toggle", - order = 5, - name = L["Threat Text"], - desc = L["Display threat level as text on targeted, boss or mouseover nameplate."] - }, - nonTargetAlpha = { - type = "range", - order = 6, - name = L["Non-Target Alpha"], - desc = L["Alpha of nameplates that are not your current target."], - min = 0, - max = 1, - step = 0.01, - isPercent = true - }, - fontGroup = { - order = 100, - type = "group", - guiInline = true, - name = L["Fonts"], - args = { - font = { - type = "select", - dialogControl = "LSM30_Font", - order = 4, - name = L["Font"], - values = AceGUIWidgetLSMlists.font - }, - fontSize = { - order = 5, - name = L["Font Size"], - type = "range", - min = 6, - max = 22, - step = 1 - }, - fontOutline = { - order = 6, - name = L["Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = { - ["NONE"] = L["None"], - ["OUTLINE"] = "OUTLINE", - ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", - ["THICKOUTLINE"] = "THICKOUTLINE" - } - } - } - }, - reactions = { - order = 200, - type = "group", - name = L["Reaction Coloring"], - guiInline = true, - get = function(key) - local color = SV.db.SVPlate.reactions[key[#key]] - if color then - return color[1],color[2],color[3],color[4] - end - end, - set = function(key,r,g,b) - local color = {r,g,b} - MOD:ChangeDBVar(color, key[#key], "reactions") - MOD:UpdateAllPlates() - end, - args = { - friendlyNPC = { - type = "color", - order = 1, - name = L["Friendly NPC"], - hasAlpha = false - }, - friendlyPlayer = { - name = L["Friendly Player"], - order = 2, - type = "color", - hasAlpha = false - }, - neutral = { - name = L["Neutral"], - order = 3, - type = "color", - hasAlpha = false - }, - enemy = { - name = L["Enemy"], - order = 4, - type = "color", - hasAlpha = false - }, - tapped = { - name = L["Tagged NPC"], - order = 5, - type = "color", - hasAlpha = false - } - } - }, - } - }, - healthBar = { - type = "group", - order = 2, - name = L["Health Bar"], - disabled = function()return not SV.db.SVPlate.enable end, - get = function(d)return SV.db.SVPlate.healthBar[d[#d]]end, - set = function(d,e)MOD:ChangeDBVar(e,d[#d],"healthBar");MOD:UpdateAllPlates()end, - args = { - width = { - type = "range", - order = 1, - name = L["Width"], - desc = L["Controls the width of the nameplate"], - type = "range", - min = 50, - max = 125, - step = 1 - }, - height = { - type = "range", - order = 2, - name = L["Height"], - desc = L["Controls the height of the nameplate"], - type = "range", - min = 4, - max = 30, - step = 1 - }, - lowThreshold = { - type = "range", - order = 3, - name = L["Low Health Threshold"], - desc = L["Color the border of the nameplate yellow when it reaches this point,it will be colored red when it reaches half this value."], - isPercent = true, - min = 0, - max = 1, - step = 0.01 - }, - fontGroup = { - order = 4, - type = "group", - name = L["Fonts"], - guiInline = true, - get = function(d)return SV.db.SVPlate.healthBar.text[d[#d]]end, - set = function(d,e)MOD:ChangeDBVar(e,d[#d],"healthBar","text");MOD:UpdateAllPlates()end, - args = { - enable = { - type = "toggle", - name = L["Enable"], - order = 1 - }, - attachTo = { - type = "select", - order = 2, - name = L["Attach To"], - values = { - TOPLEFT = "TOPLEFT", - LEFT = "LEFT", - BOTTOMLEFT = "BOTTOMLEFT", - RIGHT = "RIGHT", - TOPRIGHT = "TOPRIGHT", - BOTTOMRIGHT = "BOTTOMRIGHT", - CENTER = "CENTER", - TOP = "TOP", - BOTTOM = "BOTTOM" - } - }, - format = { - type = "select", - order = 3, - name = L["Format"], - values = { - ["CURRENT_MAX_PERCENT"] = L["Current - Max | Percent"], - ["CURRENT_PERCENT"] = L["Current - Percent"], - ["CURRENT_MAX"] = L["Current - Max"], - ["CURRENT"] = L["Current"], - ["PERCENT"] = L["Percent"], - ["DEFICIT"] = L["Deficit"] - } - }, - xOffset = { - type = "range", - order = 4, - name = L["X-Offset"], - min = -150, - max = 150, - step = 1 - }, - yOffset = { - type = "range", - order = 5, - name = L["Y-Offset"], - min = -150, - max = 150, - step = 1 - } - } - } - } - }, - castBar = { - type = "group", - order = 3, - name = L["Cast Bar"], - disabled = function()return not SV.db.SVPlate.enable end, - get = function(d)return SV.db.SVPlate.castBar[d[#d]]end, - set = function(d,e)MOD:ChangeDBVar(e,d[#d],"castBar");MOD:UpdateAllPlates()end, - args = { - height = { - type = "range", - order = 1, - name = L["Height"], - type = "range", - min = 4, - max = 30, - step = 1 - }, - colors = { - order = 100, - type = "group", - name = L["Colors"], - guiInline = true, - get = function(key) - local color = SV.db.SVPlate.castBar[key[#key]] - if color then - return color[1],color[2],color[3],color[4] - end - end, - set = function(key,r,g,b) - local color = {r,g,b} - MOD:ChangeDBVar(color, key[#key], "castBar") - MOD:UpdateAllPlates() - end, - args = { - color = { - type = "color", - order = 1, - name = L["Can Interrupt"], - hasAlpha = false - }, - noInterrupt = { - name = "No Interrupt", - order = 2, - type = "color", - hasAlpha = false - } - } - } - } - }, - pointer = { - type = "group", - order = 4, - name = L["Target Indicator"], - get = function(d)return SV.db.SVPlate.pointer[d[#d]]end, - set = function(d,e)MOD:ChangeDBVar(e,d[#d],"pointer");WorldFrame.elapsed = 3;MOD:UpdateAllPlates()end, - args = { - enable = { - order = 1, - type = "toggle", - name = L["Enable"] - }, - colorMatchHealthBar = { - order = 2, - type = "toggle", - name = L["Color By Healthbar"], - desc = L["Match the color of the healthbar."], - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], "pointer"); - if value then - WorldFrame.elapsed = 3 - end - end - }, - color = { - type = "color", - name = L["Color"], - order = 3, - disabled = function()return SV.db.SVPlate.pointer.colorMatchHealthBar end, - get = function(key) - local color = SV.db.SVPlate.pointer[key[#key]] - if color then - return color[1],color[2],color[3],color[4] - end - end, - set = function(key,r,g,b) - local color = {r,g,b} - MOD:ChangeDBVar(color, key[#key], "pointer") - MOD:UpdateAllPlates() - end, - } - } - }, - raidHealIcon = { - type = "group", - order = 5, - name = L["Raid Icon"], - get = function(d)return SV.db.SVPlate.raidHealIcon[d[#d]]end, - set = function(d,e)MOD:ChangeDBVar(e,d[#d],"raidHealIcon")MOD:UpdateAllPlates()end, - args = { - attachTo = { - type = "select", - order = 1, - name = L["Attach To"], - values = positionTable - }, - xOffset = { - type = "range", - order = 2, - name = L["X-Offset"], - min = -150, - max = 150, - step = 1 - }, - yOffset = { - type = "range", - order = 3, - name = L["Y-Offset"], - min = -150, - max = 150, - step = 1 - }, - size = { - order = 4, - type = "range", - name = L["Size"], - width = "full", - min = 10, - max = 200, - step = 1 - }, - } - }, - auras = { - type = "group", - order = 4, - name = L["Auras"], - get = function(d)return SV.db.SVPlate.auras[d[#d]]end, - set = function(d,e)MOD:ChangeDBVar(e,d[#d],"auras")MOD:UpdateAllPlates()end, - args = { - numAuras = { - type = "range", - order = 1, - name = L["Number of Auras"], - min = 2, - max = 8, - step = 1 - }, - additionalFilter = { - type = "select", - order = 2, - name = L["Additional Filter"], - values = function() - filters = {} - filters[""] = NONE; - for j in pairs(SV.db.filter) do - filters[j] = j - end - return filters - end - }, - configureButton = { - order = 4, - name = L["Configure Selected Filter"], - type = "execute", - width = "full", - func = function()ns:SetToFilterConfig(SV.db.SVPlate.auras.additionalFilter)end - }, - fontGroup = { - order = 100, - type = "group", - guiInline = true, - name = L["Fonts"], - args = { - font = { - type = "select", - dialogControl = "LSM30_Font", - order = 4, - name = L["Font"], - values = AceGUIWidgetLSMlists.font - }, - fontSize = { - order = 5, - name = L["Font Size"], - type = "range", - min = 6, - max = 22, - step = 1 - }, - fontOutline = { - order = 6, - name = L["Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = { - ["NONE"] = L["None"], - ["OUTLINE"] = "OUTLINE", - ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", - ["THICKOUTLINE"] = "THICKOUTLINE" - } - } - } - } - } - }, - threat = { - type = "group", - order = 6, - name = L["Threat"], - get = function(d)return SV.db.SVPlate.threat[d[#d]]end, - set = function(d,e)MOD:ChangeDBVar(e,d[#d],"threat")MOD:UpdateAllPlates()end, - args = { - enable = { - type = "toggle", - order = 1, - name = L["Enable"] - }, - scaling = { - type = "group", - name = L["Scaling"], - guiInline = true, - order = 2, - args = { - goodScale = { - type = "range", - name = L["Good"], - order = 1, - min = 0.5, - max = 1.5, - step = 0.01, - isPercent = true - }, - badScale = { - type = "range", - name = L["Bad"], - order = 1, - min = 0.5, - max = 1.5, - step = 0.01, - isPercent = true - } - } - }, - colors = { - order = 3, - type = "group", - name = L["Colors"], - guiInline = true, - get = function(key) - local color = SV.db.SVPlate.threat[key[#key]] - if color then - return color[1],color[2],color[3],color[4] - end - end, - set = function(key,r,g,b) - local color = {r,g,b} - MOD:ChangeDBVar(color, key[#key], "threat") - MOD:UpdateAllPlates() - end, - args = { - goodColor = { - type = "color", - order = 1, - name = L["Good"], - hasAlpha = false - }, - badColor = { - name = L["Bad"], - order = 2, - type = "color", - hasAlpha = false - }, - goodTransitionColor = { - name = L["Good Transition"], - order = 3, - type = "color", - hasAlpha = false - }, - badTransitionColor = { - name = L["Bad Transition"], - order = 4, - type = "color", - hasAlpha = false - } - } - } - } - }, - filters = { - type = "group", - order = 200, - name = L["Filters"], - disabled = function()return not SV.db.SVPlate.enable end, - args = { - addname = { - type = "input", - order = 1, - name = L["Add Name"], - get = function(d)return""end, - set = function(d,e) - if SV.db["SVPlate"]["filter"][e]then - SV:AddonMessage(L["Filter already exists!"]) - return - end - SV.db["SVPlate"]["filter"][e] = { - ["enable"] = true, - ["hide"] = false, - ["customColor"] = false, - ["customScale"] = 1, - ["color"] = { - g = 104/255, - h = 138/255, - i = 217/255 - } - } - UpdateFilterGroupOptions() - MOD:UpdateAllPlates() - end - }, - deletename = { - type = "input", - order = 2, - name = L["Remove Name"], - get = function(d)return""end, - set = function(d,e) - if G["SVPlate"]["filter"][e]then - SV.db["SVPlate"]["filter"][e].enable = false; - SV:AddonMessage(L["You can't remove a default name from the filter,disabling the name."]) - else - SV.db["SVPlate"]["filter"][e] = nil; - SV.Options.args.SVPlate.args.filters.args.filterGroup = nil - end - UpdateFilterGroupOptions() - MOD:UpdateAllPlates() - end - }, - selectFilter = { - order = 3, - type = "select", - name = L["Select Filter"], - get = function(d)return activeFilter end, - set = function(d,e)activeFilter = e;UpdateFilterGroupOptions()end, - values = function() - filters = {} - if(SV.db["SVPlate"]["filter"]) then - for j in pairs(SV.db["SVPlate"]["filter"])do - filters[j] = j - end - end - return filters - end - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua deleted file mode 100644 index d19affc..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua +++ /dev/null @@ -1,144 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local SVLib = LibSuperVillain; -local L = SV.L; - -local playerRealm = GetRealmName() -local playerName = UnitName("player") -local profileKey = ("%s - %s"):format(playerName, playerRealm) - -SV.Options.args.profiles = { - order = 9999, - type = "group", - name = L["profiles"], - childGroups = "tab", - args = { - desc = { - order = 1, - type = "description", - name = L["intro"] .. "\n", - }, - spacer1 = { - order = 2, - type = "description", - name = "", - width = "full", - }, - importdesc = { - order = 3, - type = "description", - name = "\n" .. L["import_desc"], - width = "full" - }, - save = { - order = 4, - type = "execute", - name = SAVE, - desc = function() return SAVE .. " " .. L["current"] .. " " .. NORMAL_FONT_COLOR_CODE .. profileKey .. FONT_COLOR_CODE_CLOSE end, - func = function() SVLib:ExportDatabase(profileKey) SV:SavedPopup() end, - }, - export = { - name = L["export"], - desc = L["export_sub"], - type = "input", - order = 5, - get = false, - set = function(key, value) SVLib:ExportDatabase(value) SV:SavedPopup() end, - }, - import = { - name = L["import"], - desc = L["import_sub"], - type = "select", - order = 6, - get = function() return " SELECT ONE" end, - set = function(key, value) SV:ImportProfile(value) end, - disabled = function() local t = SVLib:CheckProfiles() return (not t) end, - values = SVLib:GetProfiles(), - }, - spacer2 = { - order = 7, - type = "description", - name = "", - width = "full", - }, - deldesc = { - order = 8, - type = "description", - name = "\n" .. L["delete_desc"], - }, - delete = { - order = 9, - type = "select", - name = L["delete"], - desc = L["delete_sub"], - get = function() return " SELECT ONE" end, - set = function(key, value) SVLib:Remove(value) end, - values = SVLib:GetProfiles(), - disabled = function() local t = SVLib:CheckProfiles() return (not t) end, - confirm = true, - confirmText = L["delete_confirm"], - }, - spacer3 = { - order = 10, - type = "description", - name = "", - width = "full", - }, - descreset = { - order = 11, - type = "description", - name = L["reset_desc"], - }, - reset = { - order = 12, - type = "execute", - name = function() return L["reset"] .. " " .. NORMAL_FONT_COLOR_CODE .. profileKey .. FONT_COLOR_CODE_CLOSE end, - desc = L["reset_sub"], - func = function() SV:StaticPopup_Show("RESET_PROFILE_PROMPT") end, - width = "full", - }, - spacer4 = { - order = 13, - type = "description", - name = "", - width = "full", - }, - dualSpec = { - order = 14, - type = "toggle", - name = "Dual-Spec Switching", - get = function() return SVLib:CheckDualProfile() end, - set = function(key, value) SVLib:ToggleDualProfile(value) end, - }, - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua deleted file mode 100644 index 590e554..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua +++ /dev/null @@ -1,158 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local string = _G.string; -local upper = string.upper; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVStats; ---[[ -########################################################## -SET PACKAGE OPTIONS -########################################################## -]]-- -SV.Options.args.SVStats = { - type = "group", - name = MOD.TitleID, - childGroups = "tab", - get = function(key) return SV.db.SVStats[key[#key]] end, - set = function(key, value) MOD:ChangeDBVar(value, key[#key]); MOD:Generate() end, - args = { - intro = { - order = 1, - type = "description", - name = L["STATS_DESC"] - }, - time24 = { - order = 2, - type = "toggle", - name = L["24-Hour Time"], - desc = L["Toggle 24-hour mode for the time datatext."] - }, - localtime = { - order = 3, - type = "toggle", - name = L["Local Time"], - desc = L["If not set to true then the server time will be displayed instead."] - }, - battleground = { - order = 4, - type = "toggle", - name = L["Battleground Texts"], - desc = L["When inside a battleground display personal scoreboard information on the main datatext bars."] - }, - showBackground = { - order = 5, - name = "Show Backgrounds", - desc = L["Display statistic background textures"], - type = "toggle", - set = function(key, value) MOD:ChangeDBVar(value, key[#key]); SV:StaticPopup_Show("RL_CLIENT") end, - }, - shortGold = { - order = 6, - type = "toggle", - name = L["Shortened Gold Text"], - }, - fontGroup = { - order = 7, - type = "group", - guiInline = true, - name = L["Fonts"], - set = function(key, value) MOD:ChangeDBVar(value, key[#key]); MOD:Generate() end, - args = { - font = { - type = "select", - dialogControl = "LSM30_Font", - order = 4, - name = L["Font"], - values = AceGUIWidgetLSMlists.font - }, - fontSize = { - order = 5, - name = L["Font Size"], - type = "range", - min = 6, - max = 22, - step = 1 - }, - fontOutline = { - order = 6, - name = L["Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = { - ["NONE"] = L["None"], - ["OUTLINE"] = "OUTLINE", - ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", - ["THICKOUTLINE"] = "THICKOUTLINE" - } - } - } - }, - panels = { - type = "group", - name = L["Panels"], - order = 100, - args = {}, - guiInline = true - }, - } -} - -do - local orderIncrement = 0; - local statValues = MOD.StatListing - local configTable = SV.db.SVStats.panels; - local optionTable = SV.Options.args.SVStats.args.panels.args; - - for panelName, panelPositions in pairs(configTable)do - orderIncrement = orderIncrement + 1; - if(not _G[panelName]) then - optionTable[panelName] = nil; - return - end - if(type(panelPositions) == "table") then - optionTable[panelName] = { - type = 'group', - args = {}, - name = L[panelName] or panelName, - guiInline = true, - order = (orderIncrement + 10) - } - for position,_ in pairs(panelPositions) do - optionTable[panelName].args[position] = { - type = 'select', - name = L[position] or upper(position), - values = statValues, - get = function(key) return SV.db.SVStats.panels[panelName][key[#key]] end, - set = function(key, value) MOD:ChangeDBVar(value, key[#key], "panels", panelName); MOD:Generate() end - } - end - end - end -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua deleted file mode 100644 index 6fe229a..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua +++ /dev/null @@ -1,179 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVTip; -local LSM = LibStub("LibSharedMedia-3.0"); ---[[ -########################################################## -SET PACKAGE OPTIONS -########################################################## -]]-- -SV.Options.args.SVTip = { - type = "group", - name = MOD.TitleID, - childGroups = "tab", - get = function(a)return SV.db.SVTip[a[#a]] end, - set = function(a, b)SV.db.SVTip[a[#a]] = b end, - args = { - commonGroup = { - order = 1, - type = "group", - name = L["Tooltip Options"], - childGroups = "tree", - args = { - intro = { - order = 1, - type = "description", - name = L["TOOLTIP_DESC"] - }, - enable = { - order = 2, - type = "toggle", - name = L["Enable"], - get = function(a)return SV.db.SVTip[a[#a]]end, - set = function(a, b)SV.db.SVTip[a[#a]] = b;SV:StaticPopup_Show("RL_CLIENT") end - }, - common = { - order = 3, - type = "group", - name = L["General"], - disabled = function() return not SV.db.SVTip.enable end, - args = { - cursorAnchor = { - order = 1, - type = "toggle", - name = L["Cursor Anchor"], - desc = L["Should tooltip be anchored to mouse cursor"] - }, - targetInfo = { - order = 2, - type = "toggle", - name = L["Target Info"], - desc = L["When in a raid group display if anyone in your raid is targeting the current tooltip unit."] - }, - playerTitles = { - order = 3, - type = "toggle", - name = L["Player Titles"], - desc = L["Display player titles."] - }, - guildRanks = { - order = 4, - type = "toggle", - name = L["Guild Ranks"], - desc = L["Display guild ranks if a unit is guilded."] - }, - inspectInfo = { - order = 5, - type = "toggle", - name = L["Talent Spec"], - desc = L["Display the players talent spec in the tooltip, this may not immediately update when mousing over a unit."] - }, - spellID = { - order = 6, - type = "toggle", - name = L["Spell/Item IDs"], - desc = L["Display the spell or item ID when mousing over a spell or item tooltip."], - get = function(a)return SV.db.SVTip.spellID end, - set = function(a, b)SV.db.SVTip.spellID = b;SV:StaticPopup_Show("RL_CLIENT") end, - } - } - - }, - visibility={ - order=100, - type="group", - name=L["Visibility"], - get=function(a)return SV.db.SVTip.visibility[a[#a]]end, - set=function(a,b)SV.db.SVTip.visibility[a[#a]]=b end, - args={ - combat={order=1,type='toggle',name=COMBAT,desc=L["Hide tooltip while in combat."]}, - unitFrames={order=2,type='select',name=L['Unitframes'],desc=L["Don't display the tooltip when mousing over a unitframe."],values={['ALL']=L['Always Hide'],['NONE']=L['Never Hide'],['SHIFT']=SHIFT_KEY,['ALT']=ALT_KEY,['CTRL']=CTRL_KEY}} - } - }, - healthBar={ - order=200, - type="group", - name=L["Health Bar"], - get=function(a)return SV.db.SVTip.healthBar[a[#a]]end, - set=function(a,b)SV.db.SVTip.healthBar[a[#a]]=b end, - args={ - height = { - order = 1, - name = L["Height"], - type = "range", - min = 1, - max = 15, - step = 1, - width = "full", - set = function(a,b)SV.db.SVTip.healthBar.height = b;GameTooltipStatusBar:Height(b)end - }, - fontGroup = { - order = 2, - name = L["Fonts"], - type = "group", - guiInline = true, - args = { - text = { - order = 1, - type = "toggle", - name = L["Text"], - set = function(a,b)SV.db.SVTip.healthBar.text = b;if b then GameTooltipStatusBar.text:Show()else GameTooltipStatusBar.text:Hide()end end - }, - font = { - type = "select", - dialogControl = "LSM30_Font", - order = 2, - width = "full", - name = L["Font"], - values = AceGUIWidgetLSMlists.font, - set = function(a,b)SV.db.SVTip.healthBar.font = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SV.db.SVTip.healthBar.font), SV.db.SVTip.healthBar.fontSize,"OUTLINE")end - }, - fontSize = { - order = 3, - name = L["Font Size"], - type = "range", - min = 6, - max = 22, - step = 1, - width = "full", - set = function(a,b)SV.db.SVTip.healthBar.fontSize = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SV.db.SVTip.healthBar.font),SV.db.SVTip.healthBar.fontSize,"OUTLINE")end - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/_load.xml b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/_load.xml deleted file mode 100644 index e835fb5..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/_load.xml +++ /dev/null @@ -1,11 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file='core.lua'/> - <Script file='player.lua'/> - <Script file='target.lua'/> - <Script file='focus.lua'/> - <Script file='pet.lua'/> - <Script file='party.lua'/> - <Script file='raid.lua'/> - <Script file='other.lua'/> - <Script file='grid.lua'/> -</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua deleted file mode 100644 index 8cdabd8..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua +++ /dev/null @@ -1,2090 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; -local string = _G.string; -local find,gsub,upper = string.find, string.gsub, string.upper; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ...; -local ACD = LibStub("AceConfigDialog-3.0"); ---[[ -########################################################## -LOCAL VARS/FUNCTIONS -########################################################## -]]-- -local filterList = {}; -local textStringFormats = { - ["none"] = "None", - ["current"] = "Current", - ["deficit"] = "Deficit", - ["percent"] = "Percent", - ["curpercent"] = "Current - Percent", - ["curmax"] = "Current - Maximum", - ["curmax-percent"] = "Current - Maximum | %", -} ---[[ -########################################################## -SET PACKAGE OPTIONS -########################################################## -]]-- -function ns:SetCastbarConfigGroup(updateFunction, unitName, count) - local configTable = { - order = 800, - type = "group", - name = L["Castbar"], - get = function(key) - return SV.db.SVUnit[unitName]["castbar"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "castbar") - updateFunction(MOD, unitName, count) - end, - args = { - enable = { - type = "toggle", - order = 1, - name = L["Enable"] - }, - commonGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Base Settings"], - args = { - forceshow = { - order = 1, - name = SHOW.." / "..HIDE, - type = "execute", - func = function() - local v = unitName:gsub("(.)", upper, 1) - v = "SVUI_"..v; - v = v:gsub("t(arget)", "T%1") - if count then - for w = 1, count do - local castbar = _G[v..w].Castbar; - if not castbar.oldHide then - castbar.oldHide = castbar.Hide; - castbar.Hide = castbar.Show; - castbar:Show() - else - castbar.Hide = castbar.oldHide; - castbar.oldHide = nil; - castbar:Hide() - castbar.lastUpdate = 0 - end - end - else - local castbar = _G[v].Castbar; - if not castbar.oldHide then - castbar.oldHide = castbar.Hide; - castbar.Hide = castbar.Show; - castbar:Show() - else - castbar.Hide = castbar.oldHide; - castbar.oldHide = nil; - castbar:Hide() - castbar.lastUpdate = 0 - end - end - end, - }, - icon = { - order = 2, - name = L["Icon"], - type = "toggle" - }, - latency = { - order = 3, - name = L["Latency"], - type = "toggle" - }, - spark = { - order = 4, - type = "toggle", - name = L["Spark"] - }, - } - }, - sizeGroup = { - order = 3, - guiInline = true, - type = "group", - name = L["Size Settings"], - args = { - matchFrameWidth = { - order = 1, - name = L["Auto Width"], - desc = "Force the castbar to ALWAYS match its unitframes width.", - type = "toggle", - }, - matchsize = { - order = 2, - type = "execute", - name = L["Match Frame Width"], - desc = "Set the castbar width to match its unitframe.", - func = function() - SV.db.SVUnit[unitName]["castbar"]["width"] = SV.db.SVUnit[unitName]["width"] - updateFunction(MOD, unitName, count) - end - }, - width = { - order = 3, - name = L["Width"], - type = "range", - width = "full", - min = 50, - max = 600, - step = 1, - disabled = function() return SV.db.SVUnit[unitName]["castbar"].matchFrameWidth end - }, - height = { - order = 4, - name = L["Height"], - type = "range", - width = "full", - min = 10, - max = 85, - step = 1 - }, - } - }, - colorGroup = { - order = 4, - type = "group", - guiInline = true, - name = L["Custom Coloring"], - args = { - useCustomColor = { - type = "toggle", - order = 1, - name = L["Enable"] - }, - castingColor = { - order = 2, - name = L["Custom Bar Color"], - type = "color", - get = function(key) - local color = SV.db.SVUnit[unitName]["castbar"]["castingColor"] - return color[1], color[2], color[3], color[4] - end, - set = function(key, rValue, gValue, bValue) - SV.db.SVUnit[unitName]["castbar"]["castingColor"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() - end, - disabled = function() return not SV.db.SVUnit[unitName]["castbar"].useCustomColor end - }, - sparkColor = { - order = 3, - name = L["Custom Spark Color"], - type = "color", - get = function(key) - local color = SV.db.SVUnit[unitName]["castbar"]["sparkColor"] - return color[1], color[2], color[3], color[4] - end, - set = function(key, rValue, gValue, bValue) - SV.db.SVUnit[unitName]["castbar"]["sparkColor"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() - end, - disabled = function() return not SV.db.SVUnit[unitName]["castbar"].useCustomColor end - }, - } - }, - formatGroup = { - order = 4, - guiInline = true, - type = "group", - name = L["Text Settings"], - args = { - format = { - order = 1, - type = "select", - name = L["Format"], - values = { ["CURRENTMAX"] = L["Current / Max"], ["CURRENT"] = L["Current"], ["REMAINING"] = L["Remaining"] } - }, - } - } - } - } - if(unitName == "player") then - configTable.args.commonGroup.args.ticks = { - order = 6, - type = "toggle", - name = L["Ticks"], - desc = L["Display tick marks on the castbar."] - } - configTable.args.commonGroup.args.displayTarget = { - order = 7, - type = "toggle", - name = L["Display Target"], - desc = L["Display the target of your current cast."] - } - end - return configTable -end - -function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitName, count) - local configTable = { - order = auraType == "buffs" and 600 or 700, - type = "group", - name = auraType == "buffs" and L["Buffs"] or L["Debuffs"], - get = function(key) - return SV.db.SVUnit[unitName][auraType][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, auraType) - updateFunction(MOD, unitName, count) - end, - args = { - enable = { - type = "toggle", - order = 1, - name = L["Enable"] - }, - commonGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Base Settings"], - args = { - verticalGrowth = {type = "select", order = 1, name = L["Vertical Growth"], desc = L["The vertical direction that the auras will position themselves"], values = {UP = "UP", DOWN = "DOWN"}}, - horizontalGrowth = {type = "select", order = 2, name = L["Horizontal Growth"], desc = L["The horizontal direction that the auras will position themselves"], values = {LEFT = "LEFT", RIGHT = "RIGHT"}}, - perrow = {type = "range", order = 3, width = "full", name = L["Per Row"], min = 1, max = 20, step = 1}, - numrows = {type = "range", order = 4, width = "full", name = L["Num Rows"], min = 1, max = 4, step = 1}, - sizeOverride = {type = "range", order = 5, width = "full", name = L["Size Override"], desc = L["If not set to 0 then override the size of the aura icon to this."], min = 0, max = 60, step = 1}, - } - }, - positionGroup = { - order = 3, - guiInline = true, - type = "group", - name = L["Position Settings"], - args = { - xOffset = {order = 1, type = "range", name = L["xOffset"], width = "full", min = -60, max = 60, step = 1}, - yOffset = {order = 2, type = "range", name = L["yOffset"], width = "full", min = -60, max = 60, step = 1}, - anchorPoint = {type = "select", order = 3, name = L["Anchor Point"], desc = L["What point to anchor to the frame you set to attach to."], values = SV.PointIndexes}, - } - }, - filters = {name = L["Filters"], guiInline = true, type = "group", order = 500, args = {}} - } - } - if auraType == "buffs"then - configTable.args.positionGroup.args.attachTo = {type = "select", order = 7, name = L["Attach To"], desc = L["What to attach the buff anchor frame to."], values = {["FRAME"] = L["Frame"], ["DEBUFFS"] = L["Debuffs"]}} - else - configTable.args.positionGroup.args.attachTo = {type = "select", order = 7, name = L["Attach To"], desc = L["What to attach the buff anchor frame to."], values = {["FRAME"] = L["Frame"], ["BUFFS"] = L["Buffs"]}} - end - if custom then - configTable.args.filters.args.filterPlayer = {order = 10, type = "toggle", name = L["Only Show Your Auras"], desc = L["Don't display auras that are not yours."]} - configTable.args.filters.args.filterBlocked = {order = 11, type = "toggle", name = L["Force Blocked List"], desc = L["Don't display any auras found on the Blocked filter."]} - configTable.args.filters.args.filterAllowed = {order = 12, type = "toggle", name = L["Force Allowed List"], desc = L["If no other filter options are being used then it will block anything not on the Allowed filter."]} - configTable.args.filters.args.filterInfinite = {order = 13, type = "toggle", name = L["Block Auras Without Duration"], desc = L["Don't display auras that have no duration."]} - configTable.args.filters.args.filterDispellable = {order = 13, type = "toggle", name = L["Block Non-Dispellable Auras"], desc = L["Don't display auras that cannot be purged or dispelled by your class."]} - if auraType == "buffs"then - configTable.args.filters.args.filterRaid = {order = 14, type = "toggle", name = L["Block Raid Buffs"], desc = L["Don't display raid buffs."]} - end - configTable.args.filters.args.useFilter = { - order = 15, - name = L["Additional Filter"], - desc = L["Select an additional filter to use."], - type = "select", - values = function() - filterList = {} - filterList[""] = NONE; - for n in pairs(SV.db.filter) do - filterList[n] = n - end - return filterList - end - } - - else - configTable.args.filters.args.filterPlayer = { - order = 10, - guiInline = true, - type = "group", - name = L["Only Show Your Auras"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], - desc = L["If the unit is friendly to you."].." "..L["Don't display auras that are not yours."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterPlayer.friendly end, - set = function(l, m) - SV.db.SVUnit[unitName][auraType].filterPlayer.friendly = m; - updateFunction(MOD, unitName, count) - end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], - desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that are not yours."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterPlayer.enemy end, - set = function(l, m) - SV.db.SVUnit[unitName][auraType].filterPlayer.enemy = m; - updateFunction(MOD, unitName, count) - end - } - } - } - configTable.args.filters.args.filterBlocked = { - order = 11, - guiInline = true, - type = "group", - name = L["Force Blocked List"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], - desc = L["If the unit is friendly to you."].." "..L["Don't display any auras found on the Blocked filter."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterBlocked.friendly end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterBlocked.friendly = m;updateFunction(MOD, unitName, count)end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], - desc = L["If the unit is an enemy to you."].." "..L["Don't display any auras found on the Blocked filter."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterBlocked.enemy end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterBlocked.enemy = m;updateFunction(MOD, unitName, count)end - } - } - } - configTable.args.filters.args.filterAllowed = { - order = 12, - guiInline = true, - type = "group", - name = L["Force Allowed List"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], - desc = L["If the unit is friendly to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterAllowed.friendly end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterAllowed.friendly = m;updateFunction(MOD, unitName, count)end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], - desc = L["If the unit is an enemy to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterAllowed.enemy end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterAllowed.enemy = m;updateFunction(MOD, unitName, count)end - } - } - } - configTable.args.filters.args.filterInfinite = { - order = 13, - guiInline = true, - type = "group", - name = L["Block Auras Without Duration"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], - desc = L["If the unit is friendly to you."].." "..L["Don't display auras that have no duration."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterInfinite.friendly end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterInfinite.friendly = m;updateFunction(MOD, unitName, count)end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], - desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that have no duration."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterInfinite.enemy end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterInfinite.enemy = m;updateFunction(MOD, unitName, count)end - } - } - } - configTable.args.filters.args.filterDispellable = { - order = 13, - guiInline = true, - type = "group", - name = L["Block Non-Dispellable Auras"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], - desc = L["If the unit is friendly to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterDispellable.friendly end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterDispellable.friendly = m;updateFunction(MOD, unitName, count)end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], - desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterDispellable.enemy end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterDispellable.enemy = m;updateFunction(MOD, unitName, count)end - } - } - } - if(auraType == "buffs") then - configTable.args.filters.args.filterRaid = { - order = 14, - guiInline = true, - type = "group", - name = L["Block Raid Buffs"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], - desc = L["If the unit is friendly to you."].." "..L["Don't display raid (consolidated) buffs."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterRaid.friendly end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterRaid.friendly = m;updateFunction(MOD, unitName, count)end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display raid (consolidated) buffs."], - get = function(l)return SV.db.SVUnit[unitName][auraType].filterRaid.enemy end, - set = function(l, m)SV.db.SVUnit[unitName][auraType].filterRaid.enemy = m;updateFunction(MOD, unitName, count)end - } - } - } - end - configTable.args.filters.args.useFilter = { - order = 15, - name = L["Additional Filter"], - desc = L["Select an additional filter to use."], - type = "select", - values = function() - filterList = {} - filterList[""] = NONE; - for n in pairs(SV.db.filter) do - filterList[n] = n - end - return filterList - end - } - end - return configTable -end - -function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) - local miscGroup = { - order = 99, - type = "group", - name = L["Misc Text"], - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); - local tag = "" - local pc = SV.db.SVUnit[unitName]["formatting"].threat and "[threat]" or ""; - tag = tag .. pc; - local ap = SV.db.SVUnit[unitName]["formatting"].absorbs and "[absorbs]" or ""; - tag = tag .. ap; - local cp = SV.db.SVUnit[unitName]["formatting"].incoming and "[incoming]" or ""; - tag = tag .. cp; - - MOD:ChangeDBVar(tag, "tags", unitName, "misc"); - updateFunction(MOD, unitName, count) - end, - args = { - incoming = { - order = 1, - name = L["Show Incoming Heals"], - type = "toggle", - get = function() return SV.db.SVUnit[unitName]["formatting"].incoming end, - }, - absorbs = { - order = 2, - name = L["Show Absorbs"], - type = "toggle", - get = function() return SV.db.SVUnit[unitName]["formatting"].absorbs end, - }, - threat = { - order = 3, - name = L["Show Threat"], - type = "toggle", - get = function() return SV.db.SVUnit[unitName]["formatting"].threat end, - }, - xOffset = { - order = 4, - type = "range", - width = "full", - name = L["Misc Text X Offset"], - desc = L["Offset position for text."], - min = -300, - max = 300, - step = 1, - get = function() return SV.db.SVUnit[unitName]["formatting"].xOffset end, - set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); end, - }, - yOffset = { - order = 5, - type = "range", - width = "full", - name = L["Misc Text Y Offset"], - desc = L["Offset position for text."], - min = -300, - max = 300, - step = 1, - get = function() return SV.db.SVUnit[unitName]["formatting"].yOffset end, - set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); end, - }, - } - } - return miscGroup -end - -function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) - local healthOptions = { - order = 100, - type = "group", - name = L["Health"], - get = function(key) - return SV.db.SVUnit[unitName]["health"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "health"); - updateFunction(MOD, unitName, count) - end, - args = { - commonGroup = { - order = 2, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - reversed = {type = "toggle", order = 1, name = L["Reverse Fill"], desc = L["Invert this bars fill direction"]}, - position = {type = "select", order = 2, name = L["Text Position"], desc = L["Set the anchor for this bars value text"], values = SV.PointIndexes}, - configureButton = { - order = 4, - width = "full", - name = L["Coloring"], - type = "execute", - func = function() ACD:SelectGroup(SV.NameID, "SVUnit", "common", "allColorsGroup", "healthGroup") end - }, - xOffset = {order = 5, type = "range", width = "full", name = L["Text xOffset"], desc = L["Offset position for text."], min = -300, max = 300, step = 1}, - yOffset = {order = 6, type = "range", width = "full", name = L["Text yOffset"], desc = L["Offset position for text."], min = -300, max = 300, step = 1}, - } - }, - formatGroup = { - order = 100, - type = "group", - guiInline = true, - name = L["Text Settings"], - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); - local tag = "" - local pc = SV.db.SVUnit[unitName]["formatting"].health_colored and "[health:color]" or ""; - tag = tag .. pc; - - local pt = SV.db.SVUnit[unitName]["formatting"].health_type; - if(pt and pt ~= "none") then - tag = tag .. "[health:" .. pt .. "]" - end - - MOD:ChangeDBVar(tag, "tags", unitName, "health"); - updateFunction(MOD, unitName, count) - end, - args = { - health_colored = { - order = 1, - name = L["Colored"], - type = "toggle", - get = function() return SV.db.SVUnit[unitName]["formatting"].health_colored end, - desc = L["Use various name coloring methods"] - }, - health_type = { - order = 3, - name = L["Text Format"], - type = "select", - get = function() return SV.db.SVUnit[unitName]["formatting"].health_type end, - desc = L["TEXT_FORMAT_DESC"], - values = textStringFormats, - } - } - } - } - } - if partyRaid then - healthOptions.args.frequentUpdates = { - type = "toggle", - order = 1, - name = L["Frequent Updates"], - desc = L["Rapidly update the health, uses more memory and cpu. Only recommended for healing."] - } - healthOptions.args.orientation = { - type = "select", - order = 2, - name = L["Orientation"], - desc = L["Direction the health bar moves when gaining/losing health."], - values = {["HORIZONTAL"] = L["Horizontal"], ["VERTICAL"] = L["Vertical"]} - } - end - return healthOptions -end - -function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) - local powerOptions = { - order = 200, - type = "group", - name = L["Power"], - get = function(key) - return SV.db.SVUnit[unitName]["power"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "power"); - updateFunction(MOD, unitName, count) - end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - commonGroup = { - order = 2, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - position = {type = "select", order = 3, name = L["Text Position"], desc = L["Set the anchor for this bars value text"], values = SV.PointIndexes}, - configureButton = { - order = 4, - name = L["Coloring"], - width = "full", - type = "execute", - func = function()ACD:SelectGroup(SV.NameID, "SVUnit", "common", "allColorsGroup", "powerGroup")end - }, - height = { - type = "range", - name = L["Height"], - order = 5, - width = "full", - min = 3, - max = 50, - step = 1 - }, - xOffset = {order = 6, type = "range", width = "full", name = L["Text xOffset"], desc = L["Offset position for text."], min = -300, max = 300, step = 1}, - yOffset = {order = 7, type = "range", width = "full", name = L["Text yOffset"], desc = L["Offset position for text."], min = -300, max = 300, step = 1}, - } - }, - formatGroup = { - order = 100, - type = "group", - guiInline = true, - name = L["Text Settings"], - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); - local tag = "" - local cp = SV.db.SVUnit[unitName]["formatting"].power_class and "[classpower]" or ""; - tag = tag .. cp; - local ap = SV.db.SVUnit[unitName]["formatting"].power_alt and "[altpower]" or ""; - tag = tag .. ap; - local pc = SV.db.SVUnit[unitName]["formatting"].power_colored and "[power:color]" or ""; - tag = tag .. pc; - - local pt = SV.db.SVUnit[unitName]["formatting"].power_type; - if(pt and pt ~= "none") then - tag = tag .. "[power:" .. pt .. "]" - end - - MOD:ChangeDBVar(tag, "tags", unitName, "power"); - updateFunction(MOD, unitName, count) - end, - args = { - power_colored = { - order = 1, - name = L["Colored"], - type = "toggle", - get = function() return SV.db.SVUnit[unitName]["formatting"].power_colored end, - desc = L["Use various name coloring methods"] - }, - power_class = { - order = 1, - name = L["Show Class Power"], - type = "toggle", - get = function() return SV.db.SVUnit[unitName]["formatting"].power_class end, - }, - power_alt = { - order = 1, - name = L["Show Alt Power"], - type = "toggle", - get = function() return SV.db.SVUnit[unitName]["formatting"].power_alt end, - }, - power_type = { - order = 3, - name = L["Text Format"], - type = "select", - get = function() return SV.db.SVUnit[unitName]["formatting"].power_type end, - desc = L["TEXT_FORMAT_DESC"], - values = textStringFormats, - } - } - } - } - } - - if(playerTarget) then - powerOptions.args.formatGroup.args.attachTextToPower = { - type = "toggle", - order = 2, - name = L["Attach Text to Power"], - get = function(key) - return SV.db.SVUnit[unitName]["power"].attachTextToPower - end, - set = function(key, value) - MOD:ChangeDBVar(value, "attachTextToPower", unitName, "power"); - updateFunction(MOD, unitName, count) - end, - } - end - - return powerOptions -end - -function ns:SetNameConfigGroup(updateFunction, unitName, count) - local k = { - order = 400, - type = "group", - name = L["Name"], - get = function(key) - return SV.db.SVUnit[unitName]["name"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "name"); - updateFunction(MOD, unitName, count) - end, - args = { - commonGroup = { - order = 2, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - position = { - type = "select", - order = 3, - name = L["Text Position"], - desc = L["Set the anchor for this units name text"], - values = SV.PointIndexes - }, - xOffset = { - order = 6, - type = "range", - width = "full", - name = L["Text xOffset"], - desc = L["Offset position for text."], - min = -300, - max = 300, - step = 1 - }, - yOffset = { - order = 7, - type = "range", - width = "full", - name = L["Text yOffset"], - desc = L["Offset position for text."], - min = -300, - max = 300, - step = 1 - }, - } - }, - fontGroup = { - order = 4, - type = "group", - guiInline = true, - name = L["Fonts"], - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "name"); - MOD:RefreshAllUnitMedia() - end, - args = { - font = { - type = "select", - dialogControl = "LSM30_Font", - order = 0, - name = L["Default Font"], - desc = L["The font used to show unit names."], - values = AceGUIWidgetLSMlists.font - }, - fontOutline = { - order = 1, - name = L["Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = {["NONE"] = L["None"], ["OUTLINE"] = "OUTLINE", ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", ["THICKOUTLINE"] = "THICKOUTLINE"} - }, - fontSize = { - order = 2, - name = L["Font Size"], - desc = L["Set the font size."], - type = "range", - width = "full", - min = 6, - max = 22, - step = 1 - } - } - }, - formatGroup = { - order = 100, - type = "group", - guiInline = true, - name = L["Text Settings"], - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); - local tag = "" - tag = SV.db.SVUnit[unitName]["formatting"].name_colored and "[name:color]" or ""; - - local length = SV.db.SVUnit[unitName]["formatting"].name_length; - tag = tag .. "[name:" .. length .. "]" - local lvl = SV.db.SVUnit[unitName]["formatting"].smartlevel and "[smartlevel]" or ""; - tag = tag .. lvl - - MOD:ChangeDBVar(tag, "tags", unitName, "name"); - updateFunction(MOD, unitName, count) - end, - args = { - name_colored = { - order = 1, - name = L["Colored"], - type = "toggle", - get = function() return SV.db.SVUnit[unitName]["formatting"].name_colored end, - desc = L["Use various name coloring methods"] - }, - smartlevel = { - order = 2, - name = L["Unit Level"], - type = "toggle", - get = function() return SV.db.SVUnit[unitName]["formatting"].smartlevel end, - desc = L["Display the units level"] - }, - name_length = { - order = 3, - name = L["Name Length"], - desc = L["TEXT_FORMAT_DESC"], - type = "range", - width = "full", - get = function() return SV.db.SVUnit[unitName]["formatting"].name_length end, - min = 1, - max = 30, - step = 1 - } - } - } - } - } - return k -end - -local function getAvailablePortraitConfig(unit) - local db = SV.db.SVUnit[unit].portrait; - if db.overlay then - return {["3D"] = L["3D"]} - else - return {["2D"] = L["2D"], ["3D"] = L["3D"]} - end -end - -function ns:SetPortraitConfigGroup(updateFunction, unitName, count) - local k = { - order = 400, - type = "group", - name = L["Portrait"], - get = function(key) - return SV.db.SVUnit[unitName]["portrait"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "portrait") - updateFunction(MOD, unitName, count) - end, - args = { - enable = { - type = "toggle", - order = 1, - name = L["Enable"] - }, - styleGroup = { - order = 2, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - style = { - order = 1, - type = "select", - name = L["Style"], - desc = L["Select the display method of the portrait. NOTE: if overlay is set then only 3D will be available"], - values = function() return getAvailablePortraitConfig(unitName) end - }, - overlay = { - order = 2, - type = "toggle", - name = L["Overlay"], - desc = L["Overlay the healthbar"], - disabled = function() return SV.db.SVUnit[unitName]["portrait"].style == "2D" end - }, - width = { - order = 3, - type = "range", - width = "full", - name = L["Width"], - min = 15, - max = 150, - step = 1, - disabled = function() return SV.db.SVUnit[unitName]["portrait"].overlay == true end - } - } - }, - modGroup = { - order = 3, - type = "group", - guiInline = true, - name = L["3D Settings"], - disabled = function() return SV.db.SVUnit[unitName]["portrait"].style == "2D" end, - args = { - rotation = { - order = 1, - type = "range", - name = L["Model Rotation"], - min = 0, - max = 360, - step = 1 - }, - camDistanceScale = { - order = 2, - type = "range", - name = L["Camera Distance Scale"], - desc = L["How far away the portrait is from the camera."], - min = 0.01, - max = 4, - step = 0.01 - }, - } - } - } - } - return k -end - -function ns:SetIconConfigGroup(updateFunction, unitName, count) - local iconGroup = SV.db.SVUnit[unitName]["icons"] - local grouporder = 1 - local k = { - order = 5000, - type = "group", - name = L["Icons"], - get = function(key) - return SV.db.SVUnit[unitName]["icons"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "icons") - updateFunction(MOD, unitName, count) - end, - args = {} - }; - - if(iconGroup["raidicon"]) then - k.args.raidicon = { - order = grouporder, - type = "group", - guiInline = true, - name = L["Raid Marker"], - get = function(key) - return SV.db.SVUnit[unitName]["icons"]["raidicon"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "icons", "raidicon") - updateFunction(MOD, unitName, count) - end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, - size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, - xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, - yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} - } - } - grouporder = grouporder + 1 - end - - if(iconGroup["combatIcon"]) then - k.args.combatIcon = { - order = grouporder, - type = "group", - guiInline = true, - name = L["Combat"], - get = function(key) - return SV.db.SVUnit[unitName]["icons"]["combatIcon"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "icons", "combatIcon") - updateFunction(MOD, unitName, count) - end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, - size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, - xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, - yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} - } - } - grouporder = grouporder + 1 - end - - if(iconGroup["restIcon"]) then - k.args.restIcon = { - order = grouporder, - type = "group", - guiInline = true, - name = L["Resting"], - get = function(key) - return SV.db.SVUnit[unitName]["icons"]["restIcon"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "icons", "restIcon") - updateFunction(MOD, unitName, count) - end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, - size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, - xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, - yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} - } - } - grouporder = grouporder + 1 - end - - if(iconGroup["classicon"]) then - k.args.classicon = { - order = grouporder, - type = "group", - guiInline = true, - name = L["Class"], - get = function(key) - return SV.db.SVUnit[unitName]["icons"]["classicon"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "icons", "classicon") - updateFunction(MOD, unitName, count) - end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, - size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, - xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, - yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} - } - } - grouporder = grouporder + 1 - end - - if(iconGroup["eliteicon"]) then - k.args.eliteicon = { - order = grouporder, - type = "group", - guiInline = true, - name = L["Elite / Rare"], - get = function(key) - return SV.db.SVUnit[unitName]["icons"]["eliteicon"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "icons", "eliteicon") - updateFunction(MOD, unitName, count) - end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, - size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, - xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, - yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} - } - } - grouporder = grouporder + 1 - end - - if(iconGroup["roleIcon"]) then - k.args.roleIcon = { - order = grouporder, - type = "group", - guiInline = true, - name = L["Role"], - get = function(key) - return SV.db.SVUnit[unitName]["icons"]["roleIcon"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "icons", "roleIcon") - updateFunction(MOD, unitName, count) - end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, - size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, - xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, - yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} - } - } - grouporder = grouporder + 1 - end - - if(iconGroup["raidRoleIcons"]) then - k.args.raidRoleIcons = { - order = grouporder, - type = "group", - guiInline = true, - name = L["Leader / MasterLooter"], - get = function(key) - return SV.db.SVUnit[unitName]["icons"]["raidRoleIcons"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "icons", "raidRoleIcons") - updateFunction(MOD, unitName, count) - end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SV.PointIndexes}, - size = {type = "range", name = L["Size"], width = "full", order = 3, min = 8, max = 60, step = 1}, - xOffset = {order = 4, type = "range", name = L["xOffset"], width = "full", min = -300, max = 300, step = 1}, - yOffset = {order = 5, type = "range", name = L["yOffset"], width = "full", min = -300, max = 300, step = 1} - } - } - grouporder = grouporder + 1 - end - - return k -end - -function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) - local k = { - order = 1100, - type = "group", - name = L["Aura Bars"], - get = function(key) - return SV.db.SVUnit[unitName]["aurabar"][key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], unitName, "aurabar") - updateFunction(MOD, unitName, count) - MOD:RefreshUnitFrames() - end, - args = { - enable = { - type = "toggle", - order = 1, - name = L["Enable"] - }, - commonGroup = { - order = 2, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - configureButton1 = { - order = 1, - name = L["Coloring"], - type = "execute", func = function()ACD:SelectGroup(SV.NameID, "SVUnit", "common", "allColorsGroup", "auraBars")end - }, - configureButton2 = { - order = 2, - name = L["Coloring (Specific)"], - type = "execute", func = function()ns:SetToFilterConfig("AuraBar Colors")end - }, - anchorPoint = { - type = "select", - order = 3, - name = L["Anchor Point"], desc = L["What point to anchor to the frame you set to attach to."], values = {["ABOVE"] = L["Above"], ["BELOW"] = L["Below"]} - }, - attachTo = { - type = "select", - order = 4, - name = L["Attach To"], desc = L["The object you want to attach to."], - values = {["FRAME"] = L["Frame"], ["DEBUFFS"] = L["Debuffs"], ["BUFFS"] = L["Buffs"]} - }, - height = { - type = "range", - order = 5, - name = L["Height"], min = 6, max = 40, step = 1 - }, - statusbar = { - type = "select", - dialogControl = "LSM30_Statusbar", - order = 6, - name = L["StatusBar Texture"], - desc = L["Aurabar texture."], - values = AceGUIWidgetLSMlists.statusbar - } - } - }, - filterGroup = { - order = 3, - type = "group", - guiInline = true, - name = L["Filtering and Sorting"], - args = { - sort = { - type = "select", - order = 7, - name = L["Sort Method"], - values = {["TIME_REMAINING"] = L["Time Remaining"], ["TIME_REMAINING_REVERSE"] = L["Time Remaining Reverse"], ["TIME_DURATION"] = L["Duration"], ["TIME_DURATION_REVERSE"] = L["Duration Reverse"], ["NAME"] = NAME, ["NONE"] = NONE} - }, - filters = { - name = L["Filters"], - guiInline = true, - type = "group", - order = 500, - args = {} - }, - friendlyAuraType = { - type = "select", - order = 16, - name = L["Friendly Aura Type"], desc = L["Set the type of auras to show when a unit is friendly."], values = {["HARMFUL"] = L["Debuffs"], ["HELPFUL"] = L["Buffs"]} - }, - enemyAuraType = { - type = "select", - order = 17, - name = L["Enemy Aura Type"], desc = L["Set the type of auras to show when a unit is a foe."], values = {["HARMFUL"] = L["Debuffs"], ["HELPFUL"] = L["Buffs"]} - } - } - } - } - }; - if custom then - k.args.filterGroup.args.filters.args.filterPlayer = { - order = 10, - type = "toggle", - name = L["Only Show Your Auras"], desc = L["Don't display auras that are not yours."] - } - k.args.filterGroup.args.filters.args.filterBlocked = { - order = 11, - type = "toggle", - name = L["Force Blocked List"], desc = L["Don't display any auras found on the Blocked filter."] - } - k.args.filterGroup.args.filters.args.filterAllowed = { - order = 12, - type = "toggle", - name = L["Force Allowed List"], desc = L["If no other filter options are being used then it will block anything not on the Allowed filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."] - } - k.args.filterGroup.args.filters.args.filterInfinite = { - order = 13, - type = "toggle", - name = L["Block Auras Without Duration"], desc = L["Don't display auras that have no duration."] - } - k.args.filterGroup.args.filters.args.filterDispellable = { - order = 13, - type = "toggle", - name = L["Block Non-Dispellable Auras"], desc = L["Don't display auras that cannot be purged or dispelled by your class."] - } - k.args.filterGroup.args.filters.args.filterRaid = { - order = 14, - type = "toggle", - name = L["Block Raid Buffs"], desc = L["Don't display raid buffs such as Blessing of Kings or Mark of the Wild."] - } - k.args.filterGroup.args.filters.args.useFilter = { - order = 15, - name = L["Additional Filter"], - desc = L["Select an additional filter to use. If the selected filter is a whitelist and no other filters are being used (with the exception of Only Show Your Auras) then it will block anything not on the whitelist, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], - type = "select", - values = function() - filterList = {} - filterList[""] = NONE; - for n in pairs(SV.db.filter) do - filterList[n] = n - end - return filterList - end - } - else - k.args.filterGroup.args.filters.args.filterPlayer = { - order = 10, guiInline = true, - type = "group", - name = L["Only Show Your Auras"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that are not yours."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterPlayer.friendly end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterPlayer.friendly = m;updateFunction(MOD, unitName)end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that are not yours."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterPlayer.enemy end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterPlayer.enemy = m;updateFunction(MOD, unitName)end - } - } - } - k.args.filterGroup.args.filters.args.filterBlocked = { - order = 11, guiInline = true, - type = "group", - name = L["Force Blocked List"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display any auras found on the Blocked filter."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterBlocked.friendly end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterBlocked.friendly = m;updateFunction(MOD, unitName)end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display any auras found on the Blocked filter."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterBlocked.enemy end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterBlocked.enemy = m;updateFunction(MOD, unitName)end - } - } - } - k.args.filterGroup.args.filters.args.filterAllowed = { - order = 12, guiInline = true, - type = "group", - name = L["Force Allowed List"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterAllowed.friendly end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterAllowed.friendly = m;updateFunction(MOD, unitName)end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["If no other filter options are being used then it will block anything not on the Allowed filter, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterAllowed.enemy end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterAllowed.enemy = m;updateFunction(MOD, unitName)end - } - } - } - k.args.filterGroup.args.filters.args.filterInfinite = { - order = 13, guiInline = true, - type = "group", - name = L["Block Auras Without Duration"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that have no duration."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterInfinite.friendly end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterInfinite.friendly = m;updateFunction(MOD, unitName)end - }, - enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that have no duration."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterInfinite.enemy end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterInfinite.enemy = m;updateFunction(MOD, unitName)end - } - } - } - k.args.filterGroup.args.filters.args.filterDispellable = { - order = 13, guiInline = true, - type = "group", - name = L["Block Non-Dispellable Auras"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterDispellable.friendly end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterDispellable.friendly = m;updateFunction(MOD, unitName)end}, enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display auras that cannot be purged or dispelled by your class."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterDispellable.enemy end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterDispellable.enemy = m;updateFunction(MOD, unitName)end} - } - } - k.args.filterGroup.args.filters.args.filterRaid = { - order = 14, guiInline = true, - type = "group", - name = L["Block Raid Buffs"], - args = { - friendly = { - order = 2, - type = "toggle", - name = L["Friendly"], desc = L["If the unit is friendly to you."].." "..L["Don't display raid buffs such as Blessing of Kings or Mark of the Wild."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterRaid.friendly end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterRaid.friendly = m;updateFunction(MOD, unitName)end}, enemy = { - order = 3, - type = "toggle", - name = L["Enemy"], desc = L["If the unit is an enemy to you."].." "..L["Don't display raid buffs such as Blessing of Kings or Mark of the Wild."], - get = function(l)return SV.db.SVUnit[unitName]["aurabar"].filterRaid.enemy end, - set = function(l, m)SV.db.SVUnit[unitName]["aurabar"].filterRaid.enemy = m;updateFunction(MOD, unitName)end} - } - } - k.args.filterGroup.args.filters.args.useFilter = { - order = 15, - name = L["Additional Filter"], - desc = L["Select an additional filter to use. If the selected filter is a whitelist and no other filters are being used (with the exception of Only Show Your Auras) then it will block anything not on the whitelist, otherwise it will simply add auras on the whitelist in addition to any other filter settings."], - type = "select", - values = function() - filterList = {} - filterList[""] = NONE; - for n in pairs(SV.db.filter) do - filterList[n] = n - end - return filterList - end - } - end - return k -end - -SV.Options.args.SVUnit = { - type = "group", - name = MOD.TitleID, - childGroups = "tree", - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames(); - end, - args = { - enable = { - order = 1, - type = "toggle", - name = L["Enable"], - get = function(l) - return SV.db.SVUnit.enable end, - set = function(l, m) - SV.db.SVUnit.enable = m; - SV:StaticPopup_Show("RL_CLIENT") - end - }, - common = { - order = 2, - type = "group", - name = L["General"], - guiInline = true, - disabled = function() - return not SV.db.SVUnit.enable - end, - args = { - commonGroup = { - order = 1, - type = "group", - guiInline = true, - name = L["General"], - args = { - disableBlizzard = { - order = 1, - name = L["Disable Blizzard"], - desc = L["Disables the blizzard party/raid frames."], - type = "toggle", - get = function(key) - return SV.db.SVUnit.disableBlizzard - end, - set = function(key, value) - MOD:ChangeDBVar(value, "disableBlizzard"); - SV:StaticPopup_Show("RL_CLIENT") - end - }, - fastClickTarget = { - order = 2, - name = L["Fast Clicks"], - desc = L["Immediate mouse-click-targeting"], - type = "toggle" - }, - debuffHighlighting = { - order = 3, - name = L["Debuff Highlight"], - desc = L["Color the unit if there is a debuff that can be dispelled by your class."], - type = "toggle" - }, - xrayFocus = { - order = 4, - name = L["X-Ray Specs"], - desc = L["Use handy graphics to focus the current target, or clear the current focus"], - type = "toggle" - }, - OORAlpha = { - order = 5, - name = L["Range Fading"], - desc = L["The transparency of units that are out of range."], - type = "range", - min = 0, - max = 1, - step = 0.01, - width = "full", - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - end - }, - groupOORAlpha = { - order = 6, - name = L["Group Range Fading"], - desc = L["The transparency of group units that are out of range."], - type = "range", - min = 0, - max = 1, - step = 0.01, - width = "full", - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - end - }, - } - }, - backgroundGroup = { - order = 2, - type = "group", - guiInline = true, - name = "Unit Backgrounds (3D Portraits Only)", - get = function(key) - return SV.db.media.textures[key[#key]] - end, - set = function(key, value) - SV.db.media.textures[key[#key]] = {"background", value} - SV:RefreshEverything(true) - end, - args = { - unitlarge = { - type = "select", - dialogControl = "LSM30_Background", - order = 2, - name = "Unit Background", - values = AceGUIWidgetLSMlists.background, - }, - unitsmall = { - type = "select", - dialogControl = "LSM30_Background", - order = 3, - name = "Small Unit Background", - values = AceGUIWidgetLSMlists.background, - } - } - }, - barGroup = { - order = 3, - type = "group", - guiInline = true, - name = L["Bars"], - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshAllUnitMedia() - end, - args = { - smoothbars = { - type = "toggle", - order = 1, - name = L["Smooth Bars"], - desc = L["Bars will transition smoothly."] - }, - statusbar = { - type = "select", - dialogControl = "LSM30_Statusbar", - order = 2, - name = L["StatusBar Texture"], - desc = L["Main statusbar texture."], - values = AceGUIWidgetLSMlists.statusbar - }, - auraBarStatusbar = { - type = "select", - dialogControl = "LSM30_Statusbar", - order = 3, - name = L["AuraBar Texture"], - desc = L["Main statusbar texture."], - values = AceGUIWidgetLSMlists.statusbar - }, - } - }, - fontGroup = { - order = 4, - type = "group", - guiInline = true, - name = L["Fonts"], - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshAllUnitMedia() - end, - args = { - font = { - type = "select", - dialogControl = "LSM30_Font", - order = 1, - name = L["Default Font"], - desc = L["The font that the unitframes will use."], - values = AceGUIWidgetLSMlists.font, - }, - fontOutline = { - order = 2, - name = L["Font Outline"], - desc = L["Set the font outline."], - type = "select", - values = { - ["NONE"] = L["None"], ["OUTLINE"] = "OUTLINE", ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", ["THICKOUTLINE"] = "THICKOUTLINE" - }, - }, - fontSize = { - order = 3, - name = L["Font Size"], - desc = L["Set the font size for unitframes."], - type = "range", - min = 6, - max = 22, - step = 1, - }, - auraFont = { - type = "select", - dialogControl = "LSM30_Font", - order = 4, - name = L["Aura Font"], - desc = L["The font that the aura icons and aurabar will use."], - values = AceGUIWidgetLSMlists.font, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshAllUnitMedia() - end, - }, - auraFontOutline = { - order = 5, - name = L["Aura Font Outline"], - desc = L["Set the aura icons and aurabar font outline."], - type = "select", - values = { - ["NONE"] = L["None"], ["OUTLINE"] = "OUTLINE", ["MONOCHROMEOUTLINE"] = "MONOCROMEOUTLINE", ["THICKOUTLINE"] = "THICKOUTLINE" - }, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshAllUnitMedia() - end, - }, - auraFontSize = { - order = 6, - name = L["Aura Font Size"], - desc = L["Set the font size for aura icons and aurabars."], - type = "range", - min = 6, - max = 22, - step = 1, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshAllUnitMedia() - end, - }, - } - }, - allColorsGroup = { - order = 5, - type = "group", - guiInline = true, - name = L["Colors"], - args = { - healthGroup = { - order = 9, - type = "group", guiInline = true, - name = HEALTH, - args = { - healthclass = { - order = 1, - type = "toggle", - name = L["Class Health"], - desc = L["Color health by classcolor or reaction."], - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames() - end - }, - colorhealthbyvalue = { - order = 2, - type = "toggle", - name = L["Health By Value"], - desc = L["Color health by amount remaining."], - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames() - end - }, - classbackdrop = { - order = 3, - type = "toggle", - name = L["Class Backdrop"], - desc = L["Color the health backdrop by class or reaction."], - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames() - end - }, - forceHealthColor = { - order = 4, - type = "toggle", - name = L["Overlay Health Color"], - desc = L["Force custom health color when using portrait overlays."], - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames() - end - }, - overlayAnimation = { - order = 5, - type = "toggle", - name = L["Overlay Animations"], - desc = L["Toggle health animations on portrait overlays."], - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames() - end - }, - health = { - order = 7, - type = "color", - name = L["Health"], - get = function(key) - local color = SV.db.media.unitframes.health - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.health = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - tapped = { - order = 8, - type = "color", - name = L["Tapped"], - get = function(key) - local color = SV.db.media.unitframes.tapped - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.tapped = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - disconnected = { - order = 9, - type = "color", - name = L["Disconnected"], - get = function(key) - local color = SV.db.media.unitframes.disconnected - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.disconnected = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - } - } - }, - powerGroup = { - order = 10, - type = "group", - guiInline = true, - name = L["Powers"], - args = { - powerclass = { - order = 0, - type = "toggle", - name = L["Class Power"], - desc = L["Color power by classcolor or reaction."], - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames() - end - }, - MANA = { - order = 2, - name = MANA, - type = "color", - get = function(key) - local color = SV.db.media.unitframes.power["MANA"] - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.power["MANA"] = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - RAGE = { - order = 3, - name = RAGE, - type = "color", - get = function(key) - local color = SV.db.media.unitframes.power["RAGE"] - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.power["RAGE"] = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - FOCUS = { - order = 4, - name = FOCUS, - type = "color", - get = function(key) - local color = SV.db.media.unitframes.power["FOCUS"] - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.power["FOCUS"] = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - ENERGY = { - order = 5, - name = ENERGY, - type = "color", - get = function(key) - local color = SV.db.media.unitframes.power["ENERGY"] - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.power["ENERGY"] = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - RUNIC_POWER = { - order = 6, - name = RUNIC_POWER, - type = "color", - get = function(key) - local color = SV.db.media.unitframes.power["RUNIC_POWER"] - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.power["RUNIC_POWER"] = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - } - } - }, - castBars = { - order = 11, - type = "group", - guiInline = true, - name = L["Castbar"], - args = { - castClassColor = { - order = 0, - type = "toggle", - name = L["Class Castbars"], - desc = L["Color castbars by the class or reaction type of the unit."], - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames() - end - }, - casting = { - order = 3, - name = L["Interruptable"], - type = "color", - get = function(key) - local color = SV.db.media.unitframes.casting - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.casting = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - spark = { - order = 4, - name = "Spark Color", - type = "color", - get = function(key) - local color = SV.db.media.unitframes.spark - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.spark = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - interrupt = { - order = 5, - name = L["Non-Interruptable"], - type = "color", - get = function(key) - local color = SV.db.media.unitframes.interrupt - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.interrupt = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - } - } - }, - auraBars = { - order = 11, - type = "group", - guiInline = true, - name = L["Aura Bars"], - args = { - auraBarByType = { - order = 1, - name = L["By Type"], - desc = L["Color aurabar debuffs by type."], - type = "toggle", - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames() - end - }, - auraBarShield = { - order = 2, - name = L["Color Shield Buffs"], - desc = L["Color all buffs that reduce incoming damage."], - type = "toggle", - get = function(key) - return SV.db.SVUnit[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key]); - MOD:RefreshUnitFrames() - end - }, - buff_bars = { - order = 10, - name = L["Buffs"], - type = "color", - get = function(key) - local color = SV.db.media.unitframes.buff_bars - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.buff_bars = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - debuff_bars = { - order = 11, - name = L["Debuffs"], - type = "color", - get = function(key) - local color = SV.db.media.unitframes.debuff_bars - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.debuff_bars = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - }, - shield_bars = { - order = 12, - name = L["Shield Buffs Color"], - type = "color", - get = function(key) - local color = SV.db.media.unitframes.shield_bars - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.shield_bars = {rValue, gValue, bValue} - MOD:RefreshAllUnitMedia() - end, - } - } - }, - predict = { - order = 12, - name = L["Heal Prediction"], - type = "group", - args = { - personal = { - order = 1, - name = L["Personal"], - type = "color", - hasAlpha = true, - get = function(key) - local color = SV.db.media.unitframes.predict["personal"] - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.predict["personal"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() - end, - }, - others = { - order = 2, - name = L["Others"], - type = "color", - hasAlpha = true, - get = function(key) - local color = SV.db.media.unitframes.predict["others"] - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.predict["others"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() - end, - }, - absorbs = { - order = 2, - name = L["Absorbs"], - type = "color", - hasAlpha = true, - get = function(key) - local color = SV.db.media.unitframes.predict["absorbs"] - return color[1],color[2],color[3] - end, - set = function(key, rValue, gValue, bValue) - SV.db.media.unitframes.predict["absorbs"] = {rValue, gValue, bValue} - MOD:RefreshUnitFrames() - end, - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua deleted file mode 100644 index 55531c3..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua +++ /dev/null @@ -1,215 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ... ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.focus = { - name = L["Focus Frame"], - type = "group", - order = 9, - childGroups = "tab", - get = function(l)return SV.db.SVUnit["focus"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "focus");MOD:SetUnitFrame("focus")end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("focus");SV.Mentalo:Reset("Focus Frame")end}, - tabGroups = { - order = 3, - type = "group", - name = L["Unit Options"], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - baseGroup = { - order = 1, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - showAuras = { - order = 1, - type = "execute", - name = L["Show Auras"], - func = function()local U = SVUI_Focus;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("focus")end - }, - smartAuraDisplay = { - type = "select", - name = L["Smart Auras"], - desc = L["When set the Buffs and Debuffs will toggle being displayed depending on if the unit is friendly or an enemy. This will not effect the aurabars package."], - order = 2, - values = {["DISABLED"] = L["Disabled"], ["SHOW_DEBUFFS_ON_FRIENDLIES"] = L["Friendlies: Show Debuffs"], ["SHOW_BUFFS_ON_FRIENDLIES"] = L["Friendlies: Show Buffs"]} - }, - rangeCheck = { - order = 3, - name = L["Range Check"], - desc = L["Check if you are in range to cast spells on this specific unit."], - type = "toggle" - }, - predict = { - order = 4, - name = L["Heal Prediction"], - desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], - type = "toggle" - }, - hideonnpc = { - type = "toggle", - order = 5, - name = L["Text Toggle On NPC"], - desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.db.SVUnit["focus"]["power"].hideonnpc end, - set = function(l, m)SV.db.SVUnit["focus"]["power"].hideonnpc = m;MOD:SetUnitFrame("focus")end - }, - threatEnabled = { - type = "toggle", - order = 6, - name = L["Show Threat"] - } - } - }, - sizeGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Size Settings"], - args = { - width = { - order = 1, - name = L["Width"], - type = "range", - width = "full", - min = 50, - max = 500, - step = 1, - }, - height = { - order = 2, - name = L["Height"], - type = "range", - width = "full", - min = 10, - max = 250, - step = 1 - }, - } - }, - } - }, - misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "focus"), - health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "focus"), - power = ns:SetPowerConfigGroup(nil, MOD.SetUnitFrame, "focus"), - name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "focus"), - buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "focus"), - debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "focus"), - castbar = ns:SetCastbarConfigGroup(MOD.SetUnitFrame, "focus"), - aurabar = ns:SetAurabarConfigGroup(false, MOD.SetUnitFrame, "focus"), - icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "focus") - } - } - } -} ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.focustarget = { - name = L["FocusTarget Frame"], - type = "group", - order = 10, - childGroups = "tab", - get = function(l)return SV.db.SVUnit["focustarget"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "focustarget");MOD:SetUnitFrame("focustarget")end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("focustarget")SV.Mentalo:Reset("FocusTarget Frame")end}, - tabGroups = { - order = 3, - type = "group", - name = L["Unit Options"], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - baseGroup = { - order = 1, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - showAuras = {order = 1, type = "execute", name = L["Show Auras"], func = function()local U = SVUI_FocusTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("focustarget")end}, - spacer1 = { - order = 2, - type = "description", - name = "", - }, - rangeCheck = {order = 3, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, - hideonnpc = {type = "toggle", order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.db.SVUnit["focustarget"]["power"].hideonnpc end, set = function(l, m)SV.db.SVUnit["focustarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("focustarget")end}, - threatEnabled = {type = "toggle", order = 5, name = L["Show Threat"]} - } - }, - sizeGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Size Settings"], - args = { - width = {order = 1, width = "full", name = L["Width"], type = "range", min = 50, max = 500, step = 1}, - height = {order = 2, width = "full", name = L["Height"], type = "range", min = 10, max = 250, step = 1}, - } - }, - } - }, - misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "focustarget"), - health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "focustarget"), - power = ns:SetPowerConfigGroup(false, MOD.SetUnitFrame, "focustarget"), - name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "focustarget"), - buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "focustarget"), - debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "focustarget"), - icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "focustarget") - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua deleted file mode 100644 index ca47fef..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua +++ /dev/null @@ -1,173 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ... ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.grid = { - name = L["Grid Frames"], - type = "group", - order = 1200, - childGroups = "tab", - args = { - configureToggle = { - order = 1, - type = "execute", - name = L["Display Frames"], - func = function()MOD:UpdateGroupConfig(_G["SVUI_Raid40"], _G["SVUI_Raid40"].forceShow ~= true or nil)end, - }, - gridCommon = { - order = 2, - type = "group", - guiInline = true, - name = L["General Settings"], - get = function(key) - return SV.db.SVUnit.grid[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key] , "grid"); - MOD:RefreshUnitFrames(); - end, - args = { - enable = { - order = 1, - name = L["Enable Grid Mode"], - desc = L["Converts party, party pet, raid, raid pet, tank and assist frames into symmetrical squares. Ideal for healers."], - type = "toggle" - }, - shownames = { - order = 2, - name = L["Show Grid Names"], - desc = L["Grid frames will show name texts."], - type = "toggle", - set = function(key, value) - if(SV.db.SVUnit.grid.size < 30) then MOD:ChangeDBVar(30, "size", "grid"); end - MOD:ChangeDBVar(value, "shownames", "grid"); - MOD:RefreshUnitFrames(); - end - }, - size = { - order = 3, - name = L["Grid Size"], - desc = L["The universal size of grid squares."], - type = "range", - min = 10, - max = 70, - step = 1, - width = "full" - }, - } - }, - gridAllowed = { - order = 3, - type = "group", - guiInline = true, - name = L["Allowed Frames"], - get = function(key) - return SV.db.SVUnit.grid[key[#key]] - end, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key] , "grid"); - MOD:RefreshUnitFrames(); - end, - args = { - party = { - type = 'toggle', - order = 1, - name = L['Party Grid'], - desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.db.SVUnit.party.gridAllowed end, - set = function(key, value) SV.db.SVUnit.party.gridAllowed = value; MOD:SetGroupFrame("party") end, - }, - partypets = { - type = 'toggle', - order = 2, - name = L['Party Pets Grid'], - desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.db.SVUnit.party.petsGroup.gridAllowed end, - set = function(key, value) SV.db.SVUnit.party.petsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, - }, - partytargets = { - type = 'toggle', - order = 3, - name = L['Party Targets Grid'], - desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.db.SVUnit.party.targetsGroup.gridAllowed end, - set = function(key, value) SV.db.SVUnit.party.targetsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, - }, - raid10 = { - type = 'toggle', - order = 4, - name = L['Raid 10 Grid'], - desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.db.SVUnit.raid10.gridAllowed end, - set = function(key, value) SV.db.SVUnit.raid10.gridAllowed = value; MOD:SetGroupFrame("raid10") end, - }, - raid25 = { - type = 'toggle', - order = 5, - name = L['Raid 25 Grid'], - desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.db.SVUnit.raid25.gridAllowed end, - set = function(key, value) SV.db.SVUnit.raid25.gridAllowed = value; MOD:SetGroupFrame("raid25") end, - }, - raid40 = { - type = 'toggle', - order = 6, - name = L['Raid 40 Grid'], - desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.db.SVUnit.raid40.gridAllowed end, - set = function(key, value) SV.db.SVUnit.raid40.gridAllowed = value; MOD:SetGroupFrame("raid40") end, - }, - raidpet = { - type = 'toggle', - order = 4, - name = L['Raid Pet Grid'], - desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SV.db.SVUnit.raidpet.gridAllowed end, - set = function(key, value) SV.db.SVUnit.raidpet.gridAllowed = value; MOD:SetGroupFrame("raidpet") end, - }, - } - }, - } -} ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua deleted file mode 100644 index b0e76cb..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua +++ /dev/null @@ -1,376 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ... ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.boss = { - name = L["Boss Frames"], - type = "group", - order = 1000, - childGroups = "tab", - get = function(l)return SV.db.SVUnit["boss"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "boss");MOD:SetEnemyFrames("boss", MAX_BOSS_FRAMES)end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - displayFrames = {type = "execute", order = 2, name = L["Display Frames"], desc = L["Force the frames to show, they will act as if they are the player frame."], func = function()MOD:SwapElement("boss", 4)end}, - resetSettings = {type = "execute", order = 3, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("boss")SV.Mentalo:Reset("Boss Frames")end}, - tabGroups = { - order = 3, - type = "group", - name = L["Unit Options"], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - baseGroup = { - order = 1, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - showBy = {order = 1, name = L["Growth Direction"], type = "select", values = {["UP"] = L["Up"], ["DOWN"] = L["Down"]}}, - spacer1 = { - order = 2, - type = "description", - name = "", - }, - rangeCheck = {order = 3, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, - hideonnpc = {type = "toggle", order = 4, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.db.SVUnit["boss"]["power"].hideonnpc end, set = function(l, m)SV.db.SVUnit["boss"]["power"].hideonnpc = m;MOD:SetEnemyFrames("boss")end}, - threatEnabled = {type = "toggle", order = 5, name = L["Show Threat"]} - } - }, - sizeGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Size Settings"], - args = { - width = {order = 1, width = "full", name = L["Width"], type = "range", min = 50, max = 500, step = 1}, - height = {order = 2, width = "full", name = L["Height"], type = "range", min = 10, max = 250, step = 1}, - } - }, - } - }, - misc = ns:SetMiscConfigGroup(false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), - health = ns:SetHealthConfigGroup(false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), - power = ns:SetPowerConfigGroup(false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), - name = ns:SetNameConfigGroup(MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), - portrait = ns:SetPortraitConfigGroup(MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), - buffs = ns:SetAuraConfigGroup(true, "buffs", false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), - debuffs = ns:SetAuraConfigGroup(true, "debuffs", false, MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), - castbar = ns:SetCastbarConfigGroup(MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES), - icons = ns:SetIconConfigGroup(MOD.SetEnemyFrames, "boss", MAX_BOSS_FRAMES) - } - } - } -} ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.arena = { - name = L["Arena Frames"], - type = "group", - order = 1100, - childGroups = "tab", - get = function(l)return SV.db.SVUnit["arena"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "arena");MOD:SetEnemyFrames("arena", 5)end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - displayFrames = {type = "execute", order = 2, name = L["Display Frames"], desc = L["Force the frames to show, they will act as if they are the player frame."], func = function()MOD:SwapElement("arena", 5)end}, - resetSettings = {type = "execute", order = 3, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("arena")SV.Mentalo:Reset("Arena Frames")end}, - tabGroups = { - order = 3, - type = "group", - name = L["Unit Options"], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - baseGroup = { - order = 1, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - showBy = {order = 1, name = L["Growth Direction"], type = "select", values = {["UP"] = L["Up"], ["DOWN"] = L["Down"]}}, - spacer1 = { - order = 2, - type = "description", - name = "", - }, - predict = {order = 3, name = L["Heal Prediction"], desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], type = "toggle"}, - rangeCheck = {order = 4, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, - hideonnpc = {type = "toggle", order = 5, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SV.db.SVUnit["arena"]["power"].hideonnpc end, set = function(l, m)SV.db.SVUnit["arena"]["power"].hideonnpc = m;MOD:SetEnemyFrames("arena")end}, - threatEnabled = {type = "toggle", order = 6, name = L["Show Threat"]} - } - }, - sizeGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Size Settings"], - args = { - width = {order = 1, width = "full", name = L["Width"], type = "range", min = 50, max = 500, step = 1}, - height = {order = 2, width = "full", name = L["Height"], type = "range", min = 10, max = 250, step = 1}, - } - }, - pvp = { - order = 3, - guiInline = true, - type = "group", - name = L["PVP Indicators"], - args = { - enable = { - type = "toggle", - order = 1, - name = L["Enable"], - get = function(l)return SV.db.SVUnit.arena.pvp.enable end, - set = function(l, m)MOD:ChangeDBVar(m, "enable", "arena", "pvp");MOD:SetEnemyFrames("arena", 5)end, - }, - trinketGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Trinkets"], - get = function(l)return SV.db.SVUnit.arena.pvp[l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "arena", "pvp");MOD:SetEnemyFrames("arena", 5)end, - disabled = function() return not SV.db.SVUnit.arena.pvp.enable end, - args = { - trinketPosition = { - type = "select", - order = 1, - name = L["Position"], - values = { - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"] - } - }, - trinketSize = { - order = 2, - type = "range", - name = L["Size"], - min = 10, - max = 60, - step = 1 - }, - trinketX = { - order = 3, - type = "range", - name = L["xOffset"], - min = -60, - max = 60, - step = 1 - }, - trinketY = { - order = 4, - type = "range", - name = L["yOffset"], - min = -60, - max = 60, - step = 1 - } - } - }, - specGroup = { - order = 3, - guiInline = true, - type = "group", - name = L["Enemy Specs"], - get = function(l)return SV.db.SVUnit.arena.pvp[l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "arena", "pvp");MOD:SetEnemyFrames("arena", 5)end, - disabled = function() return not SV.db.SVUnit.arena.pvp.enable end, - args = { - specPosition = { - type = "select", - order = 1, - name = L["Position"], - values = { - ["LEFT"] = L["Left"], - ["RIGHT"] = L["Right"] - } - }, - specSize = { - order = 2, - type = "range", - name = L["Size"], - min = 10, - max = 60, - step = 1 - }, - specX = { - order = 3, - type = "range", - name = L["xOffset"], - min = -60, - max = 60, - step = 1 - }, - specY = { - order = 4, - type = "range", - name = L["yOffset"], - min = -60, - max = 60, - step = 1 - } - } - } - } - }, - } - }, - misc = ns:SetMiscConfigGroup(false, MOD.SetEnemyFrames, "arena", 5), - health = ns:SetHealthConfigGroup(false, MOD.SetEnemyFrames, "arena", 5), - power = ns:SetPowerConfigGroup(false, MOD.SetEnemyFrames, "arena", 5), - name = ns:SetNameConfigGroup(MOD.SetEnemyFrames, "arena", 5), - buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetEnemyFrames, "arena", 5), - debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetEnemyFrames, "arena", 5), - castbar = ns:SetCastbarConfigGroup(MOD.SetEnemyFrames, "arena", 5) - } - } - } -} ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.tank = { - name = L["Tank Frames"], - type = "group", - order = 1200, - childGroups = "tab", - get = function(l)return SV.db.SVUnit["tank"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "tank");MOD:SetGroupFrame("tank")end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("tank")end}, - tabGroups = { - order = 3, - type = "group", - name = L["Unit Options"], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - width = {order = 2, name = L["Width"], type = "range", min = 50, max = 500, step = 1}, - height = {order = 3, name = L["Height"], type = "range", min = 10, max = 250, step = 1} - } - }, - targetsGroup = { - order = 2, - type = "group", - name = L["Tank Target"], - guiInline = true, - get = function(l)return SV.db.SVUnit["tank"]["targetsGroup"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "tank", "targetsGroup");MOD:SetGroupFrame("tank")end, - args = { - enable = {type = "toggle", name = L["Enable"], order = 1}, - width = {order = 2, name = L["Width"], type = "range", min = 10, max = 500, step = 1}, - height = {order = 3, name = L["Height"], type = "range", min = 10, max = 250, step = 1}, - anchorPoint = {type = "select", order = 5, name = L["Anchor Point"], desc = L["What point to anchor to the frame you set to attach to."], values = {TOPLEFT = "TOPLEFT", LEFT = "LEFT", BOTTOMLEFT = "BOTTOMLEFT", RIGHT = "RIGHT", TOPRIGHT = "TOPRIGHT", BOTTOMRIGHT = "BOTTOMRIGHT", CENTER = "CENTER", TOP = "TOP", BOTTOM = "BOTTOM"}}, - xOffset = {order = 6, type = "range", name = L["xOffset"], desc = L["An X offset (in pixels) to be used when anchoring new frames."], min = -500, max = 500, step = 1}, - yOffset = {order = 7, type = "range", name = L["yOffset"], desc = L["An Y offset (in pixels) to be used when anchoring new frames."], min = -500, max = 500, step = 1} - } - } - } - } - } -} ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.assist = { - name = L["Assist Frames"], - type = "group", - order = 1300, - childGroups = "tab", - get = function(l)return SV.db.SVUnit["assist"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "assist");MOD:SetGroupFrame("assist")end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("assist")end}, - tabGroups = { - order = 3, - type = "group", - name = L["Unit Options"], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - width = {order = 2, name = L["Width"], type = "range", min = 50, max = 500, step = 1}, - height = {order = 3, name = L["Height"], type = "range", min = 10, max = 250, step = 1} - } - }, - targetsGroup = { - order = 4, - type = "group", - name = L["Assist Target"], - guiInline = true, - get = function(l)return SV.db.SVUnit["assist"]["targetsGroup"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "assist", "targetsGroup");MOD:SetGroupFrame("assist")end, - args = { - enable = {type = "toggle", name = L["Enable"], order = 1}, - width = {order = 2, name = L["Width"], type = "range", min = 10, max = 500, step = 1}, - height = {order = 3, name = L["Height"], type = "range", min = 10, max = 250, step = 1}, - anchorPoint = {type = "select", order = 5, name = L["Anchor Point"], desc = L["What point to anchor to the frame you set to attach to."], values = {TOPLEFT = "TOPLEFT", LEFT = "LEFT", BOTTOMLEFT = "BOTTOMLEFT", RIGHT = "RIGHT", TOPRIGHT = "TOPRIGHT", BOTTOMRIGHT = "BOTTOMRIGHT", CENTER = "CENTER", TOP = "TOP", BOTTOM = "BOTTOM"}}, - xOffset = {order = 6, type = "range", name = L["xOffset"], desc = L["An X offset (in pixels) to be used when anchoring new frames."], min = -500, max = 500, step = 1}, - yOffset = {order = 7, type = "range", name = L["yOffset"], desc = L["An Y offset (in pixels) to be used when anchoring new frames."], min = -500, max = 500, step = 1} - } - } - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua deleted file mode 100644 index 66b399f..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua +++ /dev/null @@ -1,485 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ... - -SV.Options.args.SVUnit.args.party = { - name = L['Party Frames'], - type = 'group', - order = 11, - childGroups = "tab", - get = function(l)return - SV.db.SVUnit['party'][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, - args = { - enable = { - type = 'toggle', - order = 1, - name = L['Enable'], - }, - configureToggle = { - order = 2, - type = 'execute', - name = L['Display Frames'], - func = function() - MOD:UpdateGroupConfig(SVUI_Party, SVUI_Party.forceShow ~= true or nil) - end, - }, - resetSettings = { - type = 'execute', - order = 3, - name = L['Restore Defaults'], - func = function(l, m)MOD:ResetUnitOptions('party')SV.Mentalo:Reset('Party Frames')end, - }, - tabGroups= { - order=3, - type='group', - name=L['Unit Options'], - childGroups="tree", - args= { - common = { - order = 4, - type = 'group', - name = L['General'], - args = { - hideonnpc = { - type = 'toggle', - order = 2, - name = L['Text Toggle On NPC'], - desc = L['Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point.'], - get = function(l)return SV.db.SVUnit['party']['power'].hideonnpc end, - set = function(l, m)SV.db.SVUnit['party']['power'].hideonnpc = m;MOD:SetGroupFrame('party')end, - }, - rangeCheck = { - order = 3, - name = L["Range Check"], - desc = L["Check if you are in range to cast spells on this specific unit."], - type = "toggle", - }, - gps = { - order = 4, - name = "GPS Tracking", - desc = "Show an arrow giving the direction and distance to the frames unit.", - type = "toggle", - }, - predict = { - order = 5, - name = L['Heal Prediction'], - desc = L['Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals.'], - type = 'toggle', - }, - threatEnabled = { - type = 'toggle', - order = 6, - name = L['Show Threat'], - }, - colorOverride = { - order = 7, - name = L['Class Color Override'], - desc = L['Override the default class color setting.'], - type = 'select', - values = { - ['USE_DEFAULT'] = L['Use Default'], - ['FORCE_ON'] = L['Force On'], - ['FORCE_OFF'] = L['Force Off'], - }, - }, - positionsGroup = { - order = 100, - name = L['Size and Positions'], - type = 'group', - guiInline = true, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party', nil, nil, true)end, - args = { - width = { - order = 1, - name = L['Width'], - type = 'range', - min = 10, - max = 500, - step = 1, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, - }, - height = { - order = 2, - name = L['Height'], - type = 'range', - min = 10, - max = 500, - step = 1, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, - }, - spacer = { - order = 3, - name = '', - type = 'description', - width = 'full', - }, - showBy = { - order = 4, - name = L['Growth Direction'], - desc = L['Growth direction from the first unitframe.'], - type = 'select', - values = { - DOWN_RIGHT = format(L['%s and then %s'], L['Down'], L['Right']), - DOWN_LEFT = format(L['%s and then %s'], L['Down'], L['Left']), - UP_RIGHT = format(L['%s and then %s'], L['Up'], L['Right']), - UP_LEFT = format(L['%s and then %s'], L['Up'], L['Left']), - RIGHT_DOWN = format(L['%s and then %s'], L['Right'], L['Down']), - RIGHT_UP = format(L['%s and then %s'], L['Right'], L['Up']), - LEFT_DOWN = format(L['%s and then %s'], L['Left'], L['Down']), - LEFT_UP = format(L['%s and then %s'], L['Left'], L['Up']), - }, - }, - groupCount = { - order = 5, - type = 'range', - name = L['Number of Groups'], - min = 1, - max = 8, - step = 1, - set = function(l, m) - MOD:ChangeDBVar(m, l[#l], "party"); - MOD:SetGroupFrame('party') - if SVUI_Party.isForced then - MOD:UpdateGroupConfig(SVUI_Party) - MOD:UpdateGroupConfig(SVUI_Party, true) - end - end, - }, - gRowCol = { - order = 6, - type = 'range', - name = L['Groups Per Row/Column'], - min = 1, - max = 8, - step = 1, - set = function(l, m) - MOD:ChangeDBVar(m, l[#l], "party"); - MOD:SetGroupFrame('party') - if SVUI_Party.isForced then - MOD:UpdateGroupConfig(SVUI_Party) - MOD:UpdateGroupConfig(SVUI_Party, true) - end - end, - }, - wrapXOffset = { - order = 7, - type = 'range', - name = L['Horizontal Spacing'], - min = 0, - max = 50, - step = 1, - }, - wrapYOffset = { - order = 8, - type = 'range', - name = L['Vertical Spacing'], - min = 0, - max = 50, - step = 1, - }, - }, - }, - visibilityGroup = { - order = 200, - name = L['Visibility'], - type = 'group', - guiInline = true, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party', nil, nil, true)end, - args = { - showPlayer = { - order = 1, - type = 'toggle', - name = L['Display Player'], - desc = L['When true, the header includes the player when not in a raid.'], - }, - visibility = { - order = 2, - type = 'input', - name = L['Visibility'], - desc = L['The following macro must be true in order for the group to be shown, in addition to any filter that may already be set.'], - width = 'full', - desc = L['TEXT_FORMAT_DESC'], - }, - }, - }, - sortingGroup = { - order = 300, - type = 'group', - guiInline = true, - name = L['Grouping & Sorting'], - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party', nil, nil, true)end, - args = { - sortMethod = { - order = 1, - name = L['Group By'], - desc = L['Set the order that the group will sort.'], - type = 'select', - values = { - ["CLASS"] = CLASS, - ["ROLE"] = ROLE.."(Tanks, Healers, DPS)", - ["ROLE_TDH"] = ROLE.."(Tanks, DPS, Healers)", - ["ROLE_HDT"] = ROLE.."(Healers, DPS, Tanks)", - ["ROLE_HTD"] = ROLE.."(Healers, Tanks, DPS)", - ["NAME"] = NAME, - ["GROUP"] = GROUP, - }, - }, - sortDir = { - order = 2, - name = L['Sort Direction'], - desc = L['Defines the sort order of the selected sort method.'], - type = 'select', - values = { - ['ASC'] = L['Ascending'], - ['DESC'] = L['Descending'], - }, - }, - spacer = { - order = 3, - type = 'description', - width = 'full', - name = ' ', - }, - customSorting = { - order = 4, - name = L['Custom Sorting'], - desc = L['Enabling this allows unique sorting.'], - type = 'toggle', - }, - invertGroupingOrder = { - order = 5, - name = L['Invert Grouping Order'], - desc = L['Enabling this inverts the sorting order.'], - disabled = function()return not SV.db.SVUnit['party'].customSorting end, - type = 'toggle', - }, - startFromCenter = { - order = 6, - name = L['Start Near Center'], - desc = L['The initial group will start near the center and grow out.'], - disabled = function()return not SV.db.SVUnit['party'].customSorting end, - type = 'toggle', - }, - }, - }, - - }, - }, - auraWatch = { - order = 600, - type = 'group', - name = L['Aura Watch'], - get = function(l)return - SV.db.SVUnit['party']['auraWatch'][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "auraWatch");MOD:SetGroupFrame('party')end, - args = { - enable = { - type = 'toggle', - name = L['Enable'], - order = 1, - }, - size = { - type = 'range', - name = L['Size'], - desc = L['Size of the indicator icon.'], - order = 2, - min = 4, - max = 15, - step = 1, - }, - configureButton = { - type = 'execute', - name = L['Configure Auras'], - func = function()ns:SetToFilterConfig('BuffWatch')end, - order = 3, - }, - - }, - }, - misc = ns:SetMiscConfigGroup(true, MOD.SetGroupFrame, 'party'), - health = ns:SetHealthConfigGroup(true, MOD.SetGroupFrame, 'party'), - power = ns:SetPowerConfigGroup(false, MOD.SetGroupFrame, 'party'), - name = ns:SetNameConfigGroup(MOD.SetGroupFrame, 'party'), - portrait = ns:SetPortraitConfigGroup(MOD.SetGroupFrame, 'party'), - buffs = ns:SetAuraConfigGroup(true, 'buffs', true, MOD.SetGroupFrame, 'party'), - debuffs = ns:SetAuraConfigGroup(true, 'debuffs', true, MOD.SetGroupFrame, 'party'), - petsGroup = { - order = 800, - type = 'group', - name = L['Party Pets'], - get = function(l)return SV.db.SVUnit['party']['petsGroup'][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "petsGroup");MOD:SetGroupFrame('party')end, - args = { - enable = { - type = 'toggle', - name = L['Enable'], - order = 1, - }, - width = { - order = 3, - name = L['Width'], - type = 'range', - min = 10, - max = 500, - step = 1, - }, - height = { - order = 4, - name = L['Height'], - type = 'range', - min = 10, - max = 250, - step = 1, - }, - anchorPoint = { - type = 'select', - order = 5, - name = L['Anchor Point'], - desc = L['What point to anchor to the frame you set to attach to.'], - values = {TOPLEFT='TOPLEFT',LEFT='LEFT',BOTTOMLEFT='BOTTOMLEFT',RIGHT='RIGHT',TOPRIGHT='TOPRIGHT',BOTTOMRIGHT='BOTTOMRIGHT',CENTER='CENTER',TOP='TOP',BOTTOM='BOTTOM'}, - }, - xOffset = { - order = 6, - type = 'range', - name = L['xOffset'], - desc = L['An X offset (in pixels) to be used when anchoring new frames.'], - min = - 500, - max = 500, - step = 1, - }, - yOffset = { - order = 7, - type = 'range', - name = L['yOffset'], - desc = L['An Y offset (in pixels) to be used when anchoring new frames.'], - min = - 500, - max = 500, - step = 1, - }, - name_length = { - order = 8, - name = L["Name Length"], - desc = L["TEXT_FORMAT_DESC"], - type = "range", - width = "full", - min = 1, - max = 30, - step = 1, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], "party", "petsGroup"); - local tag = "[name:" .. value .. "]"; - MOD:ChangeDBVar(tag, "tags", "party", "petsGroup"); - end, - } - }, - }, - targetsGroup = { - order = 900, - type = 'group', - name = L['Party Targets'], - get = function(l)return - SV.db.SVUnit['party']['targetsGroup'][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "targetsGroup");MOD:SetGroupFrame('party')end, - args = { - enable = { - type = 'toggle', - name = L['Enable'], - order = 1, - }, - width = { - order = 3, - name = L['Width'], - type = 'range', - min = 10, - max = 500, - step = 1, - }, - height = { - order = 4, - name = L['Height'], - type = 'range', - min = 10, - max = 250, - step = 1, - }, - anchorPoint = { - type = 'select', - order = 5, - name = L['Anchor Point'], - desc = L['What point to anchor to the frame you set to attach to.'], - values = {TOPLEFT='TOPLEFT',LEFT='LEFT',BOTTOMLEFT='BOTTOMLEFT',RIGHT='RIGHT',TOPRIGHT='TOPRIGHT',BOTTOMRIGHT='BOTTOMRIGHT',CENTER='CENTER',TOP='TOP',BOTTOM='BOTTOM'}, - }, - xOffset = { - order = 6, - type = 'range', - name = L['xOffset'], - desc = L['An X offset (in pixels) to be used when anchoring new frames.'], - min = - 500, - max = 500, - step = 1, - }, - yOffset = { - order = 7, - type = 'range', - name = L['yOffset'], - desc = L['An Y offset (in pixels) to be used when anchoring new frames.'], - min = - 500, - max = 500, - step = 1, - }, - name_length = { - order = 8, - name = L["Name Length"], - desc = L["TEXT_FORMAT_DESC"], - type = "range", - width = "full", - min = 1, - max = 30, - step = 1, - set = function(key, value) - MOD:ChangeDBVar(value, key[#key], "party", "targetsGroup"); - local tag = "[name:" .. value .. "]"; - MOD:ChangeDBVar(tag, "tags", "party", "targetsGroup"); - end, - } - }, - }, - icons = ns:SetIconConfigGroup(MOD.SetGroupFrame, 'party') - } - } - }, -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua deleted file mode 100644 index 68a370f..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua +++ /dev/null @@ -1,253 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ... ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.pet = { - name = L["Pet Frame"], - type = "group", - order = 4, - childGroups = "tab", - get = function(l)return SV.db.SVUnit["pet"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "pet");MOD:SetUnitFrame("pet")end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("pet")SV.Mentalo:Reset("Pet Frame")end}, - tabGroups = { - order = 3, - type = "group", - name = L["Unit Options"], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - showAuras = { - order = 1, - type = "execute", - name = L["Show Auras"], - func = function()local U = SVUI_Pet;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("pet")end - }, - miscGroup = { - order = 2, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - rangeCheck = { - order = 2, - name = L["Range Check"], - desc = L["Check if you are in range to cast spells on this specific unit."], - type = "toggle" - }, - predict = { - order = 3, - name = L["Heal Prediction"], - desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], - type = "toggle" - }, - hideonnpc = { - type = "toggle", - order = 4, - name = L["Text Toggle On NPC"], - desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.db.SVUnit["pet"]["power"].hideonnpc end, - set = function(l, m)SV.db.SVUnit["pet"]["power"].hideonnpc = m;MOD:SetUnitFrame("pet")end - }, - threatEnabled = { - type = "toggle", - order = 5, - name = L["Show Threat"] - }, - } - }, - scaleGroup = { - order = 6, - type = "group", - guiInline = true, - name = L["Frame Size"], - args = { - width = {order = 1, name = L["Width"], width = "full", type = "range", min = 50, max = 500, step = 1}, - height = {order = 2, name = L["Height"], width = "full", type = "range", min = 10, max = 250, step = 1}, - } - }, - watchGroup = { - order = 8, - type = "group", - guiInline = true, - name = L["Aura Watch"], - get = function(l)return SV.db.SVUnit["pet"]["auraWatch"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "pet", "auraWatch");MOD:SetUnitFrame("pet")end, - args = { - enable = { - type = "toggle", - name = L["Enable"], - order = 1 - }, - size = { - type = "range", - name = L["Size"], - desc = L["Size of the indicator icon."], - order = 2, - min = 4, - max = 15, - step = 1 - } - } - }, - }, - }, - misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "pet"), - health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "pet"), - power = ns:SetPowerConfigGroup(false, MOD.SetUnitFrame, "pet"), - portrait = ns:SetPortraitConfigGroup(MOD.SetUnitFrame, "pet"), - name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "pet"), - buffs = ns:SetAuraConfigGroup(true, "buffs", false, MOD.SetUnitFrame, "pet"), - debuffs = ns:SetAuraConfigGroup(true, "debuffs", false, MOD.SetUnitFrame, "pet") - } - } - } -} ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.pettarget = { - name = L["PetTarget Frame"], - type = "group", order = 5, - childGroups = "tab", - get = function(l)return SV.db.SVUnit["pettarget"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "pettarget");MOD:SetUnitFrame("pettarget")end, - args = { - enable = {type = "toggle", order = 1, name = L["Enable"]}, - resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("pettarget")SV.Mentalo:Reset("PetTarget Frame")end}, - tabGroups = { - order = 3, - type = "group", - name = L["Unit Options"], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - showAuras = { - order = 3, - type = "execute", - name = L["Show Auras"], - func = function()local U = SVUI_PetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("pettarget")end - }, - width = {order = 4, name = L["Width"], type = "range", min = 50, max = 500, step = 1}, - height = {order = 5, name = L["Height"], type = "range", min = 10, max = 250, step = 1}, - rangeCheck = {order = 6, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle"}, - hideonnpc = { - type = "toggle", - order = 7, - name = L["Text Toggle On NPC"], - desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.db.SVUnit["pettarget"]["power"].hideonnpc end, - set = function(l, m)SV.db.SVUnit["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end - }, - threatEnabled = {type = "toggle", order = 13, name = L["Show Threat"]} - } - }, - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - showAuras = { - order = 1, - type = "execute", - name = L["Show Auras"], - func = function()local U = SVUI_PetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("pettarget")end - }, - miscGroup = { - order = 2, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - rangeCheck = { - order = 2, - name = L["Range Check"], - desc = L["Check if you are in range to cast spells on this specific unit."], - type = "toggle" - }, - hideonnpc = { - type = "toggle", - order = 4, - name = L["Text Toggle On NPC"], - desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.db.SVUnit["pettarget"]["power"].hideonnpc end, - set = function(l, m)SV.db.SVUnit["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end - }, - threatEnabled = { - type = "toggle", - order = 5, - name = L["Show Threat"] - }, - } - }, - scaleGroup = { - order = 3, - type = "group", - guiInline = true, - name = L["Frame Size"], - args = { - width = {order = 1, name = L["Width"], width = "full", type = "range", min = 50, max = 500, step = 1}, - height = {order = 2, name = L["Height"], width = "full", type = "range", min = 10, max = 250, step = 1}, - } - }, - }, - }, - misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "pettarget"), - health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "pettarget"), - power = ns:SetPowerConfigGroup(false, MOD.SetUnitFrame, "pettarget"), - name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "pettarget"), - buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "pettarget"), - debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "pettarget") - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua deleted file mode 100644 index 5e78f46..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua +++ /dev/null @@ -1,298 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ... ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.player={ - name = L['Player Frame'], - type = 'group', - order = 3, - childGroups = "tab", - get = function(l)return SV.db.SVUnit['player'][l[#l]]end, - set = function(l,m)MOD:ChangeDBVar(m, l[#l], "player");MOD:SetUnitFrame('player')end, - args = { - enable = { - type = 'toggle', - order = 1, - name = L['Enable'] - }, - resetSettings = { - type = 'execute', - order = 2, - name = L['Restore Defaults'], - func = function(l,m) - MOD:ResetUnitOptions('player') - SV.Mentalo:Reset('Player Frame') - end - }, - tabGroups = { - order = 3, - type = 'group', - name = L['Unit Options'], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = 'group', - name = L['General Settings'], - args = { - baseGroup = { - order = 1, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - showAuras = { - order = 1, - type = "execute", - name = L["Show Auras"], - func = function()local U = SVUI_Player;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("player")end - }, - lowmana = { - order = 2, - name = L["Low Mana Threshold"], - desc = L["When you mana falls below this point, text will flash on the player frame."], - type = "range", - min = 0, - max = 100, - step = 1 - }, - combatfade = { - order = 3, - name = L["Combat Fade"], - desc = L["Fade the unitframe when out of combat, not casting, no target exists."], - type = "toggle", - set = function(l, m) - MOD:ChangeDBVar(m, l[#l], "player"); - MOD:SetUnitFrame("player") - if m == true then - SVUI_Pet:SetParent(SVUI_Player) - else - SVUI_Pet:SetParent(SVUI_UnitFrameParent) - end - end - }, - predict = { - order = 4, - name = L["Heal Prediction"], - desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], - type = "toggle" - }, - hideonnpc = { - type = "toggle", - order = 5, - name = L["Text Toggle On NPC"], - desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.db.SVUnit["player"]["power"].hideonnpc end, - set = function(l, m)SV.db.SVUnit["player"]["power"].hideonnpc = m;MOD:SetUnitFrame("player")end - }, - threatEnabled = { - type = "toggle", - order = 6, - name = L["Show Threat"] - }, - playerExpBar = { - order = 7, - name = "Playerframe Experience Bar", - desc = "Show player experience on power bar mouseover", - type = "toggle", - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player");SV:StaticPopup_Show("RL_CLIENT")end - }, - playerRepBar = { - order = 8, - name = "Playerframe Reputation Bar", - desc = "Show player reputations on power bar mouseover", - type = "toggle", - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player");SV:StaticPopup_Show("RL_CLIENT")end - } - } - }, - sizeGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Size Settings"], - args = { - width = { - order = 1, - name = L["Width"], - type = "range", - width = "full", - min = 50, - max = 500, - step = 1, - set = function(l, m) - if SV.db.SVUnit["player"].castbar.width == SV.db.SVUnit["player"][l[#l]] then - SV.db.SVUnit["player"].castbar.width = m - end - MOD:ChangeDBVar(m, l[#l], "player"); - MOD:SetUnitFrame("player") - end - }, - height = { - order = 2, - name = L["Height"], - type = "range", - width = "full", - min = 10, - max = 250, - step = 1 - }, - } - }, - pvpGroup = { - order = 3, - type = "group", - guiInline = true, - name = PVP, - get = function(l)return SV.db.SVUnit["player"]["pvp"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player", "pvp");MOD:SetUnitFrame("player")end, - args = { - position = { - type = "select", - order = 2, - name = L["Position"], - values = { - TOPLEFT = "TOPLEFT", - LEFT = "LEFT", - BOTTOMLEFT = "BOTTOMLEFT", - RIGHT = "RIGHT", - TOPRIGHT = "TOPRIGHT", - BOTTOMRIGHT = "BOTTOMRIGHT", - CENTER = "CENTER", - TOP = "TOP", - BOTTOM = "BOTTOM" - } - }, - tags = { - order = 100, - name = L["Text Format"], - type = "input", - width = "full", - desc = L["TEXT_FORMAT_DESC"] - } - } - } - } - }, - misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "player"), - health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "player"), - power = ns:SetPowerConfigGroup(true, MOD.SetUnitFrame, "player"), - name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "player"), - portrait = ns:SetPortraitConfigGroup(MOD.SetUnitFrame, "player"), - buffs = ns:SetAuraConfigGroup(true, "buffs", false, MOD.SetUnitFrame, "player"), - debuffs = ns:SetAuraConfigGroup(true, "debuffs", false, MOD.SetUnitFrame, "player"), - castbar = ns:SetCastbarConfigGroup(MOD.SetUnitFrame, "player"), - aurabar = ns:SetAurabarConfigGroup(true, MOD.SetUnitFrame, "player"), - icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "player"), - classbar = { - order = 1000, - type = "group", - name = L["Classbar"], - get = function(l)return SV.db.SVUnit["player"]["classbar"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player", "classbar");MOD:SetUnitFrame("player")end, - args = { - enable = { - type = "toggle", - order = 1, - name = L["Enable"] - }, - commonGroup = { - order = 2, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - slideLeft = { - type = "toggle", - order = 1, - name = L["Slide Left"] - }, - detachFromFrame = { - type = "toggle", - order = 2, - name = L["Detach From Frame"] - }, - stagger = { - type = "toggle", - order = 3, - name = L["Stagger Bar"], - get = function(l)return SV.db.SVUnit["player"]["stagger"].enable end, - set = function(l, m)MOD:ChangeDBVar(m, "enable", "player", "stagger");MOD:SetUnitFrame("player")end, - disabled = SV.class ~= "MONK", - }, - druidMana = { - type = "toggle", - order = 12, - name = L["Druid Mana"], - desc = L["Display druid mana bar when in cat or bear form and when mana is not 100%."], - get = function(key) - return SV.db.SVUnit["player"]["power"].druidMana - end, - set = function(key, value) - MOD:ChangeDBVar(value, "druidMana", "player", "power"); - MOD:SetUnitFrame("player") - end, - disabled = SV.class ~= "DRUID", - } - } - }, - sizeGroup = { - order = 3, - guiInline = true, - type = "group", - name = L["Size Settings"], - args = { - height = { - type = "range", - order = 4, - width = "full", - name = L["Size"], - min = 15, - max = 45, - step = 1 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua deleted file mode 100644 index 927758e..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua +++ /dev/null @@ -1,736 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ... - -local subOrder = 11; -for w=10,40,15 do - subOrder = subOrder + 1 - SV.Options.args.SVUnit.args["raid" .. w] = { - name = L["Raid-" .. w .. " Frames"], - type = "group", - order = subOrder, - childGroups = "tab", - get = function(l) return SV.db.SVUnit["raid" .. w][l[#l]] end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w)end, - args = { - enable = - { - type = "toggle", - order = 1, - name = L["Enable"], - }, - configureToggle = { - order = 2, - type = "execute", - name = L["Display Frames"], - func = function()MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w], _G["SVUI_Raid" .. w].forceShow ~= true or nil)end, - }, - resetSettings = { - type = "execute", - order = 3, - name = L["Restore Defaults"], - func = function(l, m)MOD:ResetUnitOptions("raid" .. w)SV.Mentalo:Reset("Raid 1-" .. w .. " Frames")end, - }, - tabGroups = { - order = 3, - type = "group", - name = L["Unit Options"], - childGroups = "tree", - args = { - commonGroup = { - order = 1, - type = "group", - name = L["General Settings"], - args = { - hideonnpc = - { - type = "toggle", - order = 1, - name = L["Text Toggle On NPC"], - desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.db.SVUnit["raid" .. w]["power"].hideonnpc end, - set = function(l, m)SV.db.SVUnit["raid" .. w]["power"].hideonnpc = m;MOD:SetGroupFrame("raid" .. w)end, - }, - rangeCheck = { - order = 2, - name = L["Range Check"], - desc = L["Check if you are in range to cast spells on this specific unit."], - type = "toggle", - }, - gps = { - order = 3, - name = "GPS Tracking", - desc = "Show an arrow giving the direction and distance to the frames unit.", - type = "toggle", - }, - predict = { - order = 4, - name = L["Heal Prediction"], - desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], - type = "toggle", - }, - threatEnabled = { - type = "toggle", - order = 5, - name = L["Show Threat"], - }, - colorOverride = { - order = 6, - name = L["Class Color Override"], - desc = L["Override the default class color setting."], - type = "select", - values = - { - ["USE_DEFAULT"] = L["Use Default"], - ["FORCE_ON"] = L["Force On"], - ["FORCE_OFF"] = L["Force Off"], - }, - }, - positionsGroup = { - order = 100, - name = L["Size and Positions"], - type = "group", - guiInline = true, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w, nil, nil, true)end, - args = - { - width = - { - order = 1, - name = L["Width"], - type = "range", - min = 10, - max = 500, - step = 1, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w)end, - }, - height = - { - order = 2, - name = L["Height"], - type = "range", - min = 10, - max = 500, - step = 1, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w)end, - }, - spacer = - { - order = 3, - name = "", - type = "description", - width = "full", - }, - showBy = - { - order = 4, - name = L["Growth Direction"], - desc = L["Growth direction from the first unitframe."], - type = "select", - values = - { - DOWN_RIGHT = format(L["%s and then %s"], L["Down"], L["Right"]), - DOWN_LEFT = format(L["%s and then %s"], L["Down"], L["Left"]), - UP_RIGHT = format(L["%s and then %s"], L["Up"], L["Right"]), - UP_LEFT = format(L["%s and then %s"], L["Up"], L["Left"]), - RIGHT_DOWN = format(L["%s and then %s"], L["Right"], L["Down"]), - RIGHT_UP = format(L["%s and then %s"], L["Right"], L["Up"]), - LEFT_DOWN = format(L["%s and then %s"], L["Left"], L["Down"]), - LEFT_UP = format(L["%s and then %s"], L["Left"], L["Up"]), - }, - }, - groupCount = - { - order = 5, - type = "range", - name = L["Number of Groups"], - min = 1, - max = 8, - step = 1, - set = function(l, m) - MOD:ChangeDBVar(m, l[#l], "raid" .. w); - MOD:SetGroupFrame("raid" .. w) - if _G["SVUI_Raid" .. w].isForced then - MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w]) - MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w], true) - end - end, - }, - gRowCol = - { - order = 6, - type = "range", - name = L["Groups Per Row / Column"], - min = 1, - max = 8, - step = 1, - set = function(l, m) - MOD:ChangeDBVar(m, l[#l], "raid" .. w); - MOD:SetGroupFrame("raid" .. w) - if _G["SVUI_Raid" .. w].isForced then - MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w]) - MOD:UpdateGroupConfig(_G["SVUI_Raid" .. w], true) - end - end, - }, - wrapXOffset = - { - order = 7, - type = "range", - name = L["Horizontal Spacing"], - min = 0, - max = 50, - step = 1, - }, - wrapYOffset = - { - order = 8, - type = "range", - name = L["Vertical Spacing"], - min = 0, - max = 50, - step = 1, - }, - }, - }, - visibilityGroup = { - order = 200, - name = L["Visibility"], - type = "group", - guiInline = true, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w, nil, nil, true)end, - args = - { - showPlayer = - { - order = 1, - type = "toggle", - name = L["Display Player"], - desc = L["When true, the header includes the player when not in a raid."], - }, - visibility = - { - order = 2, - type = "input", - name = L["Visibility"], - desc = L["The following macro must be true in order for the group to be shown, in addition to any filter that may already be set."], - width = "full", - desc = L["TEXT_FORMAT_DESC"], - }, - }, - }, - sortingGroup = { - order = 300, - type = "group", - guiInline = true, - name = L["Sorting"], - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w, nil, nil, true)end, - args = - { - sortMethod = - { - order = 1, - name = L["Group By"], - desc = L["Set the order that the group will sort."], - type = "select", - values = - { - ["CLASS"] = CLASS, - ["ROLE"] = ROLE.."(Tanks, Healers, DPS)", - ["ROLE_TDH"] = ROLE.."(Tanks, DPS, Healers)", - ["ROLE_HDT"] = ROLE.."(Healers, DPS, Tanks)", - ["ROLE_HTD"] = ROLE.."(Healers, Tanks, DPS)", - ["NAME"] = NAME, - ["MTMA"] = L["Main Tanks / Main Assist"], - ["GROUP"] = GROUP, - }, - }, - sortDir = - { - order = 2, - name = L["Sort Direction"], - desc = L["Defines the sort order of the selected sort method."], - type = "select", - values = - { - ["ASC"] = L["Ascending"], - ["DESC"] = L["Descending"], - }, - }, - spacer = - { - order = 3, - type = "description", - width = "full", - name = " ", - }, - customSorting = - { - order = 4, - name = L["Raid-Wide Sorting"], - desc = L["Enabling this allows raid-wide sorting however you will not be able to distinguish between groups."], - type = "toggle", - }, - invertGroupingOrder = - { - order = 5, - name = L["Invert Grouping Order"], - desc = L["Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from."], - disabled = function()return not SV.db.SVUnit["raid" .. w].customSorting end, - type = "toggle", - }, - startFromCenter = - { - order = 6, - name = L["Start Near Center"], - desc = L["The initial group will start near the center and grow out."], - disabled = function()return not SV.db.SVUnit["raid" .. w].customSorting end, - type = "toggle", - }, - }, - } - } - }, - misc = ns:SetMiscConfigGroup(true, MOD.SetGroupFrame, "raid" .. w), - health = ns:SetHealthConfigGroup(true, MOD.SetGroupFrame, "raid" .. w), - power = ns:SetPowerConfigGroup(false, MOD.SetGroupFrame, "raid" .. w), - name = ns:SetNameConfigGroup(MOD.SetGroupFrame, "raid" .. w), - buffs = ns:SetAuraConfigGroup(true, "buffs", true, MOD.SetGroupFrame, "raid" .. w), - debuffs = ns:SetAuraConfigGroup(true, "debuffs", true, MOD.SetGroupFrame, "raid" .. w), - auraWatch = { - order = 600, - type = "group", - name = L["Aura Watch"], - args = { - enable = { - type = "toggle", - name = L["Enable"], - order = 1, - get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.enable end, - set = function(l, m)MOD:ChangeDBVar(m, "enable", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, - }, - size = { - type = "range", - name = L["Size"], - desc = L["Size of the indicator icon."], - order = 2, - min = 4, - max = 15, - step = 1, - get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.size end, - set = function(l, m)MOD:ChangeDBVar(m, "size", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, - }, - configureButton = { - type = "execute", - name = L["Configure Auras"], - func = function()ns:SetToFilterConfig("BuffWatch")end, - order = 3, - }, - - }, - }, - rdebuffs = { - order = 800, - type = "group", - name = L["RaidDebuff Indicator"], - get = function(l)return - SV.db.SVUnit["raid" .. w]["rdebuffs"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w, "rdebuffs");MOD:SetGroupFrame("raid" .. w)end, - args = { - enable = { - type = "toggle", - name = L["Enable"], - order = 1, - }, - size = { - type = "range", - name = L["Size"], - order = 2, - min = 8, - max = 35, - step = 1, - }, - fontSize = { - type = "range", - name = L["Font Size"], - order = 3, - min = 7, - max = 22, - step = 1, - }, - xOffset = { - order = 4, - type = "range", - name = L["xOffset"], - min = - 300, - max = 300, - step = 1, - }, - yOffset = { - order = 5, - type = "range", - name = L["yOffset"], - min = - 300, - max = 300, - step = 1, - }, - configureButton = { - type = "execute", - name = L["Configure Auras"], - func = function()ns:SetToFilterConfig("Raid")end, - order = 7, - }, - }, - }, - icons = ns:SetIconConfigGroup(MOD.SetGroupFrame, "raid" .. w), - }, - }, - }, - } -end - -subOrder = subOrder + 1 -SV.Options.args.SVUnit.args.raidpet ={ - order = subOrder, - type = 'group', - name = L['Raid Pet Frames'], - childGroups = "tab", - get = function(l)return - SV.db.SVUnit['raidpet'][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')end, - args ={ - enable ={ - type = 'toggle', - order = 1, - name = L['Enable'], - }, - configureToggle ={ - order = 2, - type = 'execute', - name = L['Display Frames'], - func = function()MOD:UpdateGroupConfig(SVUI_Raidpet, SVUI_Raidpet.forceShow ~= true or nil)end, - }, - resetSettings ={ - type = 'execute', - order = 3, - name = L['Restore Defaults'], - func = function(l, m)MOD:ResetUnitOptions('raidpet')SV.Mentalo:Reset('Raid Pet Frames')MOD:SetGroupFrame('raidpet', nil, nil, true)end, - }, - tabGroups={ - order=3, - type='group', - name=L['Unit Options'], - childGroups="tree", - args={ - commonGroup={ - order=1, - type='group', - name=L['General Settings'], - args={ - rangeCheck ={ - order = 3, - name = L["Range Check"], - desc = L["Check if you are in range to cast spells on this specific unit."], - type = "toggle", - }, - predict ={ - order = 4, - name = L['Heal Prediction'], - desc = L['Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals.'], - type = 'toggle', - }, - threatEnabled ={ - type = 'toggle', - order = 5, - name = L['Show Threat'], - }, - colorOverride ={ - order = 6, - name = L['Class Color Override'], - desc = L['Override the default class color setting.'], - type = 'select', - values ={ - ['USE_DEFAULT'] = L['Use Default'], - ['FORCE_ON'] = L['Force On'], - ['FORCE_OFF'] = L['Force Off'], - }, - }, - positionsGroup ={ - order = 100, - name = L['Size and Positions'], - type = 'group', - guiInline = true, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet', nil, nil, true)end, - args ={ - width ={ - order = 1, - name = L['Width'], - type = 'range', - min = 10, - max = 500, - step = 1, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')end, - }, - height ={ - order = 2, - name = L['Height'], - type = 'range', - min = 10, - max = 500, - step = 1, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')end, - }, - spacer ={ - order = 3, - name = '', - type = 'description', - width = 'full', - }, - showBy ={ - order = 4, - name = L['Growth Direction'], - desc = L['Growth direction from the first unitframe.'], - type = 'select', - values ={ - DOWN_RIGHT = format(L['%s and then %s'], L['Down'], L['Right']), - DOWN_LEFT = format(L['%s and then %s'], L['Down'], L['Left']), - UP_RIGHT = format(L['%s and then %s'], L['Up'], L['Right']), - UP_LEFT = format(L['%s and then %s'], L['Up'], L['Left']), - RIGHT_DOWN = format(L['%s and then %s'], L['Right'], L['Down']), - RIGHT_UP = format(L['%s and then %s'], L['Right'], L['Up']), - LEFT_DOWN = format(L['%s and then %s'], L['Left'], L['Down']), - LEFT_UP = format(L['%s and then %s'], L['Left'], L['Up']), - }, - }, - groupCount ={ - order = 7, - type = 'range', - name = L['Number of Groups'], - min = 1, - max = 8, - step = 1, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')if - SVUI_Raidpet.isForced then MOD:UpdateGroupConfig(SVUI_Raidpet)MOD:UpdateGroupConfig(SVUI_Raidpet, true)end end, - }, - gRowCol ={ - order = 8, - type = 'range', - name = L['Groups Per Row/Column'], - min = 1, - max = 8, - step = 1, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')if - SVUI_Raidpet.isForced then MOD:UpdateGroupConfig(SVUI_Raidpet)MOD:UpdateGroupConfig(SVUI_Raidpet, true)end end, - }, - wrapXOffset ={ - order = 9, - type = 'range', - name = L['Horizontal Spacing'], - min = 0, - max = 50, - step = 1, - }, - wrapYOffset ={ - order = 10, - type = 'range', - name = L['Vertical Spacing'], - min = 0, - max = 50, - step = 1, - }, - }, - }, - visibilityGroup ={ - order = 200, - name = L['Visibility'], - type = 'group', - guiInline = true, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet', nil, nil, true)end, - args ={ - visibility ={ - order = 2, - type = 'input', - name = L['Visibility'], - desc = L['The following macro must be true in order for the group to be shown, in addition to any filter that may already be set.'], - width = 'full', - desc = L['TEXT_FORMAT_DESC'], - }, - }, - }, - sortingGroup ={ - order = 300, - type = 'group', - guiInline = true, - name = L['Grouping & Sorting'], - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet', nil, nil, true)end, - args ={ - sortMethod ={ - order = 1, - name = L['Group By'], - desc = L['Set the order that the group will sort.'], - type = 'select', - values ={ - ['NAME'] = L['Owners Name'], - ['PETNAME'] = L['Pet Name'], - ['GROUP'] = GROUP, - }, - }, - sortDir ={ - order = 2, - name = L['Sort Direction'], - desc = L['Defines the sort order of the selected sort method.'], - type = 'select', - values ={ - ['ASC'] = L['Ascending'], - ['DESC'] = L['Descending'], - }, - }, - spacer ={ - order = 3, - type = 'description', - width = 'full', - name = ' ', - }, - customSorting ={ - order = 4, - name = L['Raid-Wide Sorting'], - desc = L['Enabling this allows raid-wide sorting however you will not be able to distinguish between groups.'], - type = 'toggle', - }, - invertGroupingOrder ={ - order = 5, - name = L['Invert Grouping Order'], - desc = L['Enabling this inverts the grouping order when the raid is not full, this will reverse the direction it starts from.'], - disabled = function()return not SV.db.SVUnit['raidpet'].customSorting end, - type = 'toggle', - }, - startFromCenter ={ - order = 6, - name = L['Start Near Center'], - desc = L['The initial group will start near the center and grow out.'], - disabled = function()return not SV.db.SVUnit['raidpet'].customSorting end, - type = 'toggle', - }, - }, - } - } - }, - misc = ns:SetMiscConfigGroup(true, MOD.SetGroupFrame, 'raidpet'), - health = ns:SetHealthConfigGroup(true, MOD.SetGroupFrame, 'raidpet'), - name = ns:SetNameConfigGroup(MOD.SetGroupFrame, 'raidpet'), - buffs = ns:SetAuraConfigGroup(true, 'buffs', true, MOD.SetGroupFrame, 'raidpet'), - debuffs = ns:SetAuraConfigGroup(true, 'debuffs', true, MOD.SetGroupFrame, 'raidpet'), - auraWatch ={ - order = 600, - type = 'group', - name = L['Aura Watch'], - args ={ - enable = { - type = "toggle", - name = L["Enable"], - order = 1, - get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.enable end, - set = function(l, m)MOD:ChangeDBVar(m, "enable", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, - }, - size = { - type = "range", - name = L["Size"], - desc = L["Size of the indicator icon."], - order = 2, - min = 4, - max = 15, - step = 1, - get = function(l)return SV.db.SVUnit["raid" .. w].auraWatch.size end, - set = function(l, m)MOD:ChangeDBVar(m, "size", "raid" .. w, "auraWatch");MOD:SetGroupFrame("raid" .. w)end, - }, - configureButton ={ - type = 'execute', - name = L['Configure Auras'], - func = function()ns:SetToFilterConfig('BuffWatch')end, - order = 3, - }, - }, - }, - rdebuffs ={ - order = 700, - type = 'group', - name = L['RaidDebuff Indicator'], - get = function(l)return - SV.db.SVUnit['raidpet']['rdebuffs'][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet", "rdebuffs");MOD:SetGroupFrame('raidpet')end, - args ={ - enable ={ - type = 'toggle', - name = L['Enable'], - order = 1, - }, - size ={ - type = 'range', - name = L['Size'], - order = 2, - min = 8, - max = 35, - step = 1, - }, - xOffset ={ - order = 3, - type = 'range', - name = L['xOffset'], - min = - 300, - max = 300, - step = 1, - }, - yOffset ={ - order = 4, - type = 'range', - name = L['yOffset'], - min = - 300, - max = 300, - step = 1, - }, - configureButton ={ - type = 'execute', - name = L['Configure Auras'], - func = function()ns:SetToFilterConfig('Raid')end, - order = 5, - }, - }, - }, - icons = ns:SetIconConfigGroup(MOD.SetGroupFrame, 'raidpet'), - }, - }, - }, -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua deleted file mode 100644 index aeb7efa..0000000 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua +++ /dev/null @@ -1,305 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local pairs = _G.pairs; -local tinsert = _G.tinsert; -local table = _G.table; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local MOD = SV.SVUnit -if(not MOD) then return end -local _, ns = ... ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.target={ - name = L['Target Frame'], - type = 'group', - order = 6, - childGroups = "tab", - get=function(l)return SV.db.SVUnit['target'][l[#l]]end, - set=function(l,m)MOD:ChangeDBVar(m, l[#l], "target");MOD:SetUnitFrame('target')end, - args={ - enable={type='toggle',order=1,name=L['Enable']}, - resetSettings={type='execute',order=2,name=L['Restore Defaults'],func=function(l,m)MOD:ResetUnitOptions('target')SV.Mentalo:Reset('Target Frame')end}, - tabGroups={ - order=3, - type='group', - name=L['Unit Options'], - childGroups="tree", - args={ - commonGroup = { - order = 1, - type = 'group', - name = L['General Settings'], - args = { - baseGroup = { - order = 1, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - showAuras = { - order = 1, - type = "execute", - name = L["Show Auras"], - func = function()local U = SVUI_Target;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("target")end - }, - smartAuraDisplay = { - type = "select", - name = L["Smart Auras"], - desc = L["When set the Buffs and Debuffs will toggle being displayed depending on if the unit is friendly or an enemy. This will not effect the aurabars package."], - order = 2, - values = { - ["DISABLED"] = L["Disabled"], - ["SHOW_DEBUFFS_ON_FRIENDLIES"] = L["Friendlies: Show Debuffs"], - ["SHOW_BUFFS_ON_FRIENDLIES"] = L["Friendlies: Show Buffs"] - } - }, - gps = { - order = 3, - name = "GPS Tracking", - desc = "Show an arrow giving the direction and distance to the frames unit.", - type = "toggle", - }, - predict = { - order = 4, - name = L["Heal Prediction"], - desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], - type = "toggle" - }, - hideonnpc = { - type = "toggle", - order = 5, - name = L["Text Toggle On NPC"], - desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.db.SVUnit["target"]["power"].hideonnpc end, - set = function(l, m)SV.db.SVUnit["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end - }, - threatEnabled = { - type = "toggle", - order = 6, - name = L["Show Threat"] - }, - middleClickFocus = { - order = 7, - name = L["Middle Click - Set Focus"], - desc = L["Middle clicking the unit frame will cause your focus to match the unit."], - type = "toggle", - disabled = function()return IsAddOnLoaded("Clique")end - }, - - } - }, - sizeGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Size Settings"], - args = { - width = { - order = 1, - name = L["Width"], - type = "range", - width = "full", - min = 50, - max = 500, - step = 1, - set = function(l, m) - if SV.db.SVUnit["target"].castbar.width == SV.db.SVUnit["target"][l[#l]] then - SV.db.SVUnit["target"].castbar.width = m - end - MOD:ChangeDBVar(m, l[#l], "target"); - MOD:SetUnitFrame("target") - end - }, - height = { - order = 2, - name = L["Height"], - type = "range", - width = "full", - min = 10, - max = 250, - step = 1 - }, - } - } - } - }, - combobar = { - order = 800, - type = "group", - name = L["Combobar"], - get = function(l)return SV.db.SVUnit["target"]["combobar"][l[#l]]end, - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "target", "combobar");MOD:SetUnitFrame("target")end, - args = { - enable = { - type = "toggle", - order = 1, - name = L["Enable"] - }, - smallIcons = { - type = "toggle", - name = L["Small Points"], - order = 2 - }, - height = { - type = "range", - order = 3, - name = L["Height"], - min = 15, - max = 45, - step = 1 - }, - autoHide = { - type = "toggle", - name = L["Auto-Hide"], - order = 4 - } - } - }, - misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "target"), - health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "target"), - power = ns:SetPowerConfigGroup(true, MOD.SetUnitFrame, "target"), - name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "target"), - portrait = ns:SetPortraitConfigGroup(MOD.SetUnitFrame, "target"), - buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "target"), - debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "target"), - castbar = ns:SetCastbarConfigGroup(MOD.SetUnitFrame, "target"), - aurabar = ns:SetAurabarConfigGroup(false, MOD.SetUnitFrame, "target"), - icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "target") - } - } - } -} ---[[ -################################################################################################## -################################################################################################## -################################################################################################## -]] -SV.Options.args.SVUnit.args.targettarget={ - name=L['TargetTarget Frame'], - type='group', - order=7, - childGroups="tab", - get=function(l)return SV.db.SVUnit['targettarget'][l[#l]]end, - set=function(l,m)MOD:ChangeDBVar(m, l[#l], "targettarget");MOD:SetUnitFrame('targettarget')end, - args={ - enable={type='toggle',order=1,name=L['Enable']}, - resetSettings={type='execute',order=2,name=L['Restore Defaults'],func=function(l,m)MOD:ResetUnitOptions('targettarget')SV.Mentalo:Reset('TargetTarget Frame')end}, - tabGroups={ - order=3, - type='group', - name=L['Unit Options'], - childGroups="tree", - args={ - commonGroup = { - order = 1, - type = 'group', - name = L['General Settings'], - args = { - baseGroup = { - order = 1, - type = "group", - guiInline = true, - name = L["Base Settings"], - args = { - showAuras = { - order = 1, - type = "execute", - name = L["Show Auras"], - func = function()local U = SVUI_TargetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("targettarget")end - }, - spacer1 = { - order = 2, - type = "description", - name = "", - }, - rangeCheck = { - order = 3, - name = L["Range Check"], - desc = L["Check if you are in range to cast spells on this specific unit."], - type = "toggle" - }, - hideonnpc = { - type = "toggle", - order = 4, - name = L["Text Toggle On NPC"], - desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], - get = function(l)return SV.db.SVUnit["target"]["power"].hideonnpc end, - set = function(l, m)SV.db.SVUnit["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end - }, - threatEnabled = { - type = "toggle", - order = 5, - name = L["Show Threat"] - } - } - }, - sizeGroup = { - order = 2, - guiInline = true, - type = "group", - name = L["Size Settings"], - args = { - width = { - order = 1, - name = L["Width"], - type = "range", - width = "full", - min = 50, - max = 500, - step = 1, - }, - height = { - order = 2, - name = L["Height"], - type = "range", - width = "full", - min = 10, - max = 250, - step = 1 - }, - } - } - } - }, - misc = ns:SetMiscConfigGroup(false, MOD.SetUnitFrame, "targettarget"), - health = ns:SetHealthConfigGroup(false, MOD.SetUnitFrame, "targettarget"), - power = ns:SetPowerConfigGroup(nil, MOD.SetUnitFrame, "targettarget"), - name = ns:SetNameConfigGroup(MOD.SetUnitFrame, "targettarget"), - portrait = ns:SetPortraitConfigGroup(MOD.SetUnitFrame, "targettarget"), - buffs = ns:SetAuraConfigGroup(false, "buffs", false, MOD.SetUnitFrame, "targettarget"), - debuffs = ns:SetAuraConfigGroup(false, "debuffs", false, MOD.SetUnitFrame, "targettarget"), - icons = ns:SetIconConfigGroup(MOD.SetUnitFrame, "targettarget") - } - } - } -} \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua index f8f0774..c095b36 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.lua @@ -531,5 +531,6 @@ function PLUGIN:Load() self:LoadFishingMode() self:LoadArchaeologyMode() self:PrepareFarmingTools() + self:RegisterEvent("SKILL_LINES_CHANGED") end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml index 95c4646..25b65c4 100644 --- a/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml +++ b/Interface/AddOns/SVUI_CraftOMatic/SVUI_CraftOMatic.xml @@ -36,8 +36,5 @@ </Frame> <Script file='Loader.lua'/> <Script file='SVUI_CraftOMatic.lua'/> - <Script file="modes\archaeology.lua"/> - <Script file="modes\cooking.lua"/> - <Script file="modes\fishing.lua"/> - <Script file="modes\farming.lua"/> + <Include file="components\_load.xml"/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/_load.xml b/Interface/AddOns/SVUI_CraftOMatic/components/_load.xml new file mode 100644 index 0000000..214eb80 --- /dev/null +++ b/Interface/AddOns/SVUI_CraftOMatic/components/_load.xml @@ -0,0 +1,6 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file="archaeology.lua"/> + <Script file="cooking.lua"/> + <Script file="fishing.lua"/> + <Script file="farming.lua"/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua b/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua new file mode 100644 index 0000000..4f5e5b9 --- /dev/null +++ b/Interface/AddOns/SVUI_CraftOMatic/components/archaeology.lua @@ -0,0 +1,515 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local type = _G.type; +local string = _G.string; +local math = _G.math; +local table = _G.table; +local rept,format = string.rep, string.format; +local tsort,twipe = table.sort, table.wipe; +local floor,ceil = math.floor, math.ceil; +local min = math.min +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local PLUGIN = select(2, ...); +local Schema = PLUGIN.Schema; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local playerRace = select(2,UnitRace("player")) +local archSpell, survey, surveyIsKnown, skillRank, skillModifier; +local EnableListener, DisableListener; +local CanScanResearchSite = CanScanResearchSite +local GetNumArtifactsByRace = GetNumArtifactsByRace +local GetArchaeologyRaceInfo = GetArchaeologyRaceInfo +local GetSelectedArtifactInfo = GetSelectedArtifactInfo +local GetArtifactProgress = GetArtifactProgress +local CanSolveArtifact = CanSolveArtifact +local GetContainerNumSlots = GetContainerNumSlots +local GetContainerItemInfo = GetContainerItemInfo +local GetContainerItemID = GetContainerItemID +local DockButton, ModeLogsFrame; +local refArtifacts = {}; +for i = 1, 12 do + refArtifacts[i] = {} +end +local NEEDS_UPDATE = true; +local ArchCrafting = CreateFrame("Frame", "SVUI_ArchCrafting", UIParent) +--[[ +########################################################## +DATA +########################################################## +]]-- +PLUGIN.Archaeology = {}; +PLUGIN.Archaeology.Bars = {}; +PLUGIN.Archaeology.Loaded = false; +--[[ +########################################################## +LOCAL FUNCTIONS +########################################################## +]]-- +local function EnableSolve(index, button) + button:SetAlpha(1) + button.text:SetTextColor(1, 1, 1) + button:SetScript("OnEnter", function(self) + self.text:SetTextColor(1, 1, 0) + end) + button:SetScript("OnLeave", function(self) + self.text:SetTextColor(1, 1, 1) + end) + button:SetScript("OnClick", function(self) + SetSelectedArtifact(index) + local _, _, _, _, _, numSockets = GetActiveArtifactByRace(index) + local _, _, itemID = GetArchaeologyRaceInfo(index) + local ready = true + if numSockets and numSockets > 0 then + for socketNum = 1, numSockets do + if not ItemAddedToArtifact(itemID) then + SocketItemToArtifact() + end + end + end + + if GetNumArtifactsByRace(index) > 0 then + print("Solving...") + SolveArtifact() + end + end) +end + +local function DisableSolve(button) + button:SetAlpha(0) + button.text:SetTextColor(0.5, 0.5, 0.5) + button.text:SetText("") + button:SetScript("OnEnter", SV.fubar) + button:SetScript("OnLeave", SV.fubar) + button:SetScript("OnMouseUp", SV.fubar) +end + +local function UpdateArtifactBars(index) + local cache = refArtifacts[index] + local bar = PLUGIN.Archaeology.Bars[index] + + bar["race"]:SetText(cache["race"]) + + if GetNumArtifactsByRace(index) ~= 0 then + local keystoneBonus = 0 + bar["race"]:SetTextColor(1, 1, 1) + bar["progress"]:SetTextColor(1, 1, 1) + if cache["numKeysockets"] then + keystoneBonus = min(cache["numKeystones"], cache["numKeysockets"]) * 12 + end + local actual = min(cache["progress"], cache["total"]) + local potential = cache["total"] + local green = 0.75 * (actual / potential); + bar["bar"]:SetMinMaxValues(0, potential) + bar["bar"]:SetValue(actual) + + if cache["numKeysockets"] and cache["numKeysockets"] > 0 then + bar["solve"].text:SetText(SOLVE.." ["..cache["numKeystones"].."/"..cache["numKeysockets"].."]") + else + bar["solve"].text:SetText(SOLVE) + end + + if keystoneBonus > 0 then + bar["progress"]:SetText(format("|cff00c1ea%d|r/%d", cache["progress"] + keystoneBonus, cache["total"])) + else + if cache["total"] > 65 then + bar["progress"]:SetText(format("%d/|cff00c1ea%d|r", cache["progress"], cache["total"])) + else + bar["progress"]:SetText(format("%d/%d", cache["progress"], cache["total"])) + end + end + if cache["canSolve"] then + EnableSolve(index, bar["solve"]) + else + DisableSolve(bar["solve"]) + end + bar["bar"]:SetStatusBarColor(0.1, green, 1, 0.5) + else + DisableSolve(bar["solve"]) + bar["progress"]:SetText("") + bar["bar"]:SetStatusBarColor(0, 0, 0, 0) + bar["race"]:SetTextColor(0.25, 0.25, 0.25) + bar["progress"]:SetTextColor(0.25, 0.25, 0.25) + end +end + +local function UpdateArtifactCache() + local found, raceName, raceItemID, cache, _; + for index = 1, 12 do + found = GetNumArtifactsByRace(index) + raceName, _, raceItemID = GetArchaeologyRaceInfo(index) + cache = refArtifacts[index] + cache["race"] = raceName + cache["keyID"] = raceItemID + cache["numKeystones"] = 0 + local oldNum = cache["progress"] + if found == 0 then + cache["numKeysockets"] = 0 + cache["progress"] = 0 + cache["modifier"] = 0 + cache["total"] = 0 + cache["canSolve"] = false + else + SetSelectedArtifact(index) + local _, _, _, _, _, keystoneCount = GetSelectedArtifactInfo() + local numFragmentsCollected, numFragmentsAdded, numFragmentsRequired = GetArtifactProgress() + + cache["numKeysockets"] = keystoneCount + cache["progress"] = numFragmentsCollected + cache["modifier"] = numFragmentsAdded + cache["total"] = numFragmentsRequired + cache["canSolve"] = CanSolveArtifact() + + for i = 0, 4 do + for j = 1, GetContainerNumSlots(i) do + local slotID = GetContainerItemID(i, j) + if slotID == cache["keyID"] then + local _, count = GetContainerItemInfo(i, j) + if cache["numKeystones"] < cache["numKeysockets"] then + cache["numKeystones"] = cache["numKeystones"] + count + end + if min(cache["numKeystones"], cache["numKeysockets"]) * 12 + cache["progress"] >= cache["total"] then + cache["canSolve"] = true + end + end + end + end + end + UpdateArtifactBars(index) + end + NEEDS_UPDATE = false +end + +local function GetTitleAndSkill() + local msg = "|cff22ff11Archaeology Mode|r" + if(skillRank) then + if(skillModifier) then + skillRank = skillRank + skillModifier; + end + msg = msg .. " (|cff00ddff" .. skillRank .. "|r)"; + end + return msg +end + +local function SendModeMessage(...) + if not CombatText_AddMessage then return end + CombatText_AddMessage(...) +end +--[[ +########################################################## +EVENT HANDLER +########################################################## +]]-- +do + local SURVEYCDFONT = SV.Media.font.numbers + local SURVEYRED = {0,0.5,1} + local last = 0 + local time = 3 + + local ArchEventHandler = CreateFrame("Frame"); + local SurveyCooldown = CreateFrame("Frame", nil, UIParent); + local ArchSiteFound; + local ArchCanSurvey, ArchWillSurvey = false, false; + + SurveyCooldown:SetPoint("CENTER", 0, -80) + SurveyCooldown:SetSize(150, 150) + SurveyCooldown.text = SurveyCooldown:CreateFontString(nil, "OVERLAY") + SurveyCooldown.text:SetAllPoints(SurveyCooldown) + SurveyCooldown.text:SetFont(SURVEYCDFONT, 150, "OUTLINE") + SurveyCooldown.text:SetTextColor(0,1,0.12,0.5) + SurveyCooldown.text:SetPoint("CENTER") + SurveyCooldown:SetScale(1.5) + + local Arch_OnEvent = function(self, event, ...) + if(InCombatLockdown() or not archSpell) then return end + if(event == "CURRENCY_DISPLAY_UPDATE" or event == "CHAT_MSG_SKILL" or event == "ARTIFACT_COMPLETE") then + local msg = GetTitleAndSkill() + PLUGIN.TitleWindow:Clear() + PLUGIN.TitleWindow:AddMessage(msg) + end + if(CanScanResearchSite() and (event == "CURRENCY_DISPLAY_UPDATE")) then + UpdateArtifactCache() + elseif(event == "ARCHAEOLOGY_SURVEY_CAST" or event == "ARTIFACT_COMPLETE" or event == "ARTIFACT_DIG_SITE_UPDATED") then + UpdateArtifactCache() + elseif(event == "ARTIFACT_HISTORY_READY" or event == "ARTIFACT_DIGSITE_COMPLETE") then + NEEDS_UPDATE = true + else + ArchCanSurvey = CanScanResearchSite() + if(ArchCanSurvey and not ArchWillSurvey) then + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', survey) + PLUGIN.ModeAlert.HelpText = "Double-Right-Click anywhere on the screen to survey."; + ArchWillSurvey = true + elseif(not ArchCanSurvey and ArchWillSurvey) then + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', archSpell) + PLUGIN.ModeAlert.HelpText = "Double-Right-Click anywhere on the screen to open the artifacts window."; + ArchWillSurvey = false + end + if(event == "ZONE_CHANGED_NEW_AREA") then ArchSiteFound = nil end + if(not ArchSiteFound) then + local sites = ArchaeologyMapUpdateAll(); + if(sites and sites > 0) then + ArchSiteFound = true + SendModeMessage("Digsite Located", CombatText_StandardScroll, 0.91, 0.78, 0.12); + else + ArchSiteFound = nil + end + end + if(NEEDS_UPDATE) then + UpdateArtifactCache() + end + end + end + + local Survey_OnUpdate = function(self, elapsed) + last = last + elapsed + if last > 1 then + time = time - 1 + self.text:SetText(time) + if time <= 0 then + self:SetScript("OnUpdate", nil) + self.text:SetText("") + time = 3 + end + self.text:SetTextColor(SURVEYRED[time],1,0.12,0.8) + last = 0 + end + end + + local Survey_OnEvent = function(self, event, unit, _, _, _, spellid) + if not unit == "player" then return end + if spellid == 80451 then + self.text:SetText("3") + self:SetScript("OnUpdate", Survey_OnUpdate) + end + end + + function EnableListener() + UpdateArtifactCache() + + ArchEventHandler:RegisterEvent("ZONE_CHANGED") + ArchEventHandler:RegisterEvent("ZONE_CHANGED_NEW_AREA") + ArchEventHandler:RegisterEvent("ZONE_CHANGED_INDOORS") + + ArchEventHandler:RegisterEvent("ARTIFACT_DIG_SITE_UPDATED") + ArchEventHandler:RegisterEvent("ARTIFACT_DIGSITE_COMPLETE") + ArchEventHandler:RegisterEvent("ARTIFACT_HISTORY_READY") + ArchEventHandler:RegisterEvent("ARTIFACT_COMPLETE") + + ArchEventHandler:RegisterEvent("CURRENCY_DISPLAY_UPDATE") + ArchEventHandler:RegisterEvent("ARCHAEOLOGY_SURVEY_CAST") + + ArchEventHandler:RegisterEvent("CHAT_MSG_SKILL") + + ArchEventHandler:SetScript("OnEvent", Arch_OnEvent) + if(playerRace ~= "Dwarf") then + SurveyCooldown:RegisterEvent("UNIT_SPELLCAST_STOP") + SurveyCooldown:SetScript("OnEvent", Survey_OnEvent) + end + end + + function DisableListener() + ArchEventHandler:UnregisterAllEvents() + ArchEventHandler:SetScript("OnEvent", nil) + if(playerRace ~= "Dwarf") then + SurveyCooldown:UnregisterAllEvents() + SurveyCooldown:SetScript("OnEvent", nil) + end + end +end +--[[ +########################################################## +CORE FUNCTIONS +########################################################## +]]-- +function PLUGIN.Archaeology:Enable() + PLUGIN.Archaeology:Update() + if(not SVUI_ModesDockFrame:IsShown()) then DockButton:Click() end + + PlaySoundFile("Sound\\Item\\UseSounds\\UseCrinklingPaper.wav") + PLUGIN.ModeAlert:SetBackdropColor(0.25, 0.52, 0.1) + if(not IsSpellKnown(80451)) then + PLUGIN:ModeLootLoader("Archaeology", "WTF is Archaeology?", "You don't know archaeology! \nPicking up a rock and telling everyone that \nyou found a fossil is cute, BUT WRONG!! \nGo find someone who can train you to do this job."); + PLUGIN.TitleWindow:Clear(); + PLUGIN.TitleWindow:AddMessage("WTF is Archaeology?"); + PLUGIN.LogWindow:Clear(); + PLUGIN.LogWindow:AddMessage("You don't know archaeology! \nPicking up a rock and telling everyone that \nyou found a fossil is cute, BUT WRONG!! \nGo find someone who can train you to do this job.", 1, 1, 1); + PLUGIN.LogWindow:AddMessage(" ", 1, 1, 1); + else + ArchCrafting:Show() + local msg = GetTitleAndSkill() + if surveyIsKnown and CanScanResearchSite() then + PLUGIN:ModeLootLoader("Archaeology", msg, "Double-Right-Click anywhere on the screen to survey."); + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', survey) + else + PLUGIN:ModeLootLoader("Archaeology", msg, "Double-Right-Click anywhere on the screen to open the artifacts window."); + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', archSpell) + end + PLUGIN.TitleWindow:Clear(); + PLUGIN.TitleWindow:AddMessage(msg); + end + EnableListener() + PLUGIN.ModeAlert:Show() + SendModeMessage("Archaeology Mode Enabled", CombatText_StandardScroll, 0.28, 0.9, 0.1); +end + +function PLUGIN.Archaeology:Disable() + DisableListener() + ArchCrafting:Hide() +end + +function PLUGIN.Archaeology:Bind() + if InCombatLockdown() then return end + if(archSpell) then + if surveyIsKnown and CanScanResearchSite() then + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', survey) + PLUGIN.ModeAlert.HelpText = 'Double-Right-Click anywhere on the screen to survey.' + else + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', archSpell) + PLUGIN.ModeAlert.HelpText = 'Double-Right-Click anywhere on the screen to open the artifacts window.' + end + SetOverrideBindingClick(_G["SVUI_ModeCaptureWindow"], true, "BUTTON2", "SVUI_ModeCaptureWindow"); + _G["SVUI_ModeCaptureWindow"].Grip:Show(); + end +end + +function PLUGIN.Archaeology:Update() + surveyIsKnown = IsSpellKnown(80451); + survey = GetSpellInfo(80451); + local _,_,arch,_,_,_ = GetProfessions(); + if(arch) then + archSpell, _, skillRank, _, _, _, _, skillModifier = GetProfessionInfo(arch) + end +end +--[[ +########################################################## +LOADER +########################################################## +]]-- +function PLUGIN:LoadArchaeologyMode() + ModeLogsFrame = PLUGIN.LogWindow; + DockButton = _G["SVUI_ModesDockFrame_ToolBarButton"]; + + local progressBars = PLUGIN.Archaeology.Bars + + ArchCrafting:SetParent(ModeLogsFrame) + ArchCrafting:SetFrameStrata("MEDIUM") + ArchCrafting:FillInner(ModeLogsFrame) + + local BAR_WIDTH = (ArchCrafting:GetWidth() * 0.5) - 4 + local BAR_HEIGHT = (ArchCrafting:GetHeight() / 6) - 4 + + for i = 1, 12 do + local bar = CreateFrame("StatusBar", nil, ArchCrafting) + local race = bar:CreateFontString() + local progress = bar:CreateFontString() + local solve = CreateFrame("Button", nil, bar, "SecureHandlerClickTemplate") + local yOffset; + + bar:SetPanelTemplate("Inset") + bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + bar:SetSize(BAR_WIDTH,BAR_HEIGHT) + if(i > 6) then + yOffset = ((i - 7) * (BAR_HEIGHT + 4)) + 4 + bar:SetPoint("TOPRIGHT", ArchCrafting, "TOPRIGHT", -2, -yOffset) + else + yOffset = ((i - 1) * (BAR_HEIGHT + 4)) + 4; + bar:SetPoint("TOPLEFT", ArchCrafting, "TOPLEFT", 2, -yOffset) + end + bar:SetStatusBarColor(0.2, 0.2, 0.8, 0.5) + bar:SetScript("OnEnter", function(self) + GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT", 2, 250) + GameTooltip:ClearLines() + if GetNumArtifactsByRace(i) > 0 then + SetSelectedArtifact(i) + local artifactName, artifactDescription, artifactRarity, _, _, keystoneCount = GetSelectedArtifactInfo() + local numFragmentsCollected, numFragmentsAdded, numFragmentsRequired = GetArtifactProgress() + local r, g, b + if artifactRarity == 1 then + artifactRarity = ITEM_QUALITY3_DESC + r, g, b = GetItemQualityColor(3) + else + artifactRarity = ITEM_QUALITY1_DESC + r, g, b = GetItemQualityColor(1) + end + GameTooltip:AddLine(artifactName, r, g, b, 1) + GameTooltip:AddLine(artifactRarity, r, g, b, r, g, b) + GameTooltip:AddDoubleLine(ARCHAEOLOGY_RUNE_STONES..": "..numFragmentsCollected.."/"..numFragmentsRequired, "Keystones: "..keystoneCount, 1, 1, 1, 1, 1, 1) + GameTooltip:AddLine(" ") + GameTooltip:AddLine(artifactDescription, 1, 1, 1, 1) + GameTooltip:Show() + end + end) + bar:SetScript("OnLeave", function() + GameTooltip:Hide() + end) + + -- Race Text + race:SetFont(SV.Media.font.roboto, 12, "OUTLINE") + race:SetText(RACE) + race:SetPoint("LEFT", bar, "LEFT", 2, 0) + + -- Progress Text + progress:SetFont(SV.Media.font.roboto, 12, "OUTLINE") + progress:SetText("") + progress:SetPoint("RIGHT", bar, "RIGHT", 1, 0) + + -- Solve + solve:SetAllPoints(bar) + + solve.bg = solve:CreateTexture(nil,"BORDER") + solve.bg:SetAllPoints(solve) + solve.bg:SetTexture(SV.Media.bar.default) + solve.bg:SetVertexColor(0.1,0.5,0) + + solve.text = solve:CreateFontString(nil,"OVERLAY") + solve.text:SetFont(SV.Media.font.roboto, 14, "NONE") + solve.text:SetShadowOffset(-1,-1) + solve.text:SetShadowColor(0,0,0,0.5) + solve.text:SetText(SOLVE) + solve.text:SetPoint("CENTER", solve, "CENTER", 2, 0) + + progressBars[i] = { + ["bar"] = bar, + ["race"] = race, + ["progress"] = progress, + ["solve"] = solve + } + end + ArchCrafting:Hide() + PLUGIN.Archaeology:Update() + UpdateArtifactCache() +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua b/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua new file mode 100644 index 0000000..749480d --- /dev/null +++ b/Interface/AddOns/SVUI_CraftOMatic/components/cooking.lua @@ -0,0 +1,230 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local type = _G.type; +local string = _G.string; +local math = _G.math; +local table = _G.table; +local rept = string.rep; +local tsort,twipe = table.sort,table.wipe; +local floor,ceil = math.floor, math.ceil; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local PLUGIN = select(2, ...); +local Schema = PLUGIN.Schema; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local cookingSpell, campFire, skillRank, skillModifier; +local DockButton; +--[[ +########################################################## +LOCAL FUNCTIONS +########################################################## +]]-- +local function UpdateChefWear() + if(GetItemCount(46349) > 0) then + PLUGIN.WornItems["HEAD"] = GetInventoryItemID("player", INVSLOT_HEAD); + EquipItemByName(46349) + PLUGIN.InModeGear = true + end + if(GetItemCount(86468) > 0) then + PLUGIN.WornItems["TAB"] = GetInventoryItemID("player", INVSLOT_TABARD); + EquipItemByName(86468) + PLUGIN.InModeGear = true + end + if(GetItemCount(86559) > 0) then + PLUGIN.WornItems["MAIN"] = GetInventoryItemID("player", INVSLOT_MAINHAND); + EquipItemByName(86559) + PLUGIN.InModeGear = true + end + if(GetItemCount(86558) > 0) then + PLUGIN.WornItems["OFF"] = GetInventoryItemID("player", INVSLOT_OFFHAND); + EquipItemByName(86558) + PLUGIN.InModeGear = true + end +end + +local function GetTitleAndSkill() + local msg = "|cff22ff11Cooking Mode|r" + if(skillRank) then + if(skillModifier) then + skillRank = skillRank + skillModifier; + end + msg = msg .. " (|cff00ddff" .. skillRank .. "|r)"; + end + return msg +end + +local function SendModeMessage(...) + if not CombatText_AddMessage then return end + CombatText_AddMessage(...) +end +--[[ +########################################################## +CORE NAMESPACE +########################################################## +]]-- +PLUGIN.Cooking = {}; +PLUGIN.Cooking.Log = {}; +PLUGIN.Cooking.Loaded = false; +--[[ +########################################################## +EVENT HANDLER +########################################################## +]]-- +local EnableListener, DisableListener +do + local CookEventHandler = CreateFrame("Frame") + local LootProxy = function(item, name) + if(item) then + local mask = [[0x10000]]; + local itemType = GetItemFamily(item); + local pass = bit.band(itemType, mask); + if pass > 0 then + proxyTest = true; + end + end + end + + local Cook_OnEvent = function(self, event, ...) + if(InCombatLockdown()) then return end + if(event == "BAG_UPDATE" or event == "CHAT_MSG_SKILL") then + local msg = GetTitleAndSkill() + PLUGIN.TitleWindow:Clear() + PLUGIN.TitleWindow:AddMessage(msg) + elseif(event == "CHAT_MSG_LOOT") then + local item, amt = PLUGIN:CheckForModeLoot(...); + if item then + local name, lnk, rarity, lvl, mlvl, itype, stype, cnt, ieq, tex, price = GetItemInfo(item); + if proxyTest == false then + LootProxy(lnk, name) + end + if proxyTest == false then return end + if not PLUGIN.Cooking.Log[name] then + PLUGIN.Cooking.Log[name] = {amount = 0, texture = ""}; + end + local r, g, b, hex = GetItemQualityColor(rarity); + local stored = PLUGIN.Cooking.Log + local mod = stored[name]; + local newAmt = mod.amount + 1; + if amt >= 2 then newAmt = mod.amount + amt end + PLUGIN.Cooking.Log[name].amount = newAmt; + PLUGIN.Cooking.Log[name].texture = tex; + PLUGIN.LogWindow:Clear(); + for name,data in pairs(stored) do + if type(data) == "table" and data.amount and data.texture then + PLUGIN.LogWindow:AddMessage("|cff55FF55"..data.amount.." x|r |T".. data.texture ..":16:16:0:0:64:64:4:60:4:60|t".." "..name, r, g, b); + end + end + PLUGIN.LogWindow:AddMessage("----------------", 0, 0, 0); + PLUGIN.LogWindow:AddMessage("Cooked So Far...", 0, 1, 1); + PLUGIN.LogWindow:AddMessage(" ", 0, 0, 0); + proxyTest = false; + end + end + end + + function EnableListener() + CookEventHandler:RegisterEvent("ZONE_CHANGED") + CookEventHandler:RegisterEvent("BAG_UPDATE") + CookEventHandler:RegisterEvent("CHAT_MSG_SKILL") + CookEventHandler:SetScript("OnEvent", Cook_OnEvent) + end + + function DisableListener() + CookEventHandler:UnregisterAllEvents() + CookEventHandler:SetScript("OnEvent", nil) + end +end +--[[ +########################################################## +CORE METHODS +########################################################## +]]-- +function PLUGIN.Cooking:Enable() + PLUGIN.Cooking:Update() + if(not SVUI_ModesDockFrame:IsShown()) then DockButton:Click() end + if(SV.db[Schema].cooking.autoequip) then + UpdateChefWear(); + end + PlaySoundFile("Sound\\Spells\\Tradeskills\\CookingPrepareA.wav") + PLUGIN.ModeAlert:SetBackdropColor(0.25, 0.52, 0.1) + + if(not IsSpellKnown(818)) then + PLUGIN:ModeLootLoader("Cooking", "WTF is Cooking?", "You have no clue how to cook! \nEven toast is a mystery to you. \nGo find a trainer and learn \nhow to do this simple job."); + else + local msg = GetTitleAndSkill(); + if cookingSpell and GetSpellCooldown(campFire) > 0 then + PLUGIN:ModeLootLoader("Cooking", msg, "Double-Right-Click anywhere on the screen \nto open your cookbook."); + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', cookingSpell) + else + PLUGIN:ModeLootLoader("Cooking", msg, "Double-Right-Click anywhere on the screen \nto start a cooking fire."); + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', campFire) + end + end + EnableListener() + PLUGIN.ModeAlert:Show() + SendModeMessage("Cooking Mode Enabled", CombatText_StandardScroll, 0.28, 0.9, 0.1); +end + +function PLUGIN.Cooking:Disable() + DisableListener() +end + +function PLUGIN.Cooking:Bind() + if InCombatLockdown() then return end + if cookingSpell then + if cookingSpell and GetSpellCooldown(campFire) > 0 then + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', cookingSpell) + PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to open the cooking window.' + end + SetOverrideBindingClick(_G["SVUI_ModeCaptureWindow"], true, "BUTTON2", "SVUI_ModeCaptureWindow"); + _G["SVUI_ModeCaptureWindow"].Grip:Show(); + end +end + +function PLUGIN.Cooking:Update() + campFire = GetSpellInfo(818); + local _,_,_,_,cook,_ = GetProfessions(); + if cook ~= nil then + cookingSpell, _, skillRank, _, _, _, _, skillModifier = GetProfessionInfo(cook) + end +end +--[[ +########################################################## +LOADER +########################################################## +]]-- +function PLUGIN:LoadCookingMode() + DockButton = _G["SVUI_ModesDockFrame_ToolBarButton"]; +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua b/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua new file mode 100644 index 0000000..f52d192 --- /dev/null +++ b/Interface/AddOns/SVUI_CraftOMatic/components/farming.lua @@ -0,0 +1,622 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local type = _G.type; +local string = _G.string; +local math = _G.math; +local table = _G.table; +local rept = string.rep; +local tsort,twipe = table.sort,table.wipe; +local floor,ceil = math.floor, math.ceil; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local PLUGIN = select(2, ...); +local Schema = PLUGIN.Schema; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local NUM_SEED_BARS = 7 +local EnableListener, DisableListener, InventoryUpdate, LoadFarmingModeTools; +local seedButtons,farmToolButtons,portalButtons = {},{},{}; +local DockButton, ModeLogsFrame; +local refSeeds = {[79102]={1},[89328]={1},[80590]={1},[80592]={1},[80594]={1},[80593]={1},[80591]={1},[89329]={1},[80595]={1},[89326]={1},[80809]={3},[95434]={4},[89848]={3},[95437]={4},[84782]={3},[95436]={4},[85153]={3},[95438]={4},[85162]={3},[95439]={4},[85158]={3},[95440]={4},[84783]={3},[95441]={4},[89849]={3},[95442]={4},[85163]={3},[95443]={4},[89847]={3},[95444]={4},[85216]={2},[85217]={2},[89202]={2},[85215]={2},[89233]={2},[89197]={2},[85219]={2},[91806]={2},[95449]={5},[95450]={6},[95451]={5},[95452]={6},[95457]={5},[95458]={6},[95447]={5},[95448]={6},[95445]={5},[95446]={6},[95454]={5},[95456]={6},[85267]={7},[85268]={7},[85269]={7}}; +local refTools = {[79104]={30254},[80513]={30254},[89880]={30535},[89815]={31938}}; +local refPortals = {[91850]={"Horde"},[91861]={"Horde"},[91862]={"Horde"},[91863]={"Horde"},[91860]={"Alliance"},[91864]={"Alliance"},[91865]={"Alliance"},[91866]={"Alliance"}}; +--[[ +########################################################## +LOCAL FUNCTIONS +########################################################## +]]-- +local Scroll_OnValueChanged = function(self,argValue) + FarmModeFrame:SetVerticalScroll(argValue) +end + +local Scroll_OnMouseWheel = function(self, delta) + local scroll = self:GetVerticalScroll(); + local value = (scroll - (20 * delta)); + if value < -1 then + value = 0 + end + if value > 420 then + value = 420 + end + self:SetVerticalScroll(value) + self.slider:SetValue(value) +end + +local function FindItemInBags(itemId) + for container = 0, NUM_BAG_SLOTS do + for slot = 1, GetContainerNumSlots(container) do + if itemId == GetContainerItemID(container, slot) then + return container, slot + end + end + end +end +--[[ +########################################################## +EVENT HANDLER +########################################################## +]]-- +do + local FarmEventHandler = CreateFrame("Frame") + + local ButtonUpdate = function(button) + button.items = GetItemCount(button.itemId) + if button.text then + button.text:SetText(button.items) + end + button.icon:SetDesaturated(button.items == 0) + button.icon:SetAlpha(button.items == 0 and .25 or 1) + end + + local InFarmZone = function() + local zone = GetSubZoneText() + if (zone == L["Sunsong Ranch"] or zone == L["The Halfhill Market"]) then + if PLUGIN.Farming.ToolsLoaded and PLUGIN.ModeAlert:IsShown() then + PLUGIN.TitleWindow:Clear() + PLUGIN.TitleWindow:AddMessage("|cff22ff11Farming Mode|r") + end + return true + else + if PLUGIN.Farming.ToolsLoaded and PLUGIN.ModeAlert:IsShown() then + PLUGIN.TitleWindow:Clear() + PLUGIN.TitleWindow:AddMessage("|cffff2211Must be in Sunsong Ranch|r") + end + return false + end + end + + local UpdateFarmtoolCooldown = function() + for i = 1, NUM_SEED_BARS do + for _, button in ipairs(seedButtons[i]) do + if button.cooldown then + button.cooldown:SetCooldown(GetItemCooldown(button.itemId)) + end + end + end + for _, button in ipairs(farmToolButtons) do + if button.cooldown then + button.cooldown:SetCooldown(GetItemCooldown(button.itemId)) + end + end + for _, button in ipairs(portalButtons) do + if button.cooldown then + button.cooldown:SetCooldown(GetItemCooldown(button.itemId)) + end + end + end + + local Farm_OnEvent = function(self, event, ...) + if(InCombatLockdown()) then return end + if(event == "ZONE_CHANGED") then + local inZone = InFarmZone() + if not inZone and SV.db[Schema].farming.droptools then + for k, v in pairs(refTools) do + local container, slot = FindItemInBags(k) + if container and slot then + PickupContainerItem(container, slot) + DeleteCursorItem() + end + end + end + if inZone then + self:RegisterEvent("BAG_UPDATE") + self:RegisterEvent("BAG_UPDATE_COOLDOWN") + else + self:UnregisterEvent("BAG_UPDATE") + self:UnregisterEvent("BAG_UPDATE_COOLDOWN") + end + InventoryUpdate() + elseif(event == "BAG_UPDATE") then + InventoryUpdate() + elseif(event == "BAG_UPDATE_COOLDOWN") then + UpdateFarmtoolCooldown() + end + end + + InventoryUpdate = function() + if InCombatLockdown() then + FarmEventHandler:RegisterEvent("PLAYER_REGEN_ENABLED", InventoryUpdate) + return + else + FarmEventHandler:UnregisterEvent("PLAYER_REGEN_ENABLED") + end + for i = 1, NUM_SEED_BARS do + for _, button in ipairs(seedButtons[i]) do + ButtonUpdate(button) + end + end + for _, button in ipairs(farmToolButtons) do + ButtonUpdate(button) + end + for _, button in ipairs(portalButtons) do + ButtonUpdate(button) + end + + PLUGIN:RefreshFarmingTools() + end + + EnableListener = function() + FarmEventHandler:RegisterEvent("ZONE_CHANGED") + FarmEventHandler:SetScript("OnEvent", Farm_OnEvent) + end + + DisableListener = function() + FarmEventHandler:UnregisterAllEvents() + FarmEventHandler:SetScript("OnEvent", nil) + end +end +--[[ +########################################################## +LOADING HANDLER +########################################################## +]]-- +do + local seedsort = function(a, b) return a.sortname < b.sortname end + + local SeedToSoil = function(group, itemId) + if(UnitName("target") ~= L["Tilled Soil"]) then return false; end + for i, v in pairs(group) do + if i == itemId then return true end + end + return false + end + + local Button_OnEnter = function(self) + GameTooltip:SetOwner(self, 'ANCHOR_TOPLEFT', 2, 4) + GameTooltip:ClearLines() + GameTooltip:AddDoubleLine(self.sortname) + if self.allowDrop then + GameTooltip:AddLine(L['Right-click to drop the item.']) + end + GameTooltip:Show() + end + + local Button_OnLeave = function() + GameTooltip:Hide() + end + + local Button_OnMouseDown = function(self, mousebutton) + if InCombatLockdown() then return end + if mousebutton == "LeftButton" then + self:SetAttribute("type", self.buttonType) + self:SetAttribute(self.buttonType, self.sortname) + if(SeedToSoil(refSeeds, self.itemId)) then + local container, slot = FindItemInBags(self.itemId) + if container and slot then + self:SetAttribute("type", "macro") + self:SetAttribute("macrotext", format("/targetexact %s \n/use %s %s", L["Tilled Soil"], container, slot)) + end + end + if self.cooldown then + self.cooldown:SetCooldown(GetItemCooldown(self.itemId)) + end + elseif mousebutton == "RightButton" and self.allowDrop then + self:SetAttribute("type", "click") + local container, slot = FindItemInBags(self.itemId) + if container and slot then + PickupContainerItem(container, slot) + DeleteCursorItem() + end + end + end + + local function CreateFarmingButton(index, owner, buttonName, buttonType, name, texture, allowDrop, showCount) + local BUTTONSIZE = owner.ButtonSize; + local button = CreateFrame("Button", ("FarmingButton"..buttonName.."%d"):format(index), owner, "SecureActionButtonTemplate") + button:SetFixedPanelTemplate("Transparent") + button.Panel:SetFrameLevel(0) + button:SetNormalTexture(nil) + button:Size(BUTTONSIZE, BUTTONSIZE) + button.sortname = name + button.itemId = index + button.allowDrop = allowDrop + button.buttonType = buttonType + button.items = GetItemCount(index) + button.icon = button:CreateTexture(nil, "OVERLAY", nil, 2) + button.icon:SetTexture(texture) + button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button.icon:FillInner(button,2,2) + if showCount then + button.text = button:CreateFontString(nil, "OVERLAY") + button.text:SetFont(SV.Media.font.action, 12, "OUTLINE") + button.text:SetPoint("BOTTOMRIGHT", button, 1, 2) + end + button.cooldown = CreateFrame("Cooldown", ("FarmingButton"..buttonName.."%dCooldown"):format(index), button) + button.cooldown:SetAllPoints(button) + button:SetScript("OnEnter", Button_OnEnter) + button:SetScript("OnLeave", Button_OnLeave) + button:SetScript("OnMouseDown", Button_OnMouseDown) + return button + end + + function LoadFarmingModeTools() + local itemError = false + for k, v in pairs(refSeeds) do + if select(2, GetItemInfo(k)) == nil then print(GetItemInfo(k)) itemError = true end + end + for k, v in pairs(refTools) do + if select(2, GetItemInfo(k)) == nil then print(GetItemInfo(k)) itemError = true end + end + for k, v in pairs(refPortals) do + if select(2, GetItemInfo(k)) == nil then print(GetItemInfo(k)) itemError = true end + end + if InCombatLockdown() or itemError then + if PLUGIN.FarmLoadTimer then + PLUGIN.FarmLoadTimer = nil + PLUGIN.Farming:Disable() + PLUGIN.TitleWindow:AddMessage("|cffffff11The Loader is Being Dumb...|r|cffff1111PLEASE TRY AGAIN|r") + return + end + PLUGIN.TitleWindow:AddMessage("|cffffff11Loading Farm Tools...|r|cffff1111PLEASE WAIT|r") + PLUGIN.FarmLoadTimer = SV.Timers:ExecuteTimer(LoadFarmingModeTools, 5) + else + local horizontal = SV.db[Schema].farming.toolbardirection == 'HORIZONTAL' + + local seeds, farmtools, portals = {},{},{} + + for k, v in pairs(refSeeds) do + seeds[k] = { v[1], GetItemInfo(k) } + end + + for k, v in pairs(refTools) do + farmtools[k] = { v[1], GetItemInfo(k) } + end + + for k, v in pairs(refPortals) do + portals[k] = { v[1], GetItemInfo(k) } + end + + for i = 1, NUM_SEED_BARS do + local seedBar = _G["FarmSeedBar"..i] + seedButtons[i] = seedButtons[i] or {} + local sbc = 1; + for k, v in pairs(seeds) do + if v[1] == i then + seedButtons[i][sbc] = CreateFarmingButton(k, seedBar, "SeedBar"..i.."Seed", "item", v[2], v[11], false, true); + sbc = sbc + 1; + end + tsort(seedButtons[i], seedsort) + end + end + + local ftc = 1; + for k, v in pairs(farmtools) do + farmToolButtons[ftc] = CreateFarmingButton(k, _G["FarmToolBar"], "Tools", "item", v[2], v[11], true, false); + ftc = ftc + 1; + end + + local playerFaction = UnitFactionGroup('player') + local pbc = 1; + for k, v in pairs(portals) do + if v[1] == playerFaction then + portalButtons[pbc] = CreateFarmingButton(k, _G["FarmPortalBar"], "Portals", "item", v[2], v[11], false, true); + pbc = pbc + 1; + end + end + + PLUGIN.Farming.Loaded = true + PLUGIN.FarmLoadTimer = nil + PLUGIN.FarmEnableTimer = SV.Timers:ExecuteTimer(PLUGIN.Farming.Enable, 1.5) + end + end +end +--[[ +########################################################## +CORE FUNCTIONS +########################################################## +]]-- +PLUGIN.Farming = {}; +PLUGIN.Farming.Loaded = false; +PLUGIN.Farming.ToolsLoaded = false; + +function PLUGIN.Farming:Enable() + if InCombatLockdown() then return end + + PLUGIN:ModeLootLoader("Farming", "Farming Mode", "This mode will provide you \nwith fast-access buttons for each \nof your seeds and farming tools."); + + PLUGIN.TitleWindow:Clear() + if(not PLUGIN.Farming.Loaded) then + PLUGIN.TitleWindow:AddMessage("|cffffff11Loading Farm Tools...|r") + LoadFarmingModeTools() + return + else + if not PLUGIN.Farming.ToolsLoaded then + PlaySoundFile("Sound\\Effects\\DeathImpacts\\mDeathImpactColossalDirtA.wav") + PLUGIN.TitleWindow:AddMessage("|cff22ff11Farming Mode|r") + PLUGIN.ModeAlert:Show() + InventoryUpdate() + PLUGIN.Farming.ToolsLoaded = true + EnableListener() + if not FarmModeFrame:IsShown() then FarmModeFrame:Show() end + if(not SVUI_ModesDockFrame:IsShown()) then DockButton:Click() end + end + end +end + +function PLUGIN.Farming:Disable() + if(InCombatLockdown() or (not PLUGIN.Farming.Loaded) or (not PLUGIN.Farming.ToolsLoaded)) then + DisableListener() + return + end + if SV.db[Schema].farming.droptools then + for k, v in pairs(refTools) do + local container, slot = FindItemInBags(k) + if container and slot then + PickupContainerItem(container, slot) + DeleteCursorItem() + end + end + end + if FarmModeFrame:IsShown() then FarmModeFrame:Hide() end + PLUGIN.Farming.ToolsLoaded = false + DisableListener() +end +--[[ +########################################################## +CORE FUNCTIONS +########################################################## +]]-- +function PLUGIN:RefreshFarmingTools() + local count, horizontal = 0, SV.db[Schema].farming.toolbardirection == 'HORIZONTAL' + local BUTTONSPACE = SV.db[Schema].farming.buttonspacing or 2; + local lastBar; + if not FarmToolBar:IsShown() then + _G["FarmSeedBarAnchor"]:SetPoint("TOPLEFT", _G["FarmModeFrameSlots"], "TOPLEFT", 0, 0) + else + _G["FarmSeedBarAnchor"]:SetPoint("TOPLEFT", _G["FarmToolBar"], horizontal and "BOTTOMLEFT" or "TOPRIGHT", 0, 0) + end + + for i = 1, NUM_SEED_BARS do + local seedBar = _G["FarmSeedBar"..i] + count = 0 + for i, button in ipairs(seedButtons[i]) do + local BUTTONSIZE = seedBar.ButtonSize; + button:Point("TOPLEFT", seedBar, "TOPLEFT", horizontal and (count * (BUTTONSIZE + BUTTONSPACE) + 1) or 1, horizontal and -1 or -(count * (BUTTONSIZE + BUTTONSPACE) + 1)) + button:Size(BUTTONSIZE,BUTTONSIZE) + if (not SV.db[Schema].farming.onlyactive or (SV.db[Schema].farming.onlyactive and button.items > 0)) then + button.icon:SetVertexColor(1,1,1) + count = count + 1 + elseif (not SV.db[Schema].farming.onlyactive and button.items <= 0) then + button:Show() + button.icon:SetVertexColor(0.25,0.25,0.25) + count = count + 1 + else + button:Hide() + end + end + if(SV.db[Schema].farming.onlyactive and not SV.db[Schema].farming.undocked) then + if count==0 then + seedBar:Hide() + else + seedBar:Show() + if(not lastBar) then + seedBar:SetPoint("TOPLEFT", _G["FarmSeedBarAnchor"], "TOPLEFT", 0, 0) + else + seedBar:SetPoint("TOPLEFT", lastBar, horizontal and "BOTTOMLEFT" or "TOPRIGHT", 0, 0) + end + lastBar = seedBar + end + end + end + count = 0; + lastBar = nil; + FarmToolBar:ClearAllPoints() + FarmToolBar:SetAllPoints(FarmToolBarAnchor) + for i, button in ipairs(farmToolButtons) do + local BUTTONSIZE = FarmToolBar.ButtonSize; + button:Point("TOPLEFT", FarmToolBar, "TOPLEFT", horizontal and (count * (BUTTONSIZE + BUTTONSPACE) + 1) or 1, horizontal and -1 or -(count * (BUTTONSIZE + BUTTONSPACE) + 1)) + button:Size(BUTTONSIZE,BUTTONSIZE) + if (not SV.db[Schema].farming.onlyactive or (SV.db[Schema].farming.onlyactive and button.items > 0)) then + button:Show() + button.icon:SetVertexColor(1,1,1) + count = count + 1 + elseif (not SV.db[Schema].farming.onlyactive and button.items == 0) then + button:Show() + button.icon:SetVertexColor(0.25,0.25,0.25) + count = count + 1 + else + button:Hide() + end + end + if(SV.db[Schema].farming.onlyactive and not SV.db[Schema].farming.undocked) then + if count==0 then + FarmToolBarAnchor:Hide() + FarmPortalBar:SetPoint("TOPLEFT", FarmModeFrameSlots, "TOPLEFT", 0, 0) + else + FarmToolBarAnchor:Show() + FarmPortalBar:SetPoint("TOPLEFT", FarmToolBarAnchor, "TOPRIGHT", 0, 0) + end + end + count = 0; + FarmPortalBar:ClearAllPoints() + FarmPortalBar:SetAllPoints(FarmPortalBarAnchor) + for i, button in ipairs(portalButtons) do + local BUTTONSIZE = FarmPortalBar.ButtonSize; + button:Point("TOPLEFT", FarmPortalBar, "TOPLEFT", horizontal and (count * (BUTTONSIZE + BUTTONSPACE) + 1) or 1, horizontal and -1 or -(count * (BUTTONSIZE + BUTTONSPACE) + 1)) + button:Size(BUTTONSIZE,BUTTONSIZE) + if (not SV.db[Schema].farming.onlyactive or (SV.db[Schema].farming.onlyactive and button.items > 0)) then + button:Show() + button.icon:SetVertexColor(1,1,1) + count = count + 1 + elseif (not SV.db[Schema].farming.onlyactive and button.items == 0) then + button:Show() + button.icon:SetVertexColor(0.25,0.25,0.25) + count = count + 1 + else + button:Hide() + end + end + if(SV.db[Schema].farming.onlyactive) then + if count==0 then + FarmPortalBar:Hide() + else + FarmPortalBar:Show() + end + end +end + +function PLUGIN:PrepareFarmingTools() + local horizontal = SV.db[Schema].farming.toolbardirection == "HORIZONTAL" + local BUTTONSPACE = SV.db[Schema].farming.buttonspacing or 2; + + ModeLogsFrame = PLUGIN.LogWindow; + DockButton = _G["SVUI_ModesDockFrame_ToolBarButton"] + + if not SV.db[Schema].farming.undocked then + local bgTex = [[Interface\BUTTONS\WHITE8X8]] + local bdTex = SV.Media.bar.glow + local farmingDocklet = CreateFrame("ScrollFrame", "FarmModeFrame", ModeLogsFrame); + farmingDocklet:SetPoint("TOPLEFT", ModeLogsFrame, 31, -3); + farmingDocklet:SetPoint("BOTTOMRIGHT", ModeLogsFrame, -3, 3); + farmingDocklet:EnableMouseWheel(true); + + local farmingDockletSlots = CreateFrame("Frame", "FarmModeFrameSlots", farmingDocklet); + farmingDockletSlots:SetPoint("TOPLEFT", farmingDocklet, 0, 0); + farmingDockletSlots:SetWidth(farmingDocklet:GetWidth()) + farmingDockletSlots:SetHeight(500); + farmingDockletSlots:SetFrameLevel(farmingDocklet:GetFrameLevel() + 1) + farmingDocklet:SetScrollChild(farmingDockletSlots) + + local slotSlider = CreateFrame("Slider", "FarmModeSlotSlider", farmingDocklet); + slotSlider:SetHeight(farmingDocklet:GetHeight() - 3); + slotSlider:SetWidth(18); + slotSlider:SetPoint("TOPLEFT", farmingDocklet, -28, 0); + slotSlider:SetPoint("BOTTOMLEFT", farmingDocklet, -28, 0); + slotSlider:SetBackdrop({bgFile = bgTex, edgeFile = bdTex, edgeSize = 4, insets = {left = 3, right = 3, top = 3, bottom = 3}}); + slotSlider:SetFrameLevel(6) + slotSlider:SetFixedPanelTemplate("Transparent", true); + slotSlider:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob"); + slotSlider:SetOrientation("VERTICAL"); + slotSlider:SetValueStep(5); + slotSlider:SetMinMaxValues(1, 420); + slotSlider:SetValue(1); + + farmingDocklet.slider = slotSlider; + slotSlider:SetScript("OnValueChanged", Scroll_OnValueChanged) + farmingDocklet:SetScript("OnMouseWheel", Scroll_OnMouseWheel); + + local parentWidth = FarmModeFrameSlots:GetWidth() - 31 + local BUTTONSIZE = (parentWidth / (horizontal and 10 or 8)); + local TOOLSIZE = (parentWidth / 8); + + -- FARM TOOLS + local farmToolBarAnchor = CreateFrame("Frame", "FarmToolBarAnchor", farmingDockletSlots) + farmToolBarAnchor:Point("TOPLEFT", farmingDockletSlots, "TOPLEFT", 0, 0) + farmToolBarAnchor:Size(horizontal and ((TOOLSIZE + BUTTONSPACE) * 4) or (TOOLSIZE + BUTTONSPACE), horizontal and (TOOLSIZE + BUTTONSPACE) or ((TOOLSIZE + BUTTONSPACE) * 4)) + + local farmToolBar = CreateFrame("Frame", "FarmToolBar", farmToolBarAnchor) + farmToolBar:Size(horizontal and ((TOOLSIZE + BUTTONSPACE) * 4) or (TOOLSIZE + BUTTONSPACE), horizontal and (TOOLSIZE + BUTTONSPACE) or ((TOOLSIZE + BUTTONSPACE) * 4)) + farmToolBar:SetPoint("TOPLEFT", farmToolBarAnchor, "TOPLEFT", (horizontal and BUTTONSPACE or (TOOLSIZE + BUTTONSPACE)), (horizontal and -(TOOLSIZE + BUTTONSPACE) or -BUTTONSPACE)) + farmToolBar.ButtonSize = TOOLSIZE; + + -- PORTALS + local farmPortalBarAnchor = CreateFrame("Frame", "FarmPortalBarAnchor", farmingDockletSlots) + farmPortalBarAnchor:Point("TOPLEFT", farmToolBarAnchor, "TOPRIGHT", 0, 0) + farmPortalBarAnchor:Size(horizontal and ((TOOLSIZE + BUTTONSPACE) * 4) or (TOOLSIZE + BUTTONSPACE), horizontal and (TOOLSIZE + BUTTONSPACE) or ((TOOLSIZE + BUTTONSPACE) * 4)) + + local farmPortalBar = CreateFrame("Frame", "FarmPortalBar", farmPortalBarAnchor) + farmPortalBar:Size(horizontal and ((TOOLSIZE + BUTTONSPACE) * 4) or (TOOLSIZE + BUTTONSPACE), horizontal and (TOOLSIZE + BUTTONSPACE) or ((TOOLSIZE + BUTTONSPACE) * 4)) + farmPortalBar:SetPoint("TOPLEFT", farmPortalBarAnchor, "TOPLEFT", (horizontal and BUTTONSPACE or (TOOLSIZE + BUTTONSPACE)), (horizontal and -(TOOLSIZE + BUTTONSPACE) or -BUTTONSPACE)) + farmPortalBar.ButtonSize = TOOLSIZE; + + -- SEEDS + local farmSeedBarAnchor = CreateFrame("Frame", "FarmSeedBarAnchor", farmingDockletSlots) + farmSeedBarAnchor:Point("TOPLEFT", farmPortalBarAnchor, horizontal and "BOTTOMLEFT" or "TOPRIGHT", 0, 0) + farmSeedBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 10) or ((BUTTONSIZE + BUTTONSPACE) * 8), horizontal and ((BUTTONSIZE + BUTTONSPACE) * 8) or ((BUTTONSIZE + BUTTONSPACE) * 10)) + + for i = 1, NUM_SEED_BARS do + local seedBar = CreateFrame("Frame", "FarmSeedBar"..i, farmSeedBarAnchor) + seedBar.ButtonSize = BUTTONSIZE; + seedBar:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 10) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 10)) + if i == 1 then + seedBar:SetPoint("TOPLEFT", farmSeedBarAnchor, "TOPLEFT", 0, 0) + else + seedBar:SetPoint("TOPLEFT", "FarmSeedBar"..i-1, horizontal and "BOTTOMLEFT" or "TOPRIGHT", 0, 0) + end + end + + farmingDocklet:Hide() + else + local BUTTONSIZE = SV.db[Schema].farming.buttonsize or 35; + + -- SEEDS + local farmSeedBarAnchor = CreateFrame("Frame", "FarmSeedBarAnchor", SV.UIParent) + farmSeedBarAnchor:Point("TOPRIGHT", SV.UIParent, "TOPRIGHT", -40, -300) + farmSeedBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 10) or ((BUTTONSIZE + BUTTONSPACE) * 8), horizontal and ((BUTTONSIZE + BUTTONSPACE) * 8) or ((BUTTONSIZE + BUTTONSPACE) * 10)) + for i = 1, NUM_SEED_BARS do + local seedBar = CreateFrame("Frame", "FarmSeedBar"..i, farmSeedBarAnchor) + seedBar:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 10) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 10)) + seedBar:SetPoint("TOPRIGHT", _G["FarmSeedBarAnchor"], "TOPRIGHT", (horizontal and 0 or -((BUTTONSIZE + BUTTONSPACE) * i)), (horizontal and -((BUTTONSIZE + BUTTONSPACE) * i) or 0)) + seedBar.ButtonSize = BUTTONSIZE; + end + SV.Mentalo:Add(farmSeedBarAnchor, "Farming Seeds") + + -- FARM TOOLS + local farmToolBarAnchor = CreateFrame("Frame", "FarmToolBarAnchor", SV.UIParent) + farmToolBarAnchor:Point("TOPRIGHT", farmSeedBarAnchor, horizontal and "BOTTOMRIGHT" or "TOPLEFT", horizontal and 0 or -(BUTTONSPACE * 2), horizontal and -(BUTTONSPACE * 2) or 0) + farmToolBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) + local farmToolBar = CreateFrame("Frame", "FarmToolBar", farmToolBarAnchor) + farmToolBar:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) + farmToolBar:SetPoint("TOPRIGHT", farmToolBarAnchor, "TOPRIGHT", (horizontal and -BUTTONSPACE or -(BUTTONSIZE + BUTTONSPACE)), (horizontal and -(BUTTONSIZE + BUTTONSPACE) or -BUTTONSPACE)) + farmToolBar.ButtonSize = BUTTONSIZE; + SV.Mentalo:Add(farmToolBarAnchor, "Farming Tools") + + -- PORTALS + local farmPortalBarAnchor = CreateFrame("Frame", "FarmPortalBarAnchor", SV.UIParent) + farmPortalBarAnchor:Point("TOPRIGHT", farmToolBarAnchor, horizontal and "BOTTOMRIGHT" or "TOPLEFT", horizontal and 0 or -(BUTTONSPACE * 2), horizontal and -(BUTTONSPACE * 2) or 0) + farmPortalBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) + local farmPortalBar = CreateFrame("Frame", "FarmPortalBar", farmPortalBarAnchor) + farmPortalBar:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) + farmPortalBar:SetPoint("TOPRIGHT", farmPortalBarAnchor, "TOPRIGHT", (horizontal and -BUTTONSPACE or -(BUTTONSIZE + BUTTONSPACE)), (horizontal and -(BUTTONSIZE + BUTTONSPACE) or -BUTTONSPACE)) + farmPortalBar.ButtonSize = BUTTONSIZE; + SV.Mentalo:Add(farmPortalBarAnchor, "Farming Portals") + end +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua b/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua new file mode 100644 index 0000000..995b328 --- /dev/null +++ b/Interface/AddOns/SVUI_CraftOMatic/components/fishing.lua @@ -0,0 +1,382 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local type = _G.type; +local string = _G.string; +local math = _G.math; +local table = _G.table; +local rept = string.rep; +local tsort,twipe = table.sort,table.wipe; +local floor,ceil = math.floor, math.ceil; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local PLUGIN = select(2, ...); +local Schema = PLUGIN.Schema; +--[[ +########################################################## +LOCAL VARS +########################################################## +]]-- +local fishingIsKnown, fishingSpell, fishingLure; +local proxyTest = false; +local refLures = { + { ["id"] = 6529, ["bonus"] = 25, ["skillReq"] = 1, ["order"] = 10, }, --Shiny Bauble + { ["id"] = 6811, ["bonus"] = 50, ["skillReq"] = 50, ["order"] = 10, }, --Aquadynamic Fish Lens + { ["id"] = 6530, ["bonus"] = 50, ["skillReq"] = 50, ["order"] = 10, }, --Nightcrawlers + { ["id"] = 7307, ["bonus"] = 75, ["skillReq"] = 100, ["order"] = 10, }, --Flesh Eating Worm + { ["id"] = 6532, ["bonus"] = 75, ["skillReq"] = 100, ["order"] = 10, }, --Bright Baubles + { ["id"] = 34861, ["bonus"] = 100, ["skillReq"] = 100, ["order"] = 10, }, --Sharpened Fish Hook + { ["id"] = 6533, ["bonus"] = 100, ["skillReq"] = 100, ["order"] = 10, }, --Aquadynamic Fish Attractor + { ["id"] = 62673, ["bonus"] = 100, ["skillReq"] = 100, ["order"] = 10, }, --Feathered Lure + { ["id"] = 46006, ["bonus"] = 100, ["skillReq"] = 100, ["order"] = 60, }, --Glow Worm + { ["id"] = 68049, ["bonus"] = 150, ["skillReq"] = 250, ["order"] = 5, }, --Heat-Treated Spinning Lure + { ["id"] = 67404, ["bonus"] = 15, ["skillReq"] = 1, ["order"] = 10, }, --Glass Fishing Bobber +} +tsort(refLures, function(a,b) + if ( a.bonus == b.bonus ) then + return a.order < b.order; + else + return a.bonus < b.bonus; + end +end); +local refHats = { + { ["id"] = 93732, ["weight"] = 10, ["nocast"] = true }, --Darkmoon Fishing Hat + { ["id"] = 33820, ["weight"] = 50 }, --Weather Beaten Fishing Hat + { ["id"] = 19972, ["weight"] = 75 }, --Lucky Fishing Hat + { ["id"] = 88710, ["weight"] = 100 }, --Nats Hat +} +local refPoles = { + { ["id"] = 44050, ["weight"] = 33 }, --Kaluak + { ["id"] = 25978, ["weight"] = 22 }, --Seths Graphite + { ["id"] = 19022, ["weight"] = 21 }, --Nat Pagles Extreme Angler + { ["id"] = 6367, ["weight"] = 20 }, --Big Iron + { ["id"] = 6366, ["weight"] = 15 }, --Darkwood + { ["id"] = 84661, ["weight"] = 32 }, --Dragon + { ["id"] = 19970, ["weight"] = 40 }, --Arcanite + { ["id"] = 45858, ["weight"] = 25 }, --Nats Lucky + { ["id"] = 45992, ["weight"] = 31 }, --Jeweled + { ["id"] = 45991, ["weight"] = 30 }, --Bone + { ["id"] = 6365, ["weight"] = 5 }, --Strong + { ["id"] = 12225, ["weight"] = 4 }, --Blump Family + { ["id"] = 46337, ["weight"] = 3 }, --Staats + { ["id"] = 84660, ["weight"] = 10 }, --Pandaren + { ["id"] = 6256, ["weight"] = 1 } --Standard +} +local DockButton; +--[[ +########################################################## +LOCAL FUNCTIONS +########################################################## +]]-- +local function SendModeMessage(...) + if not CombatText_AddMessage then return end + CombatText_AddMessage(...) +end + +local function GetFishingSkill() + local fishing = select(4, GetProfessions()) + if (fishing) then + local rank = select(3, GetProfessionInfo(fishing)) + return rank + end + return 0, 0, 0 +end + +local function FishingPoleIsEquipped() + local itemId = GetInventoryItemID("player", 16) + if itemId then + local subclass = select(7, GetItemInfo(itemId)) + local weaponSubTypesList = select(17, GetAuctionItemSubClasses(1)) + if subclass == weaponSubTypesList then + return true + else + return false + end + else + return false + end +end + +local function UpdateFishingGear(autoequip) + local lastBonus, lastWeight = 0,0; + local rawskill = GetFishingSkill(); + local item,id,bonus,count; + + -- Check for and equip a fishing hat, if autoequip is enabled + if(autoequip) then + local fishingHat = false; + for i=1, #refHats do + item = refHats[i] + id = item.id + bonus = item.weight + count = GetItemCount(id) + if ( count > 0 and bonus > lastWeight ) then + fishingHat = id + lastWeight = bonus + if(item.weight > 10) then + fishingLure = id + lastBonus = bonus + end + end + end + if(fishingHat) then + local HelmetID = GetInventoryItemID("player", INVSLOT_HEAD); + if(HelmetID) then + PLUGIN.WornItems["HEAD"] = HelmetID + end + EquipItemByName(fishingHat) + PLUGIN.InModeGear = true + end + end + + -- Check for and save best fishing lure + for i=1, #refLures do + item = refLures[i] + id = item.id + bonus = item.bonus + count = GetItemCount(id) + if ( count > 0 and bonus > (lastBonus or 0) ) then + if ( item.skillReq <= rawskill ) then + fishingLure = id + lastBonus = bonus + end + end + end + + -- Check for and equip a fishing pole, if autoequip is enabled + if(autoequip) then + lastBonus = 0; + local fishingPole = false; + for i=1, #refPoles do + item = refPoles[i] + id = item.id + bonus = item.weight + count = GetItemCount(id) + if ( count > 0 and bonus > (lastBonus or 0) ) then + fishingPole = id + lastBonus = bonus + end + end + if(fishingPole) then + local MainHandID = GetInventoryItemID("player", INVSLOT_MAINHAND); + if(MainHandID) then + PLUGIN.WornItems["MAIN"] = MainHandID + end + + local OffHandID = GetInventoryItemID("player", INVSLOT_OFFHAND); + if(OffHandID) then + PLUGIN.WornItems["OFF"] = OffHandID; + end + + EquipItemByName(fishingPole) + PLUGIN.InModeGear = true + end + end +end + +local function LootProxy(item, name) + if(item) then + local mask = [[0x100000]]; + local itemType = GetItemFamily(item); + local pass = bit.band(itemType, mask); + if pass > 0 then + proxyTest = true; + end + end +end + +local function GetTitleAndSkill() + local skillRank, skillModifier; + local msg = "|cff22ff11Fishing Mode|r" + local _,_,_,fishing,_,_ = GetProfessions(); + if fishing ~= nil then + _, _, skillRank, _, _, _, _, skillModifier = GetProfessionInfo(fishing) + if(skillModifier) then + skillRank = skillRank + skillModifier; + end + msg = msg .. " (|cff00ddff" .. skillRank .. "|r)"; + end + return msg +end +--[[ +########################################################## +CORE NAMESPACE +########################################################## +]]-- +PLUGIN.Fishing = {}; +PLUGIN.Fishing.Log = {}; +PLUGIN.Fishing.Loaded = false; +--[[ +########################################################## +EVENT HANDLER +########################################################## +]]-- +local EnableListener, DisableListener +do + local FishEventHandler = CreateFrame("Frame") + local LootProxy = function(item, name) + if(item) then + local mask = [[0x10000]]; + local itemType = GetItemFamily(item); + local pass = bit.band(itemType, mask); + if pass > 0 then + proxyTest = true; + end + end + end + + local Fish_OnEvent = function(self, event, ...) + if(InCombatLockdown()) then return end + if(event == "BAG_UPDATE" or event == "CHAT_MSG_SKILL") then + local msg = GetTitleAndSkill() + PLUGIN.TitleWindow:Clear() + PLUGIN.TitleWindow:AddMessage(msg) + elseif(event == "LOOT_OPENED") then + if IsFishingLoot() then + proxyTest = true; + else + proxyTest = false; + end + elseif(event == "CHAT_MSG_LOOT") then + local item, amt = PLUGIN:CheckForModeLoot(...); + if item then + local name, lnk, rarity, lvl, mlvl, itype, stype, cnt, ieq, tex, price = GetItemInfo(item); + if proxyTest == false then + LootProxy(lnk, name) + end + if proxyTest == false then return end + if not PLUGIN.Fishing.Log[name] then + PLUGIN.Fishing.Log[name] = {amount = 0, texture = ""}; + end + local r, g, b, hex = GetItemQualityColor(rarity); + local stored = PLUGIN.Fishing.Log + local mod = stored[name]; + local newAmt = mod.amount + 1; + if amt >= 2 then newAmt = mod.amount + amt end + PLUGIN.Fishing.Log[name].amount = newAmt; + PLUGIN.Fishing.Log[name].texture = tex; + PLUGIN.LogWindow:Clear(); + + for name,data in pairs(stored) do + if type(data) == "table" and data.amount and data.texture then + PLUGIN.LogWindow:AddMessage("|cff55FF55"..data.amount.." x|r |T".. data.texture ..":16:16:0:0:64:64:4:60:4:60|t".." "..name, r, g, b); + end + end + PLUGIN.LogWindow:AddMessage("----------------", 0, 0, 0); + PLUGIN.LogWindow:AddMessage("Caught So Far...", 0, 1, 1); + PLUGIN.LogWindow:AddMessage(" ", 0, 0, 0); + proxyTest = false; + end + end + end + + function EnableListener() + FishEventHandler:RegisterEvent("LOOT_OPENED") + FishEventHandler:RegisterEvent("CHAT_MSG_LOOT") + FishEventHandler:RegisterEvent("BAG_UPDATE") + FishEventHandler:RegisterEvent("CHAT_MSG_SKILL") + FishEventHandler:SetScript("OnEvent", Fish_OnEvent) + end + + function DisableListener() + FishEventHandler:UnregisterAllEvents() + FishEventHandler:SetScript("OnEvent", nil) + end +end +--[[ +########################################################## +CORE METHODS +########################################################## +]]-- +function PLUGIN.Fishing:Enable() + PLUGIN:UpdateFishingMode() + if(not SVUI_ModesDockFrame:IsShown()) then DockButton:Click() end + UpdateFishingGear(SV.db[Schema].fishing.autoequip); + PlaySoundFile("Sound\\Spells\\Tradeskills\\FishCast.wav") + PLUGIN.ModeAlert:SetBackdropColor(0.25, 0.52, 0.1) + if(not IsSpellKnown(131474)) then + PLUGIN:ModeLootLoader("Fishing", "WTF is Fishing?", "You have no clue how to fish! \nThe last time you tried \nyou hooked yourself through the eyelid. \nGo find a trainer and learn \nhow to do this properly!"); + else + local msg = GetTitleAndSkill(); + PLUGIN:ModeLootLoader("Fishing", msg, "Double-Right-Click anywhere on the screen \nto cast your fishing line."); + end + EnableListener() + PLUGIN.ModeAlert:Show() + SendModeMessage("Fishing Mode Enabled", CombatText_StandardScroll, 0.28, 0.9, 0.1); +end + +function PLUGIN.Fishing:Disable() + DisableListener() +end + +function PLUGIN.Fishing:Bind() + if InCombatLockdown() then return end + if fishingIsKnown then + if FishingPoleIsEquipped() then + local hasMainHandEnchant = GetWeaponEnchantInfo() + if hasMainHandEnchant then + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', fishingSpell) + PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to fish.' + elseif(fishingLure) then + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "item") + _G["SVUI_ModeCaptureWindow"]:SetAttribute("item", "item:" .. fishingLure) + if(GetItemCooldown(fishingLure) > 0) then + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', fishingSpell) + PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to fish.' + else + PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to apply fishing enchants.' + end + else + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', fishingSpell) + PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to fish.' + end + else + _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") + _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', fishingSpell) + PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to fish.' + end + SetOverrideBindingClick(_G["SVUI_ModeCaptureWindow"], true, "BUTTON2", "SVUI_ModeCaptureWindow"); + _G["SVUI_ModeCaptureWindow"].Grip:Show(); + end +end +--[[ +########################################################## +LOADER +########################################################## +]]-- +function PLUGIN:UpdateFishingMode() + fishingIsKnown = IsSpellKnown(131474); + fishingSpell = GetSpellInfo(131474); +end + +function PLUGIN:LoadFishingMode() + DockButton = _G["SVUI_ModesDockFrame_ToolBarButton"] + PLUGIN:UpdateFishingMode() +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/modes/archaeology.lua b/Interface/AddOns/SVUI_CraftOMatic/modes/archaeology.lua deleted file mode 100644 index 4f5e5b9..0000000 --- a/Interface/AddOns/SVUI_CraftOMatic/modes/archaeology.lua +++ /dev/null @@ -1,515 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local type = _G.type; -local string = _G.string; -local math = _G.math; -local table = _G.table; -local rept,format = string.rep, string.format; -local tsort,twipe = table.sort, table.wipe; -local floor,ceil = math.floor, math.ceil; -local min = math.min ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local PLUGIN = select(2, ...); -local Schema = PLUGIN.Schema; ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- -local playerRace = select(2,UnitRace("player")) -local archSpell, survey, surveyIsKnown, skillRank, skillModifier; -local EnableListener, DisableListener; -local CanScanResearchSite = CanScanResearchSite -local GetNumArtifactsByRace = GetNumArtifactsByRace -local GetArchaeologyRaceInfo = GetArchaeologyRaceInfo -local GetSelectedArtifactInfo = GetSelectedArtifactInfo -local GetArtifactProgress = GetArtifactProgress -local CanSolveArtifact = CanSolveArtifact -local GetContainerNumSlots = GetContainerNumSlots -local GetContainerItemInfo = GetContainerItemInfo -local GetContainerItemID = GetContainerItemID -local DockButton, ModeLogsFrame; -local refArtifacts = {}; -for i = 1, 12 do - refArtifacts[i] = {} -end -local NEEDS_UPDATE = true; -local ArchCrafting = CreateFrame("Frame", "SVUI_ArchCrafting", UIParent) ---[[ -########################################################## -DATA -########################################################## -]]-- -PLUGIN.Archaeology = {}; -PLUGIN.Archaeology.Bars = {}; -PLUGIN.Archaeology.Loaded = false; ---[[ -########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local function EnableSolve(index, button) - button:SetAlpha(1) - button.text:SetTextColor(1, 1, 1) - button:SetScript("OnEnter", function(self) - self.text:SetTextColor(1, 1, 0) - end) - button:SetScript("OnLeave", function(self) - self.text:SetTextColor(1, 1, 1) - end) - button:SetScript("OnClick", function(self) - SetSelectedArtifact(index) - local _, _, _, _, _, numSockets = GetActiveArtifactByRace(index) - local _, _, itemID = GetArchaeologyRaceInfo(index) - local ready = true - if numSockets and numSockets > 0 then - for socketNum = 1, numSockets do - if not ItemAddedToArtifact(itemID) then - SocketItemToArtifact() - end - end - end - - if GetNumArtifactsByRace(index) > 0 then - print("Solving...") - SolveArtifact() - end - end) -end - -local function DisableSolve(button) - button:SetAlpha(0) - button.text:SetTextColor(0.5, 0.5, 0.5) - button.text:SetText("") - button:SetScript("OnEnter", SV.fubar) - button:SetScript("OnLeave", SV.fubar) - button:SetScript("OnMouseUp", SV.fubar) -end - -local function UpdateArtifactBars(index) - local cache = refArtifacts[index] - local bar = PLUGIN.Archaeology.Bars[index] - - bar["race"]:SetText(cache["race"]) - - if GetNumArtifactsByRace(index) ~= 0 then - local keystoneBonus = 0 - bar["race"]:SetTextColor(1, 1, 1) - bar["progress"]:SetTextColor(1, 1, 1) - if cache["numKeysockets"] then - keystoneBonus = min(cache["numKeystones"], cache["numKeysockets"]) * 12 - end - local actual = min(cache["progress"], cache["total"]) - local potential = cache["total"] - local green = 0.75 * (actual / potential); - bar["bar"]:SetMinMaxValues(0, potential) - bar["bar"]:SetValue(actual) - - if cache["numKeysockets"] and cache["numKeysockets"] > 0 then - bar["solve"].text:SetText(SOLVE.." ["..cache["numKeystones"].."/"..cache["numKeysockets"].."]") - else - bar["solve"].text:SetText(SOLVE) - end - - if keystoneBonus > 0 then - bar["progress"]:SetText(format("|cff00c1ea%d|r/%d", cache["progress"] + keystoneBonus, cache["total"])) - else - if cache["total"] > 65 then - bar["progress"]:SetText(format("%d/|cff00c1ea%d|r", cache["progress"], cache["total"])) - else - bar["progress"]:SetText(format("%d/%d", cache["progress"], cache["total"])) - end - end - if cache["canSolve"] then - EnableSolve(index, bar["solve"]) - else - DisableSolve(bar["solve"]) - end - bar["bar"]:SetStatusBarColor(0.1, green, 1, 0.5) - else - DisableSolve(bar["solve"]) - bar["progress"]:SetText("") - bar["bar"]:SetStatusBarColor(0, 0, 0, 0) - bar["race"]:SetTextColor(0.25, 0.25, 0.25) - bar["progress"]:SetTextColor(0.25, 0.25, 0.25) - end -end - -local function UpdateArtifactCache() - local found, raceName, raceItemID, cache, _; - for index = 1, 12 do - found = GetNumArtifactsByRace(index) - raceName, _, raceItemID = GetArchaeologyRaceInfo(index) - cache = refArtifacts[index] - cache["race"] = raceName - cache["keyID"] = raceItemID - cache["numKeystones"] = 0 - local oldNum = cache["progress"] - if found == 0 then - cache["numKeysockets"] = 0 - cache["progress"] = 0 - cache["modifier"] = 0 - cache["total"] = 0 - cache["canSolve"] = false - else - SetSelectedArtifact(index) - local _, _, _, _, _, keystoneCount = GetSelectedArtifactInfo() - local numFragmentsCollected, numFragmentsAdded, numFragmentsRequired = GetArtifactProgress() - - cache["numKeysockets"] = keystoneCount - cache["progress"] = numFragmentsCollected - cache["modifier"] = numFragmentsAdded - cache["total"] = numFragmentsRequired - cache["canSolve"] = CanSolveArtifact() - - for i = 0, 4 do - for j = 1, GetContainerNumSlots(i) do - local slotID = GetContainerItemID(i, j) - if slotID == cache["keyID"] then - local _, count = GetContainerItemInfo(i, j) - if cache["numKeystones"] < cache["numKeysockets"] then - cache["numKeystones"] = cache["numKeystones"] + count - end - if min(cache["numKeystones"], cache["numKeysockets"]) * 12 + cache["progress"] >= cache["total"] then - cache["canSolve"] = true - end - end - end - end - end - UpdateArtifactBars(index) - end - NEEDS_UPDATE = false -end - -local function GetTitleAndSkill() - local msg = "|cff22ff11Archaeology Mode|r" - if(skillRank) then - if(skillModifier) then - skillRank = skillRank + skillModifier; - end - msg = msg .. " (|cff00ddff" .. skillRank .. "|r)"; - end - return msg -end - -local function SendModeMessage(...) - if not CombatText_AddMessage then return end - CombatText_AddMessage(...) -end ---[[ -########################################################## -EVENT HANDLER -########################################################## -]]-- -do - local SURVEYCDFONT = SV.Media.font.numbers - local SURVEYRED = {0,0.5,1} - local last = 0 - local time = 3 - - local ArchEventHandler = CreateFrame("Frame"); - local SurveyCooldown = CreateFrame("Frame", nil, UIParent); - local ArchSiteFound; - local ArchCanSurvey, ArchWillSurvey = false, false; - - SurveyCooldown:SetPoint("CENTER", 0, -80) - SurveyCooldown:SetSize(150, 150) - SurveyCooldown.text = SurveyCooldown:CreateFontString(nil, "OVERLAY") - SurveyCooldown.text:SetAllPoints(SurveyCooldown) - SurveyCooldown.text:SetFont(SURVEYCDFONT, 150, "OUTLINE") - SurveyCooldown.text:SetTextColor(0,1,0.12,0.5) - SurveyCooldown.text:SetPoint("CENTER") - SurveyCooldown:SetScale(1.5) - - local Arch_OnEvent = function(self, event, ...) - if(InCombatLockdown() or not archSpell) then return end - if(event == "CURRENCY_DISPLAY_UPDATE" or event == "CHAT_MSG_SKILL" or event == "ARTIFACT_COMPLETE") then - local msg = GetTitleAndSkill() - PLUGIN.TitleWindow:Clear() - PLUGIN.TitleWindow:AddMessage(msg) - end - if(CanScanResearchSite() and (event == "CURRENCY_DISPLAY_UPDATE")) then - UpdateArtifactCache() - elseif(event == "ARCHAEOLOGY_SURVEY_CAST" or event == "ARTIFACT_COMPLETE" or event == "ARTIFACT_DIG_SITE_UPDATED") then - UpdateArtifactCache() - elseif(event == "ARTIFACT_HISTORY_READY" or event == "ARTIFACT_DIGSITE_COMPLETE") then - NEEDS_UPDATE = true - else - ArchCanSurvey = CanScanResearchSite() - if(ArchCanSurvey and not ArchWillSurvey) then - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', survey) - PLUGIN.ModeAlert.HelpText = "Double-Right-Click anywhere on the screen to survey."; - ArchWillSurvey = true - elseif(not ArchCanSurvey and ArchWillSurvey) then - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', archSpell) - PLUGIN.ModeAlert.HelpText = "Double-Right-Click anywhere on the screen to open the artifacts window."; - ArchWillSurvey = false - end - if(event == "ZONE_CHANGED_NEW_AREA") then ArchSiteFound = nil end - if(not ArchSiteFound) then - local sites = ArchaeologyMapUpdateAll(); - if(sites and sites > 0) then - ArchSiteFound = true - SendModeMessage("Digsite Located", CombatText_StandardScroll, 0.91, 0.78, 0.12); - else - ArchSiteFound = nil - end - end - if(NEEDS_UPDATE) then - UpdateArtifactCache() - end - end - end - - local Survey_OnUpdate = function(self, elapsed) - last = last + elapsed - if last > 1 then - time = time - 1 - self.text:SetText(time) - if time <= 0 then - self:SetScript("OnUpdate", nil) - self.text:SetText("") - time = 3 - end - self.text:SetTextColor(SURVEYRED[time],1,0.12,0.8) - last = 0 - end - end - - local Survey_OnEvent = function(self, event, unit, _, _, _, spellid) - if not unit == "player" then return end - if spellid == 80451 then - self.text:SetText("3") - self:SetScript("OnUpdate", Survey_OnUpdate) - end - end - - function EnableListener() - UpdateArtifactCache() - - ArchEventHandler:RegisterEvent("ZONE_CHANGED") - ArchEventHandler:RegisterEvent("ZONE_CHANGED_NEW_AREA") - ArchEventHandler:RegisterEvent("ZONE_CHANGED_INDOORS") - - ArchEventHandler:RegisterEvent("ARTIFACT_DIG_SITE_UPDATED") - ArchEventHandler:RegisterEvent("ARTIFACT_DIGSITE_COMPLETE") - ArchEventHandler:RegisterEvent("ARTIFACT_HISTORY_READY") - ArchEventHandler:RegisterEvent("ARTIFACT_COMPLETE") - - ArchEventHandler:RegisterEvent("CURRENCY_DISPLAY_UPDATE") - ArchEventHandler:RegisterEvent("ARCHAEOLOGY_SURVEY_CAST") - - ArchEventHandler:RegisterEvent("CHAT_MSG_SKILL") - - ArchEventHandler:SetScript("OnEvent", Arch_OnEvent) - if(playerRace ~= "Dwarf") then - SurveyCooldown:RegisterEvent("UNIT_SPELLCAST_STOP") - SurveyCooldown:SetScript("OnEvent", Survey_OnEvent) - end - end - - function DisableListener() - ArchEventHandler:UnregisterAllEvents() - ArchEventHandler:SetScript("OnEvent", nil) - if(playerRace ~= "Dwarf") then - SurveyCooldown:UnregisterAllEvents() - SurveyCooldown:SetScript("OnEvent", nil) - end - end -end ---[[ -########################################################## -CORE FUNCTIONS -########################################################## -]]-- -function PLUGIN.Archaeology:Enable() - PLUGIN.Archaeology:Update() - if(not SVUI_ModesDockFrame:IsShown()) then DockButton:Click() end - - PlaySoundFile("Sound\\Item\\UseSounds\\UseCrinklingPaper.wav") - PLUGIN.ModeAlert:SetBackdropColor(0.25, 0.52, 0.1) - if(not IsSpellKnown(80451)) then - PLUGIN:ModeLootLoader("Archaeology", "WTF is Archaeology?", "You don't know archaeology! \nPicking up a rock and telling everyone that \nyou found a fossil is cute, BUT WRONG!! \nGo find someone who can train you to do this job."); - PLUGIN.TitleWindow:Clear(); - PLUGIN.TitleWindow:AddMessage("WTF is Archaeology?"); - PLUGIN.LogWindow:Clear(); - PLUGIN.LogWindow:AddMessage("You don't know archaeology! \nPicking up a rock and telling everyone that \nyou found a fossil is cute, BUT WRONG!! \nGo find someone who can train you to do this job.", 1, 1, 1); - PLUGIN.LogWindow:AddMessage(" ", 1, 1, 1); - else - ArchCrafting:Show() - local msg = GetTitleAndSkill() - if surveyIsKnown and CanScanResearchSite() then - PLUGIN:ModeLootLoader("Archaeology", msg, "Double-Right-Click anywhere on the screen to survey."); - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', survey) - else - PLUGIN:ModeLootLoader("Archaeology", msg, "Double-Right-Click anywhere on the screen to open the artifacts window."); - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', archSpell) - end - PLUGIN.TitleWindow:Clear(); - PLUGIN.TitleWindow:AddMessage(msg); - end - EnableListener() - PLUGIN.ModeAlert:Show() - SendModeMessage("Archaeology Mode Enabled", CombatText_StandardScroll, 0.28, 0.9, 0.1); -end - -function PLUGIN.Archaeology:Disable() - DisableListener() - ArchCrafting:Hide() -end - -function PLUGIN.Archaeology:Bind() - if InCombatLockdown() then return end - if(archSpell) then - if surveyIsKnown and CanScanResearchSite() then - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', survey) - PLUGIN.ModeAlert.HelpText = 'Double-Right-Click anywhere on the screen to survey.' - else - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', archSpell) - PLUGIN.ModeAlert.HelpText = 'Double-Right-Click anywhere on the screen to open the artifacts window.' - end - SetOverrideBindingClick(_G["SVUI_ModeCaptureWindow"], true, "BUTTON2", "SVUI_ModeCaptureWindow"); - _G["SVUI_ModeCaptureWindow"].Grip:Show(); - end -end - -function PLUGIN.Archaeology:Update() - surveyIsKnown = IsSpellKnown(80451); - survey = GetSpellInfo(80451); - local _,_,arch,_,_,_ = GetProfessions(); - if(arch) then - archSpell, _, skillRank, _, _, _, _, skillModifier = GetProfessionInfo(arch) - end -end ---[[ -########################################################## -LOADER -########################################################## -]]-- -function PLUGIN:LoadArchaeologyMode() - ModeLogsFrame = PLUGIN.LogWindow; - DockButton = _G["SVUI_ModesDockFrame_ToolBarButton"]; - - local progressBars = PLUGIN.Archaeology.Bars - - ArchCrafting:SetParent(ModeLogsFrame) - ArchCrafting:SetFrameStrata("MEDIUM") - ArchCrafting:FillInner(ModeLogsFrame) - - local BAR_WIDTH = (ArchCrafting:GetWidth() * 0.5) - 4 - local BAR_HEIGHT = (ArchCrafting:GetHeight() / 6) - 4 - - for i = 1, 12 do - local bar = CreateFrame("StatusBar", nil, ArchCrafting) - local race = bar:CreateFontString() - local progress = bar:CreateFontString() - local solve = CreateFrame("Button", nil, bar, "SecureHandlerClickTemplate") - local yOffset; - - bar:SetPanelTemplate("Inset") - bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - bar:SetSize(BAR_WIDTH,BAR_HEIGHT) - if(i > 6) then - yOffset = ((i - 7) * (BAR_HEIGHT + 4)) + 4 - bar:SetPoint("TOPRIGHT", ArchCrafting, "TOPRIGHT", -2, -yOffset) - else - yOffset = ((i - 1) * (BAR_HEIGHT + 4)) + 4; - bar:SetPoint("TOPLEFT", ArchCrafting, "TOPLEFT", 2, -yOffset) - end - bar:SetStatusBarColor(0.2, 0.2, 0.8, 0.5) - bar:SetScript("OnEnter", function(self) - GameTooltip:SetOwner(self, "ANCHOR_BOTTOMRIGHT", 2, 250) - GameTooltip:ClearLines() - if GetNumArtifactsByRace(i) > 0 then - SetSelectedArtifact(i) - local artifactName, artifactDescription, artifactRarity, _, _, keystoneCount = GetSelectedArtifactInfo() - local numFragmentsCollected, numFragmentsAdded, numFragmentsRequired = GetArtifactProgress() - local r, g, b - if artifactRarity == 1 then - artifactRarity = ITEM_QUALITY3_DESC - r, g, b = GetItemQualityColor(3) - else - artifactRarity = ITEM_QUALITY1_DESC - r, g, b = GetItemQualityColor(1) - end - GameTooltip:AddLine(artifactName, r, g, b, 1) - GameTooltip:AddLine(artifactRarity, r, g, b, r, g, b) - GameTooltip:AddDoubleLine(ARCHAEOLOGY_RUNE_STONES..": "..numFragmentsCollected.."/"..numFragmentsRequired, "Keystones: "..keystoneCount, 1, 1, 1, 1, 1, 1) - GameTooltip:AddLine(" ") - GameTooltip:AddLine(artifactDescription, 1, 1, 1, 1) - GameTooltip:Show() - end - end) - bar:SetScript("OnLeave", function() - GameTooltip:Hide() - end) - - -- Race Text - race:SetFont(SV.Media.font.roboto, 12, "OUTLINE") - race:SetText(RACE) - race:SetPoint("LEFT", bar, "LEFT", 2, 0) - - -- Progress Text - progress:SetFont(SV.Media.font.roboto, 12, "OUTLINE") - progress:SetText("") - progress:SetPoint("RIGHT", bar, "RIGHT", 1, 0) - - -- Solve - solve:SetAllPoints(bar) - - solve.bg = solve:CreateTexture(nil,"BORDER") - solve.bg:SetAllPoints(solve) - solve.bg:SetTexture(SV.Media.bar.default) - solve.bg:SetVertexColor(0.1,0.5,0) - - solve.text = solve:CreateFontString(nil,"OVERLAY") - solve.text:SetFont(SV.Media.font.roboto, 14, "NONE") - solve.text:SetShadowOffset(-1,-1) - solve.text:SetShadowColor(0,0,0,0.5) - solve.text:SetText(SOLVE) - solve.text:SetPoint("CENTER", solve, "CENTER", 2, 0) - - progressBars[i] = { - ["bar"] = bar, - ["race"] = race, - ["progress"] = progress, - ["solve"] = solve - } - end - ArchCrafting:Hide() - PLUGIN.Archaeology:Update() - UpdateArtifactCache() -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/modes/cooking.lua b/Interface/AddOns/SVUI_CraftOMatic/modes/cooking.lua deleted file mode 100644 index 749480d..0000000 --- a/Interface/AddOns/SVUI_CraftOMatic/modes/cooking.lua +++ /dev/null @@ -1,230 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local type = _G.type; -local string = _G.string; -local math = _G.math; -local table = _G.table; -local rept = string.rep; -local tsort,twipe = table.sort,table.wipe; -local floor,ceil = math.floor, math.ceil; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local PLUGIN = select(2, ...); -local Schema = PLUGIN.Schema; ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- -local cookingSpell, campFire, skillRank, skillModifier; -local DockButton; ---[[ -########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local function UpdateChefWear() - if(GetItemCount(46349) > 0) then - PLUGIN.WornItems["HEAD"] = GetInventoryItemID("player", INVSLOT_HEAD); - EquipItemByName(46349) - PLUGIN.InModeGear = true - end - if(GetItemCount(86468) > 0) then - PLUGIN.WornItems["TAB"] = GetInventoryItemID("player", INVSLOT_TABARD); - EquipItemByName(86468) - PLUGIN.InModeGear = true - end - if(GetItemCount(86559) > 0) then - PLUGIN.WornItems["MAIN"] = GetInventoryItemID("player", INVSLOT_MAINHAND); - EquipItemByName(86559) - PLUGIN.InModeGear = true - end - if(GetItemCount(86558) > 0) then - PLUGIN.WornItems["OFF"] = GetInventoryItemID("player", INVSLOT_OFFHAND); - EquipItemByName(86558) - PLUGIN.InModeGear = true - end -end - -local function GetTitleAndSkill() - local msg = "|cff22ff11Cooking Mode|r" - if(skillRank) then - if(skillModifier) then - skillRank = skillRank + skillModifier; - end - msg = msg .. " (|cff00ddff" .. skillRank .. "|r)"; - end - return msg -end - -local function SendModeMessage(...) - if not CombatText_AddMessage then return end - CombatText_AddMessage(...) -end ---[[ -########################################################## -CORE NAMESPACE -########################################################## -]]-- -PLUGIN.Cooking = {}; -PLUGIN.Cooking.Log = {}; -PLUGIN.Cooking.Loaded = false; ---[[ -########################################################## -EVENT HANDLER -########################################################## -]]-- -local EnableListener, DisableListener -do - local CookEventHandler = CreateFrame("Frame") - local LootProxy = function(item, name) - if(item) then - local mask = [[0x10000]]; - local itemType = GetItemFamily(item); - local pass = bit.band(itemType, mask); - if pass > 0 then - proxyTest = true; - end - end - end - - local Cook_OnEvent = function(self, event, ...) - if(InCombatLockdown()) then return end - if(event == "BAG_UPDATE" or event == "CHAT_MSG_SKILL") then - local msg = GetTitleAndSkill() - PLUGIN.TitleWindow:Clear() - PLUGIN.TitleWindow:AddMessage(msg) - elseif(event == "CHAT_MSG_LOOT") then - local item, amt = PLUGIN:CheckForModeLoot(...); - if item then - local name, lnk, rarity, lvl, mlvl, itype, stype, cnt, ieq, tex, price = GetItemInfo(item); - if proxyTest == false then - LootProxy(lnk, name) - end - if proxyTest == false then return end - if not PLUGIN.Cooking.Log[name] then - PLUGIN.Cooking.Log[name] = {amount = 0, texture = ""}; - end - local r, g, b, hex = GetItemQualityColor(rarity); - local stored = PLUGIN.Cooking.Log - local mod = stored[name]; - local newAmt = mod.amount + 1; - if amt >= 2 then newAmt = mod.amount + amt end - PLUGIN.Cooking.Log[name].amount = newAmt; - PLUGIN.Cooking.Log[name].texture = tex; - PLUGIN.LogWindow:Clear(); - for name,data in pairs(stored) do - if type(data) == "table" and data.amount and data.texture then - PLUGIN.LogWindow:AddMessage("|cff55FF55"..data.amount.." x|r |T".. data.texture ..":16:16:0:0:64:64:4:60:4:60|t".." "..name, r, g, b); - end - end - PLUGIN.LogWindow:AddMessage("----------------", 0, 0, 0); - PLUGIN.LogWindow:AddMessage("Cooked So Far...", 0, 1, 1); - PLUGIN.LogWindow:AddMessage(" ", 0, 0, 0); - proxyTest = false; - end - end - end - - function EnableListener() - CookEventHandler:RegisterEvent("ZONE_CHANGED") - CookEventHandler:RegisterEvent("BAG_UPDATE") - CookEventHandler:RegisterEvent("CHAT_MSG_SKILL") - CookEventHandler:SetScript("OnEvent", Cook_OnEvent) - end - - function DisableListener() - CookEventHandler:UnregisterAllEvents() - CookEventHandler:SetScript("OnEvent", nil) - end -end ---[[ -########################################################## -CORE METHODS -########################################################## -]]-- -function PLUGIN.Cooking:Enable() - PLUGIN.Cooking:Update() - if(not SVUI_ModesDockFrame:IsShown()) then DockButton:Click() end - if(SV.db[Schema].cooking.autoequip) then - UpdateChefWear(); - end - PlaySoundFile("Sound\\Spells\\Tradeskills\\CookingPrepareA.wav") - PLUGIN.ModeAlert:SetBackdropColor(0.25, 0.52, 0.1) - - if(not IsSpellKnown(818)) then - PLUGIN:ModeLootLoader("Cooking", "WTF is Cooking?", "You have no clue how to cook! \nEven toast is a mystery to you. \nGo find a trainer and learn \nhow to do this simple job."); - else - local msg = GetTitleAndSkill(); - if cookingSpell and GetSpellCooldown(campFire) > 0 then - PLUGIN:ModeLootLoader("Cooking", msg, "Double-Right-Click anywhere on the screen \nto open your cookbook."); - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', cookingSpell) - else - PLUGIN:ModeLootLoader("Cooking", msg, "Double-Right-Click anywhere on the screen \nto start a cooking fire."); - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', campFire) - end - end - EnableListener() - PLUGIN.ModeAlert:Show() - SendModeMessage("Cooking Mode Enabled", CombatText_StandardScroll, 0.28, 0.9, 0.1); -end - -function PLUGIN.Cooking:Disable() - DisableListener() -end - -function PLUGIN.Cooking:Bind() - if InCombatLockdown() then return end - if cookingSpell then - if cookingSpell and GetSpellCooldown(campFire) > 0 then - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', cookingSpell) - PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to open the cooking window.' - end - SetOverrideBindingClick(_G["SVUI_ModeCaptureWindow"], true, "BUTTON2", "SVUI_ModeCaptureWindow"); - _G["SVUI_ModeCaptureWindow"].Grip:Show(); - end -end - -function PLUGIN.Cooking:Update() - campFire = GetSpellInfo(818); - local _,_,_,_,cook,_ = GetProfessions(); - if cook ~= nil then - cookingSpell, _, skillRank, _, _, _, _, skillModifier = GetProfessionInfo(cook) - end -end ---[[ -########################################################## -LOADER -########################################################## -]]-- -function PLUGIN:LoadCookingMode() - DockButton = _G["SVUI_ModesDockFrame_ToolBarButton"]; -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/modes/farming.lua b/Interface/AddOns/SVUI_CraftOMatic/modes/farming.lua deleted file mode 100644 index fc802b1..0000000 --- a/Interface/AddOns/SVUI_CraftOMatic/modes/farming.lua +++ /dev/null @@ -1,615 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local type = _G.type; -local string = _G.string; -local math = _G.math; -local table = _G.table; -local rept = string.rep; -local tsort,twipe = table.sort,table.wipe; -local floor,ceil = math.floor, math.ceil; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local PLUGIN = select(2, ...); -local Schema = PLUGIN.Schema; ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- -local NUM_SEED_BARS = 7 -local EnableListener, DisableListener, InventoryUpdate, LoadFarmingModeTools; -local seedButtons,farmToolButtons,portalButtons = {},{},{}; -local DockButton, ModeLogsFrame; -local refSeeds = {[79102]={1},[89328]={1},[80590]={1},[80592]={1},[80594]={1},[80593]={1},[80591]={1},[89329]={1},[80595]={1},[89326]={1},[80809]={3},[95434]={4},[89848]={3},[95437]={4},[84782]={3},[95436]={4},[85153]={3},[95438]={4},[85162]={3},[95439]={4},[85158]={3},[95440]={4},[84783]={3},[95441]={4},[89849]={3},[95442]={4},[85163]={3},[95443]={4},[89847]={3},[95444]={4},[85216]={2},[85217]={2},[89202]={2},[85215]={2},[89233]={2},[89197]={2},[85219]={2},[91806]={2},[95449]={5},[95450]={6},[95451]={5},[95452]={6},[95457]={5},[95458]={6},[95447]={5},[95448]={6},[95445]={5},[95446]={6},[95454]={5},[95456]={6},[85267]={7},[85268]={7},[85269]={7}}; -local refTools = {[79104]={30254},[80513]={30254},[89880]={30535},[89815]={31938}}; -local refPortals = {[91850]={"Horde"},[91861]={"Horde"},[91862]={"Horde"},[91863]={"Horde"},[91860]={"Alliance"},[91864]={"Alliance"},[91865]={"Alliance"},[91866]={"Alliance"}}; ---[[ -########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local Scroll_OnValueChanged = function(self,argValue) - FarmModeFrame:SetVerticalScroll(argValue) -end - -local Scroll_OnMouseWheel = function(self, delta) - local scroll = self:GetVerticalScroll(); - local value = (scroll - (20 * delta)); - if value < -1 then - value = 0 - end - if value > 420 then - value = 420 - end - self:SetVerticalScroll(value) - self.slider:SetValue(value) -end - -local function FindItemInBags(itemId) - for container = 0, NUM_BAG_SLOTS do - for slot = 1, GetContainerNumSlots(container) do - if itemId == GetContainerItemID(container, slot) then - return container, slot - end - end - end -end ---[[ -########################################################## -EVENT HANDLER -########################################################## -]]-- -do - local FarmEventHandler = CreateFrame("Frame") - - local ButtonUpdate = function(button) - button.items = GetItemCount(button.itemId) - if button.text then - button.text:SetText(button.items) - end - button.icon:SetDesaturated(button.items == 0) - button.icon:SetAlpha(button.items == 0 and .25 or 1) - end - - local InFarmZone = function() - local zone = GetSubZoneText() - if (zone == L["Sunsong Ranch"] or zone == L["The Halfhill Market"]) then - if PLUGIN.Farming.ToolsLoaded and PLUGIN.ModeAlert:IsShown() then - PLUGIN.TitleWindow:Clear() - PLUGIN.TitleWindow:AddMessage("|cff22ff11Farming Mode|r") - end - return true - else - if PLUGIN.Farming.ToolsLoaded and PLUGIN.ModeAlert:IsShown() then - PLUGIN.TitleWindow:Clear() - PLUGIN.TitleWindow:AddMessage("|cffff2211Must be in Sunsong Ranch|r") - end - return false - end - end - - local UpdateFarmtoolCooldown = function() - for i = 1, NUM_SEED_BARS do - for _, button in ipairs(seedButtons[i]) do - if button.cooldown then - button.cooldown:SetCooldown(GetItemCooldown(button.itemId)) - end - end - end - for _, button in ipairs(farmToolButtons) do - if button.cooldown then - button.cooldown:SetCooldown(GetItemCooldown(button.itemId)) - end - end - for _, button in ipairs(portalButtons) do - if button.cooldown then - button.cooldown:SetCooldown(GetItemCooldown(button.itemId)) - end - end - end - - local Farm_OnEvent = function(self, event, ...) - if(InCombatLockdown()) then return end - if(event == "ZONE_CHANGED") then - local inZone = InFarmZone() - if not inZone and SV.db[Schema].farming.droptools then - for k, v in pairs(refTools) do - local container, slot = FindItemInBags(k) - if container and slot then - PickupContainerItem(container, slot) - DeleteCursorItem() - end - end - end - if inZone then - self:RegisterEvent("BAG_UPDATE") - self:RegisterEvent("BAG_UPDATE_COOLDOWN") - else - self:UnregisterEvent("BAG_UPDATE") - self:UnregisterEvent("BAG_UPDATE_COOLDOWN") - end - InventoryUpdate() - elseif(event == "BAG_UPDATE") then - InventoryUpdate() - elseif(event == "BAG_UPDATE_COOLDOWN") then - UpdateFarmtoolCooldown() - end - end - - InventoryUpdate = function() - if InCombatLockdown() then - FarmEventHandler:RegisterEvent("PLAYER_REGEN_ENABLED", InventoryUpdate) - return - else - FarmEventHandler:UnregisterEvent("PLAYER_REGEN_ENABLED") - end - for i = 1, NUM_SEED_BARS do - for _, button in ipairs(seedButtons[i]) do - ButtonUpdate(button) - end - end - for _, button in ipairs(farmToolButtons) do - ButtonUpdate(button) - end - for _, button in ipairs(portalButtons) do - ButtonUpdate(button) - end - - PLUGIN:RefreshFarmingTools() - end - - EnableListener = function() - FarmEventHandler:RegisterEvent("ZONE_CHANGED") - FarmEventHandler:SetScript("OnEvent", Farm_OnEvent) - end - - DisableListener = function() - FarmEventHandler:UnregisterAllEvents() - FarmEventHandler:SetScript("OnEvent", nil) - end -end ---[[ -########################################################## -LOADING HANDLER -########################################################## -]]-- -do - local seedsort = function(a, b) return a.sortname < b.sortname end - - local SeedToSoil = function(group, itemId) - if(UnitName("target") ~= L["Tilled Soil"]) then return false; end - for i, v in pairs(group) do - if i == itemId then return true end - end - return false - end - - local Button_OnEnter = function(self) - GameTooltip:SetOwner(self, 'ANCHOR_TOPLEFT', 2, 4) - GameTooltip:ClearLines() - GameTooltip:AddDoubleLine(self.sortname) - if self.allowDrop then - GameTooltip:AddLine(L['Right-click to drop the item.']) - end - GameTooltip:Show() - end - - local Button_OnLeave = function() - GameTooltip:Hide() - end - - local Button_OnMouseDown = function(self, mousebutton) - if InCombatLockdown() then return end - if mousebutton == "LeftButton" then - self:SetAttribute("type", self.buttonType) - self:SetAttribute(self.buttonType, self.sortname) - if(SeedToSoil(refSeeds, self.itemId)) then - local container, slot = FindItemInBags(self.itemId) - if container and slot then - self:SetAttribute("type", "macro") - self:SetAttribute("macrotext", format("/targetexact %s \n/use %s %s", L["Tilled Soil"], container, slot)) - end - end - if self.cooldown then - self.cooldown:SetCooldown(GetItemCooldown(self.itemId)) - end - elseif mousebutton == "RightButton" and self.allowDrop then - self:SetAttribute("type", "click") - local container, slot = FindItemInBags(self.itemId) - if container and slot then - PickupContainerItem(container, slot) - DeleteCursorItem() - end - end - end - - local function CreateFarmingButton(index, owner, buttonName, buttonType, name, texture, allowDrop, showCount) - local BUTTONSIZE = owner.ButtonSize; - local button = CreateFrame("Button", ("FarmingButton"..buttonName.."%d"):format(index), owner, "SecureActionButtonTemplate") - button:SetFixedPanelTemplate("Transparent") - button.Panel:SetFrameLevel(0) - button:SetNormalTexture(nil) - button:Size(BUTTONSIZE, BUTTONSIZE) - button.sortname = name - button.itemId = index - button.allowDrop = allowDrop - button.buttonType = buttonType - button.items = GetItemCount(index) - button.icon = button:CreateTexture(nil, "OVERLAY", nil, 2) - button.icon:SetTexture(texture) - button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - button.icon:FillInner(button,2,2) - if showCount then - button.text = button:CreateFontString(nil, "OVERLAY") - button.text:SetFont(SV.Media.font.action, 12, "OUTLINE") - button.text:SetPoint("BOTTOMRIGHT", button, 1, 2) - end - button.cooldown = CreateFrame("Cooldown", ("FarmingButton"..buttonName.."%dCooldown"):format(index), button) - button.cooldown:SetAllPoints(button) - button:SetScript("OnEnter", Button_OnEnter) - button:SetScript("OnLeave", Button_OnLeave) - button:SetScript("OnMouseDown", Button_OnMouseDown) - return button - end - - function LoadFarmingModeTools() - local itemError = false - for k, v in pairs(refSeeds) do - if select(2, GetItemInfo(k)) == nil then itemError = true end - end - for k, v in pairs(refTools) do - if select(2, GetItemInfo(k)) == nil then itemError = true end - end - for k, v in pairs(refPortals) do - if select(2, GetItemInfo(k)) == nil then itemError = true end - end - if InCombatLockdown() or itemError then - PLUGIN.TitleWindow:AddMessage("|cffffff11Loading Farm Tools...|r|cffff1111PLEASE WAIT|r") - SV.Timers:ExecuteTimer(LoadFarmingModeTools, 5) - else - local horizontal = SV.db[Schema].farming.toolbardirection == 'HORIZONTAL' - - local seeds, farmtools, portals = {},{},{} - - for k, v in pairs(refSeeds) do - seeds[k] = { v[1], GetItemInfo(k) } - end - - for k, v in pairs(refTools) do - farmtools[k] = { v[1], GetItemInfo(k) } - end - - for k, v in pairs(refPortals) do - portals[k] = { v[1], GetItemInfo(k) } - end - - for i = 1, NUM_SEED_BARS do - local seedBar = _G["FarmSeedBar"..i] - seedButtons[i] = seedButtons[i] or {} - local sbc = 1; - for k, v in pairs(seeds) do - if v[1] == i then - seedButtons[i][sbc] = CreateFarmingButton(k, seedBar, "SeedBar"..i.."Seed", "item", v[2], v[11], false, true); - sbc = sbc + 1; - end - tsort(seedButtons[i], seedsort) - end - end - - local ftc = 1; - for k, v in pairs(farmtools) do - farmToolButtons[ftc] = CreateFarmingButton(k, _G["FarmToolBar"], "Tools", "item", v[2], v[11], true, false); - ftc = ftc + 1; - end - - local playerFaction = UnitFactionGroup('player') - local pbc = 1; - for k, v in pairs(portals) do - if v[1] == playerFaction then - portalButtons[pbc] = CreateFarmingButton(k, _G["FarmPortalBar"], "Portals", "item", v[2], v[11], false, true); - pbc = pbc + 1; - end - end - - PLUGIN.Farming.Loaded = true - SV.Timers:ExecuteTimer(PLUGIN.Farming.Enable, 1.5) - end - end -end ---[[ -########################################################## -CORE FUNCTIONS -########################################################## -]]-- -PLUGIN.Farming = {}; -PLUGIN.Farming.Loaded = false; -PLUGIN.Farming.ToolsLoaded = false; - -function PLUGIN.Farming:Enable() - if InCombatLockdown() then return end - - PLUGIN:ModeLootLoader("Farming", "Farming Mode", "This mode will provide you \nwith fast-access buttons for each \nof your seeds and farming tools."); - - PLUGIN.TitleWindow:Clear() - if(not PLUGIN.Farming.Loaded) then - PLUGIN.TitleWindow:AddMessage("|cffffff11Loading Farm Tools...|r") - LoadFarmingModeTools() - return - else - if not PLUGIN.Farming.ToolsLoaded then - PlaySoundFile("Sound\\Effects\\DeathImpacts\\mDeathImpactColossalDirtA.wav") - PLUGIN.TitleWindow:AddMessage("|cff22ff11Farming Mode|r") - PLUGIN.ModeAlert:Show() - InventoryUpdate() - PLUGIN.Farming.ToolsLoaded = true - EnableListener() - if not FarmModeFrame:IsShown() then FarmModeFrame:Show() end - if(not SVUI_ModesDockFrame:IsShown()) then DockButton:Click() end - end - end -end - -function PLUGIN.Farming:Disable() - if(InCombatLockdown() or (not PLUGIN.Farming.Loaded) or (not PLUGIN.Farming.ToolsLoaded)) then - DisableListener() - return - end - if SV.db[Schema].farming.droptools then - for k, v in pairs(refTools) do - local container, slot = FindItemInBags(k) - if container and slot then - PickupContainerItem(container, slot) - DeleteCursorItem() - end - end - end - if FarmModeFrame:IsShown() then FarmModeFrame:Hide() end - PLUGIN.Farming.ToolsLoaded = false - DisableListener() -end ---[[ -########################################################## -CORE FUNCTIONS -########################################################## -]]-- -function PLUGIN:RefreshFarmingTools() - local count, horizontal = 0, SV.db[Schema].farming.toolbardirection == 'HORIZONTAL' - local BUTTONSPACE = SV.db[Schema].farming.buttonspacing or 2; - local lastBar; - if not FarmToolBar:IsShown() then - _G["FarmSeedBarAnchor"]:SetPoint("TOPLEFT", _G["FarmModeFrameSlots"], "TOPLEFT", 0, 0) - else - _G["FarmSeedBarAnchor"]:SetPoint("TOPLEFT", _G["FarmToolBar"], horizontal and "BOTTOMLEFT" or "TOPRIGHT", 0, 0) - end - - for i = 1, NUM_SEED_BARS do - local seedBar = _G["FarmSeedBar"..i] - count = 0 - for i, button in ipairs(seedButtons[i]) do - local BUTTONSIZE = seedBar.ButtonSize; - button:Point("TOPLEFT", seedBar, "TOPLEFT", horizontal and (count * (BUTTONSIZE + BUTTONSPACE) + 1) or 1, horizontal and -1 or -(count * (BUTTONSIZE + BUTTONSPACE) + 1)) - button:Size(BUTTONSIZE,BUTTONSIZE) - if (not SV.db[Schema].farming.onlyactive or (SV.db[Schema].farming.onlyactive and button.items > 0)) then - button.icon:SetVertexColor(1,1,1) - count = count + 1 - elseif (not SV.db[Schema].farming.onlyactive and button.items <= 0) then - button:Show() - button.icon:SetVertexColor(0.25,0.25,0.25) - count = count + 1 - else - button:Hide() - end - end - if(SV.db[Schema].farming.onlyactive and not SV.db[Schema].farming.undocked) then - if count==0 then - seedBar:Hide() - else - seedBar:Show() - if(not lastBar) then - seedBar:SetPoint("TOPLEFT", _G["FarmSeedBarAnchor"], "TOPLEFT", 0, 0) - else - seedBar:SetPoint("TOPLEFT", lastBar, horizontal and "BOTTOMLEFT" or "TOPRIGHT", 0, 0) - end - lastBar = seedBar - end - end - end - count = 0; - lastBar = nil; - FarmToolBar:ClearAllPoints() - FarmToolBar:SetAllPoints(FarmToolBarAnchor) - for i, button in ipairs(farmToolButtons) do - local BUTTONSIZE = FarmToolBar.ButtonSize; - button:Point("TOPLEFT", FarmToolBar, "TOPLEFT", horizontal and (count * (BUTTONSIZE + BUTTONSPACE) + 1) or 1, horizontal and -1 or -(count * (BUTTONSIZE + BUTTONSPACE) + 1)) - button:Size(BUTTONSIZE,BUTTONSIZE) - if (not SV.db[Schema].farming.onlyactive or (SV.db[Schema].farming.onlyactive and button.items > 0)) then - button:Show() - button.icon:SetVertexColor(1,1,1) - count = count + 1 - elseif (not SV.db[Schema].farming.onlyactive and button.items == 0) then - button:Show() - button.icon:SetVertexColor(0.25,0.25,0.25) - count = count + 1 - else - button:Hide() - end - end - if(SV.db[Schema].farming.onlyactive and not SV.db[Schema].farming.undocked) then - if count==0 then - FarmToolBarAnchor:Hide() - FarmPortalBar:SetPoint("TOPLEFT", FarmModeFrameSlots, "TOPLEFT", 0, 0) - else - FarmToolBarAnchor:Show() - FarmPortalBar:SetPoint("TOPLEFT", FarmToolBarAnchor, "TOPRIGHT", 0, 0) - end - end - count = 0; - FarmPortalBar:ClearAllPoints() - FarmPortalBar:SetAllPoints(FarmPortalBarAnchor) - for i, button in ipairs(portalButtons) do - local BUTTONSIZE = FarmPortalBar.ButtonSize; - button:Point("TOPLEFT", FarmPortalBar, "TOPLEFT", horizontal and (count * (BUTTONSIZE + BUTTONSPACE) + 1) or 1, horizontal and -1 or -(count * (BUTTONSIZE + BUTTONSPACE) + 1)) - button:Size(BUTTONSIZE,BUTTONSIZE) - if (not SV.db[Schema].farming.onlyactive or (SV.db[Schema].farming.onlyactive and button.items > 0)) then - button:Show() - button.icon:SetVertexColor(1,1,1) - count = count + 1 - elseif (not SV.db[Schema].farming.onlyactive and button.items == 0) then - button:Show() - button.icon:SetVertexColor(0.25,0.25,0.25) - count = count + 1 - else - button:Hide() - end - end - if(SV.db[Schema].farming.onlyactive) then - if count==0 then - FarmPortalBar:Hide() - else - FarmPortalBar:Show() - end - end -end - -function PLUGIN:PrepareFarmingTools() - local horizontal = SV.db[Schema].farming.toolbardirection == "HORIZONTAL" - local BUTTONSPACE = SV.db[Schema].farming.buttonspacing or 2; - - ModeLogsFrame = PLUGIN.LogWindow; - DockButton = _G["SVUI_ModesDockFrame_ToolBarButton"] - - if not SV.db[Schema].farming.undocked then - local bgTex = [[Interface\BUTTONS\WHITE8X8]] - local bdTex = SV.Media.bar.glow - local farmingDocklet = CreateFrame("ScrollFrame", "FarmModeFrame", ModeLogsFrame); - farmingDocklet:SetPoint("TOPLEFT", ModeLogsFrame, 31, -3); - farmingDocklet:SetPoint("BOTTOMRIGHT", ModeLogsFrame, -3, 3); - farmingDocklet:EnableMouseWheel(true); - - local farmingDockletSlots = CreateFrame("Frame", "FarmModeFrameSlots", farmingDocklet); - farmingDockletSlots:SetPoint("TOPLEFT", farmingDocklet, 0, 0); - farmingDockletSlots:SetWidth(farmingDocklet:GetWidth()) - farmingDockletSlots:SetHeight(500); - farmingDockletSlots:SetFrameLevel(farmingDocklet:GetFrameLevel() + 1) - farmingDocklet:SetScrollChild(farmingDockletSlots) - - local slotSlider = CreateFrame("Slider", "FarmModeSlotSlider", farmingDocklet); - slotSlider:SetHeight(farmingDocklet:GetHeight() - 3); - slotSlider:SetWidth(18); - slotSlider:SetPoint("TOPLEFT", farmingDocklet, -28, 0); - slotSlider:SetPoint("BOTTOMLEFT", farmingDocklet, -28, 0); - slotSlider:SetBackdrop({bgFile = bgTex, edgeFile = bdTex, edgeSize = 4, insets = {left = 3, right = 3, top = 3, bottom = 3}}); - slotSlider:SetFrameLevel(6) - slotSlider:SetFixedPanelTemplate("Transparent", true); - slotSlider:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob"); - slotSlider:SetOrientation("VERTICAL"); - slotSlider:SetValueStep(5); - slotSlider:SetMinMaxValues(1, 420); - slotSlider:SetValue(1); - - farmingDocklet.slider = slotSlider; - slotSlider:SetScript("OnValueChanged", Scroll_OnValueChanged) - farmingDocklet:SetScript("OnMouseWheel", Scroll_OnMouseWheel); - - local parentWidth = FarmModeFrameSlots:GetWidth() - 31 - local BUTTONSIZE = (parentWidth / (horizontal and 10 or 8)); - local TOOLSIZE = (parentWidth / 8); - - -- FARM TOOLS - local farmToolBarAnchor = CreateFrame("Frame", "FarmToolBarAnchor", farmingDockletSlots) - farmToolBarAnchor:Point("TOPLEFT", farmingDockletSlots, "TOPLEFT", 0, 0) - farmToolBarAnchor:Size(horizontal and ((TOOLSIZE + BUTTONSPACE) * 4) or (TOOLSIZE + BUTTONSPACE), horizontal and (TOOLSIZE + BUTTONSPACE) or ((TOOLSIZE + BUTTONSPACE) * 4)) - - local farmToolBar = CreateFrame("Frame", "FarmToolBar", farmToolBarAnchor) - farmToolBar:Size(horizontal and ((TOOLSIZE + BUTTONSPACE) * 4) or (TOOLSIZE + BUTTONSPACE), horizontal and (TOOLSIZE + BUTTONSPACE) or ((TOOLSIZE + BUTTONSPACE) * 4)) - farmToolBar:SetPoint("TOPLEFT", farmToolBarAnchor, "TOPLEFT", (horizontal and BUTTONSPACE or (TOOLSIZE + BUTTONSPACE)), (horizontal and -(TOOLSIZE + BUTTONSPACE) or -BUTTONSPACE)) - farmToolBar.ButtonSize = TOOLSIZE; - - -- PORTALS - local farmPortalBarAnchor = CreateFrame("Frame", "FarmPortalBarAnchor", farmingDockletSlots) - farmPortalBarAnchor:Point("TOPLEFT", farmToolBarAnchor, "TOPRIGHT", 0, 0) - farmPortalBarAnchor:Size(horizontal and ((TOOLSIZE + BUTTONSPACE) * 4) or (TOOLSIZE + BUTTONSPACE), horizontal and (TOOLSIZE + BUTTONSPACE) or ((TOOLSIZE + BUTTONSPACE) * 4)) - - local farmPortalBar = CreateFrame("Frame", "FarmPortalBar", farmPortalBarAnchor) - farmPortalBar:Size(horizontal and ((TOOLSIZE + BUTTONSPACE) * 4) or (TOOLSIZE + BUTTONSPACE), horizontal and (TOOLSIZE + BUTTONSPACE) or ((TOOLSIZE + BUTTONSPACE) * 4)) - farmPortalBar:SetPoint("TOPLEFT", farmPortalBarAnchor, "TOPLEFT", (horizontal and BUTTONSPACE or (TOOLSIZE + BUTTONSPACE)), (horizontal and -(TOOLSIZE + BUTTONSPACE) or -BUTTONSPACE)) - farmPortalBar.ButtonSize = TOOLSIZE; - - -- SEEDS - local farmSeedBarAnchor = CreateFrame("Frame", "FarmSeedBarAnchor", farmingDockletSlots) - farmSeedBarAnchor:Point("TOPLEFT", farmPortalBarAnchor, horizontal and "BOTTOMLEFT" or "TOPRIGHT", 0, 0) - farmSeedBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 10) or ((BUTTONSIZE + BUTTONSPACE) * 8), horizontal and ((BUTTONSIZE + BUTTONSPACE) * 8) or ((BUTTONSIZE + BUTTONSPACE) * 10)) - - for i = 1, NUM_SEED_BARS do - local seedBar = CreateFrame("Frame", "FarmSeedBar"..i, farmSeedBarAnchor) - seedBar.ButtonSize = BUTTONSIZE; - seedBar:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 10) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 10)) - if i == 1 then - seedBar:SetPoint("TOPLEFT", farmSeedBarAnchor, "TOPLEFT", 0, 0) - else - seedBar:SetPoint("TOPLEFT", "FarmSeedBar"..i-1, horizontal and "BOTTOMLEFT" or "TOPRIGHT", 0, 0) - end - end - - farmingDocklet:Hide() - else - local BUTTONSIZE = SV.db[Schema].farming.buttonsize or 35; - - -- SEEDS - local farmSeedBarAnchor = CreateFrame("Frame", "FarmSeedBarAnchor", SV.UIParent) - farmSeedBarAnchor:Point("TOPRIGHT", SV.UIParent, "TOPRIGHT", -40, -300) - farmSeedBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 10) or ((BUTTONSIZE + BUTTONSPACE) * 8), horizontal and ((BUTTONSIZE + BUTTONSPACE) * 8) or ((BUTTONSIZE + BUTTONSPACE) * 10)) - for i = 1, NUM_SEED_BARS do - local seedBar = CreateFrame("Frame", "FarmSeedBar"..i, farmSeedBarAnchor) - seedBar:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 10) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 10)) - seedBar:SetPoint("TOPRIGHT", _G["FarmSeedBarAnchor"], "TOPRIGHT", (horizontal and 0 or -((BUTTONSIZE + BUTTONSPACE) * i)), (horizontal and -((BUTTONSIZE + BUTTONSPACE) * i) or 0)) - seedBar.ButtonSize = BUTTONSIZE; - end - SV.Mentalo:Add(farmSeedBarAnchor, "Farming Seeds") - - -- FARM TOOLS - local farmToolBarAnchor = CreateFrame("Frame", "FarmToolBarAnchor", SV.UIParent) - farmToolBarAnchor:Point("TOPRIGHT", farmSeedBarAnchor, horizontal and "BOTTOMRIGHT" or "TOPLEFT", horizontal and 0 or -(BUTTONSPACE * 2), horizontal and -(BUTTONSPACE * 2) or 0) - farmToolBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) - local farmToolBar = CreateFrame("Frame", "FarmToolBar", farmToolBarAnchor) - farmToolBar:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) - farmToolBar:SetPoint("TOPRIGHT", farmToolBarAnchor, "TOPRIGHT", (horizontal and -BUTTONSPACE or -(BUTTONSIZE + BUTTONSPACE)), (horizontal and -(BUTTONSIZE + BUTTONSPACE) or -BUTTONSPACE)) - farmToolBar.ButtonSize = BUTTONSIZE; - SV.Mentalo:Add(farmToolBarAnchor, "Farming Tools") - - -- PORTALS - local farmPortalBarAnchor = CreateFrame("Frame", "FarmPortalBarAnchor", SV.UIParent) - farmPortalBarAnchor:Point("TOPRIGHT", farmToolBarAnchor, horizontal and "BOTTOMRIGHT" or "TOPLEFT", horizontal and 0 or -(BUTTONSPACE * 2), horizontal and -(BUTTONSPACE * 2) or 0) - farmPortalBarAnchor:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) - local farmPortalBar = CreateFrame("Frame", "FarmPortalBar", farmPortalBarAnchor) - farmPortalBar:Size(horizontal and ((BUTTONSIZE + BUTTONSPACE) * 4) or (BUTTONSIZE + BUTTONSPACE), horizontal and (BUTTONSIZE + BUTTONSPACE) or ((BUTTONSIZE + BUTTONSPACE) * 4)) - farmPortalBar:SetPoint("TOPRIGHT", farmPortalBarAnchor, "TOPRIGHT", (horizontal and -BUTTONSPACE or -(BUTTONSIZE + BUTTONSPACE)), (horizontal and -(BUTTONSIZE + BUTTONSPACE) or -BUTTONSPACE)) - farmPortalBar.ButtonSize = BUTTONSIZE; - SV.Mentalo:Add(farmPortalBarAnchor, "Farming Portals") - end -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_CraftOMatic/modes/fishing.lua b/Interface/AddOns/SVUI_CraftOMatic/modes/fishing.lua deleted file mode 100644 index 995b328..0000000 --- a/Interface/AddOns/SVUI_CraftOMatic/modes/fishing.lua +++ /dev/null @@ -1,382 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local type = _G.type; -local string = _G.string; -local math = _G.math; -local table = _G.table; -local rept = string.rep; -local tsort,twipe = table.sort,table.wipe; -local floor,ceil = math.floor, math.ceil; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local PLUGIN = select(2, ...); -local Schema = PLUGIN.Schema; ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- -local fishingIsKnown, fishingSpell, fishingLure; -local proxyTest = false; -local refLures = { - { ["id"] = 6529, ["bonus"] = 25, ["skillReq"] = 1, ["order"] = 10, }, --Shiny Bauble - { ["id"] = 6811, ["bonus"] = 50, ["skillReq"] = 50, ["order"] = 10, }, --Aquadynamic Fish Lens - { ["id"] = 6530, ["bonus"] = 50, ["skillReq"] = 50, ["order"] = 10, }, --Nightcrawlers - { ["id"] = 7307, ["bonus"] = 75, ["skillReq"] = 100, ["order"] = 10, }, --Flesh Eating Worm - { ["id"] = 6532, ["bonus"] = 75, ["skillReq"] = 100, ["order"] = 10, }, --Bright Baubles - { ["id"] = 34861, ["bonus"] = 100, ["skillReq"] = 100, ["order"] = 10, }, --Sharpened Fish Hook - { ["id"] = 6533, ["bonus"] = 100, ["skillReq"] = 100, ["order"] = 10, }, --Aquadynamic Fish Attractor - { ["id"] = 62673, ["bonus"] = 100, ["skillReq"] = 100, ["order"] = 10, }, --Feathered Lure - { ["id"] = 46006, ["bonus"] = 100, ["skillReq"] = 100, ["order"] = 60, }, --Glow Worm - { ["id"] = 68049, ["bonus"] = 150, ["skillReq"] = 250, ["order"] = 5, }, --Heat-Treated Spinning Lure - { ["id"] = 67404, ["bonus"] = 15, ["skillReq"] = 1, ["order"] = 10, }, --Glass Fishing Bobber -} -tsort(refLures, function(a,b) - if ( a.bonus == b.bonus ) then - return a.order < b.order; - else - return a.bonus < b.bonus; - end -end); -local refHats = { - { ["id"] = 93732, ["weight"] = 10, ["nocast"] = true }, --Darkmoon Fishing Hat - { ["id"] = 33820, ["weight"] = 50 }, --Weather Beaten Fishing Hat - { ["id"] = 19972, ["weight"] = 75 }, --Lucky Fishing Hat - { ["id"] = 88710, ["weight"] = 100 }, --Nats Hat -} -local refPoles = { - { ["id"] = 44050, ["weight"] = 33 }, --Kaluak - { ["id"] = 25978, ["weight"] = 22 }, --Seths Graphite - { ["id"] = 19022, ["weight"] = 21 }, --Nat Pagles Extreme Angler - { ["id"] = 6367, ["weight"] = 20 }, --Big Iron - { ["id"] = 6366, ["weight"] = 15 }, --Darkwood - { ["id"] = 84661, ["weight"] = 32 }, --Dragon - { ["id"] = 19970, ["weight"] = 40 }, --Arcanite - { ["id"] = 45858, ["weight"] = 25 }, --Nats Lucky - { ["id"] = 45992, ["weight"] = 31 }, --Jeweled - { ["id"] = 45991, ["weight"] = 30 }, --Bone - { ["id"] = 6365, ["weight"] = 5 }, --Strong - { ["id"] = 12225, ["weight"] = 4 }, --Blump Family - { ["id"] = 46337, ["weight"] = 3 }, --Staats - { ["id"] = 84660, ["weight"] = 10 }, --Pandaren - { ["id"] = 6256, ["weight"] = 1 } --Standard -} -local DockButton; ---[[ -########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local function SendModeMessage(...) - if not CombatText_AddMessage then return end - CombatText_AddMessage(...) -end - -local function GetFishingSkill() - local fishing = select(4, GetProfessions()) - if (fishing) then - local rank = select(3, GetProfessionInfo(fishing)) - return rank - end - return 0, 0, 0 -end - -local function FishingPoleIsEquipped() - local itemId = GetInventoryItemID("player", 16) - if itemId then - local subclass = select(7, GetItemInfo(itemId)) - local weaponSubTypesList = select(17, GetAuctionItemSubClasses(1)) - if subclass == weaponSubTypesList then - return true - else - return false - end - else - return false - end -end - -local function UpdateFishingGear(autoequip) - local lastBonus, lastWeight = 0,0; - local rawskill = GetFishingSkill(); - local item,id,bonus,count; - - -- Check for and equip a fishing hat, if autoequip is enabled - if(autoequip) then - local fishingHat = false; - for i=1, #refHats do - item = refHats[i] - id = item.id - bonus = item.weight - count = GetItemCount(id) - if ( count > 0 and bonus > lastWeight ) then - fishingHat = id - lastWeight = bonus - if(item.weight > 10) then - fishingLure = id - lastBonus = bonus - end - end - end - if(fishingHat) then - local HelmetID = GetInventoryItemID("player", INVSLOT_HEAD); - if(HelmetID) then - PLUGIN.WornItems["HEAD"] = HelmetID - end - EquipItemByName(fishingHat) - PLUGIN.InModeGear = true - end - end - - -- Check for and save best fishing lure - for i=1, #refLures do - item = refLures[i] - id = item.id - bonus = item.bonus - count = GetItemCount(id) - if ( count > 0 and bonus > (lastBonus or 0) ) then - if ( item.skillReq <= rawskill ) then - fishingLure = id - lastBonus = bonus - end - end - end - - -- Check for and equip a fishing pole, if autoequip is enabled - if(autoequip) then - lastBonus = 0; - local fishingPole = false; - for i=1, #refPoles do - item = refPoles[i] - id = item.id - bonus = item.weight - count = GetItemCount(id) - if ( count > 0 and bonus > (lastBonus or 0) ) then - fishingPole = id - lastBonus = bonus - end - end - if(fishingPole) then - local MainHandID = GetInventoryItemID("player", INVSLOT_MAINHAND); - if(MainHandID) then - PLUGIN.WornItems["MAIN"] = MainHandID - end - - local OffHandID = GetInventoryItemID("player", INVSLOT_OFFHAND); - if(OffHandID) then - PLUGIN.WornItems["OFF"] = OffHandID; - end - - EquipItemByName(fishingPole) - PLUGIN.InModeGear = true - end - end -end - -local function LootProxy(item, name) - if(item) then - local mask = [[0x100000]]; - local itemType = GetItemFamily(item); - local pass = bit.band(itemType, mask); - if pass > 0 then - proxyTest = true; - end - end -end - -local function GetTitleAndSkill() - local skillRank, skillModifier; - local msg = "|cff22ff11Fishing Mode|r" - local _,_,_,fishing,_,_ = GetProfessions(); - if fishing ~= nil then - _, _, skillRank, _, _, _, _, skillModifier = GetProfessionInfo(fishing) - if(skillModifier) then - skillRank = skillRank + skillModifier; - end - msg = msg .. " (|cff00ddff" .. skillRank .. "|r)"; - end - return msg -end ---[[ -########################################################## -CORE NAMESPACE -########################################################## -]]-- -PLUGIN.Fishing = {}; -PLUGIN.Fishing.Log = {}; -PLUGIN.Fishing.Loaded = false; ---[[ -########################################################## -EVENT HANDLER -########################################################## -]]-- -local EnableListener, DisableListener -do - local FishEventHandler = CreateFrame("Frame") - local LootProxy = function(item, name) - if(item) then - local mask = [[0x10000]]; - local itemType = GetItemFamily(item); - local pass = bit.band(itemType, mask); - if pass > 0 then - proxyTest = true; - end - end - end - - local Fish_OnEvent = function(self, event, ...) - if(InCombatLockdown()) then return end - if(event == "BAG_UPDATE" or event == "CHAT_MSG_SKILL") then - local msg = GetTitleAndSkill() - PLUGIN.TitleWindow:Clear() - PLUGIN.TitleWindow:AddMessage(msg) - elseif(event == "LOOT_OPENED") then - if IsFishingLoot() then - proxyTest = true; - else - proxyTest = false; - end - elseif(event == "CHAT_MSG_LOOT") then - local item, amt = PLUGIN:CheckForModeLoot(...); - if item then - local name, lnk, rarity, lvl, mlvl, itype, stype, cnt, ieq, tex, price = GetItemInfo(item); - if proxyTest == false then - LootProxy(lnk, name) - end - if proxyTest == false then return end - if not PLUGIN.Fishing.Log[name] then - PLUGIN.Fishing.Log[name] = {amount = 0, texture = ""}; - end - local r, g, b, hex = GetItemQualityColor(rarity); - local stored = PLUGIN.Fishing.Log - local mod = stored[name]; - local newAmt = mod.amount + 1; - if amt >= 2 then newAmt = mod.amount + amt end - PLUGIN.Fishing.Log[name].amount = newAmt; - PLUGIN.Fishing.Log[name].texture = tex; - PLUGIN.LogWindow:Clear(); - - for name,data in pairs(stored) do - if type(data) == "table" and data.amount and data.texture then - PLUGIN.LogWindow:AddMessage("|cff55FF55"..data.amount.." x|r |T".. data.texture ..":16:16:0:0:64:64:4:60:4:60|t".." "..name, r, g, b); - end - end - PLUGIN.LogWindow:AddMessage("----------------", 0, 0, 0); - PLUGIN.LogWindow:AddMessage("Caught So Far...", 0, 1, 1); - PLUGIN.LogWindow:AddMessage(" ", 0, 0, 0); - proxyTest = false; - end - end - end - - function EnableListener() - FishEventHandler:RegisterEvent("LOOT_OPENED") - FishEventHandler:RegisterEvent("CHAT_MSG_LOOT") - FishEventHandler:RegisterEvent("BAG_UPDATE") - FishEventHandler:RegisterEvent("CHAT_MSG_SKILL") - FishEventHandler:SetScript("OnEvent", Fish_OnEvent) - end - - function DisableListener() - FishEventHandler:UnregisterAllEvents() - FishEventHandler:SetScript("OnEvent", nil) - end -end ---[[ -########################################################## -CORE METHODS -########################################################## -]]-- -function PLUGIN.Fishing:Enable() - PLUGIN:UpdateFishingMode() - if(not SVUI_ModesDockFrame:IsShown()) then DockButton:Click() end - UpdateFishingGear(SV.db[Schema].fishing.autoequip); - PlaySoundFile("Sound\\Spells\\Tradeskills\\FishCast.wav") - PLUGIN.ModeAlert:SetBackdropColor(0.25, 0.52, 0.1) - if(not IsSpellKnown(131474)) then - PLUGIN:ModeLootLoader("Fishing", "WTF is Fishing?", "You have no clue how to fish! \nThe last time you tried \nyou hooked yourself through the eyelid. \nGo find a trainer and learn \nhow to do this properly!"); - else - local msg = GetTitleAndSkill(); - PLUGIN:ModeLootLoader("Fishing", msg, "Double-Right-Click anywhere on the screen \nto cast your fishing line."); - end - EnableListener() - PLUGIN.ModeAlert:Show() - SendModeMessage("Fishing Mode Enabled", CombatText_StandardScroll, 0.28, 0.9, 0.1); -end - -function PLUGIN.Fishing:Disable() - DisableListener() -end - -function PLUGIN.Fishing:Bind() - if InCombatLockdown() then return end - if fishingIsKnown then - if FishingPoleIsEquipped() then - local hasMainHandEnchant = GetWeaponEnchantInfo() - if hasMainHandEnchant then - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', fishingSpell) - PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to fish.' - elseif(fishingLure) then - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "item") - _G["SVUI_ModeCaptureWindow"]:SetAttribute("item", "item:" .. fishingLure) - if(GetItemCooldown(fishingLure) > 0) then - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', fishingSpell) - PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to fish.' - else - PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to apply fishing enchants.' - end - else - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', fishingSpell) - PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to fish.' - end - else - _G["SVUI_ModeCaptureWindow"]:SetAttribute("type", "spell") - _G["SVUI_ModeCaptureWindow"]:SetAttribute('spell', fishingSpell) - PLUGIN.ModeAlert.HelpText = 'Double-Right-Click to fish.' - end - SetOverrideBindingClick(_G["SVUI_ModeCaptureWindow"], true, "BUTTON2", "SVUI_ModeCaptureWindow"); - _G["SVUI_ModeCaptureWindow"].Grip:Show(); - end -end ---[[ -########################################################## -LOADER -########################################################## -]]-- -function PLUGIN:UpdateFishingMode() - fishingIsKnown = IsSpellKnown(131474); - fishingSpell = GetSpellInfo(131474); -end - -function PLUGIN:LoadFishingMode() - DockButton = _G["SVUI_ModesDockFrame_ToolBarButton"] - PLUGIN:UpdateFishingMode() -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.xml b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.xml index 7bef3c2..c7383dd 100644 --- a/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.xml +++ b/Interface/AddOns/SVUI_FightOMatic/SVUI_FightOMatic.xml @@ -1,4 +1,5 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Script file='Loader.lua'/> <Script file='SVUI_FightOMatic.lua'/> + <!-- <Include file='components\_load.xml'/> --> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_FightOMatic/components/_load.xml b/Interface/AddOns/SVUI_FightOMatic/components/_load.xml new file mode 100644 index 0000000..0a8a1e2 --- /dev/null +++ b/Interface/AddOns/SVUI_FightOMatic/components/_load.xml @@ -0,0 +1,3 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file="radio.lua"/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_LogOMatic/Loader.lua b/Interface/AddOns/SVUI_LogOMatic/Loader.lua index 2c81a16..c07686b 100644 --- a/Interface/AddOns/SVUI_LogOMatic/Loader.lua +++ b/Interface/AddOns/SVUI_LogOMatic/Loader.lua @@ -32,18 +32,4 @@ CONFIG DATA ]]-- SV.configs[Schema] = { ["enable"] = true, - ["saveChats"] = false -} ---[[ -########################################################## -CONFIG OPTIONS -########################################################## -]]-- -SV.Options.args.plugins.args.pluginOptions.args[Schema].args["saveChats"] = { - order = 2, - name = L["Save Chats"], - desc = L["Retain chat messages even after logging out."], - type = "toggle", - get = function(key) return SV.db[Schema][key[#key]] end, - set = function(key,value) PLUGIN:ChangeDBVar(value, key[#key]); SV:StaticPopup_Show("RL_CLIENT") end } \ No newline at end of file diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua index a893f1d..a12c511 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua @@ -53,27 +53,6 @@ LOCAL VARIABLES local nameKey = UnitName("player"); local realmKey = GetRealmName(); local NewHook = hooksecurefunc; -local LoggingEvents = { - "CHAT_MSG_CHANNEL", - "CHAT_MSG_EMOTE", - "CHAT_MSG_GUILD_ACHIEVEMENT", - "CHAT_MSG_RAID_WARNING", - "CHAT_MSG_SAY", - "CHAT_MSG_YELL", - "CHAT_MSG_WHISPER_INFORM", - "CHAT_MSG_WHISPER", - "CHAT_MSG_GUILD", - "CHAT_MSG_OFFICER", - "CHAT_MSG_PARTY", - "CHAT_MSG_PARTY_LEADER", - "CHAT_MSG_RAID", - "CHAT_MSG_RAID_LEADER", - "CHAT_MSG_INSTANCE_CHAT", - "CHAT_MSG_INSTANCE_CHAT_LEADER", - "CHAT_MSG_BN_CONVERSATION", - "CHAT_MSG_BN_WHISPER", - "CHAT_MSG_BN_WHISPER_INFORM" -}; --[[ ########################################################## CORE DATA @@ -191,78 +170,12 @@ end CORE FUNCTIONS ########################################################## ]]-- -function CHAT:LoadSavedChatLog() - local temp, data = {} - for id, _ in pairs(LogOMatic_Cache["chat"]) do - tinsert(temp, tonumber(id)) - end - tsort(temp, function(a, b) - return a < b - end) - for i = 1, #temp do - data = LogOMatic_Cache["chat"][tostring(temp[i])] - if type(data) == "table" and data[20] ~= nil then - self.timeOverride = temp[i] - ChatFrame_MessageEventHandler(DEFAULT_CHAT_FRAME, data[20], unpack(data)) - end - end -end - -function CHAT:LogCurrentChat(event, ...) - local temp = {} - for i = 1, select('#', ...) do - temp[i] = select(i, ...) or false - end - if #temp > 0 then - temp[20] = event - local randomTime = select(2, ("."):split(GetTime() or "0."..random(1, 999), 2)) or 0; - local timeForMessage = time().."."..randomTime; - LogOMatic_Cache["chat"][timeForMessage] = temp - local c, k = 0 - for id, data in pairs(LogOMatic_Cache["chat"]) do - c = c + 1 - if (not k) or k > id then - k = id - end - end - if c > 128 then - LogOMatic_Cache["chat"][k] = nil - end - end -end - -function CHAT:PLAYER_ENTERING_WORLD() - local temp, data = {} - for id, _ in pairs(LogOMatic_Cache["chat"]) do - tinsert(temp, tonumber(id)) - end - tsort(temp, function(a, b) - return a < b - end) - for i = 1, #temp do - data = LogOMatic_Cache["chat"][tostring(temp[i])] - if type(data) == "table" and data[20] ~= nil then - ChatFrame_MessageEventHandler(DEFAULT_CHAT_FRAME, data[20], unpack(data)) - end - end - self:UnregisterEvent("PLAYER_ENTERING_WORLD") -end - function PLUGIN:AppendBankFunctions() local BAGS = SV.SVBag; if(BAGS.BankFrame) then BAGS.BankFrame.RefreshBagsSlots = RefreshLoggedBagsSlots end end - -function PLUGIN:AppendChatFunctions() - if SV.db.SVChat.enable and SV.db[Schema].saveChats then - for _,event in pairs(LoggingEvents) do - SV.SVChat:RegisterEvent(event, "LogCurrentChat") - end - SV.SVChat:RegisterEvent("PLAYER_ENTERING_WORLD") - end -end --[[ ########################################################## CORE FUNCTIONS @@ -306,8 +219,6 @@ function PLUGIN:Load() self.chronicle = LogOMatic_Data[realmKey]["quests"][nameKey]; NewHook(SV, "ResetAllUI", ResetAllLogs); - - if not LogOMatic_Cache["chat"] then LogOMatic_Cache["chat"] = {} end for alt,_ in pairs(LogOMatic_Data[realmKey]["bags"]) do for bag,items in pairs(LogOMatic_Data[realmKey]["bags"][alt]) do @@ -330,8 +241,4 @@ function PLUGIN:Load() if SV.db.SVTip.enable then GameTooltip:HookScript("OnTooltipSetItem", GameTooltip_LogTooltipSetItem) end - - --[[ APPLY HOOKS ]]-- - self:AppendChatFunctions() - NewHook(CHAT, "ReLoad", self.AppendChatFunctions) end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.xml b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.xml index 64f1abf..dcd69ea 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.xml +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.xml @@ -1,6 +1,5 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Script file='Loader.lua'/> <Script file='SVUI_StyleOMatic.lua'/> - <Script file='common\methods.lua'/> - <Include file='addons\_load.xml'/> + <Include file='components\_load.xml'/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml b/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml deleted file mode 100644 index a250be8..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml +++ /dev/null @@ -1,53 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file='supervillain.lua'/> - <Script file='achievement.lua'/> - <Script file='alert.lua'/> - <Script file='archeology.lua'/> - <Script file='auctionhouse.lua'/> - <Script file='barbershop.lua'/> - <Script file='battlefield.lua'/> - <Script file='blackmarket.lua'/> - <Script file='calendar.lua'/> - <Script file='challenges.lua'/> - <Script file='chat.lua'/> - <Script file='character.lua'/> - <Script file='dressup.lua'/> - <Script file='encounterjournal.lua'/> - <Script file='friends.lua'/> - <Script file='gossip.lua'/> - <Script file='guild.lua'/> - <Script file='help.lua'/> - <Script file='inspect.lua'/> - <Script file='itemsocketing.lua'/> - <Script file='itemupgrade.lua'/> - <Script file='keybinding.lua'/> - <Script file='lfd.lua'/> - <Script file='loothistory.lua'/> - <Script file='lossofcontrol.lua'/> - <Script file='macro.lua'/> - <Script file='mailbox.lua'/> - <Script file='merchant.lua'/> - <Script file='petbattle.lua'/> - <Script file='petition.lua'/> - <Script file='petjournal.lua'/> - <Script file='petstable.lua'/> - <Script file='pvp.lua'/> - <Script file='quest.lua'/> - <Script file='raid.lua'/> - <Script file='reforging.lua'/> - <Script file='spellbook.lua'/> - <Script file='tabard.lua'/> - <Script file='talents.lua'/> - <Script file='taxi.lua'/> - <Script file='timemanager.lua'/> - <Script file='trade.lua'/> - <Script file='tradeskill.lua'/> - <Script file='trainer.lua'/> - <Script file='transmog.lua'/> - <Script file='voidstorage.lua'/> - <Script file='worldmap.lua'/> - <Script file='worldstate.lua'/> - <Script file='store.lua'/> - <Script file='system.lua'/> - <Include file='thirdparty\_load.xml'/> -</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua deleted file mode 100644 index 8f4ed77..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua +++ /dev/null @@ -1,454 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local AchievementFrameList = { - "AchievementFrame", - "AchievementFrameCategories", - "AchievementFrameSummary", - "AchievementFrameHeader", - "AchievementFrameSummaryCategoriesHeader", - "AchievementFrameSummaryAchievementsHeader", - "AchievementFrameStatsBG", - "AchievementFrameAchievements", - "AchievementFrameComparison", - "AchievementFrameComparisonHeader", - "AchievementFrameComparisonSummaryPlayer", - "AchievementFrameComparisonSummaryFriend" -} - -local AchievementTextureList = { - "AchievementFrameStats", - "AchievementFrameSummary", - "AchievementFrameAchievements", - "AchievementFrameComparison" -} - -local AchievementItemButtons = { - "AchievementFrameAchievementsContainerButton1", - "AchievementFrameAchievementsContainerButton2", - "AchievementFrameAchievementsContainerButton3", - "AchievementFrameAchievementsContainerButton4", - "AchievementFrameAchievementsContainerButton5", - "AchievementFrameAchievementsContainerButton6", - "AchievementFrameAchievementsContainerButton7", -} - -local _hook_DescriptionColor = function(self, r, g, b) - if(r ~= 0.6 or g ~= 0.6 or b ~= 0.6) then - self:SetTextColor(0.6, 0.6, 0.6) - end -end - -local _hook_HiddenDescriptionColor = function(self, r, g, b) - if(r ~= 1 or g ~= 1 or b ~= 1) then - self:SetTextColor(1, 1, 1) - end -end - -local _hook_TrackingPoint = function(self, anchor, parent, relative, x, y) - local actual = self.ListParent - if(anchor ~= "BOTTOMLEFT" or parent ~= actual or relative ~= "BOTTOMLEFT" or x ~= 5 or y ~= 5) then - self:ClearAllPoints() - self:Point("BOTTOMLEFT", actual, "BOTTOMLEFT", 5, 5) - end -end - -local _hook_AchievementsUpdate = function() - for i = 1, ACHIEVEMENTUI_MAX_SUMMARY_ACHIEVEMENTS do - local globalName = ("AchievementFrameSummaryAchievement%d"):format(i) - local summary = _G[globalName] - if(summary) then - summary:RemoveTextures() - summary:SetButtonTemplate() - - local highlight = _G[("%sHighlight"):format(globalName)] - local desc = _G[("%sDescription"):format(globalName)] - local icon = _G[("%sIcon"):format(globalName)] - local iconbling = _G[("%sIconBling"):format(globalName)] - local iconover = _G[("%sIconOverlay"):format(globalName)] - local icontex = _G[("%sIconTexture"):format(globalName)] - - if(highlight) then highlight:Die() end - if(desc) then desc:SetTextColor(0.6, 0.6, 0.6) end - if(iconbling) then iconbling:Die() end - if(iconover) then iconover:Die() end - if(icontex) then - icontex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icontex:FillInner() - end - if(icon and not icon.Panel) then - icon:SetFixedPanelTemplate("Slot") - icon:Height(icon:GetHeight() - 14) - icon:Width(icon:GetWidth() - 14) - icon:ClearAllPoints() - icon:Point("LEFT", 6, 0) - end - - if summary.accountWide then - summary:SetBackdropBorderColor(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - else - summary:SetBackdropBorderColor(0,0,0,1) - end - end - end -end - -local function BarStyleHelper(bar) - bar:RemoveTextures() - bar:SetStatusBarTexture(SV.Media.bar.default) - bar:SetStatusBarColor(4/255, 179/255, 30/255) - bar:SetPanelTemplate("Default") - if _G[bar:GetName().."Title"]then - _G[bar:GetName().."Title"]:SetPoint("LEFT", 4, 0) - end - if _G[bar:GetName().."Label"]then - _G[bar:GetName().."Label"]:SetPoint("LEFT", 4, 0) - end - if _G[bar:GetName().."Text"]then - _G[bar:GetName().."Text"]:SetPoint("RIGHT", -4, 0) - end -end ---[[ -########################################################## -ACHIEVEMENTFRAME STYLER -########################################################## -]]-- -local function AchievementStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.achievement ~= true then - return - end - - for _, gName in pairs(AchievementFrameList) do - local frame = _G[gName] - if(frame) then - frame:RemoveTextures(true) - end - end - - for _, gName in pairs(AchievementTextureList) do - local frame = _G[gName] - if(frame) then - local count = frame:GetNumChildren() - for i = 1, count do - local childFrame = select(i, frame:GetChildren()) - if(childFrame and not childFrame:GetName()) then - childFrame:SetBackdrop(nil) - end - end - end - end - - STYLE:ApplyWindowStyle(AchievementFrame) - - AchievementFrameSummaryAchievements:RemoveTextures(true) - AchievementFrameSummaryAchievements:SetBasicPanel() - AchievementFrameHeaderTitle:ClearAllPoints() - AchievementFrameHeaderTitle:Point("TOPLEFT", AchievementFrame.Panel, "TOPLEFT", -30, -8) - AchievementFrameHeaderPoints:ClearAllPoints() - AchievementFrameHeaderPoints:Point("LEFT", AchievementFrameHeaderTitle, "RIGHT", 2, 0) - AchievementFrameCategoriesContainer:SetPanelTemplate("Inset", true, 2, -2, 2) - AchievementFrameAchievementsContainer:SetPanelTemplate("Default") - AchievementFrameAchievementsContainer.Panel:Point("TOPLEFT", 0, 2) - AchievementFrameAchievementsContainer.Panel:Point("BOTTOMRIGHT", -3, -3) - STYLE:ApplyCloseButtonStyle(AchievementFrameCloseButton, AchievementFrame.Panel) - STYLE:ApplyDropdownStyle(AchievementFrameFilterDropDown) - AchievementFrameFilterDropDown:Point("TOPRIGHT", AchievementFrame, "TOPRIGHT", -44, 5) - - STYLE:ApplyScrollFrameStyle(AchievementFrameCategoriesContainerScrollBar, 5) - STYLE:ApplyScrollFrameStyle(AchievementFrameAchievementsContainerScrollBar, 5) - STYLE:ApplyScrollFrameStyle(AchievementFrameStatsContainerScrollBar, 5) - STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonContainerScrollBar, 5) - STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonStatsContainerScrollBar, 5) - - for i = 1, 3 do - local tab = _G["AchievementFrameTab"..i] - if(tab) then - STYLE:ApplyTabStyle(tab) - tab:SetFrameLevel(tab:GetFrameLevel() + 2) - end - end - - BarStyleHelper(AchievementFrameSummaryCategoriesStatusBar) - BarStyleHelper(AchievementFrameComparisonSummaryPlayerStatusBar) - BarStyleHelper(AchievementFrameComparisonSummaryFriendStatusBar) - - AchievementFrameComparisonSummaryFriendStatusBar.text:ClearAllPoints() - AchievementFrameComparisonSummaryFriendStatusBar.text:SetPoint("CENTER") - AchievementFrameComparisonHeader:Point("BOTTOMRIGHT", AchievementFrameComparison, "TOPRIGHT", 45, -20) - - for f = 1, 10 do - local d = _G["AchievementFrameSummaryCategoriesCategory"..f] - local i = _G["AchievementFrameSummaryCategoriesCategory"..f.."Button"] - local j = _G["AchievementFrameSummaryCategoriesCategory"..f.."ButtonHighlight"] - BarStyleHelper(d) - i:RemoveTextures() - j:RemoveTextures() - _G[j:GetName().."Middle"]:SetTexture(1, 1, 1, 0.3) - _G[j:GetName().."Middle"]:SetAllPoints(d) - end - - AchievementFrame:HookScript("OnShow", function(self) - if(self.containerStyled) then return end - for i = 1, 20 do - STYLE:ApplyItemButtonStyle(_G["AchievementFrameCategoriesContainerButton"..i]) - end - self.containerStyled = true - end) - - hooksecurefunc("AchievementButton_DisplayAchievement", function(self) - if(self.accountWide and self.bg3) then - self.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - elseif self.bg3 then - self.bg3:SetTexture(0,0,0,1) - end - end) - - hooksecurefunc("AchievementFrameSummary_UpdateAchievements", _hook_AchievementsUpdate) - - for i = 1, #AchievementItemButtons do - local gName = AchievementItemButtons[i] - local button = _G[gName] - - if(button) then - local hl = _G[gName.."Highlight"] - local desc = _G[gName.."Description"] - local hdesc = _G[gName.."HiddenDescription"] - local icon = _G[gName.."Icon"] - local track = _G[gName.."Tracked"] - - if(hl) then hl:Die() end - - button:RemoveTextures(true) - - button.bg1 = button:CreateTexture(nil, "BACKGROUND", nil, 4) - button.bg1:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - button.bg1:SetVertexColor(unpack(SV.Media.color.default)) - button.bg1:Point("TOPLEFT", 1, -1) - button.bg1:Point("BOTTOMRIGHT", -1, 1) - - button.bg3 = button:CreateTexture(nil, "BACKGROUND", nil, 2) - button.bg3:SetTexture(unpack(SV.Media.color.default)) - button.bg3:WrapOuter(1) - - if(desc) then - desc:SetTextColor(0.6, 0.6, 0.6) - hooksecurefunc(desc, "SetTextColor", _hook_DescriptionColor) - end - - if(hdesc) then - hdesc:SetTextColor(1, 1, 1) - hooksecurefunc(hdesc, "SetTextColor", _hook_HiddenDescriptionColor) - end - - if(icon) then - local bling = _G[gName.."IconBling"] - local over = _G[gName.."IconOverlay"] - local tex = _G[gName.."IconTexture"] - if(bling) then bling:Die() end - if(over) then over:Die() end - if(tex) then - tex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - tex:FillInner() - end - - icon:SetFixedPanelTemplate("Default") - icon:Height(icon:GetHeight()-14) - icon:Width(icon:GetWidth()-14) - icon:ClearAllPoints() - icon:Point("LEFT", 6, 0) - end - - if(track) then - track:RemoveTextures() - track:SetCheckboxTemplate(true) - track:ClearAllPoints() - track:Point("BOTTOMLEFT", d, "BOTTOMLEFT", -1, -3) - track.ListParent = button - - hooksecurefunc(track, "SetPoint", _hook_TrackingPoint) - end - end - end - - local u = {"Player", "Friend"} - for c, v in pairs(u) do - for f = 1, 9 do - local d = "AchievementFrameComparisonContainerButton"..f..v; - _G[d]:RemoveTextures() - _G[d.."Background"]:Die() - if _G[d.."Description"]then - _G[d.."Description"]:SetTextColor(0.6, 0.6, 0.6) - hooksecurefunc(_G[d.."Description"], "SetTextColor", _hook_DescriptionColor) - end - _G[d].bg1 = _G[d]:CreateTexture(nil, "BACKGROUND") - _G[d].bg1:SetDrawLayer("BACKGROUND", 4) - _G[d].bg1:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - _G[d].bg1:SetVertexColor(unpack(SV.Media.color.default)) - _G[d].bg1:Point("TOPLEFT", 4, -4) - _G[d].bg1:Point("BOTTOMRIGHT", -4, 4) - _G[d].bg2 = _G[d]:CreateTexture(nil, "BACKGROUND") - _G[d].bg2:SetDrawLayer("BACKGROUND", 3) - _G[d].bg2:SetTexture(0, 0, 0) - _G[d].bg2:Point("TOPLEFT", 3, -3) - _G[d].bg2:Point("BOTTOMRIGHT", -3, 3) - _G[d].bg3 = _G[d]:CreateTexture(nil, "BACKGROUND") - _G[d].bg3:SetDrawLayer("BACKGROUND", 2) - _G[d].bg3:SetTexture(0,0,0,1) - _G[d].bg3:Point("TOPLEFT", 2, -2) - _G[d].bg3:Point("BOTTOMRIGHT", -2, 2) - _G[d].bg4 = _G[d]:CreateTexture(nil, "BACKGROUND") - _G[d].bg4:SetDrawLayer("BACKGROUND", 1) - _G[d].bg4:SetTexture(0, 0, 0) - _G[d].bg4:Point("TOPLEFT", 1, -1) - _G[d].bg4:Point("BOTTOMRIGHT", -1, 1) - - if v == "Friend"then - _G[d.."Shield"]:Point("TOPRIGHT", _G["AchievementFrameComparisonContainerButton"..f.."Friend"], "TOPRIGHT", -20, -3) - end - - _G[d.."IconBling"]:Die() - _G[d.."IconOverlay"]:Die() - _G[d.."Icon"]:SetFixedPanelTemplate("Default") - _G[d.."Icon"]:Height(_G[d.."Icon"]:GetHeight()-14) - _G[d.."Icon"]:Width(_G[d.."Icon"]:GetWidth()-14) - _G[d.."Icon"]:ClearAllPoints() - _G[d.."Icon"]:Point("LEFT", 6, 0) - _G[d.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G[d.."IconTexture"]:FillInner() - end - end - - hooksecurefunc("AchievementFrameComparison_DisplayAchievement", function(i) - local w = i.player; - local x = i.friend - w.titleBar:Die() - x.titleBar:Die() - if not w.bg3 or not x.bg3 then - return - end - if w.accountWide then - w.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - else - w.bg3:SetTexture(0,0,0,1) - end - - if x.accountWide then - x.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - else - x.bg3:SetTexture(0,0,0,1) - end - end) - - for f = 1, 20 do - local d = _G["AchievementFrameStatsContainerButton"..f] - _G["AchievementFrameStatsContainerButton"..f.."BG"]:SetTexture(1, 1, 1, 0.2) - _G["AchievementFrameStatsContainerButton"..f.."HeaderLeft"]:Die() - _G["AchievementFrameStatsContainerButton"..f.."HeaderRight"]:Die() - _G["AchievementFrameStatsContainerButton"..f.."HeaderMiddle"]:Die() - local d = "AchievementFrameComparisonStatsContainerButton"..f; - _G[d]:RemoveTextures() - _G[d]:SetPanelTemplate("Default") - _G[d.."BG"]:SetTexture(1, 1, 1, 0.2) - _G[d.."HeaderLeft"]:Die() - _G[d.."HeaderRight"]:Die() - _G[d.."HeaderMiddle"]:Die() - end - - hooksecurefunc("AchievementButton_GetProgressBar", function(y) - local d = _G["AchievementFrameProgressBar"..y] - if d then - if not d.styled then - d:RemoveTextures() - d:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - d:SetStatusBarColor(4/255, 179/255, 30/255) - d:SetFrameLevel(d:GetFrameLevel()+3) - d:Height(d:GetHeight()-2) - d.bg1 = d:CreateTexture(nil, "BACKGROUND") - d.bg1:SetDrawLayer("BACKGROUND", 4) - d.bg1:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - d.bg1:SetVertexColor(unpack(SV.Media.color.default)) - d.bg1:SetAllPoints() - d.bg3 = d:CreateTexture(nil, "BACKGROUND") - d.bg3:SetDrawLayer("BACKGROUND", 2) - d.bg3:SetTexture(0,0,0,1) - d.bg3:Point("TOPLEFT", -1, 1) - d.bg3:Point("BOTTOMRIGHT", 1, -1); - d.text:ClearAllPoints() - d.text:SetPoint("CENTER", d, "CENTER", 0, -1) - d.text:SetJustifyH("CENTER") - if y>1 then - d:ClearAllPoints() - d:Point("TOP", _G["AchievementFrameProgressBar"..y-1], "BOTTOM", 0, -5) - hooksecurefunc(d, "SetPoint", function(k, p, q, r, s, t, z) - if not z then - k:ClearAllPoints()k:SetPoint("TOP", _G["AchievementFrameProgressBar"..y-1], "BOTTOM", 0, -5, true) - end - end) - end - d.styled = true - end - end - end) - - hooksecurefunc("AchievementObjectives_DisplayCriteria", function(A, B) - local C = GetAchievementNumCriteria(B) - local D, E = 0, 0; - for f = 1, C do - local F, G, H, I, J, K, L, M, N = GetAchievementCriteriaInfo(B, f) - if G == CRITERIA_TYPE_ACHIEVEMENT and M then - E = E+1; - local O = AchievementButton_GetMeta(E) - if A.completed and H then - O.label:SetShadowOffset(0, 0) - O.label:SetTextColor(1, 1, 1, 1) - elseif H then - O.label:SetShadowOffset(1, -1) - O.label:SetTextColor(0, 1, 0, 1) - else - O.label:SetShadowOffset(1, -1) - O.label:SetTextColor(.6, .6, .6, 1) - end - elseif G ~= 1 then - D = D+1; - local P = AchievementButton_GetCriteria(D) - if A.completed and H then - P.name:SetTextColor(1, 1, 1, 1) - P.name:SetShadowOffset(0, 0) - elseif H then - P.name:SetTextColor(0, 1, 0, 1) - P.name:SetShadowOffset(1, -1) - else - P.name:SetTextColor(.6, .6, .6, 1) - P.name:SetShadowOffset(1, -1) - end - end - end - end) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_AchievementUI", AchievementStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua deleted file mode 100644 index a75a1c5..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua +++ /dev/null @@ -1,329 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local function AlphaHelper(this, value, flag) - if value ~= 1 and flag ~= true then - d:SetAlpha(1, true) - end -end ---[[ -########################################################## -ALERTFRAME STYLER -########################################################## -]]-- -local function AlertStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.alertframes ~= true then return end - - for i = 1, 4 do - local alert = _G["SVUI_SystemAlert"..i]; - if(alert) then - for b = 1, 3 do - alert.buttons[b]:SetButtonTemplate() - end - alert:RemoveTextures() - STYLE:ApplyAlertStyle(alert) - alert.input:SetEditboxTemplate() - alert.input.Panel:Point("TOPLEFT", -2, -4) - alert.input.Panel:Point("BOTTOMRIGHT", 2, 4) - alert.gold:SetEditboxTemplate() - alert.silver:SetEditboxTemplate() - alert.copper:SetEditboxTemplate() - end - end - - hooksecurefunc("AlertFrame_SetAchievementAnchors", function(g) - for i = 1, MAX_ACHIEVEMENT_ALERTS do - local frame = _G["AchievementAlertFrame"..i] - if frame then - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - if not frame.Panel then - frame:SetBasicPanel() - frame.Panel:Point("TOPLEFT", _G[frame:GetName().."Background"], "TOPLEFT", -2, -6) - frame.Panel:Point("BOTTOMRIGHT", _G[frame:GetName().."Background"], "BOTTOMRIGHT", -2, 6) - end - _G["AchievementAlertFrame"..i.."Background"]:SetTexture(0,0,0,0) - _G["AchievementAlertFrame"..i.."OldAchievement"]:Die() - _G["AchievementAlertFrame"..i.."Glow"]:Die() - _G["AchievementAlertFrame"..i.."Shine"]:Die() - _G["AchievementAlertFrame"..i.."GuildBanner"]:Die() - _G["AchievementAlertFrame"..i.."GuildBorder"]:Die() - _G["AchievementAlertFrame"..i.."Unlocked"]:SetFontTemplate(nil, 12) - _G["AchievementAlertFrame"..i.."Unlocked"]:SetTextColor(1, 1, 1) - _G["AchievementAlertFrame"..i.."Name"]:SetFontTemplate(nil, 12) - _G["AchievementAlertFrame"..i.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G["AchievementAlertFrame"..i.."IconOverlay"]:Die() - _G["AchievementAlertFrame"..i.."IconTexture"]:ClearAllPoints() - _G["AchievementAlertFrame"..i.."IconTexture"]:Point("LEFT", frame, 7, 0) - if not _G["AchievementAlertFrame"..i.."IconTexture"].b then - _G["AchievementAlertFrame"..i.."IconTexture"].b = CreateFrame("Frame", nil, _G["AchievementAlertFrame"..i]) - _G["AchievementAlertFrame"..i.."IconTexture"].b:SetFixedPanelTemplate("Default") - _G["AchievementAlertFrame"..i.."IconTexture"].b:WrapOuter(_G["AchievementAlertFrame"..i.."IconTexture"]) - _G["AchievementAlertFrame"..i.."IconTexture"]:SetParent(_G["AchievementAlertFrame"..i.."IconTexture"].b) - end - end - end - end) - - hooksecurefunc("AlertFrame_SetDungeonCompletionAnchors", function(g) - for i = 1, DUNGEON_COMPLETION_MAX_REWARDS do - local frame = _G["DungeonCompletionAlertFrame"..i] - if frame then - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - if not frame.Panel then - frame:SetBasicPanel() - frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) - frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) - end - frame.shine:Die() - frame.glowFrame:Die() - frame.glowFrame.glow:Die() - frame.raidArt:Die() - frame.dungeonArt1:Die() - frame.dungeonArt2:Die() - frame.dungeonArt3:Die() - frame.dungeonArt4:Die() - frame.heroicIcon:Die() - frame.dungeonTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.dungeonTexture:SetDrawLayer("OVERLAY") - frame.dungeonTexture:ClearAllPoints() - frame.dungeonTexture:Point("LEFT", frame, 7, 0) - if not frame.dungeonTexture.b then - frame.dungeonTexture.b = CreateFrame("Frame", nil, frame) - frame.dungeonTexture.b:SetFixedPanelTemplate("Default") - frame.dungeonTexture.b:WrapOuter(frame.dungeonTexture) - frame.dungeonTexture:SetParent(frame.dungeonTexture.b) - end - end - end - end) - - hooksecurefunc("AlertFrame_SetGuildChallengeAnchors", function(g) - local frame = GuildChallengeAlertFrame; - if frame then - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - if not frame.Panel then - frame:SetBasicPanel() - frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) - frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) - end - local j = select(2, frame:GetRegions()) - if j:GetObjectType() == "Texture"then - if j:GetTexture() == "Interface\\GuildFrame\\GuildChallenges"then j:Die()end - end - GuildChallengeAlertFrameGlow:Die() - GuildChallengeAlertFrameShine:Die() - GuildChallengeAlertFrameEmblemBorder:Die() - if not GuildChallengeAlertFrameEmblemIcon.b then - GuildChallengeAlertFrameEmblemIcon.b = CreateFrame("Frame", nil, frame) - GuildChallengeAlertFrameEmblemIcon.b:SetFixedPanelTemplate("Default") - GuildChallengeAlertFrameEmblemIcon.b:Point("TOPLEFT", GuildChallengeAlertFrameEmblemIcon, "TOPLEFT", -3, 3) - GuildChallengeAlertFrameEmblemIcon.b:Point("BOTTOMRIGHT", GuildChallengeAlertFrameEmblemIcon, "BOTTOMRIGHT", 3, -2) - GuildChallengeAlertFrameEmblemIcon:SetParent(GuildChallengeAlertFrameEmblemIcon.b) - end - SetLargeGuildTabardTextures("player", GuildChallengeAlertFrameEmblemIcon, nil, nil) - end - end) - - hooksecurefunc("AlertFrame_SetChallengeModeAnchors", function(g) - local frame = ChallengeModeAlertFrame1; - if frame then - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - if not frame.Panel then - frame:SetBasicPanel() - frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", 19, -6) - frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -22, 6) - end - for i = 1, frame:GetNumRegions()do - local j = select(i, frame:GetRegions()) - if j:GetObjectType() == "Texture"then - if j:GetTexture() == "Interface\\Challenges\\challenges-main" then j:Die() end - end - end - ChallengeModeAlertFrame1Shine:Die() - ChallengeModeAlertFrame1GlowFrame:Die() - ChallengeModeAlertFrame1GlowFrame.glow:Die() - ChallengeModeAlertFrame1Border:Die() - ChallengeModeAlertFrame1DungeonTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - ChallengeModeAlertFrame1DungeonTexture:ClearAllPoints() - ChallengeModeAlertFrame1DungeonTexture:Point("LEFT", frame.Panel, 9, 0) - if not ChallengeModeAlertFrame1DungeonTexture.b then - ChallengeModeAlertFrame1DungeonTexture.b = CreateFrame("Frame", nil, frame) - ChallengeModeAlertFrame1DungeonTexture.b:SetFixedPanelTemplate("Default") - ChallengeModeAlertFrame1DungeonTexture.b:WrapOuter(ChallengeModeAlertFrame1DungeonTexture) - ChallengeModeAlertFrame1DungeonTexture:SetParent(ChallengeModeAlertFrame1DungeonTexture.b) - end - end - end) - - hooksecurefunc("AlertFrame_SetScenarioAnchors", function(g) - local frame = ScenarioAlertFrame1; - if frame then - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - if not frame.Panel then - frame:SetBasicPanel() - frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", 4, 4) - frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -7, 6) - end - for i = 1, frame:GetNumRegions()do - local j = select(i, frame:GetRegions()) - if j:GetObjectType() == "Texture"then - if j:GetTexture() == "Interface\\Scenarios\\ScenariosParts" then j:Die() end - end - end - ScenarioAlertFrame1Shine:Die() - ScenarioAlertFrame1GlowFrame:Die() - ScenarioAlertFrame1GlowFrame.glow:Die() - ScenarioAlertFrame1DungeonTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - ScenarioAlertFrame1DungeonTexture:ClearAllPoints() - ScenarioAlertFrame1DungeonTexture:Point("LEFT", frame.Panel, 9, 0) - if not ScenarioAlertFrame1DungeonTexture.b then - ScenarioAlertFrame1DungeonTexture.b = CreateFrame("Frame", nil, frame) - ScenarioAlertFrame1DungeonTexture.b:SetFixedPanelTemplate("Default") - ScenarioAlertFrame1DungeonTexture.b:WrapOuter(ScenarioAlertFrame1DungeonTexture) - ScenarioAlertFrame1DungeonTexture:SetParent(ScenarioAlertFrame1DungeonTexture.b) - end - end - end) - - hooksecurefunc("AlertFrame_SetCriteriaAnchors", function() - for i = 1, MAX_ACHIEVEMENT_ALERTS do - local frame = _G["CriteriaAlertFrame"..i] - if frame then - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - if not frame.Panel then - frame:SetBasicPanel() - frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) - frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) - end - _G["CriteriaAlertFrame"..i.."Unlocked"]:SetTextColor(1, 1, 1) - _G["CriteriaAlertFrame"..i.."Name"]:SetTextColor(1, 1, 0) - _G["CriteriaAlertFrame"..i.."Background"]:Die() - _G["CriteriaAlertFrame"..i.."Glow"]:Die() - _G["CriteriaAlertFrame"..i.."Shine"]:Die() - _G["CriteriaAlertFrame"..i.."IconBling"]:Die() - _G["CriteriaAlertFrame"..i.."IconOverlay"]:Die() - if not _G["CriteriaAlertFrame"..i.."IconTexture"].b then - _G["CriteriaAlertFrame"..i.."IconTexture"].b = CreateFrame("Frame", nil, frame) - _G["CriteriaAlertFrame"..i.."IconTexture"].b:SetFixedPanelTemplate("Default") - _G["CriteriaAlertFrame"..i.."IconTexture"].b:Point("TOPLEFT", _G["CriteriaAlertFrame"..i.."IconTexture"], "TOPLEFT", -3, 3) - _G["CriteriaAlertFrame"..i.."IconTexture"].b:Point("BOTTOMRIGHT", _G["CriteriaAlertFrame"..i.."IconTexture"], "BOTTOMRIGHT", 3, -2) - _G["CriteriaAlertFrame"..i.."IconTexture"]:SetParent(_G["CriteriaAlertFrame"..i.."IconTexture"].b) - end - _G["CriteriaAlertFrame"..i.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - end - end) - - hooksecurefunc("AlertFrame_SetLootWonAnchors", function() - for i = 1, #LOOT_WON_ALERT_FRAMES do - local frame = LOOT_WON_ALERT_FRAMES[i] - if frame then - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - frame.Background:Die() - frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.IconBorder:Die() - frame.glow:Die() - frame.shine:Die() - if not frame.Icon.b then - frame.Icon.b = CreateFrame("Frame", nil, frame) - frame.Icon.b:SetFixedPanelTemplate("Default") - frame.Icon.b:WrapOuter(frame.Icon) - frame.Icon:SetParent(frame.Icon.b) - end - if not frame.Panel then - frame:SetBasicPanel() - frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) - frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) - end - end - end - end) - - hooksecurefunc("AlertFrame_SetMoneyWonAnchors", function() - for i = 1, #MONEY_WON_ALERT_FRAMES do - local frame = MONEY_WON_ALERT_FRAMES[i] - if frame then - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - frame.Background:Die() - frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.IconBorder:Die() - if not frame.Icon.b then - frame.Icon.b = CreateFrame("Frame", nil, frame) - frame.Icon.b:SetFixedPanelTemplate("Default") - frame.Icon.b:WrapOuter(frame.Icon) - frame.Icon:SetParent(frame.Icon.b) - end - if not frame.Panel then - frame:SetBasicPanel() - frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) - frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) - end - end - end - end) - - local frame = BonusRollMoneyWonFrame; - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - frame.Background:Die() - frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.IconBorder:Die() - frame.Icon.b = CreateFrame("Frame", nil, frame) - frame.Icon.b:SetFixedPanelTemplate("Default") - frame.Icon.b:WrapOuter(frame.Icon) - frame.Icon:SetParent(frame.Icon.b) - frame:SetBasicPanel() - frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) - frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) - - local frame = BonusRollLootWonFrame; - frame:SetAlpha(1) - hooksecurefunc(frame, "SetAlpha", AlphaHelper) - frame.Background:Die() - frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.IconBorder:Die() - frame.glow:Die() - frame.shine:Die() - frame.Icon.b = CreateFrame("Frame", nil, frame) - frame.Icon.b:SetFixedPanelTemplate("Default") - frame.Icon.b:WrapOuter(frame.Icon) - frame.Icon:SetParent(frame.Icon.b) - frame:SetBasicPanel() - frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) - frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(AlertStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua deleted file mode 100644 index 251045e..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua +++ /dev/null @@ -1,88 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -ARCHEOLOGYFRAME STYLER -########################################################## -]]-- ---240 24 -local progressBarHolder = CreateFrame("Frame", "SVUI_ArcheologyProgressBar", nil) -progressBarHolder:SetSize(240, 24) -progressBarHolder:SetPoint("BOTTOM", CastingBarFrame, "TOP", 0, 10) -SV.Mentalo:Add(progressBarHolder, "Archeology Progress Bar") - -local function ArchaeologyStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.archaeology ~= true then return end - - ArchaeologyFrame:RemoveTextures() - ArchaeologyFrameInset:RemoveTextures() - ArchaeologyFrame:SetPanelTemplate("Halftone") - ArchaeologyFrame.Panel:SetAllPoints() - ArchaeologyFrame.portrait:SetAlpha(0) - ArchaeologyFrameInset:SetPanelTemplate("Inset") - ArchaeologyFrameInset.Panel:SetPoint("TOPLEFT") - ArchaeologyFrameInset.Panel:SetPoint("BOTTOMRIGHT", -3, -1) - ArchaeologyFrameArtifactPageSolveFrameSolveButton:SetButtonTemplate() - ArchaeologyFrameArtifactPageBackButton:SetButtonTemplate() - ArchaeologyFrameRaceFilter:SetFrameLevel(ArchaeologyFrameRaceFilter:GetFrameLevel()+2) - STYLE:ApplyDropdownStyle(ArchaeologyFrameRaceFilter, 125) - STYLE:ApplyPaginationStyle(ArchaeologyFrameCompletedPageNextPageButton) - STYLE:ApplyPaginationStyle(ArchaeologyFrameCompletedPagePrevPageButton) - ArchaeologyFrameRankBar:RemoveTextures() - ArchaeologyFrameRankBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - ArchaeologyFrameRankBar:SetFrameLevel(ArchaeologyFrameRankBar:GetFrameLevel()+2) - ArchaeologyFrameRankBar:SetPanelTemplate("Default") - ArchaeologyFrameArtifactPageSolveFrameStatusBar:RemoveTextures() - ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarColor(0.7, 0.2, 0) - ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetFrameLevel(ArchaeologyFrameArtifactPageSolveFrameStatusBar:GetFrameLevel()+2) - ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetPanelTemplate("Default") - - for b = 1, ARCHAEOLOGY_MAX_COMPLETED_SHOWN do - local c = _G["ArchaeologyFrameCompletedPageArtifact"..b] - if c then - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Border"]:Die() - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Bg"]:Die() - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"].backdrop = CreateFrame("Frame", nil, c) - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"].backdrop:SetFixedPanelTemplate("Default") - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"].backdrop:WrapOuter(_G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"]) - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"].backdrop:SetFrameLevel(c:GetFrameLevel()-2) - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"]:SetDrawLayer("OVERLAY") - end - end - - ArchaeologyFrameArtifactPageIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - ArchaeologyFrameArtifactPageIcon.backdrop = CreateFrame("Frame", nil, ArchaeologyFrameArtifactPage) - ArchaeologyFrameArtifactPageIcon.backdrop:SetFixedPanelTemplate("Default") - ArchaeologyFrameArtifactPageIcon.backdrop:WrapOuter(ArchaeologyFrameArtifactPageIcon) - ArchaeologyFrameArtifactPageIcon.backdrop:SetFrameLevel(ArchaeologyFrameArtifactPage:GetFrameLevel()) - ArchaeologyFrameArtifactPageIcon:SetParent(ArchaeologyFrameArtifactPageIcon.backdrop) - ArchaeologyFrameArtifactPageIcon:SetDrawLayer("OVERLAY") - STYLE:ApplyCloseButtonStyle(ArchaeologyFrameCloseButton) - ArcheologyDigsiteProgressBar:SetAllPoints(progressBarHolder) - progressBarHolder:SetParent(ArcheologyDigsiteProgressBar) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_ArchaeologyUI", ArchaeologyStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua deleted file mode 100644 index f7e4f24..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua +++ /dev/null @@ -1,331 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local AuctionSortLinks = { - "BrowseQualitySort", - "BrowseLevelSort", - "BrowseDurationSort", - "BrowseHighBidderSort", - "BrowseCurrentBidSort", - "BidQualitySort", - "BidLevelSort", - "BidDurationSort", - "BidBuyoutSort", - "BidStatusSort", - "BidBidSort", - "AuctionsQualitySort", - "AuctionsDurationSort", - "AuctionsHighBidderSort", - "AuctionsBidSort" -} -local AuctionBidButtons = { - "BrowseBidButton", - "BidBidButton", - "BrowseBuyoutButton", - "BidBuyoutButton", - "BrowseCloseButton", - "BidCloseButton", - "BrowseSearchButton", - "AuctionsCreateAuctionButton", - "AuctionsCancelAuctionButton", - "AuctionsCloseButton", - "BrowseResetButton", - "AuctionsStackSizeMaxButton", - "AuctionsNumStacksMaxButton", -} - -local AuctionTextFields = { - "BrowseName", - "BrowseMinLevel", - "BrowseMaxLevel", - "BrowseBidPriceGold", - "BidBidPriceGold", - "AuctionsStackSizeEntry", - "AuctionsNumStacksEntry", - "StartPriceGold", - "BuyoutPriceGold", - "BrowseBidPriceSilver", - "BrowseBidPriceCopper", - "BidBidPriceSilver", - "BidBidPriceCopper", - "StartPriceSilver", - "StartPriceCopper", - "BuyoutPriceSilver", - "BuyoutPriceCopper" -} ---[[ -########################################################## -AUCTIONFRAME STYLER -########################################################## -]]-- -local function AuctionStyle() - --STYLE.Debugging = true - if(SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.auctionhouse ~= true) then return end - - STYLE:ApplyWindowStyle(AuctionFrame, false, true) - - BrowseFilterScrollFrame:RemoveTextures() - BrowseScrollFrame:RemoveTextures() - AuctionsScrollFrame:RemoveTextures() - BidScrollFrame:RemoveTextures() - - STYLE:ApplyCloseButtonStyle(AuctionFrameCloseButton) - STYLE:ApplyScrollFrameStyle(AuctionsScrollFrameScrollBar) - - STYLE:ApplyDropdownStyle(BrowseDropDown) - STYLE:ApplyDropdownStyle(PriceDropDown) - STYLE:ApplyDropdownStyle(DurationDropDown) - STYLE:ApplyScrollFrameStyle(BrowseFilterScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(BrowseScrollFrameScrollBar) - IsUsableCheckButton:SetCheckboxTemplate(true) - ShowOnPlayerCheckButton:SetCheckboxTemplate(true) - - --ExactMatchCheckButton:SetCheckboxTemplate(true) - - SideDressUpFrame:RemoveTextures(true) - SideDressUpFrame:Size(300, 400) - SideDressUpFrame:SetPoint("LEFT", AuctionFrame, "RIGHT", 16, 0) - SideDressUpFrame.SetPoint = SV.fubar - SideDressUpModel:RemoveTextures(true) - SideDressUpModel:SetAllPoints(SideDressUpFrame) - SideDressUpModel:SetFixedPanelTemplate("ModelComic") - SideDressUpModelResetButton:SetButtonTemplate() - SideDressUpModelResetButton:SetPoint("BOTTOM", SideDressUpModel, "BOTTOM", 0, 20) - STYLE:ApplyCloseButtonStyle(SideDressUpModelCloseButton) - - AuctionProgressFrame:RemoveTextures() - AuctionProgressFrame:SetFixedPanelTemplate("Transparent", true) - AuctionProgressFrameCancelButton:SetButtonTemplate() - AuctionProgressFrameCancelButton:SetFixedPanelTemplate("Default") - AuctionProgressFrameCancelButton:SetHitRectInsets(0, 0, 0, 0) - AuctionProgressFrameCancelButton:GetNormalTexture():FillInner() - AuctionProgressFrameCancelButton:GetNormalTexture():SetTexCoord(0.67, 0.37, 0.61, 0.26) - AuctionProgressFrameCancelButton:Size(28, 28) - AuctionProgressFrameCancelButton:Point("LEFT", AuctionProgressBar, "RIGHT", 8, 0) - AuctionProgressBarIcon:SetTexCoord(0.67, 0.37, 0.61, 0.26) - - local AuctionProgressBarBG = CreateFrame("Frame", nil, AuctionProgressBarIcon:GetParent()) - AuctionProgressBarBG:WrapOuter(AuctionProgressBarIcon) - AuctionProgressBarBG:SetFixedPanelTemplate("Default") - AuctionProgressBarIcon:SetParent(AuctionProgressBarBG) - - AuctionProgressBarText:ClearAllPoints() - AuctionProgressBarText:SetPoint("CENTER") - AuctionProgressBar:RemoveTextures() - AuctionProgressBar:SetPanelTemplate("Default") - AuctionProgressBar:SetStatusBarTexture(SV.Media.bar.default) - AuctionProgressBar:SetStatusBarColor(1, 1, 0) - - STYLE:ApplyPaginationStyle(BrowseNextPageButton) - STYLE:ApplyPaginationStyle(BrowsePrevPageButton) - - for _,gName in pairs(AuctionBidButtons) do - if(_G[gName]) then - _G[gName]:RemoveTextures() - _G[gName]:SetButtonTemplate() - end - end - - AuctionsCloseButton:Point("BOTTOMRIGHT", AuctionFrameAuctions, "BOTTOMRIGHT", 66, 10) - AuctionsCancelAuctionButton:Point("RIGHT", AuctionsCloseButton, "LEFT", -4, 0) - - BidBuyoutButton:Point("RIGHT", BidCloseButton, "LEFT", -4, 0) - BidBidButton:Point("RIGHT", BidBuyoutButton, "LEFT", -4, 0) - - BrowseBuyoutButton:Point("RIGHT", BrowseCloseButton, "LEFT", -4, 0) - BrowseBidButton:Point("RIGHT", BrowseBuyoutButton, "LEFT", -4, 0) - - AuctionsItemButton:RemoveTextures() - AuctionsItemButton:SetButtonTemplate() - AuctionsItemButton:SetScript("OnUpdate", function() - if AuctionsItemButton:GetNormalTexture()then - AuctionsItemButton:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - AuctionsItemButton:GetNormalTexture():FillInner() - end - end) - - for _,frame in pairs(AuctionSortLinks)do - _G[frame.."Left"]:Die() - _G[frame.."Middle"]:Die() - _G[frame.."Right"]:Die() - end - - STYLE:ApplyTabStyle(_G["AuctionFrameTab1"]) - STYLE:ApplyTabStyle(_G["AuctionFrameTab2"]) - STYLE:ApplyTabStyle(_G["AuctionFrameTab3"]) - - AuctionFrameBrowse.bg1 = CreateFrame("Frame", nil, AuctionFrameBrowse) - AuctionFrameBrowse.bg1:Point("TOPLEFT", 20, -103) - AuctionFrameBrowse.bg1:Point("BOTTOMRIGHT", -575, 40) - AuctionFrameBrowse.bg1:SetFixedPanelTemplate("Inset") - - BrowseNoResultsText:SetParent(AuctionFrameBrowse.bg1) - BrowseSearchCountText:SetParent(AuctionFrameBrowse.bg1) - - BrowseResetButton:Point("TOPLEFT", AuctionFrameBrowse, "TOPLEFT", 81, -74) - BrowseSearchButton:Point("TOPRIGHT", AuctionFrameBrowse, "TOPRIGHT", 25, -34) - - AuctionFrameBrowse.bg1:SetFrameLevel(AuctionFrameBrowse.bg1:GetFrameLevel()-1) - BrowseFilterScrollFrame:Height(300) - AuctionFrameBrowse.bg2 = CreateFrame("Frame", nil, AuctionFrameBrowse) - AuctionFrameBrowse.bg2:SetFixedPanelTemplate("Inset") - AuctionFrameBrowse.bg2:Point("TOPLEFT", AuctionFrameBrowse.bg1, "TOPRIGHT", 4, 0) - AuctionFrameBrowse.bg2:Point("BOTTOMRIGHT", AuctionFrame, "BOTTOMRIGHT", -8, 40) - AuctionFrameBrowse.bg2:SetFrameLevel(AuctionFrameBrowse.bg2:GetFrameLevel() - 1) - - for i = 1, NUM_FILTERS_TO_DISPLAY do - local header = _G[("AuctionFilterButton%d"):format(i)] - if(header) then - header:RemoveTextures() - header:SetButtonTemplate() - end - end - - for _,field in pairs(AuctionTextFields)do - _G[field]:SetEditboxTemplate() - _G[field]:SetTextInsets(-1, -1, -2, -2) - end - - BrowseMaxLevel:Point("LEFT", BrowseMinLevel, "RIGHT", 8, 0) - AuctionsStackSizeEntry.Panel:SetAllPoints() - AuctionsNumStacksEntry.Panel:SetAllPoints() - - for h = 1, NUM_BROWSE_TO_DISPLAY do - local button = _G["BrowseButton"..h]; - local buttonItem = _G["BrowseButton"..h.."Item"]; - local buttonTex = _G["BrowseButton"..h.."ItemIconTexture"]; - - if(button) then - if(buttonTex) then - buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - buttonTex:FillInner() - end - - button:RemoveTextures() - button:SetButtonTemplate() - - if(buttonItem) then - buttonItem:SetButtonTemplate() - buttonItem.Panel:SetAllPoints() - buttonItem:HookScript("OnUpdate", function() - buttonItem:GetNormalTexture():Die() - end) - - local highLight = button:GetHighlightTexture() - _G["BrowseButton"..h.."Highlight"] = highLight - highLight:ClearAllPoints() - highLight:Point("TOPLEFT", buttonItem, "TOPRIGHT", 2, 0) - highLight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) - button:GetPushedTexture():SetAllPoints(highLight) - end - end - end - - for h = 1, NUM_AUCTIONS_TO_DISPLAY do - local button = _G["AuctionsButton"..h]; - local buttonItem = _G["AuctionsButton"..h.."Item"]; - local buttonTex = _G["AuctionsButton"..h.."ItemIconTexture"]; - - if(button) then - if(buttonTex) then - buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - buttonTex:FillInner() - end - - button:RemoveTextures() - button:SetButtonTemplate() - - if(buttonItem) then - buttonItem:SetButtonTemplate() - buttonItem.Panel:SetAllPoints() - buttonItem:HookScript("OnUpdate", function() - buttonItem:GetNormalTexture():Die() - end) - - local highLight = button:GetHighlightTexture() - _G["AuctionsButton"..h.."Highlight"] = highLight - highLight:ClearAllPoints() - highLight:Point("TOPLEFT", buttonItem, "TOPRIGHT", 2, 0) - highLight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) - button:GetPushedTexture():SetAllPoints(highLight) - end - end - end - - for h = 1, NUM_BIDS_TO_DISPLAY do - local button = _G["BidButton"..h]; - local buttonItem = _G["BidButton"..h.."Item"]; - local buttonTex = _G["BidButton"..h.."ItemIconTexture"]; - - if(button) then - if(buttonTex) then - buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - buttonTex:FillInner() - end - - button:RemoveTextures() - button:SetButtonTemplate() - - if(buttonItem) then - buttonItem:SetButtonTemplate() - buttonItem.Panel:SetAllPoints() - buttonItem:HookScript("OnUpdate", function() - buttonItem:GetNormalTexture():Die() - end) - - local highLight = button:GetHighlightTexture() - _G["BidButton"..h.."Highlight"] = highLight - highLight:ClearAllPoints() - highLight:Point("TOPLEFT", buttonItem, "TOPRIGHT", 2, 0) - highLight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) - button:GetPushedTexture():SetAllPoints(highLight) - end - end - end - - BrowseScrollFrame:Height(300) - AuctionFrameBid.bg = CreateFrame("Frame", nil, AuctionFrameBid) - AuctionFrameBid.bg:SetFixedPanelTemplate("Inset") - AuctionFrameBid.bg:Point("TOPLEFT", 22, -72) - AuctionFrameBid.bg:Point("BOTTOMRIGHT", 66, 39) - AuctionFrameBid.bg:SetFrameLevel(AuctionFrameBid.bg:GetFrameLevel()-1) - BidScrollFrame:Height(332) - AuctionsScrollFrame:Height(336) - AuctionFrameAuctions.bg1 = CreateFrame("Frame", nil, AuctionFrameAuctions) - AuctionFrameAuctions.bg1:SetFixedPanelTemplate("Inset") - AuctionFrameAuctions.bg1:Point("TOPLEFT", 15, -70) - AuctionFrameAuctions.bg1:Point("BOTTOMRIGHT", -545, 35) - AuctionFrameAuctions.bg1:SetFrameLevel(AuctionFrameAuctions.bg1:GetFrameLevel() - 2) - AuctionFrameAuctions.bg2 = CreateFrame("Frame", nil, AuctionFrameAuctions) - AuctionFrameAuctions.bg2:SetFixedPanelTemplate("Inset") - AuctionFrameAuctions.bg2:Point("TOPLEFT", AuctionFrameAuctions.bg1, "TOPRIGHT", 3, 0) - AuctionFrameAuctions.bg2:Point("BOTTOMRIGHT", AuctionFrame, -8, 35) - AuctionFrameAuctions.bg2:SetFrameLevel(AuctionFrameAuctions.bg2:GetFrameLevel() - 2) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_AuctionUI", AuctionStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua deleted file mode 100644 index c2ad149..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua +++ /dev/null @@ -1,67 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -BARBERSHOP STYLER -########################################################## -]]-- -local function BarberShopStyle() - if SV.db[Schema].blizzard.enable~=true or SV.db[Schema].blizzard.barber~=true then return end - local buttons = {"BarberShopFrameOkayButton", "BarberShopFrameCancelButton", "BarberShopFrameResetButton"} - BarberShopFrameOkayButton:Point("RIGHT", BarberShopFrameSelector4, "BOTTOM", 2, -50) - for b = 1, #buttons do - _G[buttons[b]]:RemoveTextures() - _G[buttons[b]]:SetButtonTemplate() - end - for b = 1, 4 do - local c = _G["BarberShopFrameSelector"..b] - local d = _G["BarberShopFrameSelector"..b-1] - STYLE:ApplyPaginationStyle(_G["BarberShopFrameSelector"..b.."Prev"]) - STYLE:ApplyPaginationStyle(_G["BarberShopFrameSelector"..b.."Next"]) - if b ~= 1 then - c:ClearAllPoints()c:Point("TOP", d, "BOTTOM", 0, -3) - end - if c then - c:RemoveTextures() - end - end - BarberShopFrameSelector1:ClearAllPoints() - BarberShopFrameSelector1:Point("TOP", 0, -12) - BarberShopFrameResetButton:ClearAllPoints() - BarberShopFrameResetButton:Point("BOTTOM", 0, 12) - BarberShopFrame:RemoveTextures() - BarberShopFrame:SetPanelTemplate("Halftone") - BarberShopFrame:Size(BarberShopFrame:GetWidth()-30, BarberShopFrame:GetHeight()-56) - BarberShopFrameMoneyFrame:RemoveTextures() - BarberShopFrameMoneyFrame:SetPanelTemplate() - BarberShopFrameBackground:Die() - BarberShopBannerFrameBGTexture:Die() - BarberShopBannerFrame:Die() - BarberShopAltFormFrameBorder:RemoveTextures() - BarberShopAltFormFrame:Point("BOTTOM", BarberShopFrame, "TOP", 0, 5) - BarberShopAltFormFrame:RemoveTextures() - BarberShopAltFormFrame:SetBasicPanel() -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_BarbershopUI",BarberShopStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua deleted file mode 100644 index 044ff6c..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua +++ /dev/null @@ -1,94 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -BATTLEFIELD STYLER -########################################################## -]]-- -local function BattlefieldStyle() - if SV.db[Schema].blizzard.enable~=true or SV.db[Schema].blizzard.bgmap~=true then return end - BattlefieldMinimap:SetClampedToScreen(true) - BattlefieldMinimapCorner:Die() - BattlefieldMinimapBackground:Die() - BattlefieldMinimapTab:Die() - BattlefieldMinimapTabLeft:Die() - BattlefieldMinimapTabMiddle:Die() - BattlefieldMinimapTabRight:Die() - BattlefieldMinimap:SetFixedPanelTemplate("Transparent") - BattlefieldMinimap.Panel:Point("BOTTOMRIGHT", -4, 2) - BattlefieldMinimap:SetFrameStrata("LOW") - BattlefieldMinimapCloseButton:ClearAllPoints() - BattlefieldMinimapCloseButton:SetPoint("TOPRIGHT", -4, 0) - STYLE:ApplyCloseButtonStyle(BattlefieldMinimapCloseButton) - BattlefieldMinimapCloseButton:SetFrameStrata("MEDIUM") - BattlefieldMinimap:EnableMouse(true) - BattlefieldMinimap:SetMovable(true) - BattlefieldMinimap:SetScript("OnMouseUp", function(f, g) - if g == "LeftButton"then - BattlefieldMinimapTab:StopMovingOrSizing()BattlefieldMinimapTab:SetUserPlaced(true) - if OpacityFrame:IsShown()then - OpacityFrame:Hide() - end - elseif g == "RightButton"then - ToggleDropDownMenu(1, nil, BattlefieldMinimapTabDropDown, f:GetName(), 0, -4) - if OpacityFrame:IsShown()then - OpacityFrame:Hide() - end - end - end) - BattlefieldMinimap:SetScript("OnMouseDown", function(f, g) - if g == "LeftButton"then - if BattlefieldMinimapOptions and BattlefieldMinimapOptions.locked then - return - else - BattlefieldMinimapTab:StartMoving() - end - end - end) - hooksecurefunc("BattlefieldMinimap_UpdateOpacity", function(opacity) - local h = 1.0-BattlefieldMinimapOptions.opacity or 0; - BattlefieldMinimap.Panel:SetAlpha(h) - end) - local i; - BattlefieldMinimap:HookScript("OnEnter", function() - i = BattlefieldMinimapOptions.opacity or 0; - BattlefieldMinimap_UpdateOpacity(0) - end) - BattlefieldMinimap:HookScript("OnLeave", function() - if i then - BattlefieldMinimap_UpdateOpacity(i)i = nil - end - end) - BattlefieldMinimapCloseButton:HookScript("OnEnter", function() - i = BattlefieldMinimapOptions.opacity or 0; - BattlefieldMinimap_UpdateOpacity(0) - end) - BattlefieldMinimapCloseButton:HookScript("OnLeave", function() - if i then - BattlefieldMinimap_UpdateOpacity(i)i = nil - end - end) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_BattlefieldMinimap",BattlefieldStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua deleted file mode 100644 index 88bc2c6..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua +++ /dev/null @@ -1,93 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -BLACKMARKET STYLER -########################################################## -]]-- -local function BlackMarketStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.bmah ~= true then - return - end - - local ChangeTab = function(p) - p.Left:SetAlpha(0) - if p.Middle then - p.Middle:SetAlpha(0) - end - p.Right:SetAlpha(0) - end - - BlackMarketFrame:RemoveTextures() - BlackMarketFrame:SetPanelTemplate("Halftone") - BlackMarketFrame.Inset:RemoveTextures() - BlackMarketFrame.Inset:SetFixedPanelTemplate("Inset") - STYLE:ApplyCloseButtonStyle(BlackMarketFrame.CloseButton) - STYLE:ApplyScrollFrameStyle(BlackMarketScrollFrameScrollBar, 4) - - ChangeTab(BlackMarketFrame.ColumnName) - ChangeTab(BlackMarketFrame.ColumnLevel) - ChangeTab(BlackMarketFrame.ColumnType) - ChangeTab(BlackMarketFrame.ColumnDuration) - ChangeTab(BlackMarketFrame.ColumnHighBidder) - ChangeTab(BlackMarketFrame.ColumnCurrentBid) - - BlackMarketFrame.MoneyFrameBorder:RemoveTextures() - BlackMarketBidPriceGold:SetEditboxTemplate() - BlackMarketBidPriceGold.Panel:Point("TOPLEFT", -2, 0) - BlackMarketBidPriceGold.Panel:Point("BOTTOMRIGHT", -2, 0) - BlackMarketFrame.BidButton:SetButtonTemplate() - hooksecurefunc("BlackMarketScrollFrame_Update", function() - local buttons = BlackMarketScrollFrame.buttons; - local r = #buttons; - local s = HybridScrollFrame_GetOffset(BlackMarketScrollFrame) - local t = C_BlackMarket.GetNumItems() - for b = 1, r do - local u = buttons[b] - local v = s+b; - if not u.styled then - u:RemoveTextures() - u:SetButtonTemplate() - STYLE:ApplyItemButtonStyle(u.Item) - u.styled = true - end - if v <= t then - local w, x = C_BlackMarket.GetItemInfoByIndex(v) - if w then - u.Item.IconTexture:SetTexture(x) - end - end - end - end) - BlackMarketFrame.HotDeal:RemoveTextures() - STYLE:ApplyItemButtonStyle(BlackMarketFrame.HotDeal.Item) - for b = 1, BlackMarketFrame:GetNumRegions()do - local y = select(b, BlackMarketFrame:GetRegions()) - if y and y:GetObjectType() == "FontString" and y:GetText() == BLACK_MARKET_TITLE then - y:ClearAllPoints()y:SetPoint("TOP", BlackMarketFrame, "TOP", 0, -4) - end - end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_BlackMarketUI",BlackMarketStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua deleted file mode 100644 index ba4091f..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua +++ /dev/null @@ -1,188 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local CalendarButtons = { - "CalendarViewEventAcceptButton", - "CalendarViewEventTentativeButton", - "CalendarViewEventRemoveButton", - "CalendarViewEventDeclineButton" -}; ---[[ -########################################################## -CALENDAR STYLER -########################################################## -]]-- -local function CalendarStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.calendar ~= true then - return - end - - STYLE:ApplyWindowStyle(CalendarFrame) - - STYLE:ApplyCloseButtonStyle(CalendarCloseButton) - CalendarCloseButton:SetPoint("TOPRIGHT", CalendarFrame, "TOPRIGHT", -4, -4) - STYLE:ApplyPaginationStyle(CalendarPrevMonthButton) - STYLE:ApplyPaginationStyle(CalendarNextMonthButton) - - do - local cfframe = _G["CalendarFilterFrame"]; - - if(cfframe) then - cfframe:RemoveTextures() - cfframe:Width(155) - cfframe:SetPanelTemplate("Default") - - local cftext = _G["CalendarFilterFrameText"] - if(cftext) then - cftext:ClearAllPoints() - cftext:SetPoint("RIGHT", cfbutton, "LEFT", -2, 0) - end - - local cfbutton = _G["CalendarFilterButton"]; - if(cfbutton) then - cfbutton:ClearAllPoints() - cfbutton:SetPoint("RIGHT", cfframe, "RIGHT", -10, 3) - STYLE:ApplyPaginationStyle(cfbutton, true) - cfframe.Panel:SetPoint("TOPLEFT", 20, 2) - cfframe.Panel:SetPoint("BOTTOMRIGHT", cfbutton, "BOTTOMRIGHT", 2, -2) - end - end - end - - local l = CreateFrame("Frame", "CalendarFrameBackdrop", CalendarFrame) - l:SetFixedPanelTemplate("Default") - l:SetPoint("TOPLEFT", 10, -72) - l:SetPoint("BOTTOMRIGHT", -8, 3) - CalendarContextMenu:SetFixedPanelTemplate("Default") - hooksecurefunc(CalendarContextMenu, "SetBackdropColor", function(f, r, g, b, a) - if r ~= 0 or g ~= 0 or b ~= 0 or a ~= 0.5 then - f:SetBackdropColor(0, 0, 0, 0.5) - end - end) - hooksecurefunc(CalendarContextMenu, "SetBackdropBorderColor", function(f, r, g, b) - if r ~= 0 or g ~= 0 or b ~= 0 then - f:SetBackdropBorderColor(0, 0, 0) - end - end) - for u = 1, 42 do - _G["CalendarDayButton"..u]:SetFrameLevel(_G["CalendarDayButton"..u]:GetFrameLevel()+1) - end - CalendarCreateEventFrame:RemoveTextures() - CalendarCreateEventFrame:SetFixedPanelTemplate("Transparent", true) - CalendarCreateEventFrame:SetPoint("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarCreateEventTitleFrame:RemoveTextures() - CalendarCreateEventCreateButton:SetButtonTemplate() - CalendarCreateEventMassInviteButton:SetButtonTemplate() - CalendarCreateEventInviteButton:SetButtonTemplate() - CalendarCreateEventInviteButton:SetPoint("TOPLEFT", CalendarCreateEventInviteEdit, "TOPRIGHT", 4, 1) - CalendarCreateEventInviteEdit:Width(CalendarCreateEventInviteEdit:GetWidth()-2) - CalendarCreateEventInviteList:RemoveTextures() - CalendarCreateEventInviteList:SetFixedPanelTemplate("Default") - CalendarCreateEventInviteEdit:SetEditboxTemplate() - CalendarCreateEventTitleEdit:SetEditboxTemplate() - STYLE:ApplyDropdownStyle(CalendarCreateEventTypeDropDown, 120) - CalendarCreateEventDescriptionContainer:RemoveTextures() - CalendarCreateEventDescriptionContainer:SetFixedPanelTemplate("Default") - STYLE:ApplyCloseButtonStyle(CalendarCreateEventCloseButton) - CalendarCreateEventLockEventCheck:SetCheckboxTemplate(true) - STYLE:ApplyDropdownStyle(CalendarCreateEventHourDropDown, 68) - STYLE:ApplyDropdownStyle(CalendarCreateEventMinuteDropDown, 68) - STYLE:ApplyDropdownStyle(CalendarCreateEventAMPMDropDown, 68) - STYLE:ApplyDropdownStyle(CalendarCreateEventRepeatOptionDropDown, 120) - CalendarCreateEventIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - hooksecurefunc(CalendarCreateEventIcon, "SetTexCoord", function(f, v, w, x, y) - local z, A, B, C = 0.1, 0.9, 0.1, 0.9 - if v ~= z or w ~= A or x ~= B or y ~= C then - f:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - end) - CalendarCreateEventInviteListSection:RemoveTextures() - CalendarClassButtonContainer:HookScript("OnShow", function() - for u, D in ipairs(CLASS_SORT_ORDER)do - local e = _G["CalendarClassButton"..u]e:RemoveTextures() - e:SetPanelTemplate("Default") - local E = CLASS_ICON_TCOORDS[D] - local F = e:GetNormalTexture() - F:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes") - F:SetTexCoord(E[1]+0.015, E[2]-0.02, E[3]+0.018, E[4]-0.02) - end - CalendarClassButton1:SetPoint("TOPLEFT", CalendarClassButtonContainer, "TOPLEFT", 5, 0) - CalendarClassTotalsButton:RemoveTextures() - CalendarClassTotalsButton:SetPanelTemplate("Default") - end) - CalendarTexturePickerFrame:RemoveTextures() - CalendarTexturePickerTitleFrame:RemoveTextures() - CalendarTexturePickerFrame:SetFixedPanelTemplate("Transparent", true) - STYLE:ApplyScrollFrameStyle(CalendarTexturePickerScrollBar) - CalendarTexturePickerAcceptButton:SetButtonTemplate() - CalendarTexturePickerCancelButton:SetButtonTemplate() - CalendarCreateEventInviteButton:SetButtonTemplate() - CalendarCreateEventRaidInviteButton:SetButtonTemplate() - CalendarMassInviteFrame:RemoveTextures() - CalendarMassInviteFrame:SetFixedPanelTemplate("Transparent", true) - CalendarMassInviteTitleFrame:RemoveTextures() - STYLE:ApplyCloseButtonStyle(CalendarMassInviteCloseButton) - CalendarMassInviteGuildAcceptButton:SetButtonTemplate() - STYLE:ApplyDropdownStyle(CalendarMassInviteGuildRankMenu, 130) - CalendarMassInviteGuildMinLevelEdit:SetEditboxTemplate() - CalendarMassInviteGuildMaxLevelEdit:SetEditboxTemplate() - CalendarViewRaidFrame:RemoveTextures() - CalendarViewRaidFrame:SetFixedPanelTemplate("Transparent", true) - CalendarViewRaidFrame:SetPoint("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarViewRaidTitleFrame:RemoveTextures() - STYLE:ApplyCloseButtonStyle(CalendarViewRaidCloseButton) - CalendarViewHolidayFrame:RemoveTextures(true) - CalendarViewHolidayFrame:SetFixedPanelTemplate("Transparent", true) - CalendarViewHolidayFrame:SetPoint("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarViewHolidayTitleFrame:RemoveTextures() - STYLE:ApplyCloseButtonStyle(CalendarViewHolidayCloseButton) - CalendarViewEventFrame:RemoveTextures() - CalendarViewEventFrame:SetFixedPanelTemplate("Transparent", true) - CalendarViewEventFrame:SetPoint("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarViewEventTitleFrame:RemoveTextures() - CalendarViewEventDescriptionContainer:RemoveTextures() - CalendarViewEventDescriptionContainer:SetFixedPanelTemplate("Transparent", true) - CalendarViewEventInviteList:RemoveTextures() - CalendarViewEventInviteList:SetFixedPanelTemplate("Transparent", true) - CalendarViewEventInviteListSection:RemoveTextures() - STYLE:ApplyCloseButtonStyle(CalendarViewEventCloseButton) - STYLE:ApplyScrollFrameStyle(CalendarViewEventInviteListScrollFrameScrollBar) - for _,btn in pairs(CalendarButtons)do - _G[btn]:SetButtonTemplate() - end - CalendarEventPickerFrame:RemoveTextures() - CalendarEventPickerTitleFrame:RemoveTextures() - CalendarEventPickerFrame:SetFixedPanelTemplate("Transparent", true) - STYLE:ApplyScrollFrameStyle(CalendarEventPickerScrollBar) - CalendarEventPickerCloseButton:SetButtonTemplate() - STYLE:ApplyScrollFrameStyle(CalendarCreateEventDescriptionScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(CalendarCreateEventInviteListScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(CalendarViewEventDescriptionScrollFrameScrollBar) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_Calendar",CalendarStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua deleted file mode 100644 index bfcfe58..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua +++ /dev/null @@ -1,60 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -CHALLENGES UI STYLER -########################################################## -]]-- -local function ChallengesFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.lfg ~= true then return end - ChallengesFrameInset:RemoveTextures() - ChallengesFrameInsetBg:Hide() - ChallengesFrameDetails.bg:Hide() - ChallengesFrameLeaderboard:SetButtonTemplate() - select(2, ChallengesFrameDetails:GetRegions()):Hide() - select(9, ChallengesFrameDetails:GetRegions()):Hide() - select(10, ChallengesFrameDetails:GetRegions()):Hide() - select(11, ChallengesFrameDetails:GetRegions()):Hide() - ChallengesFrameDungeonButton1:SetPoint("TOPLEFT", ChallengesFrame, "TOPLEFT", 8, -83) - for u = 1, 9 do - local v = ChallengesFrame["button"..u] - v:SetButtonTemplate() - v:SetButtonTemplate() - v:SetHighlightTexture("") - v.selectedTex:SetAlpha(.2) - v.selectedTex:SetPoint("TOPLEFT", 1, -1) - v.selectedTex:SetPoint("BOTTOMRIGHT", -1, 1) - v.NoMedal:Die() - end - for u = 1, 3 do - local F = ChallengesFrame["RewardRow"..u] - for A = 1, 2 do - local v = F["Reward"..A] - v:SetPanelTemplate() - v.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_ChallengesUI",ChallengesFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua deleted file mode 100644 index ea9fc7c..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua +++ /dev/null @@ -1,382 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local CharacterSlotNames = { - "HeadSlot", - "NeckSlot", - "ShoulderSlot", - "BackSlot", - "ChestSlot", - "ShirtSlot", - "TabardSlot", - "WristSlot", - "HandsSlot", - "WaistSlot", - "LegsSlot", - "FeetSlot", - "Finger0Slot", - "Finger1Slot", - "Trinket0Slot", - "Trinket1Slot", - "MainHandSlot", - "SecondaryHandSlot" -}; - -local CharFrameList = { - "CharacterFrame", - "CharacterModelFrame", - "CharacterFrameInset", - "CharacterStatsPane", - "CharacterFrameInsetRight", - "PaperDollFrame", - "PaperDollSidebarTabs", - "PaperDollEquipmentManagerPane" -}; - -local function SetItemFrame(frame, point) - point = point or frame - local noscalemult = 2 * UIParent:GetScale() - if point.bordertop then return end - point.backdrop = frame:CreateTexture(nil, "BORDER") - point.backdrop:SetDrawLayer("BORDER", -4) - point.backdrop:SetAllPoints(point) - point.backdrop:SetTexture(SV.Media.bar.default) - point.backdrop:SetVertexColor(unpack(SV.Media.color.default)) - point.bordertop = frame:CreateTexture(nil, "BORDER") - point.bordertop:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult) - point.bordertop:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult) - point.bordertop:SetHeight(noscalemult) - point.bordertop:SetTexture(0,0,0) - point.bordertop:SetDrawLayer("BORDER", 1) - point.borderbottom = frame:CreateTexture(nil, "BORDER") - point.borderbottom:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", -noscalemult, -noscalemult) - point.borderbottom:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", noscalemult, -noscalemult) - point.borderbottom:SetHeight(noscalemult) - point.borderbottom:SetTexture(0,0,0) - point.borderbottom:SetDrawLayer("BORDER", 1) - point.borderleft = frame:CreateTexture(nil, "BORDER") - point.borderleft:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult) - point.borderleft:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", noscalemult, -noscalemult) - point.borderleft:SetWidth(noscalemult) - point.borderleft:SetTexture(0,0,0) - point.borderleft:SetDrawLayer("BORDER", 1) - point.borderright = frame:CreateTexture(nil, "BORDER") - point.borderright:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult) - point.borderright:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", -noscalemult, -noscalemult) - point.borderright:SetWidth(noscalemult) - point.borderright:SetTexture(0,0,0) - point.borderright:SetDrawLayer("BORDER", 1) -end - -local function StyleCharacterSlots() - for _,slotName in pairs(CharacterSlotNames)do - local charSlot = _G["Character"..slotName] - local slotID,_,_ = GetInventorySlotInfo(slotName) - local itemID = GetInventoryItemID("player",slotID) - if itemID then - local _,_,info = GetItemInfo(itemID) - if info and info > 1 then - charSlot:SetBackdropBorderColor(GetItemQualityColor(info)) - else - charSlot:SetBackdropBorderColor(0,0,0,1) - end - else - charSlot:SetBackdropBorderColor(0,0,0,1) - end - end -end - -local function EquipmentFlyout_OnShow() - EquipmentFlyoutFrameButtons:RemoveTextures() - local counter = 1; - local button = _G["EquipmentFlyoutFrameButton"..counter] - while button do - local texture = _G["EquipmentFlyoutFrameButton"..counter.."IconTexture"] - button:SetButtonTemplate() - texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - button:GetNormalTexture():SetTexture(0,0,0,0) - texture:FillInner() - button:SetFrameLevel(button:GetFrameLevel() + 2) - if not button.Panel then - button:SetPanelTemplate("Default") - button.Panel:SetAllPoints() - end - counter = counter + 1; - button = _G["EquipmentFlyoutFrameButton"..counter] - end -end - -local function PaperDoll_UpdateTabs() - for i = 1, #PAPERDOLL_SIDEBARS do - local tab = _G["PaperDollSidebarTab"..i] - if tab then - tab.Highlight:SetTexture(1, 1, 1, 0.3) - tab.Highlight:Point("TOPLEFT", 3, -4) - tab.Highlight:Point("BOTTOMRIGHT", -1, 0) - tab.Hider:SetTexture(0.4, 0.4, 0.4, 0.4) - tab.Hider:Point("TOPLEFT", 3, -4) - tab.Hider:Point("BOTTOMRIGHT", -1, 0) - tab.TabBg:Die() - if i == 1 then - for i = 1, tab:GetNumRegions()do - local texture = select(i, tab:GetRegions()) - texture:SetTexCoord(0.16, 0.86, 0.16, 0.86) - hooksecurefunc(texture, "SetTexCoord", function(f, v, w, x, y) - if v ~= 0.16001 then - f:SetTexCoord(0.16001, 0.86, 0.16, 0.86) - end - end) - end - end - tab:SetPanelTemplate("Default", true, 2) - tab.Panel:Point("TOPLEFT", 2, -3) - tab.Panel:Point("BOTTOMRIGHT", 0, -2) - end - end -end - -local function Reputation_OnShow() - for i = 1, GetNumFactions()do - local bar = _G["ReputationBar"..i.."ReputationBar"] - if bar then - bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - if not bar.Panel then - bar:SetPanelTemplate("Inset") - end - _G["ReputationBar"..i.."Background"]:SetTexture(0,0,0,0) - _G["ReputationBar"..i.."ReputationBarHighlight1"]:SetTexture(0,0,0,0) - _G["ReputationBar"..i.."ReputationBarHighlight2"]:SetTexture(0,0,0,0) - _G["ReputationBar"..i.."ReputationBarAtWarHighlight1"]:SetTexture(0,0,0,0) - _G["ReputationBar"..i.."ReputationBarAtWarHighlight2"]:SetTexture(0,0,0,0) - _G["ReputationBar"..i.."ReputationBarLeftTexture"]:SetTexture(0,0,0,0) - _G["ReputationBar"..i.."ReputationBarRightTexture"]:SetTexture(0,0,0,0) - end - end -end ---[[ -########################################################## -CHARACTERFRAME STYLER -########################################################## -]]-- -local function CharacterFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.character ~= true then - return - end - - STYLE:ApplyWindowStyle(CharacterFrame, true) - - STYLE:ApplyCloseButtonStyle(CharacterFrameCloseButton) - STYLE:ApplyScrollFrameStyle(CharacterStatsPaneScrollBar) - STYLE:ApplyScrollFrameStyle(ReputationListScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(TokenFrameContainerScrollBar) - STYLE:ApplyScrollFrameStyle(GearManagerDialogPopupScrollFrameScrollBar) - - for _,slotName in pairs(CharacterSlotNames) do - local charSlot = _G["Character"..slotName] - local iconTex = _G["Character"..slotName.."IconTexture"] - local cd = _G["Character"..slotName.."Cooldown"] - charSlot:RemoveTextures() - charSlot:SetSlotTemplate(true) - charSlot.Panel:SetFrameLevel(charSlot.Panel:GetFrameLevel() + 1) - charSlot.ignoreTexture:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-LeaveItem-Transparent]]) - iconTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - iconTex:FillInner(charSlot, 0, 0) - if cd then - SV.Timers:AddCooldown(cd) - end - end - - local eqSlotListener = CreateFrame("Frame") - eqSlotListener:RegisterEvent("PLAYER_EQUIPMENT_CHANGED") - eqSlotListener:SetScript("OnEvent", StyleCharacterSlots) - - CharacterFrame:HookScript("OnShow", StyleCharacterSlots) - - StyleCharacterSlots() - - CharacterFrameExpandButton:Size(CharacterFrameExpandButton:GetWidth() - 7, CharacterFrameExpandButton:GetHeight() - 7) - STYLE:ApplyPaginationStyle(CharacterFrameExpandButton) - - hooksecurefunc('CharacterFrame_Collapse', function() - CharacterFrameExpandButton:SetNormalTexture(nil) - CharacterFrameExpandButton:SetPushedTexture(nil) - CharacterFrameExpandButton:SetDisabledTexture(nil) - SquareButton_SetIcon(CharacterFrameExpandButton, 'RIGHT') - end) - - hooksecurefunc('CharacterFrame_Expand', function() - CharacterFrameExpandButton:SetNormalTexture(nil) - CharacterFrameExpandButton:SetPushedTexture(nil) - CharacterFrameExpandButton:SetDisabledTexture(nil) - SquareButton_SetIcon(CharacterFrameExpandButton, 'LEFT') - end) - - if GetCVar("characterFrameCollapsed") ~= "0" then - SquareButton_SetIcon(CharacterFrameExpandButton, 'RIGHT') - else - SquareButton_SetIcon(CharacterFrameExpandButton, 'LEFT') - end - - STYLE:ApplyCloseButtonStyle(ReputationDetailCloseButton) - STYLE:ApplyCloseButtonStyle(TokenFramePopupCloseButton) - ReputationDetailAtWarCheckBox:SetCheckboxTemplate(true) - ReputationDetailMainScreenCheckBox:SetCheckboxTemplate(true) - ReputationDetailInactiveCheckBox:SetCheckboxTemplate(true) - ReputationDetailLFGBonusReputationCheckBox:SetCheckboxTemplate(true) - TokenFramePopupInactiveCheckBox:SetCheckboxTemplate(true) - TokenFramePopupBackpackCheckBox:SetCheckboxTemplate(true) - EquipmentFlyoutFrameHighlight:Die() - EquipmentFlyoutFrame:HookScript("OnShow", EquipmentFlyout_OnShow) - hooksecurefunc("EquipmentFlyout_Show", EquipmentFlyout_OnShow) - CharacterFramePortrait:Die() - STYLE:ApplyScrollFrameStyle(_G["PaperDollTitlesPaneScrollBar"], 5) - STYLE:ApplyScrollFrameStyle(_G["PaperDollEquipmentManagerPaneScrollBar"], 5) - for _,btn in pairs(CharFrameList)do - _G[btn]:RemoveTextures(true) - end - CharacterModelFrameBackgroundTopLeft:SetTexture(0,0,0,0) - CharacterModelFrameBackgroundTopRight:SetTexture(0,0,0,0) - CharacterModelFrameBackgroundBotLeft:SetTexture(0,0,0,0) - CharacterModelFrameBackgroundBotRight:SetTexture(0,0,0,0) - - CharacterModelFrame:SetFixedPanelTemplate("ModelComic") - CharacterFrameExpandButton:SetFrameLevel(CharacterModelFrame:GetFrameLevel() + 5) - - PaperDollTitlesPane:SetBasicPanel() - - PaperDollTitlesPane:HookScript("OnShow", function(f) - for _,btn in pairs(PaperDollTitlesPane.buttons)do - btn.BgTop:SetTexture(0,0,0,0) - btn.BgBottom:SetTexture(0,0,0,0) - btn.BgMiddle:SetTexture(0,0,0,0) - btn.Check:SetTexture(0,0,0,0) - btn.text:FillInner(btn) - btn.text:SetFont(SV.Media.font.roboto,10,"NONE","LEFT") - end - end) - - PaperDollEquipmentManagerPane:SetBasicPanel() - PaperDollEquipmentManagerPaneEquipSet:SetButtonTemplate() - PaperDollEquipmentManagerPaneSaveSet:SetButtonTemplate() - PaperDollEquipmentManagerPaneEquipSet:Width(PaperDollEquipmentManagerPaneEquipSet:GetWidth()-8) - PaperDollEquipmentManagerPaneSaveSet:Width(PaperDollEquipmentManagerPaneSaveSet:GetWidth()-8) - PaperDollEquipmentManagerPaneEquipSet:Point("TOPLEFT", PaperDollEquipmentManagerPane, "TOPLEFT", 8, 0) - PaperDollEquipmentManagerPaneSaveSet:Point("LEFT", PaperDollEquipmentManagerPaneEquipSet, "RIGHT", 4, 0) - PaperDollEquipmentManagerPaneEquipSet.ButtonBackground:SetTexture(0,0,0,0) - PaperDollEquipmentManagerPane:HookScript("OnShow", function(f) - for _,btn in pairs(PaperDollEquipmentManagerPane.buttons)do - btn.BgTop:SetTexture(0,0,0,0) - btn.BgBottom:SetTexture(0,0,0,0) - btn.BgMiddle:SetTexture(0,0,0,0) - btn.icon:Size(36, 36) - btn.Check:SetTexture(0,0,0,0) - btn.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - btn.icon:SetPoint("LEFT", btn, "LEFT", 4, 0) - if not btn.icon.bordertop then - SetItemFrame(btn, btn.icon) - end - end - GearManagerDialogPopup:RemoveTextures() - GearManagerDialogPopup:SetPanelTemplate("Inset", true) - GearManagerDialogPopup:Point("LEFT", PaperDollFrame, "RIGHT", 4, 0) - GearManagerDialogPopupScrollFrame:RemoveTextures() - GearManagerDialogPopupEditBox:RemoveTextures() - - GearManagerDialogPopupEditBox:SetBasicPanel() - - GearManagerDialogPopupOkay:SetButtonTemplate() - GearManagerDialogPopupCancel:SetButtonTemplate() - - for i = 1, NUM_GEARSET_ICONS_SHOWN do - local e = _G["GearManagerDialogPopupButton"..i] - local texture = e.icon; - if e then - e:RemoveTextures() - e:SetButtonTemplate() - texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G["GearManagerDialogPopupButton"..i.."Icon"]:SetTexture(0,0,0,0) - texture:FillInner() - e:SetFrameLevel(e:GetFrameLevel() + 2) - if not e.Panel then - e:SetPanelTemplate("Default") - e.Panel:SetAllPoints() - end - end - end - end) - - for i = 1, 4 do - STYLE:ApplyTabStyle(_G["CharacterFrameTab"..i]) - end - - hooksecurefunc("PaperDollFrame_UpdateSidebarTabs", PaperDoll_UpdateTabs) - - for i = 1, 7 do - local category = _G["CharacterStatsPaneCategory"..i] - if(category) then - category:RemoveTextures() - category:SetButtonTemplate() - end - end - - ReputationFrame:RemoveTextures(true) - ReputationListScrollFrame:RemoveTextures() - ReputationDetailFrame:RemoveTextures() - ReputationDetailFrame:SetPanelTemplate("Inset", true) - ReputationDetailFrame:Point("TOPLEFT", ReputationFrame, "TOPRIGHT", 4, -28) - ReputationFrame:HookScript("OnShow", Reputation_OnShow) - hooksecurefunc("ExpandFactionHeader", Reputation_OnShow) - hooksecurefunc("CollapseFactionHeader", Reputation_OnShow) - TokenFrameContainer:SetBasicPanel() - - TokenFrame:HookScript("OnShow", function() - for i = 1, GetCurrencyListSize() do - local currency = _G["TokenFrameContainerButton"..i] - if(currency) then - currency.highlight:Die() - currency.categoryMiddle:Die() - currency.categoryLeft:Die() - currency.categoryRight:Die() - if currency.icon then - currency.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - end - end - TokenFramePopup:RemoveTextures() - TokenFramePopup:SetPanelTemplate("Inset", true) - TokenFramePopup:Point("TOPLEFT", TokenFrame, "TOPRIGHT", 4, -28) - end) - PetModelFrame:SetPanelTemplate("Comic",false,1,-7,-7) - PetPaperDollPetInfo:GetRegions():SetTexCoord(.12, .63, .15, .55) - PetPaperDollPetInfo:SetFrameLevel(PetPaperDollPetInfo:GetFrameLevel() + 10) - PetPaperDollPetInfo:SetPanelTemplate("Slot") - PetPaperDollPetInfo.Panel:SetFrameLevel(0) - PetPaperDollPetInfo:Size(24, 24) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(CharacterFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua deleted file mode 100644 index 5f11298..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua +++ /dev/null @@ -1,481 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -FRAME LISTS -########################################################## -]]-- -local ChatMenuList = { - "ChatMenu", - "EmoteMenu", - "LanguageMenu", - "VoiceMacroMenu", -}; -local ChatFrameList1 = { - "ChatConfigFrame", - "ChatConfigBackgroundFrame", - "ChatConfigCategoryFrame", - "ChatConfigChatSettingsClassColorLegend", - "ChatConfigChatSettingsLeft", - "ChatConfigChannelSettingsLeft", - "ChatConfigChannelSettingsClassColorLegend", - "ChatConfigOtherSettingsCombat", - "ChatConfigOtherSettingsPVP", - "ChatConfigOtherSettingsSystem", - "ChatConfigOtherSettingsCreature", - "ChatConfigCombatSettingsFilters", - "CombatConfigMessageSourcesDoneBy", - "CombatConfigMessageSourcesDoneTo", - "CombatConfigColorsUnitColors", - "CombatConfigColorsHighlighting", - "CombatConfigColorsColorizeUnitName", - "CombatConfigColorsColorizeSpellNames", - "CombatConfigColorsColorizeDamageNumber", - "CombatConfigColorsColorizeDamageSchool", - "CombatConfigColorsColorizeEntireLine", -}; -local ChatFrameList2 = { - "ChatConfigFrameDefaultButton", - "ChatConfigFrameOkayButton", - "CombatLogDefaultButton", - "ChatConfigCombatSettingsFiltersCopyFilterButton", - "ChatConfigCombatSettingsFiltersAddFilterButton", - "ChatConfigCombatSettingsFiltersDeleteButton", - "CombatConfigSettingsSaveButton", - "ChatConfigFrameCancelButton", -}; -local ChatFrameList3 = { - "ChatConfigCategoryFrame", - "ChatConfigBackgroundFrame", - "ChatConfigChatSettingsClassColorLegend", - "ChatConfigChannelSettingsClassColorLegend", - "ChatConfigCombatSettingsFilters", - "ChatConfigCombatSettingsFiltersScrollFrame", - "CombatConfigColorsHighlighting", - "CombatConfigColorsColorizeUnitName", - "CombatConfigColorsColorizeSpellNames", - "CombatConfigColorsColorizeDamageNumber", - "CombatConfigColorsColorizeDamageSchool", - "CombatConfigColorsColorizeEntireLine", - "ChatConfigChatSettingsLeft", - "ChatConfigOtherSettingsCombat", - "ChatConfigOtherSettingsPVP", - "ChatConfigOtherSettingsSystem", - "ChatConfigOtherSettingsCreature", - "ChatConfigChannelSettingsLeft", - "CombatConfigMessageSourcesDoneBy", - "CombatConfigMessageSourcesDoneTo", - "CombatConfigColorsUnitColors", -}; -local ChatFrameList4 = { - "CombatConfigColorsColorizeSpellNames", - "CombatConfigColorsColorizeDamageNumber", - "CombatConfigColorsColorizeDamageSchool", - "CombatConfigColorsColorizeEntireLine", -}; -local ChatFrameList5 = { - "ChatConfigFrameOkayButton", - "ChatConfigFrameDefaultButton", - "CombatLogDefaultButton", - "ChatConfigCombatSettingsFiltersDeleteButton", - "ChatConfigCombatSettingsFiltersAddFilterButton", - "ChatConfigCombatSettingsFiltersCopyFilterButton", - "CombatConfigSettingsSaveButton", -}; -local ChatFrameList6 = { - "CombatConfigColorsHighlightingLine", - "CombatConfigColorsHighlightingAbility", - "CombatConfigColorsHighlightingDamage", - "CombatConfigColorsHighlightingSchool", - "CombatConfigColorsColorizeUnitNameCheck", - "CombatConfigColorsColorizeSpellNamesCheck", - "CombatConfigColorsColorizeSpellNamesSchoolColoring", - "CombatConfigColorsColorizeDamageNumberCheck", - "CombatConfigColorsColorizeDamageNumberSchoolColoring", - "CombatConfigColorsColorizeDamageSchoolCheck", - "CombatConfigColorsColorizeEntireLineCheck", - "CombatConfigFormattingShowTimeStamp", - "CombatConfigFormattingShowBraces", - "CombatConfigFormattingUnitNames", - "CombatConfigFormattingSpellNames", - "CombatConfigFormattingItemNames", - "CombatConfigFormattingFullText", - "CombatConfigSettingsShowQuickButton", - "CombatConfigSettingsSolo", - "CombatConfigSettingsParty", - "CombatConfigSettingsRaid", -}; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local ChatGeneric_OnShow = function(self) - if(not self.Panel) then - self:SetPanelTemplate("Halftone") - end -end - -local ChatMenu_OnShow = function(self) - if(not self.Panel) then - self:SetPanelTemplate("Halftone") - end - self:ClearAllPoints() - self:Point("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 30) -end - -local ChatConfigChannelSettingsLeft_OnEvent = function(self) - local checkBoxTable = self.checkBoxTable; - local checkBoxNameString = "ChatConfigChannelSettingsLeftCheckBox"; - local boxHeight = ChatConfigOtherSettingsCombatCheckBox1:GetHeight() or 20 - local colorsHeight = ChatConfigChatSettingsLeftCheckBox1Check:GetHeight() or 20 - for i = 1,#checkBoxTable do - local gName = ("ChatConfigChannelSettingsLeftCheckBox%d"):format(i) - local checkbox = _G[gName] - if(checkbox) then - if(not checkbox.Panel) then - checkbox:RemoveTextures() - checkbox:SetBasicPanel() - end - checkbox:SetHeight(boxHeight) - checkbox.Panel:Point("TOPLEFT",3,-1) - checkbox.Panel:Point("BOTTOMRIGHT",-3,1) - - local check = _G[("%sCheck"):format(gName)] - if(check) then - check:SetCheckboxTemplate(true) - end - - local colors = _G[("%sColorClasses"):format(gName)] - if(colors) then - colors:SetCheckboxTemplate(true) - colors:SetHeight(colorsHeight) - end - end - end -end - -local ChatConfigBackgroundFrame_OnShow = function(self) - local gName, checkbox, check, colors - local boxHeight = ChatConfigOtherSettingsCombatCheckBox1:GetHeight() or 20 - local colorsHeight = ChatConfigChatSettingsLeftCheckBox1Check:GetHeight() or 20 - - for i = 1, #CHAT_CONFIG_CHAT_LEFT do - gName = ("ChatConfigChatSettingsLeftCheckBox%d"):format(i) - checkbox = _G[gName] - if(checkbox) then - if(not checkbox.Panel) then - checkbox:RemoveTextures() - checkbox:SetPanelTemplate("Default") - end - checkbox.Panel:Point("TOPLEFT", 3, -1) - checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) - checkbox:SetHeight(boxHeight) - - check = _G[("%sCheck"):format(gName)] - if(check) then - check:SetCheckboxTemplate(true) - end - - colors = _G[("%sColorClasses"):format(gName)] - if(colors) then - colors:SetCheckboxTemplate(true) - colors:SetHeight(colorsHeight) - end - end - end - for i = 1, #CHAT_CONFIG_OTHER_COMBAT do - gName = ("ChatConfigOtherSettingsCombatCheckBox%d"):format(i) - checkbox = _G[gName] - if(checkbox) then - if(not checkbox.Panel) then - checkbox:RemoveTextures() - checkbox:SetPanelTemplate("Default") - end - checkbox.Panel:Point("TOPLEFT", 3, -1) - checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) - - check = _G[("%sCheck"):format(gName)] - if(check) then - check:SetCheckboxTemplate(true) - end - end - end - for i = 1, #CHAT_CONFIG_OTHER_PVP do - gName = ("ChatConfigOtherSettingsPVPCheckBox%d"):format(i) - checkbox = _G[gName] - if(checkbox) then - if(not checkbox.Panel) then - checkbox:RemoveTextures() - checkbox:SetPanelTemplate("Default") - end - checkbox.Panel:Point("TOPLEFT", 3, -1) - checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) - - check = _G[("%sCheck"):format(gName)] - if(check) then - check:SetCheckboxTemplate(true) - end - end - end - for i = 1, #CHAT_CONFIG_OTHER_SYSTEM do - gName = ("ChatConfigOtherSettingsSystemCheckBox%d"):format(i) - checkbox = _G[gName] - if(checkbox) then - if(not checkbox.Panel) then - checkbox:RemoveTextures() - checkbox:SetPanelTemplate("Default") - end - checkbox.Panel:Point("TOPLEFT", 3, -1) - checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) - - check = _G[("%sCheck"):format(gName)] - if(check) then - check:SetCheckboxTemplate(true) - end - end - end - for i = 1, #CHAT_CONFIG_CHAT_CREATURE_LEFT do - gName = ("ChatConfigOtherSettingsCreatureCheckBox%d"):format(i) - checkbox = _G[gName] - if(checkbox) then - if(not checkbox.Panel) then - checkbox:RemoveTextures() - checkbox:SetPanelTemplate("Default") - end - checkbox.Panel:Point("TOPLEFT", 3, -1) - checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) - - check = _G[("%sCheck"):format(gName)] - if(check) then - check:SetCheckboxTemplate(true) - end - end - end - for i = 1, #COMBAT_CONFIG_MESSAGESOURCES_BY do - gName = ("CombatConfigMessageSourcesDoneByCheckBox%d"):format(i) - checkbox = _G[gName] - if(checkbox) then - if(not checkbox.Panel) then - checkbox:RemoveTextures() - checkbox:SetPanelTemplate("Default") - end - checkbox.Panel:Point("TOPLEFT", 3, -1) - checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) - - check = _G[("%sCheck"):format(gName)] - if(check) then - check:SetCheckboxTemplate(true) - end - end - end - for i = 1, #COMBAT_CONFIG_MESSAGESOURCES_TO do - gName = ("CombatConfigMessageSourcesDoneToCheckBox%d"):format(i) - checkbox = _G[gName] - if(checkbox) then - if(not checkbox.Panel) then - checkbox:RemoveTextures() - checkbox:SetPanelTemplate("Default") - end - checkbox.Panel:Point("TOPLEFT", 3, -1) - checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) - - check = _G[("%sCheck"):format(gName)] - if(check) then - check:SetCheckboxTemplate(true) - end - end - end - for i = 1, #COMBAT_CONFIG_UNIT_COLORS do - gName = ("CombatConfigColorsUnitColorsSwatch%d"):format(i) - checkbox = _G[gName] - if(checkbox) then - if(not checkbox.Panel) then - checkbox:RemoveTextures() - checkbox:SetPanelTemplate("Default") - end - checkbox.Panel:Point("TOPLEFT", 3, -1) - checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) - end - end - for i = 1, 4 do - gName = ("CombatConfigMessageTypesLeftCheckBox%d"):format(i) - for j = 1, 4 do - local gName2 = ("%s_%d"):format(gName, j) - if(_G[gName] and _G[gName2]) then - _G[gName]:SetCheckboxTemplate(true) - _G[gName2]:SetCheckboxTemplate(true) - end - end - - gName = ("CombatConfigMessageTypesRightCheckBox%d"):format(i) - for j = 1, 10 do - local gName2 = ("%s_%d"):format(gName, j) - if(_G[gName] and _G[gName2]) then - _G[gName]:SetCheckboxTemplate(true) - _G[gName2]:SetCheckboxTemplate(true) - end - end - - gName = ("CombatConfigMessageTypesMiscCheckBox%d"):format(i) - if(_G[gName]) then - _G[gName]:SetCheckboxTemplate(true) - end - end -end ---[[ -########################################################## -CHAT STYLER -########################################################## -]]-- -local function ChatStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.chat ~= true then - return - end - - for i = 1, #ChatMenuList do - local name = ChatMenuList[i] - local this = _G[name] - if(this) then - if(name == "ChatMenu") then - this:HookScript("OnShow", ChatMenu_OnShow) - else - this:HookScript("OnShow", ChatGeneric_OnShow) - end - end - end - - for i = 1, #ChatFrameList1 do - local name = ChatFrameList1[i] - local this = _G[name] - if(this) then - this:RemoveTextures() - end - end - - for i = 1, #ChatFrameList2 do - local name = ChatFrameList2[i] - local this = _G[name] - if(this) then - this:SetButtonTemplate() - end - end - - ChatConfigFrameOkayButton:Point("RIGHT", ChatConfigFrameCancelButton, "RIGHT", -11, -1) - ChatConfigCombatSettingsFiltersDeleteButton:Point("TOPRIGHT", ChatConfigCombatSettingsFilters, "BOTTOMRIGHT", 0, -1) - ChatConfigCombatSettingsFiltersAddFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -1, 0) - ChatConfigCombatSettingsFiltersCopyFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersAddFilterButton, "LEFT", -1, 0) - - if(_G["CombatConfigTab1"]) then _G["CombatConfigTab1"]:RemoveTextures() end - if(_G["CombatConfigTab2"]) then _G["CombatConfigTab2"]:RemoveTextures() end - if(_G["CombatConfigTab3"]) then _G["CombatConfigTab3"]:RemoveTextures() end - if(_G["CombatConfigTab4"]) then _G["CombatConfigTab4"]:RemoveTextures() end - if(_G["CombatConfigTab5"]) then _G["CombatConfigTab5"]:RemoveTextures() end - - CombatConfigSettingsNameEditBox:SetEditboxTemplate() - ChatConfigFrame:SetPanelTemplate("Halftone", true) - - for i = 1, #ChatFrameList3 do - local frame = _G[ChatFrameList3[i]] - if(frame) then - frame:RemoveTextures() - frame:SetBasicPanel() - end - end - - for i = 1, #ChatFrameList4 do - local this = _G[ChatFrameList4[i]] - if(this) then - this:ClearAllPoints() - if this == CombatConfigColorsColorizeSpellNames then - this:Point("TOP",CombatConfigColorsColorizeUnitName,"BOTTOM",0,-2) - else - this:Point("TOP",_G[ChatFrameList4[i-1]],"BOTTOM",0,-2) - end - end - end - - ChatConfigChannelSettingsLeft:HookScript("OnShow", ChatConfigChannelSettingsLeft_OnEvent) - - CreateChatChannelList(ChatConfigChannelSettings, GetChannelList()) - ChatConfig_CreateCheckboxes(ChatConfigChannelSettingsLeft, CHAT_CONFIG_CHANNEL_LIST, "ChatConfigCheckBoxWithSwatchAndClassColorTemplate", CHANNELS) - ChatConfig_UpdateCheckboxes(ChatConfigChannelSettingsLeft) - - ChatConfigBackgroundFrame:SetScript("OnShow", ChatConfigBackgroundFrame_OnShow) - - for i = 1, #COMBAT_CONFIG_TABS do - local this = _G["CombatConfigTab"..i] - if(this) then - STYLE:ApplyTabStyle(this) - this:SetHeight(this:GetHeight()-2) - this:SetWidth(ceil(this:GetWidth()+1.6)) - _G["CombatConfigTab"..i.."Text"]:SetPoint("BOTTOM", 0, 10) - end - end - - CombatConfigTab1:ClearAllPoints() - CombatConfigTab1:SetPoint("BOTTOMLEFT", ChatConfigBackgroundFrame, "TOPLEFT", 6, -2) - - for i = 1, #ChatFrameList5 do - local this = _G[ChatFrameList5[i]] - if(this) then - this:SetButtonTemplate() - end - end - - ChatConfigFrameOkayButton:SetPoint("TOPRIGHT", ChatConfigBackgroundFrame, "BOTTOMRIGHT", -3, -5) - ChatConfigFrameDefaultButton:SetPoint("TOPLEFT", ChatConfigCategoryFrame, "BOTTOMLEFT", 1, -5) - CombatLogDefaultButton:SetPoint("TOPLEFT", ChatConfigCategoryFrame, "BOTTOMLEFT", 1, -5) - ChatConfigCombatSettingsFiltersDeleteButton:SetPoint("TOPRIGHT", ChatConfigCombatSettingsFilters, "BOTTOMRIGHT", -3, -1) - ChatConfigCombatSettingsFiltersCopyFilterButton:SetPoint("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -2, 0) - ChatConfigCombatSettingsFiltersAddFilterButton:SetPoint("RIGHT", ChatConfigCombatSettingsFiltersCopyFilterButton, "LEFT", -2, 0) - - for i = 1, #ChatFrameList6 do - local this = _G[ChatFrameList6[i]] - if(this) then - this:SetCheckboxTemplate(true) - end - end - - STYLE:ApplyPaginationStyle(ChatConfigMoveFilterUpButton,true) - STYLE:ApplyPaginationStyle(ChatConfigMoveFilterDownButton,true) - - ChatConfigMoveFilterUpButton:ClearAllPoints() - ChatConfigMoveFilterDownButton:ClearAllPoints() - ChatConfigMoveFilterUpButton:SetPoint("TOPLEFT",ChatConfigCombatSettingsFilters,"BOTTOMLEFT",3,0) - ChatConfigMoveFilterDownButton:SetPoint("LEFT",ChatConfigMoveFilterUpButton,24,0) - - CombatConfigSettingsNameEditBox:SetEditboxTemplate() - - ChatConfigFrame:Size(680,596) - ChatConfigFrameHeader:ClearAllPoints() - ChatConfigFrameHeader:SetPoint("TOP", ChatConfigFrame, "TOP", 0, -5) - - -- for i=1, select("#", GetChatWindowChannels(3)) do - -- local info = select(i, GetChatWindowChannels(3)) - -- print(info) - -- end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(ChatStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua deleted file mode 100644 index 0f6f3b5..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua +++ /dev/null @@ -1,51 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -DRESSUP STYLER -########################################################## -]]-- -local function DressUpStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.dressingroom ~= true then - return - end - - STYLE:ApplyWindowStyle(DressUpFrame, true, true) - - DressUpModel:ClearAllPoints() - DressUpModel:SetPoint("TOPLEFT", DressUpFrame, "TOPLEFT", 12, -76) - DressUpModel:SetPoint("BOTTOMRIGHT", DressUpFrame, "BOTTOMRIGHT", -12, 36) - - DressUpModel:SetFixedPanelTemplate("ModelComic") - - DressUpFrameCancelButton:Point("BOTTOMRIGHT", DressUpFrame, "BOTTOMRIGHT", -12, 12) - DressUpFrameCancelButton:SetButtonTemplate() - - DressUpFrameResetButton:Point("RIGHT", DressUpFrameCancelButton, "LEFT", -12, 0) - DressUpFrameResetButton:SetButtonTemplate() - - STYLE:ApplyCloseButtonStyle(DressUpFrameCloseButton, DressUpFrame.Panel) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(DressUpStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua deleted file mode 100644 index 3920bb7..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua +++ /dev/null @@ -1,229 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -ENCOUNTERJOURNAL STYLER -########################################################## -]]-- -local PVP_LOST = [[Interface\WorldMap\Skull_64Red]] - -local function Tab_OnEnter(this) - this.backdrop:SetPanelColor("highlight") - this.backdrop:SetBackdropBorderColor(0.1, 0.8, 0.8) -end - -local function Tab_OnLeave(this) - this.backdrop:SetPanelColor("dark") - this.backdrop:SetBackdropBorderColor(0,0,0,1) -end - -local function ChangeTabHelper(this, xOffset, yOffset) - this:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - this:GetNormalTexture():FillInner() - this.backdrop = CreateFrame("Frame", nil, this) - this.backdrop:FillInner(this) - - local level = this:GetFrameLevel() - if(level > 0) then - this.backdrop:SetFrameLevel(level - 1) - else - this.backdrop:SetFrameLevel(0) - end - - this.backdrop:SetPanelTemplate("Component", true) - this.backdrop:SetPanelColor("dark") - this:HookScript("OnEnter",Tab_OnEnter) - this:HookScript("OnLeave",Tab_OnLeave) - - local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = this:GetPoint() - this:Point(initialAnchor, anchorParent, relativeAnchor, xOffset or 7, yOffset or yPosition) -end - -local function Outline(frame, noHighlight) - if(frame.Outlined) then return; end - local offset = noHighlight and 30 or 5 - local mod = noHighlight and 50 or 5 - - local panel = CreateFrame('Frame', nil, frame) - panel:Point('TOPLEFT', frame, 'TOPLEFT', 1, -1) - panel:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', -1, 1) - - --[[ UNDERLAY BORDER ]]-- - local borderLeft = panel:CreateTexture(nil, "BORDER") - borderLeft:SetTexture(0, 0, 0) - borderLeft:SetPoint("TOPLEFT") - borderLeft:SetPoint("BOTTOMLEFT") - borderLeft:SetWidth(offset) - - local borderRight = panel:CreateTexture(nil, "BORDER") - borderRight:SetTexture(0, 0, 0) - borderRight:SetPoint("TOPRIGHT") - borderRight:SetPoint("BOTTOMRIGHT") - borderRight:SetWidth(offset) - - local borderTop = panel:CreateTexture(nil, "BORDER") - borderTop:SetTexture(0, 0, 0) - borderTop:SetPoint("TOPLEFT") - borderTop:SetPoint("TOPRIGHT") - borderTop:SetHeight(mod) - - local borderBottom = panel:CreateTexture(nil, "BORDER") - borderBottom:SetTexture(0, 0, 0) - borderBottom:SetPoint("BOTTOMLEFT") - borderBottom:SetPoint("BOTTOMRIGHT") - borderBottom:SetHeight(mod) - - if(not noHighlight) then - local highlight = frame:CreateTexture(nil, "HIGHLIGHT") - highlight:SetTexture(0, 1, 1, 0.35) - highlight:SetAllPoints(panel) - end - - frame.Outlined = true -end - -local function EncounterJournalStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.encounterjournal ~= true then - return - end - - EncounterJournal:RemoveTextures(true) - EncounterJournalInstanceSelect:RemoveTextures(true) - EncounterJournalNavBar:RemoveTextures(true) - EncounterJournalNavBarOverlay:RemoveTextures(true) - EncounterJournalNavBarHomeButton:RemoveTextures(true) - EncounterJournalInset:RemoveTextures(true) - - EncounterJournalEncounterFrame:RemoveTextures(true) - EncounterJournalEncounterFrameInfo:RemoveTextures(true) - EncounterJournalEncounterFrameInfoDifficulty:RemoveTextures(true) - EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:RemoveTextures(true) - EncounterJournalEncounterFrameInfoBossesScrollFrame:RemoveTextures(true) - EncounterJournalInstanceSelectDungeonTab:RemoveTextures(true) - EncounterJournalInstanceSelectRaidTab:RemoveTextures(true) - ChangeTabHelper(EncounterJournalEncounterFrameInfoBossTab) - ChangeTabHelper(EncounterJournalEncounterFrameInfoLootTab, 0, -10) - - EncounterJournalSearchResults:RemoveTextures(true) - - EncounterJournal:SetPanelTemplate("Action") - EncounterJournal:SetPanelColor("dark") - EncounterJournalInset:SetFixedPanelTemplate("Inset") - - EncounterJournalInstanceSelectScrollFrameScrollChild:SetFixedPanelTemplate("Default") - EncounterJournalInstanceSelectScrollFrameScrollChild:SetPanelColor("dark") - - EncounterJournalEncounterFrameInstanceFrame:SetFixedPanelTemplate("Inset") - - local comicHolder = CreateFrame('Frame', nil, EncounterJournal.encounter) - comicHolder:SetPoint("TOPLEFT", EncounterJournalEncounterFrameInfoBossesScrollFrame, "TOPLEFT", -20, 40) - comicHolder:SetPoint("BOTTOMRIGHT", EncounterJournalEncounterFrameInfoBossesScrollFrame, "BOTTOMRIGHT", 0, 0) - comicHolder:SetPanelTemplate("Comic") - comicHolder:SetPanelColor("dark") - EncounterJournal.encounter.info.encounterTitle:SetParent(comicHolder) - EncounterJournal.searchResults.TitleText:SetParent(comicHolder) - - EncounterJournalNavBarHomeButton:SetButtonTemplate() - EncounterJournalEncounterFrameInfoDifficulty:SetButtonTemplate() - EncounterJournalEncounterFrameInfoDifficulty:SetFrameLevel(EncounterJournalEncounterFrameInfoDifficulty:GetFrameLevel() + 10) - EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:SetButtonTemplate() - EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:SetFrameLevel(EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:GetFrameLevel() + 10) - - EncounterJournalInstanceSelectDungeonTab:SetButtonTemplate() - EncounterJournalInstanceSelectRaidTab:SetButtonTemplate() - - STYLE:ApplyScrollBarStyle(EncounterJournalEncounterFrameInfoLootScrollBar) - - local bgParent = EncounterJournal.encounter.instance - local loreParent = EncounterJournal.encounter.instance.loreScroll - - bgParent.loreBG:SetPoint("TOPLEFT", bgParent, "TOPLEFT", 0, 0) - bgParent.loreBG:SetPoint("BOTTOMRIGHT", bgParent, "BOTTOMRIGHT", 0, 90) - - loreParent:SetPanelTemplate("Pattern", true, 1, 1, 5) - loreParent:SetPanelColor("dark") - loreParent.child.lore:SetTextColor(1, 1, 1) - EncounterJournal.encounter.infoFrame.description:SetTextColor(1, 1, 1) - - loreParent:SetFrameLevel(loreParent:GetFrameLevel() + 10) - - local frame = EncounterJournal.instanceSelect.scroll.child - local index = 1 - local instanceButton = frame["instance"..index]; - while instanceButton do - Outline(instanceButton) - index = index + 1; - instanceButton = frame["instance"..index] - end - - hooksecurefunc("EncounterJournal_ListInstances", function() - local frame = EncounterJournal.instanceSelect.scroll.child - local index = 1 - local instanceButton = frame["instance"..index]; - while instanceButton do - Outline(instanceButton) - index = index + 1; - instanceButton = frame["instance"..index] - end - end) - - EncounterJournal.instanceSelect.raidsTab:GetFontString():SetTextColor(1, 1, 1); - hooksecurefunc("EncounterJournal_ToggleHeaders", function() - local usedHeaders = EncounterJournal.encounter.usedHeaders - for key,used in pairs(usedHeaders) do - if(not used.button.Panel) then - used:RemoveTextures(true) - used.button:RemoveTextures(true) - used.button:SetButtonTemplate() - end - used.description:SetTextColor(1, 1, 1) - used.button.portrait.icon:Hide() - end - end) - - hooksecurefunc("EncounterJournal_LootUpdate", function() - local scrollFrame = EncounterJournal.encounter.info.lootScroll; - local offset = HybridScrollFrame_GetOffset(scrollFrame); - local items = scrollFrame.buttons; - local item, index; - - local numLoot = EJ_GetNumLoot() - - for i = 1,#items do - item = items[i]; - index = offset + i; - if index <= numLoot then - item.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - if(not item.Panel) then - item:SetFixedPanelTemplate("Slot") - end - item.slot:SetTextColor(0.5, 1, 0) - item.armorType:SetTextColor(1, 1, 0) - item.boss:SetTextColor(0.7, 0.08, 0) - end - end - end) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle('Blizzard_EncounterJournal', EncounterJournalStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua deleted file mode 100644 index 5c8c50f..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua +++ /dev/null @@ -1,283 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local FrameSuffix = { - "LeftDisabled", - "MiddleDisabled", - "RightDisabled", - "Left", - "Middle", - "Right" -}; -local FriendsFrameList1 = { - "ScrollOfResurrectionSelectionFrame", - "ScrollOfResurrectionSelectionFrameList", - "FriendsListFrame", - "FriendsTabHeader", - "FriendsFrameFriendsScrollFrame", - "WhoFrameColumnHeader1", - "WhoFrameColumnHeader2", - "WhoFrameColumnHeader3", - "WhoFrameColumnHeader4", - "ChannelListScrollFrame", - "ChannelRoster", - "FriendsFramePendingButton1", - "FriendsFramePendingButton2", - "FriendsFramePendingButton3", - "FriendsFramePendingButton4", - "ChannelFrameDaughterFrame", - "AddFriendFrame", - "AddFriendNoteFrame" -}; --- local FriendsFrameList2 = { --- "FriendsFrameBroadcastInputLeft", --- "FriendsFrameBroadcastInputRight", --- "FriendsFrameBroadcastInputMiddle", --- "ChannelFrameDaughterFrameChannelNameLeft", --- "ChannelFrameDaughterFrameChannelNameRight", --- "ChannelFrameDaughterFrameChannelNameMiddle", --- "ChannelFrameDaughterFrameChannelPasswordLeft", --- "ChannelFrameDaughterFrameChannelPasswordRight", --- "ChannelFrameDaughterFrameChannelPasswordMiddle" --- }; -local FriendsFrameButtons = { - "FriendsFrameAddFriendButton", - "FriendsFrameSendMessageButton", - "WhoFrameWhoButton", - "WhoFrameAddFriendButton", - "WhoFrameGroupInviteButton", - "ChannelFrameNewButton", - "FriendsFrameIgnorePlayerButton", - "FriendsFrameUnsquelchButton", - "FriendsFramePendingButton1AcceptButton", - "FriendsFramePendingButton1DeclineButton", - "FriendsFramePendingButton2AcceptButton", - "FriendsFramePendingButton2DeclineButton", - "FriendsFramePendingButton3AcceptButton", - "FriendsFramePendingButton3DeclineButton", - "FriendsFramePendingButton4AcceptButton", - "FriendsFramePendingButton4DeclineButton", - "ChannelFrameDaughterFrameOkayButton", - "ChannelFrameDaughterFrameCancelButton", - "AddFriendEntryFrameAcceptButton", - "AddFriendEntryFrameCancelButton", - "AddFriendInfoFrameContinueButton", - "ScrollOfResurrectionSelectionFrameAcceptButton", - "ScrollOfResurrectionSelectionFrameCancelButton" -}; - -local function TabCustomHelper(this) - if not this then return end - for _,prop in pairs(FrameSuffix) do - local frame = _G[this:GetName()..prop] - frame:SetTexture(0,0,0,0) - end - this:GetHighlightTexture():SetTexture(0,0,0,0) - this.backdrop = CreateFrame("Frame", nil, this) - this.backdrop:SetFixedPanelTemplate("Default") - this.backdrop:SetFrameLevel(this:GetFrameLevel()-1) - this.backdrop:Point("TOPLEFT", 3, -8) - this.backdrop:Point("BOTTOMRIGHT", -6, 0) -end - -local function ChannelList_OnUpdate() - for i = 1, MAX_DISPLAY_CHANNEL_BUTTONS do - local btn = _G["ChannelButton"..i] - if btn then - btn:RemoveTextures() - btn:SetHighlightTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight") - _G["ChannelButton"..i.."Text"]:SetFontTemplate(nil, 12) - end - end -end ---[[ -########################################################## -FRIENDSFRAME STYLER -########################################################## -]]--FriendsFrameBattlenetFrameScrollFrame -local function FriendsFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.friends ~= true then - return - end - - STYLE:ApplyWindowStyle(FriendsFrame) - - STYLE:ApplyScrollFrameStyle(FriendsFrameFriendsScrollFrameScrollBar, 5) - STYLE:ApplyScrollFrameStyle(WhoListScrollFrameScrollBar, 5) - STYLE:ApplyScrollFrameStyle(ChannelRosterScrollFrameScrollBar, 5) - STYLE:ApplyScrollFrameStyle(FriendsFriendsScrollFrameScrollBar) - FriendsFrameInset:RemoveTextures() - WhoFrameListInset:RemoveTextures() - WhoFrameEditBoxInset:RemoveTextures() - STYLE:ApplyEditBoxStyle(WhoFrameEditBoxInset) - ChannelFrameRightInset:RemoveTextures() - ChannelFrameLeftInset:RemoveTextures() - ChannelFrameRightInset:SetFixedPanelTemplate("Inset", true) - ChannelFrameLeftInset:SetFixedPanelTemplate("Inset", true) - LFRQueueFrameListInset:RemoveTextures() - LFRQueueFrameRoleInset:RemoveTextures() - LFRQueueFrameCommentInset:RemoveTextures() - LFRQueueFrameListInset:SetFixedPanelTemplate("Inset", true) - FriendsFrameFriendsScrollFrame:SetBasicPanel() - FriendsFrameFriendsScrollFrame.Panel:Point("TOPRIGHT", -4, 0) - WhoFrameListInset:SetBasicPanel() - - for c, e in pairs(FriendsFrameButtons)do - _G[e]:SetButtonTemplate() - end - - -- for c, texture in pairs(FriendsFrameList2)do - -- _G[texture]:Die() - -- end - - for c, V in pairs(FriendsFrameList1)do - _G[V]:RemoveTextures() - end - - for u = 1, FriendsFrame:GetNumRegions()do - local a1 = select(u, FriendsFrame:GetRegions()) - if a1:GetObjectType() == "Texture"then - a1:SetTexture(0,0,0,0) - a1:SetAlpha(0) - end - end - - FriendsFrameStatusDropDown:SetPoint('TOPLEFT', FriendsTabHeader, 'TOPLEFT', 0, -27) - STYLE:ApplyDropdownStyle(FriendsFrameStatusDropDown, 70) - FriendsFrameBattlenetFrame:RemoveTextures() - FriendsFrameBattlenetFrame:SetHeight(22) - FriendsFrameBattlenetFrame:SetPoint('TOPLEFT', FriendsFrameStatusDropDown, 'TOPRIGHT', 0, -1) - FriendsFrameBattlenetFrame:SetFixedPanelTemplate("Inset") - FriendsFrameBattlenetFrame:SetBackdropColor(0,0,0,0.8) - - -- FriendsFrameBattlenetFrame.BroadcastButton:GetNormalTexture():SetTexCoord(.28, .72, .28, .72) - -- FriendsFrameBattlenetFrame.BroadcastButton:GetPushedTexture():SetTexCoord(.28, .72, .28, .72) - -- FriendsFrameBattlenetFrame.BroadcastButton:GetHighlightTexture():SetTexCoord(.28, .72, .28, .72) - FriendsFrameBattlenetFrame.BroadcastButton:RemoveTextures() - FriendsFrameBattlenetFrame.BroadcastButton:SetSize(22,22) - FriendsFrameBattlenetFrame.BroadcastButton:SetPoint('TOPLEFT', FriendsFrameBattlenetFrame, 'TOPRIGHT', 8, 0) - FriendsFrameBattlenetFrame.BroadcastButton:SetButtonTemplate() - FriendsFrameBattlenetFrame.BroadcastButton:SetBackdropColor(0.4,0.4,0.4) - FriendsFrameBattlenetFrame.BroadcastButton:SetNormalTexture([[Interface\FriendsFrame\UI-Toast-BroadcastIcon]]) - FriendsFrameBattlenetFrame.BroadcastButton:SetPushedTexture([[Interface\FriendsFrame\UI-Toast-BroadcastIcon]]) - FriendsFrameBattlenetFrame.BroadcastButton:SetScript('OnClick', function() - SV:StaticPopup_Show("SET_BN_BROADCAST") - end) - FriendsFrameBattlenetFrame.Tag:SetFontTemplate(SV.Media.font.narrator,16,"NONE") - AddFriendNameEditBox:SetEditboxTemplate() - AddFriendFrame:SetFixedPanelTemplate("Transparent", true) - ScrollOfResurrectionSelectionFrame:SetFixedPanelTemplate('Transparent') - ScrollOfResurrectionSelectionFrameList:SetFixedPanelTemplate('Default') - STYLE:ApplyScrollFrameStyle(ScrollOfResurrectionSelectionFrameListScrollFrameScrollBar, 4) - ScrollOfResurrectionSelectionFrameTargetEditBox:SetEditboxTemplate() - FriendsFrameBroadcastInput:SetPanelTemplate("Default") - ChannelFrameDaughterFrameChannelName:SetPanelTemplate("Default") - ChannelFrameDaughterFrameChannelPassword:SetPanelTemplate("Default") - - ChannelFrame:HookScript("OnShow", function() - ChannelRosterScrollFrame:RemoveTextures() - end) - - hooksecurefunc("FriendsFrame_OnEvent", function() - ChannelRosterScrollFrame:RemoveTextures() - end) - - WhoFrame:HookScript("OnShow", function() - ChannelRosterScrollFrame:RemoveTextures() - end) - - hooksecurefunc("FriendsFrame_OnEvent", function() - WhoListScrollFrame:RemoveTextures() - end) - - ChannelFrameDaughterFrame:SetBasicPanel() - STYLE:ApplyCloseButtonStyle(ChannelFrameDaughterFrameDetailCloseButton, ChannelFrameDaughterFrame) - STYLE:ApplyCloseButtonStyle(FriendsFrameCloseButton, FriendsFrame.Panel) - STYLE:ApplyDropdownStyle(WhoFrameDropDown, 150) - - for i = 1, 4 do - STYLE:ApplyTabStyle(_G["FriendsFrameTab"..i]) - end - - for i = 1, 3 do - TabCustomHelper(_G["FriendsTabHeaderTab"..i]) - end - - hooksecurefunc("ChannelList_Update", ChannelList_OnUpdate) - FriendsFriendsFrame:SetBasicPanel() - - _G["FriendsFriendsFrame"]:RemoveTextures() - _G["FriendsFriendsList"]:RemoveTextures() - _G["FriendsFriendsNoteFrame"]:RemoveTextures() - - _G["FriendsFriendsSendRequestButton"]:SetButtonTemplate() - _G["FriendsFriendsCloseButton"]:SetButtonTemplate() - - FriendsFriendsList:SetEditboxTemplate() - FriendsFriendsNoteFrame:SetEditboxTemplate() - STYLE:ApplyDropdownStyle(FriendsFriendsFrameDropDown, 150) - BNConversationInviteDialog:RemoveTextures() - BNConversationInviteDialog:SetPanelTemplate('Transparent') - BNConversationInviteDialogList:RemoveTextures() - BNConversationInviteDialogList:SetFixedPanelTemplate('Default') - BNConversationInviteDialogInviteButton:SetButtonTemplate() - BNConversationInviteDialogCancelButton:SetButtonTemplate() - for i = 1, BN_CONVERSATION_INVITE_NUM_DISPLAYED do - _G["BNConversationInviteDialogListFriend"..i].checkButton:SetCheckboxTemplate(true) - end - FriendsTabHeaderSoRButton:SetFixedPanelTemplate('Default') - FriendsTabHeaderSoRButton:SetButtonTemplate() - FriendsTabHeaderSoRButtonIcon:SetDrawLayer('OVERLAY') - FriendsTabHeaderSoRButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - FriendsTabHeaderSoRButtonIcon:FillInner() - FriendsTabHeaderSoRButton:Point('TOPRIGHT', FriendsTabHeader, 'TOPRIGHT', -8, -56) - FriendsTabHeaderRecruitAFriendButton:SetFixedPanelTemplate('Default') - FriendsTabHeaderRecruitAFriendButton:SetButtonTemplate() - FriendsTabHeaderRecruitAFriendButtonIcon:SetDrawLayer('OVERLAY') - FriendsTabHeaderRecruitAFriendButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - FriendsTabHeaderRecruitAFriendButtonIcon:FillInner() - - FriendsFrameIgnoreScrollFrame:SetFixedPanelTemplate("Inset") - STYLE:ApplyScrollFrameStyle(FriendsFrameIgnoreScrollFrameScrollBar, 4) - FriendsFramePendingScrollFrame:SetFixedPanelTemplate("Inset") - STYLE:ApplyScrollFrameStyle(FriendsFramePendingScrollFrameScrollBar, 4) - IgnoreListFrame:RemoveTextures() - PendingListFrame:RemoveTextures() - ScrollOfResurrectionFrame:RemoveTextures() - ScrollOfResurrectionFrameAcceptButton:SetButtonTemplate() - ScrollOfResurrectionFrameCancelButton:SetButtonTemplate() - ScrollOfResurrectionFrameTargetEditBoxLeft:SetTexture(0,0,0,0) - ScrollOfResurrectionFrameTargetEditBoxMiddle:SetTexture(0,0,0,0) - ScrollOfResurrectionFrameTargetEditBoxRight:SetTexture(0,0,0,0) - ScrollOfResurrectionFrameNoteFrame:RemoveTextures() - ScrollOfResurrectionFrameNoteFrame:SetFixedPanelTemplate() - ScrollOfResurrectionFrameTargetEditBox:SetFixedPanelTemplate() - ScrollOfResurrectionFrame:SetFixedPanelTemplate('Transparent') -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(FriendsFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua deleted file mode 100644 index d45542a..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua +++ /dev/null @@ -1,67 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -GOSSIP STYLER -########################################################## -]]-- -local function GossipStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.gossip ~= true then return end - ItemTextFrame:RemoveTextures(true) - ItemTextScrollFrame:RemoveTextures() - STYLE:ApplyCloseButtonStyle(GossipFrameCloseButton) - STYLE:ApplyPaginationStyle(ItemTextPrevPageButton) - STYLE:ApplyPaginationStyle(ItemTextNextPageButton) - ItemTextPageText:SetTextColor(1, 1, 1) - hooksecurefunc(ItemTextPageText, "SetTextColor", function(q, k, l, m) - if k ~= 1 or l ~= 1 or m ~= 1 then - ItemTextPageText:SetTextColor(1, 1, 1) - end - end) - ItemTextFrame:SetPanelTemplate("Pattern") - ItemTextFrameInset:Die() - STYLE:ApplyScrollFrameStyle(ItemTextScrollFrameScrollBar) - STYLE:ApplyCloseButtonStyle(ItemTextFrameCloseButton) - local r = {"GossipFrameGreetingPanel", "GossipFrame", "GossipFrameInset", "GossipGreetingScrollFrame"} - STYLE:ApplyScrollFrameStyle(GossipGreetingScrollFrameScrollBar, 5) - for s, t in pairs(r)do - _G[t]:RemoveTextures() - end - GossipFrame:SetPanelTemplate("Halftone") - GossipGreetingScrollFrame:SetFixedPanelTemplate("Inset", true) - GossipGreetingScrollFrame.spellTex = GossipGreetingScrollFrame:CreateTexture(nil, "ARTWORK") - GossipGreetingScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) - GossipGreetingScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2) - GossipGreetingScrollFrame.spellTex:Size(506, 615) - GossipGreetingScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) - _G["GossipFramePortrait"]:Die() - _G["GossipFrameGreetingGoodbyeButton"]:RemoveTextures() - _G["GossipFrameGreetingGoodbyeButton"]:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(GossipFrameCloseButton, GossipFrame.Panel) - NPCFriendshipStatusBar:RemoveTextures() - NPCFriendshipStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - NPCFriendshipStatusBar:SetPanelTemplate("Default") -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(GossipStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua deleted file mode 100644 index 6d1c9c0..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua +++ /dev/null @@ -1,699 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local format = string.format; -local internalTest = false; - -local GuildFrameList = { - "GuildNewPerksFrame", - "GuildFrameInset", - "GuildFrameBottomInset", - "GuildAllPerksFrame", - "GuildMemberDetailFrame", - "GuildMemberNoteBackground", - "GuildInfoFrameInfo", - "GuildLogContainer", - "GuildLogFrame", - "GuildRewardsFrame", - "GuildMemberOfficerNoteBackground", - "GuildTextEditContainer", - "GuildTextEditFrame", - "GuildRecruitmentRolesFrame", - "GuildRecruitmentAvailabilityFrame", - "GuildRecruitmentInterestFrame", - "GuildRecruitmentLevelFrame", - "GuildRecruitmentCommentFrame", - "GuildRecruitmentCommentInputFrame", - "GuildInfoFrameApplicantsContainer", - "GuildInfoFrameApplicants", - "GuildNewsBossModel", - "GuildNewsBossModelTextFrame" -}; - -local GuildButtonList = { - "GuildPerksToggleButton", - "GuildMemberRemoveButton", - "GuildMemberGroupInviteButton", - "GuildAddMemberButton", - "GuildViewLogButton", - "GuildControlButton", - "GuildRecruitmentListGuildButton", - "GuildTextEditFrameAcceptButton", - "GuildRecruitmentInviteButton", - "GuildRecruitmentMessageButton", - "GuildRecruitmentDeclineButton" -}; - -local GuildCheckBoxList = { - "GuildRecruitmentQuestButton", - "GuildRecruitmentDungeonButton", - "GuildRecruitmentRaidButton", - "GuildRecruitmentPvPButton", - "GuildRecruitmentRPButton", - "GuildRecruitmentWeekdaysButton", - "GuildRecruitmentWeekendsButton", - "GuildRecruitmentLevelAnyButton", - "GuildRecruitmentLevelMaxButton" -}; - -local CalendarIconList = { - [CALENDAR_EVENTTYPE_PVP] = "Interface\\Calendar\\UI-Calendar-Event-PVP", - [CALENDAR_EVENTTYPE_MEETING] = "Interface\\Calendar\\MeetingIcon", - [CALENDAR_EVENTTYPE_OTHER] = "Interface\\Calendar\\UI-Calendar-Event-Other" -}; - -local LFGFrameList = { - "LookingForGuildPvPButton", - "LookingForGuildWeekendsButton", - "LookingForGuildWeekdaysButton", - "LookingForGuildRPButton", - "LookingForGuildRaidButton", - "LookingForGuildQuestButton", - "LookingForGuildDungeonButton" -}; - -local function GCTabHelper(tab) - tab.Panel:Hide() - tab.bg1 = tab:CreateTexture(nil,"BACKGROUND") - tab.bg1:SetDrawLayer("BACKGROUND",4) - tab.bg1:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - tab.bg1:SetVertexColor(unpack(SV.Media.color.default)) - tab.bg1:FillInner(tab.Panel,1) - tab.bg3 = tab:CreateTexture(nil,"BACKGROUND") - tab.bg3:SetDrawLayer("BACKGROUND",2) - tab.bg3:SetTexture(0,0,0,1) - tab.bg3:SetAllPoints(tab.Panel) -end - -local RankOrder_OnUpdate = function() - for b=1,GuildControlGetNumRanks()do - local frame = _G["GuildControlUIRankOrderFrameRank"..b] - if frame then - frame.downButton:SetButtonTemplate() - frame.upButton:SetButtonTemplate() - frame.deleteButton:SetButtonTemplate() - if not frame.nameBox.Panel then - frame.nameBox:SetEditboxTemplate() - end - frame.nameBox.Panel:Point("TOPLEFT",-2,-4) - frame.nameBox.Panel:Point("BOTTOMRIGHT",-4,4) - end - end -end - -function GuildInfoEvents_SetButton(button, eventIndex) - local dateData = date("*t") - local month, day, weekday, hour, minute, eventType, title, calendarType, textureName = CalendarGetGuildEventInfo(eventIndex) - local formattedTime = GameTime_GetFormattedTime(hour, minute, true) - local unformattedText; - if dateData["day"] == day and dateData["month"] == month then - unformattedText = NORMAL_FONT_COLOR_CODE..GUILD_EVENT_TODAY..FONT_COLOR_CODE_CLOSE - else - local year = dateData["year"] - if month < dateData["month"] then - year = year + 1 - end - local newTime = time{year = year, month = month, day = day} - if(((newTime - time()) < 518400) and CALENDAR_WEEKDAY_NAMES[weekday]) then - unformattedText = CALENDAR_WEEKDAY_NAMES[weekday] - elseif CALENDAR_WEEKDAY_NAMES[weekday]and day and month then - unformattedText = format(GUILD_NEWS_DATE, CALENDAR_WEEKDAY_NAMES[weekday], day, month) - end - end - if button.text and unformattedText then - button.text:SetFormattedText(GUILD_EVENT_FORMAT, unformattedText, formattedTime, title) - end - button.index = eventIndex; - if button.icon.type ~= "event" then - button.icon.type = "event" - button.icon:SetTexCoord(0, 1, 0, 1) - button.icon:SetWidth(14) - button.icon:SetHeight(14) - end - if CalendarIconList[eventType] then - button.icon:SetTexture(CalendarIconList[eventType]) - else - button.icon:SetTexture("Interface\\LFGFrame\\LFGIcon-"..textureName) - end -end ---[[ -########################################################## -GUILDFRAME STYLERS -########################################################## -]]-- -local function GuildBankStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.gbank ~= true then - return - end - - STYLE:ApplyWindowStyle(GuildBankFrame) - - GuildBankEmblemFrame:RemoveTextures(true) - GuildBankMoneyFrameBackground:Die() - STYLE:ApplyScrollFrameStyle(GuildBankPopupScrollFrameScrollBar) - - for b = 1, GuildBankFrame:GetNumChildren() do - local c = select(b, GuildBankFrame:GetChildren()) - if c.GetPushedTexture and c:GetPushedTexture() and not c:GetName() then - STYLE:ApplyCloseButtonStyle(c) - end - end - - GuildBankFrameDepositButton:SetButtonTemplate() - GuildBankFrameWithdrawButton:SetButtonTemplate() - GuildBankInfoSaveButton:SetButtonTemplate() - GuildBankFramePurchaseButton:SetButtonTemplate() - GuildBankFrameWithdrawButton:Point("RIGHT", GuildBankFrameDepositButton, "LEFT", -2, 0) - GuildBankInfoScrollFrame:Point('TOPLEFT', GuildBankInfo, 'TOPLEFT', -10, 12) - GuildBankInfoScrollFrame:RemoveTextures() - GuildBankInfoScrollFrame:Width(GuildBankInfoScrollFrame:GetWidth()-8) - GuildBankTransactionsScrollFrame:RemoveTextures() - - for b = 1, NUM_GUILDBANK_COLUMNS do - if(_G["GuildBankColumn"..b]) then - _G["GuildBankColumn"..b]:RemoveTextures() - - for d = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do - local e = _G["GuildBankColumn"..b.."Button"..d] - local icon = _G["GuildBankColumn"..b.."Button"..d.."IconTexture"] - local texture = _G["GuildBankColumn"..b.."Button"..d.."NormalTexture"] - if texture then - texture:SetTexture(0,0,0,0) - end - e:SetSlotTemplate() - icon:FillInner() - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - end - end - - for b = 1, 8 do - local e = _G["GuildBankTab"..b.."Button"] - if(e) then - local texture = _G["GuildBankTab"..b.."ButtonIconTexture"] - _G["GuildBankTab"..b]:RemoveTextures(true) - e:RemoveTextures() - e:SetButtonTemplate() - e:SetFixedPanelTemplate("Default") - texture:FillInner() - texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - end - - for b = 1, 4 do - STYLE:ApplyTabStyle(_G["GuildBankFrameTab"..b]) - end - - hooksecurefunc('GuildBankFrame_Update', function() - if GuildBankFrame.mode ~= "bank" then - return - end - local f = GetCurrentGuildBankTab() - local e, g, h, i, j, k, l, m; - for b = 1, MAX_GUILDBANK_SLOTS_PER_TAB do - g = mod(b, NUM_SLOTS_PER_GUILDBANK_GROUP) - if g == 0 then - g = NUM_SLOTS_PER_GUILDBANK_GROUP - end - h = ceil((b-0.5)/NUM_SLOTS_PER_GUILDBANK_GROUP) - e = _G["GuildBankColumn"..h.."Button"..g] - i = GetGuildBankItemLink(f, b) - if i then - j = select(3, GetItemInfo(i)) - if j > 1 then - k, l, m = GetItemQualityColor(j) - else - k, l, m = 0,0,0,1 - end - else - k, l, m = 0,0,0,1 - end - e:SetBackdropBorderColor(k, l, m) - end - end) - - GuildBankPopupFrame:RemoveTextures() - GuildBankPopupScrollFrame:RemoveTextures() - GuildBankPopupFrame:SetFixedPanelTemplate("Transparent", true) - GuildBankPopupFrame:Point("TOPLEFT", GuildBankFrame, "TOPRIGHT", 1, -30) - GuildBankPopupOkayButton:SetButtonTemplate() - GuildBankPopupCancelButton:SetButtonTemplate() - GuildBankPopupEditBox:SetEditboxTemplate() - GuildBankPopupNameLeft:Die() - GuildBankPopupNameRight:Die() - GuildBankPopupNameMiddle:Die() - GuildItemSearchBox:RemoveTextures() - GuildItemSearchBox:SetPanelTemplate("Overlay") - GuildItemSearchBox.Panel:Point("TOPLEFT", 10, -1) - GuildItemSearchBox.Panel:Point("BOTTOMRIGHT", 4, 1) - - for b = 1, 16 do - local e = _G["GuildBankPopupButton"..b] - if(e) then - local icon = _G[e:GetName().."Icon"] - e:RemoveTextures() - e:SetFixedPanelTemplate("Default") - e:SetButtonTemplate() - icon:FillInner() - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - end - - STYLE:ApplyScrollFrameStyle(GuildBankTransactionsScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(GuildBankInfoScrollFrameScrollBar) -end - -local function GuildFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.guild ~= true then - return - end - - STYLE:ApplyWindowStyle(GuildFrame) - - STYLE:ApplyCloseButtonStyle(GuildMemberDetailCloseButton) - STYLE:ApplyCloseButtonStyle(GuildFrameCloseButton) - GuildRewardsFrameVisitText:ClearAllPoints() - GuildRewardsFrameVisitText:SetPoint("TOP", GuildRewardsFrame, "TOP", 0, 30) - - for i = 1, #GuildFrameList do - local frame = _G[GuildFrameList[i]] - if(frame) then - frame:RemoveTextures() - end - end - - for i = 1, #GuildButtonList do - local button = _G[GuildButtonList[i]] - if(button) then - button:RemoveTextures(true) - button:SetButtonTemplate() - end - end - - for i = 1, #GuildCheckBoxList do - local check = _G[GuildCheckBoxList[i]] - if(check) then check:SetCheckboxTemplate(true) end - end - - for i = 1, 5 do - local tab = _G["GuildFrameTab"..i] - if(tab) then - STYLE:ApplyTabStyle(tab) - if i == 1 then - tab:Point("TOPLEFT", GuildFrame, "BOTTOMLEFT", -10, 3) - end - end - end - - GuildNewsBossModel:SetBasicPanel() - GuildNewsBossModelTextFrame:SetPanelTemplate("Default") - GuildNewsBossModelTextFrame.Panel:Point("TOPLEFT", GuildNewsBossModel.Panel, "BOTTOMLEFT", 0, -1) - GuildNewsBossModel:SetPoint("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -43) - - GuildRecruitmentTankButton.checkButton:SetCheckboxTemplate(true) - GuildRecruitmentHealerButton.checkButton:SetCheckboxTemplate(true) - GuildRecruitmentDamagerButton.checkButton:SetCheckboxTemplate(true) - - GuildFactionBar:RemoveTextures() - GuildFactionBar.progress:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - GuildFactionBar:SetPanelTemplate("Inset") - GuildFactionBar.Panel:Point("TOPLEFT", GuildFactionBar.progress, "TOPLEFT", -1, 1) - GuildFactionBar.Panel:Point("BOTTOMRIGHT", GuildFactionBar, "BOTTOMRIGHT", 1, 1) - - if(SV.GameVersion < 60000) then - GuildLevelFrame:Die() - - GuildXPFrame:ClearAllPoints() - GuildXPFrame:Point("TOP", GuildFrame, "TOP", 0, -40) - - GuildXPBar:RemoveTextures() - GuildXPBar.progress:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - GuildXPBar:SetPanelTemplate("Inset") - GuildXPBar.Panel:Point("TOPLEFT", GuildXPBar, "TOPLEFT", -1, -3) - GuildXPBar.Panel:Point("BOTTOMRIGHT", GuildXPBar, "BOTTOMRIGHT", 0, 1) - end - - GuildLatestPerkButton:RemoveTextures() - GuildLatestPerkButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - GuildLatestPerkButtonIconTexture:ClearAllPoints() - GuildLatestPerkButtonIconTexture:Point("TOPLEFT", 2, -2) - GuildLatestPerkButton:SetPanelTemplate("Inset") - GuildLatestPerkButton.Panel:WrapOuter(GuildLatestPerkButtonIconTexture) - - GuildNextPerkButton:RemoveTextures() - GuildNextPerkButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - GuildNextPerkButtonIconTexture:ClearAllPoints() - GuildNextPerkButtonIconTexture:Point("TOPLEFT", 2, -2) - GuildNextPerkButton:SetPanelTemplate("Inset") - GuildNextPerkButton.Panel:WrapOuter(GuildNextPerkButtonIconTexture) - - GuildRosterContainer:SetBasicPanel(-2, 2, -1, -2) - STYLE:ApplyScrollFrameStyle(GuildRosterContainerScrollBar, 4, -4) - GuildRosterShowOfflineButton:SetCheckboxTemplate(true) - - for i = 1, 4 do - local btn = _G["GuildRosterColumnButton"..i] - if(btn) then - btn:RemoveTextures(true) - end - end - - STYLE:ApplyDropdownStyle(GuildRosterViewDropdown, 200) - - for i = 1, 14 do - local btn = _G["GuildRosterContainerButton"..i.."HeaderButton"] - if(btn) then - btn:RemoveTextures() - btn:SetButtonTemplate() - end - end - - GuildMemberDetailFrame:SetPanelTemplate("Default", true) - GuildMemberNoteBackground:SetBasicPanel() - GuildMemberOfficerNoteBackground:SetBasicPanel() - - GuildMemberRankDropdown:SetFrameLevel(GuildMemberRankDropdown:GetFrameLevel()+5) - STYLE:ApplyDropdownStyle(GuildMemberRankDropdown, 182) - GuildMemberRankDropdown.Panel:SetBackdropColor(0,0,0,1) - GuildNewsFrame:RemoveTextures() - GuildNewsContainer:SetBasicPanel(-2, 2, 0, -2) - - for i = 1, 17 do - local btn = _G["GuildNewsContainerButton"..i] - if(btn) then - if(btn.header) then btn.header:Die() end - btn:RemoveTextures() - btn:SetButtonTemplate() - end - end - - GuildNewsFiltersFrame:RemoveTextures() - GuildNewsFiltersFrame:SetFixedPanelTemplate("Transparent", true) - STYLE:ApplyCloseButtonStyle(GuildNewsFiltersFrameCloseButton) - - for i = 1, 7 do - local btn = _G["GuildNewsFilterButton"..i] - if(btn) then - btn:SetCheckboxTemplate(true) - end - end - - GuildNewsFiltersFrame:Point("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -20) - STYLE:ApplyScrollFrameStyle(GuildNewsContainerScrollBar, 4, 4) - STYLE:ApplyScrollFrameStyle(GuildInfoDetailsFrameScrollBar, 4, 4) - - for i = 1, 3 do - local tab = _G["GuildInfoFrameTab"..i] - if(tab) then - tab:RemoveTextures() - end - end - - local panel1 = CreateFrame("Frame", nil, GuildInfoFrameInfo) - panel1:SetPoint("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -22) - panel1:SetPoint("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 200) - panel1:SetBasicPanel() - - local panel2 = CreateFrame("Frame", nil, GuildInfoFrameInfo) - panel2:SetPoint("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -158) - panel2:SetPoint("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 118) - panel2:SetBasicPanel() - - local panel3 = CreateFrame("Frame", nil, GuildInfoFrameInfo) - panel3:SetPoint("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -233) - panel3:SetPoint("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 3) - panel3:SetBasicPanel() - - GuildRecruitmentCommentInputFrame:SetFixedPanelTemplate("Default") - GuildTextEditFrame:SetFixedPanelTemplate("Transparent", true) - STYLE:ApplyScrollFrameStyle(GuildTextEditScrollFrameScrollBar, 4, 4) - GuildTextEditContainer:SetFixedPanelTemplate("Default") - - local editChildren = GuildTextEditFrame:GetNumChildren() - - for i = 1, editChildren do - local child = select(i, GuildTextEditFrame:GetChildren()) - if(child:GetName() == "GuildTextEditFrameCloseButton") then - if(child:GetWidth() < 33) then - STYLE:ApplyCloseButtonStyle(child) - else - child:SetButtonTemplate() - end - end - end - - STYLE:ApplyScrollFrameStyle(GuildLogScrollFrameScrollBar, 4, 4) - GuildLogFrame:SetBasicPanel() - - local logChildren = GuildLogFrame:GetNumChildren() - - for i = 1, logChildren do - local child = select(i, GuildLogFrame:GetChildren()) - if child:GetName() == "GuildLogFrameCloseButton" then - if(child:GetWidth() < 33) then - STYLE:ApplyCloseButtonStyle(child) - else - child:SetButtonTemplate() - end - end - end - - GuildRewardsFrame:SetBasicPanel(2, 0, -22, 18) - STYLE:ApplyScrollFrameStyle(GuildRewardsContainerScrollBar, 4, -4) - - GuildNewPerksFrame:SetBasicPanel(-1, 0, 1, 0) - GuildPerksContainer:SetBasicPanel(-3, 0, 26, -3) - - STYLE:ApplyScrollFrameStyle(GuildPerksContainerScrollBar, 4, 2) - - for i = 1, 8 do - local button = _G["GuildPerksContainerButton"..i] - if button then - button:RemoveTextures() - if button.icon then - STYLE:ApplyItemButtonStyle(button, nil, true) - button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - button.icon:ClearAllPoints() - button.icon:Point("TOPLEFT", button, "TOPLEFT", 2, -2) - button.icon:SetParent(button.Panel) - end - end - end - - for i = 1, 8 do - local button = _G["GuildRewardsContainerButton"..i] - if button then - button:RemoveTextures() - if button.icon then - button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - button.icon:ClearAllPoints() - button.icon:Point("TOPLEFT", button, "TOPLEFT", 2, -2) - button:SetFixedPanelTemplate("Button") - button.Panel:WrapOuter(button.icon) - button.icon:SetParent(button.Panel) - end - end - end - - local maxCalendarEvents = CalendarGetNumGuildEvents(); - local scrollFrame = GuildInfoFrameApplicantsContainer; - local offset = HybridScrollFrame_GetOffset(scrollFrame); - local buttonIndex,counter = 0,0; - - for _,button in next, GuildInfoFrameApplicantsContainer.buttons do - counter = counter + 1; - buttonIndex = offset + counter; - button.selectedTex:Die() - button:GetHighlightTexture():Die() - button:SetBackdrop(nil) - end -end - -local function GuildControlStyle() - if SV.db[Schema].blizzard.enable~=true or SV.db[Schema].blizzard.guildcontrol~=true then return end - - GuildControlUI:RemoveTextures() - GuildControlUIHbar:RemoveTextures() - GuildControlUIRankBankFrameInset:RemoveTextures() - GuildControlUIRankBankFrameInsetScrollFrame:RemoveTextures() - - STYLE:ApplyWindowStyle(GuildControlUI) - - STYLE:ApplyScrollFrameStyle(GuildControlUIRankBankFrameInsetScrollFrameScrollBar) - - hooksecurefunc("GuildControlUI_RankOrder_Update",RankOrder_OnUpdate) - - GuildControlUIRankOrderFrameNewButton:HookScript("OnClick", function() - SV.Timers:ExecuteTimer(1,RankOrder_OnUpdate) - end) - - STYLE:ApplyDropdownStyle(GuildControlUINavigationDropDown) - STYLE:ApplyDropdownStyle(GuildControlUIRankSettingsFrameRankDropDown,180) - GuildControlUINavigationDropDownButton:Width(20) - GuildControlUIRankSettingsFrameRankDropDownButton:Width(20) - - for i=1, NUM_RANK_FLAGS do - local check = _G["GuildControlUIRankSettingsFrameCheckbox"..i] - if(check) then check:SetCheckboxTemplate(true) end - end - - GuildControlUIRankOrderFrameNewButton:SetButtonTemplate() - GuildControlUIRankSettingsFrameGoldBox:SetEditboxTemplate() - GuildControlUIRankSettingsFrameGoldBox.Panel:Point("TOPLEFT",-2,-4) - GuildControlUIRankSettingsFrameGoldBox.Panel:Point("BOTTOMRIGHT",2,4) - GuildControlUIRankSettingsFrameGoldBox:RemoveTextures() - GuildControlUIRankBankFrame:RemoveTextures() - - hooksecurefunc("GuildControlUI_BankTabPermissions_Update",function() - local tabs = GetNumGuildBankTabs() - - if tabs < MAX_BUY_GUILDBANK_TABS then - tabs = tabs + 1 - end - - for i=1, tabs do - local tab = _G["GuildControlBankTab"..i.."Owned"] - - if(tab) then - if(tab.tabIcon) then tab.tabIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) end - if(tab.editBox) then tab.editBox:SetEditboxTemplate() end - - if internalTest == false then - _G["GuildControlBankTab"..i.."BuyPurchaseButton"]:SetButtonTemplate() - _G["GuildControlBankTab"..i.."OwnedStackBox"]:SetEditboxTemplate() - _G["GuildControlBankTab"..i.."OwnedViewCheck"]:SetCheckboxTemplate(true) - _G["GuildControlBankTab"..i.."OwnedDepositCheck"]:SetCheckboxTemplate(true) - _G["GuildControlBankTab"..i.."OwnedUpdateInfoCheck"]:SetCheckboxTemplate(true) - - GCTabHelper(_G["GuildControlBankTab"..i.."OwnedStackBox"]) - GCTabHelper(_G["GuildControlBankTab"..i.."OwnedViewCheck"]) - GCTabHelper(_G["GuildControlBankTab"..i.."OwnedDepositCheck"]) - GCTabHelper(_G["GuildControlBankTab"..i.."OwnedUpdateInfoCheck"]) - end - end - end - internalTest = true - end) - - STYLE:ApplyDropdownStyle(GuildControlUIRankBankFrameRankDropDown, 180) - - GuildControlUIRankBankFrameRankDropDownButton:Width(20) -end - - -local function GuildRegistrarStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.guildregistrar ~= true then - return - end - - STYLE:ApplyWindowStyle(GuildRegistrarFrame, true, true) - - GuildRegistrarFrameInset:Die() - GuildRegistrarFrameEditBox:RemoveTextures() - GuildRegistrarGreetingFrame:RemoveTextures() - - GuildRegistrarFrameGoodbyeButton:SetButtonTemplate() - GuildRegistrarFrameCancelButton:SetButtonTemplate() - GuildRegistrarFramePurchaseButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(GuildRegistrarFrameCloseButton) - GuildRegistrarFrameEditBox:SetEditboxTemplate() - - for b = 1, GuildRegistrarFrameEditBox:GetNumRegions()do - local a2 = select(b, GuildRegistrarFrameEditBox:GetRegions()) - if a2 and a2:GetObjectType() == "Texture"then - if a2:GetTexture() == "Interface\\ChatFrame\\UI-ChatInputBorder-Left" or a2:GetTexture() == "Interface\\ChatFrame\\UI-ChatInputBorder-Right" then - a2:Die() - end - end - end - - GuildRegistrarFrameEditBox:Height(20) - - if(_G["GuildRegistrarButton1"]) then - _G["GuildRegistrarButton1"]:GetFontString():SetTextColor(1, 1, 1) - end - if(_G["GuildRegistrarButton2"]) then - _G["GuildRegistrarButton2"]:GetFontString():SetTextColor(1, 1, 1) - end - - GuildRegistrarPurchaseText:SetTextColor(1, 1, 1) - AvailableServicesText:SetTextColor(1, 1, 0) -end - -local function LFGuildFrameStyle() - if(SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.lfguild ~= true) then return end - - STYLE:ApplyWindowStyle(LookingForGuildFrame, true) - - for i = 1, #LFGFrameList do - local check = _G[LFGFrameList[i]] - if(check) then check:SetCheckboxTemplate(true) end - end - - LookingForGuildTankButton.checkButton:SetCheckboxTemplate(true) - LookingForGuildHealerButton.checkButton:SetCheckboxTemplate(true) - LookingForGuildDamagerButton.checkButton:SetCheckboxTemplate(true) - LookingForGuildFrameInset:RemoveTextures(false) - LookingForGuildBrowseButton_LeftSeparator:Die() - LookingForGuildRequestButton_RightSeparator:Die() - - STYLE:ApplyScrollFrameStyle(LookingForGuildBrowseFrameContainerScrollBar) - LookingForGuildBrowseButton:SetButtonTemplate() - LookingForGuildRequestButton:SetButtonTemplate() - - STYLE:ApplyCloseButtonStyle(LookingForGuildFrameCloseButton) - LookingForGuildCommentInputFrame:SetPanelTemplate("Default") - LookingForGuildCommentInputFrame:RemoveTextures(false) - - for u = 1, 5 do - local J = _G["LookingForGuildBrowseFrameContainerButton"..u] - local K = _G["LookingForGuildAppsFrameContainerButton"..u] - J:SetBackdrop(nil) - K:SetBackdrop(nil) - end - - for u = 1, 3 do - local tab = _G["LookingForGuildFrameTab"..u] - STYLE:ApplyTabStyle(tab) - tab:SetFrameStrata("HIGH") - tab:SetFrameLevel(99) - end - - GuildFinderRequestMembershipFrame:RemoveTextures(true) - GuildFinderRequestMembershipFrame:SetFixedPanelTemplate("Transparent", true) - GuildFinderRequestMembershipFrameAcceptButton:SetButtonTemplate() - GuildFinderRequestMembershipFrameCancelButton:SetButtonTemplate() - GuildFinderRequestMembershipFrameInputFrame:RemoveTextures() - GuildFinderRequestMembershipFrameInputFrame:SetFixedPanelTemplate("Default") -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_GuildBankUI",GuildBankStyle) -STYLE:SaveBlizzardStyle("Blizzard_GuildUI",GuildFrameStyle) -STYLE:SaveBlizzardStyle("Blizzard_GuildControlUI",GuildControlStyle) -STYLE:SaveCustomStyle(GuildRegistrarStyle) -STYLE:SaveBlizzardStyle("Blizzard_LookingForGuildUI",LFGuildFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua deleted file mode 100644 index bf38890..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua +++ /dev/null @@ -1,175 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local HelpFrameList = { - "HelpFrameLeftInset", - "HelpFrameMainInset", - "HelpFrameKnowledgebase", - "HelpFrameHeader", - "HelpFrameKnowledgebaseErrorFrame" -} - -local HelpFrameButtonList = { - "HelpFrameOpenTicketHelpItemRestoration", - "HelpFrameAccountSecurityOpenTicket", - "HelpFrameOpenTicketHelpTopIssues", - "HelpFrameOpenTicketHelpOpenTicket", - "HelpFrameKnowledgebaseSearchButton", - "HelpFrameKnowledgebaseNavBarHomeButton", - "HelpFrameCharacterStuckStuck", - "GMChatOpenLog", - "HelpFrameTicketSubmit", - "HelpFrameTicketCancel" -} - -local function NavBarHelper(button) - for i = 1, #button.navList do - local this = button.navList[i] - local last = button.navList[i - 1] - if this and last then - local level = last:GetFrameLevel() - if(level >= 2) then - level = level - 2 - else - level = 0 - end - this:SetFrameLevel(level) - end - end -end ---[[ -########################################################## -HELPFRAME STYLER -########################################################## -]]-- -local function HelpFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.help ~= true then - return - end - tinsert(HelpFrameButtonList, "HelpFrameButton16") - tinsert(HelpFrameButtonList, "HelpFrameSubmitSuggestionSubmit") - tinsert(HelpFrameButtonList, "HelpFrameReportBugSubmit") - for d = 1, #HelpFrameList do - _G[HelpFrameList[d]]:RemoveTextures(true) - _G[HelpFrameList[d]]:SetPanelTemplate("Default") - end - HelpFrameHeader:SetFrameLevel(HelpFrameHeader:GetFrameLevel()+2) - HelpFrameKnowledgebaseErrorFrame:SetFrameLevel(HelpFrameKnowledgebaseErrorFrame:GetFrameLevel()+2) - HelpFrameReportBugScrollFrame:RemoveTextures() - HelpFrameReportBugScrollFrame:SetPanelTemplate("Default") - HelpFrameReportBugScrollFrame.Panel:Point("TOPLEFT", -4, 4) - HelpFrameReportBugScrollFrame.Panel:Point("BOTTOMRIGHT", 6, -4) - for d = 1, HelpFrameReportBug:GetNumChildren()do - local e = select(d, HelpFrameReportBug:GetChildren()) - if not e:GetName() then - e:RemoveTextures() - end - end - STYLE:ApplyScrollFrameStyle(HelpFrameReportBugScrollFrameScrollBar) - HelpFrameSubmitSuggestionScrollFrame:RemoveTextures() - HelpFrameSubmitSuggestionScrollFrame:SetPanelTemplate("Default") - HelpFrameSubmitSuggestionScrollFrame.Panel:Point("TOPLEFT", -4, 4) - HelpFrameSubmitSuggestionScrollFrame.Panel:Point("BOTTOMRIGHT", 6, -4) - for d = 1, HelpFrameSubmitSuggestion:GetNumChildren()do - local e = select(d, HelpFrameSubmitSuggestion:GetChildren()) - if not e:GetName() then - e:RemoveTextures() - end - end - STYLE:ApplyScrollFrameStyle(HelpFrameSubmitSuggestionScrollFrameScrollBar) - HelpFrameTicketScrollFrame:RemoveTextures() - HelpFrameTicketScrollFrame:SetPanelTemplate("Default") - HelpFrameTicketScrollFrame.Panel:Point("TOPLEFT", -4, 4) - HelpFrameTicketScrollFrame.Panel:Point("BOTTOMRIGHT", 6, -4) - for d = 1, HelpFrameTicket:GetNumChildren()do - local e = select(d, HelpFrameTicket:GetChildren()) - if not e:GetName() then - e:RemoveTextures() - end - end - STYLE:ApplyScrollFrameStyle(HelpFrameKnowledgebaseScrollFrame2ScrollBar) - for d = 1, #HelpFrameButtonList do - _G[HelpFrameButtonList[d]]:RemoveTextures(true) - _G[HelpFrameButtonList[d]]:SetButtonTemplate() - if _G[HelpFrameButtonList[d]].text then - _G[HelpFrameButtonList[d]].text:ClearAllPoints() - _G[HelpFrameButtonList[d]].text:SetPoint("CENTER") - _G[HelpFrameButtonList[d]].text:SetJustifyH("CENTER") - end - end - for d = 1, 6 do - local f = _G["HelpFrameButton"..d] - f:SetButtonTemplate() - f.text:ClearAllPoints() - f.text:SetPoint("CENTER") - f.text:SetJustifyH("CENTER") - end - for d = 1, HelpFrameKnowledgebaseScrollFrameScrollChild:GetNumChildren()do - local f = _G["HelpFrameKnowledgebaseScrollFrameButton"..d] - f:RemoveTextures(true) - f:SetButtonTemplate() - end - HelpFrameKnowledgebaseSearchBox:ClearAllPoints() - HelpFrameKnowledgebaseSearchBox:Point("TOPLEFT", HelpFrameMainInset, "TOPLEFT", 13, -10) - HelpFrameKnowledgebaseNavBarOverlay:Die() - HelpFrameKnowledgebaseNavBar:RemoveTextures() - HelpFrame:RemoveTextures(true) - HelpFrame:SetPanelTemplate("Halftone") - HelpFrameKnowledgebaseSearchBox:SetEditboxTemplate() - STYLE:ApplyScrollFrameStyle(HelpFrameKnowledgebaseScrollFrameScrollBar, 5) - STYLE:ApplyScrollFrameStyle(HelpFrameTicketScrollFrameScrollBar, 4) - STYLE:ApplyCloseButtonStyle(HelpFrameCloseButton, HelpFrame.Panel) - STYLE:ApplyCloseButtonStyle(HelpFrameKnowledgebaseErrorFrameCloseButton, HelpFrameKnowledgebaseErrorFrame.Panel) - HelpFrameCharacterStuckHearthstone:SetButtonTemplate() - HelpFrameCharacterStuckHearthstone:SetFixedPanelTemplate("Default") - HelpFrameCharacterStuckHearthstone.IconTexture:FillInner() - HelpFrameCharacterStuckHearthstone.IconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - hooksecurefunc("NavBar_AddButton", function(h, k) - local i = h.navList[#h.navList] - if not i.styled then - i:SetButtonTemplate() - i.styled = true; - i:HookScript("OnClick", function() - NavBarHelper(h) - end) - end - NavBarHelper(h) - end) - HelpFrameGM_ResponseNeedMoreHelp:SetButtonTemplate() - HelpFrameGM_ResponseCancel:SetButtonTemplate() - for d = 1, HelpFrameGM_Response:GetNumChildren()do - local e = select(d, HelpFrameGM_Response:GetChildren()) - if e and e:GetObjectType() - == "Frame"and not e:GetName() - then - e:SetFixedPanelTemplate("Default") - end - end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(HelpFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua deleted file mode 100644 index f0ed23f..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua +++ /dev/null @@ -1,100 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local InspectSlotList = { - "HeadSlot", - "NeckSlot", - "ShoulderSlot", - "BackSlot", - "ChestSlot", - "ShirtSlot", - "TabardSlot", - "WristSlot", - "HandsSlot", - "WaistSlot", - "LegsSlot", - "FeetSlot", - "Finger0Slot", - "Finger1Slot", - "Trinket0Slot", - "Trinket1Slot", - "MainHandSlot", - "SecondaryHandSlot" -}; ---[[ -########################################################## -INSPECT UI STYLER -########################################################## -]]-- -local function InspectStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.inspect ~= true then - return - end - InspectFrame:RemoveTextures(true) - InspectFrameInset:RemoveTextures(true) - InspectFrame:SetPanelTemplate('Action') - STYLE:ApplyCloseButtonStyle(InspectFrameCloseButton) - for d = 1, 4 do - STYLE:ApplyTabStyle(_G["InspectFrameTab"..d]) - end - InspectModelFrameBorderTopLeft:Die() - InspectModelFrameBorderTopRight:Die() - InspectModelFrameBorderTop:Die() - InspectModelFrameBorderLeft:Die() - InspectModelFrameBorderRight:Die() - InspectModelFrameBorderBottomLeft:Die() - InspectModelFrameBorderBottomRight:Die() - InspectModelFrameBorderBottom:Die() - InspectModelFrameBorderBottom2:Die() - InspectModelFrameBackgroundOverlay:Die() - InspectModelFrame:SetPanelTemplate("Default") - for _, slot in pairs(InspectSlotList)do - local texture = _G["Inspect"..slot.."IconTexture"] - local frame = _G["Inspect"..slot] - frame:RemoveTextures() - frame:SetButtonTemplate() - texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - texture:FillInner() - frame:SetFrameLevel(frame:GetFrameLevel() + 1) - frame:SetFixedPanelTemplate() - end - hooksecurefunc('InspectPaperDollItemSlotButton_Update', function(q) - local unit = InspectFrame.unit; - local r = GetInventoryItemQuality(unit, q:GetID()) - if r and q.Panel then - local s, t, f = GetItemQualityColor(r) - q.Panel:SetBackdropBorderColor(s, t, f) - elseif q.Panel then - q.Panel:SetBackdropBorderColor(0,0,0,1) - end - end) - InspectGuildFrameBG:Die() - InspectTalentFrame:RemoveTextures() -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_InspectUI",InspectStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua deleted file mode 100644 index b4c53f2..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua +++ /dev/null @@ -1,67 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -ITEMSOCKETING STYLER -########################################################## -]]-- -local function ItemSocketStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.socket ~= true then return end - ItemSocketingFrame:RemoveTextures() - ItemSocketingFrame:SetPanelTemplate("Action") - ItemSocketingFrameInset:Die() - ItemSocketingScrollFrame:RemoveTextures() - ItemSocketingScrollFrame:SetPanelTemplate("Inset", true) - STYLE:ApplyScrollFrameStyle(ItemSocketingScrollFrameScrollBar, 2) - for j = 1, MAX_NUM_SOCKETS do - local i = _G[("ItemSocketingSocket%d"):format(j)]; - local C = _G[("ItemSocketingSocket%dBracketFrame"):format(j)]; - local D = _G[("ItemSocketingSocket%dBackground"):format(j)]; - local E = _G[("ItemSocketingSocket%dIconTexture"):format(j)]; - i:RemoveTextures() - i:SetButtonTemplate() - i:SetFixedPanelTemplate("Button", true) - C:Die() - D:Die() - E:SetTexCoord(0.1, 0.9, 0.1, 0.9) - E:FillInner() - end - hooksecurefunc("ItemSocketingFrame_Update", function() - local max = GetNumSockets() - for j=1, max do - local i = _G[("ItemSocketingSocket%d"):format(j)]; - local G = GetSocketTypes(j); - local color = GEM_TYPE_INFO[G] - i:SetBackdropColor(color.r, color.g, color.b, 0.15); - i:SetBackdropBorderColor(color.r, color.g, color.b) - end - end) - ItemSocketingFramePortrait:Die() - ItemSocketingSocketButton:ClearAllPoints() - ItemSocketingSocketButton:Point("BOTTOMRIGHT", ItemSocketingFrame, "BOTTOMRIGHT", -5, 5) - ItemSocketingSocketButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(ItemSocketingFrameCloseButton) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_ItemSocketingUI",ItemSocketStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua deleted file mode 100644 index 86aab3e..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua +++ /dev/null @@ -1,55 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -ITEMUPGRADE UI STYLER -########################################################## -]]-- -local function ItemUpgradeStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.itemUpgrade ~= true then - return - end - - STYLE:ApplyWindowStyle(ItemUpgradeFrame, true) - - STYLE:ApplyCloseButtonStyle(ItemUpgradeFrameCloseButton) - ItemUpgradeFrameUpgradeButton:RemoveTextures() - ItemUpgradeFrameUpgradeButton:SetButtonTemplate() - ItemUpgradeFrame.ItemButton:RemoveTextures() - ItemUpgradeFrame.ItemButton:SetSlotTemplate(true) - ItemUpgradeFrame.ItemButton.IconTexture:FillInner() - hooksecurefunc('ItemUpgradeFrame_Update', function() - if GetItemUpgradeItemInfo() then - ItemUpgradeFrame.ItemButton.IconTexture:SetAlpha(1) - ItemUpgradeFrame.ItemButton.IconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - else - ItemUpgradeFrame.ItemButton.IconTexture:SetAlpha(0) - end - end) - ItemUpgradeFrameMoneyFrame:RemoveTextures() - ItemUpgradeFrame.FinishedGlow:Die() - ItemUpgradeFrame.ButtonFrame:DisableDrawLayer('BORDER') -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_ItemUpgradeUI",ItemUpgradeStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua deleted file mode 100644 index bd456a5..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua +++ /dev/null @@ -1,66 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -KEYBINDING STYLER -########################################################## -]]-- -local BindButtons = { - "KeyBindingFrameDefaultButton", - "KeyBindingFrameUnbindButton", - "KeyBindingFrameOkayButton", - "KeyBindingFrameCancelButton" -} - -local function BindingStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.binding ~= true then return end - - for _, gName in pairs(BindButtons)do - local btn = _G[gName] - if(btn) then - btn:RemoveTextures() - btn:SetButtonTemplate() - end - end - - for i = 1, KEY_BINDINGS_DISPLAYED do - local button1 = _G["KeyBindingFrameBinding"..i.."Key1Button"] - if(button1) then - button1:RemoveTextures(true) - button1:SetEditboxTemplate() - end - - local button2 = _G["KeyBindingFrameBinding"..i.."Key2Button"] - if(button2) then - button2:RemoveTextures(true) - button2:SetEditboxTemplate() - end - end - - STYLE:ApplyScrollFrameStyle(KeyBindingFrameScrollFrameScrollBar) - KeyBindingFrame:RemoveTextures() - KeyBindingFrame:SetPanelTemplate("Halftone") -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_BindingUI", BindingStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua deleted file mode 100644 index 19859c9..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua +++ /dev/null @@ -1,412 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local LFDFrameList = { - "LFDQueueFrameRoleButtonHealer", - "LFDQueueFrameRoleButtonDPS", - "LFDQueueFrameRoleButtonLeader", - "LFDQueueFrameRoleButtonTank", - "RaidFinderQueueFrameRoleButtonHealer", - "RaidFinderQueueFrameRoleButtonDPS", - "RaidFinderQueueFrameRoleButtonLeader", - "RaidFinderQueueFrameRoleButtonTank", - "LFGInvitePopupRoleButtonTank", - "LFGInvitePopupRoleButtonHealer", - "LFGInvitePopupRoleButtonDPS" -}; - -local Incentive_OnShow = function(button) - ActionButton_ShowOverlayGlow(button:GetParent().checkButton) -end - -local Incentive_OnHide = function(button) - ActionButton_HideOverlayGlow(button:GetParent().checkButton) -end - -local LFDQueueRandom_OnUpdate = function() - LFDQueueFrame:RemoveTextures() - for u = 1, LFD_MAX_REWARDS do - local t = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u] - local icon = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."IconTexture"] - if t then - if not t.restyled then - local x = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."ShortageBorder"] - local y = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."Count"] - local z = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."NameFrame"] - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icon:SetDrawLayer("OVERLAY") - y:SetDrawLayer("OVERLAY") - z:SetTexture() - z:SetSize(118, 39) - x:SetAlpha(0) - t.border = CreateFrame("Frame", nil, t) - t.border:SetFixedPanelTemplate() - t.border:WrapOuter(icon) - icon:SetParent(t.border) - y:SetParent(t.border) - t.restyled = true; - for A = 1, 3 do - local B = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."RoleIcon"..A] - if B then - B:SetParent(t.border) - end - end - end - end - end -end - -local ScenarioQueueRandom_OnUpdate = function() - LFDQueueFrame:RemoveTextures() - for u = 1, LFD_MAX_REWARDS do - local t = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u] - local icon = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u.."IconTexture"] - if t then - if not t.restyled then - local x = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u.."ShortageBorder"] - local y = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u.."Count"] - local z = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u.."NameFrame"]icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icon:SetDrawLayer("OVERLAY") - y:SetDrawLayer("OVERLAY") - z:SetTexture() - z:SetSize(118, 39) - x:SetAlpha(0) - t.border = CreateFrame("Frame", nil, t) - t.border:SetFixedPanelTemplate() - t.border:WrapOuter(icon) - icon:SetParent(t.border) - y:SetParent(t.border) - t.restyled = true - end - end - end -end ---[[ -########################################################## -LFD STYLER -########################################################## -]]-- -local function LFDFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.lfg ~= true then return end - - STYLE:ApplyWindowStyle(PVEFrame, true) - - PVEFrameLeftInset:RemoveTextures() - RaidFinderQueueFrame:RemoveTextures(true) - PVEFrameBg:Hide() - PVEFrameTitleBg:Hide() - PVEFramePortrait:Hide() - PVEFramePortraitFrame:Hide() - PVEFrameTopRightCorner:Hide() - PVEFrameTopBorder:Hide() - PVEFrameLeftInsetBg:Hide() - PVEFrame.shadows:Hide() - - LFDQueueFramePartyBackfillBackfillButton:SetButtonTemplate() - LFDQueueFramePartyBackfillNoBackfillButton:SetButtonTemplate() - LFDQueueFrameRandomScrollFrameChildFrameBonusRepFrame.ChooseButton:SetButtonTemplate() - ScenarioQueueFrameRandomScrollFrameChildFrameBonusRepFrame.ChooseButton:SetButtonTemplate() - - STYLE:ApplyScrollFrameStyle(ScenarioQueueFrameRandomScrollFrameScrollBar) - - GroupFinderFrameGroupButton1.icon:SetTexture("Interface\\Icons\\INV_Helmet_08") - GroupFinderFrameGroupButton2.icon:SetTexture("Interface\\Icons\\inv_helmet_06") - GroupFinderFrameGroupButton3.icon:SetTexture("Interface\\Icons\\Icon_Scenarios") - GroupFinderFrameGroupButton4.icon:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\SVUI-EMBLEM") - - LFGDungeonReadyDialogBackground:Die() - LFGDungeonReadyDialogEnterDungeonButton:SetButtonTemplate() - LFGDungeonReadyDialogLeaveQueueButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(LFGDungeonReadyDialogCloseButton) - - LFGDungeonReadyDialog:RemoveTextures() - LFGDungeonReadyDialog:SetPanelTemplate("Pattern", true, 2, 4, 4) - LFGDungeonReadyStatus:RemoveTextures() - LFGDungeonReadyStatus:SetPanelTemplate("Pattern", true, 2, 4, 4) - LFGDungeonReadyDialogRoleIconTexture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS") - LFGDungeonReadyDialogRoleIconTexture:SetAlpha(0.5) - - hooksecurefunc("LFGDungeonReadyPopup_Update", function() - local b, c, d, e, f, g, h, i, j, k, l, m = GetLFGProposal() - if LFGDungeonReadyDialogRoleIcon:IsShown() then - if h == "DAMAGER" then - LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonDPS.background:GetTexCoord()) - elseif h == "TANK" then - LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonTank.background:GetTexCoord()) - elseif h == "HEALER" then - LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonHealer.background:GetTexCoord()) - end - end - end) - - LFDQueueFrameRoleButtonTankIncentiveIcon:SetAlpha(0) - LFDQueueFrameRoleButtonHealerIncentiveIcon:SetAlpha(0) - LFDQueueFrameRoleButtonDPSIncentiveIcon:SetAlpha(0) - LFDQueueFrameRoleButtonTankIncentiveIcon:HookScript("OnShow", Incentive_OnShow) - LFDQueueFrameRoleButtonHealerIncentiveIcon:HookScript("OnShow", Incentive_OnShow) - LFDQueueFrameRoleButtonDPSIncentiveIcon:HookScript("OnShow", Incentive_OnShow) - LFDQueueFrameRoleButtonTankIncentiveIcon:HookScript("OnHide", Incentive_OnHide) - LFDQueueFrameRoleButtonHealerIncentiveIcon:HookScript("OnHide", Incentive_OnHide) - LFDQueueFrameRoleButtonDPSIncentiveIcon:HookScript("OnHide", Incentive_OnHide) - LFDQueueFrameRoleButtonTank.shortageBorder:Die() - LFDQueueFrameRoleButtonDPS.shortageBorder:Die() - LFDQueueFrameRoleButtonHealer.shortageBorder:Die() - LFGDungeonReadyDialog.filigree:SetAlpha(0) - LFGDungeonReadyDialog.bottomArt:SetAlpha(0) - STYLE:ApplyCloseButtonStyle(LFGDungeonReadyStatusCloseButton) - - for _,name in pairs(LFDFrameList) do - local frame = _G[name]; - if frame then - frame.checkButton:RemoveTextures() - frame.checkButton:SetCheckboxTemplate(true, -4, -4) - frame.checkButton:SetFrameLevel(frame.checkButton:GetFrameLevel() + 50) - frame:DisableDrawLayer("BACKGROUND") - frame:DisableDrawLayer("OVERLAY") - end - end - - LFDQueueFrameRoleButtonLeader.leadIcon = LFDQueueFrameRoleButtonLeader:CreateTexture(nil, 'BACKGROUND') - LFDQueueFrameRoleButtonLeader.leadIcon:SetTexture([[Interface\GroupFrame\UI-Group-LeaderIcon]]) - LFDQueueFrameRoleButtonLeader.leadIcon:SetPoint(LFDQueueFrameRoleButtonLeader:GetNormalTexture():GetPoint()) - LFDQueueFrameRoleButtonLeader.leadIcon:Size(50) - LFDQueueFrameRoleButtonLeader.leadIcon:SetAlpha(0.4) - RaidFinderQueueFrameRoleButtonLeader.leadIcon = RaidFinderQueueFrameRoleButtonLeader:CreateTexture(nil, 'BACKGROUND') - RaidFinderQueueFrameRoleButtonLeader.leadIcon:SetTexture([[Interface\GroupFrame\UI-Group-LeaderIcon]]) - RaidFinderQueueFrameRoleButtonLeader.leadIcon:SetPoint(RaidFinderQueueFrameRoleButtonLeader:GetNormalTexture():GetPoint()) - RaidFinderQueueFrameRoleButtonLeader.leadIcon:Size(50) - RaidFinderQueueFrameRoleButtonLeader.leadIcon:SetAlpha(0.4) - - hooksecurefunc('LFG_DisableRoleButton', function(self) - if self.checkButton:GetChecked() then - self.checkButton:SetAlpha(1) - else - self.checkButton:SetAlpha(0) - end - if self.background then - self.background:Show() - end - end) - - hooksecurefunc('LFG_EnableRoleButton', function(self) - self.checkButton:SetAlpha(1) - end) - - hooksecurefunc("LFG_PermanentlyDisableRoleButton", function(self) - if self.background then - self.background:Show() - self.background:SetDesaturated(true) - end - end) - - for i = 1, 4 do - local button = GroupFinderFrame["groupButton"..i] - if(button) then - button.ring:Hide() - button.bg:SetTexture(0,0,0,0) - button.bg:SetAllPoints() - button:SetFixedPanelTemplate('Button') - button:SetButtonTemplate() - button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - button.icon:SetDrawLayer("OVERLAY") - button.icon:Size(40) - button.icon:ClearAllPoints() - button.icon:SetPoint("LEFT", 10, 0) - button.border = CreateFrame("Frame", nil, button) - button.border:SetFixedPanelTemplate('Default') - button.border:WrapOuter(button.icon) - button.icon:SetParent(button.border) - end - end - - for u = 1, 2 do - STYLE:ApplyTabStyle(_G['PVEFrameTab'..u]) - end - - PVEFrameTab1:SetPoint('BOTTOMLEFT', PVEFrame, 'BOTTOMLEFT', 19, -31) - STYLE:ApplyCloseButtonStyle(PVEFrameCloseButton) - LFDParentFrame:RemoveTextures() - LFDQueueFrameFindGroupButton:RemoveTextures() - LFDParentFrameInset:RemoveTextures() - LFDQueueFrameSpecificListScrollFrame:RemoveTextures() - LFDQueueFrameFindGroupButton:SetButtonTemplate() - hooksecurefunc("LFDQueueFrameRandom_UpdateFrame", LFDQueueRandom_OnUpdate) - - hooksecurefunc("ScenarioQueueFrameSpecific_Update", function() - for i = 1, NUM_SCENARIO_CHOICE_BUTTONS do - local box = _G["ScenarioQueueFrameSpecificButton"..i.."EnableButton"] - if(box and (not box.Panel)) then - box:RemoveTextures() - box:SetCheckboxTemplate(true, -2, -3) - end - end - end) - - STYLE:ApplyDropdownStyle(LFDQueueFrameTypeDropDown) - - RaidFinderFrame:RemoveTextures() - RaidFinderFrameBottomInset:RemoveTextures() - RaidFinderFrameRoleInset:RemoveTextures() - LFDQueueFrameRandomScrollFrameScrollBar:RemoveTextures() - ScenarioQueueFrameSpecificScrollFrame:RemoveTextures() - RaidFinderFrameBottomInsetBg:Hide() - RaidFinderFrameBtnCornerRight:Hide() - RaidFinderFrameButtonBottomBorder:Hide() - STYLE:ApplyDropdownStyle(RaidFinderQueueFrameSelectionDropDown) - RaidFinderFrameFindRaidButton:RemoveTextures() - RaidFinderFrameFindRaidButton:SetButtonTemplate() - RaidFinderQueueFrame:RemoveTextures() - - for u = 1, LFD_MAX_REWARDS do - local t = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u] - local icon = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."IconTexture"] - if t then - if not t.restyled then - local x = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."ShortageBorder"] - local y = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."Count"] - local z = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."NameFrame"] - t:RemoveTextures() - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icon:SetDrawLayer("OVERLAY") - y:SetDrawLayer("OVERLAY") - z:SetTexture() - z:SetSize(118, 39) - x:SetAlpha(0) - t.border = CreateFrame("Frame", nil, t) - t.border:SetFixedPanelTemplate() - t.border:WrapOuter(icon) - icon:SetParent(t.border) - y:SetParent(t.border) - t.restyled = true - end - end - end - - ScenarioFinderFrameInset:DisableDrawLayer("BORDER") - ScenarioFinderFrame.TopTileStreaks:Hide() - ScenarioFinderFrameBtnCornerRight:Hide() - ScenarioFinderFrameButtonBottomBorder:Hide() - ScenarioQueueFrame.Bg:Hide() - ScenarioFinderFrameInset:GetRegions():Hide() - hooksecurefunc("ScenarioQueueFrameRandom_UpdateFrame", ScenarioQueueRandom_OnUpdate) - ScenarioQueueFrameFindGroupButton:RemoveTextures() - ScenarioQueueFrameFindGroupButton:SetButtonTemplate() - STYLE:ApplyDropdownStyle(ScenarioQueueFrameTypeDropDown) - LFRBrowseFrameRoleInset:DisableDrawLayer("BORDER") - RaidBrowserFrameBg:Hide() - LFRQueueFrameSpecificListScrollFrameScrollBackgroundTopLeft:Hide() - LFRQueueFrameSpecificListScrollFrameScrollBackgroundBottomRight:Hide() - LFRBrowseFrameRoleInsetBg:Hide() - - for u = 1, 14 do - if u ~= 6 and u ~= 8 then - select(u, RaidBrowserFrame:GetRegions()):Hide() - end - end - - RaidBrowserFrame:SetPanelTemplate('Pattern') - STYLE:ApplyCloseButtonStyle(RaidBrowserFrameCloseButton) - LFRQueueFrameFindGroupButton:SetButtonTemplate() - LFRQueueFrameAcceptCommentButton:SetButtonTemplate() - STYLE:ApplyScrollFrameStyle(LFRQueueFrameCommentScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(LFDQueueFrameSpecificListScrollFrameScrollBar) - - RaidBrowserFrame:HookScript('OnShow', function() - if not LFRQueueFrameSpecificListScrollFrameScrollBar.styled then - STYLE:ApplyScrollFrameStyle(LFRQueueFrameSpecificListScrollFrameScrollBar) - LFRBrowseFrame:RemoveTextures() - for u = 1, 2 do - local C = _G['LFRParentFrameSideTab'..u] - C:DisableDrawLayer('BACKGROUND') - C:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - C:GetNormalTexture():FillInner() - C.pushed = true; - C:SetPanelTemplate("Default") - C.Panel:SetAllPoints() - C:SetPanelTemplate() - hooksecurefunc(C:GetHighlightTexture(), "SetTexture", function(o, D) - if D ~= nil then - o:SetTexture(0,0,0,0) - end - end) - hooksecurefunc(C:GetCheckedTexture(), "SetTexture", function(o, D) - if D ~= nil then - o:SetTexture(0,0,0,0) - end - end) - end - for u = 1, 7 do - local C = _G['LFRBrowseFrameColumnHeader'..u] - C:DisableDrawLayer('BACKGROUND') - end - STYLE:ApplyDropdownStyle(LFRBrowseFrameRaidDropDown) - LFRBrowseFrameRefreshButton:SetButtonTemplate() - LFRBrowseFrameInviteButton:SetButtonTemplate() - LFRBrowseFrameSendMessageButton:SetButtonTemplate() - LFRQueueFrameSpecificListScrollFrameScrollBar.styled = true - end - end) - - LFGInvitePopup:RemoveTextures() - LFGInvitePopup:SetPanelTemplate("Pattern", true, 2, 4, 4) - LFGInvitePopupAcceptButton:SetButtonTemplate() - LFGInvitePopupDeclineButton:SetButtonTemplate() - - _G[LFDQueueFrame.PartyBackfill:GetName().."BackfillButton"]:SetButtonTemplate() - _G[LFDQueueFrame.PartyBackfill:GetName().."NoBackfillButton"]:SetButtonTemplate() - _G[RaidFinderQueueFrame.PartyBackfill:GetName().."BackfillButton"]:SetButtonTemplate() - _G[RaidFinderQueueFrame.PartyBackfill:GetName().."NoBackfillButton"]:SetButtonTemplate() - _G[ScenarioQueueFrame.PartyBackfill:GetName().."BackfillButton"]:SetButtonTemplate() - _G[ScenarioQueueFrame.PartyBackfill:GetName().."NoBackfillButton"]:SetButtonTemplate() - - STYLE:ApplyScrollFrameStyle(LFDQueueFrameRandomScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(ScenarioQueueFrameSpecificScrollFrameScrollBar) - LFDQueueFrameRandomScrollFrame:SetBasicPanel() - ScenarioQueueFrameRandomScrollFrame:SetBasicPanel() - RaidFinderQueueFrameScrollFrame:SetBasicPanel() - - for u = 1, NUM_LFD_CHOICE_BUTTONS do - local box = _G["LFDQueueFrameSpecificListButton"..u.."EnableButton"] - if(box and (not box.Panel)) then - box:RemoveTextures() - box:SetCheckboxTemplate(true, -2, -3) - box:SetFrameLevel(box:GetFrameLevel() + 50) - end - end - - for u = 1, NUM_LFR_CHOICE_BUTTONS do - local box = _G["LFRQueueFrameSpecificListButton"..u.."EnableButton"] - if(box and (not box.Panel)) then - box:RemoveTextures() - box:SetCheckboxTemplate(true, -2, -3) - box:SetFrameLevel(box:GetFrameLevel() + 50) - end - end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(LFDFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua deleted file mode 100644 index 6294540..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua +++ /dev/null @@ -1,132 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local MissingLootFrame_OnShow = function() - local N = GetNumMissingLootItems() - for u = 1, N do - local O = _G["MissingLootFrameItem"..u] - local icon = O.icon; - STYLE:ApplyItemButtonStyle(O, true) - local g, f, y, P = GetMissingLootItemInfo(u) - local color = GetItemQualityColor(P) or 0,0,0,1 - icon:SetTexture(g) - M:SetBackdropBorderColor(color) - end - local Q = ceil(N/2) - MissingLootFrame:SetHeight(Q * 43 + 38 + MissingLootFrameLabel:GetHeight()) -end - -local LootHistoryFrame_OnUpdate = function(o) - local N = C_LootHistory.GetNumItems() - for u = 1, N do - local M = LootHistoryFrame.itemFrames[u] - if not M.isStyled then - local Icon = M.Icon:GetTexture() - M:RemoveTextures() - M.Icon:SetTexture(Icon) - M.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - M:SetFixedPanelTemplate("Button") - M.Panel:WrapOuter(M.Icon) - M.Icon:SetParent(M.Panel) - M.isStyled = true - end - end -end ---[[ -########################################################## -LOOTHISTORY STYLER -########################################################## -]]-- -local function LootHistoryStyle() - LootHistoryFrame:SetFrameStrata('HIGH') - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.loot ~= true then return end - local M = MissingLootFrame; - M:RemoveTextures() - M:SetPanelTemplate("Pattern") - STYLE:ApplyCloseButtonStyle(MissingLootFramePassButton) - hooksecurefunc("MissingLootFrame_Show", MissingLootFrame_OnShow) - LootHistoryFrame:RemoveTextures() - STYLE:ApplyCloseButtonStyle(LootHistoryFrame.CloseButton) - LootHistoryFrame:RemoveTextures() - LootHistoryFrame:SetFixedPanelTemplate('Transparent') - STYLE:ApplyCloseButtonStyle(LootHistoryFrame.ResizeButton) - LootHistoryFrame.ResizeButton:SetFixedPanelTemplate() - LootHistoryFrame.ResizeButton:Width(LootHistoryFrame:GetWidth()) - LootHistoryFrame.ResizeButton:Height(19) - LootHistoryFrame.ResizeButton:ClearAllPoints() - LootHistoryFrame.ResizeButton:Point("TOP", LootHistoryFrame, "BOTTOM", 0, -2) - LootHistoryFrame.ResizeButton:SetNormalTexture("") - - local txt = LootHistoryFrame.ResizeButton:CreateFontString(nil,"OVERLAY") - txt:SetFont(SV.Media.font.roboto, 14, "NONE") - txt:SetAllPoints(LootHistoryFrame.ResizeButton) - txt:SetJustifyH("CENTER") - txt:SetText("RESIZE") - - LootHistoryFrameScrollFrame:RemoveTextures() - STYLE:ApplyScrollFrameStyle(LootHistoryFrameScrollFrameScrollBar) - hooksecurefunc("LootHistoryFrame_FullUpdate", LootHistoryFrame_OnUpdate) - MasterLooterFrame:RemoveTextures() - MasterLooterFrame:SetFixedPanelTemplate() - MasterLooterFrame:SetFrameStrata('FULLSCREEN_DIALOG') - hooksecurefunc("MasterLooterFrame_Show", function() - local J = MasterLooterFrame.Item; - if J then - local u = J.Icon; - local icon = u:GetTexture() - local S = ITEM_QUALITY_COLORS[LootFrame.selectedQuality] - J:RemoveTextures() - u:SetTexture(icon) - u:SetTexCoord(0.1, 0.9, 0.1, 0.9) - J:SetPanelTemplate("Pattern") - J.Panel:WrapOuter(u) - J.Panel:SetBackdropBorderColor(S.r, S.g, S.b) - end - for u = 1, MasterLooterFrame:GetNumChildren()do - local T = select(u, MasterLooterFrame:GetChildren()) - if T and not T.isStyled and not T:GetName() then - if T:GetObjectType() == "Button" then - if T:GetPushedTexture() then - STYLE:ApplyCloseButtonStyle(T) - else - T:SetFixedPanelTemplate() - T:SetButtonTemplate() - end - T.isStyled = true - end - end - end - end) - BonusRollFrame:RemoveTextures() - STYLE:ApplyAlertStyle(BonusRollFrame) - BonusRollFrame.PromptFrame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - BonusRollFrame.PromptFrame.Timer.Bar:SetTexture(SV.Media.bar.default) - BonusRollFrame.PromptFrame.Timer.Bar:SetVertexColor(0.1, 1, 0.1) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(LootHistoryStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua deleted file mode 100644 index b96660e..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua +++ /dev/null @@ -1,63 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -LOSSOFCONTROL STYLER -########################################################## -]]-- -local _hook_LossOfControl = function(self, ...) - self.Icon:ClearAllPoints() - self.Icon:SetPoint("CENTER", self, "CENTER", 0, 0) - self.AbilityName:ClearAllPoints() - self.AbilityName:SetPoint("BOTTOM", self, 0, -28) - self.AbilityName.scrollTime = nil; - self.AbilityName:SetFont(SV.Media.font.names, 20, 'OUTLINE') - self.TimeLeft.NumberText:ClearAllPoints() - self.TimeLeft.NumberText:SetPoint("BOTTOM", self, 4, -58) - self.TimeLeft.NumberText.scrollTime = nil; - self.TimeLeft.NumberText:SetFont(SV.Media.font.numbers, 20, 'OUTLINE') - self.TimeLeft.SecondsText:ClearAllPoints() - self.TimeLeft.SecondsText:SetPoint("BOTTOM", self, 0, -80) - self.TimeLeft.SecondsText.scrollTime = nil; - self.TimeLeft.SecondsText:SetFont(SV.Media.font.roboto, 20, 'OUTLINE') - if self.Anim:IsPlaying() then - self.Anim:Stop() - end -end - -local function LossOfControlStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.losscontrol ~= true then return end - local IconBackdrop = CreateFrame("Frame", nil, LossOfControlFrame) - IconBackdrop:WrapOuter(LossOfControlFrame.Icon) - IconBackdrop:SetFrameLevel(LossOfControlFrame:GetFrameLevel()-1) - IconBackdrop:SetPanelTemplate("Slot") - LossOfControlFrame.Icon:SetTexCoord(.1, .9, .1, .9) - LossOfControlFrame:RemoveTextures() - LossOfControlFrame.AbilityName:ClearAllPoints() - LossOfControlFrame:Size(LossOfControlFrame.Icon:GetWidth() + 50) - --local bg = CreateFrame("Frame", nil, LossOfControlFrame) - hooksecurefunc("LossOfControlFrame_SetUpDisplay", _hook_LossOfControl) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(LossOfControlStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua deleted file mode 100644 index 67f8299..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua +++ /dev/null @@ -1,126 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local MacroButtonList = { - "MacroSaveButton", "MacroCancelButton", "MacroDeleteButton", "MacroNewButton", "MacroExitButton", "MacroEditButton", "MacroFrameTab1", "MacroFrameTab2", "MacroPopupOkayButton", "MacroPopupCancelButton" -} -local MacroButtonList2 = { - "MacroDeleteButton", "MacroNewButton", "MacroExitButton" -} ---[[ -########################################################## -MACRO UI STYLER -########################################################## -]]-- -local function MacroUIStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.macro ~= true then return end - STYLE:ApplyCloseButtonStyle(MacroFrameCloseButton) - STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(MacroFrameScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(MacroPopupScrollFrameScrollBar) - MacroFrame:Width(360) - for b = 1, #MacroButtonList do - _G[MacroButtonList[b]]:RemoveTextures() - _G[MacroButtonList[b]]:SetButtonTemplate() - end - for b = 1, #MacroButtonList2 do - local a1,p,a2,x,y = _G[MacroButtonList2[b]]:GetPoint() - _G[MacroButtonList2[b]]:SetPoint(a1,p,a2,x,-25) - end - for b = 1, 2 do - tab = _G[format("MacroFrameTab%s", b)] - tab:Height(22) - end - MacroFrameTab1:Point("TOPLEFT", MacroFrame, "TOPLEFT", 85, -39) - MacroFrameTab2:Point("LEFT", MacroFrameTab1, "RIGHT", 4, 0) - MacroFrame:RemoveTextures() - MacroFrame:SetPanelTemplate("Action") - MacroFrame.Panel:SetPoint("BOTTOMRIGHT",MacroFrame,"BOTTOMRIGHT",0,-25) - MacroFrameText:SetFont(SV.Media.font.roboto, 10, "OUTLINE") - MacroFrameTextBackground:RemoveTextures() - MacroFrameTextBackground:SetBasicPanel() - MacroPopupFrame:RemoveTextures() - MacroPopupFrame:SetBasicPanel() - MacroPopupScrollFrame:RemoveTextures() - MacroPopupScrollFrame:SetPanelTemplate("Pattern") - MacroPopupScrollFrame.Panel:Point("TOPLEFT", 51, 2) - MacroPopupScrollFrame.Panel:Point("BOTTOMRIGHT", -4, 4) - MacroButtonScrollFrame:SetBasicPanel() - MacroPopupEditBox:SetEditboxTemplate() - MacroPopupNameLeft:SetTexture(0,0,0,0) - MacroPopupNameMiddle:SetTexture(0,0,0,0) - MacroPopupNameRight:SetTexture(0,0,0,0) - MacroFrameInset:Die() - MacroEditButton:ClearAllPoints() - MacroEditButton:Point("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 10, 0) - STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrame) - MacroPopupFrame:HookScript("OnShow", function(c) - c:ClearAllPoints() - c:Point("TOPLEFT", MacroFrame, "TOPRIGHT", 5, -2) - end) - MacroFrameSelectedMacroButton:RemoveTextures() - MacroFrameSelectedMacroButton:SetSlotTemplate() - MacroFrameSelectedMacroButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - MacroFrameSelectedMacroButtonIcon:FillInner() - MacroFrameCharLimitText:ClearAllPoints() - MacroFrameCharLimitText:Point("BOTTOM", MacroFrameTextBackground, -25, -35) - for b = 1, MAX_ACCOUNT_MACROS do - local d = _G["MacroButton"..b] - local e = _G["MacroButton"..b.."Icon"] - local f = _G["MacroPopupButton"..b] - local g = _G["MacroPopupButton"..b.."Icon"] - if d then - d:RemoveTextures() - d:SetButtonTemplate() - local level = d:GetFrameLevel() - if(level > 0) then - d.Panel:SetFrameLevel(level - 1) - else - d.Panel:SetFrameLevel(0) - end - d:SetBackdropColor(0, 0, 0, 0) - end - if e then - e:SetTexCoord(0.1, 0.9, 0.1, 0.9) - e:FillInner() - e:SetDrawLayer("OVERLAY") - end - if f then - f:RemoveTextures() - f:SetButtonTemplate() - f:SetBackdropColor(0, 0, 0, 0) - end - if g then - g:SetTexCoord(0.1, 0.9, 0.1, 0.9) - g:FillInner() - end - end -end - ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_MacroUI", MacroUIStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua deleted file mode 100644 index 972bf14..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua +++ /dev/null @@ -1,144 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local function MailFrame_OnUpdate() - for b = 1, ATTACHMENTS_MAX_SEND do - local d = _G["SendMailAttachment"..b] - if not d.styled then - d:RemoveTextures()d:SetFixedPanelTemplate("Default") - d:SetButtonTemplate() - d.styled = true - end - local e = d:GetNormalTexture() - if e then - e:SetTexCoord(0.1, 0.9, 0.1, 0.9) - e:FillInner() - end - end -end ---[[ -########################################################## -MAILBOX STYLER -########################################################## -]]-- -local function MailBoxStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.mail ~= true then return end - - STYLE:ApplyWindowStyle(MailFrame) - - for b = 1, INBOXITEMS_TO_DISPLAY do - local i = _G["MailItem"..b] - i:RemoveTextures() - i:SetPanelTemplate("Inset") - i.Panel:Point("TOPLEFT", 2, 1) - i.Panel:Point("BOTTOMRIGHT", -2, 2) - local d = _G["MailItem"..b.."Button"] - d:RemoveTextures() - d:SetButtonTemplate() - local e = _G["MailItem"..b.."ButtonIcon"] - e:SetTexCoord(0.1, 0.9, 0.1, 0.9) - e:FillInner() - end - STYLE:ApplyCloseButtonStyle(MailFrameCloseButton) - STYLE:ApplyPaginationStyle(InboxPrevPageButton) - STYLE:ApplyPaginationStyle(InboxNextPageButton) - MailFrameTab1:RemoveTextures() - MailFrameTab2:RemoveTextures() - STYLE:ApplyTabStyle(MailFrameTab1) - STYLE:ApplyTabStyle(MailFrameTab2) - SendMailScrollFrame:RemoveTextures(true) - SendMailScrollFrame:SetFixedPanelTemplate("Inset") - STYLE:ApplyScrollFrameStyle(SendMailScrollFrameScrollBar) - SendMailNameEditBox:SetEditboxTemplate() - SendMailSubjectEditBox:SetEditboxTemplate() - SendMailMoneyGold:SetEditboxTemplate() - SendMailMoneySilver:SetEditboxTemplate() - SendMailMoneyCopper:SetEditboxTemplate() - SendMailMoneyBg:Die() - SendMailMoneyInset:RemoveTextures() - - _G["SendMailMoneySilver"]:SetEditboxTemplate() - _G["SendMailMoneySilver"].Panel:Point("TOPLEFT", -2, 1) - _G["SendMailMoneySilver"].Panel:Point("BOTTOMRIGHT", -12, -1) - _G["SendMailMoneySilver"]:SetTextInsets(-1, -1, -2, -2) - - _G["SendMailMoneyCopper"]:SetEditboxTemplate() - _G["SendMailMoneyCopper"].Panel:Point("TOPLEFT", -2, 1) - _G["SendMailMoneyCopper"].Panel:Point("BOTTOMRIGHT", -12, -1) - _G["SendMailMoneyCopper"]:SetTextInsets(-1, -1, -2, -2) - - SendMailNameEditBox.Panel:Point("BOTTOMRIGHT", 2, 4) - SendMailSubjectEditBox.Panel:Point("BOTTOMRIGHT", 2, 0) - SendMailFrame:RemoveTextures() - - hooksecurefunc("SendMailFrame_Update", MailFrame_OnUpdate) - SendMailMailButton:SetButtonTemplate() - SendMailCancelButton:SetButtonTemplate() - OpenMailFrame:RemoveTextures(true) - OpenMailFrame:SetFixedPanelTemplate("Transparent", true) - OpenMailFrameInset:Die() - STYLE:ApplyCloseButtonStyle(OpenMailFrameCloseButton) - OpenMailReportSpamButton:SetButtonTemplate() - OpenMailReplyButton:SetButtonTemplate() - OpenMailDeleteButton:SetButtonTemplate() - OpenMailCancelButton:SetButtonTemplate() - InboxFrame:RemoveTextures() - MailFrameInset:Die() - OpenMailScrollFrame:RemoveTextures(true) - OpenMailScrollFrame:SetFixedPanelTemplate("Default") - STYLE:ApplyScrollFrameStyle(OpenMailScrollFrameScrollBar) - SendMailBodyEditBox:SetTextColor(1, 1, 1) - OpenMailBodyText:SetTextColor(1, 1, 1) - InvoiceTextFontNormal:SetTextColor(1, 1, 1) - OpenMailArithmeticLine:Die() - OpenMailLetterButton:RemoveTextures() - OpenMailLetterButton:SetFixedPanelTemplate("Default") - OpenMailLetterButton:SetButtonTemplate() - OpenMailLetterButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - OpenMailLetterButtonIconTexture:FillInner() - OpenMailMoneyButton:RemoveTextures() - OpenMailMoneyButton:SetFixedPanelTemplate("Default") - OpenMailMoneyButton:SetButtonTemplate() - OpenMailMoneyButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - OpenMailMoneyButtonIconTexture:FillInner() - for b = 1, ATTACHMENTS_MAX_SEND do - local d = _G["OpenMailAttachmentButton"..b] - d:RemoveTextures() - d:SetButtonTemplate() - local e = _G["OpenMailAttachmentButton"..b.."IconTexture"] - if e then - e:SetTexCoord(0.1, 0.9, 0.1, 0.9) - e:FillInner() - end - end - OpenMailReplyButton:Point("RIGHT", OpenMailDeleteButton, "LEFT", -2, 0) - OpenMailDeleteButton:Point("RIGHT", OpenMailCancelButton, "LEFT", -2, 0) - SendMailMailButton:Point("RIGHT", SendMailCancelButton, "LEFT", -2, 0) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(MailBoxStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua deleted file mode 100644 index ee68517..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua +++ /dev/null @@ -1,91 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -FRAME STYLER -########################################################## -]]-- -local function MerchantStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.merchant ~= true then return end - MerchantFrame:RemoveTextures(true) - MerchantFrame:SetPanelTemplate("Halftone", false, nil, 2, 4) - local level = MerchantFrame:GetFrameLevel() - if(level > 0) then - MerchantFrame:SetFrameLevel(level - 1) - else - MerchantFrame:SetFrameLevel(0) - end - MerchantBuyBackItem:RemoveTextures(true) - MerchantBuyBackItem:SetPanelTemplate("Inset", true, 2, 2, 3) - MerchantBuyBackItem.Panel:SetFrameLevel(MerchantBuyBackItem.Panel:GetFrameLevel() + 1) - MerchantBuyBackItemItemButton:RemoveTextures() - MerchantBuyBackItemItemButton:SetButtonTemplate() - MerchantExtraCurrencyInset:RemoveTextures() - MerchantExtraCurrencyBg:RemoveTextures() - MerchantFrameInset:RemoveTextures() - MerchantMoneyBg:RemoveTextures() - MerchantMoneyInset:RemoveTextures() - MerchantFrameInset:SetPanelTemplate("Inset") - MerchantFrameInset.Panel:SetFrameLevel(MerchantFrameInset.Panel:GetFrameLevel() + 1) - STYLE:ApplyDropdownStyle(MerchantFrameLootFilter) - for b = 1, 2 do - STYLE:ApplyTabStyle(_G["MerchantFrameTab"..b]) - end - for b = 1, 12 do - local d = _G["MerchantItem"..b.."ItemButton"] - local e = _G["MerchantItem"..b.."ItemButtonIconTexture"] - local o = _G["MerchantItem"..b]o:RemoveTextures(true) - o:SetFixedPanelTemplate("Inset") - d:RemoveTextures() - d:SetButtonTemplate() - d:Point("TOPLEFT", o, "TOPLEFT", 4, -4) - e:SetTexCoord(0.1, 0.9, 0.1, 0.9) - e:FillInner() - _G["MerchantItem"..b.."MoneyFrame"]:ClearAllPoints() - _G["MerchantItem"..b.."MoneyFrame"]:Point("BOTTOMLEFT", d, "BOTTOMRIGHT", 3, 0) - end - MerchantBuyBackItemItemButton:RemoveTextures() - MerchantBuyBackItemItemButton:SetButtonTemplate() - MerchantBuyBackItemItemButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - MerchantBuyBackItemItemButtonIconTexture:FillInner() - MerchantRepairItemButton:SetButtonTemplate() - for b = 1, MerchantRepairItemButton:GetNumRegions()do - local p = select(b, MerchantRepairItemButton:GetRegions()) - if p:GetObjectType() == "Texture"then - p:SetTexCoord(0.04, 0.24, 0.06, 0.5) - p:FillInner() - end - end MerchantGuildBankRepairButton:SetButtonTemplate() - MerchantGuildBankRepairButtonIcon:SetTexCoord(0.61, 0.82, 0.1, 0.52) - MerchantGuildBankRepairButtonIcon:FillInner() - MerchantRepairAllButton:SetButtonTemplate() - MerchantRepairAllIcon:SetTexCoord(0.34, 0.1, 0.34, 0.535, 0.535, 0.1, 0.535, 0.535) - MerchantRepairAllIcon:FillInner() - MerchantFrame:Width(360) - STYLE:ApplyCloseButtonStyle(MerchantFrameCloseButton, MerchantFrame.Panel) - STYLE:ApplyPaginationStyle(MerchantNextPageButton) - STYLE:ApplyPaginationStyle(MerchantPrevPageButton) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(MerchantStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua deleted file mode 100644 index 807a9c5..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua +++ /dev/null @@ -1,379 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local PBAB_WIDTH = 382; -local PBAB_HEIGHT = 72; -local PetBattleActionBar = CreateFrame("Frame", "SVUI_PetBattleActionBar", UIParent) - -local function PetBattleButtonHelper(frame) - frame:SetPanelTemplate("Blackout") - frame:SetNormalTexture("") - frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.Icon:SetDrawLayer('BORDER') - frame.Icon:SetParent(frame.Panel) - if(frame.SelectedHighlight) then frame.SelectedHighlight:SetAlpha(0) end - if(frame.checked) then frame.checked = true end - if(frame.pushed) then frame.pushed:FillInner(frame.Panel) end - if(frame.hover) then frame.hover:FillInner(frame.Panel) end - frame:SetFrameStrata('LOW') -end ---[[ -########################################################## -PETBATTLE STYLER -########################################################## -]]-- -local function PetBattleStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.petbattleui ~= true then - return - end - - local PetBattleFrame = _G["PetBattleFrame"]; - local BottomFrame = PetBattleFrame.BottomFrame; - local ActiveFramesList = { PetBattleFrame.ActiveAlly, PetBattleFrame.ActiveEnemy } - local StandardFramesList = { PetBattleFrame.Ally2, PetBattleFrame.Ally3, PetBattleFrame.Enemy2, PetBattleFrame.Enemy3 } - - STYLE:ApplyCloseButtonStyle(FloatingBattlePetTooltip.CloseButton) - PetBattleFrame:RemoveTextures() - - for i, frame in pairs(ActiveFramesList) do - if(not frame.isStyled) then - frame.Border:SetAlpha(0) - frame.Border2:SetAlpha(0) - frame.healthBarWidth = 300; - - frame.IconBackdrop = CreateFrame("Frame", nil, frame) - frame.IconBackdrop:SetFrameLevel(0) - frame.IconBackdrop:WrapOuter(frame.Icon, 3, 3) - frame.IconBackdrop:SetSlotTemplate(true, 3, 0, 0, true); - - frame.IconBackdrop.Panel:SetFixedPanelTemplate("Blackout") - - frame.BorderFlash:Die() - frame.HealthBarBG:Die() - frame.HealthBarFrame:Die() - frame.HealthBarBackdrop = CreateFrame("Frame", nil, frame) - frame.HealthBarBackdrop:SetFrameLevel(frame:GetFrameLevel()-1) - frame.HealthBarBackdrop:SetFixedPanelTemplate("Blackout") - frame.HealthBarBackdrop:Width(frame.healthBarWidth+(2)) - frame.ActualHealthBar:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) - frame.PetTypeFrame = CreateFrame("Frame", nil, frame) - frame.PetTypeFrame:Size(100, 23) - frame.PetTypeFrame.text = frame.PetTypeFrame:CreateFontString(nil, 'OVERLAY') - frame.PetTypeFrame.text:SetFont(SV.Media.font.roboto, 12, "OUTLINE") - frame.PetTypeFrame.text:SetText("") - frame.ActualHealthBar:ClearAllPoints() - frame.Name:SetFontObject(SystemFont_Shadow_Outline_Huge2) - frame.Name:ClearAllPoints() - frame.FirstAttack = frame:CreateTexture(nil, "ARTWORK") - frame.FirstAttack:Size(30) - frame.FirstAttack:SetTexture("Interface\\PetBattles\\PetBattle-StatIcons") - if i == 1 then - frame.HealthBarBackdrop:Point('TOPLEFT', frame.ActualHealthBar, 'TOPLEFT', -1, 1) - frame.HealthBarBackdrop:Point('BOTTOMLEFT', frame.ActualHealthBar, 'BOTTOMLEFT', -1, -1) - frame.ActualHealthBar:SetVertexColor(171/255, 214/255, 116/255) - PetBattleFrame.Ally2.iconPoint = frame.IconBackdrop; - PetBattleFrame.Ally3.iconPoint = frame.IconBackdrop; - frame.ActualHealthBar:Point('BOTTOMLEFT', frame.Icon, 'BOTTOMRIGHT', 10, 0) - frame.Name:Point('BOTTOMLEFT', frame.ActualHealthBar, 'TOPLEFT', 0, 8) - frame.PetTypeFrame:SetPoint("BOTTOMRIGHT", frame.HealthBarBackdrop, "TOPRIGHT", 0, 4) - frame.PetTypeFrame.text:SetPoint("RIGHT") - frame.FirstAttack:SetPoint("LEFT", frame.HealthBarBackdrop, "RIGHT", 5, 0) - frame.FirstAttack:SetTexCoord(frame.SpeedIcon:GetTexCoord()) - frame.FirstAttack:SetVertexColor(.1, .1, .1, 1) - else - frame.HealthBarBackdrop:Point('TOPRIGHT', frame.ActualHealthBar, 'TOPRIGHT', 1, 1) - frame.HealthBarBackdrop:Point('BOTTOMRIGHT', frame.ActualHealthBar, 'BOTTOMRIGHT', 1, -1) - frame.ActualHealthBar:SetVertexColor(196/255, 30/255, 60/255) - PetBattleFrame.Enemy2.iconPoint = frame.IconBackdrop; - PetBattleFrame.Enemy3.iconPoint = frame.IconBackdrop; - frame.ActualHealthBar:Point('BOTTOMRIGHT', frame.Icon, 'BOTTOMLEFT', -10, 0) - frame.Name:Point('BOTTOMRIGHT', frame.ActualHealthBar, 'TOPRIGHT', 0, 8) - frame.PetTypeFrame:SetPoint("BOTTOMLEFT", frame.HealthBarBackdrop, "TOPLEFT", 2, 4) - frame.PetTypeFrame.text:SetPoint("LEFT") - frame.FirstAttack:SetPoint("RIGHT", frame.HealthBarBackdrop, "LEFT", -5, 0) - frame.FirstAttack:SetTexCoord(.5, 0, .5, 1) - frame.FirstAttack:SetVertexColor(.1, .1, .1, 1) - end - frame.HealthText:ClearAllPoints() - frame.HealthText:SetPoint('CENTER', frame.HealthBarBackdrop, 'CENTER') - frame.PetType:SetFrameLevel(frame.PetTypeFrame:GetFrameLevel()+2) - frame.PetType:ClearAllPoints() - frame.PetType:SetAllPoints(frame.PetTypeFrame) - frame.PetType:SetAlpha(0) - frame.LevelUnderlay:SetAlpha(0) - frame.Level:SetFontObject(NumberFont_Outline_Huge) - frame.Level:ClearAllPoints() - frame.Level:Point('BOTTOMLEFT', frame.Icon, 'BOTTOMLEFT', -2, -2) - if frame.SpeedIcon then - frame.SpeedIcon:ClearAllPoints() - frame.SpeedIcon:SetPoint("CENTER") - frame.SpeedIcon:SetAlpha(0) - frame.SpeedUnderlay:SetAlpha(0) - end - frame.isStyled = true - end - end - - for _, frame in pairs(StandardFramesList) do - if(not frame.hasTempBG) then - frame.BorderAlive:SetAlpha(0) - frame.HealthBarBG:SetAlpha(0) - frame.HealthDivider:SetAlpha(0) - frame:Size(40) - - frame.IconBackdrop = CreateFrame("Frame", nil, frame) - frame.IconBackdrop:SetFrameLevel(0) - frame.IconBackdrop:WrapOuter(frame, 2, 2) - frame.IconBackdrop:SetSlotTemplate(true, 2, 0, 0, true); - - frame.IconBackdrop.Panel:SetFixedPanelTemplate("Blackout") - - frame:ClearAllPoints() - frame.healthBarWidth = 40; - frame.ActualHealthBar:ClearAllPoints() - frame.ActualHealthBar:SetPoint("TOPLEFT", frame.IconBackdrop, 'BOTTOMLEFT', 2, -3) - frame.ActualHealthBar:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) - frame.HealthBarBackdrop = CreateFrame("Frame", nil, frame) - frame.HealthBarBackdrop:SetFrameLevel(frame:GetFrameLevel()-1) - frame.HealthBarBackdrop:SetFixedPanelTemplate("Blackout") - frame.HealthBarBackdrop:Width(frame.healthBarWidth+2) - frame.HealthBarBackdrop:Point('TOPLEFT', frame.ActualHealthBar, 'TOPLEFT', -1, 1) - frame.HealthBarBackdrop:Point('BOTTOMLEFT', frame.ActualHealthBar, 'BOTTOMLEFT', -1, -1) - frame.hasTempBG = true - end - end - - PetBattleActionBar:SetParent(PetBattleFrame) - PetBattleActionBar:SetSize(PBAB_WIDTH, PBAB_HEIGHT) - PetBattleActionBar:EnableMouse(true) - PetBattleActionBar:SetFrameLevel(0) - PetBattleActionBar:SetFrameStrata('BACKGROUND') - PetBattleActionBar:SetFixedPanelTemplate("Blackout") - - if(SuperDockBottomDataAnchor) then - PetBattleActionBar:SetPoint("BOTTOM", SuperDockBottomDataAnchor, "TOP", 0, 4) - else - PetBattleActionBar:SetPoint("BOTTOM", SV.UIParent, "BOTTOM", 0, 4) - end - - PetBattleFrame.TopVersusText:ClearAllPoints() - PetBattleFrame.TopVersusText:SetPoint("TOP", PetBattleFrame, "TOP", 0, -42) - - PetBattleFrame.Ally2:SetPoint("TOPRIGHT", PetBattleFrame.Ally2.iconPoint, "TOPLEFT", -6, -2) - PetBattleFrame.Ally3:SetPoint('TOPRIGHT', PetBattleFrame.Ally2, 'TOPLEFT', -8, 0) - PetBattleFrame.Enemy2:SetPoint("TOPLEFT", PetBattleFrame.Enemy2.iconPoint, "TOPRIGHT", 6, -2) - PetBattleFrame.Enemy3:SetPoint('TOPLEFT', PetBattleFrame.Enemy2, 'TOPRIGHT', 8, 0) - - BottomFrame:RemoveTextures() - BottomFrame.TurnTimer:RemoveTextures() - - BottomFrame.TurnTimer.SkipButton:ClearAllPoints() - BottomFrame.TurnTimer.SkipButton:SetParent(PetBattleActionBar) - BottomFrame.TurnTimer.SkipButton:Size((PBAB_WIDTH * 0.2) - 4, 18) - BottomFrame.TurnTimer.SkipButton:SetPoint("BOTTOMLEFT", PetBattleActionBar.Panel, "TOPLEFT", 2, 2) - BottomFrame.TurnTimer.SkipButton:SetButtonTemplate() - - BottomFrame.TurnTimer:Size(BottomFrame.TurnTimer.SkipButton:GetWidth(), BottomFrame.TurnTimer.SkipButton:GetHeight()) - BottomFrame.TurnTimer:ClearAllPoints() - BottomFrame.TurnTimer:SetPoint("TOP", SV.UIParent, "TOP", 0, -140) - BottomFrame.TurnTimer.TimerText:SetPoint("CENTER") - - BottomFrame.FlowFrame:RemoveTextures() - BottomFrame.MicroButtonFrame:Die() - BottomFrame.Delimiter:RemoveTextures() - - BottomFrame.xpBar:ClearAllPoints() - BottomFrame.xpBar:SetParent(PetBattleActionBar) - BottomFrame.xpBar:Size((PBAB_WIDTH * 0.8) - 4, 16) - BottomFrame.xpBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) - BottomFrame.xpBar:SetPanelTemplate("Bar") - BottomFrame.xpBar:SetPoint("BOTTOMRIGHT", PetBattleActionBar.Panel, "TOPRIGHT", -3, 3) - BottomFrame.xpBar:SetScript("OnShow", function(self) - self:RemoveTextures() - self:SetStatusBarTexture(SV.Media.bar.default) - end) - - for i = 1, 3 do - local pet = BottomFrame.PetSelectionFrame["Pet"..i] - pet.HealthBarBG:SetAlpha(0) - pet.HealthDivider:SetAlpha(0) - pet.ActualHealthBar:SetAlpha(0) - pet.SelectedTexture:SetAlpha(0) - pet.MouseoverHighlight:SetAlpha(0) - pet.Framing:SetAlpha(0) - pet.Icon:SetAlpha(0) - pet.Name:SetAlpha(0) - pet.DeadOverlay:SetAlpha(0) - pet.Level:SetAlpha(0) - pet.HealthText:SetAlpha(0) - end - - PetBattleQueueReadyFrame:RemoveTextures() - PetBattleQueueReadyFrame:SetBasicPanel() - PetBattleQueueReadyFrame.AcceptButton:SetButtonTemplate() - PetBattleQueueReadyFrame.DeclineButton:SetButtonTemplate() - PetBattleQueueReadyFrame.Art:SetTexture([[Interface\PetBattles\PetBattlesQueue]]) - - --[[ TOO MANY GOD DAMN HOOKS ]]-- - hooksecurefunc("PetBattleFrame_UpdateSpeedIndicators", function() - if not PetBattleFrame.ActiveAlly.SpeedIcon:IsShown() and not PetBattleFrame.ActiveEnemy.SpeedIcon:IsShown() then - PetBattleFrame.ActiveAlly.FirstAttack:Hide() - PetBattleFrame.ActiveEnemy.FirstAttack:Hide() - return - end - PetBattleFrame.ActiveAlly.FirstAttack:Show() - if PetBattleFrame.ActiveAlly.SpeedIcon:IsShown() then - PetBattleFrame.ActiveAlly.FirstAttack:SetVertexColor(0, 1, 0, 1) - else - PetBattleFrame.ActiveAlly.FirstAttack:SetVertexColor(.8, 0, .3, 1) - end - PetBattleFrame.ActiveEnemy.FirstAttack:Show() - if PetBattleFrame.ActiveEnemy.SpeedIcon:IsShown() then - PetBattleFrame.ActiveEnemy.FirstAttack:SetVertexColor(0, 1, 0, 1) - else - PetBattleFrame.ActiveEnemy.FirstAttack:SetVertexColor(.8, 0, .3, 1) - end - end) - - hooksecurefunc("PetBattleUnitFrame_UpdatePetType", function(self) - if self.PetType then - local pettype = C_PetBattles.GetPetType(self.petOwner, self.petIndex) - if self.PetTypeFrame then - self.PetTypeFrame.text:SetText(PET_TYPE_SUFFIX[pettype]) - end - end - end) - - hooksecurefunc("PetBattleAuraHolder_Update", function(self) - if ( not self.petOwner or not self.petIndex ) then - self:Hide(); - return; - end - - local nextFrame = 1; - for i=1, C_PetBattles.GetNumAuras(self.petOwner, self.petIndex) do - local auraID, instanceID, turnsRemaining, isBuff = C_PetBattles.GetAuraInfo(self.petOwner, self.petIndex, i); - if ( (isBuff and self.displayBuffs) or (not isBuff and self.displayDebuffs) ) then - local frame = self.frames[nextFrame] - frame.DebuffBorder:Hide() - if not frame.isStyled then - frame:SetSlotTemplate(true, 2, -8,-2) - frame.Icon:FillInner(frame.Panel, 2, 2) - frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.isStyled = true - end - if isBuff then - frame:SetBackdropBorderColor(0, 1, 0) - else - frame:SetBackdropBorderColor(1, 0, 0) - end - frame.Duration:SetFont(SV.Media.font.numbers, 16, "OUTLINE") - frame.Duration:ClearAllPoints() - frame.Duration:SetPoint("BOTTOMLEFT", frame.Icon, "BOTTOMLEFT", 4, 4) - if turnsRemaining > 0 then - frame.Duration:SetText(turnsRemaining) - end - nextFrame = nextFrame + 1 - end - end - end) - - hooksecurefunc("PetBattleWeatherFrame_Update", function(self) - local auraID = C_PetBattles.GetAuraInfo(LE_BATTLE_PET_WEATHER, PET_BATTLE_PAD_INDEX, 1) - if auraID then - self.Icon:Hide() - self.Name:Hide() - self.DurationShadow:Hide() - self.Label:Hide() - self.Duration:SetPoint("CENTER", self, 0, 8) - self:ClearAllPoints() - self:SetPoint("TOP", SV.UIParent, 0, -15) - end - end) - - hooksecurefunc("PetBattleUnitFrame_UpdateDisplay", function(self) - self.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - --Update the pet rarity border - if (self.IconBackdrop) then - local petOwner = self.petOwner; - local petIndex = self.petIndex; - local rarity = C_PetBattles.GetBreedQuality(petOwner, petIndex); - if (ENABLE_COLORBLIND_MODE ~= "1") then - self.IconBackdrop:SetBackdropColor(ITEM_QUALITY_COLORS[rarity-1].r, ITEM_QUALITY_COLORS[rarity-1].g, ITEM_QUALITY_COLORS[rarity-1].b); - self.IconBackdrop:SetBackdropBorderColor(ITEM_QUALITY_COLORS[rarity-1].r, ITEM_QUALITY_COLORS[rarity-1].g, ITEM_QUALITY_COLORS[rarity-1].b); - end - end - end) - - hooksecurefunc("PetBattleAbilityTooltip_Show", function() - SV:AnchorToCursor(PetBattlePrimaryAbilityTooltip) - end) - - hooksecurefunc(BottomFrame.TurnTimer.SkipButton, "SetPoint", function(self, arg1, _, arg2, arg3, arg4) - if (arg1 ~= "BOTTOMLEFT" or arg2 ~= "TOPLEFT" or arg3 ~= 2 or arg4 ~= 2) then - self:ClearAllPoints() - self:SetPoint("BOTTOMLEFT", PetBattleActionBar.Panel, "TOPLEFT", 2, 2) - end - end) - - hooksecurefunc("PetBattlePetSelectionFrame_Show", function() - BottomFrame.PetSelectionFrame:ClearAllPoints() - BottomFrame.PetSelectionFrame:SetPoint("BOTTOM", BottomFrame.xpBar, "TOP", 0, 8) - end) - - hooksecurefunc("PetBattleFrame_UpdateActionBarLayout", function(self) - for i = 1, NUM_BATTLE_PET_ABILITIES do - local actionButton = self.BottomFrame.abilityButtons[i] - PetBattleButtonHelper(actionButton) - actionButton:SetParent(PetBattleActionBar) - actionButton:ClearAllPoints() - if i == 1 then - actionButton:SetPoint("BOTTOMLEFT", 10, 10) - else - local lastActionButton = self.BottomFrame.abilityButtons[i - 1] - actionButton:SetPoint("LEFT", lastActionButton, "RIGHT", 10, 0) - end - end - self.BottomFrame.SwitchPetButton:SetParent(PetBattleActionBar) - self.BottomFrame.SwitchPetButton:ClearAllPoints() - self.BottomFrame.SwitchPetButton:SetPoint("LEFT", self.BottomFrame.abilityButtons[3], "RIGHT", 10, 0) - PetBattleButtonHelper(self.BottomFrame.SwitchPetButton) - self.BottomFrame.CatchButton:SetParent(PetBattleActionBar) - self.BottomFrame.CatchButton:ClearAllPoints() - self.BottomFrame.CatchButton:SetPoint("LEFT", self.BottomFrame.SwitchPetButton, "RIGHT", 10, 0) - PetBattleButtonHelper(self.BottomFrame.CatchButton) - self.BottomFrame.ForfeitButton:SetParent(PetBattleActionBar) - self.BottomFrame.ForfeitButton:ClearAllPoints() - self.BottomFrame.ForfeitButton:SetPoint("LEFT", self.BottomFrame.CatchButton, "RIGHT", 10, 0) - PetBattleButtonHelper(self.BottomFrame.ForfeitButton) - end) - - SV.SVTip:ReLoad() -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(PetBattleStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua deleted file mode 100644 index ec4aecb..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua +++ /dev/null @@ -1,54 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -PETITIONFRAME STYLER -########################################################## -]]-- -local function PetitionFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.petition ~= true then - return - end - PetitionFrame:RemoveTextures(true) - PetitionFrame:SetFixedPanelTemplate("Transparent", true) - PetitionFrameInset:Die() - PetitionFrameSignButton:SetButtonTemplate() - PetitionFrameRequestButton:SetButtonTemplate() - PetitionFrameRenameButton:SetButtonTemplate() - PetitionFrameCancelButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(PetitionFrameCloseButton) - PetitionFrameCharterTitle:SetTextColor(1, 1, 0) - PetitionFrameCharterName:SetTextColor(1, 1, 1) - PetitionFrameMasterTitle:SetTextColor(1, 1, 0) - PetitionFrameMasterName:SetTextColor(1, 1, 1) - PetitionFrameMemberTitle:SetTextColor(1, 1, 0) - for g = 1, 9 do - _G["PetitionFrameMemberName"..g]:SetTextColor(1, 1, 1) - end - PetitionFrameInstructions:SetTextColor(1, 1, 1) - PetitionFrameRenameButton:Point("LEFT", PetitionFrameRequestButton, "RIGHT", 3, 0) - PetitionFrameRenameButton:Point("RIGHT", PetitionFrameCancelButton, "LEFT", -3, 0) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(PetitionFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua deleted file mode 100644 index fac1626..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua +++ /dev/null @@ -1,275 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local function PetJournal_UpdateMounts() - for b = 1, #MountJournal.ListScrollFrame.buttons do - local d = _G["MountJournalListScrollFrameButton"..b] - local e = _G["MountJournalListScrollFrameButton"..b.."Name"] - if d.selectedTexture:IsShown() then - e:SetTextColor(1, 1, 0) - if d.Panel then - d:SetBackdropBorderColor(1, 1, 0) - end - if d.IconShadow then - d.IconShadow:SetBackdropBorderColor(1, 1, 0) - end - else - e:SetTextColor(1, 1, 1) - if d.Panel then - d:SetBackdropBorderColor(0,0,0,1) - end - if d.IconShadow then - d.IconShadow:SetBackdropBorderColor(0,0,0,1) - end - end - end -end - -local function PetJournal_UpdatePets() - local u = PetJournal.listScroll.buttons; - local isWild = PetJournal.isWild; - for b = 1, #u do - local v = u[b].index; - if not v then - break - end - local d = _G["PetJournalListScrollFrameButton"..b] - local e = _G["PetJournalListScrollFrameButton"..b.."Name"] - local w, x, y, z, level, favorite, A, B, C, D, E, F, G, H, I = C_PetJournal.GetPetInfoByIndex(v, isWild) - if w ~= nil then - local J, K, L, M, N = C_PetJournal.GetPetStats(w) - if d.selectedTexture:IsShown() then - e:SetTextColor(1, 1, 0) - else - e:SetTextColor(1, 1, 1) - end - if N then - local color = ITEM_QUALITY_COLORS[N-1] - if d.Panel then - d.Panel:SetBackdropBorderColor(color.r, color.g, color.b) - end - if d.IconShadow then - d.IconShadow:SetBackdropBorderColor(color.r, color.g, color.b) - end - else - if d.Panel then - d.Panel:SetBackdropBorderColor(1, 1, 0, 0.5) - end - if d.IconShadow then - d.IconShadow:SetBackdropBorderColor(1, 1, 0, 0.5) - end - end - end - end -end ---[[ -########################################################## -FRAME STYLER -########################################################## -]]-- -local function PetJournalStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.mounts ~= true then return end - - STYLE:ApplyWindowStyle(PetJournalParent) - - PetJournalParentPortrait:Hide() - STYLE:ApplyTabStyle(PetJournalParentTab1) - STYLE:ApplyTabStyle(PetJournalParentTab2) - STYLE:ApplyCloseButtonStyle(PetJournalParentCloseButton) - - MountJournal:RemoveTextures() - MountJournal.LeftInset:RemoveTextures() - MountJournal.RightInset:RemoveTextures() - MountJournal.MountDisplay:RemoveTextures() - MountJournal.MountDisplay.ShadowOverlay:RemoveTextures() - MountJournal.MountCount:RemoveTextures() - MountJournalListScrollFrame:RemoveTextures() - MountJournalMountButton:SetButtonTemplate() - MountJournalSearchBox:SetEditboxTemplate() - - STYLE:ApplyScrollFrameStyle(MountJournalListScrollFrameScrollBar) - MountJournal.MountDisplay:SetFixedPanelTemplate("ModelComic") - - for i = 1, #MountJournal.ListScrollFrame.buttons do - local button = _G["MountJournalListScrollFrameButton"..i] - if(button) then - STYLE:ApplyItemButtonStyle(button, nil, true, true) - local bar = _G["SVUI_MountSelectBar"..i] - if(bar) then bar:SetParent(button.Panel) end - end - end - - hooksecurefunc("MountJournal_UpdateMountList", PetJournal_UpdateMounts) - MountJournalListScrollFrame:HookScript("OnVerticalScroll", PetJournal_UpdateMounts) - MountJournalListScrollFrame:HookScript("OnMouseWheel", PetJournal_UpdateMounts) - PetJournalSummonButton:RemoveTextures() - PetJournalFindBattle:RemoveTextures() - PetJournalSummonButton:SetButtonTemplate() - PetJournalFindBattle:SetButtonTemplate() - PetJournalRightInset:RemoveTextures() - PetJournalLeftInset:RemoveTextures() - - for i = 1, 3 do - local button = _G["PetJournalLoadoutPet" .. i .. "HelpFrame"] - button:RemoveTextures() - end - - PetJournalTutorialButton:Die() - PetJournal.PetCount:RemoveTextures() - PetJournalSearchBox:SetEditboxTemplate() - PetJournalFilterButton:RemoveTextures(true) - PetJournalFilterButton:SetButtonTemplate() - PetJournalListScrollFrame:RemoveTextures() - STYLE:ApplyScrollFrameStyle(PetJournalListScrollFrameScrollBar) - - for i = 1, #PetJournal.listScroll.buttons do - local button = _G["PetJournalListScrollFrameButton" .. i] - local favorite = _G["PetJournalListScrollFrameButton" .. i .. "Favorite"] - STYLE:ApplyItemButtonStyle(button, false, true) - if(favorite) then - local fg = CreateFrame("Frame", nil, button) - fg:SetSize(40,40) - fg:SetPoint("TOPLEFT", button, "TOPLEFT", -1, 1) - fg:SetFrameLevel(button:GetFrameLevel() + 30) - favorite:SetParent(fg) - button.dragButton.favorite:SetParent(fg) - end - - button.dragButton.levelBG:SetAlpha(0) - button.dragButton.level:SetParent(button) - button.petTypeIcon:SetParent(button.Panel) - end - - hooksecurefunc('PetJournal_UpdatePetList', PetJournal_UpdatePets) - PetJournalListScrollFrame:HookScript("OnVerticalScroll", PetJournal_UpdatePets) - PetJournalListScrollFrame:HookScript("OnMouseWheel", PetJournal_UpdatePets) - PetJournalAchievementStatus:DisableDrawLayer('BACKGROUND') - STYLE:ApplyItemButtonStyle(PetJournalHealPetButton, true) - PetJournalHealPetButton.texture:SetTexture([[Interface\Icons\spell_magic_polymorphrabbit]]) - PetJournalLoadoutBorder:RemoveTextures() - - for b = 1, 3 do - local pjPet = _G['PetJournalLoadoutPet'..b] - pjPet:RemoveTextures() - pjPet.petTypeIcon:SetPoint('BOTTOMLEFT', 2, 2) - pjPet.dragButton:WrapOuter(_G['PetJournalLoadoutPet'..b..'Icon']) - pjPet.hover = true; - pjPet.pushed = true; - pjPet.checked = true; - STYLE:ApplyItemButtonStyle(pjPet, nil, nil, true) - pjPet.setButton:RemoveTextures() - _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:RemoveTextures() - _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:SetPanelTemplate('Default') - _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:SetStatusBarTexture(SV.Media.bar.default) - _G['PetJournalLoadoutPet'..b..'XPBar']:RemoveTextures() - _G['PetJournalLoadoutPet'..b..'XPBar']:SetPanelTemplate('Default') - _G['PetJournalLoadoutPet'..b..'XPBar']:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - _G['PetJournalLoadoutPet'..b..'XPBar']:SetFrameLevel(_G['PetJournalLoadoutPet'..b..'XPBar']:GetFrameLevel()+2) - for v = 1, 3 do - local s = _G['PetJournalLoadoutPet'..b..'Spell'..v] - STYLE:ApplyItemButtonStyle(s) - s.FlyoutArrow:SetTexture([[Interface\Buttons\ActionBarFlyoutButton]]) - _G['PetJournalLoadoutPet'..b..'Spell'..v..'Icon']:FillInner(s) - s.Panel:SetFrameLevel(s:GetFrameLevel() + 1) - _G['PetJournalLoadoutPet'..b..'Spell'..v..'Icon']:SetParent(s.Panel) - end - end - - PetJournalSpellSelect:RemoveTextures() - - for b = 1, 2 do - local Q = _G['PetJournalSpellSelectSpell'..b] - STYLE:ApplyItemButtonStyle(Q) - _G['PetJournalSpellSelectSpell'..b..'Icon']:FillInner(Q) - _G['PetJournalSpellSelectSpell'..b..'Icon']:SetDrawLayer('BORDER') - end - - PetJournalPetCard:RemoveTextures() - STYLE:ApplyItemButtonStyle(PetJournalPetCard, nil, nil, true) - PetJournalPetCardInset:RemoveTextures() - PetJournalPetCardPetInfo.levelBG:SetAlpha(0) - PetJournalPetCardPetInfoIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - STYLE:ApplyItemButtonStyle(PetJournalPetCardPetInfo, nil, true, true) - local fg = CreateFrame("Frame", nil, PetJournalPetCardPetInfo) - fg:SetSize(40,40) - fg:SetPoint("TOPLEFT", PetJournalPetCardPetInfo, "TOPLEFT", -1, 1) - fg:SetFrameLevel(PetJournalPetCardPetInfo:GetFrameLevel() + 30) - PetJournalPetCardPetInfo.favorite:SetParent(fg) - PetJournalPetCardPetInfo.Panel:WrapOuter(PetJournalPetCardPetInfoIcon) - PetJournalPetCardPetInfoIcon:SetParent(PetJournalPetCardPetInfo.Panel) - PetJournalPetCardPetInfo.level:SetParent(PetJournalPetCardPetInfo.Panel) - local R = PetJournalPrimaryAbilityTooltip;R.Background:SetTexture(0,0,0,0) - if R.Delimiter1 then - R.Delimiter1:SetTexture(0,0,0,0) - R.Delimiter2:SetTexture(0,0,0,0) - end - R.BorderTop:SetTexture(0,0,0,0) - R.BorderTopLeft:SetTexture(0,0,0,0) - R.BorderTopRight:SetTexture(0,0,0,0) - R.BorderLeft:SetTexture(0,0,0,0) - R.BorderRight:SetTexture(0,0,0,0) - R.BorderBottom:SetTexture(0,0,0,0) - R.BorderBottomRight:SetTexture(0,0,0,0) - R.BorderBottomLeft:SetTexture(0,0,0,0) - R:SetFixedPanelTemplate("Transparent", true) - for b = 1, 6 do - local S = _G['PetJournalPetCardSpell'..b] - S:SetFrameLevel(S:GetFrameLevel() + 2) - S:DisableDrawLayer('BACKGROUND') - S:SetPanelTemplate('Transparent') - S.Panel:SetAllPoints() - S.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - S.icon:FillInner(S.Panel) - end - PetJournalPetCardHealthFrame.healthBar:RemoveTextures() - PetJournalPetCardHealthFrame.healthBar:SetPanelTemplate('Default') - PetJournalPetCardHealthFrame.healthBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - PetJournalPetCardXPBar:RemoveTextures() - PetJournalPetCardXPBar:SetPanelTemplate('Default') - PetJournalPetCardXPBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - - if(SV.GameVersion >= 60000) then - STYLE:ApplyTabStyle(PetJournalParentTab3) - ToyBox:RemoveTextures() - ToyBoxProgressBar:SetPanelTemplate("Bar", true) - ToyBoxSearchBox:SetEditboxTemplate() - ToyBoxFilterButton:SetButtonTemplate() - STYLE:ApplyDropdownStyle(ToyBoxFilterDropDown) - ToyBoxIconsFrame:SetBasicPanel() - - for i = 1, 18 do - local gName = ("ToySpellButton%d"):format(i) - local button = _G[gName] - if(button) then - button:SetButtonTemplate() - end - end - end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_PetJournal", PetJournalStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua deleted file mode 100644 index e296f8e..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua +++ /dev/null @@ -1,51 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -PETSTABLE STYLER -########################################################## -]]-- -local function PetStableStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.stable ~= true then return end - PetStableFrame:RemoveTextures() - PetStableFrameInset:RemoveTextures() - PetStableLeftInset:RemoveTextures() - PetStableBottomInset:RemoveTextures() - PetStableFrame:SetPanelTemplate("Halftone") - PetStableFrameInset:SetFixedPanelTemplate('Inset') - STYLE:ApplyCloseButtonStyle(PetStableFrameCloseButton) - PetStablePrevPageButton:SetButtonTemplate() - PetStableNextPageButton:SetButtonTemplate() - STYLE:ApplyPaginationStyle(PetStablePrevPageButton) - STYLE:ApplyPaginationStyle(PetStableNextPageButton) - for j = 1, NUM_PET_ACTIVE_SLOTS do - STYLE:ApplyItemButtonStyle(_G['PetStableActivePet'..j], true) - end - for j = 1, NUM_PET_STABLE_SLOTS do - STYLE:ApplyItemButtonStyle(_G['PetStableStabledPet'..j], true) - end - PetStableSelectedPetIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(PetStableStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua deleted file mode 100644 index f7d643e..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua +++ /dev/null @@ -1,164 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -PVP STYLER -########################################################## -]]-- --- LoadAddOn("Blizzard_PVPUI") - -local function PVPFrameStyle() - if (SV.db[Schema] and (SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.pvp ~= true)) then - return - end - - STYLE:ApplyWindowStyle(PVPUIFrame, true) - - STYLE:ApplyCloseButtonStyle(PVPUIFrameCloseButton) - - for g = 1, 2 do - STYLE:ApplyTabStyle(_G["PVPUIFrameTab"..g]) - end - - for i = 1, 3 do - local btn = _G["PVPQueueFrameCategoryButton"..i] - if(btn) then - btn.Background:Die() - btn.Ring:Die() - btn:SetButtonTemplate() - btn.Icon:Size(45) - btn.Icon:SetTexCoord(.15, .85, .15, .85) - btn.Icon:SetDrawLayer("OVERLAY", nil, 7) - btn.Panel:WrapOuter(btn.Icon) - end - end - - STYLE:ApplyDropdownStyle(HonorFrameTypeDropDown) - HonorFrame.Inset:RemoveTextures() - HonorFrame.Inset:SetFixedPanelTemplate("Inset") - STYLE:ApplyScrollFrameStyle(HonorFrameSpecificFrameScrollBar) - HonorFrameSoloQueueButton:RemoveTextures() - HonorFrameGroupQueueButton:RemoveTextures() - HonorFrameSoloQueueButton:SetButtonTemplate() - HonorFrameGroupQueueButton:SetButtonTemplate() - HonorFrame.BonusFrame:RemoveTextures() - HonorFrame.BonusFrame.ShadowOverlay:RemoveTextures() - HonorFrame.BonusFrame.RandomBGButton:RemoveTextures() - HonorFrame.BonusFrame.RandomBGButton:SetFixedPanelTemplate("Button") - HonorFrame.BonusFrame.RandomBGButton:SetButtonTemplate() - HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:FillInner() - HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) - - if(SV.GameVersion < 60000) then - PVPUIFrame.Shadows:RemoveTextures() - HonorFrame.BonusFrame.CallToArmsButton:RemoveTextures() - HonorFrame.BonusFrame.CallToArmsButton:SetFixedPanelTemplate("Button") - HonorFrame.BonusFrame.CallToArmsButton:SetButtonTemplate() - HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:FillInner() - HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) - for g = 1, 2 do - local I = HonorFrame.BonusFrame["WorldPVP"..g.."Button"] - I:RemoveTextures() - I:SetFixedPanelTemplate("Button", true) - I:SetButtonTemplate() - I.SelectedTexture:FillInner() - I.SelectedTexture:SetTexture(1, 1, 0, 0.1) - end - PVPUIFrame.LeftInset:RemoveTextures() - end - - HonorFrame.BonusFrame.DiceButton:DisableDrawLayer("ARTWORK") - HonorFrame.BonusFrame.DiceButton:SetHighlightTexture("") - HonorFrame.RoleInset:RemoveTextures() - HonorFrame.RoleInset.DPSIcon.checkButton:SetCheckboxTemplate(true) - HonorFrame.RoleInset.TankIcon.checkButton:SetCheckboxTemplate(true) - HonorFrame.RoleInset.HealerIcon.checkButton:SetCheckboxTemplate(true) - HonorFrame.RoleInset.TankIcon:DisableDrawLayer("OVERLAY") - HonorFrame.RoleInset.TankIcon:DisableDrawLayer("BACKGROUND") - HonorFrame.RoleInset.HealerIcon:DisableDrawLayer("OVERLAY") - HonorFrame.RoleInset.HealerIcon:DisableDrawLayer("BACKGROUND") - HonorFrame.RoleInset.DPSIcon:DisableDrawLayer("OVERLAY") - HonorFrame.RoleInset.DPSIcon:DisableDrawLayer("BACKGROUND") - hooksecurefunc("LFG_PermanentlyDisableRoleButton", function(n) - if n.bg then - n.bg:SetDesaturated(true) - end - end) - - ConquestFrame.Inset:RemoveTextures() - ConquestPointsBarLeft:Die() - ConquestPointsBarRight:Die() - ConquestPointsBarMiddle:Die() - ConquestPointsBarBG:Die() - ConquestPointsBarShadow:Die() - ConquestPointsBar.progress:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - ConquestPointsBar:SetFixedPanelTemplate('Inset') - ConquestPointsBar.Panel:WrapOuter(ConquestPointsBar, nil, -2) - ConquestFrame:RemoveTextures() - ConquestFrame.ShadowOverlay:RemoveTextures() - ConquestJoinButton:RemoveTextures() - ConquestJoinButton:SetButtonTemplate() - ConquestFrame.RatedBG:RemoveTextures() - ConquestFrame.RatedBG:SetFixedPanelTemplate("Inset") - ConquestFrame.RatedBG:SetButtonTemplate() - ConquestFrame.RatedBG.SelectedTexture:FillInner() - ConquestFrame.RatedBG.SelectedTexture:SetTexture(1, 1, 0, 0.1) - WarGamesFrame:RemoveTextures() - WarGamesFrame.RightInset:RemoveTextures() - WarGamesFrameInfoScrollFrame:RemoveTextures() - WarGamesFrameInfoScrollFrameScrollBar:RemoveTextures() - WarGameStartButton:RemoveTextures() - WarGameStartButton:SetButtonTemplate() - STYLE:ApplyScrollFrameStyle(WarGamesFrameScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(WarGamesFrameInfoScrollFrameScrollBar) - WarGamesFrame.HorizontalBar:RemoveTextures() - - PVPReadyDialog:RemoveTextures() - PVPReadyDialog:SetPanelTemplate("Pattern") - PVPReadyDialogEnterBattleButton:SetButtonTemplate() - PVPReadyDialogLeaveQueueButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(PVPReadyDialogCloseButton) - PVPReadyDialogRoleIcon.texture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS") - PVPReadyDialogRoleIcon.texture:SetAlpha(0.5) - - ConquestFrame.Inset:SetFixedPanelTemplate("Inset") - WarGamesFrameScrollFrame:SetPanelTemplate("Inset",false,2,2,6) - - hooksecurefunc("PVPReadyDialog_Display", function(self, l, N, O, P, Q, R) - if R == "DAMAGER" then - PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonDPS.background:GetTexCoord()) - elseif R == "TANK" then - PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonTank.background:GetTexCoord()) - elseif R == "HEALER" then - PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonHealer.background:GetTexCoord()) - end - if P == "ARENA" then - self:SetHeight(100) - end - end) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle('Blizzard_PVPUI', PVPFrameStyle, true) - --- /script StaticPopupSpecial_Show(PVPReadyDialog) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua deleted file mode 100644 index 8e2ceb7..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua +++ /dev/null @@ -1,279 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -credit: Elv. original logic from ElvUI. Adapted to SVUI # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local QuestFrameList = { - "QuestLogFrameAbandonButton", - "QuestLogFramePushQuestButton", - "QuestLogFrameTrackButton", - "QuestLogFrameCancelButton", - "QuestLogFrameCompleteButton" -}; - -local function QuestScrollHelper(b, c, d, e) - b:SetPanelTemplate("Inset") - b.spellTex = b:CreateTexture(nil, 'ARTWORK') - b.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) - if e then - b.spellTex:SetPoint("TOPLEFT", 2, -2) - else - b.spellTex:SetPoint("TOPLEFT") - end - b.spellTex:Size(c or 506, d or 615) - b.spellTex:SetTexCoord(0, 1, 0.02, 1) -end - -local function QueuedWatchFrameItems() - for i=1, WATCHFRAME_NUM_ITEMS do - local button = _G["WatchFrameItem"..i] - local point, relativeTo, relativePoint, xOffset, yOffset = button:GetPoint(1) - button:SetFrameStrata("LOW") - button:SetPoint("TOPRIGHT", relativeTo, "TOPLEFT", -30, -2); - if not button.styled then - button:SetSlotTemplate() - button:SetBackdropColor(0,0,0,0) - _G["WatchFrameItem"..i.."NormalTexture"]:SetAlpha(0) - _G["WatchFrameItem"..i.."IconTexture"]:FillInner() - _G["WatchFrameItem"..i.."IconTexture"]:SetTexCoord(0.1,0.9,0.1,0.9) - SV.Timers:AddCooldown(_G["WatchFrameItem"..i.."Cooldown"]) - button.styled = true - end - end -end - -local QuestRewardScrollFrame_OnShow = function(self) - if(not self.Panel) then - self:SetPanelTemplate("Default") - QuestScrollHelper(self, 509, 630, false) - self:Height(self:GetHeight() - 2) - end - if(self.spellTex) then - self.spellTex:Height(self:GetHeight() + 217) - end -end - -local Hook_QuestInfo_Display = function(self, ...) - for i = 1, MAX_NUM_ITEMS do - local name = ("QuestInfoItem%d"):format(i) - local item = _G[name] - if(item and item:IsShown()) then - local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = item:GetPoint() - if(i == 1) then - item:Point(initialAnchor, anchorParent, relativeAnchor, 0, yPosition) - elseif(relativeAnchor == "BOTTOMLEFT") then - item:Point(initialAnchor, anchorParent, relativeAnchor, 0, -4) - else - item:Point(initialAnchor, anchorParent, relativeAnchor, 4, 0) - end - end - end -end - -local Hook_QuestInfoItem_OnClick = function(self) - QuestInfoItemHighlight:ClearAllPoints() - QuestInfoItemHighlight:SetAllPoints(self) -end - -local Hook_QuestNPCModel = function(self, _, _, _, x, y) - QuestNPCModel:ClearAllPoints() - QuestNPCModel:SetPoint("TOPLEFT", self, "TOPRIGHT", x + 18, y) -end ---[[ -########################################################## -QUEST STYLERS -########################################################## -]]-- -local function QuestGreetingStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.greeting ~= true then - return - end - - QuestFrameGreetingPanel:HookScript("OnShow", function() - QuestFrameGreetingPanel:RemoveTextures() - QuestFrameGreetingGoodbyeButton:SetButtonTemplate() - QuestGreetingFrameHorizontalBreak:Die() - end) -end - -local function QuestFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.quest ~= true then return end - - STYLE:ApplyWindowStyle(QuestFrame, true, true) - - --[[ THIS SECTION NOT WORKING IN WOD ]]-- - if(SV.GameVersion < 60000) then - QuestLogScrollFrame:RemoveTextures() - QuestLogCount:RemoveTextures() - EmptyQuestLogFrame:RemoveTextures() - QuestProgressScrollFrame:RemoveTextures() - QuestLogFrameShowMapButton:RemoveTextures() - QuestLogFrameCompleteButton:RemoveTextures() - - STYLE:ApplyWindowStyle(QuestLogFrame) - QuestLogCount:SetFixedPanelTemplate("Default") - - QuestLogDetailFrameInset:Die() - QuestLogFrameInset:Die() - - QuestLogFrameShowMapButton:SetButtonTemplate() - QuestLogFrameShowMapButton.text:ClearAllPoints() - QuestLogFrameShowMapButton.text:SetPoint("CENTER") - - for _,i in pairs(QuestFrameList)do - _G[i]:SetButtonTemplate() - _G[i]:SetFrameLevel(_G[i]:GetFrameLevel() + 2) - end - - QuestLogFramePushQuestButton:Point("LEFT", QuestLogFrameAbandonButton, "RIGHT", 2, 0) - QuestLogFramePushQuestButton:Point("RIGHT", QuestLogFrameTrackButton, "LEFT", -2, 0) - - QuestLogDetailScrollFrame:HookScript('OnShow', function(k) - if not QuestLogDetailScrollFrame.Panel then - QuestLogDetailScrollFrame:SetPanelTemplate("Default") - QuestScrollHelper(QuestLogDetailScrollFrame, 509, 630, false) - QuestLogDetailScrollFrame:Height(k:GetHeight() - 2) - end - QuestLogDetailScrollFrame.spellTex:Height(k:GetHeight() + 217) - end) - - QuestLogFrame:HookScript("OnShow", function() - if not QuestLogScrollFrame.spellTex then - QuestLogScrollFrame:SetFixedPanelTemplate("Default") - QuestLogScrollFrame.spellTex = QuestLogScrollFrame:CreateTexture(nil, 'ARTWORK') - QuestLogScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBookBG]]) - QuestLogScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2) - QuestLogScrollFrame.spellTex:Size(514, 616) - QuestLogScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) - QuestLogScrollFrame.spellTex2 = QuestLogScrollFrame:CreateTexture(nil, 'BORDER') - QuestLogScrollFrame.spellTex2:SetTexture([[Interface\FrameGeneral\UI-Background-Rock]]) - QuestLogScrollFrame.spellTex2:FillInner() - end - end) - end - --[[ ############################### ]]-- - - STYLE:ApplyCloseButtonStyle(QuestLogFrameCloseButton) - STYLE:ApplyScrollFrameStyle(QuestLogDetailScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(QuestLogScrollFrameScrollBar, 5) - STYLE:ApplyScrollFrameStyle(QuestProgressScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(QuestRewardScrollFrameScrollBar) - - QuestGreetingScrollFrame:RemoveTextures() - STYLE:ApplyScrollFrameStyle(QuestGreetingScrollFrameScrollBar) - - for i = 1, MAX_NUM_ITEMS do - local item = _G["QuestInfoItem"..i] - if(item) then - local cLvl = item:GetFrameLevel() + 1 - item:RemoveTextures() - item:Width(item:GetWidth() - 4) - item:SetFrameLevel(cLvl) - - local tex = _G["QuestInfoItem"..i.."IconTexture"] - if(tex) then - tex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - tex:SetDrawLayer("OVERLAY",1) - tex:SetPoint("TOPLEFT", 2, -2) - tex:Size(tex:GetWidth() - 2, tex:GetHeight() - 2) - end - STYLE:ApplyItemButtonStyle(item) - end - end - - QuestInfoSkillPointFrame:RemoveTextures() - QuestInfoSkillPointFrame:Width(QuestInfoSkillPointFrame:GetWidth() - 4) - - local curLvl = QuestInfoSkillPointFrame:GetFrameLevel() + 1 - QuestInfoSkillPointFrame:SetFrameLevel(curLvl) - QuestInfoSkillPointFrame:SetFixedPanelTemplate("Slot") - QuestInfoSkillPointFrame:SetBackdropColor(1, 1, 0, 0.5) - QuestInfoSkillPointFrameIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - QuestInfoSkillPointFrameIconTexture:SetDrawLayer("OVERLAY") - QuestInfoSkillPointFrameIconTexture:Point("TOPLEFT", 2, -2) - QuestInfoSkillPointFrameIconTexture:Size(QuestInfoSkillPointFrameIconTexture:GetWidth()-2, QuestInfoSkillPointFrameIconTexture:GetHeight()-2) - QuestInfoSkillPointFrameCount:SetDrawLayer("OVERLAY") - QuestInfoItemHighlight:RemoveTextures() - QuestInfoItemHighlight:SetFixedPanelTemplate("Slot") - QuestInfoItemHighlight:SetBackdropBorderColor(1, 1, 0) - QuestInfoItemHighlight:SetBackdropColor(0, 0, 0, 0) - QuestInfoItemHighlight:Size(142, 40) - - hooksecurefunc("QuestInfoItem_OnClick", Hook_QuestInfoItem_OnClick) - hooksecurefunc("QuestInfo_Display", Hook_QuestInfo_Display) - - QuestRewardScrollFrame:HookScript("OnShow", QuestRewardScrollFrame_OnShow) - - QuestFrameInset:Die() - QuestFrameDetailPanel:RemoveTextures(true) - QuestDetailScrollFrame:RemoveTextures(true) - QuestScrollHelper(QuestDetailScrollFrame, 506, 615, true) - QuestProgressScrollFrame:SetFixedPanelTemplate() - QuestScrollHelper(QuestProgressScrollFrame, 506, 615, true) - QuestGreetingScrollFrame:SetFixedPanelTemplate() - QuestScrollHelper(QuestGreetingScrollFrame, 506, 615, true) - QuestDetailScrollChildFrame:RemoveTextures(true) - QuestRewardScrollFrame:RemoveTextures(true) - QuestRewardScrollChildFrame:RemoveTextures(true) - QuestFrameProgressPanel:RemoveTextures(true) - QuestFrameRewardPanel:RemoveTextures(true) - - QuestFrameAcceptButton:SetButtonTemplate() - QuestFrameDeclineButton:SetButtonTemplate() - QuestFrameCompleteButton:SetButtonTemplate() - QuestFrameGoodbyeButton:SetButtonTemplate() - QuestFrameCompleteQuestButton:SetButtonTemplate() - - STYLE:ApplyCloseButtonStyle(QuestFrameCloseButton, QuestFrame.Panel) - - for j = 1, 6 do - local i = _G["QuestProgressItem"..j] - local texture = _G["QuestProgressItem"..j.."IconTexture"] - i:RemoveTextures() - i:SetFixedPanelTemplate("Inset") - i:Width(_G["QuestProgressItem"..j]:GetWidth() - 4) - texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - texture:SetDrawLayer("OVERLAY") - texture:Point("TOPLEFT", 2, -2) - texture:Size(texture:GetWidth() - 2, texture:GetHeight() - 2) - _G["QuestProgressItem"..j.."Count"]:SetDrawLayer("OVERLAY") - end - - QuestNPCModel:RemoveTextures() - QuestNPCModel:SetPanelTemplate("Comic") - - QuestNPCModelTextFrame:RemoveTextures() - QuestNPCModelTextFrame:SetPanelTemplate("Default") - QuestNPCModelTextFrame.Panel:Point("TOPLEFT", QuestNPCModel.Panel, "BOTTOMLEFT", 0, -2) - - hooksecurefunc("QuestFrame_ShowQuestPortrait", Hook_QuestNPCModel) - -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(QuestFrameStyle) -STYLE:SaveCustomStyle(QuestGreetingStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua deleted file mode 100644 index 05c420e..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua +++ /dev/null @@ -1,102 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local RaidGroupList = { - "RaidGroup1", - "RaidGroup2", - "RaidGroup3", - "RaidGroup4", - "RaidGroup5", - "RaidGroup6", - "RaidGroup7", - "RaidGroup8" -}; - -local RaidInfoFrameList = { - "RaidFrameConvertToRaidButton", - "RaidFrameRaidInfoButton", - "RaidFrameNotInRaidRaidBrowserButton", - "RaidInfoExtendButton", - "RaidInfoCancelButton" -}; ---[[ -########################################################## -RAID STYLERS -########################################################## -]]-- -local function RaidUIStyle() - if InCombatLockdown() then return end - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.raid ~= true then return end - for _,group in pairs(RaidGroupList)do - if _G[group] then - _G[group]:RemoveTextures() - for i = 1, 5 do - local name = ("%sSlot%d"):format(group, i) - local slot = _G[name] - if(slot) then - slot:RemoveTextures() - slot:SetPanelTemplate("Inset", true) - end - end - end - end -end - -local function RaidInfoStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.nonraid ~= true then - return - end - - _G["RaidInfoFrame"]:RemoveTextures() - _G["RaidInfoInstanceLabel"]:RemoveTextures() - _G["RaidInfoIDLabel"]:RemoveTextures() - _G["RaidInfoScrollFrameScrollBarBG"]:Die() - _G["RaidInfoScrollFrameScrollBarTop"]:Die() - _G["RaidInfoScrollFrameScrollBarBottom"]:Die() - _G["RaidInfoScrollFrameScrollBarMiddle"]:Die() - - for g = 1, #RaidInfoFrameList do - if _G[RaidInfoFrameList[g]] then - _G[RaidInfoFrameList[g]]:SetButtonTemplate() - end - end - - RaidInfoScrollFrame:RemoveTextures() - RaidInfoFrame:SetBasicPanel() - RaidInfoFrame.Panel:Point("TOPLEFT", RaidInfoFrame, "TOPLEFT") - RaidInfoFrame.Panel:Point("BOTTOMRIGHT", RaidInfoFrame, "BOTTOMRIGHT") - - STYLE:ApplyCloseButtonStyle(RaidInfoCloseButton, RaidInfoFrame) - STYLE:ApplyScrollFrameStyle(RaidInfoScrollFrameScrollBar) - - if RaidFrameRaidBrowserButton then RaidFrameRaidBrowserButton:SetButtonTemplate() end - RaidFrameAllAssistCheckButton:SetCheckboxTemplate(true) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_RaidUI", RaidUIStyle) -STYLE:SaveCustomStyle(RaidInfoStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua deleted file mode 100644 index 6ea57b8..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua +++ /dev/null @@ -1,59 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -REFORGING STYLER -########################################################## -]]-- -local function ReforgingStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.reforge ~= true then return end - - STYLE:ApplyWindowStyle(ReforgingFrame, true) - - ReforgingFrame.ButtonFrame:RemoveTextures() - ReforgingFrameReforgeButton:ClearAllPoints() - ReforgingFrameReforgeButton:Point("LEFT", ReforgingFrameRestoreButton, "RIGHT", 2, 0) - ReforgingFrameReforgeButton:Point("BOTTOMRIGHT", -3, 3) - ReforgingFrame.RestoreMessage:SetTextColor(1, 1, 1) - - ReforgingFrameRestoreButton:RemoveTextures() - ReforgingFrameReforgeButton:RemoveTextures() - ReforgingFrameRestoreButton:SetButtonTemplate() - ReforgingFrameReforgeButton:SetButtonTemplate() - - ReforgingFrame.ItemButton:RemoveTextures() - ReforgingFrame.ItemButton:SetSlotTemplate(true) - ReforgingFrame.ItemButton.IconTexture:FillInner() - hooksecurefunc("ReforgingFrame_Update", function(k) - local w, x, u, y, z, A = GetReforgeItemInfo() - if x then - ReforgingFrame.ItemButton.IconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - else - ReforgingFrame.ItemButton.IconTexture:SetTexture(0,0,0,0) - end - end) - STYLE:ApplyCloseButtonStyle(ReforgingFrameCloseButton) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_ReforgingUI",ReforgingStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua deleted file mode 100644 index ea1731a..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua +++ /dev/null @@ -1,330 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G["SVUI"]; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -FRAME LISTS -########################################################## -]]-- -local bookFrames = { - "SpellBookFrame", - "SpellBookFrameInset", - "SpellBookSpellIconsFrame", - "SpellBookSideTabsFrame", - "SpellBookPageNavigationFrame" -} -local proButtons = { - "PrimaryProfession1SpellButtonTop", - "PrimaryProfession1SpellButtonBottom", - "PrimaryProfession2SpellButtonTop", - "PrimaryProfession2SpellButtonBottom", - "SecondaryProfession1SpellButtonLeft", - "SecondaryProfession1SpellButtonRight", - "SecondaryProfession2SpellButtonLeft", - "SecondaryProfession2SpellButtonRight", - "SecondaryProfession3SpellButtonLeft", - "SecondaryProfession3SpellButtonRight", - "SecondaryProfession4SpellButtonLeft", - "SecondaryProfession4SpellButtonRight" -} - -local proFrames = { - "PrimaryProfession1", - "PrimaryProfession2", - "SecondaryProfession1", - "SecondaryProfession2", - "SecondaryProfession3", - "SecondaryProfession4" -} -local proBars = { - "PrimaryProfession1StatusBar", - "PrimaryProfession2StatusBar", - "SecondaryProfession1StatusBar", - "SecondaryProfession2StatusBar", - "SecondaryProfession3StatusBar", - "SecondaryProfession4StatusBar" -} ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local function Tab_OnEnter(this) - this.backdrop:SetBackdropColor(0.1, 0.8, 0.8) - this.backdrop:SetBackdropBorderColor(0.1, 0.8, 0.8) -end - -local function Tab_OnLeave(this) - this.backdrop:SetBackdropColor(0,0,0,1) - this.backdrop:SetBackdropBorderColor(0,0,0,1) -end - -local function ChangeTabHelper(this) - this:RemoveTextures() - 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) - 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(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 - -local function SkillTabUpdateHelper() - for j = 1, MAX_SKILLLINE_TABS do - local S = _G["SpellBookSkillLineTab"..j] - local h, h, h, h, a0 = GetSpellTabInfo(j) - if a0 then - S:GetNormalTexture():FillInner() - S:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - end -end - -local function AbilityButtonHelper(j) - local i = SpellBookCoreAbilitiesFrame.Abilities[j] - if i.styled then return end - local x = i.iconTexture; - if not InCombatLockdown() then - if not i.properFrameLevel then - i.properFrameLevel = i:GetFrameLevel() + 1 - end - i:SetFrameLevel(i.properFrameLevel) - end - if not i.styled then - for j = 1, i:GetNumRegions()do - local N = select(j, i:GetRegions()) - if N:GetObjectType() == "Texture"then - if N:GetTexture() ~= "Interface\\Buttons\\ActionBarFlyoutButton" then - N:SetTexture(0,0,0,0) - end - end - end - if i.highlightTexture then - hooksecurefunc(i.highlightTexture, "SetTexture", function(k, P, Q, R) - if P == [[Interface\Buttons\ButtonHilight-Square]] then - i.highlightTexture:SetTexture(1, 1, 1, 0.3) - end - end) - end - i.styled = true - - if x then - x:SetTexCoord(0.1, 0.9, 0.1, 0.9) - x:ClearAllPoints() - x:SetAllPoints() - if not i.Panel then - i:SetPanelTemplate("Inset", false, 3, 3, 3) - end - end - - if(i.Name) then i.Name:SetFontObject(NumberFont_Outline_Large) i.Name:SetTextColor(1,1,0) end - if(i.InfoText) then i.InfoText:SetFontObject(NumberFont_Shadow_Small) i.InfoText:SetTextColor(0.9,0.9,0.9) end - end - i.styled = true -end - -local function ButtonUpdateHelper(self, strip) - for j=1, SPELLS_PER_PAGE do - local name = "SpellButton"..j - local i = _G[name] - local x = _G[name.."IconTexture"] - local spellString = _G[name.."SpellName"]; - local subSpellString = _G[name.."SubSpellName"]; - if not InCombatLockdown() then - i:SetFrameLevel(SpellBookFrame:GetFrameLevel() + 5) - end - if strip then - for j = 1, i:GetNumRegions()do - local N = select(j, i:GetRegions()) - if N:GetObjectType() == "Texture"then - if N ~= i.FlyoutArrow then - N:SetTexture(0,0,0,0) - end - end - end - end - if _G[name.."Highlight"] then - _G[name.."Highlight"]:SetTexture(1, 1, 1, 0.3) - _G[name.."Highlight"]:ClearAllPoints() - _G[name.."Highlight"]:SetAllPoints(x) - end - if i.shine then - i.shine:ClearAllPoints() - i.shine:SetPoint('TOPLEFT', i, 'TOPLEFT', -3, 3) - i.shine:SetPoint('BOTTOMRIGHT', i, 'BOTTOMRIGHT', 3, -3) - end - if x then - x:SetTexCoord(0.1, 0.9, 0.1, 0.9) - x:ClearAllPoints() - x:SetAllPoints() - if not i.Panel then - i:SetPanelTemplate("Slot") - end - end - if(spellString) then spellString:SetFontObject(NumberFontNormal) spellString:SetTextColor(1,1,0) end - if(subSpellString) then subSpellString:SetFontObject(NumberFont_Shadow_Small) subSpellString:SetTextColor(0.9,0.9,0.9) end - end -end ---[[ -########################################################## -SPELLBOOK STYLER -########################################################## -]]-- -local function SpellBookStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.spellbook ~= true then return end - - STYLE:ApplyWindowStyle(SpellBookFrame) - STYLE:ApplyCloseButtonStyle(SpellBookFrameCloseButton) - - for _, gName in pairs(bookFrames) do - local frame = _G[gName] - if(frame) then - frame:RemoveTextures() - end - end - - -- SpellBookFrameInset:ClearAllPoints() - -- SpellBookFrameInset:Point("TOPLEFT", SpellBookFrame, "TOPLEFT", 20, -46) - -- SpellBookFrameInset:Point("BOTTOMRIGHT", SpellBookFrame, "BOTTOMRIGHT", -20, 20) - SpellBookFrameInset:SetFixedPanelTemplate("Blackout") - - _G["SpellBookFrameTutorialButton"]:Die() - - for i = 1, 2 do - local frame = _G[("SpellBookPage%d"):format(i)] - if(frame) then - frame:SetDrawLayer('BORDER', 3) - end - end - - STYLE:ApplyPaginationStyle(SpellBookPrevPageButton) - STYLE:ApplyPaginationStyle(SpellBookNextPageButton) - - ButtonUpdateHelper(nil, true) - - hooksecurefunc("SpellButton_UpdateButton", ButtonUpdateHelper) - hooksecurefunc("SpellBook_GetCoreAbilityButton", AbilityButtonHelper) - - for i = 1, MAX_SKILLLINE_TABS do - local tabName = ("SpellBookSkillLineTab%d"):format(i) - local tab = _G[tabName] - local tabFlash = _G[("%sFlash"):format(tabName)] - if(tabFlash) then tabFlash:Die() end - if(tab) then ChangeTabHelper(tab) end - end - - hooksecurefunc('SpellBook_GetCoreAbilitySpecTab', GetSpecTabHelper) - hooksecurefunc("SpellBookFrame_UpdateSkillLineTabs", SkillTabUpdateHelper) - - for _, gName in pairs(proFrames)do - local frame = _G[gName] - local frameMissing = _G[("%sMissing"):format(gName)] - if(frame and frame.missingText) then frame.missingText:SetTextColor(0, 0, 0) end - if(frameMissing) then frameMissing:SetTextColor(1, 1, 0) end - --frame.skillName - if(frame.missingHeader) then frame.missingHeader:SetFontObject(NumberFont_Outline_Large) frame.missingHeader:SetTextColor(1,1,0) end - if(frame.missingText) then frame.missingText:SetFontObject(NumberFont_Shadow_Small) frame.missingText:SetTextColor(0.9,0.9,0.9) end - if(frame.rank) then frame.rank:SetFontObject(NumberFontNormal) frame.rank:SetTextColor(0.9,0.9,0.9) end - if(frame.professionName) then frame.professionName:SetFontObject(NumberFont_Outline_Large) frame.professionName:SetTextColor(1,1,0) end - end - - for _, gName in pairs(proButtons)do - local button = _G[gName] - local buttonTex = _G[("%sIconTexture"):format(gName)] - if(button) then - button:RemoveTextures() - if(buttonTex) then - buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - buttonTex:FillInner() - button:SetFrameLevel(button:GetFrameLevel() + 2) - if not button.Panel then - button:SetPanelTemplate("Inset", false, 3, 3, 3) - button.Panel:SetAllPoints() - end - end - if(button.spellString) then button.spellString:SetFontObject(NumberFontNormal) button.spellString:SetTextColor(1,1,0) end - if(button.subSpellString) then button.subSpellString:SetFontObject(NumberFont_Shadow_Small) button.subSpellString:SetTextColor(0.9,0.9,0.9) end - end - end - - for _, gName in pairs(proBars) do - local bar = _G[gName] - if(bar) then - bar:RemoveTextures() - bar:SetHeight(12) - bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) - bar:SetStatusBarColor(0, 220/255, 0) - bar:SetPanelTemplate("Default") - bar.rankText:ClearAllPoints() - bar.rankText:SetPoint("CENTER") - end - end - - for i = 1, 5 do - local frame = _G[("SpellBookFrameTabButton%d"):format(i)] - if(frame) then - STYLE:ApplyTabStyle(frame) - end - end - - SpellBookFrameTabButton1:ClearAllPoints() - SpellBookFrameTabButton1:SetPoint('TOPLEFT', SpellBookFrame, 'BOTTOMLEFT', 0, 2) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(SpellBookStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua deleted file mode 100644 index d4c8056..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua +++ /dev/null @@ -1,38 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -TAXIFRAME STYLER -########################################################## -]]-- -local function StoreStyle() - -- if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.store ~= true then - -- return - -- end - - --STYLE:ApplyWindowStyle(StoreFrame) - STYLE:ApplyTooltipStyle(StoreTooltip) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_StoreUI", StoreStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua deleted file mode 100644 index eb8977d..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua +++ /dev/null @@ -1,306 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local externaltest = false; - -local ProxyLSMType = { - ["LSM30_Font"] = true, - ["LSM30_Sound"] = true, - ["LSM30_Border"] = true, - ["LSM30_Background"] = true, - ["LSM30_Statusbar"] = true -} - -local ProxyType = { - ["InlineGroup"] = true, - ["TreeGroup"] = true, - ["TabGroup"] = true, - ["SimpleGroup"] = true, - ["Frame"] = true, - ["DropdownGroup"] = true -} - -local function Widget_OnEnter(b) - b:SetBackdropBorderColor(0.1, 0.8, 0.8) -end - -local function Widget_OnLeave(b) - b:SetBackdropBorderColor(0,0,0,1) -end - -local function Widget_ScrollStyle(frame, arg) - return STYLE:ApplyScrollFrameStyle(frame) -end - -local function Widget_ButtonStyle(frame, strip, bypass) - if frame.Left then frame.Left:SetAlpha(0) end - if frame.Middle then frame.Middle:SetAlpha(0) end - if frame.Right then frame.Right:SetAlpha(0) end - if frame.SetNormalTexture then frame:SetNormalTexture("") end - if frame.SetHighlightTexture then frame:SetHighlightTexture(0,0,0,0) end - if frame.SetPushedTexture then frame:SetPushedTexture(0,0,0,0) end - if frame.SetDisabledTexture then frame:SetDisabledTexture("") end - if strip then frame:RemoveTextures() end - if not frame.Panel and not bypass then frame:SetButtonTemplate() end - frame:HookScript("OnEnter", Widget_OnEnter) - frame:HookScript("OnLeave", Widget_OnLeave) -end - -local function Widget_PaginationStyle(...) - STYLE:ApplyPaginationStyle(...) -end - -local NOOP = SV.fubar - -local WidgetButton_OnClick = function(self) - local obj = self.obj; - if(obj and obj.pullout and obj.pullout.frame and (not obj.pullout.frame.Panel)) then - obj.pullout.frame:SetFixedPanelTemplate("Default") - end -end - -local WidgetDropButton_OnClick = function(self) - local obj = self.obj; - local widgetFrame = obj.dropdown - if(widgetFrame and not widgetFrame.Panel) then - widgetFrame:SetBasicPanel() - widgetFrame.Panel:SetPoint("TOPLEFT", widgetFrame, "TOPLEFT", 20, -2) - widgetFrame.Panel:SetPoint("BOTTOMRIGHT", widgetFrame, "BOTTOMRIGHT", -20, 2) - end -end ---[[ -########################################################## -AceGUI STYLE -########################################################## -]]-- -local function StyleAceGUI(event, addon) - assert((LibStub("AceGUI-3.0") and (addon == SV.ConfigID)), "Addon Not Loaded") - local AceGUI = LibStub("AceGUI-3.0") - - local regWidget = AceGUI.RegisterAsWidget; - local regContainer = AceGUI.RegisterAsContainer; - - AceGUI.RegisterAsWidget = function(self, widget) - - local widgetType = widget.type; - - if(widgetType == "MultiLineEditBox") then - local widgetFrame = widget.frame; - widgetFrame:SetFixedPanelTemplate("Default") - if not widget.scrollBG.Panel then - widget.scrollBG:SetBasicPanel() - end - Widget_ButtonStyle(widget.button) - STYLE:ApplyScrollFrameStyle(widget.scrollBar) - widget.scrollBar:SetPoint("RIGHT", widgetFrame, "RIGHT", -4) - widget.scrollBG:SetPoint("TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19) - widget.scrollBG:SetPoint("BOTTOMLEFT", widget.button, "TOPLEFT") - widget.scrollFrame:SetPoint("BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8) - - elseif(widgetType == "CheckBox") then - widget.checkbg:Die() - widget.highlight:Die() - if not widget.styledCheckBG then - widget.styledCheckBG = CreateFrame("Frame", nil, widget.frame) - widget.styledCheckBG:FillInner(widget.check) - widget.styledCheckBG:SetFixedPanelTemplate("Inset") - end - widget.check:SetParent(widget.styledCheckBG) - - elseif(widgetType == "Dropdown") then - local widgetDropdown = widget.dropdown; - local widgetButton = widget.button; - - widgetDropdown:RemoveTextures() - widgetButton:ClearAllPoints() - widgetButton:Point("RIGHT", widgetDropdown, "RIGHT", -20, 0) - widgetButton:SetFrameLevel(widgetButton:GetFrameLevel() + 1) - Widget_PaginationStyle(widgetButton, true) - - if(not widgetDropdown.Panel) then - widgetDropdown:SetBasicPanel() - widgetDropdown.Panel:Point("TOPLEFT", widgetDropdown, "TOPLEFT", 20, -2) - widgetDropdown.Panel:Point("BOTTOMRIGHT", widgetDropdown, "BOTTOMRIGHT", -20, 2) - end - - widgetButton:SetParent(widgetDropdown.Panel) - widget.text:SetParent(widgetDropdown.Panel) - widgetButton:HookScript("OnClick", WidgetButton_OnClick) - - elseif(widgetType == "EditBox") then - local widgetEditbox = widget.editbox; - local boxName = widgetEditbox:GetName() - - if(_G[boxName.."Left"]) then - _G[boxName.."Left"]:Die() - end - - if(_G[boxName.."Middle"]) then - _G[boxName.."Middle"]:Die() - end - - if(_G[boxName.."Right"]) then - _G[boxName.."Right"]:Die() - end - - widgetEditbox:Height(17) - --widgetEditbox:SetFixedPanelTemplate("Default") - Widget_ButtonStyle(widget.button) - - elseif(widgetType == "Button") then - local widgetFrame = widget.frame; - Widget_ButtonStyle(widgetFrame, nil, true) - - if(not widgetFrame.Panel) then - widgetFrame:RemoveTextures() - widgetFrame:SetFixedPanelTemplate("Button", true) - end - widget.text:SetParent(widgetFrame.Panel) - - elseif(widgetType == "Slider") then - local widgetSlider = widget.slider; - local widgetEditbox = widget.editbox; - - if(not widgetSlider.Panel) then - widgetSlider:RemoveTextures() - widgetSlider:SetFixedPanelTemplate("Bar") - end - - widgetSlider:Height(20) - widgetSlider:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - widgetSlider:GetThumbTexture():SetVertexColor(0.8, 0.8, 0.8) - - widgetEditbox:Height(15) - widgetEditbox:SetPoint("TOP", widgetSlider, "BOTTOM", 0, -1) - - -- if(not widgetEditbox.Panel) then - -- widgetEditbox:SetFixedPanelTemplate("Default") - -- end - - widget.lowtext:SetPoint("TOPLEFT", widgetSlider, "BOTTOMLEFT", 2, -2) - widget.hightext:SetPoint("TOPRIGHT", widgetSlider, "BOTTOMRIGHT", -2, -2) - - elseif(ProxyLSMType[widgetType]) then - local widgetFrame = widget.frame; - local dropButton = widgetFrame.dropButton; - - widgetFrame:RemoveTextures() - Widget_PaginationStyle(dropButton, true) - widgetFrame.text:ClearAllPoints() - widgetFrame.text:Point("RIGHT", dropButton, "LEFT", -2, 0) - dropButton:ClearAllPoints() - dropButton:Point("RIGHT", widgetFrame, "RIGHT", -10, -6) - if(not widgetFrame.Panel) then - widgetFrame:SetBasicPanel() - if(widgetType == "LSM30_Font") then - widgetFrame.Panel:Point("TOPLEFT", 20, -17) - elseif(widgetType == "LSM30_Sound") then - widgetFrame.Panel:Point("TOPLEFT", 20, -17) - widget.soundbutton:SetParent(widgetFrame.Panel) - widget.soundbutton:ClearAllPoints() - widget.soundbutton:Point("LEFT", widgetFrame.Panel, "LEFT", 2, 0) - elseif(widgetType == "LSM30_Statusbar") then - widgetFrame.Panel:Point("TOPLEFT", 20, -17) - widget.bar:SetParent(widgetFrame.Panel) - widget.bar:FillInner() - elseif(widgetType == "LSM30_Border" or widgetType == "LSM30_Background") then - widgetFrame.Panel:Point("TOPLEFT", 42, -16) - end - widgetFrame.Panel:Point("BOTTOMRIGHT", dropButton, "BOTTOMRIGHT", 2, -2) - end - dropButton:SetParent(widgetFrame.Panel) - widgetFrame.text:SetParent(widgetFrame.Panel) - dropButton:HookScript("OnClick", WidgetDropButton_OnClick) - end - return regWidget(self, widget) - end - - AceGUI.RegisterAsContainer = function(self, widget) - local widgetType = widget.type; - local widgetParent = widget.content:GetParent() - if widgetType == "ScrollFrame" then - STYLE:ApplyScrollFrameStyle(widget.scrollBar) - elseif widgetType == "Window" then - widgetParent:SetPanelTemplate("Halftone") - elseif(ProxyType[widgetType]) then - if widgetType == "Frame" then - widgetParent:RemoveTextures() - for i = 1, widgetParent:GetNumChildren()do - local childFrame = select(i, widgetParent:GetChildren()) - if childFrame:GetObjectType() == "Button" and childFrame:GetText() then - Widget_ButtonStyle(childFrame) - else - childFrame:RemoveTextures() - end - end - end - - if widget.treeframe then - widget.treeframe:SetBasicPanel() - widgetParent:SetPoint("TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0) - local oldFunc = widget.CreateButton; - widget.CreateButton = function(self) - local newButton = oldFunc(self) - newButton.toggle:RemoveTextures() - newButton.toggle.SetNormalTexture = NOOP; - newButton.toggle.SetPushedTexture = NOOP; - newButton.toggle:SetButtonTemplate() - newButton.toggleText = newButton.toggle:CreateFontString(nil, "OVERLAY") - newButton.toggleText:SetFont([[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]], 19) - newButton.toggleText:SetPoint("CENTER") - newButton.toggleText:SetText("*") - return newButton - end - else - if not externaltest then - widgetParent:SetPanelTemplate("Halftone") - widgetParent.Panel:SetFrameLevel(0) - externaltest = true - else - widgetParent:SetFixedPanelTemplate("Default") - end - end - - if(widgetType == "TabGroup") then - local oldFunc = widget.CreateTab; - widget.CreateTab = function(self, arg) - local newTab = oldFunc(self, arg) - newTab:RemoveTextures() - return newTab - end - end - - if widget.scrollbar then - STYLE:ApplyScrollFrameStyle(widget.scrollBar) - end - end - return regContainer(self, widget) - end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveAddonStyle("ConfigOMatic", StyleAceGUI, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua deleted file mode 100644 index 39f1ff1..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua +++ /dev/null @@ -1,726 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; -local ceil = math.ceil ---[[ -########################################################## -MASSIVE LIST OF LISTS -########################################################## -]]-- -local SystemPopList = { - "StaticPopup1", - "StaticPopup2", - "StaticPopup3" -}; -local SystemDropDownList = { - "DropDownList1MenuBackdrop", - "DropDownList2MenuBackdrop", - "DropDownList1Backdrop", - "DropDownList2Backdrop", -}; -local SystemFrameList1 = { - "GameMenuFrame", - "TicketStatusFrameButton", - "AutoCompleteBox", - "ConsolidatedBuffsTooltip", - "ReadyCheckFrame", - "StackSplitFrame", - "QueueStatusFrame", - "InterfaceOptionsFrame", - "VideoOptionsFrame", - "AudioOptionsFrame", -}; -local SystemFrameList4 = { - "Options", - "Store", - "SoundOptions", - "UIOptions", - "Keybindings", - "Macros", - "Ratings", - "AddOns", - "Logout", - "Quit", - "Continue", - "MacOptions", - "Help", - "WhatsNew", - "Addons" -}; -local SystemFrameList5 = { - "GameMenuFrame", - "InterfaceOptionsFrame", - "AudioOptionsFrame", - "VideoOptionsFrame", -}; -local SystemFrameList6 = { - "VideoOptionsFrameOkay", - "VideoOptionsFrameCancel", - "VideoOptionsFrameDefaults", - "VideoOptionsFrameApply", - "AudioOptionsFrameOkay", - "AudioOptionsFrameCancel", - "AudioOptionsFrameDefaults", - "InterfaceOptionsFrameDefaults", - "InterfaceOptionsFrameOkay", - "InterfaceOptionsFrameCancel", - "ReadyCheckFrameYesButton", - "ReadyCheckFrameNoButton", - "StackSplitOkayButton", - "StackSplitCancelButton", - "RolePollPopupAcceptButton" -}; - -local SystemFrameList13 = { - "VideoOptionsFrameCategoryFrame", - "VideoOptionsFramePanelContainer", - "InterfaceOptionsFrameCategories", - "InterfaceOptionsFramePanelContainer", - "InterfaceOptionsFrameAddOns", - "AudioOptionsSoundPanelPlayback", - "AudioOptionsSoundPanelVolume", - "AudioOptionsSoundPanelHardware", - "AudioOptionsVoicePanelTalking", - "AudioOptionsVoicePanelBinding", - "AudioOptionsVoicePanelListening", -}; -local SystemFrameList14 = { - "InterfaceOptionsFrameTab1", - "InterfaceOptionsFrameTab2", -}; -local SystemFrameList15 = { - "ControlsPanelBlockChatChannelInvites", - "ControlsPanelStickyTargeting", - "ControlsPanelAutoDismount", - "ControlsPanelAutoClearAFK", - "ControlsPanelBlockTrades", - "ControlsPanelBlockGuildInvites", - "ControlsPanelLootAtMouse", - "ControlsPanelAutoLootCorpse", - "ControlsPanelInteractOnLeftClick", - "ControlsPanelAutoOpenLootHistory", - "CombatPanelEnemyCastBarsOnOnlyTargetNameplates", - "CombatPanelEnemyCastBarsNameplateSpellNames", - "CombatPanelAttackOnAssist", - "CombatPanelStopAutoAttack", - "CombatPanelNameplateClassColors", - "CombatPanelTargetOfTarget", - "CombatPanelShowSpellAlerts", - "CombatPanelReducedLagTolerance", - "CombatPanelActionButtonUseKeyDown", - "CombatPanelEnemyCastBarsOnPortrait", - "CombatPanelEnemyCastBarsOnNameplates", - "CombatPanelAutoSelfCast", - "CombatPanelLossOfControl", - "DisplayPanelShowCloak", - "DisplayPanelShowHelm", - "DisplayPanelShowAggroPercentage", - "DisplayPanelPlayAggroSounds", - "DisplayPanelDetailedLootInfo", - "DisplayPanelShowSpellPointsAvg", - "DisplayPanelemphasizeMySpellEffects", - "DisplayPanelShowFreeBagSpace", - "DisplayPanelCinematicSubtitles", - "DisplayPanelRotateMinimap", - "DisplayPanelScreenEdgeFlash", - "DisplayPanelShowAccountAchievments", - "ObjectivesPanelAutoQuestTracking", - "ObjectivesPanelAutoQuestProgress", - "ObjectivesPanelMapQuestDifficulty", - "ObjectivesPanelAdvancedWorldMap", - "ObjectivesPanelWatchFrameWidth", - "SocialPanelProfanityFilter", - "SocialPanelSpamFilter", - "SocialPanelChatBubbles", - "SocialPanelPartyChat", - "SocialPanelChatHoverDelay", - "SocialPanelGuildMemberAlert", - "SocialPanelChatMouseScroll", - "ActionBarsPanelLockActionBars", - "ActionBarsPanelSecureAbilityToggle", - "ActionBarsPanelAlwaysShowActionBars", - "ActionBarsPanelBottomLeft", - "ActionBarsPanelBottomRight", - "ActionBarsPanelRight", - "ActionBarsPanelRightTwo", - "NamesPanelMyName", - "NamesPanelFriendlyPlayerNames", - "NamesPanelFriendlyPets", - "NamesPanelFriendlyGuardians", - "NamesPanelFriendlyTotems", - "NamesPanelUnitNameplatesFriends", - "NamesPanelUnitNameplatesFriendlyGuardians", - "NamesPanelUnitNameplatesFriendlyPets", - "NamesPanelUnitNameplatesFriendlyTotems", - "NamesPanelGuilds", - "NamesPanelGuildTitles", - "NamesPanelTitles", - "NamesPanelNonCombatCreature", - "NamesPanelEnemyPlayerNames", - "NamesPanelEnemyPets", - "NamesPanelEnemyGuardians", - "NamesPanelEnemyTotems", - "NamesPanelUnitNameplatesEnemyPets", - "NamesPanelUnitNameplatesEnemies", - "NamesPanelUnitNameplatesEnemyGuardians", - "NamesPanelUnitNameplatesEnemyTotems", - "CombatTextPanelTargetDamage", - "CombatTextPanelPeriodicDamage", - "CombatTextPanelPetDamage", - "CombatTextPanelHealing", - "CombatTextPanelHealingAbsorbTarget", - "CombatTextPanelHealingAbsorbSelf", - "CombatTextPanelTargetEffects", - "CombatTextPanelOtherTargetEffects", - "CombatTextPanelEnableFCT", - "CombatTextPanelDodgeParryMiss", - "CombatTextPanelDamageReduction", - "CombatTextPanelRepChanges", - "CombatTextPanelReactiveAbilities", - "CombatTextPanelFriendlyHealerNames", - "CombatTextPanelCombatState", - "CombatTextPanelComboPoints", - "CombatTextPanelLowManaHealth", - "CombatTextPanelEnergyGains", - "CombatTextPanelPeriodicEnergyGains", - "CombatTextPanelHonorGains", - "CombatTextPanelAuras", - "BuffsPanelBuffDurations", - "BuffsPanelDispellableDebuffs", - "BuffsPanelCastableBuffs", - "BuffsPanelConsolidateBuffs", - "BuffsPanelShowAllEnemyDebuffs", - "CameraPanelFollowTerrain", - "CameraPanelHeadBob", - "CameraPanelWaterCollision", - "CameraPanelSmartPivot", - "MousePanelInvertMouse", - "MousePanelClickToMove", - "MousePanelWoWMouse", - "HelpPanelShowTutorials", - "HelpPanelLoadingScreenTips", - "HelpPanelEnhancedTooltips", - "HelpPanelBeginnerTooltips", - "HelpPanelShowLuaErrors", - "HelpPanelColorblindMode", - "HelpPanelMovePad", - "BattlenetPanelOnlineFriends", - "BattlenetPanelOfflineFriends", - "BattlenetPanelBroadcasts", - "BattlenetPanelFriendRequests", - "BattlenetPanelConversations", - "BattlenetPanelShowToastWindow", - "StatusTextPanelPlayer", - "StatusTextPanelPet", - "StatusTextPanelParty", - "StatusTextPanelTarget", - "StatusTextPanelAlternateResource", - "StatusTextPanelPercentages", - "StatusTextPanelXP", - "UnitFramePanelPartyBackground", - "UnitFramePanelPartyPets", - "UnitFramePanelArenaEnemyFrames", - "UnitFramePanelArenaEnemyCastBar", - "UnitFramePanelArenaEnemyPets", - "UnitFramePanelFullSizeFocusFrame", - "NamesPanelUnitNameplatesNameplateClassColors", -}; -local SystemFrameList16 ={ - "ControlsPanelAutoLootKeyDropDown", - "CombatPanelTOTDropDown", - "CombatPanelFocusCastKeyDropDown", - "CombatPanelSelfCastKeyDropDown", - "CombatPanelLossOfControlFullDropDown", - "CombatPanelLossOfControlSilenceDropDown", - "CombatPanelLossOfControlInterruptDropDown", - "CombatPanelLossOfControlDisarmDropDown", - "CombatPanelLossOfControlRootDropDown", - "DisplayPanelAggroWarningDisplay", - "DisplayPanelWorldPVPObjectiveDisplay", - "SocialPanelChatStyle", - "SocialPanelWhisperMode", - "SocialPanelTimestamps", - "SocialPanelBnWhisperMode", - "SocialPanelConversationMode", - "ActionBarsPanelPickupActionKeyDropDown", - "NamesPanelNPCNamesDropDown", - "NamesPanelUnitNameplatesMotionDropDown", - "CombatTextPanelFCTDropDown", - "CameraPanelStyleDropDown", - "MousePanelClickMoveStyleDropDown", - "LanguagesPanelLocaleDropDown", - "StatusTextPanelDisplayDropDown" -}; -local SystemFrameList17 = { - "Advanced_MaxFPSCheckBox", - "Advanced_MaxFPSBKCheckBox", - "Advanced_UseUIScale", - "AudioOptionsSoundPanelEnableSound", - "AudioOptionsSoundPanelSoundEffects", - "AudioOptionsSoundPanelErrorSpeech", - "AudioOptionsSoundPanelEmoteSounds", - "AudioOptionsSoundPanelPetSounds", - "AudioOptionsSoundPanelMusic", - "AudioOptionsSoundPanelLoopMusic", - "AudioOptionsSoundPanelAmbientSounds", - "AudioOptionsSoundPanelSoundInBG", - "AudioOptionsSoundPanelReverb", - "AudioOptionsSoundPanelHRTF", - "AudioOptionsSoundPanelEnableDSPs", - "AudioOptionsSoundPanelUseHardware", - "AudioOptionsVoicePanelEnableVoice", - "AudioOptionsVoicePanelEnableMicrophone", - "AudioOptionsVoicePanelPushToTalkSound", - "AudioOptionsSoundPanelPetBattleMusic", - "NetworkOptionsPanelOptimizeSpeed", - "NetworkOptionsPanelUseIPv6", - "NetworkOptionsPanelAdvancedCombatLogging" -}; -local SystemFrameList18 = { - "Graphics_DisplayModeDropDown", - "Graphics_ResolutionDropDown", - "Graphics_RefreshDropDown", - "Graphics_PrimaryMonitorDropDown", - "Graphics_MultiSampleDropDown", - "Graphics_VerticalSyncDropDown", - "Graphics_TextureResolutionDropDown", - "Graphics_FilteringDropDown", - "Graphics_ProjectedTexturesDropDown", - "Graphics_ViewDistanceDropDown", - "Graphics_EnvironmentalDetailDropDown", - "Graphics_GroundClutterDropDown", - "Graphics_ShadowsDropDown", - "Graphics_LiquidDetailDropDown", - "Graphics_SunshaftsDropDown", - "Graphics_ParticleDensityDropDown", - "Graphics_SSAODropDown", - "Advanced_BufferingDropDown", - "Advanced_LagDropDown", - "Advanced_HardwareCursorDropDown", - "Advanced_GraphicsAPIDropDown", - "AudioOptionsSoundPanelHardwareDropDown", - "AudioOptionsSoundPanelSoundChannelsDropDown", - "AudioOptionsVoicePanelInputDeviceDropDown", - "AudioOptionsVoicePanelChatModeDropDown", - "AudioOptionsVoicePanelOutputDeviceDropDown", - "CompactUnitFrameProfilesProfileSelector", - "CompactUnitFrameProfilesGeneralOptionsFrameHealthTextDropdown", - "CompactUnitFrameProfilesGeneralOptionsFrameSortByDropdown", -}; -local SystemFrameList19 = { - "RecordLoopbackSoundButton", - "PlayLoopbackSoundButton", - "AudioOptionsVoicePanelChatMode1KeyBindingButton", - "CompactUnitFrameProfilesSaveButton", - "CompactUnitFrameProfilesDeleteButton", -}; -local SystemFrameList20 = { - "KeepGroupsTogether", - "DisplayIncomingHeals", - "DisplayPowerBar", - "DisplayAggroHighlight", - "UseClassColors", - "DisplayPets", - "DisplayMainTankAndAssist", - "DisplayBorder", - "ShowDebuffs", - "DisplayOnlyDispellableDebuffs", - "AutoActivate2Players", - "AutoActivate3Players", - "AutoActivate5Players", - "AutoActivate10Players", - "AutoActivate15Players", - "AutoActivate25Players", - "AutoActivate40Players", - "AutoActivateSpec1", - "AutoActivateSpec2", - "AutoActivatePvP", - "AutoActivatePvE", -}; -local SystemFrameList21 = { - "Graphics_Quality", - "Advanced_UIScaleSlider", - "Advanced_MaxFPSSlider", - "Advanced_MaxFPSBKSlider", - "AudioOptionsSoundPanelSoundQuality", - "AudioOptionsSoundPanelMasterVolume", - "AudioOptionsSoundPanelSoundVolume", - "AudioOptionsSoundPanelMusicVolume", - "AudioOptionsSoundPanelAmbienceVolume", - "AudioOptionsVoicePanelMicrophoneVolume", - "AudioOptionsVoicePanelSpeakerVolume", - "AudioOptionsVoicePanelSoundFade", - "AudioOptionsVoicePanelMusicFade", - "AudioOptionsVoicePanelAmbienceFade", - "InterfaceOptionsCombatPanelSpellAlertOpacitySlider", - "InterfaceOptionsCombatPanelMaxSpellStartRecoveryOffset", - "InterfaceOptionsBattlenetPanelToastDurationSlider", - "InterfaceOptionsCameraPanelMaxDistanceSlider", - "InterfaceOptionsCameraPanelFollowSpeedSlider", - "InterfaceOptionsMousePanelMouseSensitivitySlider", - "InterfaceOptionsMousePanelMouseLookSpeedSlider", - "OpacityFrameSlider", -}; ---[[ -########################################################## -HELPER FUNCTIONS -########################################################## -]]-- -local function forceBackdropColor(self, r, g, b, a) - if r ~= 0 or g ~= 0 or b ~= 0 or a ~= 0 then - GhostFrame:SetBackdropColor(0,0,0,0) - GhostFrame:SetBackdropBorderColor(0,0,0,0) - end -end ---[[ -########################################################## -SYSTEM WIDGET STYLERS -########################################################## -]]-- -local function SystemPanelQue() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.misc ~= true then return end - - QueueStatusFrame:RemoveTextures() - - for i = 1, #SystemPopList do - local this = _G[SystemPopList[i]] - if(this) then - this:RemoveTextures() - STYLE:ApplyAlertStyle(this) - this:SetBackdropColor(0.8, 0.2, 0.2) - end - end - for i = 1, #SystemDropDownList do - local this = _G[SystemDropDownList[i]] - if(this) then - this:RemoveTextures() - this:SetPanelTemplate("FramedTop") - end - end - for i = 1, #SystemFrameList1 do - local this = _G[SystemFrameList1[i]] - if(this) then - STYLE:ApplyWindowStyle(this) - end - end - - LFDRoleCheckPopup:RemoveTextures() - LFDRoleCheckPopup:SetFixedPanelTemplate() - LFDRoleCheckPopupAcceptButton:SetButtonTemplate() - LFDRoleCheckPopupDeclineButton:SetButtonTemplate() - LFDRoleCheckPopupRoleButtonTank.checkButton:SetCheckboxTemplate(true) - LFDRoleCheckPopupRoleButtonDPS.checkButton:SetCheckboxTemplate(true) - LFDRoleCheckPopupRoleButtonHealer.checkButton:SetCheckboxTemplate(true) - LFDRoleCheckPopupRoleButtonTank.checkButton:SetFrameLevel(LFDRoleCheckPopupRoleButtonTank.checkButton:GetFrameLevel() + 1) - LFDRoleCheckPopupRoleButtonDPS.checkButton:SetFrameLevel(LFDRoleCheckPopupRoleButtonDPS.checkButton:GetFrameLevel() + 1) - LFDRoleCheckPopupRoleButtonHealer.checkButton:SetFrameLevel(LFDRoleCheckPopupRoleButtonHealer.checkButton:GetFrameLevel() + 1) - for i = 1, 3 do - for j = 1, 3 do - _G["StaticPopup"..i.."Button"..j]:SetButtonTemplate() - _G["StaticPopup"..i.."EditBox"]:SetEditboxTemplate() - _G["StaticPopup"..i.."MoneyInputFrameGold"]:SetEditboxTemplate() - _G["StaticPopup"..i.."MoneyInputFrameSilver"]:SetEditboxTemplate() - _G["StaticPopup"..i.."MoneyInputFrameCopper"]:SetEditboxTemplate() - _G["StaticPopup"..i.."EditBox"].Panel:Point("TOPLEFT", -2, -4) - _G["StaticPopup"..i.."EditBox"].Panel:Point("BOTTOMRIGHT", 2, 4) - _G["StaticPopup"..i.."ItemFrameNameFrame"]:Die() - _G["StaticPopup"..i.."ItemFrame"]:GetNormalTexture():Die() - _G["StaticPopup"..i.."ItemFrame"]:SetFixedPanelTemplate("Default") - _G["StaticPopup"..i.."ItemFrame"]:SetButtonTemplate() - _G["StaticPopup"..i.."ItemFrameIconTexture"]:SetTexCoord(0.1,0.9,0.1,0.9 ) - _G["StaticPopup"..i.."ItemFrameIconTexture"]:FillInner() - end - end - for i = 1, #SystemFrameList4 do - local this = _G["GameMenuButton"..SystemFrameList4[i]] - if(this) then - this:SetButtonTemplate() - end - end - if IsAddOnLoaded("OptionHouse") then - GameMenuButtonOptionHouse:SetButtonTemplate() - end - do - GhostFrame:SetButtonTemplate() - GhostFrame:SetBackdropColor(0,0,0,0) - GhostFrame:SetBackdropBorderColor(0,0,0,0) - hooksecurefunc(GhostFrame, "SetBackdropColor", forceBackdropColor) - hooksecurefunc(GhostFrame, "SetBackdropBorderColor", forceBackdropColor) - GhostFrame:ClearAllPoints() - GhostFrame:SetPoint("TOP", SV.UIParent, "TOP", 0, -150) - GhostFrameContentsFrame:SetButtonTemplate() - GhostFrameContentsFrameIcon:SetTexture(0,0,0,0) - local x = CreateFrame("Frame", nil, GhostFrame) - x:SetFrameStrata("MEDIUM") - x:SetFixedPanelTemplate("Default") - x:WrapOuter(GhostFrameContentsFrameIcon) - local tex = x:CreateTexture(nil, "OVERLAY") - tex:SetTexture("Interface\\Icons\\spell_holy_guardianspirit") - tex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - tex:FillInner() - end - for i = 1, #SystemFrameList5 do - local this = _G[SystemFrameList5[i].."Header"] - if(this) then - this:SetTexture(0,0,0,0) - this:ClearAllPoints() - if this == _G["GameMenuFrameHeader"] then - this:SetPoint("TOP", GameMenuFrame, 0, 7) - else - this:SetPoint("TOP", SystemFrameList5[i], 0, 0) - end - end - end - for i = 1, #SystemFrameList6 do - local this = _G[SystemFrameList6[i]] - if(this) then - this:SetButtonTemplate() - end - end - VideoOptionsFrameCancel:ClearAllPoints() - VideoOptionsFrameCancel:SetPoint("RIGHT",VideoOptionsFrameApply,"LEFT",-4,0) - VideoOptionsFrameOkay:ClearAllPoints() - VideoOptionsFrameOkay:SetPoint("RIGHT",VideoOptionsFrameCancel,"LEFT",-4,0) - AudioOptionsFrameOkay:ClearAllPoints() - AudioOptionsFrameOkay:SetPoint("RIGHT",AudioOptionsFrameCancel,"LEFT",-4,0) - InterfaceOptionsFrameOkay:ClearAllPoints() - InterfaceOptionsFrameOkay:SetPoint("RIGHT",InterfaceOptionsFrameCancel,"LEFT", -4,0) - ReadyCheckFrameYesButton:SetParent(ReadyCheckFrame) - ReadyCheckFrameNoButton:SetParent(ReadyCheckFrame) - ReadyCheckFrameYesButton:SetPoint("RIGHT", ReadyCheckFrame, "CENTER", -1, 0) - ReadyCheckFrameNoButton:SetPoint("LEFT", ReadyCheckFrameYesButton, "RIGHT", 3, 0) - ReadyCheckFrameText:SetParent(ReadyCheckFrame) - ReadyCheckFrameText:ClearAllPoints() - ReadyCheckFrameText:SetPoint("TOP", 0, -12) - ReadyCheckListenerFrame:SetAlpha(0) - ReadyCheckFrame:HookScript("OnShow", function(self) if UnitIsUnit("player", self.initiator) then self:Hide() end end) - StackSplitFrame:GetRegions():Hide() - RolePollPopup:SetFixedPanelTemplate("Transparent", true) - InterfaceOptionsFrame:SetClampedToScreen(true) - InterfaceOptionsFrame:SetMovable(true) - InterfaceOptionsFrame:EnableMouse(true) - InterfaceOptionsFrame:RegisterForDrag("LeftButton", "RightButton") - InterfaceOptionsFrame:SetScript("OnDragStart", function(self) - if InCombatLockdown() then return end - if IsShiftKeyDown() then - self:StartMoving() - end - end) - InterfaceOptionsFrame:SetScript("OnDragStop", function(self) - self:StopMovingOrSizing() - end) - if IsMacClient() then - MacOptionsFrame:SetFixedPanelTemplate("Default") - MacOptionsFrameHeader:SetTexture(0,0,0,0) - MacOptionsFrameHeader:ClearAllPoints() - MacOptionsFrameHeader:SetPoint("TOP", MacOptionsFrame, 0, 0) - MacOptionsFrameMovieRecording:SetFixedPanelTemplate("Default") - MacOptionsITunesRemote:SetFixedPanelTemplate("Default") - MacOptionsFrameCancel:SetButtonTemplate() - MacOptionsFrameOkay:SetButtonTemplate() - MacOptionsButtonKeybindings:SetButtonTemplate() - MacOptionsFrameDefaults:SetButtonTemplate() - MacOptionsButtonCompress:SetButtonTemplate() - local tPoint, tRTo, tRP, tX, tY = MacOptionsButtonCompress:GetPoint() - MacOptionsButtonCompress:SetWidth(136) - MacOptionsButtonCompress:ClearAllPoints() - MacOptionsButtonCompress:Point(tPoint, tRTo, tRP, 4, tY) - MacOptionsFrameCancel:SetWidth(96) - MacOptionsFrameCancel:SetHeight(22) - tPoint, tRTo, tRP, tX, tY = MacOptionsFrameCancel:GetPoint() - MacOptionsFrameCancel:ClearAllPoints() - MacOptionsFrameCancel:Point(tPoint, tRTo, tRP, -14, tY) - MacOptionsFrameOkay:ClearAllPoints() - MacOptionsFrameOkay:SetWidth(96) - MacOptionsFrameOkay:SetHeight(22) - MacOptionsFrameOkay:Point("LEFT",MacOptionsFrameCancel, -99,0) - MacOptionsButtonKeybindings:ClearAllPoints() - MacOptionsButtonKeybindings:SetWidth(96) - MacOptionsButtonKeybindings:SetHeight(22) - MacOptionsButtonKeybindings:Point("LEFT",MacOptionsFrameOkay, -99,0) - MacOptionsFrameDefaults:SetWidth(96) - MacOptionsFrameDefaults:SetHeight(22) - end - OpacityFrame:RemoveTextures() - OpacityFrame:SetFixedPanelTemplate("Transparent", true) - - hooksecurefunc("UIDropDownMenu_InitializeHelper", function(self) - for i = 1, UIDROPDOWNMENU_MAXLEVELS do - local name = ("DropDownList%d"):format(i) - local bg = _G[("%sBackdrop"):format(name)] - bg:SetBasicPanel() - local menu = _G[("%sMenuBackdrop"):format(name)] - menu:SetBasicPanel() - end - end) - - if(SV.GameVersion < 60000) then - GuildInviteFrame:RemoveTextures() - GuildInviteFrame:SetFixedPanelTemplate('Transparent') - GuildInviteFrameLevel:RemoveTextures() - GuildInviteFrameLevel:ClearAllPoints() - GuildInviteFrameLevel:SetPoint('TOP', GuildInviteFrame, 'CENTER', -15, -25) - GuildInviteFrameJoinButton:SetButtonTemplate() - GuildInviteFrameDeclineButton:SetButtonTemplate() - GuildInviteFrame:Height(225) - GuildInviteFrame:HookScript("OnEvent", function() - GuildInviteFrame:Height(225) - end) - - GuildInviteFrameWarningText:Die() - BattleTagInviteFrame:RemoveTextures() - BattleTagInviteFrame:SetFixedPanelTemplate('Transparent') - end - --BattleTagInviteFrameScrollFrame:SetEditboxTemplate() - - for i=1, BattleTagInviteFrame:GetNumChildren() do - local child = select(i, BattleTagInviteFrame:GetChildren()) - if child:GetObjectType() == 'Button' then - child:SetButtonTemplate() - end - end - - for i = 1, #SystemFrameList13 do - local frame = _G[SystemFrameList13[i]] - if(frame) then - frame:RemoveTextures() - frame:SetBasicPanel() - end - end - - for i = 1, #SystemFrameList14 do - local this = _G[SystemFrameList14[i]] - if(this) then - this:RemoveTextures() - STYLE:ApplyTabStyle(this) - end - end - - InterfaceOptionsFrameTab1:ClearAllPoints() - InterfaceOptionsFrameTab1:SetPoint("BOTTOMLEFT",InterfaceOptionsFrameCategories,"TOPLEFT",-11,-2) - VideoOptionsFrameDefaults:ClearAllPoints() - InterfaceOptionsFrameDefaults:ClearAllPoints() - InterfaceOptionsFrameCancel:ClearAllPoints() - VideoOptionsFrameDefaults:SetPoint("TOPLEFT",VideoOptionsFrameCategoryFrame,"BOTTOMLEFT",-1,-5) - InterfaceOptionsFrameDefaults:SetPoint("TOPLEFT",InterfaceOptionsFrameCategories,"BOTTOMLEFT",-1,-5) - InterfaceOptionsFrameCancel:SetPoint("TOPRIGHT",InterfaceOptionsFramePanelContainer,"BOTTOMRIGHT",0,-6) - for i = 1, #SystemFrameList15 do - local this = _G["InterfaceOptions"..SystemFrameList15[i]] - if(this) then - this:SetCheckboxTemplate(true) - end - end - for i = 1, #SystemFrameList16 do - local this = _G["InterfaceOptions"..SystemFrameList16[i]] - if(this) then - STYLE:ApplyDropdownStyle(this) - end - end - InterfaceOptionsHelpPanelResetTutorials:SetButtonTemplate() - for i = 1, #SystemFrameList17 do - local this = _G[SystemFrameList17[i]] - if(this) then - this:SetCheckboxTemplate(true) - end - end - for i = 1, #SystemFrameList18 do - local this = _G[SystemFrameList18[i]] - if(this) then - STYLE:ApplyDropdownStyle(this, 165) - end - end - for i = 1, #SystemFrameList19 do - local this = _G[SystemFrameList19[i]] - if(this) then - this:SetButtonTemplate() - end - end - AudioOptionsVoicePanelChatMode1KeyBindingButton:ClearAllPoints() - AudioOptionsVoicePanelChatMode1KeyBindingButton:Point("CENTER", AudioOptionsVoicePanelBinding, "CENTER", 0, -10) - CompactUnitFrameProfilesRaidStylePartyFrames:SetCheckboxTemplate(true) - CompactUnitFrameProfilesGeneralOptionsFrameResetPositionButton:SetButtonTemplate() - - for i = 1, #SystemFrameList20 do - local this = _G["CompactUnitFrameProfilesGeneralOptionsFrame"..SystemFrameList20[i]] - if(this) then - this:SetCheckboxTemplate(true) - this:SetFrameLevel(40) - end - end - - for i = 1, #SystemFrameList21 do - local this = _G[SystemFrameList21[i]] - if(this) then - STYLE:ApplyScrollBarStyle(this) - end - end - Graphics_RightQuality:SetBackdrop(nil) - Graphics_RightQuality:Die() - - MacOptionsFrame:RemoveTextures() - MacOptionsFrame:SetFixedPanelTemplate() - MacOptionsButtonCompress:SetButtonTemplate() - MacOptionsButtonKeybindings:SetButtonTemplate() - MacOptionsFrameDefaults:SetButtonTemplate() - MacOptionsFrameOkay:SetButtonTemplate() - MacOptionsFrameCancel:SetButtonTemplate() - MacOptionsFrameMovieRecording:RemoveTextures() - MacOptionsITunesRemote:RemoveTextures() - MacOptionsFrameMisc:RemoveTextures() - STYLE:ApplyDropdownStyle(MacOptionsFrameResolutionDropDown) - STYLE:ApplyDropdownStyle(MacOptionsFrameFramerateDropDown) - STYLE:ApplyDropdownStyle(MacOptionsFrameCodecDropDown) - STYLE:ApplyScrollBarStyle(MacOptionsFrameQualitySlider) - for i = 1, 11 do - local this = _G["MacOptionsFrameCheckButton"..i] - if(this) then - this:SetCheckboxTemplate(true) - end - end - MacOptionsButtonKeybindings:ClearAllPoints() - MacOptionsButtonKeybindings:SetPoint("LEFT", MacOptionsFrameDefaults, "RIGHT", 2, 0) - MacOptionsFrameOkay:ClearAllPoints() - MacOptionsFrameOkay:SetPoint("LEFT", MacOptionsButtonKeybindings, "RIGHT", 2, 0) - MacOptionsFrameCancel:ClearAllPoints() - MacOptionsFrameCancel:SetPoint("LEFT", MacOptionsFrameOkay, "RIGHT", 2, 0) - MacOptionsFrameCancel:SetWidth(MacOptionsFrameCancel:GetWidth() - 6) - ReportCheatingDialog:RemoveTextures() - ReportCheatingDialogCommentFrame:RemoveTextures() - ReportCheatingDialogReportButton:SetButtonTemplate() - ReportCheatingDialogCancelButton:SetButtonTemplate() - ReportCheatingDialog:SetFixedPanelTemplate("Transparent", true) - ReportCheatingDialogCommentFrameEditBox:SetEditboxTemplate() - ReportPlayerNameDialog:RemoveTextures() - ReportPlayerNameDialogCommentFrame:RemoveTextures() - ReportPlayerNameDialogCommentFrameEditBox:SetEditboxTemplate() - ReportPlayerNameDialog:SetFixedPanelTemplate("Transparent", true) - ReportPlayerNameDialogReportButton:SetButtonTemplate() - ReportPlayerNameDialogCancelButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(SideDressUpModelCloseButton) - SideDressUpFrame:RemoveTextures() - SideDressUpFrame.BGTopLeft:Hide() - SideDressUpFrame.BGBottomLeft:Hide() - SideDressUpModelResetButton:SetButtonTemplate() -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(SystemPanelQue) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua deleted file mode 100644 index 663f239..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua +++ /dev/null @@ -1,93 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local function cleanT(a,b) - for c=1,a:GetNumRegions()do - local d=select(c,a:GetRegions()) - if d and d:GetObjectType()=="Texture"then - local n=d:GetName(); - if n=='TabardFrameEmblemTopRight' or n=='TabardFrameEmblemTopLeft' or n=='TabardFrameEmblemBottomRight' or n=='TabardFrameEmblemBottomLeft' then return end - if b and type(b)=='boolean'then - d:Die() - elseif d:GetDrawLayer()==b then - d:SetTexture(0,0,0,0) - elseif b and type(b)=='string'and d:GetTexture()~=b then - d:SetTexture(0,0,0,0) - else - d:SetTexture(0,0,0,0) - end - end - end -end ---[[ -########################################################## -TABARDFRAME STYLER -########################################################## -]]-- -local function TabardFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.tabard ~= true then - return - end - cleanT(TabardFrame, true) - TabardFrame:SetPanelTemplate("Action", false) - TabardModel:SetFixedPanelTemplate("Transparent") - TabardFrameCancelButton:SetButtonTemplate() - TabardFrameAcceptButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(TabardFrameCloseButton) - TabardFrameCostFrame:RemoveTextures() - TabardFrameCustomizationFrame:RemoveTextures() - TabardFrameInset:Die() - TabardFrameMoneyInset:Die() - TabardFrameMoneyBg:RemoveTextures() - for b = 1, 5 do - local c = "TabardFrameCustomization"..b;_G[c]:RemoveTextures() - STYLE:ApplyPaginationStyle(_G[c.."LeftButton"]) - STYLE:ApplyPaginationStyle(_G[c.."RightButton"]) - if b>1 then - _G[c]:ClearAllPoints() - _G[c]:Point("TOP", _G["TabardFrameCustomization"..b-1], "BOTTOM", 0, -6) - else - local d, e, f, g, h = _G[c]:GetPoint() - _G[c]:Point(d, e, f, g, h+4) - end - end - TabardCharacterModelRotateLeftButton:Point("BOTTOMLEFT", 4, 4) - TabardCharacterModelRotateRightButton:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) - hooksecurefunc(TabardCharacterModelRotateLeftButton, "SetPoint", function(i, d, j, k, l, m) - if d ~= "BOTTOMLEFT"or l ~= 4 or m ~= 4 then - i:Point("BOTTOMLEFT", 4, 4) - end - end) - hooksecurefunc(TabardCharacterModelRotateRightButton, "SetPoint", function(i, d, j, k, l, m) - if d ~= "TOPLEFT"or l ~= 4 or m ~= 0 then - i:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) - end - end) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(TabardFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua deleted file mode 100644 index f9fcfa4..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua +++ /dev/null @@ -1,386 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local borderTex = [[Interface\Addons\SVUI\assets\artwork\Template\ROUND]] - -local SpecButtonList = { - "PlayerTalentFrameSpecializationLearnButton", - "PlayerTalentFrameTalentsLearnButton", - "PlayerTalentFramePetSpecializationLearnButton" -}; - -local function Tab_OnEnter(this) - this.backdrop:SetPanelColor("highlight") - this.backdrop:SetBackdropBorderColor(0.1, 0.8, 0.8) -end - -local function Tab_OnLeave(this) - this.backdrop:SetPanelColor("dark") - this.backdrop:SetBackdropBorderColor(0,0,0,1) -end - -local function ChangeTabHelper(this) - this:RemoveTextures() - 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) - 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) -end - -local function StyleGlyphHolder(holder, offset) - if holder.styled then return end - - local outer = holder:CreateTexture(nil, "OVERLAY") - outer:WrapOuter(holder, offset, offset) - outer:SetTexture(borderTex) - outer:SetGradient(unpack(SV.Media.gradient.class)) - - local hover = holder:CreateTexture(nil, "HIGHLIGHT") - hover:WrapOuter(holder, offset, offset) - hover:SetTexture(borderTex) - hover:SetGradient(unpack(SV.Media.gradient.yellow)) - holder.hover = hover - - if holder.SetDisabledTexture then - local disabled = holder:CreateTexture(nil, "BORDER") - disabled:WrapOuter(holder, offset, offset) - disabled:SetTexture(borderTex) - disabled:SetGradient(unpack(SV.Media.gradient.default)) - holder:SetDisabledTexture(disabled) - end - - local cd = holder:GetName() and _G[holder:GetName().."Cooldown"] - if cd then - cd:ClearAllPoints() - cd:FillInner() - end - holder.styled = true -end ---[[ -########################################################## -TALENTFRAME STYLER -########################################################## -]]-- -local function TalentFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.talent ~= true then return end - - STYLE:ApplyWindowStyle(PlayerTalentFrame) - - PlayerTalentFrameInset:RemoveTextures() - PlayerTalentFrameTalents:RemoveTextures() - PlayerTalentFrameTalentsClearInfoFrame:RemoveTextures() - - PlayerTalentFrame.Panel:Point("BOTTOMRIGHT", PlayerTalentFrame, "BOTTOMRIGHT", 0, -5) - PlayerTalentFrameSpecializationTutorialButton:Die() - PlayerTalentFrameTalentsTutorialButton:Die() - PlayerTalentFramePetSpecializationTutorialButton:Die() - STYLE:ApplyCloseButtonStyle(PlayerTalentFrameCloseButton) - PlayerTalentFrameActivateButton:SetButtonTemplate() - - for _,name in pairs(SpecButtonList)do - local button = _G[name]; - if(button) then - button:RemoveTextures() - button:SetButtonTemplate() - local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = button:GetPoint() - button:SetPoint(initialAnchor, anchorParent, relativeAnchor, xPosition, -28) - end - end - - PlayerTalentFrameTalents:SetFixedPanelTemplate("Inset") - PlayerTalentFrameTalentsClearInfoFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - PlayerTalentFrameTalentsClearInfoFrame:Width(PlayerTalentFrameTalentsClearInfoFrame:GetWidth()-2) - PlayerTalentFrameTalentsClearInfoFrame:Height(PlayerTalentFrameTalentsClearInfoFrame:GetHeight()-2) - PlayerTalentFrameTalentsClearInfoFrame.icon:Size(PlayerTalentFrameTalentsClearInfoFrame:GetSize()) - PlayerTalentFrameTalentsClearInfoFrame:Point('TOPLEFT', PlayerTalentFrameTalents, 'BOTTOMLEFT', 8, -8) - - for i = 1, 4 do - STYLE:ApplyTabStyle(_G["PlayerTalentFrameTab"..i]) - if i == 1 then - local d, e, k, g = _G["PlayerTalentFrameTab"..i]:GetPoint() - _G["PlayerTalentFrameTab"..i]:Point(d, e, k, g, -4) - end - end - - hooksecurefunc("PlayerTalentFrame_UpdateTabs", function() - for i = 1, 4 do - local d, e, k, g = _G["PlayerTalentFrameTab"..i]:GetPoint() - _G["PlayerTalentFrameTab"..i]:Point(d, e, k, g, -4) - end - end) - - PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetTexture(1, 1, 1) - PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetAlpha(0.2) - - for i = 1, 2 do - local v = _G["PlayerSpecTab"..i] - _G["PlayerSpecTab"..i.."Background"]:Die() - ChangeTabHelper(v) - end - - hooksecurefunc("PlayerTalentFrame_UpdateSpecs", function() - local d, x, f, g, h = PlayerSpecTab1:GetPoint() - PlayerSpecTab1:Point(d, x, f, -1, h) - end) - - for i = 1, MAX_NUM_TALENT_TIERS do - local gName = ("PlayerTalentFrameTalentsTalentRow%d"):format(i) - local rowFrame = _G[gName] - if(rowFrame) then - local bgFrame = _G[("%sBg"):format(gName)] - if(bgFrame) then bgFrame:Hide() end - - rowFrame:DisableDrawLayer("BORDER") - rowFrame:RemoveTextures() - rowFrame.TopLine:Point("TOP", 0, 4) - rowFrame.BottomLine:Point("BOTTOM", 0, -4) - - for z = 1, NUM_TALENT_COLUMNS do - local talentItem = _G[("%sTalent%d"):format(gName, z)] - if(talentItem) then - STYLE:ApplyItemButtonStyle(talentItem, false, true) - end - end - end - end - - hooksecurefunc("TalentFrame_Update", function() - for i = 1, MAX_NUM_TALENT_TIERS do - local gName = ("PlayerTalentFrameTalentsTalentRow%d"):format(i) - - for z = 1, NUM_TALENT_COLUMNS do - local talentItem = _G[("%sTalent%d"):format(gName, z)] - if(talentItem) then - if talentItem.knownSelection:IsShown() then - talentItem:SetBackdropBorderColor(0, 1, 0) - else - talentItem:SetBackdropBorderColor(0, 0, 0) - end - if talentItem.learnSelection:IsShown() then - talentItem:SetBackdropBorderColor(1, 1, 0) - end - end - end - end - end) - - for b = 1, 5 do - select(b, PlayerTalentFrameSpecializationSpellScrollFrameScrollChild:GetRegions()):Hide() - end - - local C = _G["PlayerTalentFrameSpecializationSpellScrollFrameScrollChild"] - C.ring:Hide() - C:SetFixedPanelTemplate("Transparent") - C.Panel:WrapOuter(C.specIcon) - C.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - - local D = _G["PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild"] - D.ring:Hide() - D:SetFixedPanelTemplate("Transparent") - D.Panel:WrapOuter(D.specIcon) - D.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - - hooksecurefunc("PlayerTalentFrame_UpdateSpecFrame", function(i, E) - local F = GetSpecialization(nil, i.isPet, PlayerSpecTab2:GetChecked() and 2 or 1) - local G = E or F or 1; - local H, p, p, icon = GetSpecializationInfo(G, nil, i.isPet) - local I = i.spellsScroll.child; - I.specIcon:SetTexture(icon) - local J = 1; - local K; - if i.isPet then - K = { GetSpecializationSpells(G, nil, i.isPet) } - else - K = SPEC_SPELLS_DISPLAY[H] - end - for b = 1, #K, 2 do - local L = I["abilityButton"..J] - local p, icon = GetSpellTexture(K[b]) - L.icon:SetTexture(icon) - if not L.restyled then - L.restyled = true;L:Size(30, 30) - L.ring:Hide() - L:SetFixedPanelTemplate("Transparent") - L.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - L.icon:FillInner() - end - J = J+1 - end - for b = 1, GetNumSpecializations(nil, i.isPet)do - local A = i["specButton"..b] - A.SelectedTexture:FillInner(A.Panel) - if A.selected then - A.SelectedTexture:Show() - else - A.SelectedTexture:Hide() - end - end - end) - - for b = 1, GetNumSpecializations(false, nil)do - local button = PlayerTalentFrameSpecialization["specButton"..b] - if(button) then - local _, _, _, icon = GetSpecializationInfo(b, false, nil) - button.ring:Hide() - button.specIcon:SetTexture(icon) - button.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - button.specIcon:SetSize(50, 50) - button.specIcon:Point("LEFT", button, "LEFT", 15, 0) - button.SelectedTexture = button:CreateTexture(nil, 'ARTWORK') - button.SelectedTexture:SetTexture(1, 1, 0, 0.1) - end - end - - local btnList = { - "PlayerTalentFrameSpecializationSpecButton", "PlayerTalentFramePetSpecializationSpecButton" - } - - for _, gName in pairs(btnList)do - for b = 1, 4 do - local button = _G[gName..b] - if(button) then - if(_G[gName..b.."Glow"]) then _G[gName..b.."Glow"]:Die() end - local bTex = button:CreateTexture(nil, 'ARTWORK') - bTex:SetTexture(1, 1, 1, 0.1) - button:SetHighlightTexture(bTex) - button.bg:SetAlpha(0) - button.learnedTex:SetAlpha(0) - button.selectedTex:SetAlpha(0) - button:SetFixedPanelTemplate("Button") - button:GetHighlightTexture():FillInner(button.Panel) - end - end - end - - if SV.class == "HUNTER" then - for b = 1, 6 do - select(b, PlayerTalentFramePetSpecialization:GetRegions()):Hide() - end - for b = 1, PlayerTalentFramePetSpecialization:GetNumChildren()do - local O = select(b, PlayerTalentFramePetSpecialization:GetChildren()) - if O and not O:GetName() then - O:DisableDrawLayer("OVERLAY") - end - end - for b = 1, 5 do - select(b, PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild:GetRegions()):Hide() - end - for b = 1, GetNumSpecializations(false, true)do - local A = PlayerTalentFramePetSpecialization["specButton"..b] - local p, p, p, icon = GetSpecializationInfo(b, false, true) - A.ring:Hide() - A.specIcon:SetTexture(icon) - A.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - A.specIcon:SetSize(50, 50) - A.specIcon:Point("LEFT", A, "LEFT", 15, 0) - A.SelectedTexture = A:CreateTexture(nil, 'ARTWORK') - A.SelectedTexture:SetTexture(1, 1, 0, 0.1) - end - PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild.Seperator:SetTexture(1, 1, 1) - PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild.Seperator:SetAlpha(0.2) - end - - PlayerTalentFrameSpecialization:DisableDrawLayer('ARTWORK') - PlayerTalentFrameSpecialization:DisableDrawLayer('BORDER') - - for b = 1, PlayerTalentFrameSpecialization:GetNumChildren()do - local O = select(b, PlayerTalentFrameSpecialization:GetChildren()) - if O and not O:GetName() then - O:DisableDrawLayer("OVERLAY") - end - end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_TalentUI", TalentFrameStyle) - -local function GlyphStyle() - GlyphFrame:RemoveTextures() - --GlyphFrame.background:ClearAllPoints() - --GlyphFrame.background:SetAllPoints(PlayerTalentFrameInset) - GlyphFrame:SetFixedPanelTemplate("Comic", false, 0, 3, 3) - GlyphFrameSideInset:RemoveTextures() - GlyphFrameClearInfoFrame:RemoveTextures() - GlyphFrameClearInfoFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) - GlyphFrameClearInfoFrame:Width(GlyphFrameClearInfoFrame:GetWidth()-2) - GlyphFrameClearInfoFrame:Height(GlyphFrameClearInfoFrame:GetHeight()-2) - GlyphFrameClearInfoFrame.icon:Size(GlyphFrameClearInfoFrame:GetSize()) - GlyphFrameClearInfoFrame:Point("TOPLEFT", GlyphFrame, "BOTTOMLEFT", 6, -10) - STYLE:ApplyDropdownStyle(GlyphFrameFilterDropDown, 212) - GlyphFrameSearchBox:SetEditboxTemplate() - STYLE:ApplyScrollFrameStyle(GlyphFrameScrollFrameScrollBar, 5) - - for b = 1, 10 do - local e = _G["GlyphFrameScrollFrameButton"..b] - local icon = _G["GlyphFrameScrollFrameButton"..b.."Icon"] - e:RemoveTextures() - STYLE:ApplyItemButtonStyle(e) - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) - end - - for b = 1, 6 do - local glyphHolder = _G["GlyphFrameGlyph"..b] - if glyphHolder then - glyphHolder:RemoveTextures() - if(b % 2 == 0) then - StyleGlyphHolder(glyphHolder, 4) - else - StyleGlyphHolder(glyphHolder, 1) - end - end - end - - GlyphFrameHeader1:RemoveTextures() - GlyphFrameHeader2:RemoveTextures() - GlyphFrameScrollFrame:SetPanelTemplate("Inset", false, 3, 2, 2) -end - -STYLE:SaveBlizzardStyle("Blizzard_GlyphUI", GlyphStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua deleted file mode 100644 index 2e3c82a..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua +++ /dev/null @@ -1,42 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -TAXIFRAME STYLER -########################################################## -]]-- -local function TaxiStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.taxi ~= true then - return - end - - STYLE:ApplyWindowStyle(TaxiFrame) - - TaxiRouteMap:SetPanelTemplate("Blackout") - --TaxiRouteMap.Panel:WrapOuter(TaxiRouteMap, 4, 4) - - STYLE:ApplyCloseButtonStyle(TaxiFrame.CloseButton) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(TaxiStyle) \ 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 deleted file mode 100644 index 63c6fc2..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua +++ /dev/null @@ -1,105 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -ACP -########################################################## -]]-- -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 - -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"} - for i,j in pairs(h)do _G[j]:SetButtonTemplate()end - for c=1,20 do _G["ACP_AddonListEntry"..c.."LoadNow"]:SetButtonTemplate()end - STYLE:ApplyCloseButtonStyle(ACP_AddonListCloseButton) - for c=1,20,1 do - local k=_G["ACP_AddonList"] - k.timeLapse = 0 - k:SetScript("OnUpdate",cbResize) - end - for c=1,20 do _G["ACP_AddonListEntry"..c.."Enabled"]:SetCheckboxTemplate(true)end - ACP_AddonList_NoRecurse:SetCheckboxTemplate(true) - STYLE:ApplyScrollFrameStyle(ACP_AddonList_ScrollFrameScrollBar) - STYLE:ApplyDropdownStyle(ACP_AddonListSortDropDown) - ACP_AddonListSortDropDown:Width(130) - ACP_AddonList_ScrollFrame:SetWidth(590) - ACP_AddonList_ScrollFrame:SetHeight(412) - ACP_AddonList:SetHeight(502) - ACP_AddonListEntry1:Point("TOPLEFT",ACP_AddonList,"TOPLEFT",47,-62) - ACP_AddonList_ScrollFrame:Point("TOPLEFT",ACP_AddonList,"TOPLEFT",20,-53) - ACP_AddonListCloseButton:Point("TOPRIGHT",ACP_AddonList,"TOPRIGHT",4,5) - ACP_AddonListSetButton:Point("BOTTOMLEFT",ACP_AddonList,"BOTTOMLEFT",20,8) - ACP_AddonListSetButton:SetHeight(25) - ACP_AddonListDisableAll:Point("BOTTOMLEFT",ACP_AddonList,"BOTTOMLEFT",90,8) - ACP_AddonListDisableAll:SetHeight(25) - ACP_AddonListEnableAll:Point("BOTTOMLEFT",ACP_AddonList,"BOTTOMLEFT",175,8) - ACP_AddonListEnableAll:SetHeight(25) - ACP_AddonList_ReloadUI:Point("BOTTOMRIGHT",ACP_AddonList,"BOTTOMRIGHT",-160,8) - 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/AdiBags.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua deleted file mode 100644 index b5c95cd..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua +++ /dev/null @@ -1,74 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -ADIBAGS -########################################################## -]]-- -local function StyleAdiBags(event) - local AdiBags = LibStub('AceAddon-3.0'):GetAddon('AdiBags') - assert(AdiBags, "AddOn Not Loaded") - --hooksecurefunc(AdiBags, 'HookBagFrameCreation', function(self) print(self) end) - - local function SkinFrame(frame) - local region = frame.HeaderRightRegion - frame:SetBasicPanel() - _G[frame:GetName()..'Bags']:SetPanelTemplate("Default") - for i = 1, 3 do - region.widgets[i].widget:SetButtonTemplate() - end - end - - if event == 'PLAYER_ENTERING_WORLD' then - SV.Timers:ExecuteTimer(function() - if not AdiBagsContainer1 then ToggleBackpack() ToggleBackpack() end - if AdiBagsContainer1 then - SkinFrame(AdiBagsContainer1) - AdiBagsContainer1SearchBox:SetEditboxTemplate() - AdiBagsContainer1SearchBox:Point('TOPRIGHT', AdiBagsSimpleLayeredRegion2, 'TOPRIGHT', -75, -1) - end - end, 1) - elseif event == 'BANKFRAME_OPENED' then - SV.Timers:ExecuteTimer(function() - if AdiBagsContainer2 then - SkinFrame(AdiBagsContainer2) - STYLE:SafeEventRemoval("AdiBags", event) - end - end, 1) - end -end - -STYLE:SaveAddonStyle("AdiBags", StyleAdiBags, nil, nil, 'BANKFRAME_OPENED') \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua deleted file mode 100644 index a6ca1d9..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua +++ /dev/null @@ -1,283 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -ALTOHOLIC -########################################################## -]]-- -local function ColorAltoBorder(self) - if self.border then - local Backdrop = self.backdrop or self.Backdrop - if not Backdrop then return end - local r, g, b = self.border:GetVertexColor() - Backdrop:SetBackdropBorderColor(r, g, b, 1) - end -end - -local function StyleAltoholic(event, addon) - assert(AltoholicFrame, "AddOn Not Loaded") - - if event == "PLAYER_ENTERING_WORLD" then - STYLE:ApplyTooltipStyle(AltoTooltip) - - AltoholicFramePortrait:Die() - - STYLE:ApplyFrameStyle(AltoholicFrame, "Action", false, true) - STYLE:ApplyFrameStyle(AltoMsgBox) - STYLE:ApplyButtonStyle(AltoMsgBoxYesButton) - STYLE:ApplyButtonStyle(AltoMsgBoxNoButton) - STYLE:ApplyCloseButtonStyle(AltoholicFrameCloseButton) - STYLE:ApplyEditBoxStyle(AltoholicFrame_SearchEditBox, 175, 15) - STYLE:ApplyButtonStyle(AltoholicFrame_ResetButton) - STYLE:ApplyButtonStyle(AltoholicFrame_SearchButton) - - AltoholicFrameTab1:Point("TOPLEFT", AltoholicFrame, "BOTTOMLEFT", -5, 2) - AltoholicFrame_ResetButton:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 25, -77) - AltoholicFrame_SearchEditBox:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 37, -56) - AltoholicFrame_ResetButton:Size(85, 24) - AltoholicFrame_SearchButton:Size(85, 24) - end - - if addon == "Altoholic_Summary" then - STYLE:ApplyFrameStyle(AltoholicFrameSummary) - STYLE:ApplyFrameStyle(AltoholicFrameBagUsage) - STYLE:ApplyFrameStyle(AltoholicFrameSkills) - STYLE:ApplyFrameStyle(AltoholicFrameActivity) - STYLE:ApplyScrollBarStyle(AltoholicFrameSummaryScrollFrameScrollBar) - STYLE:ApplyScrollBarStyle(AltoholicFrameBagUsageScrollFrameScrollBar) - STYLE:ApplyScrollBarStyle(AltoholicFrameSkillsScrollFrameScrollBar) - STYLE:ApplyScrollBarStyle(AltoholicFrameActivityScrollFrameScrollBar) - STYLE:ApplyDropdownStyle(AltoholicTabSummary_SelectLocation, 200) - - if(AltoholicFrameSummaryScrollFrame) then - AltoholicFrameSummaryScrollFrame:RemoveTextures(true) - end - - if(AltoholicFrameBagUsageScrollFrame) then - AltoholicFrameBagUsageScrollFrame:RemoveTextures(true) - end - - if(AltoholicFrameSkillsScrollFrame) then - AltoholicFrameSkillsScrollFrame:RemoveTextures(true) - end - - if(AltoholicFrameActivityScrollFrame) then - AltoholicFrameActivityScrollFrame:RemoveTextures(true) - end - - STYLE:ApplyButtonStyle(AltoholicTabSummary_RequestSharing) - STYLE:ApplyTextureStyle(AltoholicTabSummary_RequestSharingIconTexture) - STYLE:ApplyButtonStyle(AltoholicTabSummary_Options) - STYLE:ApplyTextureStyle(AltoholicTabSummary_OptionsIconTexture) - STYLE:ApplyButtonStyle(AltoholicTabSummary_OptionsDataStore) - STYLE:ApplyTextureStyle(AltoholicTabSummary_OptionsDataStoreIconTexture) - - for i = 1, 5 do - STYLE:ApplyButtonStyle(_G["AltoholicTabSummaryMenuItem"..i], true) - end - for i = 1, 8 do - STYLE:ApplyButtonStyle(_G["AltoholicTabSummary_Sort"..i], true) - end - for i = 1, 7 do - STYLE:ApplyTabStyle(_G["AltoholicFrameTab"..i], true) - end - end - - if IsAddOnLoaded("Altoholic_Characters") or addon == "Altoholic_Characters" then - STYLE:ApplyFrameStyle(AltoholicFrameContainers) - STYLE:ApplyFrameStyle(AltoholicFrameRecipes) - STYLE:ApplyFrameStyle(AltoholicFrameQuests) - STYLE:ApplyFrameStyle(AltoholicFrameGlyphs) - STYLE:ApplyFrameStyle(AltoholicFrameMail) - STYLE:ApplyFrameStyle(AltoholicFrameSpellbook) - STYLE:ApplyFrameStyle(AltoholicFramePets) - STYLE:ApplyFrameStyle(AltoholicFrameAuctions) - STYLE:ApplyScrollBarStyle(AltoholicFrameContainersScrollFrameScrollBar) - STYLE:ApplyScrollBarStyle(AltoholicFrameQuestsScrollFrameScrollBar) - STYLE:ApplyScrollBarStyle(AltoholicFrameRecipesScrollFrameScrollBar) - STYLE:ApplyDropdownStyle(AltoholicFrameTalents_SelectMember) - STYLE:ApplyDropdownStyle(AltoholicTabCharacters_SelectRealm) - STYLE:ApplyPaginationStyle(AltoholicFrameSpellbookPrevPage) - STYLE:ApplyPaginationStyle(AltoholicFrameSpellbookNextPage) - STYLE:ApplyPaginationStyle(AltoholicFramePetsNormalPrevPage) - STYLE:ApplyPaginationStyle(AltoholicFramePetsNormalNextPage) - STYLE:ApplyRotateStyle(AltoholicFramePetsNormal_ModelFrameRotateLeftButton) - STYLE:ApplyRotateStyle(AltoholicFramePetsNormal_ModelFrameRotateRightButton) - STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort1) - STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort2) - STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort3) - AltoholicFrameContainersScrollFrame:RemoveTextures(true) - AltoholicFrameQuestsScrollFrame:RemoveTextures(true) - AltoholicFrameRecipesScrollFrame:RemoveTextures(true) - - local Buttons = { - 'AltoholicTabCharacters_Characters', - 'AltoholicTabCharacters_CharactersIcon', - 'AltoholicTabCharacters_BagsIcon', - 'AltoholicTabCharacters_QuestsIcon', - 'AltoholicTabCharacters_TalentsIcon', - 'AltoholicTabCharacters_AuctionIcon', - 'AltoholicTabCharacters_MailIcon', - 'AltoholicTabCharacters_SpellbookIcon', - 'AltoholicTabCharacters_ProfessionsIcon', - } - - for _, object in pairs(Buttons) do - STYLE:ApplyTextureStyle(_G[object..'IconTexture']) - STYLE:ApplyTextureStyle(_G[object]) - end - - for i = 1, 7 do - for j = 1, 14 do - STYLE:ApplyItemButtonStyle(_G["AltoholicFrameContainersEntry"..i.."Item"..j]) - _G["AltoholicFrameContainersEntry"..i.."Item"..j]:HookScript('OnShow', ColorAltoBorder) - end - end - end - - if IsAddOnLoaded("Altoholic_Achievements") or addon == "Altoholic_Achievements" then - STYLE:ApplyUnderlayStyle(AltoholicFrameAchievements) - AltoholicFrameAchievementsScrollFrame:RemoveTextures(true) - AltoholicAchievementsMenuScrollFrame:RemoveTextures(true) - STYLE:ApplyScrollBarStyle(AltoholicFrameAchievementsScrollFrameScrollBar) - STYLE:ApplyScrollBarStyle(AltoholicAchievementsMenuScrollFrameScrollBar) - STYLE:ApplyDropdownStyle(AltoholicTabAchievements_SelectRealm) - AltoholicTabAchievements_SelectRealm:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 205, -57) - - for i = 1, 15 do - STYLE:ApplyButtonStyle(_G["AltoholicTabAchievementsMenuItem"..i], true) - end - - for i = 1, 8 do - for j = 1, 10 do - STYLE:ApplyUnderlayStyle(_G["AltoholicFrameAchievementsEntry"..i.."Item"..j]) - local Backdrop = _G["AltoholicFrameAchievementsEntry"..i.."Item"..j].backdrop or _G["AltoholicFrameAchievementsEntry"..i.."Item"..j].Backdrop - STYLE:ApplyTextureStyle(_G["AltoholicFrameAchievementsEntry"..i.."Item"..j..'_Background']) - _G["AltoholicFrameAchievementsEntry"..i.."Item"..j..'_Background']:SetInside(Backdrop) - end - end - end - - if IsAddOnLoaded("Altoholic_Agenda") or addon == "Altoholic_Agenda" then - STYLE:ApplyFrameStyle(AltoholicFrameCalendarScrollFrame) - STYLE:ApplyFrameStyle(AltoholicTabAgendaMenuItem1) - STYLE:ApplyScrollBarStyle(AltoholicFrameCalendarScrollFrameScrollBar) - STYLE:ApplyPaginationStyle(AltoholicFrameCalendar_NextMonth) - STYLE:ApplyPaginationStyle(AltoholicFrameCalendar_PrevMonth) - STYLE:ApplyButtonStyle(AltoholicTabAgendaMenuItem1, true) - - for i = 1, 14 do - STYLE:ApplyFrameStyle(_G["AltoholicFrameCalendarEntry"..i]) - end - end - - if IsAddOnLoaded("Altoholic_Grids") or addon == "Altoholic_Grids" then - AltoholicFrameGridsScrollFrame:RemoveTextures(true) - STYLE:ApplyUnderlayStyle(AltoholicFrameGrids) - STYLE:ApplyScrollBarStyle(AltoholicFrameGridsScrollFrameScrollBar) - STYLE:ApplyDropdownStyle(AltoholicTabGrids_SelectRealm) - STYLE:ApplyDropdownStyle(AltoholicTabGrids_SelectView) - - for i = 1, 8 do - for j = 1, 10 do - STYLE:ApplyUnderlayStyle(_G["AltoholicFrameGridsEntry"..i.."Item"..j], nil, nil, nil, true) - _G["AltoholicFrameGridsEntry"..i.."Item"..j]:HookScript('OnShow', ColorAltoBorder) - end - end - - AltoholicFrameGrids:HookScript('OnUpdate', function() - for i = 1, 10 do - for j = 1, 10 do - if _G["AltoholicFrameGridsEntry"..i.."Item"..j.."_Background"] then - _G["AltoholicFrameGridsEntry"..i.."Item"..j.."_Background"]:SetTexCoord(.08, .92, .08, .82) - end - end - end - end) - - end - - if IsAddOnLoaded("Altoholic_Guild") or addon == "Altoholic_Guild" then - STYLE:ApplyFrameStyle(AltoholicFrameGuildMembers) - STYLE:ApplyFrameStyle(AltoholicFrameGuildBank) - STYLE:ApplyScrollBarStyle(AltoholicFrameGuildMembersScrollFrameScrollBar) - AltoholicFrameGuildMembersScrollFrame:RemoveTextures(true) - - for i = 1, 2 do - STYLE:ApplyButtonStyle(_G["AltoholicTabGuildMenuItem"..i]) - end - - for i = 1, 7 do - for j = 1, 14 do - STYLE:ApplyItemButtonStyle(_G["AltoholicFrameGuildBankEntry"..i.."Item"..j]) - end - end - - for i = 1, 19 do - STYLE:ApplyItemButtonStyle(_G["AltoholicFrameGuildMembersItem"..i]) - end - - for i = 1, 5 do - STYLE:ApplyButtonStyle(_G["AltoholicTabGuild_Sort"..i]) - end - end - - if IsAddOnLoaded("Altoholic_Search") or addon == "Altoholic_Search" then - STYLE:ApplyUnderlayStyle(AltoholicFrameSearch, true) - AltoholicFrameSearchScrollFrame:RemoveTextures(true) - AltoholicSearchMenuScrollFrame:RemoveTextures(true) - STYLE:ApplyScrollBarStyle(AltoholicFrameSearchScrollFrameScrollBar) - STYLE:ApplyScrollBarStyle(AltoholicSearchMenuScrollFrameScrollBar) - STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectRarity) - STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectSlot) - STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectLocation) - AltoholicTabSearch_SelectRarity:Size(125, 32) - AltoholicTabSearch_SelectSlot:Size(125, 32) - AltoholicTabSearch_SelectLocation:Size(175, 32) - STYLE:ApplyEditBoxStyle(_G["AltoholicTabSearch_MinLevel"]) - STYLE:ApplyEditBoxStyle(_G["AltoholicTabSearch_MaxLevel"]) - - for i = 1, 15 do - STYLE:ApplyButtonStyle(_G["AltoholicTabSearchMenuItem"..i]) - end - - for i = 1, 8 do - STYLE:ApplyButtonStyle(_G["AltoholicTabSearch_Sort"..i]) - end - end -end - -STYLE:SaveAddonStyle("Altoholic", StyleAltoholic, nil, true) \ 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 deleted file mode 100644 index 9ae8e8c..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua +++ /dev/null @@ -1,225 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -ATLASLOOT -########################################################## -]]-- -local timeLapse = 0; -local nineisthere = {"AtlasLootCompareFrameSortButton_7","AtlasLootCompareFrameSortButton_8","AtlasLootCompareFrameSortButton_9"} -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"} - -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) - end - 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 - for i = 1, 9 do local f = _G["AtlasLootCompareFrameSortButton_"..i]f:SetWidth(44.44)end - 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 - self:SetWidth(AtlasLootDefaultFrame:GetWidth()) -end - - -local function StyleAtlasLoot(event, addon) - assert(AtlasLootPanel, "AddOn Not Loaded") - - for _, object in pairs(StripAllTextures) do _G[object]:RemoveTextures()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:ApplyUnderlayStyle(_G["AtlasLootItemsFrame"], "Inset"); - STYLE:ApplyFrameStyle(_G["AtlasLootPanel"], "Default"); - hooksecurefunc(_G["AtlasLootPanel"], "SetPoint", _hook_ALPanel); - - _G["AtlasLootPanel"]:SetPoint("TOP",_G["AtlasLootDefaultFrame"],"BOTTOM",0,-1); - -- Back to the rest - STYLE:ApplyFrameStyle(_G["AtlasLootCompareFrame"], "Transparent"); - if AtlasLoot_PanelButton_1 then AtlasLoot_PanelButton_1:SetButtonTemplate() end - if AtlasLoot_PanelButton_2 then AtlasLoot_PanelButton_2:SetButtonTemplate() end - if AtlasLoot_PanelButton_3 then AtlasLoot_PanelButton_3:SetButtonTemplate() end - if AtlasLoot_PanelButton_4 then AtlasLoot_PanelButton_4:SetButtonTemplate() end - if AtlasLoot_PanelButton_5 then AtlasLoot_PanelButton_5:SetButtonTemplate() end - if AtlasLoot_PanelButton_6 then AtlasLoot_PanelButton_6:SetButtonTemplate() end - if AtlasLoot_PanelButton_7 then AtlasLoot_PanelButton_7:SetButtonTemplate() end - if AtlasLoot_PanelButton_8 then AtlasLoot_PanelButton_8:SetButtonTemplate() end - if AtlasLoot_PanelButton_9 then AtlasLoot_PanelButton_9:SetButtonTemplate() end - 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:RemoveTextures() end - - STYLE:ApplyCloseButtonStyle(AtlasLootDefaultFrame_CloseButton) - STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton) - STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton_Wishlist) - STYLE:ApplyPaginationStyle(AtlasLootQuickLooksButton) - STYLE:ApplyPaginationStyle(AtlasLootItemsFrame_NEXT) - AtlasLootItemsFrame_NEXT:SetWidth(25) - AtlasLootItemsFrame_NEXT:SetHeight(25) - STYLE:ApplyPaginationStyle(AtlasLootItemsFrame_PREV) - AtlasLootItemsFrame_PREV:SetWidth(25) - AtlasLootItemsFrame_PREV:SetHeight(25) - STYLE:ApplyPaginationStyle(AtlasLootPanelSearch_SelectModuel) - 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_ModuleSelect,240) - STYLE:ApplyDropdownStyle(AtlasLootDefaultFrame_InstanceSelect,240) - - STYLE:ApplyDropdownStyle(AtlasLootCompareFrameSearch_StatsListDropDown) - AtlasLootCompareFrameSearch_StatsListDropDown:SetWidth(240) - STYLE:ApplyDropdownStyle(AtlasLootCompareFrame_WishlistDropDown) - 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 - - AtlasLootPanel.Titel:SetTextColor(23/255, 132/255, 209/255) - AtlasLootPanel.Titel:SetPoint("BOTTOM", AtlasLootPanel.TitelBg, "BOTTOM", 0, 40) - STYLE:ApplyScrollFrameStyle(AtlasLootCompareFrame_ScrollFrameItemFrameScrollBar) - STYLE:ApplyScrollFrameStyle(AtlasLootCompareFrame_WishlistScrollFrameScrollBar) - AtlasLootDefaultFrame:HookScript("OnShow", AL_OnShow) - AtlasLootCompareFrame:HookScript("OnShow", Compare_OnShow) - AtlasLootPanel.timeLapse = 0; - - --AtlasLootPanel:HookScript("OnUpdate", _hook_OnUpdate) - - if(AtlasLootTooltip:GetName() ~= "GameTooltip") then - STYLE:ApplyTooltipStyle(AtlasLootTooltip) - end -end -STYLE:SaveAddonStyle("AtlasLoot", StyleAtlasLoot, nil, true) \ 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 deleted file mode 100644 index 3fe7bb3..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua +++ /dev/null @@ -1,88 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -AUCTIONLITE -########################################################## -]]-- -local function BGHelper(parent) - parent.bg = CreateFrame("Frame", nil, parent) - parent.bg:SetFixedPanelTemplate("Inset") - parent.bg:Point("TOPLEFT", parent, "TOPLEFT", 16, -103) - parent.bg:Point("BOTTOMRIGHT", AuctionFrame, "BOTTOMRIGHT", -8, 36) - parent.bg:SetFrameLevel(parent.bg:GetFrameLevel() - 1) -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() - BuyQuantity:SetEditboxTemplate() - SellStacks:SetEditboxTemplate() - SellSize:SetEditboxTemplate() - SellBidPriceGold:SetEditboxTemplate() - SellBidPriceSilver:SetEditboxTemplate() - SellBidPriceCopper:SetEditboxTemplate() - SellBuyoutPriceGold:SetEditboxTemplate() - SellBuyoutPriceSilver:SetEditboxTemplate() - SellBuyoutPriceCopper:SetEditboxTemplate() - - BuySearchButton:SetButtonTemplate() - BuyBidButton:SetButtonTemplate() - BuyBuyoutButton:SetButtonTemplate() - BuyCancelSearchButton:SetButtonTemplate() - BuyCancelAuctionButton:SetButtonTemplate() - BuyScanButton:SetButtonTemplate() - SellCreateAuctionButton:SetButtonTemplate() - - STYLE:ApplyPaginationStyle(BuyAdvancedButton) - STYLE:ApplyPaginationStyle(SellRememberButton) - - STYLE:ApplyTabStyle(AuctionFrameTab4) - STYLE:ApplyTabStyle(AuctionFrameTab5) - - if(_G["AuctionFrameBuy"]) then - BGHelper(_G["AuctionFrameBuy"]) - end - if(_G["AuctionFrameSell"]) then - BGHelper(_G["AuctionFrameSell"]) - end - - STYLE:SafeEventRemoval("AuctionLite", event) -end - -STYLE:SaveAddonStyle("AuctionLite", StyleAuctionLite, nil, nil, "AUCTION_HOUSE_SHOW") \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua deleted file mode 100644 index f005058..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua +++ /dev/null @@ -1,147 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G["SVUI"]; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -BIGWIGS -########################################################## -]]-- -local FreeBG -local BigWigsLoaded - -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.UIParent) - bg:Hide() - FreeBG[#FreeBG + 1] = bg - end - - local ibg = bar:Get("bigwigs:elvui:iconbg") - if ibg then - ibg:ClearAllPoints() - ibg:SetParent(SVUI.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 - 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) - 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 = SV.fubar - bar.candyBarIconFrame.OldSetWidth = bar.candyBarIconFrame.SetWidth - bar.candyBarIconFrame.SetWidth = SV.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 styleName = SV.NameID - local BigWigsBars = BigWigs:GetPlugin('Bars') - if BigWigsLoaded then return end - BigWigsLoaded = true - BigWigsBars:RegisterBarStyle(styleName, { - apiVersion = 1, - version = 1, - GetSpacing = function(bar) - return 4 - end, - ApplyStyle = applystyle, - BarStopped = freestyle, - GetStyleName = function() return styleName end, - }) - BigWigsBars:SetBarStyle(styleName) - STYLE:SafeEventRemoval("BigWigs", "ADDON_LOADED") - STYLE:SafeEventRemoval("BigWigs", "PLAYER_ENTERING_WORLD") - end -end - -STYLE:SaveAddonStyle("BigWigs", StyleBigWigs, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua deleted file mode 100644 index 502fb49..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua +++ /dev/null @@ -1,58 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -BUGSACK -########################################################## -]]-- -local function StyleBugSack(event, addon) - assert(BugSack, "AddOn Not Loaded") - hooksecurefunc(BugSack, "OpenSack", function() - if BugSackFrame.Panel then return end - BugSackFrame:RemoveTextures() - BugSackFrame:SetBasicPanel() - STYLE:ApplyTabStyle(BugSackTabAll) - BugSackTabAll:SetPoint("TOPLEFT", BugSackFrame, "BOTTOMLEFT", 0, 1) - STYLE:ApplyTabStyle(BugSackTabSession) - STYLE:ApplyTabStyle(BugSackTabLast) - BugSackNextButton:SetButtonTemplate() - BugSackSendButton:SetButtonTemplate() - BugSackPrevButton:SetButtonTemplate() - STYLE:ApplyScrollBarStyle(BugSackScrollScrollBar) - end) -end - -STYLE:SaveAddonStyle("Bugsack", StyleBugSack) \ 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 deleted file mode 100644 index ac2eca7..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua +++ /dev/null @@ -1,152 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -CLIQUE -########################################################## -]]-- -local CliqueFrames = { - "CliqueDialog", - "CliqueConfig", - "CliqueConfigPage1", - "CliqueConfigPage2", - "CliqueClickGrabber", - "CliqueScrollFrame" -} - -local CliqueButtons = { - "CliqueConfigPage1ButtonSpell", - "CliqueConfigPage1ButtonOther", - "CliqueConfigPage1ButtonOptions", - "CliqueConfigPage2ButtonBinding", - "CliqueDialogButtonAccept", - "CliqueDialogButtonBinding", - "CliqueConfigPage2ButtonSave", - "CliqueConfigPage2ButtonCancel", - "CliqueSpellTab", -} - -local CliqueStripped = { - "CliqueConfigPage1Column1", - "CliqueConfigPage1Column2", - "CliqueConfigPage1_VSlider", - "CliqueSpellTab", - "CliqueConfigPage1ButtonSpell", - "CliqueConfigPage1ButtonOther", - "CliqueConfigPage1ButtonOptions", - "CliqueConfigPage2ButtonBinding", - "CliqueDialogButtonAccept", - "CliqueDialogButtonBinding", - "CliqueConfigPage2ButtonSave", - "CliqueConfigPage2ButtonCancel", -} - -local CliqueConfigPage1_OnShow = function(self) - for i = 1, 12 do - if _G["CliqueRow"..i] then - _G["CliqueRow"..i.."Icon"]:SetTexCoord(0.1,0.9,0.1,0.9); - _G["CliqueRow"..i.."Bind"]:ClearAllPoints() - if _G["CliqueRow"..i] == CliqueRow1 then - _G["CliqueRow"..i.."Bind"]:SetPoint("RIGHT", _G["CliqueRow"..i], 8,0) - else - _G["CliqueRow"..i.."Bind"]:SetPoint("RIGHT", _G["CliqueRow"..i], -9,0) - end - _G["CliqueRow"..i]:GetHighlightTexture():SetDesaturated(1) - end - end - CliqueRow1:ClearAllPoints() - CliqueRow1:SetPoint("TOPLEFT",5,-(CliqueConfigPage1Column1:GetHeight() +3)) -end - -local function StyleClique() - assert(CliqueDialog, "AddOn Not Loaded") - - for _, gName in pairs(CliqueFrames) do - local frame = _G[gName] - if(frame) then - STYLE:ApplyFrameStyle(frame, "Transparent") - if(gName == "CliqueConfig") then - frame.Panel:SetPoint("TOPLEFT",0,0) - frame.Panel:SetPoint("BOTTOMRIGHT",0,-5) - elseif(gName == "CliqueClickGrabber" or gName == "CliqueScrollFrame") then - frame.Panel:SetPoint("TOPLEFT",4,0) - frame.Panel:SetPoint("BOTTOMRIGHT",-2,4) - else - frame.Panel:SetPoint("TOPLEFT",0,0) - frame.Panel:SetPoint("BOTTOMRIGHT",2,0) - end - end - end - - for _, gName in pairs(CliqueStripped) do - local frame = _G[gName] - if(frame) then - frame:RemoveTextures(true) - end - end - - for _, gName in pairs(CliqueButtons) do - local button = _G[gName] - if(button) then - button:SetButtonTemplate() - end - end - - STYLE:ApplyCloseButtonStyle(CliqueDialog.CloseButton) - - CliqueConfigPage1:SetScript("OnShow", CliqueConfigPage1_OnShow) - - CliqueDialog:SetSize(CliqueDialog:GetWidth()-1, CliqueDialog:GetHeight()-1) - - CliqueConfigPage1ButtonSpell:ClearAllPoints() - CliqueConfigPage1ButtonSpell:SetPoint("TOPLEFT", CliqueConfigPage1,"BOTTOMLEFT",0,-4) - - CliqueConfigPage1ButtonOptions:ClearAllPoints() - CliqueConfigPage1ButtonOptions:SetPoint("TOPRIGHT", CliqueConfigPage1,"BOTTOMRIGHT",2,-4) - - CliqueConfigPage2ButtonSave:ClearAllPoints() - CliqueConfigPage2ButtonSave:SetPoint("TOPLEFT", CliqueConfigPage2,"BOTTOMLEFT",0,-4) - - CliqueConfigPage2ButtonCancel:ClearAllPoints() - CliqueConfigPage2ButtonCancel:SetPoint("TOPRIGHT", CliqueConfigPage2,"BOTTOMRIGHT",2,-4) - - CliqueSpellTab:GetRegions():SetSize(.1,.1) - CliqueSpellTab:GetNormalTexture():SetTexCoord(0.1,0.9,0.1,0.9) - CliqueSpellTab:GetNormalTexture():ClearAllPoints() - CliqueSpellTab:GetNormalTexture():FillInner() -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 deleted file mode 100644 index 807be7f..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua +++ /dev/null @@ -1,58 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -COOLINE -########################################################## -]]-- -local function StyleCoolLine() - assert(CoolLineDB, "AddOn Not Loaded") - - CoolLineDB.bgcolor = { r = 0, g = 0, b = 0, a = 0, } - CoolLineDB.border = "None" - CoolLine.updatelook() - STYLE:ApplyFrameStyle(CoolLine,"Transparent") - CoolLine.Panel:SetAllPoints(CoolLine) - SV:AddToDisplayAudit(CoolLine) - - if STYLE:IsAddonReady("DockletCoolLine") then - if not CoolLineDB.vertical then - CoolLine:SetPoint('BOTTOMRIGHT', SVUI_ActionBar1, 'TOPRIGHT', 0, 4) - CoolLine:SetPoint("BOTTOMLEFT", SVUI_ActionBar1, "TOPLEFT", 0, 4) - end - end -end -STYLE:SaveAddonStyle("CoolLine", StyleCoolLine) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua deleted file mode 100644 index d89d5fb..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua +++ /dev/null @@ -1,212 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -DBM -########################################################## -]]-- -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 - 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(SV.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SV.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 = DBMBossHealthDropdown:GetParent() - if not anchor.styled then - local header = {anchor:GetRegions()} - if header[1]:IsObjectType('FontString') then - header[1]:SetFontTemplate(SV.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 - 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 - 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 - 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(SV.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SV.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 - - 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", event) -end - -STYLE:SaveAddonStyle("DBM", StyleDBM, false, true) \ 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 deleted file mode 100644 index 95a0088..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua +++ /dev/null @@ -1,135 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; -local playerName = UnitName("player"); -local playerRealm = GetRealmName(); -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 = SV.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 = SV.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 = SV.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 = SV.fubar - StyleDXEBar(bar) - bar.styled = true - end - i = i + 1 - end - frame.refreshing = false -end - -LoadAddOn("DXE") - -local function StyleDXE() - assert(DXE, "AddOn Not Loaded") - - DXE.LayoutHealthWatchers_ = DXE.LayoutHealthWatchers - DXE.LayoutHealthWatchers = function(frame) - DXE:LayoutHealthWatchers_() - for i,hw in ipairs(frame.HW) do - if hw:IsShown() then - hw:SetFixedPanelTemplate("Transparent") - hw.border.Show = SV.fubar - hw.border:Hide() - hw.healthbar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - end - end - end - - local DXEAlerts = DXE:GetModule("Alerts") - local frame = CreateFrame("Frame") - - frame.elapsed = 1 - frame:SetScript("OnUpdate", function(frame,elapsed) - frame.elapsed = frame.elapsed + elapsed - if(frame.elapsed >= 1) then - RefreshDXEBars(DXEAlerts) - 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" - DXEDB["profiles"][playerKey]["Globals"]["Font"] = SV.Media.font.default - DXEDB["profiles"][playerKey]["Globals"]["TimerFont"] = SV.Media.font.default -end -STYLE:SaveAddonStyle("DXE", StyleDXE) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua deleted file mode 100644 index 24d67c3..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua +++ /dev/null @@ -1,104 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -LIGHTHEADED -########################################################## -]]-- -local timeLapse = 0; - -local function DoDis(self, elapsed) - self.timeLapse = self.timeLapse + elapsed - if(self.timeLapse < 2) then - return - else - self.timeLapse = 0 - end - QuestNPCModel:ClearAllPoints() - QuestNPCModel:SetPoint("TOPLEFT", LightHeadedFrame, "TOPRIGHT", 5, -10) - QuestNPCModel:SetAlpha(0.85) - LightHeadedFrame:SetPoint("LEFT", QuestLogFrame, "RIGHT", 2, 0) -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:RemoveTextures() - - lhframe.close:Hide() - STYLE:ApplyCloseButtonStyle(lhframe.close) - lhframe.handle:Hide() - - 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:ApplyScrollFrameStyle(LightHeadedScrollFrameScrollBar, 5) - 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) - end - local buttons = { - "LightHeaded_Panel_Button1", - "LightHeaded_Panel_Button2", - } - - for _, button in pairs(buttons) do - _G[button]:SetButtonTemplate() - end - - LightHeaded_Panel_Button2:Disable() - end -end -STYLE:SaveAddonStyle("Lightheaded", StyleLightHeaded) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua deleted file mode 100644 index 7489024..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua +++ /dev/null @@ -1,89 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -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:ApplyItemButtonStyle(_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"]:RemoveTextures(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:RemoveTextures(true) - STYLE:ApplyFrameStyle(MogItFilters) - MogItFiltersInset:RemoveTextures(true) - - hooksecurefunc(MogIt, "CreatePreview", StyleMogItPreview) - STYLE:ApplyTooltipStyle(MogItTooltip) - STYLE:ApplyCloseButtonStyle(MogItFrameCloseButton) - STYLE:ApplyCloseButtonStyle(MogItFiltersCloseButton) - MogItFrameFiltersDefaults:RemoveTextures(true) - MogItFrameFiltersDefaults:SetButtonTemplate() - STYLE:ApplyScrollFrameStyle(MogItScroll) - STYLE:ApplyScrollFrameStyle(MogItFiltersScrollScrollBar) -end -STYLE:SaveAddonStyle("MogIt", StyleMogIt) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua deleted file mode 100644 index 7d03c80..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua +++ /dev/null @@ -1,88 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -OMEN -########################################################## -]]-- -local function StyleOmen() - assert(Omen, "AddOn Not Loaded") - - Omen.db.profile.Scale = 1 - Omen.db.profile.Bar.Spacing = 1 - Omen.db.profile.Bar.Texture = "SVUI MultiColorBar" - Omen.db.profile.Background.EdgeSize = 2 - Omen.db.profile.Background.BarInset = 2 - Omen.db.profile.Background.Texture = "None" - Omen.db.profile.TitleBar.UseSameBG = true - - hooksecurefunc(Omen, 'UpdateBackdrop', function(self) - if not SVUI.CurrentlyDocked["OmenAnchor"] then - STYLE:ApplyFrameStyle(self.BarList, 'Transparent') - self.Title:RemoveTextures() - self.Title:SetPanelTemplate("Default") - self.Title:SetPanelColor("class") - end - self.BarList:SetPoint('TOPLEFT', self.Title, 'BOTTOMLEFT', 0, 1) - end) - - Omen:UpdateBackdrop() - Omen:ReAnchorBars() - Omen:ResizeBars() -end -STYLE:SaveAddonStyle("Omen", StyleOmen, nil, true) - -function STYLE:Docklet_Omen(parent) - if not Omen then return end - local db=Omen.db; - db.profile.Scale=1; - db.profile.Bar.Spacing=1; - db.profile.Background.EdgeSize=2; - db.profile.Background.BarInset=2; - db.profile.TitleBar.UseSameBG=true; - db.profile.ShowWith.UseShowWith=false; - db.profile.Locked=true; - db.profile.TitleBar.ShowTitleBar=true; - db.profile.FrameStrata='2-LOW' - Omen:OnProfileChanged(nil,db) - OmenTitle:RemoveTextures() - OmenTitle.Panel = nil - OmenTitle:SetPanelTemplate("Default") - OmenTitle:SetPanelColor("class") - OmenBarList:RemoveTextures() - OmenBarList.Panel = nil - OmenBarList:SetFixedPanelTemplate('Transparent') - OmenAnchor:ClearAllPoints() - OmenAnchor:SetAllPoints(parent) -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua deleted file mode 100644 index 6b08d87..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua +++ /dev/null @@ -1,119 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -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) - OutfitterFrameTab1:Size(60, 25) - OutfitterFrameTab2:Size(60, 25) - OutfitterFrameTab3:Size(60, 25) - OutfitterMainFrame:RemoveTextures(true) - for i = 0, 13 do - if _G["OutfitterItem"..i.."OutfitSelected"] then - _G["OutfitterItem"..i.."OutfitSelected"]:SetButtonTemplate() - _G["OutfitterItem"..i.."OutfitSelected"]:ClearAllPoints() - _G["OutfitterItem"..i.."OutfitSelected"]:Size(16) - _G["OutfitterItem"..i.."OutfitSelected"]:Point("LEFT", _G["OutfitterItem"..i.."Outfit"], "LEFT", 8, 0) - end - end - end) - OutfitterMainFrameScrollbarTrench:RemoveTextures(true) - OutfitterFrameTab1:ClearAllPoints() - OutfitterFrameTab2:ClearAllPoints() - OutfitterFrameTab3:ClearAllPoints() - OutfitterFrameTab1:Point("TOPLEFT", OutfitterFrame, "BOTTOMRIGHT", -65, -2) - OutfitterFrameTab2:Point("LEFT", OutfitterFrameTab1, "LEFT", -65, 0) - OutfitterFrameTab3:Point("LEFT", OutfitterFrameTab2, "LEFT", -65, 0) - OutfitterFrameTab1:SetButtonTemplate() - OutfitterFrameTab2:SetButtonTemplate() - OutfitterFrameTab3:SetButtonTemplate() - STYLE:ApplyScrollFrameStyle(OutfitterMainFrameScrollFrameScrollBar) - STYLE:ApplyCloseButtonStyle(OutfitterCloseButton) - OutfitterNewButton:SetButtonTemplate() - OutfitterEnableNone:SetButtonTemplate() - OutfitterEnableAll:SetButtonTemplate() - OutfitterButton:ClearAllPoints() - OutfitterButton:SetPoint("RIGHT", PaperDollSidebarTabs, "RIGHT", 26, -2) - OutfitterButton:SetHighlightTexture(nil) - OutfitterSlotEnables:SetFrameStrata("HIGH") - OutfitterEnableHeadSlot:SetCheckboxTemplate(true) - OutfitterEnableNeckSlot:SetCheckboxTemplate(true) - OutfitterEnableShoulderSlot:SetCheckboxTemplate(true) - OutfitterEnableBackSlot:SetCheckboxTemplate(true) - OutfitterEnableChestSlot:SetCheckboxTemplate(true) - OutfitterEnableShirtSlot:SetCheckboxTemplate(true) - OutfitterEnableTabardSlot:SetCheckboxTemplate(true) - OutfitterEnableWristSlot:SetCheckboxTemplate(true) - OutfitterEnableMainHandSlot:SetCheckboxTemplate(true) - OutfitterEnableSecondaryHandSlot:SetCheckboxTemplate(true) - OutfitterEnableHandsSlot:SetCheckboxTemplate(true) - OutfitterEnableWaistSlot:SetCheckboxTemplate(true) - OutfitterEnableLegsSlot:SetCheckboxTemplate(true) - OutfitterEnableFeetSlot:SetCheckboxTemplate(true) - OutfitterEnableFinger0Slot:SetCheckboxTemplate(true) - OutfitterEnableFinger1Slot:SetCheckboxTemplate(true) - OutfitterEnableTrinket0Slot:SetCheckboxTemplate(true) - OutfitterEnableTrinket1Slot:SetCheckboxTemplate(true) - OutfitterItemComparisons:SetButtonTemplate() - OutfitterTooltipInfo:SetButtonTemplate() - OutfitterShowHotkeyMessages:SetButtonTemplate() - OutfitterShowMinimapButton:SetButtonTemplate() - OutfitterShowOutfitBar:SetButtonTemplate() - OutfitterAutoSwitch:SetButtonTemplate() - OutfitterItemComparisons:Size(20) - OutfitterTooltipInfo:Size(20) - OutfitterShowHotkeyMessages:Size(20) - OutfitterShowMinimapButton:Size(20) - OutfitterShowOutfitBar:Size(20) - OutfitterAutoSwitch:Size(20) - OutfitterShowOutfitBar:Point("TOPLEFT", OutfitterAutoSwitch, "BOTTOMLEFT", 0, -5) - OutfitterEditScriptDialogDoneButton:SetButtonTemplate() - OutfitterEditScriptDialogCancelButton:SetButtonTemplate() - STYLE:ApplyScrollFrameStyle(OutfitterEditScriptDialogSourceScriptScrollBar) - STYLE:ApplyFrameStyle(OutfitterEditScriptDialogSourceScript,"Transparent") - STYLE:ApplyFrameStyle(OutfitterEditScriptDialog) - STYLE:ApplyCloseButtonStyle(OutfitterEditScriptDialog.CloseButton) - STYLE:ApplyTabStyle(OutfitterEditScriptDialogTab1) - STYLE:ApplyTabStyle(OutfitterEditScriptDialogTab2) -end -STYLE:SaveAddonStyle("Outfitter", StyleOutfitter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua deleted file mode 100644 index a5ace41..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua +++ /dev/null @@ -1,89 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -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) - if b.returnicon then - b.returnicon:SetPoint("TOPRIGHT", b, "TOPRIGHT", 20, 0) - end - if _G['PostalInboxCB'..i] and not _G['PostalInboxCB'..i].handled then - _G['PostalInboxCB'..i]:SetCheckboxTemplate(true) - _G['PostalInboxCB'..i].handled = true - end - end - if PostalSelectOpenButton and not PostalSelectOpenButton.handled then - PostalSelectOpenButton:SetButtonTemplate() - PostalSelectOpenButton.handled = true - PostalSelectOpenButton:Point("RIGHT", InboxFrame, "TOP", -41, -48) - end - if Postal_OpenAllMenuButton and not Postal_OpenAllMenuButton.handled then - STYLE:ApplyPaginationStyle(Postal_OpenAllMenuButton, true) - Postal_OpenAllMenuButton:SetPoint('LEFT', PostalOpenAllButton, 'RIGHT', 5, 0) - Postal_OpenAllMenuButton.handled = true - end - if PostalOpenAllButton and not PostalOpenAllButton.handled then - PostalOpenAllButton:SetButtonTemplate() - PostalOpenAllButton.handled = true - PostalOpenAllButton:Point("CENTER", InboxFrame, "TOP", -34, -400) - end - if PostalSelectReturnButton and not PostalSelectReturnButton.handled then - PostalSelectReturnButton:SetButtonTemplate() - PostalSelectReturnButton.handled = true - PostalSelectReturnButton:Point("LEFT", InboxFrame, "TOP", -5, -48) - end - if Postal_PackageMenuButton and not Postal_PackageMenuButton.handled then - STYLE:ApplyPaginationStyle(Postal_PackageMenuButton, true) - Postal_PackageMenuButton.handled = true - Postal_PackageMenuButton:SetPoint('TOPRIGHT', MailFrame, -53, -6) - end - if Postal_BlackBookButton and not Postal_BlackBookButton.handled then - STYLE:ApplyPaginationStyle(Postal_BlackBookButton, true) - Postal_BlackBookButton.handled = true - Postal_BlackBookButton:SetPoint('LEFT', SendMailNameEditBox, 'RIGHT', 5, 2) - end -end -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 deleted file mode 100644 index 48d8db9..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua +++ /dev/null @@ -1,78 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -QUARTZ -########################################################## -]]-- -local function StyleQuartz() - local AceAddon = LibStub("AceAddon-3.0") - if(not AceAddon) then return end - 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) - if not self.isStyled then - self.IconBorder = CreateFrame("Frame", nil, self) - STYLE:ApplyFrameStyle(self.IconBorder,"Transparent") - self.IconBorder:SetFrameLevel(0) - self.IconBorder:WrapOuter(self.Icon) - STYLE:ApplyFrameStyle(self.Bar,"Transparent",true) - self.isStyled = true - end - if self.config.hideicon then - self.IconBorder:Hide() - else - 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 - STYLE:ApplyFrameStyle(Quartz3GCDBar,"Transparent",true) - end - end) - end -end -STYLE:SaveAddonStyle("Quartz", StyleQuartz) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua deleted file mode 100644 index bc14641..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua +++ /dev/null @@ -1,144 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -RECOUNT -########################################################## -]]-- -local function NoColor(a) - for p=1,a:GetNumRegions()do - local q=select(p,a:GetRegions()) - if q:GetObjectType()=='Texture'then - q:SetDesaturated(true) - if q:GetTexture()=='Interface\\DialogFrame\\UI-DialogBox-Corner'then - q:SetTexture(0,0,0,0) - q:Die() - end - end - end -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 - - local function StyleFrame(frame) - STYLE:ApplyFrameStyle(frame,"Transparent") - frame.Panel:SetAllPoints() - frame.Panel:SetPoint('TOPLEFT', frame, 'TOPLEFT', 0, -6) - frame.CloseButton:SetPoint('TOPRIGHT', frame, 'TOPRIGHT', -1, -9) - frame:SetBackdrop(nil) - - frame.TitleBackground = CreateFrame('Frame', nil, frame) - frame.TitleBackground:SetFixedPanelTemplate("Default") - frame.TitleBackground:SetPanelColor("class") - frame.TitleBackground:SetPoint('TOP', frame, 'TOP', 0, -8) - frame.TitleBackground.timeLapse = 0 - frame.TitleBackground:SetScript('OnUpdate', function(self,elapsed) - self.timeLapse = self.timeLapse + elapsed - if(self.timeLapse < 0.2) then - return - else - self.timeLapse = 0 - end - self:SetSize(frame:GetWidth() - 4, 22) - end) - frame.TitleBackground:SetFrameLevel(frame:GetFrameLevel()) - frame.Title:SetPoint('TOPLEFT', frame, 'TOPLEFT', 6, -12) - NoColor(frame.CloseButton) - if frame.ConfigButton then NoColor(frame.ConfigButton) end - if frame.FileButton then NoColor(frame.FileButton) end - if frame.LeftButton then NoColor(frame.LeftButton) end - if frame.ResetButton then NoColor(frame.ResetButton) end - if frame.RightButton then NoColor(frame.RightButton) end - if frame.ReportButton then NoColor(frame.ReportButton) end - if frame.SummaryButton then NoColor(frame.SummaryButton) end - end - - local RecountFrames = { - Recount.MainWindow, - Recount.ConfigWindow, - Recount.GraphWindow, - Recount.DetailWindow, - } - - for _, frame in pairs(RecountFrames) do - if frame then - StyleFrame(frame) - end - end - - STYLE:ApplyScrollFrameStyle(Recount_MainWindow_ScrollBarScrollBar) - - Recount_MainWindow:HookScript('OnShow', function(self) if InCombatLockdown() then return end if SV.CurrentlyDocked["Recount_MainWindow"] then SuperDockWindowRight:Show() end end) - Recount.MainWindow.FileButton:HookScript('OnClick', function(self) if LibDropdownFrame0 then STYLE:ApplyFrameStyle(LibDropdownFrame0) end end) - - hooksecurefunc(Recount, 'ShowScrollbarElements', function(self, name) Recount_MainWindow_ScrollBarScrollBar:Show() end) - hooksecurefunc(Recount, 'HideScrollbarElements', function(self, name) Recount_MainWindow_ScrollBarScrollBar:Hide() end) - hooksecurefunc(Recount, 'CreateFrame', function(self, frame) StyleFrame(_G[frame]) end) - - hooksecurefunc(Recount, 'ShowReport', function(self) - if Recount_ReportWindow.isStyled then return end - Recount_ReportWindow.isStyled = true - STYLE:ApplyFrameStyle(Recount_ReportWindow.Whisper) - Recount_ReportWindow.ReportButton:SetButtonTemplate() - STYLE:ApplyScrollBarStyle(Recount_ReportWindow_Slider) - Recount_ReportWindow_Slider:GetThumbTexture():Size(6,6) - end) -end -STYLE:SaveAddonStyle("Recount", StyleRecount) - -function STYLE:Docklet_Recount(parent) - if not Recount then return end - local n=Recount.MainWindow.Panel; - if n and not n.Panel then - n:Show() - n:SetFixedPanelTemplate('Transparent',true) - end - Recount.db.profile.Locked=true; - Recount.db.profile.Scaling=1; - Recount.db.profile.ClampToScreen=true; - Recount.db.profile.FrameStrata='2-LOW' - Recount.MainWindow:ClearAllPoints() - Recount.MainWindow:SetAllPoints(parent) - Recount:SetStrataAndClamp() - Recount:LockWindows(true) - Recount:ResizeMainWindow() - Recount_MainWindow_ScrollBar:Hide() -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua deleted file mode 100644 index ad5fd29..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua +++ /dev/null @@ -1,105 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -SEXYCOOLDOWN -########################################################## -]]-- -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) - SV: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") -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() - end - hooksecurefunc(SexyCooldown2, 'CreateBar', function(self) - for _, bar in ipairs(self.bars) do - HookSCDBar(bar) - bar:UpdateBarLook() - end - end) -end -STYLE:SaveAddonStyle("SexyCooldown", StyleSexyCooldown) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua deleted file mode 100644 index 215ac67..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua +++ /dev/null @@ -1,151 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; -local twipe = table.wipe; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local STYLE = select(2, ...); -local Schema = STYLE.Schema; -local activePanels = {}; -local SkadaHolder, SkadaHolder2 ---[[ -########################################################## -SKADA -########################################################## -]]-- -local function CheckForHolders() - if(not SkadaHolder) then - SkadaHolder = CreateFrame("Frame", "SkadaHolder", SuperDockletMain) - end - if(not SkadaHolder2) then - SkadaHolder2 = CreateFrame("Frame", "SkadaHolder2", SuperDockletExtra) - end - SkadaHolder:SetSize(SuperDockletMain:GetSize()) - SkadaHolder2:SetSize(SuperDockletExtra:GetSize()) -end - -local function skada_panel_loader(holder, window) - if not window then return end - - local bars = Skada.displays['bar'] - - local width,height = holder:GetSize() - - window.db.barspacing = 1; - window.db.barwidth = width - 4; - window.db.background.height = height - (window.db.enabletitle and window.db.title.height or 0) - 1; - window.db.spark=false; - window.db.barslocked = true; - window.bargroup:ClearAllPoints() - window.bargroup:SetPoint('BOTTOMLEFT',holder,'BOTTOMLEFT',0,0) - window.bargroup:SetParent(holder) - window.bargroup:SetFrameStrata('LOW') - - local bgroup = window.bargroup.backdrop; - if bgroup then - bgroup:Show() - bgroup:SetFixedPanelTemplate('Transparent',true) - end - - bars.ApplySettings(bars, window) -end - -function STYLE:Docklet_Skada() - if not Skada then return end - CheckForHolders() - for index,window in pairs(Skada:GetWindows()) do - local wname = window.db.name or "" - local key = "Skada" .. wname - if(SVUI.db.SVDock.docklets.DockletMain == key)then - skada_panel_loader(SkadaHolder, window) - elseif(SVUI.db.SVDock.docklets.enableExtra and SVUI.db.SVDock.docklets.DockletExtra == key) then - skada_panel_loader(SkadaHolder2, window) - else - window.db.barslocked = false; - end - end -end - -local function Skada_ShowPopup(self) - STYLE:LoadAlert('Do you want to reset Skada?', function(self) Skada:Reset() self:GetParent():Hide() end) -end - -local function StyleSkada() - assert(Skada, "AddOn Not Loaded") - - CheckForHolders() - Skada.ShowPopup = Skada_ShowPopup - - local SkadaDisplayBar = Skada.displays['bar'] - - hooksecurefunc(SkadaDisplayBar, 'AddDisplayOptions', function(self, window, options) - options.baroptions.args.barspacing = nil - options.titleoptions.args.texture = nil - options.titleoptions.args.bordertexture = nil - options.titleoptions.args.thickness = nil - options.titleoptions.args.margin = nil - options.titleoptions.args.color = nil - options.windowoptions = nil - end) - - hooksecurefunc(SkadaDisplayBar, 'ApplySettings', function(self, window) - local skada = window.bargroup - if not skada then return end - local panelAnchor = skada - skada:SetSpacing(1) - skada:SetFrameLevel(5) - skada:SetBackdrop(nil) - - if(window.db.enabletitle) then - panelAnchor = skada.button - skada.button:SetHeight(18) - skada.button:SetButtonTemplate() - skada.button:GetFontString():SetFont(SVUI.Media.font.names, 15, "OUTLINE") - end - - skada:SetPanelTemplate("Transparent") - skada.Panel:ClearAllPoints() - skada.Panel:SetPoint('TOPLEFT', panelAnchor, 'TOPLEFT', -2, 2) - skada.Panel:SetPoint('BOTTOMRIGHT', skada, 'BOTTOMRIGHT', 2, -2) - end) - - hooksecurefunc(Skada, 'CreateWindow', function() - if SVUI.CurrentlyDocked["SkadaHolder"] or SVUI.CurrentlyDocked["SkadaHolder2"] then - STYLE:Docklet_Skada() - end - end) - - hooksecurefunc(Skada, 'DeleteWindow', function() - if SVUI.CurrentlyDocked["SkadaHolder"] or SVUI.CurrentlyDocked["SkadaHolder2"] then - STYLE:Docklet_Skada() - end - end) -end - -STYLE:SaveAddonStyle("Skada", StyleSkada, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua deleted file mode 100644 index ec46d7d..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua +++ /dev/null @@ -1,74 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -TINYDPS -########################################################## -]]-- -local function StyleTinyDPS() - assert(tdpsFrame, "AddOn Not Loaded") - - STYLE:ApplyFrameStyle(tdpsFrame) - - tdpsFrame:HookScript("OnShow", function() - if InCombatLockdown() then return end - if SV.CurrentlyDocked["tdpsFrame"] then - SuperDockWindowRight:Show() - 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 - -STYLE:SaveAddonStyle("TinyDPS", StyleTinyDPS) - -function STYLE:Docklet_TinyDPS(parent) - if not tdpsFrame then return end - tdpsFrame:SetFixedPanelTemplate("Transparent", true) - tdpsFrame:SetFrameStrata("LOW") - tdps.hideOOC = false; - tdps.hideIC = false; - tdps.hideSolo = false; - tdps.hidePvP = false; - tdpsFrame:ClearAllPoints() - tdpsFrame:SetAllPoints(parent) - tdpsRefresh() -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua deleted file mode 100644 index 52397c3..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua +++ /dev/null @@ -1,45 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -TOMTOM -########################################################## -]]-- -local function StyleTomTom() - 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 deleted file mode 100644 index f904b36..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua +++ /dev/null @@ -1,144 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -TSDW -########################################################## -]]-- -local function StyleTradeSkillDW() - assert(TradeSkillDW_QueueFrame, "AddOn Not Loaded") - - TradeSkillFrame:SetPanelTemplate("Action") - TradeSkillListScrollFrame:RemoveTextures(true) - TradeSkillDetailScrollFrame:RemoveTextures(true) - TradeSkillFrameInset:RemoveTextures(true) - TradeSkillExpandButtonFrame:RemoveTextures(true) - TradeSkillDetailScrollChildFrame:RemoveTextures(true) - TradeSkillListScrollFrame:RemoveTextures(true) - STYLE:ApplyFrameStyle(TradeSkillGuildFrame,"Transparent") - STYLE:ApplyFrameStyle(TradeSkillGuildFrameContainer,"Transparent") - TradeSkillGuildFrame:Point("BOTTOMLEFT", TradeSkillFrame, "BOTTOMRIGHT", 3, 19) - STYLE:ApplyCloseButtonStyle(TradeSkillGuildFrameCloseButton) - - TradeSkillFrame:HookScript("OnShow", function() - STYLE:ApplyFrameStyle(TradeSkillFrame) - TradeSkillListScrollFrame:RemoveTextures() - if not TradeSkillDWExpandButton then return end - if not TradeSkillDWExpandButton.styled then - STYLE:ApplyPaginationStyle(TradeSkillDWExpandButton) - TradeSkillDWExpandButton.styled = true - end - end) - - TradeSkillFrame:Height(TradeSkillFrame:GetHeight() + 12) - TradeSkillRankFrame:SetBasicPanel() - TradeSkillRankFrame:SetStatusBarTexture(SV.Media.bar.default) - TradeSkillCreateButton:SetButtonTemplate() - TradeSkillCancelButton:SetButtonTemplate() - TradeSkillFilterButton:SetButtonTemplate() - TradeSkillCreateAllButton:SetButtonTemplate() - TradeSkillViewGuildCraftersButton:SetButtonTemplate() - TradeSkillLinkButton:GetNormalTexture():SetTexCoord(0.25, 0.7, 0.37, 0.75) - TradeSkillLinkButton:GetPushedTexture():SetTexCoord(0.25, 0.7, 0.45, 0.8) - TradeSkillLinkButton:GetHighlightTexture():Die() - STYLE:ApplyFrameStyle(TradeSkillLinkButton,"Transparent") - TradeSkillLinkButton:Size(17, 14) - TradeSkillLinkButton:Point("LEFT", TradeSkillLinkFrame, "LEFT", 5, -1) - TradeSkillFrameSearchBox:SetEditboxTemplate() - TradeSkillInputBox:SetEditboxTemplate() - TradeSkillIncrementButton:Point("RIGHT", TradeSkillCreateButton, "LEFT", -13, 0) - STYLE:ApplyCloseButtonStyle(TradeSkillFrameCloseButton) - STYLE:ApplyScrollFrameStyle(TradeSkillDetailScrollFrameScrollBar) - local once = false - hooksecurefunc("TradeSkillFrame_SetSelection", function(id) - TradeSkillSkillIcon:SetButtonTemplate() - - if TradeSkillSkillIcon:GetNormalTexture() then - TradeSkillSkillIcon:GetNormalTexture():SetTexCoord(0.1,0.9,0.1,0.9) - TradeSkillSkillIcon:GetNormalTexture():ClearAllPoints() - TradeSkillSkillIcon:GetNormalTexture():Point("TOPLEFT", 2, -2) - TradeSkillSkillIcon:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) - end - - for i = 1, MAX_TRADE_SKILL_REAGENTS do - local button = _G["TradeSkillReagent"..i] - local icon = _G["TradeSkillReagent"..i.."IconTexture"] - local count = _G["TradeSkillReagent"..i.."Count"] - icon:SetTexCoord(0.1,0.9,0.1,0.9) - icon:SetDrawLayer("OVERLAY") - if not icon.backdrop then - icon.backdrop = CreateFrame("Frame", nil, button) - icon.backdrop:SetFrameLevel(button:GetFrameLevel() - 1) - STYLE:ApplyFrameStyle(icon.backdrop,"Transparent") - icon.backdrop:Point("TOPLEFT", icon, "TOPLEFT", -2, 2) - icon.backdrop:Point("BOTTOMRIGHT", icon, "BOTTOMRIGHT", 2, -2) - end - icon:SetParent(icon.backdrop) - count:SetParent(icon.backdrop) - count:SetDrawLayer("OVERLAY") - if i > 2 and once == false then - local point, anchoredto, point2, x, y = button:GetPoint() - button:ClearAllPoints() - button:Point(point, anchoredto, point2, x, y - 3) - once = true - end - _G["TradeSkillReagent"..i.."NameFrame"]:Die() - end - end) - - TradeSkillDW_QueueFrame:HookScript("OnShow", function() STYLE:ApplyFrameStyle(TradeSkillDW_QueueFrame,"Transparent") end) - - STYLE:ApplyCloseButtonStyle(TradeSkillDW_QueueFrameCloseButton) - - TradeSkillDW_QueueFrameInset:RemoveTextures() - TradeSkillDW_QueueFrameClear:SetButtonTemplate() - TradeSkillDW_QueueFrameDown:SetButtonTemplate() - TradeSkillDW_QueueFrameUp:SetButtonTemplate() - TradeSkillDW_QueueFrameDo:SetButtonTemplate() - TradeSkillDW_QueueFrameDetailScrollFrame:RemoveTextures() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrame:RemoveTextures() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent1:RemoveTextures() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent2:RemoveTextures() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent3:RemoveTextures() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent4:RemoveTextures() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent5:RemoveTextures() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent6:RemoveTextures() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent7:RemoveTextures() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent8:RemoveTextures() - STYLE:ApplyScrollFrameStyle(TradeSkillDW_QueueFrameDetailScrollFrameScrollBar) - TradeSkillListScrollFrame:RemoveTextures() -end -STYLE:SaveAddonStyle("TradeSkillDW", StyleTradeSkillDW) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua deleted file mode 100644 index 5942c5f..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua +++ /dev/null @@ -1,250 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -VEM -########################################################## -]]-- -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 - 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 - - 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) - - frame:SetHeight(22) - name:Point('LEFT', frame, 'LEFT', 4, 0) - timer:Point('RIGHT', frame, 'RIGHT', -4, 0) - - name:SetFont(SV.Media.font.default, 12, 'OUTLINE') - timer:SetFont(SV.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(SV.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 - 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(SV.Media.font.default, 12, 'OUTLINE') - timer:SetFont(SV.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', _hook_OnShow) - VEMRangeCheckRadar:SetFixedPanelTemplate('Transparent') - end - - if not VEM_SavedOptions['DontShowInfoFrame'] then - VEM.InfoFrame:Show(5, 'test') - VEM.InfoFrame:Hide() - VEMInfoFrame:HookScript('OnShow', _hook_OnShow) - end - - 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) - STYLE:ApplyFrameStyle(VEM_GUI_OptionsFrameBossMods) - STYLE:ApplyFrameStyle(VEM_GUI_OptionsFrameVEMOptions) - STYLE:ApplyFrameStyle(VEM_GUI_OptionsFramePanelContainer, 'Transparent', true) - end) - STYLE:ApplyTabStyle(VEM_GUI_OptionsFrameTab1) - STYLE:ApplyTabStyle(VEM_GUI_OptionsFrameTab2) - VEM_GUI_OptionsFrameOkay:SetButtonTemplate() - VEM_GUI_OptionsFrameWebsiteButton:SetButtonTemplate() - STYLE:ApplyScrollFrameStyle(VEM_GUI_OptionsFramePanelContainerFOVScrollBar) - STYLE:SafeEventRemoval("VEM", event) - end -end -STYLE:SaveAddonStyle("VEM", StyleVEM, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/_load.xml b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/_load.xml deleted file mode 100644 index 2e19d58..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/_load.xml +++ /dev/null @@ -1,27 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file='ACP.lua'/> - <Script file='AdiBags.lua'/> - <Script file='Altoholic.lua'/> - <Script file='AtlasLoot.lua'/> - <Script file='AuctionLite.lua'/> - <Script file='alDamageMeter.lua'/> - <Script file='BigWigs.lua'/> - <Script file='Bugsack.lua'/> - <Script file='Clique.lua'/> - <Script file='Cooline.lua'/> - <Script file='DBM.lua'/> - <Script file='DXE.lua'/> - <Script file='LightHeaded.lua'/> - <Script file='Mogit.lua'/> - <Script file='Omen.lua'/> - <Script file='Outfitter.lua'/> - <Script file='Postal.lua'/> - <Script file='Quartz.lua'/> - <Script file='Recount.lua'/> - <Script file='SexyCooldown.lua'/> - <Script file='Skada.lua'/> - <Script file='TinyDPS.lua'/> - <Script file='TomTom.lua'/> - <Script file='TradeSkillDW.lua'/> - <Script file='VEM.lua'/> -</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua deleted file mode 100644 index dc09a34..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua +++ /dev/null @@ -1,65 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local string = _G.string; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -ALDAMAGEMETER -########################################################## -]]-- -local function StyleALDamageMeter() - assert(_G['alDamagerMeterFrame'], "AddOn Not Loaded") - - alDamageMeterFrame.bg:Die() - STYLE:ApplyFrameStyle(alDamageMeterFrame) - alDamageMeterFrame:HookScript('OnShow', function() - if InCombatLockdown() then return end - if SV.CurrentlyDocked["alDamagerMeterFrame"] then - SuperDockWindowRight:Show() - end - end) -end -STYLE:SaveAddonStyle("alDamageMeter", StyleALDamageMeter) - -function STYLE:Docklet_alDamageMeter(parent) - if not _G['alDamagerMeterFrame'] then return end - local parentFrame=_G['alDamagerMeterFrame']:GetParent(); - dmconf.barheight=floor(parentFrame:GetHeight()/dmconf.maxbars-dmconf.spacing) - dmconf.width=parentFrame:GetWidth() - alDamageMeterFrame:ClearAllPoints() - alDamageMeterFrame:SetAllPoints(parent) - alDamageMeterFrame.backdrop:SetFixedPanelTemplate('Transparent',true) - alDamageMeterFrame.bg:Die() - alDamageMeterFrame:SetFrameStrata('LOW') -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua deleted file mode 100644 index 0a49a23..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua +++ /dev/null @@ -1,69 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -TIMEMANAGER STYLER -########################################################## -]]-- -local function TimeManagerStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.timemanager ~= true then - return - end - - STYLE:ApplyWindowStyle(TimeManagerFrame, true) - - STYLE:ApplyCloseButtonStyle(TimeManagerFrameCloseButton) - TimeManagerFrameInset:Die() - STYLE:ApplyDropdownStyle(TimeManagerAlarmHourDropDown, 80) - STYLE:ApplyDropdownStyle(TimeManagerAlarmMinuteDropDown, 80) - STYLE:ApplyDropdownStyle(TimeManagerAlarmAMPMDropDown, 80) - TimeManagerAlarmMessageEditBox:SetEditboxTemplate() - TimeManagerAlarmEnabledButton:SetCheckboxTemplate(true) - TimeManagerMilitaryTimeCheck:SetCheckboxTemplate(true) - TimeManagerLocalTimeCheck:SetCheckboxTemplate(true) - TimeManagerStopwatchFrame:RemoveTextures() - TimeManagerStopwatchCheck:SetFixedPanelTemplate("Default") - TimeManagerStopwatchCheck:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - TimeManagerStopwatchCheck:GetNormalTexture():FillInner() - local sWatch = TimeManagerStopwatchCheck:CreateTexture(nil, "OVERLAY") - sWatch:SetTexture(1, 1, 1, 0.3) - sWatch:Point("TOPLEFT", TimeManagerStopwatchCheck, 2, -2) - sWatch:Point("BOTTOMRIGHT", TimeManagerStopwatchCheck, -2, 2) - TimeManagerStopwatchCheck:SetHighlightTexture(sWatch) - - StopwatchFrame:RemoveTextures() - StopwatchFrame:SetBasicPanel() - StopwatchFrame.Panel:Point("TOPLEFT", 0, -17) - StopwatchFrame.Panel:Point("BOTTOMRIGHT", 0, 2) - - StopwatchTabFrame:RemoveTextures() - - STYLE:ApplyCloseButtonStyle(StopwatchCloseButton) - STYLE:ApplyPaginationStyle(StopwatchPlayPauseButton) - STYLE:ApplyPaginationStyle(StopwatchResetButton) - StopwatchPlayPauseButton:Point("RIGHT", StopwatchResetButton, "LEFT", -4, 0) - StopwatchResetButton:Point("BOTTOMRIGHT", StopwatchFrame, "BOTTOMRIGHT", -4, 6) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_TimeManager",TimeManagerStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua deleted file mode 100644 index a724c3f..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua +++ /dev/null @@ -1,112 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -TRADEFRAME STYLER -########################################################## -]]-- -local function TradeFrameStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.trade ~= true then - return - end - - STYLE:ApplyWindowStyle(TradeFrame, true) - - TradeFrameInset:Die() - TradeFrameTradeButton:SetButtonTemplate() - TradeFrameCancelButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(TradeFrameCloseButton, TradeFrame.Panel) - TradePlayerInputMoneyFrameGold:SetEditboxTemplate() - TradePlayerInputMoneyFrameSilver:SetEditboxTemplate() - TradePlayerInputMoneyFrameCopper:SetEditboxTemplate() - TradeRecipientItemsInset:Die() - TradePlayerItemsInset:Die() - TradePlayerInputMoneyInset:Die() - TradePlayerEnchantInset:Die() - TradeRecipientEnchantInset:Die() - TradeRecipientMoneyInset:Die() - TradeRecipientMoneyBg:Die() - local inputs = { - "TradePlayerInputMoneyFrameSilver", - "TradePlayerInputMoneyFrameCopper" - } - for _,frame in pairs(inputs)do - _G[frame]:SetEditboxTemplate() - _G[frame].Panel:Point("TOPLEFT", -2, 1) - _G[frame].Panel:Point("BOTTOMRIGHT", -12, -1) - _G[frame]:SetTextInsets(-1, -1, -2, -2) - end - for i = 1, 7 do - local W = _G["TradePlayerItem"..i] - local X = _G["TradeRecipientItem"..i] - local Y = _G["TradePlayerItem"..i.."ItemButton"] - local Z = _G["TradeRecipientItem"..i.."ItemButton"] - local b = _G["TradePlayerItem"..i.."ItemButtonIconTexture"] - local z = _G["TradeRecipientItem"..i.."ItemButtonIconTexture"] - if Y and Z then - W:RemoveTextures() - X:RemoveTextures() - Y:RemoveTextures() - Z:RemoveTextures() - b:FillInner(Y) - b:SetTexCoord(0.1, 0.9, 0.1, 0.9) - Y:SetFixedPanelTemplate("Button", true) - Y:SetButtonTemplate() - Y.bg = CreateFrame("Frame", nil, Y) - Y.bg:SetPanelTemplate("Inset") - Y.bg:SetPoint("TOPLEFT", Y, "TOPRIGHT", 4, 0) - Y.bg:SetPoint("BOTTOMRIGHT", _G["TradePlayerItem"..i.."NameFrame"], "BOTTOMRIGHT", 0, 14) - Y.bg:SetFrameLevel(Y:GetFrameLevel()-3) - Y:SetFrameLevel(Y:GetFrameLevel()-1) - z:FillInner(Z) - z:SetTexCoord(0.1, 0.9, 0.1, 0.9) - Z:SetFixedPanelTemplate("Button", true) - Z:SetButtonTemplate() - Z.bg = CreateFrame("Frame", nil, Z) - Z.bg:SetPanelTemplate("Inset") - Z.bg:SetPoint("TOPLEFT", Z, "TOPRIGHT", 4, 0) - Z.bg:SetPoint("BOTTOMRIGHT", _G["TradeRecipientItem"..i.."NameFrame"], "BOTTOMRIGHT", 0, 14) - Z.bg:SetFrameLevel(Z:GetFrameLevel()-3) - Z:SetFrameLevel(Z:GetFrameLevel()-1) - end - end - TradeHighlightPlayerTop:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerBottom:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerMiddle:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayer:SetFrameStrata("HIGH") - TradeHighlightPlayerEnchantTop:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerEnchantBottom:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerEnchantMiddle:SetTexture(0, 1, 0, 0.2) - TradeHighlightPlayerEnchant:SetFrameStrata("HIGH") - TradeHighlightRecipientTop:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientBottom:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientMiddle:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipient:SetFrameStrata("HIGH") - TradeHighlightRecipientEnchantTop:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientEnchantBottom:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientEnchantMiddle:SetTexture(0, 1, 0, 0.2) - TradeHighlightRecipientEnchant:SetFrameStrata("HIGH") -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(TradeFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua deleted file mode 100644 index 77634d4..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua +++ /dev/null @@ -1,122 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -TRADESKILL STYLER -########################################################## -]]-- -local function TradeSkillStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.tradeskill ~= true then - return - end - - TradeSkillListScrollFrame:RemoveTextures() - TradeSkillDetailScrollFrame:RemoveTextures() - TradeSkillFrameInset:RemoveTextures() - TradeSkillExpandButtonFrame:RemoveTextures() - TradeSkillDetailScrollChildFrame:RemoveTextures() - TradeSkillRankFrame:RemoveTextures() - TradeSkillCreateButton:RemoveTextures(true) - TradeSkillCancelButton:RemoveTextures(true) - TradeSkillFilterButton:RemoveTextures(true) - TradeSkillCreateAllButton:RemoveTextures(true) - TradeSkillViewGuildCraftersButton:RemoveTextures(true) - - STYLE:ApplyWindowStyle(TradeSkillFrame, true, true) - STYLE:ApplyWindowStyle(TradeSkillGuildFrame) - - TradeSkillGuildFrame:Point("BOTTOMLEFT", TradeSkillFrame, "BOTTOMRIGHT", 3, 19) - TradeSkillGuildFrameContainer:RemoveTextures() - TradeSkillGuildFrameContainer:SetPanelTemplate("Inset") - STYLE:ApplyCloseButtonStyle(TradeSkillGuildFrameCloseButton) - - TradeSkillRankFrame:SetPanelTemplate("Bar", true) - TradeSkillRankFrame:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) - TradeSkillListScrollFrame:SetPanelTemplate("Inset") - TradeSkillDetailScrollFrame:SetPanelTemplate("Inset") - - TradeSkillCreateButton:SetButtonTemplate() - TradeSkillCancelButton:SetButtonTemplate() - TradeSkillFilterButton:SetButtonTemplate() - TradeSkillCreateAllButton:SetButtonTemplate() - TradeSkillViewGuildCraftersButton:SetButtonTemplate() - - STYLE:ApplyScrollFrameStyle(TradeSkillListScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(TradeSkillDetailScrollFrameScrollBar) - - TradeSkillLinkButton:Size(17, 14) - TradeSkillLinkButton:Point("LEFT", TradeSkillLinkFrame, "LEFT", 5, -1) - TradeSkillLinkButton:SetButtonTemplate(nil, nil, nil, nil, true) - TradeSkillLinkButton:GetNormalTexture():SetTexCoord(0.25, 0.7, 0.45, 0.8) - - TradeSkillFrameSearchBox:SetEditboxTemplate() - TradeSkillInputBox:SetEditboxTemplate() - - STYLE:ApplyPaginationStyle(TradeSkillDecrementButton) - STYLE:ApplyPaginationStyle(TradeSkillIncrementButton) - - TradeSkillIncrementButton:Point("RIGHT", TradeSkillCreateButton, "LEFT", -13, 0) - STYLE:ApplyCloseButtonStyle(TradeSkillFrameCloseButton) - - TradeSkillSkillIcon:SetFixedPanelTemplate("Slot") - - local internalTest = false; - - hooksecurefunc("TradeSkillFrame_SetSelection", function(_) - TradeSkillSkillIcon:SetFixedPanelTemplate("Slot") - if TradeSkillSkillIcon:GetNormalTexture() then - TradeSkillSkillIcon:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - for i=1, MAX_TRADE_SKILL_REAGENTS do - local u = _G["TradeSkillReagent"..i] - local icon = _G["TradeSkillReagent"..i.."IconTexture"] - local a1 = _G["TradeSkillReagent"..i.."Count"] - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icon:SetDrawLayer("OVERLAY") - if not icon.backdrop then - local a2 = CreateFrame("Frame", nil, u) - if u:GetFrameLevel()-1 >= 0 then - a2:SetFrameLevel(u:GetFrameLevel()-1) - else - a2:SetFrameLevel(0) - end - a2:WrapOuter(icon) - a2:SetFixedPanelTemplate("Slot") - icon:SetParent(a2) - icon.backdrop = a2 - end - a1:SetParent(icon.backdrop) - a1:SetDrawLayer("OVERLAY") - if i > 2 and internalTest == false then - local d, a3, f, g, h = u:GetPoint() - u:ClearAllPoints() - u:Point(d, a3, f, g, h-3) - internalTest = true - end - _G["TradeSkillReagent"..i.."NameFrame"]:Die() - end - end) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_TradeSkillUI",TradeSkillStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua deleted file mode 100644 index f5dbb31..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua +++ /dev/null @@ -1,93 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local ClassTrainerFrameList = { - "ClassTrainerFrame", - "ClassTrainerScrollFrameScrollChild", - "ClassTrainerFrameSkillStepButton", - "ClassTrainerFrameBottomInset" -}; -local ClassTrainerTextureList = { - "ClassTrainerFrameInset", - "ClassTrainerFramePortrait", - "ClassTrainerScrollFrameScrollBarBG", - "ClassTrainerScrollFrameScrollBarTop", - "ClassTrainerScrollFrameScrollBarBottom", - "ClassTrainerScrollFrameScrollBarMiddle" -}; ---[[ -########################################################## -TRAINER STYLER -########################################################## -]]-- -local function TrainerStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.trainer ~= true then return end - - ClassTrainerFrame:SetHeight(ClassTrainerFrame:GetHeight() + 42) - STYLE:ApplyWindowStyle(ClassTrainerFrame) - - for i=1, 8 do - _G["ClassTrainerScrollFrameButton"..i]:RemoveTextures() - _G["ClassTrainerScrollFrameButton"..i]:SetFixedPanelTemplate() - _G["ClassTrainerScrollFrameButton"..i]:SetButtonTemplate() - _G["ClassTrainerScrollFrameButton"..i.."Icon"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G["ClassTrainerScrollFrameButton"..i].Panel:WrapOuter(_G["ClassTrainerScrollFrameButton"..i.."Icon"]) - _G["ClassTrainerScrollFrameButton"..i.."Icon"]:SetParent(_G["ClassTrainerScrollFrameButton"..i].Panel) - _G["ClassTrainerScrollFrameButton"..i].selectedTex:SetTexture(1, 1, 1, 0.3) - _G["ClassTrainerScrollFrameButton"..i].selectedTex:FillInner() - end - - STYLE:ApplyScrollFrameStyle(ClassTrainerScrollFrameScrollBar, 5) - - for _,frame in pairs(ClassTrainerFrameList)do - _G[frame]:RemoveTextures() - end - - for _,texture in pairs(ClassTrainerTextureList)do - _G[texture]:Die() - end - - _G["ClassTrainerTrainButton"]:RemoveTextures() - _G["ClassTrainerTrainButton"]:SetButtonTemplate() - STYLE:ApplyDropdownStyle(ClassTrainerFrameFilterDropDown, 155) - ClassTrainerScrollFrame:SetFixedPanelTemplate("Inset") - STYLE:ApplyCloseButtonStyle(ClassTrainerFrameCloseButton, ClassTrainerFrame) - ClassTrainerFrameSkillStepButton.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - ClassTrainerFrameSkillStepButton:SetFixedPanelTemplate("Button", true) - --ClassTrainerFrameSkillStepButton.Panel:WrapOuter(ClassTrainerFrameSkillStepButton.icon) - --ClassTrainerFrameSkillStepButton.icon:SetParent(ClassTrainerFrameSkillStepButton.Panel) - ClassTrainerFrameSkillStepButtonHighlight:SetTexture(1, 1, 1, 0.3) - ClassTrainerFrameSkillStepButton.selectedTex:SetTexture(1, 1, 1, 0.3) - ClassTrainerStatusBar:RemoveTextures() - ClassTrainerStatusBar:SetStatusBarTexture(SV.Media.bar.default) - ClassTrainerStatusBar:SetPanelTemplate("Slot", true, 1, 2, 2) - ClassTrainerStatusBar.rankText:ClearAllPoints() - ClassTrainerStatusBar.rankText:SetPoint("CENTER", ClassTrainerStatusBar, "CENTER") -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_TrainerUI",TrainerStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua deleted file mode 100644 index a91f476..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua +++ /dev/null @@ -1,99 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local TransmogFrameList = { - "TransmogrifyModelFrameLines", - "TransmogrifyModelFrameMarbleBg", - "TransmogrifyFrameButtonFrameButtonBorder", - "TransmogrifyFrameButtonFrameButtonBottomBorder", - "TransmogrifyFrameButtonFrameMoneyLeft", - "TransmogrifyFrameButtonFrameMoneyRight", - "TransmogrifyFrameButtonFrameMoneyMiddle" -}; -local TransmogSlotList = { - "Head", - "Shoulder", - "Chest", - "Waist", - "Legs", - "Feet", - "Wrist", - "Hands", - "Back", - "MainHand", - "SecondaryHand" -}; ---[[ -########################################################## -TRANSMOG STYLER -########################################################## -]]-- -local function TransmogStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.transmogrify ~= true then return end - - STYLE:ApplyWindowStyle(TransmogrifyFrame, true) - - for p, texture in pairs(TransmogFrameList)do - _G[texture]:Die() - end - - select(2, TransmogrifyModelFrame:GetRegions()):Die() - - TransmogrifyModelFrame:SetFixedPanelTemplate("ModelComic") - TransmogrifyFrameButtonFrame:GetRegions():Die() - TransmogrifyApplyButton:RemoveTextures() - TransmogrifyApplyButton:SetButtonTemplate() - TransmogrifyApplyButton:Point("BOTTOMRIGHT", TransmogrifyFrame, "BOTTOMRIGHT", -4, 4) - STYLE:ApplyCloseButtonStyle(TransmogrifyArtFrameCloseButton) - TransmogrifyArtFrame:RemoveTextures() - - for p, a9 in pairs(TransmogSlotList)do - local icon = _G["TransmogrifyFrame"..a9 .."SlotIconTexture"] - local a9 = _G["TransmogrifyFrame"..a9 .."Slot"] - if a9 then - a9:RemoveTextures() - a9:SetSlotTemplate(true) - a9:SetFrameLevel(a9:GetFrameLevel()+2) - - a9.Panel:SetAllPoints() - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icon:ClearAllPoints() - icon:FillInner() - end - end - - TransmogrifyConfirmationPopup:SetParent(UIParent) - TransmogrifyConfirmationPopup:RemoveTextures() - TransmogrifyConfirmationPopup:SetPanelTemplate("Pattern") - TransmogrifyConfirmationPopup.Button1:SetButtonTemplate() - TransmogrifyConfirmationPopup.Button2:SetButtonTemplate() - STYLE:ApplyItemButtonStyle(TransmogrifyConfirmationPopupItemFrame1, true) - STYLE:ApplyItemButtonStyle(TransmogrifyConfirmationPopupItemFrame2, true) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -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 deleted file mode 100644 index 981f67e..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua +++ /dev/null @@ -1,94 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local VoidStorageList = { - "VoidStorageBorderFrame", - "VoidStorageDepositFrame", - "VoidStorageWithdrawFrame", - "VoidStorageCostFrame", - "VoidStorageStorageFrame", - "VoidStoragePurchaseFrame", - "VoidItemSearchBox" -}; ---[[ -########################################################## -VOIDSTORAGE STYLER -########################################################## -]]-- -local function VoidStorageStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.voidstorage ~= true then - return - end - - STYLE:ApplyWindowStyle(VoidStorageFrame, true) - - for _,frame in pairs(VoidStorageList)do - _G[frame]:RemoveTextures() - end - - VoidStoragePurchaseFrame:SetFrameStrata('DIALOG') - VoidStoragePurchaseFrame:SetFixedPanelTemplate("Button", true) - VoidStorageFrameMarbleBg:Die() - VoidStorageFrameLines:Die() - - select(2, VoidStorageFrame:GetRegions()):Die() - - VoidStoragePurchaseButton:SetButtonTemplate() - VoidStorageHelpBoxButton:SetButtonTemplate() - VoidStorageTransferButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(VoidStorageBorderFrame.CloseButton) - VoidItemSearchBox:SetPanelTemplate("Inset") - VoidItemSearchBox.Panel:Point("TOPLEFT", 10, -1) - VoidItemSearchBox.Panel:Point("BOTTOMRIGHT", 4, 1) - - for e = 1, 9 do - local f = _G["VoidStorageDepositButton"..e] - local g = _G["VoidStorageWithdrawButton"..e] - local h = _G["VoidStorageDepositButton"..e.."IconTexture"] - local i = _G["VoidStorageWithdrawButton"..e.."IconTexture"] - _G["VoidStorageDepositButton"..e.."Bg"]:Hide() - _G["VoidStorageWithdrawButton"..e.."Bg"]:Hide() - f:SetSlotTemplate(true) - g:SetSlotTemplate(true) - h:SetTexCoord(0.1, 0.9, 0.1, 0.9) - h:FillInner() - i:SetTexCoord(0.1, 0.9, 0.1, 0.9) - i:FillInner() - end - - for e = 1, 80 do - local j = _G["VoidStorageStorageButton"..e] - local k = _G["VoidStorageStorageButton"..e.."IconTexture"] - _G["VoidStorageStorageButton"..e.."Bg"]:Hide() - j:SetSlotTemplate(true) - k:SetTexCoord(0.1, 0.9, 0.1, 0.9) - k:FillInner() - end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveBlizzardStyle("Blizzard_VoidStorageUI", VoidStorageStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua deleted file mode 100644 index c38c8b2..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua +++ /dev/null @@ -1,241 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -HELPERS -########################################################## -]]-- -local function AdjustMapLevel() - if InCombatLockdown()then return end - WorldMapFrame:SetFrameLevel(4) - WorldMapDetailFrame:SetFrameLevel(6) - WorldMapFrame:SetFrameStrata('HIGH') - WorldMapArchaeologyDigSites:SetFrameLevel(8) - WorldMapArchaeologyDigSites:SetFrameStrata('DIALOG') -end - -local function WorldMap_SmallView() - WorldMapFrame.Panel:ClearAllPoints() - WorldMapFrame.Panel:WrapOuter(WorldMapFrame, 4, 4) - WorldMapFrame.Panel.Panel:WrapOuter(WorldMapFrame.Panel) -end - -local function WorldMap_FullView() - WorldMapFrame.Panel:ClearAllPoints() - - if(SV.GameVersion >= 60000) then - WorldMapFrame.Panel:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -12, 74) - WorldMapFrame.Panel:Point("BOTTOMRIGHT", WorldMapDetailFrame, "BOTTOMRIGHT", 12, -24) - else - WorldMapFrame.Panel:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -12, 74) - WorldMapFrame.Panel:Point("BOTTOMRIGHT", WorldMapShowDropDown, "BOTTOMRIGHT", 4, -4) - end - WorldMapFrame.Panel.Panel:SetAllPoints(SV.UIParent) -end - -local function WorldMap_QuestView() - WorldMap_FullView() - if not WorldMapQuestDetailScrollFrame.Panel then - WorldMapQuestDetailScrollFrame:SetFixedPanelTemplate("Inset") - WorldMapQuestDetailScrollFrame.Panel:Point("TOPLEFT", -22, 2) - WorldMapQuestDetailScrollFrame.Panel:Point("BOTTOMRIGHT", WorldMapShowDropDown, 4, -4) - WorldMapQuestDetailScrollFrame.spellTex = WorldMapQuestDetailScrollFrame:CreateTexture(nil, 'ARTWORK') - WorldMapQuestDetailScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) - WorldMapQuestDetailScrollFrame.spellTex:SetPoint("TOPLEFT", WorldMapQuestDetailScrollFrame.Panel, 'TOPLEFT', 2, -2) - WorldMapQuestDetailScrollFrame.spellTex:Size(586, 310) - WorldMapQuestDetailScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) - end - if not WorldMapQuestRewardScrollFrame.Panel then - WorldMapQuestRewardScrollFrame:SetPanelTemplate("Inset") - WorldMapQuestRewardScrollFrame.Panel:Point("BOTTOMRIGHT", 22, -4) - WorldMapQuestRewardScrollFrame.spellTex = WorldMapQuestRewardScrollFrame:CreateTexture(nil, 'ARTWORK') - WorldMapQuestRewardScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) - WorldMapQuestRewardScrollFrame.spellTex:SetPoint("TOPLEFT", WorldMapQuestRewardScrollFrame.Panel, 'TOPLEFT', 2, -2) - WorldMapQuestRewardScrollFrame.spellTex:Size(585, 310) - WorldMapQuestRewardScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) - end - if not WorldMapQuestScrollFrame.Panel then - WorldMapQuestScrollFrame:SetPanelTemplate("Inset") - WorldMapQuestScrollFrame.Panel:Point("TOPLEFT", 0, 2) - WorldMapQuestScrollFrame.Panel:Point("BOTTOMRIGHT", 25, -3) - WorldMapQuestScrollFrame.spellTex = WorldMapQuestScrollFrame:CreateTexture(nil, 'ARTWORK') - WorldMapQuestScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) - WorldMapQuestScrollFrame.spellTex:SetPoint("TOPLEFT", WorldMapQuestScrollFrame.Panel, 'TOPLEFT', 2, -2) - WorldMapQuestScrollFrame.spellTex:Size(520, 1033) - WorldMapQuestScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) - end -end - -local function StripQuestMapFrame() - WorldMapFrame.BorderFrame:RemoveTextures(true) - WorldMapFrame.BorderFrame.ButtonFrameEdge:SetTexture(0,0,0,0) - WorldMapFrame.BorderFrame.InsetBorderTop:SetTexture(0,0,0,0) - WorldMapFrame.BorderFrame.Inset:RemoveTextures(true) - WorldMapTitleButton:RemoveTextures(true) - WorldMapFrameNavBar:RemoveTextures(true) - WorldMapFrameNavBarOverlay:RemoveTextures(true) - QuestMapFrame:RemoveTextures(true) - QuestMapFrame.DetailsFrame:RemoveTextures(true) - - QuestMapFrame.DetailsFrame:SetPanelTemplate("Paper") - - QuestMapFrame.DetailsFrame.CompleteQuestFrame:RemoveTextures(true) - QuestMapFrame.DetailsFrame.CompleteQuestFrame.CompleteButton:RemoveTextures(true) - QuestMapFrame.DetailsFrame.CompleteQuestFrame.CompleteButton:SetButtonTemplate() - - QuestMapFrame.DetailsFrame.BackButton:RemoveTextures(true) - QuestMapFrame.DetailsFrame.BackButton:SetButtonTemplate() - - QuestMapFrame.DetailsFrame.AbandonButton:RemoveTextures(true) - QuestMapFrame.DetailsFrame.AbandonButton:SetButtonTemplate() - - QuestMapFrame.DetailsFrame.ShareButton:RemoveTextures(true) - QuestMapFrame.DetailsFrame.ShareButton:SetButtonTemplate() - - QuestMapFrame.DetailsFrame.TrackButton:RemoveTextures(true) - QuestMapFrame.DetailsFrame.TrackButton:SetButtonTemplate() - - QuestMapFrame.DetailsFrame.RewardsFrame:RemoveTextures(true) - QuestMapFrame.DetailsFrame.RewardsFrame:SetPanelTemplate("Paper") - QuestMapFrame.DetailsFrame.RewardsFrame:SetPanelColor("dark") - - QuestScrollFrame:RemoveTextures(true) - - local w,h = WorldMapFrame.UIElementsFrame:GetSize() - local underlay = CreateFrame("Frame", nil, WorldMapFrame) - underlay:Size(w,h) - underlay:SetAllPoints(WorldMapFrame.UIElementsFrame) - underlay:SetPanelTemplate("Blackout") - - WorldMapFrame.UIElementsFrame:SetParent(underlay) - - local detailWidth = QuestMapFrame.DetailsFrame.RewardsFrame:GetWidth() - QuestMapFrame.DetailsFrame:ClearAllPoints() - QuestMapFrame.DetailsFrame:SetPoint("TOPLEFT", underlay, "TOPRIGHT", 2, 0) - QuestMapFrame.DetailsFrame:SetWidth(detailWidth) - - WorldMapFrameNavBar:ClearAllPoints() - WorldMapFrameNavBar:Point("TOPLEFT", WorldMapFrame.Panel, "TOPLEFT", 12, -22) - WorldMapFrameNavBar:SetPanelTemplate("Blackout") -end - -local function WorldMap_OnShow() - - if(SV.GameVersion >= 60000) then - --StripQuestMapFrame() - if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then - WorldMap_FullView() - elseif WORLDMAP_SETTINGS.size == WORLDMAP_WINDOWED_SIZE then - WorldMap_SmallView() - end - else - WorldMapFrame:RemoveTextures() - if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then - WorldMap_FullView() - elseif WORLDMAP_SETTINGS.size == WORLDMAP_WINDOWED_SIZE then - WorldMap_SmallView() - elseif WORLDMAP_SETTINGS.size == WORLDMAP_QUESTLIST_SIZE then - WorldMap_QuestView() - end - end - - if not SV.db.SVMap.tinyWorldMap then - BlackoutWorld:SetTexture(0, 0, 0, 1) - else - BlackoutWorld:SetTexture(0,0,0,0) - end - - WorldMapFrameAreaLabel:SetFontTemplate(nil, 50, "OUTLINE") - WorldMapFrameAreaLabel:SetShadowOffset(2, -2) - WorldMapFrameAreaLabel:SetTextColor(0.90, 0.8294, 0.6407) - WorldMapFrameAreaDescription:SetFontTemplate(nil, 40, "OUTLINE") - WorldMapFrameAreaDescription:SetShadowOffset(2, -2) - WorldMapFrameAreaPetLevels:SetFontTemplate(nil, 25, 'OUTLINE') - WorldMapZoneInfo:SetFontTemplate(nil, 27, "OUTLINE") - WorldMapZoneInfo:SetShadowOffset(2, -2) - - if InCombatLockdown() then return end - AdjustMapLevel() -end ---[[ -########################################################## -WORLDMAP STYLER -########################################################## -]]-- -local function WorldMapStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.worldmap ~= true then return end - - WorldMapFrame:SetFrameLevel(4) - STYLE:ApplyWindowStyle(WorldMapFrame, true, true) - WorldMapFrame.Panel:SetPanelTemplate("Blackout") - - STYLE:ApplyScrollFrameStyle(WorldMapQuestScrollFrameScrollBar) - STYLE:ApplyScrollFrameStyle(WorldMapQuestDetailScrollFrameScrollBar, 4) - STYLE:ApplyScrollFrameStyle(WorldMapQuestRewardScrollFrameScrollBar, 4) - - WorldMapDetailFrame:SetFrameLevel(6) - WorldMapDetailFrame:SetPanelTemplate("Blackout") - - WorldMapArchaeologyDigSites:SetFrameLevel(8) - - WorldMapFrameSizeDownButton:SetFrameLevel(999) - WorldMapFrameSizeUpButton:SetFrameLevel(999) - WorldMapFrameCloseButton:SetFrameLevel(999) - - STYLE:ApplyCloseButtonStyle(WorldMapFrameCloseButton) - STYLE:ApplyArrowButtonStyle(WorldMapFrameSizeDownButton, "down") - STYLE:ApplyArrowButtonStyle(WorldMapFrameSizeUpButton, "up") - - STYLE:ApplyDropdownStyle(WorldMapLevelDropDown) - STYLE:ApplyDropdownStyle(WorldMapZoneMinimapDropDown) - STYLE:ApplyDropdownStyle(WorldMapContinentDropDown) - STYLE:ApplyDropdownStyle(WorldMapZoneDropDown) - STYLE:ApplyDropdownStyle(WorldMapShowDropDown) - - if(SV.GameVersion < 60000) then - WorldMapZoomOutButton:SetButtonTemplate() - WorldMapTrackQuest:SetCheckboxTemplate(true) - hooksecurefunc("WorldMapFrame_SetFullMapView", WorldMap_FullView) - hooksecurefunc("WorldMapFrame_SetQuestMapView", WorldMap_QuestView) - else - StripQuestMapFrame() - end - - WorldMapFrame:HookScript("OnShow", WorldMap_OnShow) - hooksecurefunc("WorldMap_ToggleSizeUp", WorldMap_OnShow) - BlackoutWorld:SetParent(WorldMapFrame.Panel.Panel) -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(WorldMapStyle) - ---[[ -function ArchaeologyDigSiteFrame_OnUpdate() - WorldMapArchaeologyDigSites:DrawNone(); - local numEntries = ArchaeologyMapUpdateAll(); - for i = 1, numEntries do - local blobID = ArcheologyGetVisibleBlobID(i); - WorldMapArchaeologyDigSites:DrawBlob(blobID, true); - end -end -]] \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua deleted file mode 100644 index 29182bd..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua +++ /dev/null @@ -1,43 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; ---[[ -########################################################## -WORLDSTATE STYLER -########################################################## -]]-- -local function WorldStateStyle() - if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.bgscore ~= true then return end - WorldStateScoreScrollFrame:RemoveTextures() - WorldStateScoreFrame:RemoveTextures() - WorldStateScoreFrame:SetPanelTemplate("Halftone") - STYLE:ApplyCloseButtonStyle(WorldStateScoreFrameCloseButton) - STYLE:ApplyScrollFrameStyle(WorldStateScoreScrollFrameScrollBar) - WorldStateScoreFrameInset:SetAlpha(0) - WorldStateScoreFrameLeaveButton:SetButtonTemplate() - for b = 1, 3 do - STYLE:ApplyTabStyle(_G["WorldStateScoreFrameTab"..b]) - end -end ---[[ -########################################################## -STYLE LOADING -########################################################## -]]-- -STYLE:SaveCustomStyle(WorldStateStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua deleted file mode 100644 index 110e7c0..0000000 --- a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua +++ /dev/null @@ -1,687 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local error = _G.error; -local pcall = _G.pcall; -local tinsert = _G.tinsert; -local string = _G.string; -local table = _G.table; ---[[ STRING METHODS ]]-- -local lower, upper, find = string.lower, string.upper, string.find; ---[[ TABLE METHODS ]]-- -local twipe = table.wipe; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SV = _G.SVUI; -local L = SV.L; -local STYLE = select(2, ...); -local Schema = STYLE.Schema; -local LSM = LibStub("LibSharedMedia-3.0") -local NewHook = hooksecurefunc; ---[[ -########################################################## - /$$$$$$$$/$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$$$ -| $$_____/ $$__ $$ /$$__ $$| $$$ /$$$| $$_____/ -| $$ | $$ \ $$| $$ \ $$| $$$$ /$$$$| $$ -| $$$$$ | $$$$$$$/| $$$$$$$$| $$ $$/$$ $$| $$$$$ -| $$__/ | $$__ $$| $$__ $$| $$ $$$| $$| $$__/ -| $$ | $$ \ $$| $$ | $$| $$\ $ | $$| $$ -| $$ | $$ | $$| $$ | $$| $$ \/ | $$| $$$$$$$$ -|__/ |__/ |__/|__/ |__/|__/ |__/|________/ -########################################################## -]]-- -local levelDiff = 2 - -local _hook_WindowLevel = function(self, level) - local adjustment = level - levelDiff; - if(adjustment < 0) then adjustment = 0 end - self.Panel:SetFrameLevel(adjustment) -end - -function STYLE:ApplyFrameStyle(this, template, noStripping, fullStripping) - if(not this or (this and this.Panel)) then return end - if not noStripping then this:RemoveTextures(fullStripping) end - template = template or "Transparent" - this:SetPanelTemplate(template) -end - -function STYLE:ApplyUnderlayStyle(this, template, noStripping, fullStripping) - if(not this or (this and this.Panel)) then return end - if not noStripping then this:RemoveTextures(fullStripping) end - template = template or "Transparent" - this:SetFixedPanelTemplate(template) -end - -function STYLE:ApplyWindowStyle(this, action, fullStrip) - if(not this or (this and this.Panel)) then return end - local template = action and "Action" or "Halftone" - local baselevel = this:GetFrameLevel() - if(baselevel < 1) then - this:SetFrameLevel(1) - end - - this:RemoveTextures(fullStrip) - this:SetPanelTemplate(template) -end - -function STYLE:ApplyWindowHolder(this, fullStrip) - if(not this or (this and this.Panel)) then return end - local baselevel = this:GetFrameLevel() - if(baselevel < 1) then - this:SetFrameLevel(1) - end - - this:RemoveTextures(fullStrip) - this:SetPanelTemplate("Blackout") -end ---[[ -########################################################## - /$$$$$$$ /$$ /$$ /$$$$$$$$/$$$$$$$$/$$$$$$ /$$ /$$ -| $$__ $$| $$ | $$|__ $$__/__ $$__/$$__ $$| $$$ | $$ -| $$ \ $$| $$ | $$ | $$ | $$ | $$ \ $$| $$$$| $$ -| $$$$$$$ | $$ | $$ | $$ | $$ | $$ | $$| $$ $$ $$ -| $$__ $$| $$ | $$ | $$ | $$ | $$ | $$| $$ $$$$ -| $$ \ $$| $$ | $$ | $$ | $$ | $$ | $$| $$\ $$$ -| $$$$$$$/| $$$$$$/ | $$ | $$ | $$$$$$/| $$ \ $$ -|_______/ \______/ |__/ |__/ \______/ |__/ \__/ -########################################################## -]]-- -local Button_OnEnter = function(self) - self:SetBackdropColor(0.1, 0.8, 0.8) -end - -local Button_OnLeave = function(self) - self:SetBackdropColor(unpack(SV.Media.color.default)) -end - -function STYLE:ApplyButtonStyle(this) - if not this then return end - this:SetButtonTemplate() -end - -local ArrowButton_OnEnter = function(self) - self:SetBackdropBorderColor(0.1, 0.8, 0.8) -end - -local ArrowButton_OnLeave = function(self) - self:SetBackdropBorderColor(0,0,0,1) -end - -function STYLE:ApplyArrowButtonStyle(this, direction, anchor) - if not this then return end - this:RemoveTextures() - this:SetButtonTemplate(nil, 1, -7, -7, nil, "green") - this:SetFrameLevel(this:GetFrameLevel() + 4) - this:SetNormalTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\MOVE-]] .. direction:upper()) - if not this.hookedColors then - this:HookScript("OnEnter", ArrowButton_OnEnter) - this:HookScript("OnLeave", ArrowButton_OnLeave) - this.hookedColors = true - end - if anchor then - this:SetPoint("TOPRIGHT", anchor, "TOPRIGHT", 2, 2) - end -end - ---[[ CLOSE BUTTON ]]-- -local CloseButton_OnEnter = function(self) - self:SetBackdropBorderColor(0.1, 0.8, 0.8) -end - -local CloseButton_OnLeave = function(self) - self:SetBackdropBorderColor(0,0,0,1) -end - -function STYLE:ApplyCloseButtonStyle(this, anchor) - if not this then return end - this:RemoveTextures() - this:SetButtonTemplate(nil, 1, -7, -7, nil, "red") - this:SetFrameLevel(this:GetFrameLevel() + 4) - this:SetNormalTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\CLOSE-BUTTON]]) - if not this.hookedColors then - this:HookScript("OnEnter", CloseButton_OnEnter) - this:HookScript("OnLeave", CloseButton_OnLeave) - this.hookedColors = true - end - if anchor then - this:SetPoint("TOPRIGHT", anchor, "TOPRIGHT", 2, 2) - end -end - ---[[ ITEM BUTTON ]]-- - -function STYLE:ApplyItemButtonStyle(frame, adjust, shrink, noScript) - if(not frame or (frame and frame.StyleHooked)) then return end - - local link = frame:GetName() - - frame:RemoveTextures() - - if(not frame.Panel) then - if shrink then - frame:SetPanelTemplate("Button", true, 1, -2, -2) - else - frame:SetFixedPanelTemplate("Button") - end - end - - if(link) then - local nameObject = _G[("%sName"):format(link)] - local subNameObject = _G[("%sSubName"):format(link)] - local arrowObject = _G[("%sFlyoutArrow"):format(link)] - local levelObject = _G[("%sLevel"):format(link)] - local iconObject = _G[("%sIcon"):format(link)] or _G[("%sIconTexture"):format(link)] - local countObject = _G[("%sCount"):format(link)] - - if(iconObject and not frame.IconShadow) then - iconObject:SetTexCoord(0.1, 0.9, 0.1, 0.9) - - if adjust then - iconObject:FillInner(frame, 2, 2) - end - - frame.IconShadow = CreateFrame("Frame", nil, frame) - frame.IconShadow:WrapOuter(iconObject) - frame.IconShadow:SetBasicPanel(0,0,0,0,true) - - --iconObject:SetParent(frame.IconShadow) - end - - if(not frame.Riser) then - local fg = CreateFrame("Frame", nil, frame) - fg:SetSize(120, 22) - fg:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", 0, -11) - fg:SetFrameLevel(frame:GetFrameLevel() + 1) - frame.Riser = fg - end - - if(countObject) then - countObject:SetParent(frame.Riser) - countObject:SetAllPoints(frame.Riser) - countObject:SetFont(LSM:Fetch("font", SV.db.media.fonts.number), SV.db.media.fonts.size, "OUTLINE") - countObject:SetDrawLayer("ARTWORK", 7) - end - - if(nameObject) then nameObject:SetParent(frame.Riser) end - if(subNameObject) then subNameObject:SetParent(frame.Riser) end - if(arrowObject) then arrowObject:SetParent(frame.Riser) end - - if(levelObject) then - levelObject:SetParent(frame.Riser) - levelObject:SetFont(LSM:Fetch("font", SV.db.media.fonts.number), SV.db.media.fonts.size, "OUTLINE") - levelObject:SetDrawLayer("ARTWORK", 7) - end - - if(not noScript) then - frame:HookScript("OnEnter", Button_OnEnter) - frame:HookScript("OnLeave", Button_OnLeave) - end - end - - frame.StyleHooked = true -end ---[[ -########################################################## - /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$ - /$$__ $$ /$$__ $$| $$__ $$ /$$__ $$| $$ | $$ -| $$ \__/| $$ \__/| $$ \ $$| $$ \ $$| $$ | $$ -| $$$$$$ | $$ | $$$$$$$/| $$ | $$| $$ | $$ - \____ $$| $$ | $$__ $$| $$ | $$| $$ | $$ - /$$ \ $$| $$ $$| $$ \ $$| $$ | $$| $$ | $$ -| $$$$$$/| $$$$$$/| $$ | $$| $$$$$$/| $$$$$$$$| $$$$$$$$ - \______/ \______/ |__/ |__/ \______/ |________/|________/ -########################################################## ---]] -function STYLE:ApplyScrollFrameStyle(this, scale, yOffset) - if(not this or (this and this.StyleHooked)) then return end - - scale = scale or 5 - local scrollName = this:GetName() - local bg, track, top, bottom, mid, upButton, downButton - - - bg = _G[("%sBG"):format(scrollName)] - if(bg) then bg:SetTexture(0,0,0,0) end - - track = _G[("%sTrack"):format(scrollName)] - if(track) then track:SetTexture(0,0,0,0) end - - top = _G[("%sTop"):format(scrollName)] - if(top) then top:SetTexture(0,0,0,0) end - - bottom = _G[("%sBottom"):format(scrollName)] - if(bottom) then bottom:SetTexture(0,0,0,0) end - - mid = _G[("%sMiddle"):format(scrollName)] - if(mid) then mid:SetTexture(0,0,0,0) end - - upButton = _G[("%sScrollUpButton"):format(scrollName)] - downButton = _G[("%sScrollDownButton"):format(scrollName)] - - if(upButton and downButton) then - upButton:RemoveTextures() - if(not upButton.icon) then - local upW, upH = upButton:GetSize() - STYLE:ApplyPaginationStyle(upButton) - SquareButton_SetIcon(upButton, "UP") - upButton:Size(upW + scale, upH + scale) - if(yOffset) then - local anchor, parent, relative, xBase, yBase = upButton:GetPoint() - local yAdjust = (yOffset or 0) + yBase - upButton:ClearAllPoints() - upButton:SetPoint(anchor, parent, relative, xBase, yAdjust) - end - end - - downButton:RemoveTextures() - if(not downButton.icon) then - local dnW, dnH = downButton:GetSize() - STYLE:ApplyPaginationStyle(downButton) - SquareButton_SetIcon(downButton, "DOWN") - downButton:Size(dnW + scale, dnH + scale) - if(yOffset) then - local anchor, parent, relative, xBase, yBase = downButton:GetPoint() - local yAdjust = ((yOffset or 0) * -1) + yBase - downButton:ClearAllPoints() - downButton:SetPoint(anchor, parent, relative, xBase, yAdjust) - end - end - - if(not this.ScrollBG) then - this.ScrollBG = CreateFrame("Frame", nil, this) - this.ScrollBG:SetPoint("TOPLEFT", upButton, "BOTTOMLEFT", 0, -1) - this.ScrollBG:SetPoint("BOTTOMRIGHT", downButton, "TOPRIGHT", 0, 1) - this.ScrollBG:SetBasicPanel() - end - - if(this:GetThumbTexture()) then - this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - end - end - - this.StyleHooked = true -end - -function STYLE:ApplyScrollBarStyle(this) - if(not this or (this and not this.GetOrientation)) then return end - - if(this:GetOrientation() == "VERTICAL") then - this:SetWidth(12) - else - this:SetHeight(12) - for i=1, this:GetNumRegions() do - local child = select(i, this:GetRegions()) - if(child and child:GetObjectType() == "FontString") then - local anchor, parent, relative, x, y = child:GetPoint() - if relative:find("BOTTOM") then - child:SetPoint(anchor, parent, relative, x, y - 4) - end - end - end - end - - this:RemoveTextures() - this:SetBackdrop(nil) - this:SetFixedPanelTemplate("Component") - this.Panel:SetBackdropBorderColor(0.2,0.2,0.2) - this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - - this.StyleHooked = true -end ---[[ -########################################################## - /$$$$$$$$/$$$$$$ /$$$$$$$ /$$$$$$ -|__ $$__/$$__ $$| $$__ $$ /$$__ $$ - | $$ | $$ \ $$| $$ \ $$| $$ \__/ - | $$ | $$$$$$$$| $$$$$$$ | $$$$$$ - | $$ | $$__ $$| $$__ $$ \____ $$ - | $$ | $$ | $$| $$ \ $$ /$$ \ $$ - | $$ | $$ | $$| $$$$$$$/| $$$$$$/ - |__/ |__/ |__/|_______/ \______/ -########################################################## ---]] -local Tab_OnEnter = function(self) - self.backdrop:SetPanelColor("highlight") - self.backdrop:SetBackdropBorderColor(0.1, 0.8, 0.8) -end - -local Tab_OnLeave = function(self) - self.backdrop:SetPanelColor("dark") - self.backdrop:SetBackdropBorderColor(0,0,0,1) -end - -function STYLE:ApplyTabStyle(this, addBackground) - if(not this or (this and this.StyleHooked)) then return end - - local tab = this:GetName(); - - if _G[tab.."Left"] then _G[tab.."Left"]:SetTexture(0,0,0,0) end - if _G[tab.."LeftDisabled"] then _G[tab.."LeftDisabled"]:SetTexture(0,0,0,0) end - if _G[tab.."Right"] then _G[tab.."Right"]:SetTexture(0,0,0,0) end - if _G[tab.."RightDisabled"] then _G[tab.."RightDisabled"]:SetTexture(0,0,0,0) end - if _G[tab.."Middle"] then _G[tab.."Middle"]:SetTexture(0,0,0,0) end - if _G[tab.."MiddleDisabled"] then _G[tab.."MiddleDisabled"]:SetTexture(0,0,0,0) end - - if(this.GetHighlightTexture and this:GetHighlightTexture()) then - this:GetHighlightTexture():SetTexture(0,0,0,0) - end - - this:RemoveTextures() - - if(addBackground) then - 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) - 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) - - local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = this:GetPoint() - this:Point(initialAnchor, anchorParent, relativeAnchor, 1, yPosition) - else - this.backdrop = CreateFrame("Frame", nil, this) - this.backdrop:FillInner(this, 10, 3) - this.backdrop:SetFixedPanelTemplate("Component", true) - this.backdrop:SetPanelColor("dark") - - if(this:GetFrameLevel() > 0) then - this.backdrop:SetFrameLevel(this:GetFrameLevel() - 1) - end - end - - this:HookScript("OnEnter", Tab_OnEnter) - this:HookScript("OnLeave", Tab_OnLeave) - - this.StyleHooked = true -end ---[[ -########################################################## - /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$ -| $$__ $$ /$$__ $$ /$$__ $$| $$_____/ -| $$ \ $$| $$ \ $$| $$ \__/| $$ -| $$$$$$$/| $$$$$$$$| $$ /$$$$| $$$$$ -| $$____/ | $$__ $$| $$|_ $$| $$__/ -| $$ | $$ | $$| $$ \ $$| $$ -| $$ | $$ | $$| $$$$$$/| $$$$$$$$ -|__/ |__/ |__/ \______/ |________/ -########################################################## ---]] -function STYLE:ApplyPaginationStyle(button, isVertical) - if(not button or (button and not button:GetName()) or (button and button.StyleHooked)) then return end - - local bName = button:GetName() - local testName = bName:lower() - local leftDown = ((bName and testName:find('left')) or testName:find('prev') or testName:find('decrement')) or false - - button:RemoveTextures() - button:SetNormalTexture("") - button:SetPushedTexture(0,0,0,0) - button:SetHighlightTexture(0,0,0,0) - button:SetDisabledTexture("") - - button:SetButtonTemplate() - button:Size((button:GetWidth() - 7), (button:GetHeight() - 7)) - - if not button.icon then - button.icon = button:CreateTexture(nil,'ARTWORK') - button.icon:Size(13) - button.icon:SetPoint('CENTER') - button.icon:SetTexture([[Interface\Buttons\SquareButtonTextures]]) - button.icon:SetTexCoord(0.02, 0.2, 0.02, 0.2) - - button:SetScript('OnMouseDown',function(self) - if self:IsEnabled() then - self.icon:SetPoint("CENTER",-1,-1) - end - end) - - button:SetScript('OnMouseUp',function(self) - self.icon:SetPoint("CENTER",0,0) - end) - - button:SetScript('OnDisable',function(self) - SetDesaturation(self.icon, true) - self.icon:SetAlpha(0.5) - end) - - button:SetScript('OnEnable',function(self) - SetDesaturation(self.icon, false) - self.icon:SetAlpha(1.0) - end) - - if not button:IsEnabled() then - button:GetScript('OnDisable')(button) - end - end - - if isVertical then - if leftDown then SquareButton_SetIcon(button,'UP') else SquareButton_SetIcon(button,'DOWN')end - else - if leftDown then SquareButton_SetIcon(button,'LEFT') else SquareButton_SetIcon(button,'RIGHT')end - end - - button.StyleHooked = true -end ---[[ -########################################################## - /$$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$ -| $$__ $$| $$__ $$ /$$__ $$| $$__ $$ -| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ -| $$ | $$| $$$$$$$/| $$ | $$| $$$$$$$/ -| $$ | $$| $$__ $$| $$ | $$| $$____/ -| $$ | $$| $$ \ $$| $$ | $$| $$ -| $$$$$$$/| $$ | $$| $$$$$$/| $$ -|_______/ |__/ |__/ \______/ |__/ - /$$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$ -| $$__ $$ /$$__ $$| $$ /$ | $$| $$$ | $$ -| $$ \ $$| $$ \ $$| $$ /$$$| $$| $$$$| $$ -| $$ | $$| $$ | $$| $$/$$ $$ $$| $$ $$ $$ -| $$ | $$| $$ | $$| $$$$_ $$$$| $$ $$$$ -| $$ | $$| $$ | $$| $$$/ \ $$$| $$\ $$$ -| $$$$$$$/| $$$$$$/| $$/ \ $$| $$ \ $$ -|_______/ \______/ |__/ \__/|__/ \__/ -########################################################## ---]] -local _hook_DropDownButton_SetPoint = function(self, _, _, _, _, _, breaker) - if not breaker then - self:Point("RIGHT", self.AnchorParent, "RIGHT", -10, 3, true) - end -end - -function STYLE:ApplyDropdownStyle(this, width) - if(not this or (this and this.StyleHooked)) then return end - - local ddName = this:GetName(); - local ddText = _G[("%sText"):format(ddName)] - local ddButton = _G[("%sButton"):format(ddName)] - - if not width then width = 155 end - - this:RemoveTextures() - this:Width(width) - - if(ddButton) then - if(ddText) then - ddText:SetPoint("RIGHT", ddButton, "LEFT", 2, 0) - end - - ddButton:ClearAllPoints() - ddButton:Point("RIGHT", this, "RIGHT", -10, 3) - ddButton.AnchorParent = this - - NewHook(ddButton, "SetPoint", _hook_DropDownButton_SetPoint) - - STYLE:ApplyPaginationStyle(ddButton, true) - - local currentLevel = this:GetFrameLevel() - if(currentLevel == 0) then - currentLevel = 1 - end - - local bg = CreateFrame("Frame", nil, this) - bg:Point("TOPLEFT", this, "TOPLEFT", 18, -2) - bg:Point("BOTTOMRIGHT", ddButton, "BOTTOMRIGHT", 2, -2) - bg:SetBasicPanel() - bg:SetBackdropBorderColor(0.2,0.2,0.2) - this.Panel = bg - end - - this.StyleHooked = true -end ---[[ -########################################################## - /$$$$$$$$/$$$$$$ /$$$$$$ /$$ /$$$$$$$$/$$$$$$ /$$$$$$$ -|__ $$__/$$__ $$ /$$__ $$| $$ |__ $$__/_ $$_/| $$__ $$ - | $$ | $$ \ $$| $$ \ $$| $$ | $$ | $$ | $$ \ $$ - | $$ | $$ | $$| $$ | $$| $$ | $$ | $$ | $$$$$$$/ - | $$ | $$ | $$| $$ | $$| $$ | $$ | $$ | $$____/ - | $$ | $$ | $$| $$ | $$| $$ | $$ | $$ | $$ - | $$ | $$$$$$/| $$$$$$/| $$$$$$$$| $$ /$$$$$$| $$ - |__/ \______/ \______/ |________/|__/ |______/|__/ -########################################################## ---]] -local Tooltip_OnShow = function(self) - self:SetBackdrop({ - bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]], - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - tile = false, - edgeSize=1 - }) - self:SetBackdropColor(0,0,0,0.8) - self:SetBackdropBorderColor(0,0,0) -end - -function STYLE:ApplyTooltipStyle(frame) - if(not frame or (frame and frame.StyleHooked)) then return end - frame:HookScript('OnShow', Tooltip_OnShow) - frame.StyleHooked = true -end ---[[ -########################################################## - /$$$$$$ /$$ /$$$$$$$$ /$$$$$$$ /$$$$$$$$ - /$$__ $$| $$ | $$_____/| $$__ $$|__ $$__/ -| $$ \ $$| $$ | $$ | $$ \ $$ | $$ -| $$$$$$$$| $$ | $$$$$ | $$$$$$$/ | $$ -| $$__ $$| $$ | $$__/ | $$__ $$ | $$ -| $$ | $$| $$ | $$ | $$ \ $$ | $$ -| $$ | $$| $$$$$$$$| $$$$$$$$| $$ | $$ | $$ -|__/ |__/|________/|________/|__/ |__/ |__/ -########################################################## ---]] -function STYLE:ApplyAlertStyle(frame) - if(not frame or (frame and frame.StyleHooked)) then return end - - local alertpanel = CreateFrame("Frame", nil, frame) - alertpanel:SetAllPoints(frame) - alertpanel:SetFrameLevel(frame:GetFrameLevel() - 1) - alertpanel:SetBackdrop({ - bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-BG]] - }) - alertpanel:SetBackdropColor(0.8, 0.2, 0.2) - - --[[ LEFT ]]-- - local left = alertpanel:CreateTexture(nil, "BORDER") - left:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-LEFT]]) - left:Point("TOPRIGHT", alertpanel,"TOPLEFT", 0, 0) - left:Point("BOTTOMRIGHT", alertpanel, "BOTTOMLEFT", 0, 0) - left:Width(frame:GetHeight()) - - --[[ RIGHT ]]-- - local right = alertpanel:CreateTexture(nil, "BORDER") - right:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-RIGHT]]) - right:SetVertexColor(0.8, 0.2, 0.2) - right:Point("TOPLEFT", alertpanel,"TOPRIGHT", -1, 0) - right:Point("BOTTOMLEFT", alertpanel, "BOTTOMRIGHT", -1, 0) - right:Width(frame:GetHeight() * 2) - - --[[ TOP ]]-- - local top = alertpanel:CreateTexture(nil, "BORDER") - top:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-TOP]]) - top:Point("BOTTOMLEFT", alertpanel,"TOPLEFT", 0, 0) - top:Point("BOTTOMRIGHT", alertpanel, "TOPRIGHT", 0, 0) - top:Height(frame:GetHeight() * 0.5) - - --[[ BOTTOM ]]-- - local bottom = alertpanel:CreateTexture(nil, "BORDER") - bottom:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-BOTTOM]]) - bottom:Point("TOPLEFT", alertpanel,"BOTTOMLEFT", 0, 0) - bottom:Point("TOPRIGHT", alertpanel, "BOTTOMRIGHT", 0, 0) - bottom:Width(frame:GetHeight() * 0.5) - - frame.StyleHooked = true -end ---[[ -########################################################## - /$$ /$$ /$$$$$$ /$$$$$$ /$$$$$$ -| $$$ /$$$|_ $$_/ /$$__ $$ /$$__ $$ -| $$$$ /$$$$ | $$ | $$ \__/| $$ \__/ -| $$ $$/$$ $$ | $$ | $$$$$$ | $$ -| $$ $$$| $$ | $$ \____ $$| $$ -| $$\ $ | $$ | $$ /$$ \ $$| $$ $$ -| $$ \/ | $$ /$$$$$$| $$$$$$/| $$$$$$/ -|__/ |__/|______/ \______/ \______/ -########################################################## ---]] -function STYLE:ApplyEditBoxStyle(this, width, height) - if not this then return end - this:RemoveTextures(true) - this:SetEditboxTemplate() - if width then this:Width(width) end - if height then this:Height(height) end -end - -function STYLE:ApplyTextureStyle(this) - if not this then return end - this:SetTexCoord(0.1, 0.9, 0.1, 0.9) - local parent = this:GetParent() - if(parent) then - this:FillInner(parent, 1, 1) - end -end - -function STYLE:ApplyRotateStyle(this) - -- Do stuff -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/_load.xml b/Interface/AddOns/SVUI_StyleOMatic/components/_load.xml new file mode 100644 index 0000000..47dc976 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/_load.xml @@ -0,0 +1,5 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file="style_methods.lua"/> + <Include file='blizzard\_load.xml'/> + <Include file='addons\_load.xml'/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/ACP.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/ACP.lua new file mode 100644 index 0000000..63c6fc2 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/ACP.lua @@ -0,0 +1,105 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +ACP +########################################################## +]]-- +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 + +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"} + for i,j in pairs(h)do _G[j]:SetButtonTemplate()end + for c=1,20 do _G["ACP_AddonListEntry"..c.."LoadNow"]:SetButtonTemplate()end + STYLE:ApplyCloseButtonStyle(ACP_AddonListCloseButton) + for c=1,20,1 do + local k=_G["ACP_AddonList"] + k.timeLapse = 0 + k:SetScript("OnUpdate",cbResize) + end + for c=1,20 do _G["ACP_AddonListEntry"..c.."Enabled"]:SetCheckboxTemplate(true)end + ACP_AddonList_NoRecurse:SetCheckboxTemplate(true) + STYLE:ApplyScrollFrameStyle(ACP_AddonList_ScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(ACP_AddonListSortDropDown) + ACP_AddonListSortDropDown:Width(130) + ACP_AddonList_ScrollFrame:SetWidth(590) + ACP_AddonList_ScrollFrame:SetHeight(412) + ACP_AddonList:SetHeight(502) + ACP_AddonListEntry1:Point("TOPLEFT",ACP_AddonList,"TOPLEFT",47,-62) + ACP_AddonList_ScrollFrame:Point("TOPLEFT",ACP_AddonList,"TOPLEFT",20,-53) + ACP_AddonListCloseButton:Point("TOPRIGHT",ACP_AddonList,"TOPRIGHT",4,5) + ACP_AddonListSetButton:Point("BOTTOMLEFT",ACP_AddonList,"BOTTOMLEFT",20,8) + ACP_AddonListSetButton:SetHeight(25) + ACP_AddonListDisableAll:Point("BOTTOMLEFT",ACP_AddonList,"BOTTOMLEFT",90,8) + ACP_AddonListDisableAll:SetHeight(25) + ACP_AddonListEnableAll:Point("BOTTOMLEFT",ACP_AddonList,"BOTTOMLEFT",175,8) + ACP_AddonListEnableAll:SetHeight(25) + ACP_AddonList_ReloadUI:Point("BOTTOMRIGHT",ACP_AddonList,"BOTTOMRIGHT",-160,8) + 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/components/addons/Ace3.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Ace3.lua new file mode 100644 index 0000000..68fec6b --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Ace3.lua @@ -0,0 +1,273 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local externaltest = false; + +local ProxyLSMType = { + ["LSM30_Font"] = true, + ["LSM30_Sound"] = true, + ["LSM30_Border"] = true, + ["LSM30_Background"] = true, + ["LSM30_Statusbar"] = true +} + +local ProxyType = { + ["InlineGroup"] = true, + ["TreeGroup"] = true, + ["TabGroup"] = true, + ["SimpleGroup"] = true, + ["DropdownGroup"] = true +} + +local function Widget_OnEnter(b) + b:SetBackdropBorderColor(0.1, 0.8, 0.8) +end + +local function Widget_OnLeave(b) + b:SetBackdropBorderColor(0,0,0,1) +end + +local function Widget_ScrollStyle(frame, arg) + return STYLE:ApplyScrollFrameStyle(frame) +end + +local function Widget_ButtonStyle(frame, strip, bypass) + if frame.Left then frame.Left:SetAlpha(0) end + if frame.Middle then frame.Middle:SetAlpha(0) end + if frame.Right then frame.Right:SetAlpha(0) end + if frame.SetNormalTexture then frame:SetNormalTexture("") end + if frame.SetHighlightTexture then frame:SetHighlightTexture(0,0,0,0) end + if frame.SetPushedTexture then frame:SetPushedTexture(0,0,0,0) end + if frame.SetDisabledTexture then frame:SetDisabledTexture("") end + if strip then frame:RemoveTextures() end + if not bypass then + frame:SetButtonTemplate() + end +end + +local function Widget_PaginationStyle(...) + STYLE:ApplyPaginationStyle(...) +end + +local NOOP = SV.fubar + +local WidgetButton_OnClick = function(self) + local obj = self.obj; + if(obj and obj.pullout and obj.pullout.frame and (not obj.pullout.frame.Panel)) then + obj.pullout.frame:SetFixedPanelTemplate("Default") + end +end + +local WidgetDropButton_OnClick = function(self) + local obj = self.obj; + local widgetFrame = obj.dropdown + if(widgetFrame and not widgetFrame.Panel) then + widgetFrame:SetBasicPanel() + widgetFrame.Panel:SetPoint("TOPLEFT", widgetFrame, "TOPLEFT", 20, -2) + widgetFrame.Panel:SetPoint("BOTTOMRIGHT", widgetFrame, "BOTTOMRIGHT", -20, 2) + end +end +--[[ +########################################################## +AceGUI STYLE +########################################################## +]]-- +local function StyleAceGUI(event, addon) + assert((LibStub("AceGUI-3.0")), "Addon Not Loaded") + + local AceGUI = LibStub("AceGUI-3.0") + + local regWidget = AceGUI.RegisterAsWidget; + local regContainer = AceGUI.RegisterAsContainer; + + AceGUI.RegisterAsWidget = function(self, widget) + + local widgetType = widget.type; + -- print("RegisterAsWidget: " .. widgetType); + if(widgetType == "MultiLineEditBox") then + local widgetFrame = widget.frame; + widgetFrame:SetFixedPanelTemplate("Default") + if not widget.scrollBG.Panel then + widget.scrollBG:SetBasicPanel() + end + Widget_ButtonStyle(widget.button) + STYLE:ApplyScrollFrameStyle(widget.scrollBar) + widget.scrollBar:SetPoint("RIGHT", widgetFrame, "RIGHT", -4) + widget.scrollBG:SetPoint("TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19) + widget.scrollBG:SetPoint("BOTTOMLEFT", widget.button, "TOPLEFT") + widget.scrollFrame:SetPoint("BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8) + + elseif(widgetType == "CheckBox") then + widget.checkbg:Die() + widget.highlight:Die() + if not widget.styledCheckBG then + widget.styledCheckBG = CreateFrame("Frame", nil, widget.frame) + widget.styledCheckBG:FillInner(widget.check) + widget.styledCheckBG:SetFixedPanelTemplate("Inset") + end + widget.check:SetParent(widget.styledCheckBG) + + elseif(widgetType == "Dropdown") then + local widgetDropdown = widget.dropdown; + local widgetButton = widget.button; + + widgetDropdown:RemoveTextures() + widgetButton:ClearAllPoints() + widgetButton:Point("RIGHT", widgetDropdown, "RIGHT", -20, 0) + widgetButton:SetFrameLevel(widgetButton:GetFrameLevel() + 1) + Widget_PaginationStyle(widgetButton, true) + + if(not widgetDropdown.Panel) then + widgetDropdown:SetBasicPanel() + widgetDropdown.Panel:Point("TOPLEFT", widgetDropdown, "TOPLEFT", 20, -2) + widgetDropdown.Panel:Point("BOTTOMRIGHT", widgetDropdown, "BOTTOMRIGHT", -20, 2) + end + + widgetButton:SetParent(widgetDropdown.Panel) + widget.text:SetParent(widgetDropdown.Panel) + widgetButton:HookScript("OnClick", WidgetButton_OnClick) + + elseif(widgetType == "EditBox") then + local widgetEditbox = widget.editbox; + widgetEditbox:Height(15) + widgetEditbox:SetEditboxTemplate(2, -2, false) + + elseif(widgetType == "Button") then + local widgetFrame = widget.frame; + Widget_ButtonStyle(widgetFrame, true) + widget.text:SetParent(widgetFrame.Panel) + + elseif(widgetType == "Slider") then + local widgetSlider = widget.slider; + local widgetEditbox = widget.editbox; + + widgetSlider:RemoveTextures() + widgetSlider:SetFixedPanelTemplate("Bar") + + widgetSlider:Height(20) + widgetSlider:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") + widgetSlider:GetThumbTexture():SetVertexColor(0.8, 0.8, 0.8) + + widgetEditbox:Height(15) + widgetEditbox:SetPoint("TOP", widgetSlider, "BOTTOM", 0, -1) + + widget.lowtext:SetPoint("TOPLEFT", widgetSlider, "BOTTOMLEFT", 2, -2) + widget.hightext:SetPoint("TOPRIGHT", widgetSlider, "BOTTOMRIGHT", -2, -2) + + elseif(ProxyLSMType[widgetType]) then + local widgetFrame = widget.frame; + local dropButton = widgetFrame.dropButton; + + widgetFrame:RemoveTextures() + Widget_PaginationStyle(dropButton, true) + widgetFrame.text:ClearAllPoints() + widgetFrame.text:Point("RIGHT", dropButton, "LEFT", -2, 0) + dropButton:ClearAllPoints() + dropButton:Point("RIGHT", widgetFrame, "RIGHT", -10, -6) + if(not widgetFrame.Panel) then + widgetFrame:SetBasicPanel() + if(widgetType == "LSM30_Font") then + widgetFrame.Panel:Point("TOPLEFT", 20, -17) + elseif(widgetType == "LSM30_Sound") then + widgetFrame.Panel:Point("TOPLEFT", 20, -17) + widget.soundbutton:SetParent(widgetFrame.Panel) + widget.soundbutton:ClearAllPoints() + widget.soundbutton:Point("LEFT", widgetFrame.Panel, "LEFT", 2, 0) + elseif(widgetType == "LSM30_Statusbar") then + widgetFrame.Panel:Point("TOPLEFT", 20, -17) + widget.bar:SetParent(widgetFrame.Panel) + widget.bar:FillInner() + elseif(widgetType == "LSM30_Border" or widgetType == "LSM30_Background") then + widgetFrame.Panel:Point("TOPLEFT", 42, -16) + end + widgetFrame.Panel:Point("BOTTOMRIGHT", dropButton, "BOTTOMRIGHT", 2, -2) + end + dropButton:SetParent(widgetFrame.Panel) + widgetFrame.text:SetParent(widgetFrame.Panel) + dropButton:HookScript("OnClick", WidgetDropButton_OnClick) + end + return regWidget(self, widget) + end + + AceGUI.RegisterAsContainer = function(self, widget) + local widgetType = widget.type; + -- print("RegisterAsContainer: " .. widgetType); + local widgetParent = widget.content:GetParent() + if widgetType == "ScrollFrame" then + STYLE:ApplyScrollFrameStyle(widget.scrollBar) + elseif widgetType == "Frame" then + widgetParent:RemoveTextures() + for i = 1, widgetParent:GetNumChildren()do + local childFrame = select(i, widgetParent:GetChildren()) + if childFrame:GetObjectType() == "Button" and childFrame:GetText() then + Widget_ButtonStyle(childFrame) + else + childFrame:RemoveTextures() + end + end + widgetParent:SetPanelTemplate("Halftone") + elseif(ProxyType[widgetType]) then + + if widget.treeframe then + widget.treeframe:SetFixedPanelTemplate("Transparent") + widgetParent:SetPoint("TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0) + local oldFunc = widget.CreateButton; + widget.CreateButton = function(self) + local newButton = oldFunc(self) + newButton.toggle:RemoveTextures() + newButton.toggle.SetNormalTexture = NOOP; + newButton.toggle.SetPushedTexture = NOOP; + newButton.toggle:SetButtonTemplate() + newButton.toggleText = newButton.toggle:CreateFontString(nil, "OVERLAY") + newButton.toggleText:SetFont([[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]], 19) + newButton.toggleText:SetPoint("CENTER") + newButton.toggleText:SetText("*") + return newButton + end + else + widgetParent:SetFixedPanelTemplate("Default") + end + + if(widgetType == "TabGroup") then + local oldFunc = widget.CreateTab; + widget.CreateTab = function(self, arg) + local newTab = oldFunc(self, arg) + newTab:RemoveTextures() + return newTab + end + end + + if widget.scrollbar then + STYLE:ApplyScrollFrameStyle(widget.scrollBar) + end + end + return regContainer(self, widget) + end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveAddonStyle("AceGUI", StyleAceGUI, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/AdiBags.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/AdiBags.lua new file mode 100644 index 0000000..b5c95cd --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/AdiBags.lua @@ -0,0 +1,74 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +ADIBAGS +########################################################## +]]-- +local function StyleAdiBags(event) + local AdiBags = LibStub('AceAddon-3.0'):GetAddon('AdiBags') + assert(AdiBags, "AddOn Not Loaded") + --hooksecurefunc(AdiBags, 'HookBagFrameCreation', function(self) print(self) end) + + local function SkinFrame(frame) + local region = frame.HeaderRightRegion + frame:SetBasicPanel() + _G[frame:GetName()..'Bags']:SetPanelTemplate("Default") + for i = 1, 3 do + region.widgets[i].widget:SetButtonTemplate() + end + end + + if event == 'PLAYER_ENTERING_WORLD' then + SV.Timers:ExecuteTimer(function() + if not AdiBagsContainer1 then ToggleBackpack() ToggleBackpack() end + if AdiBagsContainer1 then + SkinFrame(AdiBagsContainer1) + AdiBagsContainer1SearchBox:SetEditboxTemplate() + AdiBagsContainer1SearchBox:Point('TOPRIGHT', AdiBagsSimpleLayeredRegion2, 'TOPRIGHT', -75, -1) + end + end, 1) + elseif event == 'BANKFRAME_OPENED' then + SV.Timers:ExecuteTimer(function() + if AdiBagsContainer2 then + SkinFrame(AdiBagsContainer2) + STYLE:SafeEventRemoval("AdiBags", event) + end + end, 1) + end +end + +STYLE:SaveAddonStyle("AdiBags", StyleAdiBags, nil, nil, 'BANKFRAME_OPENED') \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Altoholic.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Altoholic.lua new file mode 100644 index 0000000..a6ca1d9 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Altoholic.lua @@ -0,0 +1,283 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +ALTOHOLIC +########################################################## +]]-- +local function ColorAltoBorder(self) + if self.border then + local Backdrop = self.backdrop or self.Backdrop + if not Backdrop then return end + local r, g, b = self.border:GetVertexColor() + Backdrop:SetBackdropBorderColor(r, g, b, 1) + end +end + +local function StyleAltoholic(event, addon) + assert(AltoholicFrame, "AddOn Not Loaded") + + if event == "PLAYER_ENTERING_WORLD" then + STYLE:ApplyTooltipStyle(AltoTooltip) + + AltoholicFramePortrait:Die() + + STYLE:ApplyFrameStyle(AltoholicFrame, "Action", false, true) + STYLE:ApplyFrameStyle(AltoMsgBox) + STYLE:ApplyButtonStyle(AltoMsgBoxYesButton) + STYLE:ApplyButtonStyle(AltoMsgBoxNoButton) + STYLE:ApplyCloseButtonStyle(AltoholicFrameCloseButton) + STYLE:ApplyEditBoxStyle(AltoholicFrame_SearchEditBox, 175, 15) + STYLE:ApplyButtonStyle(AltoholicFrame_ResetButton) + STYLE:ApplyButtonStyle(AltoholicFrame_SearchButton) + + AltoholicFrameTab1:Point("TOPLEFT", AltoholicFrame, "BOTTOMLEFT", -5, 2) + AltoholicFrame_ResetButton:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 25, -77) + AltoholicFrame_SearchEditBox:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 37, -56) + AltoholicFrame_ResetButton:Size(85, 24) + AltoholicFrame_SearchButton:Size(85, 24) + end + + if addon == "Altoholic_Summary" then + STYLE:ApplyFrameStyle(AltoholicFrameSummary) + STYLE:ApplyFrameStyle(AltoholicFrameBagUsage) + STYLE:ApplyFrameStyle(AltoholicFrameSkills) + STYLE:ApplyFrameStyle(AltoholicFrameActivity) + STYLE:ApplyScrollBarStyle(AltoholicFrameSummaryScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameBagUsageScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameSkillsScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameActivityScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicTabSummary_SelectLocation, 200) + + if(AltoholicFrameSummaryScrollFrame) then + AltoholicFrameSummaryScrollFrame:RemoveTextures(true) + end + + if(AltoholicFrameBagUsageScrollFrame) then + AltoholicFrameBagUsageScrollFrame:RemoveTextures(true) + end + + if(AltoholicFrameSkillsScrollFrame) then + AltoholicFrameSkillsScrollFrame:RemoveTextures(true) + end + + if(AltoholicFrameActivityScrollFrame) then + AltoholicFrameActivityScrollFrame:RemoveTextures(true) + end + + STYLE:ApplyButtonStyle(AltoholicTabSummary_RequestSharing) + STYLE:ApplyTextureStyle(AltoholicTabSummary_RequestSharingIconTexture) + STYLE:ApplyButtonStyle(AltoholicTabSummary_Options) + STYLE:ApplyTextureStyle(AltoholicTabSummary_OptionsIconTexture) + STYLE:ApplyButtonStyle(AltoholicTabSummary_OptionsDataStore) + STYLE:ApplyTextureStyle(AltoholicTabSummary_OptionsDataStoreIconTexture) + + for i = 1, 5 do + STYLE:ApplyButtonStyle(_G["AltoholicTabSummaryMenuItem"..i], true) + end + for i = 1, 8 do + STYLE:ApplyButtonStyle(_G["AltoholicTabSummary_Sort"..i], true) + end + for i = 1, 7 do + STYLE:ApplyTabStyle(_G["AltoholicFrameTab"..i], true) + end + end + + if IsAddOnLoaded("Altoholic_Characters") or addon == "Altoholic_Characters" then + STYLE:ApplyFrameStyle(AltoholicFrameContainers) + STYLE:ApplyFrameStyle(AltoholicFrameRecipes) + STYLE:ApplyFrameStyle(AltoholicFrameQuests) + STYLE:ApplyFrameStyle(AltoholicFrameGlyphs) + STYLE:ApplyFrameStyle(AltoholicFrameMail) + STYLE:ApplyFrameStyle(AltoholicFrameSpellbook) + STYLE:ApplyFrameStyle(AltoholicFramePets) + STYLE:ApplyFrameStyle(AltoholicFrameAuctions) + STYLE:ApplyScrollBarStyle(AltoholicFrameContainersScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameQuestsScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameRecipesScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicFrameTalents_SelectMember) + STYLE:ApplyDropdownStyle(AltoholicTabCharacters_SelectRealm) + STYLE:ApplyPaginationStyle(AltoholicFrameSpellbookPrevPage) + STYLE:ApplyPaginationStyle(AltoholicFrameSpellbookNextPage) + STYLE:ApplyPaginationStyle(AltoholicFramePetsNormalPrevPage) + STYLE:ApplyPaginationStyle(AltoholicFramePetsNormalNextPage) + STYLE:ApplyRotateStyle(AltoholicFramePetsNormal_ModelFrameRotateLeftButton) + STYLE:ApplyRotateStyle(AltoholicFramePetsNormal_ModelFrameRotateRightButton) + STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort1) + STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort2) + STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort3) + AltoholicFrameContainersScrollFrame:RemoveTextures(true) + AltoholicFrameQuestsScrollFrame:RemoveTextures(true) + AltoholicFrameRecipesScrollFrame:RemoveTextures(true) + + local Buttons = { + 'AltoholicTabCharacters_Characters', + 'AltoholicTabCharacters_CharactersIcon', + 'AltoholicTabCharacters_BagsIcon', + 'AltoholicTabCharacters_QuestsIcon', + 'AltoholicTabCharacters_TalentsIcon', + 'AltoholicTabCharacters_AuctionIcon', + 'AltoholicTabCharacters_MailIcon', + 'AltoholicTabCharacters_SpellbookIcon', + 'AltoholicTabCharacters_ProfessionsIcon', + } + + for _, object in pairs(Buttons) do + STYLE:ApplyTextureStyle(_G[object..'IconTexture']) + STYLE:ApplyTextureStyle(_G[object]) + end + + for i = 1, 7 do + for j = 1, 14 do + STYLE:ApplyItemButtonStyle(_G["AltoholicFrameContainersEntry"..i.."Item"..j]) + _G["AltoholicFrameContainersEntry"..i.."Item"..j]:HookScript('OnShow', ColorAltoBorder) + end + end + end + + if IsAddOnLoaded("Altoholic_Achievements") or addon == "Altoholic_Achievements" then + STYLE:ApplyUnderlayStyle(AltoholicFrameAchievements) + AltoholicFrameAchievementsScrollFrame:RemoveTextures(true) + AltoholicAchievementsMenuScrollFrame:RemoveTextures(true) + STYLE:ApplyScrollBarStyle(AltoholicFrameAchievementsScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicAchievementsMenuScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicTabAchievements_SelectRealm) + AltoholicTabAchievements_SelectRealm:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 205, -57) + + for i = 1, 15 do + STYLE:ApplyButtonStyle(_G["AltoholicTabAchievementsMenuItem"..i], true) + end + + for i = 1, 8 do + for j = 1, 10 do + STYLE:ApplyUnderlayStyle(_G["AltoholicFrameAchievementsEntry"..i.."Item"..j]) + local Backdrop = _G["AltoholicFrameAchievementsEntry"..i.."Item"..j].backdrop or _G["AltoholicFrameAchievementsEntry"..i.."Item"..j].Backdrop + STYLE:ApplyTextureStyle(_G["AltoholicFrameAchievementsEntry"..i.."Item"..j..'_Background']) + _G["AltoholicFrameAchievementsEntry"..i.."Item"..j..'_Background']:SetInside(Backdrop) + end + end + end + + if IsAddOnLoaded("Altoholic_Agenda") or addon == "Altoholic_Agenda" then + STYLE:ApplyFrameStyle(AltoholicFrameCalendarScrollFrame) + STYLE:ApplyFrameStyle(AltoholicTabAgendaMenuItem1) + STYLE:ApplyScrollBarStyle(AltoholicFrameCalendarScrollFrameScrollBar) + STYLE:ApplyPaginationStyle(AltoholicFrameCalendar_NextMonth) + STYLE:ApplyPaginationStyle(AltoholicFrameCalendar_PrevMonth) + STYLE:ApplyButtonStyle(AltoholicTabAgendaMenuItem1, true) + + for i = 1, 14 do + STYLE:ApplyFrameStyle(_G["AltoholicFrameCalendarEntry"..i]) + end + end + + if IsAddOnLoaded("Altoholic_Grids") or addon == "Altoholic_Grids" then + AltoholicFrameGridsScrollFrame:RemoveTextures(true) + STYLE:ApplyUnderlayStyle(AltoholicFrameGrids) + STYLE:ApplyScrollBarStyle(AltoholicFrameGridsScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicTabGrids_SelectRealm) + STYLE:ApplyDropdownStyle(AltoholicTabGrids_SelectView) + + for i = 1, 8 do + for j = 1, 10 do + STYLE:ApplyUnderlayStyle(_G["AltoholicFrameGridsEntry"..i.."Item"..j], nil, nil, nil, true) + _G["AltoholicFrameGridsEntry"..i.."Item"..j]:HookScript('OnShow', ColorAltoBorder) + end + end + + AltoholicFrameGrids:HookScript('OnUpdate', function() + for i = 1, 10 do + for j = 1, 10 do + if _G["AltoholicFrameGridsEntry"..i.."Item"..j.."_Background"] then + _G["AltoholicFrameGridsEntry"..i.."Item"..j.."_Background"]:SetTexCoord(.08, .92, .08, .82) + end + end + end + end) + + end + + if IsAddOnLoaded("Altoholic_Guild") or addon == "Altoholic_Guild" then + STYLE:ApplyFrameStyle(AltoholicFrameGuildMembers) + STYLE:ApplyFrameStyle(AltoholicFrameGuildBank) + STYLE:ApplyScrollBarStyle(AltoholicFrameGuildMembersScrollFrameScrollBar) + AltoholicFrameGuildMembersScrollFrame:RemoveTextures(true) + + for i = 1, 2 do + STYLE:ApplyButtonStyle(_G["AltoholicTabGuildMenuItem"..i]) + end + + for i = 1, 7 do + for j = 1, 14 do + STYLE:ApplyItemButtonStyle(_G["AltoholicFrameGuildBankEntry"..i.."Item"..j]) + end + end + + for i = 1, 19 do + STYLE:ApplyItemButtonStyle(_G["AltoholicFrameGuildMembersItem"..i]) + end + + for i = 1, 5 do + STYLE:ApplyButtonStyle(_G["AltoholicTabGuild_Sort"..i]) + end + end + + if IsAddOnLoaded("Altoholic_Search") or addon == "Altoholic_Search" then + STYLE:ApplyUnderlayStyle(AltoholicFrameSearch, true) + AltoholicFrameSearchScrollFrame:RemoveTextures(true) + AltoholicSearchMenuScrollFrame:RemoveTextures(true) + STYLE:ApplyScrollBarStyle(AltoholicFrameSearchScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicSearchMenuScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectRarity) + STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectSlot) + STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectLocation) + AltoholicTabSearch_SelectRarity:Size(125, 32) + AltoholicTabSearch_SelectSlot:Size(125, 32) + AltoholicTabSearch_SelectLocation:Size(175, 32) + STYLE:ApplyEditBoxStyle(_G["AltoholicTabSearch_MinLevel"]) + STYLE:ApplyEditBoxStyle(_G["AltoholicTabSearch_MaxLevel"]) + + for i = 1, 15 do + STYLE:ApplyButtonStyle(_G["AltoholicTabSearchMenuItem"..i]) + end + + for i = 1, 8 do + STYLE:ApplyButtonStyle(_G["AltoholicTabSearch_Sort"..i]) + end + end +end + +STYLE:SaveAddonStyle("Altoholic", StyleAltoholic, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/AtlasLoot.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/AtlasLoot.lua new file mode 100644 index 0000000..9ae8e8c --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/AtlasLoot.lua @@ -0,0 +1,225 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +ATLASLOOT +########################################################## +]]-- +local timeLapse = 0; +local nineisthere = {"AtlasLootCompareFrameSortButton_7","AtlasLootCompareFrameSortButton_8","AtlasLootCompareFrameSortButton_9"} +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"} + +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) + end + 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 + for i = 1, 9 do local f = _G["AtlasLootCompareFrameSortButton_"..i]f:SetWidth(44.44)end + 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 + self:SetWidth(AtlasLootDefaultFrame:GetWidth()) +end + + +local function StyleAtlasLoot(event, addon) + assert(AtlasLootPanel, "AddOn Not Loaded") + + for _, object in pairs(StripAllTextures) do _G[object]:RemoveTextures()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:ApplyUnderlayStyle(_G["AtlasLootItemsFrame"], "Inset"); + STYLE:ApplyFrameStyle(_G["AtlasLootPanel"], "Default"); + hooksecurefunc(_G["AtlasLootPanel"], "SetPoint", _hook_ALPanel); + + _G["AtlasLootPanel"]:SetPoint("TOP",_G["AtlasLootDefaultFrame"],"BOTTOM",0,-1); + -- Back to the rest + STYLE:ApplyFrameStyle(_G["AtlasLootCompareFrame"], "Transparent"); + if AtlasLoot_PanelButton_1 then AtlasLoot_PanelButton_1:SetButtonTemplate() end + if AtlasLoot_PanelButton_2 then AtlasLoot_PanelButton_2:SetButtonTemplate() end + if AtlasLoot_PanelButton_3 then AtlasLoot_PanelButton_3:SetButtonTemplate() end + if AtlasLoot_PanelButton_4 then AtlasLoot_PanelButton_4:SetButtonTemplate() end + if AtlasLoot_PanelButton_5 then AtlasLoot_PanelButton_5:SetButtonTemplate() end + if AtlasLoot_PanelButton_6 then AtlasLoot_PanelButton_6:SetButtonTemplate() end + if AtlasLoot_PanelButton_7 then AtlasLoot_PanelButton_7:SetButtonTemplate() end + if AtlasLoot_PanelButton_8 then AtlasLoot_PanelButton_8:SetButtonTemplate() end + if AtlasLoot_PanelButton_9 then AtlasLoot_PanelButton_9:SetButtonTemplate() end + 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:RemoveTextures() end + + STYLE:ApplyCloseButtonStyle(AtlasLootDefaultFrame_CloseButton) + STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton) + STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton_Wishlist) + STYLE:ApplyPaginationStyle(AtlasLootQuickLooksButton) + STYLE:ApplyPaginationStyle(AtlasLootItemsFrame_NEXT) + AtlasLootItemsFrame_NEXT:SetWidth(25) + AtlasLootItemsFrame_NEXT:SetHeight(25) + STYLE:ApplyPaginationStyle(AtlasLootItemsFrame_PREV) + AtlasLootItemsFrame_PREV:SetWidth(25) + AtlasLootItemsFrame_PREV:SetHeight(25) + STYLE:ApplyPaginationStyle(AtlasLootPanelSearch_SelectModuel) + 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_ModuleSelect,240) + STYLE:ApplyDropdownStyle(AtlasLootDefaultFrame_InstanceSelect,240) + + STYLE:ApplyDropdownStyle(AtlasLootCompareFrameSearch_StatsListDropDown) + AtlasLootCompareFrameSearch_StatsListDropDown:SetWidth(240) + STYLE:ApplyDropdownStyle(AtlasLootCompareFrame_WishlistDropDown) + 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 + + AtlasLootPanel.Titel:SetTextColor(23/255, 132/255, 209/255) + AtlasLootPanel.Titel:SetPoint("BOTTOM", AtlasLootPanel.TitelBg, "BOTTOM", 0, 40) + STYLE:ApplyScrollFrameStyle(AtlasLootCompareFrame_ScrollFrameItemFrameScrollBar) + STYLE:ApplyScrollFrameStyle(AtlasLootCompareFrame_WishlistScrollFrameScrollBar) + AtlasLootDefaultFrame:HookScript("OnShow", AL_OnShow) + AtlasLootCompareFrame:HookScript("OnShow", Compare_OnShow) + AtlasLootPanel.timeLapse = 0; + + --AtlasLootPanel:HookScript("OnUpdate", _hook_OnUpdate) + + if(AtlasLootTooltip:GetName() ~= "GameTooltip") then + STYLE:ApplyTooltipStyle(AtlasLootTooltip) + end +end +STYLE:SaveAddonStyle("AtlasLoot", StyleAtlasLoot, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/AuctionLite.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/AuctionLite.lua new file mode 100644 index 0000000..3fe7bb3 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/AuctionLite.lua @@ -0,0 +1,88 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +AUCTIONLITE +########################################################## +]]-- +local function BGHelper(parent) + parent.bg = CreateFrame("Frame", nil, parent) + parent.bg:SetFixedPanelTemplate("Inset") + parent.bg:Point("TOPLEFT", parent, "TOPLEFT", 16, -103) + parent.bg:Point("BOTTOMRIGHT", AuctionFrame, "BOTTOMRIGHT", -8, 36) + parent.bg:SetFrameLevel(parent.bg:GetFrameLevel() - 1) +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() + BuyQuantity:SetEditboxTemplate() + SellStacks:SetEditboxTemplate() + SellSize:SetEditboxTemplate() + SellBidPriceGold:SetEditboxTemplate() + SellBidPriceSilver:SetEditboxTemplate() + SellBidPriceCopper:SetEditboxTemplate() + SellBuyoutPriceGold:SetEditboxTemplate() + SellBuyoutPriceSilver:SetEditboxTemplate() + SellBuyoutPriceCopper:SetEditboxTemplate() + + BuySearchButton:SetButtonTemplate() + BuyBidButton:SetButtonTemplate() + BuyBuyoutButton:SetButtonTemplate() + BuyCancelSearchButton:SetButtonTemplate() + BuyCancelAuctionButton:SetButtonTemplate() + BuyScanButton:SetButtonTemplate() + SellCreateAuctionButton:SetButtonTemplate() + + STYLE:ApplyPaginationStyle(BuyAdvancedButton) + STYLE:ApplyPaginationStyle(SellRememberButton) + + STYLE:ApplyTabStyle(AuctionFrameTab4) + STYLE:ApplyTabStyle(AuctionFrameTab5) + + if(_G["AuctionFrameBuy"]) then + BGHelper(_G["AuctionFrameBuy"]) + end + if(_G["AuctionFrameSell"]) then + BGHelper(_G["AuctionFrameSell"]) + end + + STYLE:SafeEventRemoval("AuctionLite", event) +end + +STYLE:SaveAddonStyle("AuctionLite", StyleAuctionLite, nil, nil, "AUCTION_HOUSE_SHOW") \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/BigWigs.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/BigWigs.lua new file mode 100644 index 0000000..f005058 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/BigWigs.lua @@ -0,0 +1,147 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G["SVUI"]; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +BIGWIGS +########################################################## +]]-- +local FreeBG +local BigWigsLoaded + +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.UIParent) + bg:Hide() + FreeBG[#FreeBG + 1] = bg + end + + local ibg = bar:Get("bigwigs:elvui:iconbg") + if ibg then + ibg:ClearAllPoints() + ibg:SetParent(SVUI.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 + 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) + 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 = SV.fubar + bar.candyBarIconFrame.OldSetWidth = bar.candyBarIconFrame.SetWidth + bar.candyBarIconFrame.SetWidth = SV.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 styleName = SV.NameID + local BigWigsBars = BigWigs:GetPlugin('Bars') + if BigWigsLoaded then return end + BigWigsLoaded = true + BigWigsBars:RegisterBarStyle(styleName, { + apiVersion = 1, + version = 1, + GetSpacing = function(bar) + return 4 + end, + ApplyStyle = applystyle, + BarStopped = freestyle, + GetStyleName = function() return styleName end, + }) + BigWigsBars:SetBarStyle(styleName) + STYLE:SafeEventRemoval("BigWigs", "ADDON_LOADED") + STYLE:SafeEventRemoval("BigWigs", "PLAYER_ENTERING_WORLD") + end +end + +STYLE:SaveAddonStyle("BigWigs", StyleBigWigs, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Bugsack.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Bugsack.lua new file mode 100644 index 0000000..502fb49 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Bugsack.lua @@ -0,0 +1,58 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +BUGSACK +########################################################## +]]-- +local function StyleBugSack(event, addon) + assert(BugSack, "AddOn Not Loaded") + hooksecurefunc(BugSack, "OpenSack", function() + if BugSackFrame.Panel then return end + BugSackFrame:RemoveTextures() + BugSackFrame:SetBasicPanel() + STYLE:ApplyTabStyle(BugSackTabAll) + BugSackTabAll:SetPoint("TOPLEFT", BugSackFrame, "BOTTOMLEFT", 0, 1) + STYLE:ApplyTabStyle(BugSackTabSession) + STYLE:ApplyTabStyle(BugSackTabLast) + BugSackNextButton:SetButtonTemplate() + BugSackSendButton:SetButtonTemplate() + BugSackPrevButton:SetButtonTemplate() + STYLE:ApplyScrollBarStyle(BugSackScrollScrollBar) + end) +end + +STYLE:SaveAddonStyle("Bugsack", StyleBugSack) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Clique.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Clique.lua new file mode 100644 index 0000000..ac2eca7 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Clique.lua @@ -0,0 +1,152 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +CLIQUE +########################################################## +]]-- +local CliqueFrames = { + "CliqueDialog", + "CliqueConfig", + "CliqueConfigPage1", + "CliqueConfigPage2", + "CliqueClickGrabber", + "CliqueScrollFrame" +} + +local CliqueButtons = { + "CliqueConfigPage1ButtonSpell", + "CliqueConfigPage1ButtonOther", + "CliqueConfigPage1ButtonOptions", + "CliqueConfigPage2ButtonBinding", + "CliqueDialogButtonAccept", + "CliqueDialogButtonBinding", + "CliqueConfigPage2ButtonSave", + "CliqueConfigPage2ButtonCancel", + "CliqueSpellTab", +} + +local CliqueStripped = { + "CliqueConfigPage1Column1", + "CliqueConfigPage1Column2", + "CliqueConfigPage1_VSlider", + "CliqueSpellTab", + "CliqueConfigPage1ButtonSpell", + "CliqueConfigPage1ButtonOther", + "CliqueConfigPage1ButtonOptions", + "CliqueConfigPage2ButtonBinding", + "CliqueDialogButtonAccept", + "CliqueDialogButtonBinding", + "CliqueConfigPage2ButtonSave", + "CliqueConfigPage2ButtonCancel", +} + +local CliqueConfigPage1_OnShow = function(self) + for i = 1, 12 do + if _G["CliqueRow"..i] then + _G["CliqueRow"..i.."Icon"]:SetTexCoord(0.1,0.9,0.1,0.9); + _G["CliqueRow"..i.."Bind"]:ClearAllPoints() + if _G["CliqueRow"..i] == CliqueRow1 then + _G["CliqueRow"..i.."Bind"]:SetPoint("RIGHT", _G["CliqueRow"..i], 8,0) + else + _G["CliqueRow"..i.."Bind"]:SetPoint("RIGHT", _G["CliqueRow"..i], -9,0) + end + _G["CliqueRow"..i]:GetHighlightTexture():SetDesaturated(1) + end + end + CliqueRow1:ClearAllPoints() + CliqueRow1:SetPoint("TOPLEFT",5,-(CliqueConfigPage1Column1:GetHeight() +3)) +end + +local function StyleClique() + assert(CliqueDialog, "AddOn Not Loaded") + + for _, gName in pairs(CliqueFrames) do + local frame = _G[gName] + if(frame) then + STYLE:ApplyFrameStyle(frame, "Transparent") + if(gName == "CliqueConfig") then + frame.Panel:SetPoint("TOPLEFT",0,0) + frame.Panel:SetPoint("BOTTOMRIGHT",0,-5) + elseif(gName == "CliqueClickGrabber" or gName == "CliqueScrollFrame") then + frame.Panel:SetPoint("TOPLEFT",4,0) + frame.Panel:SetPoint("BOTTOMRIGHT",-2,4) + else + frame.Panel:SetPoint("TOPLEFT",0,0) + frame.Panel:SetPoint("BOTTOMRIGHT",2,0) + end + end + end + + for _, gName in pairs(CliqueStripped) do + local frame = _G[gName] + if(frame) then + frame:RemoveTextures(true) + end + end + + for _, gName in pairs(CliqueButtons) do + local button = _G[gName] + if(button) then + button:SetButtonTemplate() + end + end + + STYLE:ApplyCloseButtonStyle(CliqueDialog.CloseButton) + + CliqueConfigPage1:SetScript("OnShow", CliqueConfigPage1_OnShow) + + CliqueDialog:SetSize(CliqueDialog:GetWidth()-1, CliqueDialog:GetHeight()-1) + + CliqueConfigPage1ButtonSpell:ClearAllPoints() + CliqueConfigPage1ButtonSpell:SetPoint("TOPLEFT", CliqueConfigPage1,"BOTTOMLEFT",0,-4) + + CliqueConfigPage1ButtonOptions:ClearAllPoints() + CliqueConfigPage1ButtonOptions:SetPoint("TOPRIGHT", CliqueConfigPage1,"BOTTOMRIGHT",2,-4) + + CliqueConfigPage2ButtonSave:ClearAllPoints() + CliqueConfigPage2ButtonSave:SetPoint("TOPLEFT", CliqueConfigPage2,"BOTTOMLEFT",0,-4) + + CliqueConfigPage2ButtonCancel:ClearAllPoints() + CliqueConfigPage2ButtonCancel:SetPoint("TOPRIGHT", CliqueConfigPage2,"BOTTOMRIGHT",2,-4) + + CliqueSpellTab:GetRegions():SetSize(.1,.1) + CliqueSpellTab:GetNormalTexture():SetTexCoord(0.1,0.9,0.1,0.9) + CliqueSpellTab:GetNormalTexture():ClearAllPoints() + CliqueSpellTab:GetNormalTexture():FillInner() +end + +STYLE:SaveAddonStyle("Clique", StyleClique) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Cooline.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Cooline.lua new file mode 100644 index 0000000..807be7f --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Cooline.lua @@ -0,0 +1,58 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +COOLINE +########################################################## +]]-- +local function StyleCoolLine() + assert(CoolLineDB, "AddOn Not Loaded") + + CoolLineDB.bgcolor = { r = 0, g = 0, b = 0, a = 0, } + CoolLineDB.border = "None" + CoolLine.updatelook() + STYLE:ApplyFrameStyle(CoolLine,"Transparent") + CoolLine.Panel:SetAllPoints(CoolLine) + SV:AddToDisplayAudit(CoolLine) + + if STYLE:IsAddonReady("DockletCoolLine") then + if not CoolLineDB.vertical then + CoolLine:SetPoint('BOTTOMRIGHT', SVUI_ActionBar1, 'TOPRIGHT', 0, 4) + CoolLine:SetPoint("BOTTOMLEFT", SVUI_ActionBar1, "TOPLEFT", 0, 4) + end + end +end +STYLE:SaveAddonStyle("CoolLine", StyleCoolLine) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/DBM.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/DBM.lua new file mode 100644 index 0000000..d89d5fb --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/DBM.lua @@ -0,0 +1,212 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +DBM +########################################################## +]]-- +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 + 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(SV.Media.font.default, 12, 'OUTLINE') + timer:SetFontTemplate(SV.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 = DBMBossHealthDropdown:GetParent() + if not anchor.styled then + local header = {anchor:GetRegions()} + if header[1]:IsObjectType('FontString') then + header[1]:SetFontTemplate(SV.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 + 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 + 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 + 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(SV.Media.font.default, 12, 'OUTLINE') + timer:SetFontTemplate(SV.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 + + 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", event) +end + +STYLE:SaveAddonStyle("DBM", StyleDBM, false, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/DXE.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/DXE.lua new file mode 100644 index 0000000..95a0088 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/DXE.lua @@ -0,0 +1,135 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +local playerName = UnitName("player"); +local playerRealm = GetRealmName(); +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 = SV.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 = SV.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 = SV.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 = SV.fubar + StyleDXEBar(bar) + bar.styled = true + end + i = i + 1 + end + frame.refreshing = false +end + +LoadAddOn("DXE") + +local function StyleDXE() + assert(DXE, "AddOn Not Loaded") + + DXE.LayoutHealthWatchers_ = DXE.LayoutHealthWatchers + DXE.LayoutHealthWatchers = function(frame) + DXE:LayoutHealthWatchers_() + for i,hw in ipairs(frame.HW) do + if hw:IsShown() then + hw:SetFixedPanelTemplate("Transparent") + hw.border.Show = SV.fubar + hw.border:Hide() + hw.healthbar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + end + end + end + + local DXEAlerts = DXE:GetModule("Alerts") + local frame = CreateFrame("Frame") + + frame.elapsed = 1 + frame:SetScript("OnUpdate", function(frame,elapsed) + frame.elapsed = frame.elapsed + elapsed + if(frame.elapsed >= 1) then + RefreshDXEBars(DXEAlerts) + 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" + DXEDB["profiles"][playerKey]["Globals"]["Font"] = SV.Media.font.default + DXEDB["profiles"][playerKey]["Globals"]["TimerFont"] = SV.Media.font.default +end +STYLE:SaveAddonStyle("DXE", StyleDXE) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/LightHeaded.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/LightHeaded.lua new file mode 100644 index 0000000..24d67c3 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/LightHeaded.lua @@ -0,0 +1,104 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +LIGHTHEADED +########################################################## +]]-- +local timeLapse = 0; + +local function DoDis(self, elapsed) + self.timeLapse = self.timeLapse + elapsed + if(self.timeLapse < 2) then + return + else + self.timeLapse = 0 + end + QuestNPCModel:ClearAllPoints() + QuestNPCModel:SetPoint("TOPLEFT", LightHeadedFrame, "TOPRIGHT", 5, -10) + QuestNPCModel:SetAlpha(0.85) + LightHeadedFrame:SetPoint("LEFT", QuestLogFrame, "RIGHT", 2, 0) +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:RemoveTextures() + + lhframe.close:Hide() + STYLE:ApplyCloseButtonStyle(lhframe.close) + lhframe.handle:Hide() + + 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:ApplyScrollFrameStyle(LightHeadedScrollFrameScrollBar, 5) + 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) + end + local buttons = { + "LightHeaded_Panel_Button1", + "LightHeaded_Panel_Button2", + } + + for _, button in pairs(buttons) do + _G[button]:SetButtonTemplate() + end + + LightHeaded_Panel_Button2:Disable() + end +end +STYLE:SaveAddonStyle("Lightheaded", StyleLightHeaded) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Mogit.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Mogit.lua new file mode 100644 index 0000000..7489024 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Mogit.lua @@ -0,0 +1,89 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +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:ApplyItemButtonStyle(_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"]:RemoveTextures(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:RemoveTextures(true) + STYLE:ApplyFrameStyle(MogItFilters) + MogItFiltersInset:RemoveTextures(true) + + hooksecurefunc(MogIt, "CreatePreview", StyleMogItPreview) + STYLE:ApplyTooltipStyle(MogItTooltip) + STYLE:ApplyCloseButtonStyle(MogItFrameCloseButton) + STYLE:ApplyCloseButtonStyle(MogItFiltersCloseButton) + MogItFrameFiltersDefaults:RemoveTextures(true) + MogItFrameFiltersDefaults:SetButtonTemplate() + STYLE:ApplyScrollFrameStyle(MogItScroll) + STYLE:ApplyScrollFrameStyle(MogItFiltersScrollScrollBar) +end +STYLE:SaveAddonStyle("MogIt", StyleMogIt) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Omen.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Omen.lua new file mode 100644 index 0000000..7d03c80 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Omen.lua @@ -0,0 +1,88 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +OMEN +########################################################## +]]-- +local function StyleOmen() + assert(Omen, "AddOn Not Loaded") + + Omen.db.profile.Scale = 1 + Omen.db.profile.Bar.Spacing = 1 + Omen.db.profile.Bar.Texture = "SVUI MultiColorBar" + Omen.db.profile.Background.EdgeSize = 2 + Omen.db.profile.Background.BarInset = 2 + Omen.db.profile.Background.Texture = "None" + Omen.db.profile.TitleBar.UseSameBG = true + + hooksecurefunc(Omen, 'UpdateBackdrop', function(self) + if not SVUI.CurrentlyDocked["OmenAnchor"] then + STYLE:ApplyFrameStyle(self.BarList, 'Transparent') + self.Title:RemoveTextures() + self.Title:SetPanelTemplate("Default") + self.Title:SetPanelColor("class") + end + self.BarList:SetPoint('TOPLEFT', self.Title, 'BOTTOMLEFT', 0, 1) + end) + + Omen:UpdateBackdrop() + Omen:ReAnchorBars() + Omen:ResizeBars() +end +STYLE:SaveAddonStyle("Omen", StyleOmen, nil, true) + +function STYLE:Docklet_Omen(parent) + if not Omen then return end + local db=Omen.db; + db.profile.Scale=1; + db.profile.Bar.Spacing=1; + db.profile.Background.EdgeSize=2; + db.profile.Background.BarInset=2; + db.profile.TitleBar.UseSameBG=true; + db.profile.ShowWith.UseShowWith=false; + db.profile.Locked=true; + db.profile.TitleBar.ShowTitleBar=true; + db.profile.FrameStrata='2-LOW' + Omen:OnProfileChanged(nil,db) + OmenTitle:RemoveTextures() + OmenTitle.Panel = nil + OmenTitle:SetPanelTemplate("Default") + OmenTitle:SetPanelColor("class") + OmenBarList:RemoveTextures() + OmenBarList.Panel = nil + OmenBarList:SetFixedPanelTemplate('Transparent') + OmenAnchor:ClearAllPoints() + OmenAnchor:SetAllPoints(parent) +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Outfitter.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Outfitter.lua new file mode 100644 index 0000000..6b08d87 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Outfitter.lua @@ -0,0 +1,119 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +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) + OutfitterFrameTab1:Size(60, 25) + OutfitterFrameTab2:Size(60, 25) + OutfitterFrameTab3:Size(60, 25) + OutfitterMainFrame:RemoveTextures(true) + for i = 0, 13 do + if _G["OutfitterItem"..i.."OutfitSelected"] then + _G["OutfitterItem"..i.."OutfitSelected"]:SetButtonTemplate() + _G["OutfitterItem"..i.."OutfitSelected"]:ClearAllPoints() + _G["OutfitterItem"..i.."OutfitSelected"]:Size(16) + _G["OutfitterItem"..i.."OutfitSelected"]:Point("LEFT", _G["OutfitterItem"..i.."Outfit"], "LEFT", 8, 0) + end + end + end) + OutfitterMainFrameScrollbarTrench:RemoveTextures(true) + OutfitterFrameTab1:ClearAllPoints() + OutfitterFrameTab2:ClearAllPoints() + OutfitterFrameTab3:ClearAllPoints() + OutfitterFrameTab1:Point("TOPLEFT", OutfitterFrame, "BOTTOMRIGHT", -65, -2) + OutfitterFrameTab2:Point("LEFT", OutfitterFrameTab1, "LEFT", -65, 0) + OutfitterFrameTab3:Point("LEFT", OutfitterFrameTab2, "LEFT", -65, 0) + OutfitterFrameTab1:SetButtonTemplate() + OutfitterFrameTab2:SetButtonTemplate() + OutfitterFrameTab3:SetButtonTemplate() + STYLE:ApplyScrollFrameStyle(OutfitterMainFrameScrollFrameScrollBar) + STYLE:ApplyCloseButtonStyle(OutfitterCloseButton) + OutfitterNewButton:SetButtonTemplate() + OutfitterEnableNone:SetButtonTemplate() + OutfitterEnableAll:SetButtonTemplate() + OutfitterButton:ClearAllPoints() + OutfitterButton:SetPoint("RIGHT", PaperDollSidebarTabs, "RIGHT", 26, -2) + OutfitterButton:SetHighlightTexture(nil) + OutfitterSlotEnables:SetFrameStrata("HIGH") + OutfitterEnableHeadSlot:SetCheckboxTemplate(true) + OutfitterEnableNeckSlot:SetCheckboxTemplate(true) + OutfitterEnableShoulderSlot:SetCheckboxTemplate(true) + OutfitterEnableBackSlot:SetCheckboxTemplate(true) + OutfitterEnableChestSlot:SetCheckboxTemplate(true) + OutfitterEnableShirtSlot:SetCheckboxTemplate(true) + OutfitterEnableTabardSlot:SetCheckboxTemplate(true) + OutfitterEnableWristSlot:SetCheckboxTemplate(true) + OutfitterEnableMainHandSlot:SetCheckboxTemplate(true) + OutfitterEnableSecondaryHandSlot:SetCheckboxTemplate(true) + OutfitterEnableHandsSlot:SetCheckboxTemplate(true) + OutfitterEnableWaistSlot:SetCheckboxTemplate(true) + OutfitterEnableLegsSlot:SetCheckboxTemplate(true) + OutfitterEnableFeetSlot:SetCheckboxTemplate(true) + OutfitterEnableFinger0Slot:SetCheckboxTemplate(true) + OutfitterEnableFinger1Slot:SetCheckboxTemplate(true) + OutfitterEnableTrinket0Slot:SetCheckboxTemplate(true) + OutfitterEnableTrinket1Slot:SetCheckboxTemplate(true) + OutfitterItemComparisons:SetButtonTemplate() + OutfitterTooltipInfo:SetButtonTemplate() + OutfitterShowHotkeyMessages:SetButtonTemplate() + OutfitterShowMinimapButton:SetButtonTemplate() + OutfitterShowOutfitBar:SetButtonTemplate() + OutfitterAutoSwitch:SetButtonTemplate() + OutfitterItemComparisons:Size(20) + OutfitterTooltipInfo:Size(20) + OutfitterShowHotkeyMessages:Size(20) + OutfitterShowMinimapButton:Size(20) + OutfitterShowOutfitBar:Size(20) + OutfitterAutoSwitch:Size(20) + OutfitterShowOutfitBar:Point("TOPLEFT", OutfitterAutoSwitch, "BOTTOMLEFT", 0, -5) + OutfitterEditScriptDialogDoneButton:SetButtonTemplate() + OutfitterEditScriptDialogCancelButton:SetButtonTemplate() + STYLE:ApplyScrollFrameStyle(OutfitterEditScriptDialogSourceScriptScrollBar) + STYLE:ApplyFrameStyle(OutfitterEditScriptDialogSourceScript,"Transparent") + STYLE:ApplyFrameStyle(OutfitterEditScriptDialog) + STYLE:ApplyCloseButtonStyle(OutfitterEditScriptDialog.CloseButton) + STYLE:ApplyTabStyle(OutfitterEditScriptDialogTab1) + STYLE:ApplyTabStyle(OutfitterEditScriptDialogTab2) +end +STYLE:SaveAddonStyle("Outfitter", StyleOutfitter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Postal.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Postal.lua new file mode 100644 index 0000000..a5ace41 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Postal.lua @@ -0,0 +1,89 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +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) + if b.returnicon then + b.returnicon:SetPoint("TOPRIGHT", b, "TOPRIGHT", 20, 0) + end + if _G['PostalInboxCB'..i] and not _G['PostalInboxCB'..i].handled then + _G['PostalInboxCB'..i]:SetCheckboxTemplate(true) + _G['PostalInboxCB'..i].handled = true + end + end + if PostalSelectOpenButton and not PostalSelectOpenButton.handled then + PostalSelectOpenButton:SetButtonTemplate() + PostalSelectOpenButton.handled = true + PostalSelectOpenButton:Point("RIGHT", InboxFrame, "TOP", -41, -48) + end + if Postal_OpenAllMenuButton and not Postal_OpenAllMenuButton.handled then + STYLE:ApplyPaginationStyle(Postal_OpenAllMenuButton, true) + Postal_OpenAllMenuButton:SetPoint('LEFT', PostalOpenAllButton, 'RIGHT', 5, 0) + Postal_OpenAllMenuButton.handled = true + end + if PostalOpenAllButton and not PostalOpenAllButton.handled then + PostalOpenAllButton:SetButtonTemplate() + PostalOpenAllButton.handled = true + PostalOpenAllButton:Point("CENTER", InboxFrame, "TOP", -34, -400) + end + if PostalSelectReturnButton and not PostalSelectReturnButton.handled then + PostalSelectReturnButton:SetButtonTemplate() + PostalSelectReturnButton.handled = true + PostalSelectReturnButton:Point("LEFT", InboxFrame, "TOP", -5, -48) + end + if Postal_PackageMenuButton and not Postal_PackageMenuButton.handled then + STYLE:ApplyPaginationStyle(Postal_PackageMenuButton, true) + Postal_PackageMenuButton.handled = true + Postal_PackageMenuButton:SetPoint('TOPRIGHT', MailFrame, -53, -6) + end + if Postal_BlackBookButton and not Postal_BlackBookButton.handled then + STYLE:ApplyPaginationStyle(Postal_BlackBookButton, true) + Postal_BlackBookButton.handled = true + Postal_BlackBookButton:SetPoint('LEFT', SendMailNameEditBox, 'RIGHT', 5, 2) + end +end +STYLE:SaveAddonStyle("Postal", StylePostal, nil, nil, 'MAIL_SHOW') \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Quartz.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Quartz.lua new file mode 100644 index 0000000..48d8db9 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Quartz.lua @@ -0,0 +1,78 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +QUARTZ +########################################################## +]]-- +local function StyleQuartz() + local AceAddon = LibStub("AceAddon-3.0") + if(not AceAddon) then return end + 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) + if not self.isStyled then + self.IconBorder = CreateFrame("Frame", nil, self) + STYLE:ApplyFrameStyle(self.IconBorder,"Transparent") + self.IconBorder:SetFrameLevel(0) + self.IconBorder:WrapOuter(self.Icon) + STYLE:ApplyFrameStyle(self.Bar,"Transparent",true) + self.isStyled = true + end + if self.config.hideicon then + self.IconBorder:Hide() + else + 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 + STYLE:ApplyFrameStyle(Quartz3GCDBar,"Transparent",true) + end + end) + end +end +STYLE:SaveAddonStyle("Quartz", StyleQuartz) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Recount.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Recount.lua new file mode 100644 index 0000000..bc14641 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Recount.lua @@ -0,0 +1,144 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +RECOUNT +########################################################## +]]-- +local function NoColor(a) + for p=1,a:GetNumRegions()do + local q=select(p,a:GetRegions()) + if q:GetObjectType()=='Texture'then + q:SetDesaturated(true) + if q:GetTexture()=='Interface\\DialogFrame\\UI-DialogBox-Corner'then + q:SetTexture(0,0,0,0) + q:Die() + end + end + end +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 + + local function StyleFrame(frame) + STYLE:ApplyFrameStyle(frame,"Transparent") + frame.Panel:SetAllPoints() + frame.Panel:SetPoint('TOPLEFT', frame, 'TOPLEFT', 0, -6) + frame.CloseButton:SetPoint('TOPRIGHT', frame, 'TOPRIGHT', -1, -9) + frame:SetBackdrop(nil) + + frame.TitleBackground = CreateFrame('Frame', nil, frame) + frame.TitleBackground:SetFixedPanelTemplate("Default") + frame.TitleBackground:SetPanelColor("class") + frame.TitleBackground:SetPoint('TOP', frame, 'TOP', 0, -8) + frame.TitleBackground.timeLapse = 0 + frame.TitleBackground:SetScript('OnUpdate', function(self,elapsed) + self.timeLapse = self.timeLapse + elapsed + if(self.timeLapse < 0.2) then + return + else + self.timeLapse = 0 + end + self:SetSize(frame:GetWidth() - 4, 22) + end) + frame.TitleBackground:SetFrameLevel(frame:GetFrameLevel()) + frame.Title:SetPoint('TOPLEFT', frame, 'TOPLEFT', 6, -12) + NoColor(frame.CloseButton) + if frame.ConfigButton then NoColor(frame.ConfigButton) end + if frame.FileButton then NoColor(frame.FileButton) end + if frame.LeftButton then NoColor(frame.LeftButton) end + if frame.ResetButton then NoColor(frame.ResetButton) end + if frame.RightButton then NoColor(frame.RightButton) end + if frame.ReportButton then NoColor(frame.ReportButton) end + if frame.SummaryButton then NoColor(frame.SummaryButton) end + end + + local RecountFrames = { + Recount.MainWindow, + Recount.ConfigWindow, + Recount.GraphWindow, + Recount.DetailWindow, + } + + for _, frame in pairs(RecountFrames) do + if frame then + StyleFrame(frame) + end + end + + STYLE:ApplyScrollFrameStyle(Recount_MainWindow_ScrollBarScrollBar) + + Recount_MainWindow:HookScript('OnShow', function(self) if InCombatLockdown() then return end if SV.CurrentlyDocked["Recount_MainWindow"] then SuperDockWindowRight:Show() end end) + Recount.MainWindow.FileButton:HookScript('OnClick', function(self) if LibDropdownFrame0 then STYLE:ApplyFrameStyle(LibDropdownFrame0) end end) + + hooksecurefunc(Recount, 'ShowScrollbarElements', function(self, name) Recount_MainWindow_ScrollBarScrollBar:Show() end) + hooksecurefunc(Recount, 'HideScrollbarElements', function(self, name) Recount_MainWindow_ScrollBarScrollBar:Hide() end) + hooksecurefunc(Recount, 'CreateFrame', function(self, frame) StyleFrame(_G[frame]) end) + + hooksecurefunc(Recount, 'ShowReport', function(self) + if Recount_ReportWindow.isStyled then return end + Recount_ReportWindow.isStyled = true + STYLE:ApplyFrameStyle(Recount_ReportWindow.Whisper) + Recount_ReportWindow.ReportButton:SetButtonTemplate() + STYLE:ApplyScrollBarStyle(Recount_ReportWindow_Slider) + Recount_ReportWindow_Slider:GetThumbTexture():Size(6,6) + end) +end +STYLE:SaveAddonStyle("Recount", StyleRecount) + +function STYLE:Docklet_Recount(parent) + if not Recount then return end + local n=Recount.MainWindow.Panel; + if n and not n.Panel then + n:Show() + n:SetFixedPanelTemplate('Transparent',true) + end + Recount.db.profile.Locked=true; + Recount.db.profile.Scaling=1; + Recount.db.profile.ClampToScreen=true; + Recount.db.profile.FrameStrata='2-LOW' + Recount.MainWindow:ClearAllPoints() + Recount.MainWindow:SetAllPoints(parent) + Recount:SetStrataAndClamp() + Recount:LockWindows(true) + Recount:ResizeMainWindow() + Recount_MainWindow_ScrollBar:Hide() +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/SexyCooldown.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/SexyCooldown.lua new file mode 100644 index 0000000..ad5fd29 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/SexyCooldown.lua @@ -0,0 +1,105 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +SEXYCOOLDOWN +########################################################## +]]-- +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) + SV: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") +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() + end + hooksecurefunc(SexyCooldown2, 'CreateBar', function(self) + for _, bar in ipairs(self.bars) do + HookSCDBar(bar) + bar:UpdateBarLook() + end + end) +end +STYLE:SaveAddonStyle("SexyCooldown", StyleSexyCooldown) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua new file mode 100644 index 0000000..502fa9b --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/Skada.lua @@ -0,0 +1,153 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +local twipe = table.wipe; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +local activePanels = {}; +local SkadaHolder, SkadaHolder2 +--[[ +########################################################## +SKADA +########################################################## +]]-- +local function CheckForHolders() + if(not SkadaHolder) then + SkadaHolder = CreateFrame("Frame", "SkadaHolder", SuperDockletMain) + end + if(not SkadaHolder2) then + SkadaHolder2 = CreateFrame("Frame", "SkadaHolder2", SuperDockletExtra) + end + SkadaHolder:SetSize(SuperDockletMain:GetSize()) + SkadaHolder2:SetSize(SuperDockletExtra:GetSize()) +end + +local function skada_panel_loader(holder, window) + if not window then return end + + local bars = Skada.displays['bar'] + + if(not bars or (bars and not bars.ApplySettings)) then return end + + local width,height = holder:GetSize() + + window.db.barspacing = 1; + window.db.barwidth = width - 4; + window.db.background.height = height - (window.db.enabletitle and window.db.title.height or 0) - 1; + window.db.spark=false; + window.db.barslocked = true; + window.bargroup:ClearAllPoints() + window.bargroup:SetPoint('BOTTOMLEFT',holder,'BOTTOMLEFT',0,0) + window.bargroup:SetParent(holder) + window.bargroup:SetFrameStrata('LOW') + + local bgroup = window.bargroup.backdrop; + if bgroup then + bgroup:Show() + bgroup:SetFixedPanelTemplate('Transparent',true) + end + + bars:ApplySettings(window) +end + +function STYLE:Docklet_Skada() + if not Skada then return end + CheckForHolders() + for index,window in pairs(Skada:GetWindows()) do + local wname = window.db.name or "" + local key = "Skada" .. wname + if(SVUI.db.SVDock.docklets.DockletMain == key)then + skada_panel_loader(SkadaHolder, window) + elseif(SVUI.db.SVDock.docklets.enableExtra and SVUI.db.SVDock.docklets.DockletExtra == key) then + skada_panel_loader(SkadaHolder2, window) + else + window.db.barslocked = false; + end + end +end + +local function Skada_ShowPopup(self) + STYLE:LoadAlert('Do you want to reset Skada?', function(self) Skada:Reset() self:GetParent():Hide() end) +end + +local function StyleSkada() + assert(Skada, "AddOn Not Loaded") + + CheckForHolders() + Skada.ShowPopup = Skada_ShowPopup + + local SkadaDisplayBar = Skada.displays['bar'] + + hooksecurefunc(SkadaDisplayBar, 'AddDisplayOptions', function(self, window, options) + options.baroptions.args.barspacing = nil + options.titleoptions.args.texture = nil + options.titleoptions.args.bordertexture = nil + options.titleoptions.args.thickness = nil + options.titleoptions.args.margin = nil + options.titleoptions.args.color = nil + options.windowoptions = nil + end) + + hooksecurefunc(SkadaDisplayBar, 'ApplySettings', function(self, window) + local skada = window.bargroup + if not skada then return end + local panelAnchor = skada + skada:SetSpacing(1) + skada:SetFrameLevel(5) + skada:SetBackdrop(nil) + + if(window.db.enabletitle) then + panelAnchor = skada.button + skada.button:SetHeight(18) + skada.button:SetButtonTemplate() + skada.button:GetFontString():SetFont(SVUI.Media.font.names, 15, "OUTLINE") + end + + skada:SetPanelTemplate("Transparent") + skada.Panel:ClearAllPoints() + skada.Panel:SetPoint('TOPLEFT', panelAnchor, 'TOPLEFT', -2, 2) + skada.Panel:SetPoint('BOTTOMRIGHT', skada, 'BOTTOMRIGHT', 2, -2) + end) + + hooksecurefunc(Skada, 'CreateWindow', function() + if SVUI.CurrentlyDocked["SkadaHolder"] or SVUI.CurrentlyDocked["SkadaHolder2"] then + STYLE:Docklet_Skada() + end + end) + + hooksecurefunc(Skada, 'DeleteWindow', function() + if SVUI.CurrentlyDocked["SkadaHolder"] or SVUI.CurrentlyDocked["SkadaHolder2"] then + STYLE:Docklet_Skada() + end + end) +end + +STYLE:SaveAddonStyle("Skada", StyleSkada, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/TinyDPS.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/TinyDPS.lua new file mode 100644 index 0000000..ec46d7d --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/TinyDPS.lua @@ -0,0 +1,74 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +TINYDPS +########################################################## +]]-- +local function StyleTinyDPS() + assert(tdpsFrame, "AddOn Not Loaded") + + STYLE:ApplyFrameStyle(tdpsFrame) + + tdpsFrame:HookScript("OnShow", function() + if InCombatLockdown() then return end + if SV.CurrentlyDocked["tdpsFrame"] then + SuperDockWindowRight:Show() + 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 + +STYLE:SaveAddonStyle("TinyDPS", StyleTinyDPS) + +function STYLE:Docklet_TinyDPS(parent) + if not tdpsFrame then return end + tdpsFrame:SetFixedPanelTemplate("Transparent", true) + tdpsFrame:SetFrameStrata("LOW") + tdps.hideOOC = false; + tdps.hideIC = false; + tdps.hideSolo = false; + tdps.hidePvP = false; + tdpsFrame:ClearAllPoints() + tdpsFrame:SetAllPoints(parent) + tdpsRefresh() +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/TomTom.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/TomTom.lua new file mode 100644 index 0000000..52397c3 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/TomTom.lua @@ -0,0 +1,45 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +TOMTOM +########################################################## +]]-- +local function StyleTomTom() + 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/components/addons/TradeSkillDW.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/TradeSkillDW.lua new file mode 100644 index 0000000..f904b36 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/TradeSkillDW.lua @@ -0,0 +1,144 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +TSDW +########################################################## +]]-- +local function StyleTradeSkillDW() + assert(TradeSkillDW_QueueFrame, "AddOn Not Loaded") + + TradeSkillFrame:SetPanelTemplate("Action") + TradeSkillListScrollFrame:RemoveTextures(true) + TradeSkillDetailScrollFrame:RemoveTextures(true) + TradeSkillFrameInset:RemoveTextures(true) + TradeSkillExpandButtonFrame:RemoveTextures(true) + TradeSkillDetailScrollChildFrame:RemoveTextures(true) + TradeSkillListScrollFrame:RemoveTextures(true) + STYLE:ApplyFrameStyle(TradeSkillGuildFrame,"Transparent") + STYLE:ApplyFrameStyle(TradeSkillGuildFrameContainer,"Transparent") + TradeSkillGuildFrame:Point("BOTTOMLEFT", TradeSkillFrame, "BOTTOMRIGHT", 3, 19) + STYLE:ApplyCloseButtonStyle(TradeSkillGuildFrameCloseButton) + + TradeSkillFrame:HookScript("OnShow", function() + STYLE:ApplyFrameStyle(TradeSkillFrame) + TradeSkillListScrollFrame:RemoveTextures() + if not TradeSkillDWExpandButton then return end + if not TradeSkillDWExpandButton.styled then + STYLE:ApplyPaginationStyle(TradeSkillDWExpandButton) + TradeSkillDWExpandButton.styled = true + end + end) + + TradeSkillFrame:Height(TradeSkillFrame:GetHeight() + 12) + TradeSkillRankFrame:SetBasicPanel() + TradeSkillRankFrame:SetStatusBarTexture(SV.Media.bar.default) + TradeSkillCreateButton:SetButtonTemplate() + TradeSkillCancelButton:SetButtonTemplate() + TradeSkillFilterButton:SetButtonTemplate() + TradeSkillCreateAllButton:SetButtonTemplate() + TradeSkillViewGuildCraftersButton:SetButtonTemplate() + TradeSkillLinkButton:GetNormalTexture():SetTexCoord(0.25, 0.7, 0.37, 0.75) + TradeSkillLinkButton:GetPushedTexture():SetTexCoord(0.25, 0.7, 0.45, 0.8) + TradeSkillLinkButton:GetHighlightTexture():Die() + STYLE:ApplyFrameStyle(TradeSkillLinkButton,"Transparent") + TradeSkillLinkButton:Size(17, 14) + TradeSkillLinkButton:Point("LEFT", TradeSkillLinkFrame, "LEFT", 5, -1) + TradeSkillFrameSearchBox:SetEditboxTemplate() + TradeSkillInputBox:SetEditboxTemplate() + TradeSkillIncrementButton:Point("RIGHT", TradeSkillCreateButton, "LEFT", -13, 0) + STYLE:ApplyCloseButtonStyle(TradeSkillFrameCloseButton) + STYLE:ApplyScrollFrameStyle(TradeSkillDetailScrollFrameScrollBar) + local once = false + hooksecurefunc("TradeSkillFrame_SetSelection", function(id) + TradeSkillSkillIcon:SetButtonTemplate() + + if TradeSkillSkillIcon:GetNormalTexture() then + TradeSkillSkillIcon:GetNormalTexture():SetTexCoord(0.1,0.9,0.1,0.9) + TradeSkillSkillIcon:GetNormalTexture():ClearAllPoints() + TradeSkillSkillIcon:GetNormalTexture():Point("TOPLEFT", 2, -2) + TradeSkillSkillIcon:GetNormalTexture():Point("BOTTOMRIGHT", -2, 2) + end + + for i = 1, MAX_TRADE_SKILL_REAGENTS do + local button = _G["TradeSkillReagent"..i] + local icon = _G["TradeSkillReagent"..i.."IconTexture"] + local count = _G["TradeSkillReagent"..i.."Count"] + icon:SetTexCoord(0.1,0.9,0.1,0.9) + icon:SetDrawLayer("OVERLAY") + if not icon.backdrop then + icon.backdrop = CreateFrame("Frame", nil, button) + icon.backdrop:SetFrameLevel(button:GetFrameLevel() - 1) + STYLE:ApplyFrameStyle(icon.backdrop,"Transparent") + icon.backdrop:Point("TOPLEFT", icon, "TOPLEFT", -2, 2) + icon.backdrop:Point("BOTTOMRIGHT", icon, "BOTTOMRIGHT", 2, -2) + end + icon:SetParent(icon.backdrop) + count:SetParent(icon.backdrop) + count:SetDrawLayer("OVERLAY") + if i > 2 and once == false then + local point, anchoredto, point2, x, y = button:GetPoint() + button:ClearAllPoints() + button:Point(point, anchoredto, point2, x, y - 3) + once = true + end + _G["TradeSkillReagent"..i.."NameFrame"]:Die() + end + end) + + TradeSkillDW_QueueFrame:HookScript("OnShow", function() STYLE:ApplyFrameStyle(TradeSkillDW_QueueFrame,"Transparent") end) + + STYLE:ApplyCloseButtonStyle(TradeSkillDW_QueueFrameCloseButton) + + TradeSkillDW_QueueFrameInset:RemoveTextures() + TradeSkillDW_QueueFrameClear:SetButtonTemplate() + TradeSkillDW_QueueFrameDown:SetButtonTemplate() + TradeSkillDW_QueueFrameUp:SetButtonTemplate() + TradeSkillDW_QueueFrameDo:SetButtonTemplate() + TradeSkillDW_QueueFrameDetailScrollFrame:RemoveTextures() + TradeSkillDW_QueueFrameDetailScrollFrameChildFrame:RemoveTextures() + TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent1:RemoveTextures() + TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent2:RemoveTextures() + TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent3:RemoveTextures() + TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent4:RemoveTextures() + TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent5:RemoveTextures() + TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent6:RemoveTextures() + TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent7:RemoveTextures() + TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent8:RemoveTextures() + STYLE:ApplyScrollFrameStyle(TradeSkillDW_QueueFrameDetailScrollFrameScrollBar) + TradeSkillListScrollFrame:RemoveTextures() +end +STYLE:SaveAddonStyle("TradeSkillDW", StyleTradeSkillDW) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/VEM.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/VEM.lua new file mode 100644 index 0000000..5942c5f --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/VEM.lua @@ -0,0 +1,250 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +VEM +########################################################## +]]-- +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 + 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 + + 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) + + frame:SetHeight(22) + name:Point('LEFT', frame, 'LEFT', 4, 0) + timer:Point('RIGHT', frame, 'RIGHT', -4, 0) + + name:SetFont(SV.Media.font.default, 12, 'OUTLINE') + timer:SetFont(SV.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(SV.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 + 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(SV.Media.font.default, 12, 'OUTLINE') + timer:SetFont(SV.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', _hook_OnShow) + VEMRangeCheckRadar:SetFixedPanelTemplate('Transparent') + end + + if not VEM_SavedOptions['DontShowInfoFrame'] then + VEM.InfoFrame:Show(5, 'test') + VEM.InfoFrame:Hide() + VEMInfoFrame:HookScript('OnShow', _hook_OnShow) + end + + 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) + STYLE:ApplyFrameStyle(VEM_GUI_OptionsFrameBossMods) + STYLE:ApplyFrameStyle(VEM_GUI_OptionsFrameVEMOptions) + STYLE:ApplyFrameStyle(VEM_GUI_OptionsFramePanelContainer, 'Transparent', true) + end) + STYLE:ApplyTabStyle(VEM_GUI_OptionsFrameTab1) + STYLE:ApplyTabStyle(VEM_GUI_OptionsFrameTab2) + VEM_GUI_OptionsFrameOkay:SetButtonTemplate() + VEM_GUI_OptionsFrameWebsiteButton:SetButtonTemplate() + STYLE:ApplyScrollFrameStyle(VEM_GUI_OptionsFramePanelContainerFOVScrollBar) + STYLE:SafeEventRemoval("VEM", event) + end +end +STYLE:SaveAddonStyle("VEM", StyleVEM, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/_load.xml b/Interface/AddOns/SVUI_StyleOMatic/components/addons/_load.xml new file mode 100644 index 0000000..c9d2037 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/_load.xml @@ -0,0 +1,28 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file='Ace3.lua'/> + <Script file='ACP.lua'/> + <Script file='AdiBags.lua'/> + <Script file='Altoholic.lua'/> + <Script file='AtlasLoot.lua'/> + <Script file='AuctionLite.lua'/> + <Script file='alDamageMeter.lua'/> + <Script file='BigWigs.lua'/> + <Script file='Bugsack.lua'/> + <Script file='Clique.lua'/> + <Script file='Cooline.lua'/> + <Script file='DBM.lua'/> + <Script file='DXE.lua'/> + <Script file='LightHeaded.lua'/> + <Script file='Mogit.lua'/> + <Script file='Omen.lua'/> + <Script file='Outfitter.lua'/> + <Script file='Postal.lua'/> + <Script file='Quartz.lua'/> + <Script file='Recount.lua'/> + <Script file='SexyCooldown.lua'/> + <Script file='Skada.lua'/> + <Script file='TinyDPS.lua'/> + <Script file='TomTom.lua'/> + <Script file='TradeSkillDW.lua'/> + <Script file='VEM.lua'/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/addons/alDamageMeter.lua b/Interface/AddOns/SVUI_StyleOMatic/components/addons/alDamageMeter.lua new file mode 100644 index 0000000..dc09a34 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/addons/alDamageMeter.lua @@ -0,0 +1,65 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +ALDAMAGEMETER +########################################################## +]]-- +local function StyleALDamageMeter() + assert(_G['alDamagerMeterFrame'], "AddOn Not Loaded") + + alDamageMeterFrame.bg:Die() + STYLE:ApplyFrameStyle(alDamageMeterFrame) + alDamageMeterFrame:HookScript('OnShow', function() + if InCombatLockdown() then return end + if SV.CurrentlyDocked["alDamagerMeterFrame"] then + SuperDockWindowRight:Show() + end + end) +end +STYLE:SaveAddonStyle("alDamageMeter", StyleALDamageMeter) + +function STYLE:Docklet_alDamageMeter(parent) + if not _G['alDamagerMeterFrame'] then return end + local parentFrame=_G['alDamagerMeterFrame']:GetParent(); + dmconf.barheight=floor(parentFrame:GetHeight()/dmconf.maxbars-dmconf.spacing) + dmconf.width=parentFrame:GetWidth() + alDamageMeterFrame:ClearAllPoints() + alDamageMeterFrame:SetAllPoints(parent) + alDamageMeterFrame.backdrop:SetFixedPanelTemplate('Transparent',true) + alDamageMeterFrame.bg:Die() + alDamageMeterFrame:SetFrameStrata('LOW') +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/_load.xml b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/_load.xml new file mode 100644 index 0000000..0c36331 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/_load.xml @@ -0,0 +1,51 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file='achievement.lua'/> + <Script file='alert.lua'/> + <Script file='archeology.lua'/> + <Script file='auctionhouse.lua'/> + <Script file='barbershop.lua'/> + <Script file='battlefield.lua'/> + <Script file='blackmarket.lua'/> + <Script file='calendar.lua'/> + <Script file='challenges.lua'/> + <Script file='chat.lua'/> + <Script file='character.lua'/> + <Script file='dressup.lua'/> + <Script file='encounterjournal.lua'/> + <Script file='friends.lua'/> + <Script file='gossip.lua'/> + <Script file='guild.lua'/> + <Script file='help.lua'/> + <Script file='inspect.lua'/> + <Script file='itemsocketing.lua'/> + <Script file='itemupgrade.lua'/> + <Script file='keybinding.lua'/> + <Script file='lfd.lua'/> + <Script file='loothistory.lua'/> + <Script file='lossofcontrol.lua'/> + <Script file='macro.lua'/> + <Script file='mailbox.lua'/> + <Script file='merchant.lua'/> + <Script file='petbattle.lua'/> + <Script file='petition.lua'/> + <Script file='petjournal.lua'/> + <Script file='petstable.lua'/> + <Script file='pvp.lua'/> + <Script file='quest.lua'/> + <Script file='raid.lua'/> + <Script file='reforging.lua'/> + <Script file='spellbook.lua'/> + <Script file='tabard.lua'/> + <Script file='talents.lua'/> + <Script file='taxi.lua'/> + <Script file='timemanager.lua'/> + <Script file='trade.lua'/> + <Script file='tradeskill.lua'/> + <Script file='trainer.lua'/> + <Script file='transmog.lua'/> + <Script file='voidstorage.lua'/> + <Script file='worldmap.lua'/> + <Script file='worldstate.lua'/> + <Script file='store.lua'/> + <Script file='system.lua'/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua new file mode 100644 index 0000000..8f4ed77 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/achievement.lua @@ -0,0 +1,454 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local AchievementFrameList = { + "AchievementFrame", + "AchievementFrameCategories", + "AchievementFrameSummary", + "AchievementFrameHeader", + "AchievementFrameSummaryCategoriesHeader", + "AchievementFrameSummaryAchievementsHeader", + "AchievementFrameStatsBG", + "AchievementFrameAchievements", + "AchievementFrameComparison", + "AchievementFrameComparisonHeader", + "AchievementFrameComparisonSummaryPlayer", + "AchievementFrameComparisonSummaryFriend" +} + +local AchievementTextureList = { + "AchievementFrameStats", + "AchievementFrameSummary", + "AchievementFrameAchievements", + "AchievementFrameComparison" +} + +local AchievementItemButtons = { + "AchievementFrameAchievementsContainerButton1", + "AchievementFrameAchievementsContainerButton2", + "AchievementFrameAchievementsContainerButton3", + "AchievementFrameAchievementsContainerButton4", + "AchievementFrameAchievementsContainerButton5", + "AchievementFrameAchievementsContainerButton6", + "AchievementFrameAchievementsContainerButton7", +} + +local _hook_DescriptionColor = function(self, r, g, b) + if(r ~= 0.6 or g ~= 0.6 or b ~= 0.6) then + self:SetTextColor(0.6, 0.6, 0.6) + end +end + +local _hook_HiddenDescriptionColor = function(self, r, g, b) + if(r ~= 1 or g ~= 1 or b ~= 1) then + self:SetTextColor(1, 1, 1) + end +end + +local _hook_TrackingPoint = function(self, anchor, parent, relative, x, y) + local actual = self.ListParent + if(anchor ~= "BOTTOMLEFT" or parent ~= actual or relative ~= "BOTTOMLEFT" or x ~= 5 or y ~= 5) then + self:ClearAllPoints() + self:Point("BOTTOMLEFT", actual, "BOTTOMLEFT", 5, 5) + end +end + +local _hook_AchievementsUpdate = function() + for i = 1, ACHIEVEMENTUI_MAX_SUMMARY_ACHIEVEMENTS do + local globalName = ("AchievementFrameSummaryAchievement%d"):format(i) + local summary = _G[globalName] + if(summary) then + summary:RemoveTextures() + summary:SetButtonTemplate() + + local highlight = _G[("%sHighlight"):format(globalName)] + local desc = _G[("%sDescription"):format(globalName)] + local icon = _G[("%sIcon"):format(globalName)] + local iconbling = _G[("%sIconBling"):format(globalName)] + local iconover = _G[("%sIconOverlay"):format(globalName)] + local icontex = _G[("%sIconTexture"):format(globalName)] + + if(highlight) then highlight:Die() end + if(desc) then desc:SetTextColor(0.6, 0.6, 0.6) end + if(iconbling) then iconbling:Die() end + if(iconover) then iconover:Die() end + if(icontex) then + icontex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + icontex:FillInner() + end + if(icon and not icon.Panel) then + icon:SetFixedPanelTemplate("Slot") + icon:Height(icon:GetHeight() - 14) + icon:Width(icon:GetWidth() - 14) + icon:ClearAllPoints() + icon:Point("LEFT", 6, 0) + end + + if summary.accountWide then + summary:SetBackdropBorderColor(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) + else + summary:SetBackdropBorderColor(0,0,0,1) + end + end + end +end + +local function BarStyleHelper(bar) + bar:RemoveTextures() + bar:SetStatusBarTexture(SV.Media.bar.default) + bar:SetStatusBarColor(4/255, 179/255, 30/255) + bar:SetPanelTemplate("Default") + if _G[bar:GetName().."Title"]then + _G[bar:GetName().."Title"]:SetPoint("LEFT", 4, 0) + end + if _G[bar:GetName().."Label"]then + _G[bar:GetName().."Label"]:SetPoint("LEFT", 4, 0) + end + if _G[bar:GetName().."Text"]then + _G[bar:GetName().."Text"]:SetPoint("RIGHT", -4, 0) + end +end +--[[ +########################################################## +ACHIEVEMENTFRAME STYLER +########################################################## +]]-- +local function AchievementStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.achievement ~= true then + return + end + + for _, gName in pairs(AchievementFrameList) do + local frame = _G[gName] + if(frame) then + frame:RemoveTextures(true) + end + end + + for _, gName in pairs(AchievementTextureList) do + local frame = _G[gName] + if(frame) then + local count = frame:GetNumChildren() + for i = 1, count do + local childFrame = select(i, frame:GetChildren()) + if(childFrame and not childFrame:GetName()) then + childFrame:SetBackdrop(nil) + end + end + end + end + + STYLE:ApplyWindowStyle(AchievementFrame) + + AchievementFrameSummaryAchievements:RemoveTextures(true) + AchievementFrameSummaryAchievements:SetBasicPanel() + AchievementFrameHeaderTitle:ClearAllPoints() + AchievementFrameHeaderTitle:Point("TOPLEFT", AchievementFrame.Panel, "TOPLEFT", -30, -8) + AchievementFrameHeaderPoints:ClearAllPoints() + AchievementFrameHeaderPoints:Point("LEFT", AchievementFrameHeaderTitle, "RIGHT", 2, 0) + AchievementFrameCategoriesContainer:SetPanelTemplate("Inset", true, 2, -2, 2) + AchievementFrameAchievementsContainer:SetPanelTemplate("Default") + AchievementFrameAchievementsContainer.Panel:Point("TOPLEFT", 0, 2) + AchievementFrameAchievementsContainer.Panel:Point("BOTTOMRIGHT", -3, -3) + STYLE:ApplyCloseButtonStyle(AchievementFrameCloseButton, AchievementFrame.Panel) + STYLE:ApplyDropdownStyle(AchievementFrameFilterDropDown) + AchievementFrameFilterDropDown:Point("TOPRIGHT", AchievementFrame, "TOPRIGHT", -44, 5) + + STYLE:ApplyScrollFrameStyle(AchievementFrameCategoriesContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameAchievementsContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameStatsContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonStatsContainerScrollBar, 5) + + for i = 1, 3 do + local tab = _G["AchievementFrameTab"..i] + if(tab) then + STYLE:ApplyTabStyle(tab) + tab:SetFrameLevel(tab:GetFrameLevel() + 2) + end + end + + BarStyleHelper(AchievementFrameSummaryCategoriesStatusBar) + BarStyleHelper(AchievementFrameComparisonSummaryPlayerStatusBar) + BarStyleHelper(AchievementFrameComparisonSummaryFriendStatusBar) + + AchievementFrameComparisonSummaryFriendStatusBar.text:ClearAllPoints() + AchievementFrameComparisonSummaryFriendStatusBar.text:SetPoint("CENTER") + AchievementFrameComparisonHeader:Point("BOTTOMRIGHT", AchievementFrameComparison, "TOPRIGHT", 45, -20) + + for f = 1, 10 do + local d = _G["AchievementFrameSummaryCategoriesCategory"..f] + local i = _G["AchievementFrameSummaryCategoriesCategory"..f.."Button"] + local j = _G["AchievementFrameSummaryCategoriesCategory"..f.."ButtonHighlight"] + BarStyleHelper(d) + i:RemoveTextures() + j:RemoveTextures() + _G[j:GetName().."Middle"]:SetTexture(1, 1, 1, 0.3) + _G[j:GetName().."Middle"]:SetAllPoints(d) + end + + AchievementFrame:HookScript("OnShow", function(self) + if(self.containerStyled) then return end + for i = 1, 20 do + STYLE:ApplyItemButtonStyle(_G["AchievementFrameCategoriesContainerButton"..i]) + end + self.containerStyled = true + end) + + hooksecurefunc("AchievementButton_DisplayAchievement", function(self) + if(self.accountWide and self.bg3) then + self.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) + elseif self.bg3 then + self.bg3:SetTexture(0,0,0,1) + end + end) + + hooksecurefunc("AchievementFrameSummary_UpdateAchievements", _hook_AchievementsUpdate) + + for i = 1, #AchievementItemButtons do + local gName = AchievementItemButtons[i] + local button = _G[gName] + + if(button) then + local hl = _G[gName.."Highlight"] + local desc = _G[gName.."Description"] + local hdesc = _G[gName.."HiddenDescription"] + local icon = _G[gName.."Icon"] + local track = _G[gName.."Tracked"] + + if(hl) then hl:Die() end + + button:RemoveTextures(true) + + button.bg1 = button:CreateTexture(nil, "BACKGROUND", nil, 4) + button.bg1:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + button.bg1:SetVertexColor(unpack(SV.Media.color.default)) + button.bg1:Point("TOPLEFT", 1, -1) + button.bg1:Point("BOTTOMRIGHT", -1, 1) + + button.bg3 = button:CreateTexture(nil, "BACKGROUND", nil, 2) + button.bg3:SetTexture(unpack(SV.Media.color.default)) + button.bg3:WrapOuter(1) + + if(desc) then + desc:SetTextColor(0.6, 0.6, 0.6) + hooksecurefunc(desc, "SetTextColor", _hook_DescriptionColor) + end + + if(hdesc) then + hdesc:SetTextColor(1, 1, 1) + hooksecurefunc(hdesc, "SetTextColor", _hook_HiddenDescriptionColor) + end + + if(icon) then + local bling = _G[gName.."IconBling"] + local over = _G[gName.."IconOverlay"] + local tex = _G[gName.."IconTexture"] + if(bling) then bling:Die() end + if(over) then over:Die() end + if(tex) then + tex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + tex:FillInner() + end + + icon:SetFixedPanelTemplate("Default") + icon:Height(icon:GetHeight()-14) + icon:Width(icon:GetWidth()-14) + icon:ClearAllPoints() + icon:Point("LEFT", 6, 0) + end + + if(track) then + track:RemoveTextures() + track:SetCheckboxTemplate(true) + track:ClearAllPoints() + track:Point("BOTTOMLEFT", d, "BOTTOMLEFT", -1, -3) + track.ListParent = button + + hooksecurefunc(track, "SetPoint", _hook_TrackingPoint) + end + end + end + + local u = {"Player", "Friend"} + for c, v in pairs(u) do + for f = 1, 9 do + local d = "AchievementFrameComparisonContainerButton"..f..v; + _G[d]:RemoveTextures() + _G[d.."Background"]:Die() + if _G[d.."Description"]then + _G[d.."Description"]:SetTextColor(0.6, 0.6, 0.6) + hooksecurefunc(_G[d.."Description"], "SetTextColor", _hook_DescriptionColor) + end + _G[d].bg1 = _G[d]:CreateTexture(nil, "BACKGROUND") + _G[d].bg1:SetDrawLayer("BACKGROUND", 4) + _G[d].bg1:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + _G[d].bg1:SetVertexColor(unpack(SV.Media.color.default)) + _G[d].bg1:Point("TOPLEFT", 4, -4) + _G[d].bg1:Point("BOTTOMRIGHT", -4, 4) + _G[d].bg2 = _G[d]:CreateTexture(nil, "BACKGROUND") + _G[d].bg2:SetDrawLayer("BACKGROUND", 3) + _G[d].bg2:SetTexture(0, 0, 0) + _G[d].bg2:Point("TOPLEFT", 3, -3) + _G[d].bg2:Point("BOTTOMRIGHT", -3, 3) + _G[d].bg3 = _G[d]:CreateTexture(nil, "BACKGROUND") + _G[d].bg3:SetDrawLayer("BACKGROUND", 2) + _G[d].bg3:SetTexture(0,0,0,1) + _G[d].bg3:Point("TOPLEFT", 2, -2) + _G[d].bg3:Point("BOTTOMRIGHT", -2, 2) + _G[d].bg4 = _G[d]:CreateTexture(nil, "BACKGROUND") + _G[d].bg4:SetDrawLayer("BACKGROUND", 1) + _G[d].bg4:SetTexture(0, 0, 0) + _G[d].bg4:Point("TOPLEFT", 1, -1) + _G[d].bg4:Point("BOTTOMRIGHT", -1, 1) + + if v == "Friend"then + _G[d.."Shield"]:Point("TOPRIGHT", _G["AchievementFrameComparisonContainerButton"..f.."Friend"], "TOPRIGHT", -20, -3) + end + + _G[d.."IconBling"]:Die() + _G[d.."IconOverlay"]:Die() + _G[d.."Icon"]:SetFixedPanelTemplate("Default") + _G[d.."Icon"]:Height(_G[d.."Icon"]:GetHeight()-14) + _G[d.."Icon"]:Width(_G[d.."Icon"]:GetWidth()-14) + _G[d.."Icon"]:ClearAllPoints() + _G[d.."Icon"]:Point("LEFT", 6, 0) + _G[d.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) + _G[d.."IconTexture"]:FillInner() + end + end + + hooksecurefunc("AchievementFrameComparison_DisplayAchievement", function(i) + local w = i.player; + local x = i.friend + w.titleBar:Die() + x.titleBar:Die() + if not w.bg3 or not x.bg3 then + return + end + if w.accountWide then + w.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) + else + w.bg3:SetTexture(0,0,0,1) + end + + if x.accountWide then + x.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) + else + x.bg3:SetTexture(0,0,0,1) + end + end) + + for f = 1, 20 do + local d = _G["AchievementFrameStatsContainerButton"..f] + _G["AchievementFrameStatsContainerButton"..f.."BG"]:SetTexture(1, 1, 1, 0.2) + _G["AchievementFrameStatsContainerButton"..f.."HeaderLeft"]:Die() + _G["AchievementFrameStatsContainerButton"..f.."HeaderRight"]:Die() + _G["AchievementFrameStatsContainerButton"..f.."HeaderMiddle"]:Die() + local d = "AchievementFrameComparisonStatsContainerButton"..f; + _G[d]:RemoveTextures() + _G[d]:SetPanelTemplate("Default") + _G[d.."BG"]:SetTexture(1, 1, 1, 0.2) + _G[d.."HeaderLeft"]:Die() + _G[d.."HeaderRight"]:Die() + _G[d.."HeaderMiddle"]:Die() + end + + hooksecurefunc("AchievementButton_GetProgressBar", function(y) + local d = _G["AchievementFrameProgressBar"..y] + if d then + if not d.styled then + d:RemoveTextures() + d:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + d:SetStatusBarColor(4/255, 179/255, 30/255) + d:SetFrameLevel(d:GetFrameLevel()+3) + d:Height(d:GetHeight()-2) + d.bg1 = d:CreateTexture(nil, "BACKGROUND") + d.bg1:SetDrawLayer("BACKGROUND", 4) + d.bg1:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + d.bg1:SetVertexColor(unpack(SV.Media.color.default)) + d.bg1:SetAllPoints() + d.bg3 = d:CreateTexture(nil, "BACKGROUND") + d.bg3:SetDrawLayer("BACKGROUND", 2) + d.bg3:SetTexture(0,0,0,1) + d.bg3:Point("TOPLEFT", -1, 1) + d.bg3:Point("BOTTOMRIGHT", 1, -1); + d.text:ClearAllPoints() + d.text:SetPoint("CENTER", d, "CENTER", 0, -1) + d.text:SetJustifyH("CENTER") + if y>1 then + d:ClearAllPoints() + d:Point("TOP", _G["AchievementFrameProgressBar"..y-1], "BOTTOM", 0, -5) + hooksecurefunc(d, "SetPoint", function(k, p, q, r, s, t, z) + if not z then + k:ClearAllPoints()k:SetPoint("TOP", _G["AchievementFrameProgressBar"..y-1], "BOTTOM", 0, -5, true) + end + end) + end + d.styled = true + end + end + end) + + hooksecurefunc("AchievementObjectives_DisplayCriteria", function(A, B) + local C = GetAchievementNumCriteria(B) + local D, E = 0, 0; + for f = 1, C do + local F, G, H, I, J, K, L, M, N = GetAchievementCriteriaInfo(B, f) + if G == CRITERIA_TYPE_ACHIEVEMENT and M then + E = E+1; + local O = AchievementButton_GetMeta(E) + if A.completed and H then + O.label:SetShadowOffset(0, 0) + O.label:SetTextColor(1, 1, 1, 1) + elseif H then + O.label:SetShadowOffset(1, -1) + O.label:SetTextColor(0, 1, 0, 1) + else + O.label:SetShadowOffset(1, -1) + O.label:SetTextColor(.6, .6, .6, 1) + end + elseif G ~= 1 then + D = D+1; + local P = AchievementButton_GetCriteria(D) + if A.completed and H then + P.name:SetTextColor(1, 1, 1, 1) + P.name:SetShadowOffset(0, 0) + elseif H then + P.name:SetTextColor(0, 1, 0, 1) + P.name:SetShadowOffset(1, -1) + else + P.name:SetTextColor(.6, .6, .6, 1) + P.name:SetShadowOffset(1, -1) + end + end + end + end) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_AchievementUI", AchievementStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua new file mode 100644 index 0000000..04dc87d --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/alert.lua @@ -0,0 +1,343 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local AlphaHelper = function(self, value, flag) + if(not flag and value ~= 1) then + self:SetAlpha(1, true) + end +end +--[[ +########################################################## +ALERTFRAME STYLER +########################################################## +]]-- +local function AlertStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.alertframes ~= true then return end + + for i = 1, 4 do + local alert = _G["SVUI_SystemAlert"..i]; + if(alert) then + for b = 1, 3 do + alert.buttons[b]:SetButtonTemplate() + end + alert:RemoveTextures() + STYLE:ApplyAlertStyle(alert) + alert.input:SetEditboxTemplate() + alert.input.Panel:Point("TOPLEFT", -2, -4) + alert.input.Panel:Point("BOTTOMRIGHT", 2, 4) + alert.gold:SetEditboxTemplate() + alert.silver:SetEditboxTemplate() + alert.copper:SetEditboxTemplate() + end + end + + hooksecurefunc("AlertFrame_SetAchievementAnchors", function() + for i = 1, MAX_ACHIEVEMENT_ALERTS do + local frame = _G["AchievementAlertFrame"..i] + if frame then + frame:SetAlpha(1) + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + if not frame.Panel then + frame:SetBasicPanel() + frame.Panel:Point("TOPLEFT", _G[frame:GetName().."Background"], "TOPLEFT", -2, -6) + frame.Panel:Point("BOTTOMRIGHT", _G[frame:GetName().."Background"], "BOTTOMRIGHT", -2, 6) + end + _G["AchievementAlertFrame"..i.."Background"]:SetTexture(0,0,0,0) + _G["AchievementAlertFrame"..i.."OldAchievement"]:Die() + _G["AchievementAlertFrame"..i.."Glow"]:Die() + _G["AchievementAlertFrame"..i.."Shine"]:Die() + _G["AchievementAlertFrame"..i.."GuildBanner"]:Die() + _G["AchievementAlertFrame"..i.."GuildBorder"]:Die() + _G["AchievementAlertFrame"..i.."Unlocked"]:SetFontTemplate(nil, 12) + _G["AchievementAlertFrame"..i.."Unlocked"]:SetTextColor(1, 1, 1) + _G["AchievementAlertFrame"..i.."Name"]:SetFontTemplate(nil, 12) + _G["AchievementAlertFrame"..i.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) + _G["AchievementAlertFrame"..i.."IconOverlay"]:Die() + _G["AchievementAlertFrame"..i.."IconTexture"]:ClearAllPoints() + _G["AchievementAlertFrame"..i.."IconTexture"]:Point("LEFT", frame, 7, 0) + if not _G["AchievementAlertFrame"..i.."IconTexture"].b then + _G["AchievementAlertFrame"..i.."IconTexture"].b = CreateFrame("Frame", nil, _G["AchievementAlertFrame"..i]) + _G["AchievementAlertFrame"..i.."IconTexture"].b:SetFixedPanelTemplate("Default") + _G["AchievementAlertFrame"..i.."IconTexture"].b:WrapOuter(_G["AchievementAlertFrame"..i.."IconTexture"]) + _G["AchievementAlertFrame"..i.."IconTexture"]:SetParent(_G["AchievementAlertFrame"..i.."IconTexture"].b) + end + end + end + end) + + hooksecurefunc("AlertFrame_SetDungeonCompletionAnchors", function() + for i = 1, DUNGEON_COMPLETION_MAX_REWARDS do + local frame = _G["DungeonCompletionAlertFrame"..i] + if frame then + frame:SetAlpha(1) + + if(not frame.AlphaHooked) then + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + frame.AlphaHooked = true + end + + if(not frame.Panel) then + frame:SetBasicPanel() + frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) + frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) + end + + frame.shine:Die() + frame.glowFrame:Die() + frame.glowFrame.glow:Die() + frame.raidArt:Die() + frame.dungeonArt1:Die() + frame.dungeonArt2:Die() + frame.dungeonArt3:Die() + frame.dungeonArt4:Die() + frame.heroicIcon:Die() + frame.dungeonTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + frame.dungeonTexture:SetDrawLayer("OVERLAY") + frame.dungeonTexture:ClearAllPoints() + frame.dungeonTexture:Point("LEFT", frame, 7, 0) + + if not frame.dungeonTexture.b then + frame.dungeonTexture.b = CreateFrame("Frame", nil, frame) + frame.dungeonTexture.b:SetFixedPanelTemplate("Default") + frame.dungeonTexture.b:WrapOuter(frame.dungeonTexture) + frame.dungeonTexture:SetParent(frame.dungeonTexture.b) + end + end + end + end) + + hooksecurefunc("AlertFrame_SetGuildChallengeAnchors", function() + local frame = GuildChallengeAlertFrame; + if frame then + frame:SetAlpha(1) + + if(not frame.AlphaHooked) then + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + frame.AlphaHooked = true + end + + if(not frame.Panel) then + frame:SetBasicPanel() + frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) + frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) + end + + local j = select(2, frame:GetRegions()) + if j:GetObjectType() == "Texture"then + if j:GetTexture() == "Interface\\GuildFrame\\GuildChallenges"then j:Die()end + end + + GuildChallengeAlertFrameGlow:Die() + GuildChallengeAlertFrameShine:Die() + GuildChallengeAlertFrameEmblemBorder:Die() + if not GuildChallengeAlertFrameEmblemIcon.b then + GuildChallengeAlertFrameEmblemIcon.b = CreateFrame("Frame", nil, frame) + GuildChallengeAlertFrameEmblemIcon.b:SetFixedPanelTemplate("Default") + GuildChallengeAlertFrameEmblemIcon.b:Point("TOPLEFT", GuildChallengeAlertFrameEmblemIcon, "TOPLEFT", -3, 3) + GuildChallengeAlertFrameEmblemIcon.b:Point("BOTTOMRIGHT", GuildChallengeAlertFrameEmblemIcon, "BOTTOMRIGHT", 3, -2) + GuildChallengeAlertFrameEmblemIcon:SetParent(GuildChallengeAlertFrameEmblemIcon.b) + end + SetLargeGuildTabardTextures("player", GuildChallengeAlertFrameEmblemIcon, nil, nil) + end + end) + + hooksecurefunc("AlertFrame_SetChallengeModeAnchors", function() + local frame = ChallengeModeAlertFrame1; + if frame then + frame:SetAlpha(1) + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + if not frame.Panel then + frame:SetBasicPanel() + frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", 19, -6) + frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -22, 6) + end + for i = 1, frame:GetNumRegions()do + local j = select(i, frame:GetRegions()) + if j:GetObjectType() == "Texture"then + if j:GetTexture() == "Interface\\Challenges\\challenges-main" then j:Die() end + end + end + ChallengeModeAlertFrame1Shine:Die() + ChallengeModeAlertFrame1GlowFrame:Die() + ChallengeModeAlertFrame1GlowFrame.glow:Die() + ChallengeModeAlertFrame1Border:Die() + ChallengeModeAlertFrame1DungeonTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + ChallengeModeAlertFrame1DungeonTexture:ClearAllPoints() + ChallengeModeAlertFrame1DungeonTexture:Point("LEFT", frame.Panel, 9, 0) + if not ChallengeModeAlertFrame1DungeonTexture.b then + ChallengeModeAlertFrame1DungeonTexture.b = CreateFrame("Frame", nil, frame) + ChallengeModeAlertFrame1DungeonTexture.b:SetFixedPanelTemplate("Default") + ChallengeModeAlertFrame1DungeonTexture.b:WrapOuter(ChallengeModeAlertFrame1DungeonTexture) + ChallengeModeAlertFrame1DungeonTexture:SetParent(ChallengeModeAlertFrame1DungeonTexture.b) + end + end + end) + + hooksecurefunc("AlertFrame_SetScenarioAnchors", function() + local frame = ScenarioAlertFrame1; + if frame then + frame:SetAlpha(1) + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + if not frame.Panel then + frame:SetBasicPanel() + frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", 4, 4) + frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -7, 6) + end + for i = 1, frame:GetNumRegions()do + local j = select(i, frame:GetRegions()) + if j:GetObjectType() == "Texture"then + if j:GetTexture() == "Interface\\Scenarios\\ScenariosParts" then j:Die() end + end + end + ScenarioAlertFrame1Shine:Die() + ScenarioAlertFrame1GlowFrame:Die() + ScenarioAlertFrame1GlowFrame.glow:Die() + ScenarioAlertFrame1DungeonTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + ScenarioAlertFrame1DungeonTexture:ClearAllPoints() + ScenarioAlertFrame1DungeonTexture:Point("LEFT", frame.Panel, 9, 0) + if not ScenarioAlertFrame1DungeonTexture.b then + ScenarioAlertFrame1DungeonTexture.b = CreateFrame("Frame", nil, frame) + ScenarioAlertFrame1DungeonTexture.b:SetFixedPanelTemplate("Default") + ScenarioAlertFrame1DungeonTexture.b:WrapOuter(ScenarioAlertFrame1DungeonTexture) + ScenarioAlertFrame1DungeonTexture:SetParent(ScenarioAlertFrame1DungeonTexture.b) + end + end + end) + + hooksecurefunc("AlertFrame_SetCriteriaAnchors", function() + for i = 1, MAX_ACHIEVEMENT_ALERTS do + local frame = _G["CriteriaAlertFrame"..i] + if frame then + frame:SetAlpha(1) + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + if not frame.Panel then + frame:SetBasicPanel() + frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) + frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) + end + _G["CriteriaAlertFrame"..i.."Unlocked"]:SetTextColor(1, 1, 1) + _G["CriteriaAlertFrame"..i.."Name"]:SetTextColor(1, 1, 0) + _G["CriteriaAlertFrame"..i.."Background"]:Die() + _G["CriteriaAlertFrame"..i.."Glow"]:Die() + _G["CriteriaAlertFrame"..i.."Shine"]:Die() + _G["CriteriaAlertFrame"..i.."IconBling"]:Die() + _G["CriteriaAlertFrame"..i.."IconOverlay"]:Die() + if not _G["CriteriaAlertFrame"..i.."IconTexture"].b then + _G["CriteriaAlertFrame"..i.."IconTexture"].b = CreateFrame("Frame", nil, frame) + _G["CriteriaAlertFrame"..i.."IconTexture"].b:SetFixedPanelTemplate("Default") + _G["CriteriaAlertFrame"..i.."IconTexture"].b:Point("TOPLEFT", _G["CriteriaAlertFrame"..i.."IconTexture"], "TOPLEFT", -3, 3) + _G["CriteriaAlertFrame"..i.."IconTexture"].b:Point("BOTTOMRIGHT", _G["CriteriaAlertFrame"..i.."IconTexture"], "BOTTOMRIGHT", 3, -2) + _G["CriteriaAlertFrame"..i.."IconTexture"]:SetParent(_G["CriteriaAlertFrame"..i.."IconTexture"].b) + end + _G["CriteriaAlertFrame"..i.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end + end) + + hooksecurefunc("AlertFrame_SetLootWonAnchors", function() + for i = 1, #LOOT_WON_ALERT_FRAMES do + local frame = LOOT_WON_ALERT_FRAMES[i] + if frame then + frame:SetAlpha(1) + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + frame.Background:Die() + frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + frame.IconBorder:Die() + frame.glow:Die() + frame.shine:Die() + if not frame.Icon.b then + frame.Icon.b = CreateFrame("Frame", nil, frame) + frame.Icon.b:SetFixedPanelTemplate("Default") + frame.Icon.b:WrapOuter(frame.Icon) + frame.Icon:SetParent(frame.Icon.b) + end + if not frame.Panel then + frame:SetBasicPanel() + frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) + frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) + end + end + end + end) + + hooksecurefunc("AlertFrame_SetMoneyWonAnchors", function() + for i = 1, #MONEY_WON_ALERT_FRAMES do + local frame = MONEY_WON_ALERT_FRAMES[i] + if frame then + frame:SetAlpha(1) + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + frame.Background:Die() + frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + frame.IconBorder:Die() + if not frame.Icon.b then + frame.Icon.b = CreateFrame("Frame", nil, frame) + frame.Icon.b:SetFixedPanelTemplate("Default") + frame.Icon.b:WrapOuter(frame.Icon) + frame.Icon:SetParent(frame.Icon.b) + end + if not frame.Panel then + frame:SetBasicPanel() + frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) + frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) + end + end + end + end) + + local frame = BonusRollMoneyWonFrame; + frame:SetAlpha(1) + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + frame.Background:Die() + frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + frame.IconBorder:Die() + frame.Icon.b = CreateFrame("Frame", nil, frame) + frame.Icon.b:SetFixedPanelTemplate("Default") + frame.Icon.b:WrapOuter(frame.Icon) + frame.Icon:SetParent(frame.Icon.b) + frame:SetBasicPanel() + frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) + frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) + + local frame = BonusRollLootWonFrame; + frame:SetAlpha(1) + hooksecurefunc(frame, "SetAlpha", AlphaHelper) + frame.Background:Die() + frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + frame.IconBorder:Die() + frame.glow:Die() + frame.shine:Die() + frame.Icon.b = CreateFrame("Frame", nil, frame) + frame.Icon.b:SetFixedPanelTemplate("Default") + frame.Icon.b:WrapOuter(frame.Icon) + frame.Icon:SetParent(frame.Icon.b) + frame:SetBasicPanel() + frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) + frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(AlertStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua new file mode 100644 index 0000000..251045e --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/archeology.lua @@ -0,0 +1,88 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +ARCHEOLOGYFRAME STYLER +########################################################## +]]-- +--240 24 +local progressBarHolder = CreateFrame("Frame", "SVUI_ArcheologyProgressBar", nil) +progressBarHolder:SetSize(240, 24) +progressBarHolder:SetPoint("BOTTOM", CastingBarFrame, "TOP", 0, 10) +SV.Mentalo:Add(progressBarHolder, "Archeology Progress Bar") + +local function ArchaeologyStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.archaeology ~= true then return end + + ArchaeologyFrame:RemoveTextures() + ArchaeologyFrameInset:RemoveTextures() + ArchaeologyFrame:SetPanelTemplate("Halftone") + ArchaeologyFrame.Panel:SetAllPoints() + ArchaeologyFrame.portrait:SetAlpha(0) + ArchaeologyFrameInset:SetPanelTemplate("Inset") + ArchaeologyFrameInset.Panel:SetPoint("TOPLEFT") + ArchaeologyFrameInset.Panel:SetPoint("BOTTOMRIGHT", -3, -1) + ArchaeologyFrameArtifactPageSolveFrameSolveButton:SetButtonTemplate() + ArchaeologyFrameArtifactPageBackButton:SetButtonTemplate() + ArchaeologyFrameRaceFilter:SetFrameLevel(ArchaeologyFrameRaceFilter:GetFrameLevel()+2) + STYLE:ApplyDropdownStyle(ArchaeologyFrameRaceFilter, 125) + STYLE:ApplyPaginationStyle(ArchaeologyFrameCompletedPageNextPageButton) + STYLE:ApplyPaginationStyle(ArchaeologyFrameCompletedPagePrevPageButton) + ArchaeologyFrameRankBar:RemoveTextures() + ArchaeologyFrameRankBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + ArchaeologyFrameRankBar:SetFrameLevel(ArchaeologyFrameRankBar:GetFrameLevel()+2) + ArchaeologyFrameRankBar:SetPanelTemplate("Default") + ArchaeologyFrameArtifactPageSolveFrameStatusBar:RemoveTextures() + ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarColor(0.7, 0.2, 0) + ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetFrameLevel(ArchaeologyFrameArtifactPageSolveFrameStatusBar:GetFrameLevel()+2) + ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetPanelTemplate("Default") + + for b = 1, ARCHAEOLOGY_MAX_COMPLETED_SHOWN do + local c = _G["ArchaeologyFrameCompletedPageArtifact"..b] + if c then + _G["ArchaeologyFrameCompletedPageArtifact"..b.."Border"]:Die() + _G["ArchaeologyFrameCompletedPageArtifact"..b.."Bg"]:Die() + _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) + _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"].backdrop = CreateFrame("Frame", nil, c) + _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"].backdrop:SetFixedPanelTemplate("Default") + _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"].backdrop:WrapOuter(_G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"]) + _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"].backdrop:SetFrameLevel(c:GetFrameLevel()-2) + _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"]:SetDrawLayer("OVERLAY") + end + end + + ArchaeologyFrameArtifactPageIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + ArchaeologyFrameArtifactPageIcon.backdrop = CreateFrame("Frame", nil, ArchaeologyFrameArtifactPage) + ArchaeologyFrameArtifactPageIcon.backdrop:SetFixedPanelTemplate("Default") + ArchaeologyFrameArtifactPageIcon.backdrop:WrapOuter(ArchaeologyFrameArtifactPageIcon) + ArchaeologyFrameArtifactPageIcon.backdrop:SetFrameLevel(ArchaeologyFrameArtifactPage:GetFrameLevel()) + ArchaeologyFrameArtifactPageIcon:SetParent(ArchaeologyFrameArtifactPageIcon.backdrop) + ArchaeologyFrameArtifactPageIcon:SetDrawLayer("OVERLAY") + STYLE:ApplyCloseButtonStyle(ArchaeologyFrameCloseButton) + ArcheologyDigsiteProgressBar:SetAllPoints(progressBarHolder) + progressBarHolder:SetParent(ArcheologyDigsiteProgressBar) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_ArchaeologyUI", ArchaeologyStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/auctionhouse.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/auctionhouse.lua new file mode 100644 index 0000000..f7e4f24 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/auctionhouse.lua @@ -0,0 +1,331 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local AuctionSortLinks = { + "BrowseQualitySort", + "BrowseLevelSort", + "BrowseDurationSort", + "BrowseHighBidderSort", + "BrowseCurrentBidSort", + "BidQualitySort", + "BidLevelSort", + "BidDurationSort", + "BidBuyoutSort", + "BidStatusSort", + "BidBidSort", + "AuctionsQualitySort", + "AuctionsDurationSort", + "AuctionsHighBidderSort", + "AuctionsBidSort" +} +local AuctionBidButtons = { + "BrowseBidButton", + "BidBidButton", + "BrowseBuyoutButton", + "BidBuyoutButton", + "BrowseCloseButton", + "BidCloseButton", + "BrowseSearchButton", + "AuctionsCreateAuctionButton", + "AuctionsCancelAuctionButton", + "AuctionsCloseButton", + "BrowseResetButton", + "AuctionsStackSizeMaxButton", + "AuctionsNumStacksMaxButton", +} + +local AuctionTextFields = { + "BrowseName", + "BrowseMinLevel", + "BrowseMaxLevel", + "BrowseBidPriceGold", + "BidBidPriceGold", + "AuctionsStackSizeEntry", + "AuctionsNumStacksEntry", + "StartPriceGold", + "BuyoutPriceGold", + "BrowseBidPriceSilver", + "BrowseBidPriceCopper", + "BidBidPriceSilver", + "BidBidPriceCopper", + "StartPriceSilver", + "StartPriceCopper", + "BuyoutPriceSilver", + "BuyoutPriceCopper" +} +--[[ +########################################################## +AUCTIONFRAME STYLER +########################################################## +]]-- +local function AuctionStyle() + --STYLE.Debugging = true + if(SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.auctionhouse ~= true) then return end + + STYLE:ApplyWindowStyle(AuctionFrame, false, true) + + BrowseFilterScrollFrame:RemoveTextures() + BrowseScrollFrame:RemoveTextures() + AuctionsScrollFrame:RemoveTextures() + BidScrollFrame:RemoveTextures() + + STYLE:ApplyCloseButtonStyle(AuctionFrameCloseButton) + STYLE:ApplyScrollFrameStyle(AuctionsScrollFrameScrollBar) + + STYLE:ApplyDropdownStyle(BrowseDropDown) + STYLE:ApplyDropdownStyle(PriceDropDown) + STYLE:ApplyDropdownStyle(DurationDropDown) + STYLE:ApplyScrollFrameStyle(BrowseFilterScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(BrowseScrollFrameScrollBar) + IsUsableCheckButton:SetCheckboxTemplate(true) + ShowOnPlayerCheckButton:SetCheckboxTemplate(true) + + --ExactMatchCheckButton:SetCheckboxTemplate(true) + + SideDressUpFrame:RemoveTextures(true) + SideDressUpFrame:Size(300, 400) + SideDressUpFrame:SetPoint("LEFT", AuctionFrame, "RIGHT", 16, 0) + SideDressUpFrame.SetPoint = SV.fubar + SideDressUpModel:RemoveTextures(true) + SideDressUpModel:SetAllPoints(SideDressUpFrame) + SideDressUpModel:SetFixedPanelTemplate("ModelComic") + SideDressUpModelResetButton:SetButtonTemplate() + SideDressUpModelResetButton:SetPoint("BOTTOM", SideDressUpModel, "BOTTOM", 0, 20) + STYLE:ApplyCloseButtonStyle(SideDressUpModelCloseButton) + + AuctionProgressFrame:RemoveTextures() + AuctionProgressFrame:SetFixedPanelTemplate("Transparent", true) + AuctionProgressFrameCancelButton:SetButtonTemplate() + AuctionProgressFrameCancelButton:SetFixedPanelTemplate("Default") + AuctionProgressFrameCancelButton:SetHitRectInsets(0, 0, 0, 0) + AuctionProgressFrameCancelButton:GetNormalTexture():FillInner() + AuctionProgressFrameCancelButton:GetNormalTexture():SetTexCoord(0.67, 0.37, 0.61, 0.26) + AuctionProgressFrameCancelButton:Size(28, 28) + AuctionProgressFrameCancelButton:Point("LEFT", AuctionProgressBar, "RIGHT", 8, 0) + AuctionProgressBarIcon:SetTexCoord(0.67, 0.37, 0.61, 0.26) + + local AuctionProgressBarBG = CreateFrame("Frame", nil, AuctionProgressBarIcon:GetParent()) + AuctionProgressBarBG:WrapOuter(AuctionProgressBarIcon) + AuctionProgressBarBG:SetFixedPanelTemplate("Default") + AuctionProgressBarIcon:SetParent(AuctionProgressBarBG) + + AuctionProgressBarText:ClearAllPoints() + AuctionProgressBarText:SetPoint("CENTER") + AuctionProgressBar:RemoveTextures() + AuctionProgressBar:SetPanelTemplate("Default") + AuctionProgressBar:SetStatusBarTexture(SV.Media.bar.default) + AuctionProgressBar:SetStatusBarColor(1, 1, 0) + + STYLE:ApplyPaginationStyle(BrowseNextPageButton) + STYLE:ApplyPaginationStyle(BrowsePrevPageButton) + + for _,gName in pairs(AuctionBidButtons) do + if(_G[gName]) then + _G[gName]:RemoveTextures() + _G[gName]:SetButtonTemplate() + end + end + + AuctionsCloseButton:Point("BOTTOMRIGHT", AuctionFrameAuctions, "BOTTOMRIGHT", 66, 10) + AuctionsCancelAuctionButton:Point("RIGHT", AuctionsCloseButton, "LEFT", -4, 0) + + BidBuyoutButton:Point("RIGHT", BidCloseButton, "LEFT", -4, 0) + BidBidButton:Point("RIGHT", BidBuyoutButton, "LEFT", -4, 0) + + BrowseBuyoutButton:Point("RIGHT", BrowseCloseButton, "LEFT", -4, 0) + BrowseBidButton:Point("RIGHT", BrowseBuyoutButton, "LEFT", -4, 0) + + AuctionsItemButton:RemoveTextures() + AuctionsItemButton:SetButtonTemplate() + AuctionsItemButton:SetScript("OnUpdate", function() + if AuctionsItemButton:GetNormalTexture()then + AuctionsItemButton:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) + AuctionsItemButton:GetNormalTexture():FillInner() + end + end) + + for _,frame in pairs(AuctionSortLinks)do + _G[frame.."Left"]:Die() + _G[frame.."Middle"]:Die() + _G[frame.."Right"]:Die() + end + + STYLE:ApplyTabStyle(_G["AuctionFrameTab1"]) + STYLE:ApplyTabStyle(_G["AuctionFrameTab2"]) + STYLE:ApplyTabStyle(_G["AuctionFrameTab3"]) + + AuctionFrameBrowse.bg1 = CreateFrame("Frame", nil, AuctionFrameBrowse) + AuctionFrameBrowse.bg1:Point("TOPLEFT", 20, -103) + AuctionFrameBrowse.bg1:Point("BOTTOMRIGHT", -575, 40) + AuctionFrameBrowse.bg1:SetFixedPanelTemplate("Inset") + + BrowseNoResultsText:SetParent(AuctionFrameBrowse.bg1) + BrowseSearchCountText:SetParent(AuctionFrameBrowse.bg1) + + BrowseResetButton:Point("TOPLEFT", AuctionFrameBrowse, "TOPLEFT", 81, -74) + BrowseSearchButton:Point("TOPRIGHT", AuctionFrameBrowse, "TOPRIGHT", 25, -34) + + AuctionFrameBrowse.bg1:SetFrameLevel(AuctionFrameBrowse.bg1:GetFrameLevel()-1) + BrowseFilterScrollFrame:Height(300) + AuctionFrameBrowse.bg2 = CreateFrame("Frame", nil, AuctionFrameBrowse) + AuctionFrameBrowse.bg2:SetFixedPanelTemplate("Inset") + AuctionFrameBrowse.bg2:Point("TOPLEFT", AuctionFrameBrowse.bg1, "TOPRIGHT", 4, 0) + AuctionFrameBrowse.bg2:Point("BOTTOMRIGHT", AuctionFrame, "BOTTOMRIGHT", -8, 40) + AuctionFrameBrowse.bg2:SetFrameLevel(AuctionFrameBrowse.bg2:GetFrameLevel() - 1) + + for i = 1, NUM_FILTERS_TO_DISPLAY do + local header = _G[("AuctionFilterButton%d"):format(i)] + if(header) then + header:RemoveTextures() + header:SetButtonTemplate() + end + end + + for _,field in pairs(AuctionTextFields)do + _G[field]:SetEditboxTemplate() + _G[field]:SetTextInsets(-1, -1, -2, -2) + end + + BrowseMaxLevel:Point("LEFT", BrowseMinLevel, "RIGHT", 8, 0) + AuctionsStackSizeEntry.Panel:SetAllPoints() + AuctionsNumStacksEntry.Panel:SetAllPoints() + + for h = 1, NUM_BROWSE_TO_DISPLAY do + local button = _G["BrowseButton"..h]; + local buttonItem = _G["BrowseButton"..h.."Item"]; + local buttonTex = _G["BrowseButton"..h.."ItemIconTexture"]; + + if(button) then + if(buttonTex) then + buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + buttonTex:FillInner() + end + + button:RemoveTextures() + button:SetButtonTemplate() + + if(buttonItem) then + buttonItem:SetButtonTemplate() + buttonItem.Panel:SetAllPoints() + buttonItem:HookScript("OnUpdate", function() + buttonItem:GetNormalTexture():Die() + end) + + local highLight = button:GetHighlightTexture() + _G["BrowseButton"..h.."Highlight"] = highLight + highLight:ClearAllPoints() + highLight:Point("TOPLEFT", buttonItem, "TOPRIGHT", 2, 0) + highLight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) + button:GetPushedTexture():SetAllPoints(highLight) + end + end + end + + for h = 1, NUM_AUCTIONS_TO_DISPLAY do + local button = _G["AuctionsButton"..h]; + local buttonItem = _G["AuctionsButton"..h.."Item"]; + local buttonTex = _G["AuctionsButton"..h.."ItemIconTexture"]; + + if(button) then + if(buttonTex) then + buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + buttonTex:FillInner() + end + + button:RemoveTextures() + button:SetButtonTemplate() + + if(buttonItem) then + buttonItem:SetButtonTemplate() + buttonItem.Panel:SetAllPoints() + buttonItem:HookScript("OnUpdate", function() + buttonItem:GetNormalTexture():Die() + end) + + local highLight = button:GetHighlightTexture() + _G["AuctionsButton"..h.."Highlight"] = highLight + highLight:ClearAllPoints() + highLight:Point("TOPLEFT", buttonItem, "TOPRIGHT", 2, 0) + highLight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) + button:GetPushedTexture():SetAllPoints(highLight) + end + end + end + + for h = 1, NUM_BIDS_TO_DISPLAY do + local button = _G["BidButton"..h]; + local buttonItem = _G["BidButton"..h.."Item"]; + local buttonTex = _G["BidButton"..h.."ItemIconTexture"]; + + if(button) then + if(buttonTex) then + buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + buttonTex:FillInner() + end + + button:RemoveTextures() + button:SetButtonTemplate() + + if(buttonItem) then + buttonItem:SetButtonTemplate() + buttonItem.Panel:SetAllPoints() + buttonItem:HookScript("OnUpdate", function() + buttonItem:GetNormalTexture():Die() + end) + + local highLight = button:GetHighlightTexture() + _G["BidButton"..h.."Highlight"] = highLight + highLight:ClearAllPoints() + highLight:Point("TOPLEFT", buttonItem, "TOPRIGHT", 2, 0) + highLight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) + button:GetPushedTexture():SetAllPoints(highLight) + end + end + end + + BrowseScrollFrame:Height(300) + AuctionFrameBid.bg = CreateFrame("Frame", nil, AuctionFrameBid) + AuctionFrameBid.bg:SetFixedPanelTemplate("Inset") + AuctionFrameBid.bg:Point("TOPLEFT", 22, -72) + AuctionFrameBid.bg:Point("BOTTOMRIGHT", 66, 39) + AuctionFrameBid.bg:SetFrameLevel(AuctionFrameBid.bg:GetFrameLevel()-1) + BidScrollFrame:Height(332) + AuctionsScrollFrame:Height(336) + AuctionFrameAuctions.bg1 = CreateFrame("Frame", nil, AuctionFrameAuctions) + AuctionFrameAuctions.bg1:SetFixedPanelTemplate("Inset") + AuctionFrameAuctions.bg1:Point("TOPLEFT", 15, -70) + AuctionFrameAuctions.bg1:Point("BOTTOMRIGHT", -545, 35) + AuctionFrameAuctions.bg1:SetFrameLevel(AuctionFrameAuctions.bg1:GetFrameLevel() - 2) + AuctionFrameAuctions.bg2 = CreateFrame("Frame", nil, AuctionFrameAuctions) + AuctionFrameAuctions.bg2:SetFixedPanelTemplate("Inset") + AuctionFrameAuctions.bg2:Point("TOPLEFT", AuctionFrameAuctions.bg1, "TOPRIGHT", 3, 0) + AuctionFrameAuctions.bg2:Point("BOTTOMRIGHT", AuctionFrame, -8, 35) + AuctionFrameAuctions.bg2:SetFrameLevel(AuctionFrameAuctions.bg2:GetFrameLevel() - 2) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_AuctionUI", AuctionStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/barbershop.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/barbershop.lua new file mode 100644 index 0000000..c2ad149 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/barbershop.lua @@ -0,0 +1,67 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +BARBERSHOP STYLER +########################################################## +]]-- +local function BarberShopStyle() + if SV.db[Schema].blizzard.enable~=true or SV.db[Schema].blizzard.barber~=true then return end + local buttons = {"BarberShopFrameOkayButton", "BarberShopFrameCancelButton", "BarberShopFrameResetButton"} + BarberShopFrameOkayButton:Point("RIGHT", BarberShopFrameSelector4, "BOTTOM", 2, -50) + for b = 1, #buttons do + _G[buttons[b]]:RemoveTextures() + _G[buttons[b]]:SetButtonTemplate() + end + for b = 1, 4 do + local c = _G["BarberShopFrameSelector"..b] + local d = _G["BarberShopFrameSelector"..b-1] + STYLE:ApplyPaginationStyle(_G["BarberShopFrameSelector"..b.."Prev"]) + STYLE:ApplyPaginationStyle(_G["BarberShopFrameSelector"..b.."Next"]) + if b ~= 1 then + c:ClearAllPoints()c:Point("TOP", d, "BOTTOM", 0, -3) + end + if c then + c:RemoveTextures() + end + end + BarberShopFrameSelector1:ClearAllPoints() + BarberShopFrameSelector1:Point("TOP", 0, -12) + BarberShopFrameResetButton:ClearAllPoints() + BarberShopFrameResetButton:Point("BOTTOM", 0, 12) + BarberShopFrame:RemoveTextures() + BarberShopFrame:SetPanelTemplate("Halftone") + BarberShopFrame:Size(BarberShopFrame:GetWidth()-30, BarberShopFrame:GetHeight()-56) + BarberShopFrameMoneyFrame:RemoveTextures() + BarberShopFrameMoneyFrame:SetPanelTemplate() + BarberShopFrameBackground:Die() + BarberShopBannerFrameBGTexture:Die() + BarberShopBannerFrame:Die() + BarberShopAltFormFrameBorder:RemoveTextures() + BarberShopAltFormFrame:Point("BOTTOM", BarberShopFrame, "TOP", 0, 5) + BarberShopAltFormFrame:RemoveTextures() + BarberShopAltFormFrame:SetBasicPanel() +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_BarbershopUI",BarberShopStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/battlefield.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/battlefield.lua new file mode 100644 index 0000000..044ff6c --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/battlefield.lua @@ -0,0 +1,94 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +BATTLEFIELD STYLER +########################################################## +]]-- +local function BattlefieldStyle() + if SV.db[Schema].blizzard.enable~=true or SV.db[Schema].blizzard.bgmap~=true then return end + BattlefieldMinimap:SetClampedToScreen(true) + BattlefieldMinimapCorner:Die() + BattlefieldMinimapBackground:Die() + BattlefieldMinimapTab:Die() + BattlefieldMinimapTabLeft:Die() + BattlefieldMinimapTabMiddle:Die() + BattlefieldMinimapTabRight:Die() + BattlefieldMinimap:SetFixedPanelTemplate("Transparent") + BattlefieldMinimap.Panel:Point("BOTTOMRIGHT", -4, 2) + BattlefieldMinimap:SetFrameStrata("LOW") + BattlefieldMinimapCloseButton:ClearAllPoints() + BattlefieldMinimapCloseButton:SetPoint("TOPRIGHT", -4, 0) + STYLE:ApplyCloseButtonStyle(BattlefieldMinimapCloseButton) + BattlefieldMinimapCloseButton:SetFrameStrata("MEDIUM") + BattlefieldMinimap:EnableMouse(true) + BattlefieldMinimap:SetMovable(true) + BattlefieldMinimap:SetScript("OnMouseUp", function(f, g) + if g == "LeftButton"then + BattlefieldMinimapTab:StopMovingOrSizing()BattlefieldMinimapTab:SetUserPlaced(true) + if OpacityFrame:IsShown()then + OpacityFrame:Hide() + end + elseif g == "RightButton"then + ToggleDropDownMenu(1, nil, BattlefieldMinimapTabDropDown, f:GetName(), 0, -4) + if OpacityFrame:IsShown()then + OpacityFrame:Hide() + end + end + end) + BattlefieldMinimap:SetScript("OnMouseDown", function(f, g) + if g == "LeftButton"then + if BattlefieldMinimapOptions and BattlefieldMinimapOptions.locked then + return + else + BattlefieldMinimapTab:StartMoving() + end + end + end) + hooksecurefunc("BattlefieldMinimap_UpdateOpacity", function(opacity) + local h = 1.0-BattlefieldMinimapOptions.opacity or 0; + BattlefieldMinimap.Panel:SetAlpha(h) + end) + local i; + BattlefieldMinimap:HookScript("OnEnter", function() + i = BattlefieldMinimapOptions.opacity or 0; + BattlefieldMinimap_UpdateOpacity(0) + end) + BattlefieldMinimap:HookScript("OnLeave", function() + if i then + BattlefieldMinimap_UpdateOpacity(i)i = nil + end + end) + BattlefieldMinimapCloseButton:HookScript("OnEnter", function() + i = BattlefieldMinimapOptions.opacity or 0; + BattlefieldMinimap_UpdateOpacity(0) + end) + BattlefieldMinimapCloseButton:HookScript("OnLeave", function() + if i then + BattlefieldMinimap_UpdateOpacity(i)i = nil + end + end) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_BattlefieldMinimap",BattlefieldStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/blackmarket.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/blackmarket.lua new file mode 100644 index 0000000..88bc2c6 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/blackmarket.lua @@ -0,0 +1,93 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +BLACKMARKET STYLER +########################################################## +]]-- +local function BlackMarketStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.bmah ~= true then + return + end + + local ChangeTab = function(p) + p.Left:SetAlpha(0) + if p.Middle then + p.Middle:SetAlpha(0) + end + p.Right:SetAlpha(0) + end + + BlackMarketFrame:RemoveTextures() + BlackMarketFrame:SetPanelTemplate("Halftone") + BlackMarketFrame.Inset:RemoveTextures() + BlackMarketFrame.Inset:SetFixedPanelTemplate("Inset") + STYLE:ApplyCloseButtonStyle(BlackMarketFrame.CloseButton) + STYLE:ApplyScrollFrameStyle(BlackMarketScrollFrameScrollBar, 4) + + ChangeTab(BlackMarketFrame.ColumnName) + ChangeTab(BlackMarketFrame.ColumnLevel) + ChangeTab(BlackMarketFrame.ColumnType) + ChangeTab(BlackMarketFrame.ColumnDuration) + ChangeTab(BlackMarketFrame.ColumnHighBidder) + ChangeTab(BlackMarketFrame.ColumnCurrentBid) + + BlackMarketFrame.MoneyFrameBorder:RemoveTextures() + BlackMarketBidPriceGold:SetEditboxTemplate() + BlackMarketBidPriceGold.Panel:Point("TOPLEFT", -2, 0) + BlackMarketBidPriceGold.Panel:Point("BOTTOMRIGHT", -2, 0) + BlackMarketFrame.BidButton:SetButtonTemplate() + hooksecurefunc("BlackMarketScrollFrame_Update", function() + local buttons = BlackMarketScrollFrame.buttons; + local r = #buttons; + local s = HybridScrollFrame_GetOffset(BlackMarketScrollFrame) + local t = C_BlackMarket.GetNumItems() + for b = 1, r do + local u = buttons[b] + local v = s+b; + if not u.styled then + u:RemoveTextures() + u:SetButtonTemplate() + STYLE:ApplyItemButtonStyle(u.Item) + u.styled = true + end + if v <= t then + local w, x = C_BlackMarket.GetItemInfoByIndex(v) + if w then + u.Item.IconTexture:SetTexture(x) + end + end + end + end) + BlackMarketFrame.HotDeal:RemoveTextures() + STYLE:ApplyItemButtonStyle(BlackMarketFrame.HotDeal.Item) + for b = 1, BlackMarketFrame:GetNumRegions()do + local y = select(b, BlackMarketFrame:GetRegions()) + if y and y:GetObjectType() == "FontString" and y:GetText() == BLACK_MARKET_TITLE then + y:ClearAllPoints()y:SetPoint("TOP", BlackMarketFrame, "TOP", 0, -4) + end + end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_BlackMarketUI",BlackMarketStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/calendar.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/calendar.lua new file mode 100644 index 0000000..ba4091f --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/calendar.lua @@ -0,0 +1,188 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local CalendarButtons = { + "CalendarViewEventAcceptButton", + "CalendarViewEventTentativeButton", + "CalendarViewEventRemoveButton", + "CalendarViewEventDeclineButton" +}; +--[[ +########################################################## +CALENDAR STYLER +########################################################## +]]-- +local function CalendarStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.calendar ~= true then + return + end + + STYLE:ApplyWindowStyle(CalendarFrame) + + STYLE:ApplyCloseButtonStyle(CalendarCloseButton) + CalendarCloseButton:SetPoint("TOPRIGHT", CalendarFrame, "TOPRIGHT", -4, -4) + STYLE:ApplyPaginationStyle(CalendarPrevMonthButton) + STYLE:ApplyPaginationStyle(CalendarNextMonthButton) + + do + local cfframe = _G["CalendarFilterFrame"]; + + if(cfframe) then + cfframe:RemoveTextures() + cfframe:Width(155) + cfframe:SetPanelTemplate("Default") + + local cftext = _G["CalendarFilterFrameText"] + if(cftext) then + cftext:ClearAllPoints() + cftext:SetPoint("RIGHT", cfbutton, "LEFT", -2, 0) + end + + local cfbutton = _G["CalendarFilterButton"]; + if(cfbutton) then + cfbutton:ClearAllPoints() + cfbutton:SetPoint("RIGHT", cfframe, "RIGHT", -10, 3) + STYLE:ApplyPaginationStyle(cfbutton, true) + cfframe.Panel:SetPoint("TOPLEFT", 20, 2) + cfframe.Panel:SetPoint("BOTTOMRIGHT", cfbutton, "BOTTOMRIGHT", 2, -2) + end + end + end + + local l = CreateFrame("Frame", "CalendarFrameBackdrop", CalendarFrame) + l:SetFixedPanelTemplate("Default") + l:SetPoint("TOPLEFT", 10, -72) + l:SetPoint("BOTTOMRIGHT", -8, 3) + CalendarContextMenu:SetFixedPanelTemplate("Default") + hooksecurefunc(CalendarContextMenu, "SetBackdropColor", function(f, r, g, b, a) + if r ~= 0 or g ~= 0 or b ~= 0 or a ~= 0.5 then + f:SetBackdropColor(0, 0, 0, 0.5) + end + end) + hooksecurefunc(CalendarContextMenu, "SetBackdropBorderColor", function(f, r, g, b) + if r ~= 0 or g ~= 0 or b ~= 0 then + f:SetBackdropBorderColor(0, 0, 0) + end + end) + for u = 1, 42 do + _G["CalendarDayButton"..u]:SetFrameLevel(_G["CalendarDayButton"..u]:GetFrameLevel()+1) + end + CalendarCreateEventFrame:RemoveTextures() + CalendarCreateEventFrame:SetFixedPanelTemplate("Transparent", true) + CalendarCreateEventFrame:SetPoint("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) + CalendarCreateEventTitleFrame:RemoveTextures() + CalendarCreateEventCreateButton:SetButtonTemplate() + CalendarCreateEventMassInviteButton:SetButtonTemplate() + CalendarCreateEventInviteButton:SetButtonTemplate() + CalendarCreateEventInviteButton:SetPoint("TOPLEFT", CalendarCreateEventInviteEdit, "TOPRIGHT", 4, 1) + CalendarCreateEventInviteEdit:Width(CalendarCreateEventInviteEdit:GetWidth()-2) + CalendarCreateEventInviteList:RemoveTextures() + CalendarCreateEventInviteList:SetFixedPanelTemplate("Default") + CalendarCreateEventInviteEdit:SetEditboxTemplate() + CalendarCreateEventTitleEdit:SetEditboxTemplate() + STYLE:ApplyDropdownStyle(CalendarCreateEventTypeDropDown, 120) + CalendarCreateEventDescriptionContainer:RemoveTextures() + CalendarCreateEventDescriptionContainer:SetFixedPanelTemplate("Default") + STYLE:ApplyCloseButtonStyle(CalendarCreateEventCloseButton) + CalendarCreateEventLockEventCheck:SetCheckboxTemplate(true) + STYLE:ApplyDropdownStyle(CalendarCreateEventHourDropDown, 68) + STYLE:ApplyDropdownStyle(CalendarCreateEventMinuteDropDown, 68) + STYLE:ApplyDropdownStyle(CalendarCreateEventAMPMDropDown, 68) + STYLE:ApplyDropdownStyle(CalendarCreateEventRepeatOptionDropDown, 120) + CalendarCreateEventIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + hooksecurefunc(CalendarCreateEventIcon, "SetTexCoord", function(f, v, w, x, y) + local z, A, B, C = 0.1, 0.9, 0.1, 0.9 + if v ~= z or w ~= A or x ~= B or y ~= C then + f:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end) + CalendarCreateEventInviteListSection:RemoveTextures() + CalendarClassButtonContainer:HookScript("OnShow", function() + for u, D in ipairs(CLASS_SORT_ORDER)do + local e = _G["CalendarClassButton"..u]e:RemoveTextures() + e:SetPanelTemplate("Default") + local E = CLASS_ICON_TCOORDS[D] + local F = e:GetNormalTexture() + F:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes") + F:SetTexCoord(E[1]+0.015, E[2]-0.02, E[3]+0.018, E[4]-0.02) + end + CalendarClassButton1:SetPoint("TOPLEFT", CalendarClassButtonContainer, "TOPLEFT", 5, 0) + CalendarClassTotalsButton:RemoveTextures() + CalendarClassTotalsButton:SetPanelTemplate("Default") + end) + CalendarTexturePickerFrame:RemoveTextures() + CalendarTexturePickerTitleFrame:RemoveTextures() + CalendarTexturePickerFrame:SetFixedPanelTemplate("Transparent", true) + STYLE:ApplyScrollFrameStyle(CalendarTexturePickerScrollBar) + CalendarTexturePickerAcceptButton:SetButtonTemplate() + CalendarTexturePickerCancelButton:SetButtonTemplate() + CalendarCreateEventInviteButton:SetButtonTemplate() + CalendarCreateEventRaidInviteButton:SetButtonTemplate() + CalendarMassInviteFrame:RemoveTextures() + CalendarMassInviteFrame:SetFixedPanelTemplate("Transparent", true) + CalendarMassInviteTitleFrame:RemoveTextures() + STYLE:ApplyCloseButtonStyle(CalendarMassInviteCloseButton) + CalendarMassInviteGuildAcceptButton:SetButtonTemplate() + STYLE:ApplyDropdownStyle(CalendarMassInviteGuildRankMenu, 130) + CalendarMassInviteGuildMinLevelEdit:SetEditboxTemplate() + CalendarMassInviteGuildMaxLevelEdit:SetEditboxTemplate() + CalendarViewRaidFrame:RemoveTextures() + CalendarViewRaidFrame:SetFixedPanelTemplate("Transparent", true) + CalendarViewRaidFrame:SetPoint("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) + CalendarViewRaidTitleFrame:RemoveTextures() + STYLE:ApplyCloseButtonStyle(CalendarViewRaidCloseButton) + CalendarViewHolidayFrame:RemoveTextures(true) + CalendarViewHolidayFrame:SetFixedPanelTemplate("Transparent", true) + CalendarViewHolidayFrame:SetPoint("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) + CalendarViewHolidayTitleFrame:RemoveTextures() + STYLE:ApplyCloseButtonStyle(CalendarViewHolidayCloseButton) + CalendarViewEventFrame:RemoveTextures() + CalendarViewEventFrame:SetFixedPanelTemplate("Transparent", true) + CalendarViewEventFrame:SetPoint("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) + CalendarViewEventTitleFrame:RemoveTextures() + CalendarViewEventDescriptionContainer:RemoveTextures() + CalendarViewEventDescriptionContainer:SetFixedPanelTemplate("Transparent", true) + CalendarViewEventInviteList:RemoveTextures() + CalendarViewEventInviteList:SetFixedPanelTemplate("Transparent", true) + CalendarViewEventInviteListSection:RemoveTextures() + STYLE:ApplyCloseButtonStyle(CalendarViewEventCloseButton) + STYLE:ApplyScrollFrameStyle(CalendarViewEventInviteListScrollFrameScrollBar) + for _,btn in pairs(CalendarButtons)do + _G[btn]:SetButtonTemplate() + end + CalendarEventPickerFrame:RemoveTextures() + CalendarEventPickerTitleFrame:RemoveTextures() + CalendarEventPickerFrame:SetFixedPanelTemplate("Transparent", true) + STYLE:ApplyScrollFrameStyle(CalendarEventPickerScrollBar) + CalendarEventPickerCloseButton:SetButtonTemplate() + STYLE:ApplyScrollFrameStyle(CalendarCreateEventDescriptionScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(CalendarCreateEventInviteListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(CalendarViewEventDescriptionScrollFrameScrollBar) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_Calendar",CalendarStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/challenges.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/challenges.lua new file mode 100644 index 0000000..bfcfe58 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/challenges.lua @@ -0,0 +1,60 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +CHALLENGES UI STYLER +########################################################## +]]-- +local function ChallengesFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.lfg ~= true then return end + ChallengesFrameInset:RemoveTextures() + ChallengesFrameInsetBg:Hide() + ChallengesFrameDetails.bg:Hide() + ChallengesFrameLeaderboard:SetButtonTemplate() + select(2, ChallengesFrameDetails:GetRegions()):Hide() + select(9, ChallengesFrameDetails:GetRegions()):Hide() + select(10, ChallengesFrameDetails:GetRegions()):Hide() + select(11, ChallengesFrameDetails:GetRegions()):Hide() + ChallengesFrameDungeonButton1:SetPoint("TOPLEFT", ChallengesFrame, "TOPLEFT", 8, -83) + for u = 1, 9 do + local v = ChallengesFrame["button"..u] + v:SetButtonTemplate() + v:SetButtonTemplate() + v:SetHighlightTexture("") + v.selectedTex:SetAlpha(.2) + v.selectedTex:SetPoint("TOPLEFT", 1, -1) + v.selectedTex:SetPoint("BOTTOMRIGHT", -1, 1) + v.NoMedal:Die() + end + for u = 1, 3 do + local F = ChallengesFrame["RewardRow"..u] + for A = 1, 2 do + local v = F["Reward"..A] + v:SetPanelTemplate() + v.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_ChallengesUI",ChallengesFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/character.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/character.lua new file mode 100644 index 0000000..ea9fc7c --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/character.lua @@ -0,0 +1,382 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local CharacterSlotNames = { + "HeadSlot", + "NeckSlot", + "ShoulderSlot", + "BackSlot", + "ChestSlot", + "ShirtSlot", + "TabardSlot", + "WristSlot", + "HandsSlot", + "WaistSlot", + "LegsSlot", + "FeetSlot", + "Finger0Slot", + "Finger1Slot", + "Trinket0Slot", + "Trinket1Slot", + "MainHandSlot", + "SecondaryHandSlot" +}; + +local CharFrameList = { + "CharacterFrame", + "CharacterModelFrame", + "CharacterFrameInset", + "CharacterStatsPane", + "CharacterFrameInsetRight", + "PaperDollFrame", + "PaperDollSidebarTabs", + "PaperDollEquipmentManagerPane" +}; + +local function SetItemFrame(frame, point) + point = point or frame + local noscalemult = 2 * UIParent:GetScale() + if point.bordertop then return end + point.backdrop = frame:CreateTexture(nil, "BORDER") + point.backdrop:SetDrawLayer("BORDER", -4) + point.backdrop:SetAllPoints(point) + point.backdrop:SetTexture(SV.Media.bar.default) + point.backdrop:SetVertexColor(unpack(SV.Media.color.default)) + point.bordertop = frame:CreateTexture(nil, "BORDER") + point.bordertop:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult) + point.bordertop:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult) + point.bordertop:SetHeight(noscalemult) + point.bordertop:SetTexture(0,0,0) + point.bordertop:SetDrawLayer("BORDER", 1) + point.borderbottom = frame:CreateTexture(nil, "BORDER") + point.borderbottom:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", -noscalemult, -noscalemult) + point.borderbottom:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", noscalemult, -noscalemult) + point.borderbottom:SetHeight(noscalemult) + point.borderbottom:SetTexture(0,0,0) + point.borderbottom:SetDrawLayer("BORDER", 1) + point.borderleft = frame:CreateTexture(nil, "BORDER") + point.borderleft:SetPoint("TOPLEFT", point, "TOPLEFT", -noscalemult, noscalemult) + point.borderleft:SetPoint("BOTTOMLEFT", point, "BOTTOMLEFT", noscalemult, -noscalemult) + point.borderleft:SetWidth(noscalemult) + point.borderleft:SetTexture(0,0,0) + point.borderleft:SetDrawLayer("BORDER", 1) + point.borderright = frame:CreateTexture(nil, "BORDER") + point.borderright:SetPoint("TOPRIGHT", point, "TOPRIGHT", noscalemult, noscalemult) + point.borderright:SetPoint("BOTTOMRIGHT", point, "BOTTOMRIGHT", -noscalemult, -noscalemult) + point.borderright:SetWidth(noscalemult) + point.borderright:SetTexture(0,0,0) + point.borderright:SetDrawLayer("BORDER", 1) +end + +local function StyleCharacterSlots() + for _,slotName in pairs(CharacterSlotNames)do + local charSlot = _G["Character"..slotName] + local slotID,_,_ = GetInventorySlotInfo(slotName) + local itemID = GetInventoryItemID("player",slotID) + if itemID then + local _,_,info = GetItemInfo(itemID) + if info and info > 1 then + charSlot:SetBackdropBorderColor(GetItemQualityColor(info)) + else + charSlot:SetBackdropBorderColor(0,0,0,1) + end + else + charSlot:SetBackdropBorderColor(0,0,0,1) + end + end +end + +local function EquipmentFlyout_OnShow() + EquipmentFlyoutFrameButtons:RemoveTextures() + local counter = 1; + local button = _G["EquipmentFlyoutFrameButton"..counter] + while button do + local texture = _G["EquipmentFlyoutFrameButton"..counter.."IconTexture"] + button:SetButtonTemplate() + texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button:GetNormalTexture():SetTexture(0,0,0,0) + texture:FillInner() + button:SetFrameLevel(button:GetFrameLevel() + 2) + if not button.Panel then + button:SetPanelTemplate("Default") + button.Panel:SetAllPoints() + end + counter = counter + 1; + button = _G["EquipmentFlyoutFrameButton"..counter] + end +end + +local function PaperDoll_UpdateTabs() + for i = 1, #PAPERDOLL_SIDEBARS do + local tab = _G["PaperDollSidebarTab"..i] + if tab then + tab.Highlight:SetTexture(1, 1, 1, 0.3) + tab.Highlight:Point("TOPLEFT", 3, -4) + tab.Highlight:Point("BOTTOMRIGHT", -1, 0) + tab.Hider:SetTexture(0.4, 0.4, 0.4, 0.4) + tab.Hider:Point("TOPLEFT", 3, -4) + tab.Hider:Point("BOTTOMRIGHT", -1, 0) + tab.TabBg:Die() + if i == 1 then + for i = 1, tab:GetNumRegions()do + local texture = select(i, tab:GetRegions()) + texture:SetTexCoord(0.16, 0.86, 0.16, 0.86) + hooksecurefunc(texture, "SetTexCoord", function(f, v, w, x, y) + if v ~= 0.16001 then + f:SetTexCoord(0.16001, 0.86, 0.16, 0.86) + end + end) + end + end + tab:SetPanelTemplate("Default", true, 2) + tab.Panel:Point("TOPLEFT", 2, -3) + tab.Panel:Point("BOTTOMRIGHT", 0, -2) + end + end +end + +local function Reputation_OnShow() + for i = 1, GetNumFactions()do + local bar = _G["ReputationBar"..i.."ReputationBar"] + if bar then + bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + if not bar.Panel then + bar:SetPanelTemplate("Inset") + end + _G["ReputationBar"..i.."Background"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarHighlight1"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarHighlight2"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarAtWarHighlight1"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarAtWarHighlight2"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarLeftTexture"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarRightTexture"]:SetTexture(0,0,0,0) + end + end +end +--[[ +########################################################## +CHARACTERFRAME STYLER +########################################################## +]]-- +local function CharacterFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.character ~= true then + return + end + + STYLE:ApplyWindowStyle(CharacterFrame, true) + + STYLE:ApplyCloseButtonStyle(CharacterFrameCloseButton) + STYLE:ApplyScrollFrameStyle(CharacterStatsPaneScrollBar) + STYLE:ApplyScrollFrameStyle(ReputationListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(TokenFrameContainerScrollBar) + STYLE:ApplyScrollFrameStyle(GearManagerDialogPopupScrollFrameScrollBar) + + for _,slotName in pairs(CharacterSlotNames) do + local charSlot = _G["Character"..slotName] + local iconTex = _G["Character"..slotName.."IconTexture"] + local cd = _G["Character"..slotName.."Cooldown"] + charSlot:RemoveTextures() + charSlot:SetSlotTemplate(true) + charSlot.Panel:SetFrameLevel(charSlot.Panel:GetFrameLevel() + 1) + charSlot.ignoreTexture:SetTexture([[Interface\PaperDollInfoFrame\UI-GearManager-LeaveItem-Transparent]]) + iconTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + iconTex:FillInner(charSlot, 0, 0) + if cd then + SV.Timers:AddCooldown(cd) + end + end + + local eqSlotListener = CreateFrame("Frame") + eqSlotListener:RegisterEvent("PLAYER_EQUIPMENT_CHANGED") + eqSlotListener:SetScript("OnEvent", StyleCharacterSlots) + + CharacterFrame:HookScript("OnShow", StyleCharacterSlots) + + StyleCharacterSlots() + + CharacterFrameExpandButton:Size(CharacterFrameExpandButton:GetWidth() - 7, CharacterFrameExpandButton:GetHeight() - 7) + STYLE:ApplyPaginationStyle(CharacterFrameExpandButton) + + hooksecurefunc('CharacterFrame_Collapse', function() + CharacterFrameExpandButton:SetNormalTexture(nil) + CharacterFrameExpandButton:SetPushedTexture(nil) + CharacterFrameExpandButton:SetDisabledTexture(nil) + SquareButton_SetIcon(CharacterFrameExpandButton, 'RIGHT') + end) + + hooksecurefunc('CharacterFrame_Expand', function() + CharacterFrameExpandButton:SetNormalTexture(nil) + CharacterFrameExpandButton:SetPushedTexture(nil) + CharacterFrameExpandButton:SetDisabledTexture(nil) + SquareButton_SetIcon(CharacterFrameExpandButton, 'LEFT') + end) + + if GetCVar("characterFrameCollapsed") ~= "0" then + SquareButton_SetIcon(CharacterFrameExpandButton, 'RIGHT') + else + SquareButton_SetIcon(CharacterFrameExpandButton, 'LEFT') + end + + STYLE:ApplyCloseButtonStyle(ReputationDetailCloseButton) + STYLE:ApplyCloseButtonStyle(TokenFramePopupCloseButton) + ReputationDetailAtWarCheckBox:SetCheckboxTemplate(true) + ReputationDetailMainScreenCheckBox:SetCheckboxTemplate(true) + ReputationDetailInactiveCheckBox:SetCheckboxTemplate(true) + ReputationDetailLFGBonusReputationCheckBox:SetCheckboxTemplate(true) + TokenFramePopupInactiveCheckBox:SetCheckboxTemplate(true) + TokenFramePopupBackpackCheckBox:SetCheckboxTemplate(true) + EquipmentFlyoutFrameHighlight:Die() + EquipmentFlyoutFrame:HookScript("OnShow", EquipmentFlyout_OnShow) + hooksecurefunc("EquipmentFlyout_Show", EquipmentFlyout_OnShow) + CharacterFramePortrait:Die() + STYLE:ApplyScrollFrameStyle(_G["PaperDollTitlesPaneScrollBar"], 5) + STYLE:ApplyScrollFrameStyle(_G["PaperDollEquipmentManagerPaneScrollBar"], 5) + for _,btn in pairs(CharFrameList)do + _G[btn]:RemoveTextures(true) + end + CharacterModelFrameBackgroundTopLeft:SetTexture(0,0,0,0) + CharacterModelFrameBackgroundTopRight:SetTexture(0,0,0,0) + CharacterModelFrameBackgroundBotLeft:SetTexture(0,0,0,0) + CharacterModelFrameBackgroundBotRight:SetTexture(0,0,0,0) + + CharacterModelFrame:SetFixedPanelTemplate("ModelComic") + CharacterFrameExpandButton:SetFrameLevel(CharacterModelFrame:GetFrameLevel() + 5) + + PaperDollTitlesPane:SetBasicPanel() + + PaperDollTitlesPane:HookScript("OnShow", function(f) + for _,btn in pairs(PaperDollTitlesPane.buttons)do + btn.BgTop:SetTexture(0,0,0,0) + btn.BgBottom:SetTexture(0,0,0,0) + btn.BgMiddle:SetTexture(0,0,0,0) + btn.Check:SetTexture(0,0,0,0) + btn.text:FillInner(btn) + btn.text:SetFont(SV.Media.font.roboto,10,"NONE","LEFT") + end + end) + + PaperDollEquipmentManagerPane:SetBasicPanel() + PaperDollEquipmentManagerPaneEquipSet:SetButtonTemplate() + PaperDollEquipmentManagerPaneSaveSet:SetButtonTemplate() + PaperDollEquipmentManagerPaneEquipSet:Width(PaperDollEquipmentManagerPaneEquipSet:GetWidth()-8) + PaperDollEquipmentManagerPaneSaveSet:Width(PaperDollEquipmentManagerPaneSaveSet:GetWidth()-8) + PaperDollEquipmentManagerPaneEquipSet:Point("TOPLEFT", PaperDollEquipmentManagerPane, "TOPLEFT", 8, 0) + PaperDollEquipmentManagerPaneSaveSet:Point("LEFT", PaperDollEquipmentManagerPaneEquipSet, "RIGHT", 4, 0) + PaperDollEquipmentManagerPaneEquipSet.ButtonBackground:SetTexture(0,0,0,0) + PaperDollEquipmentManagerPane:HookScript("OnShow", function(f) + for _,btn in pairs(PaperDollEquipmentManagerPane.buttons)do + btn.BgTop:SetTexture(0,0,0,0) + btn.BgBottom:SetTexture(0,0,0,0) + btn.BgMiddle:SetTexture(0,0,0,0) + btn.icon:Size(36, 36) + btn.Check:SetTexture(0,0,0,0) + btn.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + btn.icon:SetPoint("LEFT", btn, "LEFT", 4, 0) + if not btn.icon.bordertop then + SetItemFrame(btn, btn.icon) + end + end + GearManagerDialogPopup:RemoveTextures() + GearManagerDialogPopup:SetPanelTemplate("Inset", true) + GearManagerDialogPopup:Point("LEFT", PaperDollFrame, "RIGHT", 4, 0) + GearManagerDialogPopupScrollFrame:RemoveTextures() + GearManagerDialogPopupEditBox:RemoveTextures() + + GearManagerDialogPopupEditBox:SetBasicPanel() + + GearManagerDialogPopupOkay:SetButtonTemplate() + GearManagerDialogPopupCancel:SetButtonTemplate() + + for i = 1, NUM_GEARSET_ICONS_SHOWN do + local e = _G["GearManagerDialogPopupButton"..i] + local texture = e.icon; + if e then + e:RemoveTextures() + e:SetButtonTemplate() + texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + _G["GearManagerDialogPopupButton"..i.."Icon"]:SetTexture(0,0,0,0) + texture:FillInner() + e:SetFrameLevel(e:GetFrameLevel() + 2) + if not e.Panel then + e:SetPanelTemplate("Default") + e.Panel:SetAllPoints() + end + end + end + end) + + for i = 1, 4 do + STYLE:ApplyTabStyle(_G["CharacterFrameTab"..i]) + end + + hooksecurefunc("PaperDollFrame_UpdateSidebarTabs", PaperDoll_UpdateTabs) + + for i = 1, 7 do + local category = _G["CharacterStatsPaneCategory"..i] + if(category) then + category:RemoveTextures() + category:SetButtonTemplate() + end + end + + ReputationFrame:RemoveTextures(true) + ReputationListScrollFrame:RemoveTextures() + ReputationDetailFrame:RemoveTextures() + ReputationDetailFrame:SetPanelTemplate("Inset", true) + ReputationDetailFrame:Point("TOPLEFT", ReputationFrame, "TOPRIGHT", 4, -28) + ReputationFrame:HookScript("OnShow", Reputation_OnShow) + hooksecurefunc("ExpandFactionHeader", Reputation_OnShow) + hooksecurefunc("CollapseFactionHeader", Reputation_OnShow) + TokenFrameContainer:SetBasicPanel() + + TokenFrame:HookScript("OnShow", function() + for i = 1, GetCurrencyListSize() do + local currency = _G["TokenFrameContainerButton"..i] + if(currency) then + currency.highlight:Die() + currency.categoryMiddle:Die() + currency.categoryLeft:Die() + currency.categoryRight:Die() + if currency.icon then + currency.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end + end + TokenFramePopup:RemoveTextures() + TokenFramePopup:SetPanelTemplate("Inset", true) + TokenFramePopup:Point("TOPLEFT", TokenFrame, "TOPRIGHT", 4, -28) + end) + PetModelFrame:SetPanelTemplate("Comic",false,1,-7,-7) + PetPaperDollPetInfo:GetRegions():SetTexCoord(.12, .63, .15, .55) + PetPaperDollPetInfo:SetFrameLevel(PetPaperDollPetInfo:GetFrameLevel() + 10) + PetPaperDollPetInfo:SetPanelTemplate("Slot") + PetPaperDollPetInfo.Panel:SetFrameLevel(0) + PetPaperDollPetInfo:Size(24, 24) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(CharacterFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/chat.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/chat.lua new file mode 100644 index 0000000..5f11298 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/chat.lua @@ -0,0 +1,481 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +FRAME LISTS +########################################################## +]]-- +local ChatMenuList = { + "ChatMenu", + "EmoteMenu", + "LanguageMenu", + "VoiceMacroMenu", +}; +local ChatFrameList1 = { + "ChatConfigFrame", + "ChatConfigBackgroundFrame", + "ChatConfigCategoryFrame", + "ChatConfigChatSettingsClassColorLegend", + "ChatConfigChatSettingsLeft", + "ChatConfigChannelSettingsLeft", + "ChatConfigChannelSettingsClassColorLegend", + "ChatConfigOtherSettingsCombat", + "ChatConfigOtherSettingsPVP", + "ChatConfigOtherSettingsSystem", + "ChatConfigOtherSettingsCreature", + "ChatConfigCombatSettingsFilters", + "CombatConfigMessageSourcesDoneBy", + "CombatConfigMessageSourcesDoneTo", + "CombatConfigColorsUnitColors", + "CombatConfigColorsHighlighting", + "CombatConfigColorsColorizeUnitName", + "CombatConfigColorsColorizeSpellNames", + "CombatConfigColorsColorizeDamageNumber", + "CombatConfigColorsColorizeDamageSchool", + "CombatConfigColorsColorizeEntireLine", +}; +local ChatFrameList2 = { + "ChatConfigFrameDefaultButton", + "ChatConfigFrameOkayButton", + "CombatLogDefaultButton", + "ChatConfigCombatSettingsFiltersCopyFilterButton", + "ChatConfigCombatSettingsFiltersAddFilterButton", + "ChatConfigCombatSettingsFiltersDeleteButton", + "CombatConfigSettingsSaveButton", + "ChatConfigFrameCancelButton", +}; +local ChatFrameList3 = { + "ChatConfigCategoryFrame", + "ChatConfigBackgroundFrame", + "ChatConfigChatSettingsClassColorLegend", + "ChatConfigChannelSettingsClassColorLegend", + "ChatConfigCombatSettingsFilters", + "ChatConfigCombatSettingsFiltersScrollFrame", + "CombatConfigColorsHighlighting", + "CombatConfigColorsColorizeUnitName", + "CombatConfigColorsColorizeSpellNames", + "CombatConfigColorsColorizeDamageNumber", + "CombatConfigColorsColorizeDamageSchool", + "CombatConfigColorsColorizeEntireLine", + "ChatConfigChatSettingsLeft", + "ChatConfigOtherSettingsCombat", + "ChatConfigOtherSettingsPVP", + "ChatConfigOtherSettingsSystem", + "ChatConfigOtherSettingsCreature", + "ChatConfigChannelSettingsLeft", + "CombatConfigMessageSourcesDoneBy", + "CombatConfigMessageSourcesDoneTo", + "CombatConfigColorsUnitColors", +}; +local ChatFrameList4 = { + "CombatConfigColorsColorizeSpellNames", + "CombatConfigColorsColorizeDamageNumber", + "CombatConfigColorsColorizeDamageSchool", + "CombatConfigColorsColorizeEntireLine", +}; +local ChatFrameList5 = { + "ChatConfigFrameOkayButton", + "ChatConfigFrameDefaultButton", + "CombatLogDefaultButton", + "ChatConfigCombatSettingsFiltersDeleteButton", + "ChatConfigCombatSettingsFiltersAddFilterButton", + "ChatConfigCombatSettingsFiltersCopyFilterButton", + "CombatConfigSettingsSaveButton", +}; +local ChatFrameList6 = { + "CombatConfigColorsHighlightingLine", + "CombatConfigColorsHighlightingAbility", + "CombatConfigColorsHighlightingDamage", + "CombatConfigColorsHighlightingSchool", + "CombatConfigColorsColorizeUnitNameCheck", + "CombatConfigColorsColorizeSpellNamesCheck", + "CombatConfigColorsColorizeSpellNamesSchoolColoring", + "CombatConfigColorsColorizeDamageNumberCheck", + "CombatConfigColorsColorizeDamageNumberSchoolColoring", + "CombatConfigColorsColorizeDamageSchoolCheck", + "CombatConfigColorsColorizeEntireLineCheck", + "CombatConfigFormattingShowTimeStamp", + "CombatConfigFormattingShowBraces", + "CombatConfigFormattingUnitNames", + "CombatConfigFormattingSpellNames", + "CombatConfigFormattingItemNames", + "CombatConfigFormattingFullText", + "CombatConfigSettingsShowQuickButton", + "CombatConfigSettingsSolo", + "CombatConfigSettingsParty", + "CombatConfigSettingsRaid", +}; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local ChatGeneric_OnShow = function(self) + if(not self.Panel) then + self:SetPanelTemplate("Halftone") + end +end + +local ChatMenu_OnShow = function(self) + if(not self.Panel) then + self:SetPanelTemplate("Halftone") + end + self:ClearAllPoints() + self:Point("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 30) +end + +local ChatConfigChannelSettingsLeft_OnEvent = function(self) + local checkBoxTable = self.checkBoxTable; + local checkBoxNameString = "ChatConfigChannelSettingsLeftCheckBox"; + local boxHeight = ChatConfigOtherSettingsCombatCheckBox1:GetHeight() or 20 + local colorsHeight = ChatConfigChatSettingsLeftCheckBox1Check:GetHeight() or 20 + for i = 1,#checkBoxTable do + local gName = ("ChatConfigChannelSettingsLeftCheckBox%d"):format(i) + local checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:RemoveTextures() + checkbox:SetBasicPanel() + end + checkbox:SetHeight(boxHeight) + checkbox.Panel:Point("TOPLEFT",3,-1) + checkbox.Panel:Point("BOTTOMRIGHT",-3,1) + + local check = _G[("%sCheck"):format(gName)] + if(check) then + check:SetCheckboxTemplate(true) + end + + local colors = _G[("%sColorClasses"):format(gName)] + if(colors) then + colors:SetCheckboxTemplate(true) + colors:SetHeight(colorsHeight) + end + end + end +end + +local ChatConfigBackgroundFrame_OnShow = function(self) + local gName, checkbox, check, colors + local boxHeight = ChatConfigOtherSettingsCombatCheckBox1:GetHeight() or 20 + local colorsHeight = ChatConfigChatSettingsLeftCheckBox1Check:GetHeight() or 20 + + for i = 1, #CHAT_CONFIG_CHAT_LEFT do + gName = ("ChatConfigChatSettingsLeftCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:RemoveTextures() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + checkbox:SetHeight(boxHeight) + + check = _G[("%sCheck"):format(gName)] + if(check) then + check:SetCheckboxTemplate(true) + end + + colors = _G[("%sColorClasses"):format(gName)] + if(colors) then + colors:SetCheckboxTemplate(true) + colors:SetHeight(colorsHeight) + end + end + end + for i = 1, #CHAT_CONFIG_OTHER_COMBAT do + gName = ("ChatConfigOtherSettingsCombatCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:RemoveTextures() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #CHAT_CONFIG_OTHER_PVP do + gName = ("ChatConfigOtherSettingsPVPCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:RemoveTextures() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #CHAT_CONFIG_OTHER_SYSTEM do + gName = ("ChatConfigOtherSettingsSystemCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:RemoveTextures() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #CHAT_CONFIG_CHAT_CREATURE_LEFT do + gName = ("ChatConfigOtherSettingsCreatureCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:RemoveTextures() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #COMBAT_CONFIG_MESSAGESOURCES_BY do + gName = ("CombatConfigMessageSourcesDoneByCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:RemoveTextures() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #COMBAT_CONFIG_MESSAGESOURCES_TO do + gName = ("CombatConfigMessageSourcesDoneToCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:RemoveTextures() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #COMBAT_CONFIG_UNIT_COLORS do + gName = ("CombatConfigColorsUnitColorsSwatch%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:RemoveTextures() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + end + end + for i = 1, 4 do + gName = ("CombatConfigMessageTypesLeftCheckBox%d"):format(i) + for j = 1, 4 do + local gName2 = ("%s_%d"):format(gName, j) + if(_G[gName] and _G[gName2]) then + _G[gName]:SetCheckboxTemplate(true) + _G[gName2]:SetCheckboxTemplate(true) + end + end + + gName = ("CombatConfigMessageTypesRightCheckBox%d"):format(i) + for j = 1, 10 do + local gName2 = ("%s_%d"):format(gName, j) + if(_G[gName] and _G[gName2]) then + _G[gName]:SetCheckboxTemplate(true) + _G[gName2]:SetCheckboxTemplate(true) + end + end + + gName = ("CombatConfigMessageTypesMiscCheckBox%d"):format(i) + if(_G[gName]) then + _G[gName]:SetCheckboxTemplate(true) + end + end +end +--[[ +########################################################## +CHAT STYLER +########################################################## +]]-- +local function ChatStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.chat ~= true then + return + end + + for i = 1, #ChatMenuList do + local name = ChatMenuList[i] + local this = _G[name] + if(this) then + if(name == "ChatMenu") then + this:HookScript("OnShow", ChatMenu_OnShow) + else + this:HookScript("OnShow", ChatGeneric_OnShow) + end + end + end + + for i = 1, #ChatFrameList1 do + local name = ChatFrameList1[i] + local this = _G[name] + if(this) then + this:RemoveTextures() + end + end + + for i = 1, #ChatFrameList2 do + local name = ChatFrameList2[i] + local this = _G[name] + if(this) then + this:SetButtonTemplate() + end + end + + ChatConfigFrameOkayButton:Point("RIGHT", ChatConfigFrameCancelButton, "RIGHT", -11, -1) + ChatConfigCombatSettingsFiltersDeleteButton:Point("TOPRIGHT", ChatConfigCombatSettingsFilters, "BOTTOMRIGHT", 0, -1) + ChatConfigCombatSettingsFiltersAddFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -1, 0) + ChatConfigCombatSettingsFiltersCopyFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersAddFilterButton, "LEFT", -1, 0) + + if(_G["CombatConfigTab1"]) then _G["CombatConfigTab1"]:RemoveTextures() end + if(_G["CombatConfigTab2"]) then _G["CombatConfigTab2"]:RemoveTextures() end + if(_G["CombatConfigTab3"]) then _G["CombatConfigTab3"]:RemoveTextures() end + if(_G["CombatConfigTab4"]) then _G["CombatConfigTab4"]:RemoveTextures() end + if(_G["CombatConfigTab5"]) then _G["CombatConfigTab5"]:RemoveTextures() end + + CombatConfigSettingsNameEditBox:SetEditboxTemplate() + ChatConfigFrame:SetPanelTemplate("Halftone", true) + + for i = 1, #ChatFrameList3 do + local frame = _G[ChatFrameList3[i]] + if(frame) then + frame:RemoveTextures() + frame:SetBasicPanel() + end + end + + for i = 1, #ChatFrameList4 do + local this = _G[ChatFrameList4[i]] + if(this) then + this:ClearAllPoints() + if this == CombatConfigColorsColorizeSpellNames then + this:Point("TOP",CombatConfigColorsColorizeUnitName,"BOTTOM",0,-2) + else + this:Point("TOP",_G[ChatFrameList4[i-1]],"BOTTOM",0,-2) + end + end + end + + ChatConfigChannelSettingsLeft:HookScript("OnShow", ChatConfigChannelSettingsLeft_OnEvent) + + CreateChatChannelList(ChatConfigChannelSettings, GetChannelList()) + ChatConfig_CreateCheckboxes(ChatConfigChannelSettingsLeft, CHAT_CONFIG_CHANNEL_LIST, "ChatConfigCheckBoxWithSwatchAndClassColorTemplate", CHANNELS) + ChatConfig_UpdateCheckboxes(ChatConfigChannelSettingsLeft) + + ChatConfigBackgroundFrame:SetScript("OnShow", ChatConfigBackgroundFrame_OnShow) + + for i = 1, #COMBAT_CONFIG_TABS do + local this = _G["CombatConfigTab"..i] + if(this) then + STYLE:ApplyTabStyle(this) + this:SetHeight(this:GetHeight()-2) + this:SetWidth(ceil(this:GetWidth()+1.6)) + _G["CombatConfigTab"..i.."Text"]:SetPoint("BOTTOM", 0, 10) + end + end + + CombatConfigTab1:ClearAllPoints() + CombatConfigTab1:SetPoint("BOTTOMLEFT", ChatConfigBackgroundFrame, "TOPLEFT", 6, -2) + + for i = 1, #ChatFrameList5 do + local this = _G[ChatFrameList5[i]] + if(this) then + this:SetButtonTemplate() + end + end + + ChatConfigFrameOkayButton:SetPoint("TOPRIGHT", ChatConfigBackgroundFrame, "BOTTOMRIGHT", -3, -5) + ChatConfigFrameDefaultButton:SetPoint("TOPLEFT", ChatConfigCategoryFrame, "BOTTOMLEFT", 1, -5) + CombatLogDefaultButton:SetPoint("TOPLEFT", ChatConfigCategoryFrame, "BOTTOMLEFT", 1, -5) + ChatConfigCombatSettingsFiltersDeleteButton:SetPoint("TOPRIGHT", ChatConfigCombatSettingsFilters, "BOTTOMRIGHT", -3, -1) + ChatConfigCombatSettingsFiltersCopyFilterButton:SetPoint("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -2, 0) + ChatConfigCombatSettingsFiltersAddFilterButton:SetPoint("RIGHT", ChatConfigCombatSettingsFiltersCopyFilterButton, "LEFT", -2, 0) + + for i = 1, #ChatFrameList6 do + local this = _G[ChatFrameList6[i]] + if(this) then + this:SetCheckboxTemplate(true) + end + end + + STYLE:ApplyPaginationStyle(ChatConfigMoveFilterUpButton,true) + STYLE:ApplyPaginationStyle(ChatConfigMoveFilterDownButton,true) + + ChatConfigMoveFilterUpButton:ClearAllPoints() + ChatConfigMoveFilterDownButton:ClearAllPoints() + ChatConfigMoveFilterUpButton:SetPoint("TOPLEFT",ChatConfigCombatSettingsFilters,"BOTTOMLEFT",3,0) + ChatConfigMoveFilterDownButton:SetPoint("LEFT",ChatConfigMoveFilterUpButton,24,0) + + CombatConfigSettingsNameEditBox:SetEditboxTemplate() + + ChatConfigFrame:Size(680,596) + ChatConfigFrameHeader:ClearAllPoints() + ChatConfigFrameHeader:SetPoint("TOP", ChatConfigFrame, "TOP", 0, -5) + + -- for i=1, select("#", GetChatWindowChannels(3)) do + -- local info = select(i, GetChatWindowChannels(3)) + -- print(info) + -- end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(ChatStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/dressup.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/dressup.lua new file mode 100644 index 0000000..0f6f3b5 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/dressup.lua @@ -0,0 +1,51 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +DRESSUP STYLER +########################################################## +]]-- +local function DressUpStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.dressingroom ~= true then + return + end + + STYLE:ApplyWindowStyle(DressUpFrame, true, true) + + DressUpModel:ClearAllPoints() + DressUpModel:SetPoint("TOPLEFT", DressUpFrame, "TOPLEFT", 12, -76) + DressUpModel:SetPoint("BOTTOMRIGHT", DressUpFrame, "BOTTOMRIGHT", -12, 36) + + DressUpModel:SetFixedPanelTemplate("ModelComic") + + DressUpFrameCancelButton:Point("BOTTOMRIGHT", DressUpFrame, "BOTTOMRIGHT", -12, 12) + DressUpFrameCancelButton:SetButtonTemplate() + + DressUpFrameResetButton:Point("RIGHT", DressUpFrameCancelButton, "LEFT", -12, 0) + DressUpFrameResetButton:SetButtonTemplate() + + STYLE:ApplyCloseButtonStyle(DressUpFrameCloseButton, DressUpFrame.Panel) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(DressUpStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/encounterjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/encounterjournal.lua new file mode 100644 index 0000000..3920bb7 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/encounterjournal.lua @@ -0,0 +1,229 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +ENCOUNTERJOURNAL STYLER +########################################################## +]]-- +local PVP_LOST = [[Interface\WorldMap\Skull_64Red]] + +local function Tab_OnEnter(this) + this.backdrop:SetPanelColor("highlight") + this.backdrop:SetBackdropBorderColor(0.1, 0.8, 0.8) +end + +local function Tab_OnLeave(this) + this.backdrop:SetPanelColor("dark") + this.backdrop:SetBackdropBorderColor(0,0,0,1) +end + +local function ChangeTabHelper(this, xOffset, yOffset) + this:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) + this:GetNormalTexture():FillInner() + this.backdrop = CreateFrame("Frame", nil, this) + this.backdrop:FillInner(this) + + local level = this:GetFrameLevel() + if(level > 0) then + this.backdrop:SetFrameLevel(level - 1) + else + this.backdrop:SetFrameLevel(0) + end + + this.backdrop:SetPanelTemplate("Component", true) + this.backdrop:SetPanelColor("dark") + this:HookScript("OnEnter",Tab_OnEnter) + this:HookScript("OnLeave",Tab_OnLeave) + + local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = this:GetPoint() + this:Point(initialAnchor, anchorParent, relativeAnchor, xOffset or 7, yOffset or yPosition) +end + +local function Outline(frame, noHighlight) + if(frame.Outlined) then return; end + local offset = noHighlight and 30 or 5 + local mod = noHighlight and 50 or 5 + + local panel = CreateFrame('Frame', nil, frame) + panel:Point('TOPLEFT', frame, 'TOPLEFT', 1, -1) + panel:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', -1, 1) + + --[[ UNDERLAY BORDER ]]-- + local borderLeft = panel:CreateTexture(nil, "BORDER") + borderLeft:SetTexture(0, 0, 0) + borderLeft:SetPoint("TOPLEFT") + borderLeft:SetPoint("BOTTOMLEFT") + borderLeft:SetWidth(offset) + + local borderRight = panel:CreateTexture(nil, "BORDER") + borderRight:SetTexture(0, 0, 0) + borderRight:SetPoint("TOPRIGHT") + borderRight:SetPoint("BOTTOMRIGHT") + borderRight:SetWidth(offset) + + local borderTop = panel:CreateTexture(nil, "BORDER") + borderTop:SetTexture(0, 0, 0) + borderTop:SetPoint("TOPLEFT") + borderTop:SetPoint("TOPRIGHT") + borderTop:SetHeight(mod) + + local borderBottom = panel:CreateTexture(nil, "BORDER") + borderBottom:SetTexture(0, 0, 0) + borderBottom:SetPoint("BOTTOMLEFT") + borderBottom:SetPoint("BOTTOMRIGHT") + borderBottom:SetHeight(mod) + + if(not noHighlight) then + local highlight = frame:CreateTexture(nil, "HIGHLIGHT") + highlight:SetTexture(0, 1, 1, 0.35) + highlight:SetAllPoints(panel) + end + + frame.Outlined = true +end + +local function EncounterJournalStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.encounterjournal ~= true then + return + end + + EncounterJournal:RemoveTextures(true) + EncounterJournalInstanceSelect:RemoveTextures(true) + EncounterJournalNavBar:RemoveTextures(true) + EncounterJournalNavBarOverlay:RemoveTextures(true) + EncounterJournalNavBarHomeButton:RemoveTextures(true) + EncounterJournalInset:RemoveTextures(true) + + EncounterJournalEncounterFrame:RemoveTextures(true) + EncounterJournalEncounterFrameInfo:RemoveTextures(true) + EncounterJournalEncounterFrameInfoDifficulty:RemoveTextures(true) + EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:RemoveTextures(true) + EncounterJournalEncounterFrameInfoBossesScrollFrame:RemoveTextures(true) + EncounterJournalInstanceSelectDungeonTab:RemoveTextures(true) + EncounterJournalInstanceSelectRaidTab:RemoveTextures(true) + ChangeTabHelper(EncounterJournalEncounterFrameInfoBossTab) + ChangeTabHelper(EncounterJournalEncounterFrameInfoLootTab, 0, -10) + + EncounterJournalSearchResults:RemoveTextures(true) + + EncounterJournal:SetPanelTemplate("Action") + EncounterJournal:SetPanelColor("dark") + EncounterJournalInset:SetFixedPanelTemplate("Inset") + + EncounterJournalInstanceSelectScrollFrameScrollChild:SetFixedPanelTemplate("Default") + EncounterJournalInstanceSelectScrollFrameScrollChild:SetPanelColor("dark") + + EncounterJournalEncounterFrameInstanceFrame:SetFixedPanelTemplate("Inset") + + local comicHolder = CreateFrame('Frame', nil, EncounterJournal.encounter) + comicHolder:SetPoint("TOPLEFT", EncounterJournalEncounterFrameInfoBossesScrollFrame, "TOPLEFT", -20, 40) + comicHolder:SetPoint("BOTTOMRIGHT", EncounterJournalEncounterFrameInfoBossesScrollFrame, "BOTTOMRIGHT", 0, 0) + comicHolder:SetPanelTemplate("Comic") + comicHolder:SetPanelColor("dark") + EncounterJournal.encounter.info.encounterTitle:SetParent(comicHolder) + EncounterJournal.searchResults.TitleText:SetParent(comicHolder) + + EncounterJournalNavBarHomeButton:SetButtonTemplate() + EncounterJournalEncounterFrameInfoDifficulty:SetButtonTemplate() + EncounterJournalEncounterFrameInfoDifficulty:SetFrameLevel(EncounterJournalEncounterFrameInfoDifficulty:GetFrameLevel() + 10) + EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:SetButtonTemplate() + EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:SetFrameLevel(EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:GetFrameLevel() + 10) + + EncounterJournalInstanceSelectDungeonTab:SetButtonTemplate() + EncounterJournalInstanceSelectRaidTab:SetButtonTemplate() + + STYLE:ApplyScrollBarStyle(EncounterJournalEncounterFrameInfoLootScrollBar) + + local bgParent = EncounterJournal.encounter.instance + local loreParent = EncounterJournal.encounter.instance.loreScroll + + bgParent.loreBG:SetPoint("TOPLEFT", bgParent, "TOPLEFT", 0, 0) + bgParent.loreBG:SetPoint("BOTTOMRIGHT", bgParent, "BOTTOMRIGHT", 0, 90) + + loreParent:SetPanelTemplate("Pattern", true, 1, 1, 5) + loreParent:SetPanelColor("dark") + loreParent.child.lore:SetTextColor(1, 1, 1) + EncounterJournal.encounter.infoFrame.description:SetTextColor(1, 1, 1) + + loreParent:SetFrameLevel(loreParent:GetFrameLevel() + 10) + + local frame = EncounterJournal.instanceSelect.scroll.child + local index = 1 + local instanceButton = frame["instance"..index]; + while instanceButton do + Outline(instanceButton) + index = index + 1; + instanceButton = frame["instance"..index] + end + + hooksecurefunc("EncounterJournal_ListInstances", function() + local frame = EncounterJournal.instanceSelect.scroll.child + local index = 1 + local instanceButton = frame["instance"..index]; + while instanceButton do + Outline(instanceButton) + index = index + 1; + instanceButton = frame["instance"..index] + end + end) + + EncounterJournal.instanceSelect.raidsTab:GetFontString():SetTextColor(1, 1, 1); + hooksecurefunc("EncounterJournal_ToggleHeaders", function() + local usedHeaders = EncounterJournal.encounter.usedHeaders + for key,used in pairs(usedHeaders) do + if(not used.button.Panel) then + used:RemoveTextures(true) + used.button:RemoveTextures(true) + used.button:SetButtonTemplate() + end + used.description:SetTextColor(1, 1, 1) + used.button.portrait.icon:Hide() + end + end) + + hooksecurefunc("EncounterJournal_LootUpdate", function() + local scrollFrame = EncounterJournal.encounter.info.lootScroll; + local offset = HybridScrollFrame_GetOffset(scrollFrame); + local items = scrollFrame.buttons; + local item, index; + + local numLoot = EJ_GetNumLoot() + + for i = 1,#items do + item = items[i]; + index = offset + i; + if index <= numLoot then + item.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + if(not item.Panel) then + item:SetFixedPanelTemplate("Slot") + end + item.slot:SetTextColor(0.5, 1, 0) + item.armorType:SetTextColor(1, 1, 0) + item.boss:SetTextColor(0.7, 0.08, 0) + end + end + end) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle('Blizzard_EncounterJournal', EncounterJournalStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/friends.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/friends.lua new file mode 100644 index 0000000..5c8c50f --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/friends.lua @@ -0,0 +1,283 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local FrameSuffix = { + "LeftDisabled", + "MiddleDisabled", + "RightDisabled", + "Left", + "Middle", + "Right" +}; +local FriendsFrameList1 = { + "ScrollOfResurrectionSelectionFrame", + "ScrollOfResurrectionSelectionFrameList", + "FriendsListFrame", + "FriendsTabHeader", + "FriendsFrameFriendsScrollFrame", + "WhoFrameColumnHeader1", + "WhoFrameColumnHeader2", + "WhoFrameColumnHeader3", + "WhoFrameColumnHeader4", + "ChannelListScrollFrame", + "ChannelRoster", + "FriendsFramePendingButton1", + "FriendsFramePendingButton2", + "FriendsFramePendingButton3", + "FriendsFramePendingButton4", + "ChannelFrameDaughterFrame", + "AddFriendFrame", + "AddFriendNoteFrame" +}; +-- local FriendsFrameList2 = { +-- "FriendsFrameBroadcastInputLeft", +-- "FriendsFrameBroadcastInputRight", +-- "FriendsFrameBroadcastInputMiddle", +-- "ChannelFrameDaughterFrameChannelNameLeft", +-- "ChannelFrameDaughterFrameChannelNameRight", +-- "ChannelFrameDaughterFrameChannelNameMiddle", +-- "ChannelFrameDaughterFrameChannelPasswordLeft", +-- "ChannelFrameDaughterFrameChannelPasswordRight", +-- "ChannelFrameDaughterFrameChannelPasswordMiddle" +-- }; +local FriendsFrameButtons = { + "FriendsFrameAddFriendButton", + "FriendsFrameSendMessageButton", + "WhoFrameWhoButton", + "WhoFrameAddFriendButton", + "WhoFrameGroupInviteButton", + "ChannelFrameNewButton", + "FriendsFrameIgnorePlayerButton", + "FriendsFrameUnsquelchButton", + "FriendsFramePendingButton1AcceptButton", + "FriendsFramePendingButton1DeclineButton", + "FriendsFramePendingButton2AcceptButton", + "FriendsFramePendingButton2DeclineButton", + "FriendsFramePendingButton3AcceptButton", + "FriendsFramePendingButton3DeclineButton", + "FriendsFramePendingButton4AcceptButton", + "FriendsFramePendingButton4DeclineButton", + "ChannelFrameDaughterFrameOkayButton", + "ChannelFrameDaughterFrameCancelButton", + "AddFriendEntryFrameAcceptButton", + "AddFriendEntryFrameCancelButton", + "AddFriendInfoFrameContinueButton", + "ScrollOfResurrectionSelectionFrameAcceptButton", + "ScrollOfResurrectionSelectionFrameCancelButton" +}; + +local function TabCustomHelper(this) + if not this then return end + for _,prop in pairs(FrameSuffix) do + local frame = _G[this:GetName()..prop] + frame:SetTexture(0,0,0,0) + end + this:GetHighlightTexture():SetTexture(0,0,0,0) + this.backdrop = CreateFrame("Frame", nil, this) + this.backdrop:SetFixedPanelTemplate("Default") + this.backdrop:SetFrameLevel(this:GetFrameLevel()-1) + this.backdrop:Point("TOPLEFT", 3, -8) + this.backdrop:Point("BOTTOMRIGHT", -6, 0) +end + +local function ChannelList_OnUpdate() + for i = 1, MAX_DISPLAY_CHANNEL_BUTTONS do + local btn = _G["ChannelButton"..i] + if btn then + btn:RemoveTextures() + btn:SetHighlightTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight") + _G["ChannelButton"..i.."Text"]:SetFontTemplate(nil, 12) + end + end +end +--[[ +########################################################## +FRIENDSFRAME STYLER +########################################################## +]]--FriendsFrameBattlenetFrameScrollFrame +local function FriendsFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.friends ~= true then + return + end + + STYLE:ApplyWindowStyle(FriendsFrame) + + STYLE:ApplyScrollFrameStyle(FriendsFrameFriendsScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(WhoListScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(ChannelRosterScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(FriendsFriendsScrollFrameScrollBar) + FriendsFrameInset:RemoveTextures() + WhoFrameListInset:RemoveTextures() + WhoFrameEditBoxInset:RemoveTextures() + STYLE:ApplyEditBoxStyle(WhoFrameEditBoxInset) + ChannelFrameRightInset:RemoveTextures() + ChannelFrameLeftInset:RemoveTextures() + ChannelFrameRightInset:SetFixedPanelTemplate("Inset", true) + ChannelFrameLeftInset:SetFixedPanelTemplate("Inset", true) + LFRQueueFrameListInset:RemoveTextures() + LFRQueueFrameRoleInset:RemoveTextures() + LFRQueueFrameCommentInset:RemoveTextures() + LFRQueueFrameListInset:SetFixedPanelTemplate("Inset", true) + FriendsFrameFriendsScrollFrame:SetBasicPanel() + FriendsFrameFriendsScrollFrame.Panel:Point("TOPRIGHT", -4, 0) + WhoFrameListInset:SetBasicPanel() + + for c, e in pairs(FriendsFrameButtons)do + _G[e]:SetButtonTemplate() + end + + -- for c, texture in pairs(FriendsFrameList2)do + -- _G[texture]:Die() + -- end + + for c, V in pairs(FriendsFrameList1)do + _G[V]:RemoveTextures() + end + + for u = 1, FriendsFrame:GetNumRegions()do + local a1 = select(u, FriendsFrame:GetRegions()) + if a1:GetObjectType() == "Texture"then + a1:SetTexture(0,0,0,0) + a1:SetAlpha(0) + end + end + + FriendsFrameStatusDropDown:SetPoint('TOPLEFT', FriendsTabHeader, 'TOPLEFT', 0, -27) + STYLE:ApplyDropdownStyle(FriendsFrameStatusDropDown, 70) + FriendsFrameBattlenetFrame:RemoveTextures() + FriendsFrameBattlenetFrame:SetHeight(22) + FriendsFrameBattlenetFrame:SetPoint('TOPLEFT', FriendsFrameStatusDropDown, 'TOPRIGHT', 0, -1) + FriendsFrameBattlenetFrame:SetFixedPanelTemplate("Inset") + FriendsFrameBattlenetFrame:SetBackdropColor(0,0,0,0.8) + + -- FriendsFrameBattlenetFrame.BroadcastButton:GetNormalTexture():SetTexCoord(.28, .72, .28, .72) + -- FriendsFrameBattlenetFrame.BroadcastButton:GetPushedTexture():SetTexCoord(.28, .72, .28, .72) + -- FriendsFrameBattlenetFrame.BroadcastButton:GetHighlightTexture():SetTexCoord(.28, .72, .28, .72) + FriendsFrameBattlenetFrame.BroadcastButton:RemoveTextures() + FriendsFrameBattlenetFrame.BroadcastButton:SetSize(22,22) + FriendsFrameBattlenetFrame.BroadcastButton:SetPoint('TOPLEFT', FriendsFrameBattlenetFrame, 'TOPRIGHT', 8, 0) + FriendsFrameBattlenetFrame.BroadcastButton:SetButtonTemplate() + FriendsFrameBattlenetFrame.BroadcastButton:SetBackdropColor(0.4,0.4,0.4) + FriendsFrameBattlenetFrame.BroadcastButton:SetNormalTexture([[Interface\FriendsFrame\UI-Toast-BroadcastIcon]]) + FriendsFrameBattlenetFrame.BroadcastButton:SetPushedTexture([[Interface\FriendsFrame\UI-Toast-BroadcastIcon]]) + FriendsFrameBattlenetFrame.BroadcastButton:SetScript('OnClick', function() + SV:StaticPopup_Show("SET_BN_BROADCAST") + end) + FriendsFrameBattlenetFrame.Tag:SetFontTemplate(SV.Media.font.narrator,16,"NONE") + AddFriendNameEditBox:SetEditboxTemplate() + AddFriendFrame:SetFixedPanelTemplate("Transparent", true) + ScrollOfResurrectionSelectionFrame:SetFixedPanelTemplate('Transparent') + ScrollOfResurrectionSelectionFrameList:SetFixedPanelTemplate('Default') + STYLE:ApplyScrollFrameStyle(ScrollOfResurrectionSelectionFrameListScrollFrameScrollBar, 4) + ScrollOfResurrectionSelectionFrameTargetEditBox:SetEditboxTemplate() + FriendsFrameBroadcastInput:SetPanelTemplate("Default") + ChannelFrameDaughterFrameChannelName:SetPanelTemplate("Default") + ChannelFrameDaughterFrameChannelPassword:SetPanelTemplate("Default") + + ChannelFrame:HookScript("OnShow", function() + ChannelRosterScrollFrame:RemoveTextures() + end) + + hooksecurefunc("FriendsFrame_OnEvent", function() + ChannelRosterScrollFrame:RemoveTextures() + end) + + WhoFrame:HookScript("OnShow", function() + ChannelRosterScrollFrame:RemoveTextures() + end) + + hooksecurefunc("FriendsFrame_OnEvent", function() + WhoListScrollFrame:RemoveTextures() + end) + + ChannelFrameDaughterFrame:SetBasicPanel() + STYLE:ApplyCloseButtonStyle(ChannelFrameDaughterFrameDetailCloseButton, ChannelFrameDaughterFrame) + STYLE:ApplyCloseButtonStyle(FriendsFrameCloseButton, FriendsFrame.Panel) + STYLE:ApplyDropdownStyle(WhoFrameDropDown, 150) + + for i = 1, 4 do + STYLE:ApplyTabStyle(_G["FriendsFrameTab"..i]) + end + + for i = 1, 3 do + TabCustomHelper(_G["FriendsTabHeaderTab"..i]) + end + + hooksecurefunc("ChannelList_Update", ChannelList_OnUpdate) + FriendsFriendsFrame:SetBasicPanel() + + _G["FriendsFriendsFrame"]:RemoveTextures() + _G["FriendsFriendsList"]:RemoveTextures() + _G["FriendsFriendsNoteFrame"]:RemoveTextures() + + _G["FriendsFriendsSendRequestButton"]:SetButtonTemplate() + _G["FriendsFriendsCloseButton"]:SetButtonTemplate() + + FriendsFriendsList:SetEditboxTemplate() + FriendsFriendsNoteFrame:SetEditboxTemplate() + STYLE:ApplyDropdownStyle(FriendsFriendsFrameDropDown, 150) + BNConversationInviteDialog:RemoveTextures() + BNConversationInviteDialog:SetPanelTemplate('Transparent') + BNConversationInviteDialogList:RemoveTextures() + BNConversationInviteDialogList:SetFixedPanelTemplate('Default') + BNConversationInviteDialogInviteButton:SetButtonTemplate() + BNConversationInviteDialogCancelButton:SetButtonTemplate() + for i = 1, BN_CONVERSATION_INVITE_NUM_DISPLAYED do + _G["BNConversationInviteDialogListFriend"..i].checkButton:SetCheckboxTemplate(true) + end + FriendsTabHeaderSoRButton:SetFixedPanelTemplate('Default') + FriendsTabHeaderSoRButton:SetButtonTemplate() + FriendsTabHeaderSoRButtonIcon:SetDrawLayer('OVERLAY') + FriendsTabHeaderSoRButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + FriendsTabHeaderSoRButtonIcon:FillInner() + FriendsTabHeaderSoRButton:Point('TOPRIGHT', FriendsTabHeader, 'TOPRIGHT', -8, -56) + FriendsTabHeaderRecruitAFriendButton:SetFixedPanelTemplate('Default') + FriendsTabHeaderRecruitAFriendButton:SetButtonTemplate() + FriendsTabHeaderRecruitAFriendButtonIcon:SetDrawLayer('OVERLAY') + FriendsTabHeaderRecruitAFriendButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + FriendsTabHeaderRecruitAFriendButtonIcon:FillInner() + + FriendsFrameIgnoreScrollFrame:SetFixedPanelTemplate("Inset") + STYLE:ApplyScrollFrameStyle(FriendsFrameIgnoreScrollFrameScrollBar, 4) + FriendsFramePendingScrollFrame:SetFixedPanelTemplate("Inset") + STYLE:ApplyScrollFrameStyle(FriendsFramePendingScrollFrameScrollBar, 4) + IgnoreListFrame:RemoveTextures() + PendingListFrame:RemoveTextures() + ScrollOfResurrectionFrame:RemoveTextures() + ScrollOfResurrectionFrameAcceptButton:SetButtonTemplate() + ScrollOfResurrectionFrameCancelButton:SetButtonTemplate() + ScrollOfResurrectionFrameTargetEditBoxLeft:SetTexture(0,0,0,0) + ScrollOfResurrectionFrameTargetEditBoxMiddle:SetTexture(0,0,0,0) + ScrollOfResurrectionFrameTargetEditBoxRight:SetTexture(0,0,0,0) + ScrollOfResurrectionFrameNoteFrame:RemoveTextures() + ScrollOfResurrectionFrameNoteFrame:SetFixedPanelTemplate() + ScrollOfResurrectionFrameTargetEditBox:SetFixedPanelTemplate() + ScrollOfResurrectionFrame:SetFixedPanelTemplate('Transparent') +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(FriendsFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/gossip.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/gossip.lua new file mode 100644 index 0000000..d45542a --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/gossip.lua @@ -0,0 +1,67 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +GOSSIP STYLER +########################################################## +]]-- +local function GossipStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.gossip ~= true then return end + ItemTextFrame:RemoveTextures(true) + ItemTextScrollFrame:RemoveTextures() + STYLE:ApplyCloseButtonStyle(GossipFrameCloseButton) + STYLE:ApplyPaginationStyle(ItemTextPrevPageButton) + STYLE:ApplyPaginationStyle(ItemTextNextPageButton) + ItemTextPageText:SetTextColor(1, 1, 1) + hooksecurefunc(ItemTextPageText, "SetTextColor", function(q, k, l, m) + if k ~= 1 or l ~= 1 or m ~= 1 then + ItemTextPageText:SetTextColor(1, 1, 1) + end + end) + ItemTextFrame:SetPanelTemplate("Pattern") + ItemTextFrameInset:Die() + STYLE:ApplyScrollFrameStyle(ItemTextScrollFrameScrollBar) + STYLE:ApplyCloseButtonStyle(ItemTextFrameCloseButton) + local r = {"GossipFrameGreetingPanel", "GossipFrame", "GossipFrameInset", "GossipGreetingScrollFrame"} + STYLE:ApplyScrollFrameStyle(GossipGreetingScrollFrameScrollBar, 5) + for s, t in pairs(r)do + _G[t]:RemoveTextures() + end + GossipFrame:SetPanelTemplate("Halftone") + GossipGreetingScrollFrame:SetFixedPanelTemplate("Inset", true) + GossipGreetingScrollFrame.spellTex = GossipGreetingScrollFrame:CreateTexture(nil, "ARTWORK") + GossipGreetingScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) + GossipGreetingScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2) + GossipGreetingScrollFrame.spellTex:Size(506, 615) + GossipGreetingScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) + _G["GossipFramePortrait"]:Die() + _G["GossipFrameGreetingGoodbyeButton"]:RemoveTextures() + _G["GossipFrameGreetingGoodbyeButton"]:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(GossipFrameCloseButton, GossipFrame.Panel) + NPCFriendshipStatusBar:RemoveTextures() + NPCFriendshipStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + NPCFriendshipStatusBar:SetPanelTemplate("Default") +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(GossipStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/guild.lua new file mode 100644 index 0000000..6d1c9c0 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/guild.lua @@ -0,0 +1,699 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local format = string.format; +local internalTest = false; + +local GuildFrameList = { + "GuildNewPerksFrame", + "GuildFrameInset", + "GuildFrameBottomInset", + "GuildAllPerksFrame", + "GuildMemberDetailFrame", + "GuildMemberNoteBackground", + "GuildInfoFrameInfo", + "GuildLogContainer", + "GuildLogFrame", + "GuildRewardsFrame", + "GuildMemberOfficerNoteBackground", + "GuildTextEditContainer", + "GuildTextEditFrame", + "GuildRecruitmentRolesFrame", + "GuildRecruitmentAvailabilityFrame", + "GuildRecruitmentInterestFrame", + "GuildRecruitmentLevelFrame", + "GuildRecruitmentCommentFrame", + "GuildRecruitmentCommentInputFrame", + "GuildInfoFrameApplicantsContainer", + "GuildInfoFrameApplicants", + "GuildNewsBossModel", + "GuildNewsBossModelTextFrame" +}; + +local GuildButtonList = { + "GuildPerksToggleButton", + "GuildMemberRemoveButton", + "GuildMemberGroupInviteButton", + "GuildAddMemberButton", + "GuildViewLogButton", + "GuildControlButton", + "GuildRecruitmentListGuildButton", + "GuildTextEditFrameAcceptButton", + "GuildRecruitmentInviteButton", + "GuildRecruitmentMessageButton", + "GuildRecruitmentDeclineButton" +}; + +local GuildCheckBoxList = { + "GuildRecruitmentQuestButton", + "GuildRecruitmentDungeonButton", + "GuildRecruitmentRaidButton", + "GuildRecruitmentPvPButton", + "GuildRecruitmentRPButton", + "GuildRecruitmentWeekdaysButton", + "GuildRecruitmentWeekendsButton", + "GuildRecruitmentLevelAnyButton", + "GuildRecruitmentLevelMaxButton" +}; + +local CalendarIconList = { + [CALENDAR_EVENTTYPE_PVP] = "Interface\\Calendar\\UI-Calendar-Event-PVP", + [CALENDAR_EVENTTYPE_MEETING] = "Interface\\Calendar\\MeetingIcon", + [CALENDAR_EVENTTYPE_OTHER] = "Interface\\Calendar\\UI-Calendar-Event-Other" +}; + +local LFGFrameList = { + "LookingForGuildPvPButton", + "LookingForGuildWeekendsButton", + "LookingForGuildWeekdaysButton", + "LookingForGuildRPButton", + "LookingForGuildRaidButton", + "LookingForGuildQuestButton", + "LookingForGuildDungeonButton" +}; + +local function GCTabHelper(tab) + tab.Panel:Hide() + tab.bg1 = tab:CreateTexture(nil,"BACKGROUND") + tab.bg1:SetDrawLayer("BACKGROUND",4) + tab.bg1:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + tab.bg1:SetVertexColor(unpack(SV.Media.color.default)) + tab.bg1:FillInner(tab.Panel,1) + tab.bg3 = tab:CreateTexture(nil,"BACKGROUND") + tab.bg3:SetDrawLayer("BACKGROUND",2) + tab.bg3:SetTexture(0,0,0,1) + tab.bg3:SetAllPoints(tab.Panel) +end + +local RankOrder_OnUpdate = function() + for b=1,GuildControlGetNumRanks()do + local frame = _G["GuildControlUIRankOrderFrameRank"..b] + if frame then + frame.downButton:SetButtonTemplate() + frame.upButton:SetButtonTemplate() + frame.deleteButton:SetButtonTemplate() + if not frame.nameBox.Panel then + frame.nameBox:SetEditboxTemplate() + end + frame.nameBox.Panel:Point("TOPLEFT",-2,-4) + frame.nameBox.Panel:Point("BOTTOMRIGHT",-4,4) + end + end +end + +function GuildInfoEvents_SetButton(button, eventIndex) + local dateData = date("*t") + local month, day, weekday, hour, minute, eventType, title, calendarType, textureName = CalendarGetGuildEventInfo(eventIndex) + local formattedTime = GameTime_GetFormattedTime(hour, minute, true) + local unformattedText; + if dateData["day"] == day and dateData["month"] == month then + unformattedText = NORMAL_FONT_COLOR_CODE..GUILD_EVENT_TODAY..FONT_COLOR_CODE_CLOSE + else + local year = dateData["year"] + if month < dateData["month"] then + year = year + 1 + end + local newTime = time{year = year, month = month, day = day} + if(((newTime - time()) < 518400) and CALENDAR_WEEKDAY_NAMES[weekday]) then + unformattedText = CALENDAR_WEEKDAY_NAMES[weekday] + elseif CALENDAR_WEEKDAY_NAMES[weekday]and day and month then + unformattedText = format(GUILD_NEWS_DATE, CALENDAR_WEEKDAY_NAMES[weekday], day, month) + end + end + if button.text and unformattedText then + button.text:SetFormattedText(GUILD_EVENT_FORMAT, unformattedText, formattedTime, title) + end + button.index = eventIndex; + if button.icon.type ~= "event" then + button.icon.type = "event" + button.icon:SetTexCoord(0, 1, 0, 1) + button.icon:SetWidth(14) + button.icon:SetHeight(14) + end + if CalendarIconList[eventType] then + button.icon:SetTexture(CalendarIconList[eventType]) + else + button.icon:SetTexture("Interface\\LFGFrame\\LFGIcon-"..textureName) + end +end +--[[ +########################################################## +GUILDFRAME STYLERS +########################################################## +]]-- +local function GuildBankStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.gbank ~= true then + return + end + + STYLE:ApplyWindowStyle(GuildBankFrame) + + GuildBankEmblemFrame:RemoveTextures(true) + GuildBankMoneyFrameBackground:Die() + STYLE:ApplyScrollFrameStyle(GuildBankPopupScrollFrameScrollBar) + + for b = 1, GuildBankFrame:GetNumChildren() do + local c = select(b, GuildBankFrame:GetChildren()) + if c.GetPushedTexture and c:GetPushedTexture() and not c:GetName() then + STYLE:ApplyCloseButtonStyle(c) + end + end + + GuildBankFrameDepositButton:SetButtonTemplate() + GuildBankFrameWithdrawButton:SetButtonTemplate() + GuildBankInfoSaveButton:SetButtonTemplate() + GuildBankFramePurchaseButton:SetButtonTemplate() + GuildBankFrameWithdrawButton:Point("RIGHT", GuildBankFrameDepositButton, "LEFT", -2, 0) + GuildBankInfoScrollFrame:Point('TOPLEFT', GuildBankInfo, 'TOPLEFT', -10, 12) + GuildBankInfoScrollFrame:RemoveTextures() + GuildBankInfoScrollFrame:Width(GuildBankInfoScrollFrame:GetWidth()-8) + GuildBankTransactionsScrollFrame:RemoveTextures() + + for b = 1, NUM_GUILDBANK_COLUMNS do + if(_G["GuildBankColumn"..b]) then + _G["GuildBankColumn"..b]:RemoveTextures() + + for d = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do + local e = _G["GuildBankColumn"..b.."Button"..d] + local icon = _G["GuildBankColumn"..b.."Button"..d.."IconTexture"] + local texture = _G["GuildBankColumn"..b.."Button"..d.."NormalTexture"] + if texture then + texture:SetTexture(0,0,0,0) + end + e:SetSlotTemplate() + icon:FillInner() + icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end + end + + for b = 1, 8 do + local e = _G["GuildBankTab"..b.."Button"] + if(e) then + local texture = _G["GuildBankTab"..b.."ButtonIconTexture"] + _G["GuildBankTab"..b]:RemoveTextures(true) + e:RemoveTextures() + e:SetButtonTemplate() + e:SetFixedPanelTemplate("Default") + texture:FillInner() + texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end + + for b = 1, 4 do + STYLE:ApplyTabStyle(_G["GuildBankFrameTab"..b]) + end + + hooksecurefunc('GuildBankFrame_Update', function() + if GuildBankFrame.mode ~= "bank" then + return + end + local f = GetCurrentGuildBankTab() + local e, g, h, i, j, k, l, m; + for b = 1, MAX_GUILDBANK_SLOTS_PER_TAB do + g = mod(b, NUM_SLOTS_PER_GUILDBANK_GROUP) + if g == 0 then + g = NUM_SLOTS_PER_GUILDBANK_GROUP + end + h = ceil((b-0.5)/NUM_SLOTS_PER_GUILDBANK_GROUP) + e = _G["GuildBankColumn"..h.."Button"..g] + i = GetGuildBankItemLink(f, b) + if i then + j = select(3, GetItemInfo(i)) + if j > 1 then + k, l, m = GetItemQualityColor(j) + else + k, l, m = 0,0,0,1 + end + else + k, l, m = 0,0,0,1 + end + e:SetBackdropBorderColor(k, l, m) + end + end) + + GuildBankPopupFrame:RemoveTextures() + GuildBankPopupScrollFrame:RemoveTextures() + GuildBankPopupFrame:SetFixedPanelTemplate("Transparent", true) + GuildBankPopupFrame:Point("TOPLEFT", GuildBankFrame, "TOPRIGHT", 1, -30) + GuildBankPopupOkayButton:SetButtonTemplate() + GuildBankPopupCancelButton:SetButtonTemplate() + GuildBankPopupEditBox:SetEditboxTemplate() + GuildBankPopupNameLeft:Die() + GuildBankPopupNameRight:Die() + GuildBankPopupNameMiddle:Die() + GuildItemSearchBox:RemoveTextures() + GuildItemSearchBox:SetPanelTemplate("Overlay") + GuildItemSearchBox.Panel:Point("TOPLEFT", 10, -1) + GuildItemSearchBox.Panel:Point("BOTTOMRIGHT", 4, 1) + + for b = 1, 16 do + local e = _G["GuildBankPopupButton"..b] + if(e) then + local icon = _G[e:GetName().."Icon"] + e:RemoveTextures() + e:SetFixedPanelTemplate("Default") + e:SetButtonTemplate() + icon:FillInner() + icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end + + STYLE:ApplyScrollFrameStyle(GuildBankTransactionsScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(GuildBankInfoScrollFrameScrollBar) +end + +local function GuildFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.guild ~= true then + return + end + + STYLE:ApplyWindowStyle(GuildFrame) + + STYLE:ApplyCloseButtonStyle(GuildMemberDetailCloseButton) + STYLE:ApplyCloseButtonStyle(GuildFrameCloseButton) + GuildRewardsFrameVisitText:ClearAllPoints() + GuildRewardsFrameVisitText:SetPoint("TOP", GuildRewardsFrame, "TOP", 0, 30) + + for i = 1, #GuildFrameList do + local frame = _G[GuildFrameList[i]] + if(frame) then + frame:RemoveTextures() + end + end + + for i = 1, #GuildButtonList do + local button = _G[GuildButtonList[i]] + if(button) then + button:RemoveTextures(true) + button:SetButtonTemplate() + end + end + + for i = 1, #GuildCheckBoxList do + local check = _G[GuildCheckBoxList[i]] + if(check) then check:SetCheckboxTemplate(true) end + end + + for i = 1, 5 do + local tab = _G["GuildFrameTab"..i] + if(tab) then + STYLE:ApplyTabStyle(tab) + if i == 1 then + tab:Point("TOPLEFT", GuildFrame, "BOTTOMLEFT", -10, 3) + end + end + end + + GuildNewsBossModel:SetBasicPanel() + GuildNewsBossModelTextFrame:SetPanelTemplate("Default") + GuildNewsBossModelTextFrame.Panel:Point("TOPLEFT", GuildNewsBossModel.Panel, "BOTTOMLEFT", 0, -1) + GuildNewsBossModel:SetPoint("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -43) + + GuildRecruitmentTankButton.checkButton:SetCheckboxTemplate(true) + GuildRecruitmentHealerButton.checkButton:SetCheckboxTemplate(true) + GuildRecruitmentDamagerButton.checkButton:SetCheckboxTemplate(true) + + GuildFactionBar:RemoveTextures() + GuildFactionBar.progress:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + GuildFactionBar:SetPanelTemplate("Inset") + GuildFactionBar.Panel:Point("TOPLEFT", GuildFactionBar.progress, "TOPLEFT", -1, 1) + GuildFactionBar.Panel:Point("BOTTOMRIGHT", GuildFactionBar, "BOTTOMRIGHT", 1, 1) + + if(SV.GameVersion < 60000) then + GuildLevelFrame:Die() + + GuildXPFrame:ClearAllPoints() + GuildXPFrame:Point("TOP", GuildFrame, "TOP", 0, -40) + + GuildXPBar:RemoveTextures() + GuildXPBar.progress:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + GuildXPBar:SetPanelTemplate("Inset") + GuildXPBar.Panel:Point("TOPLEFT", GuildXPBar, "TOPLEFT", -1, -3) + GuildXPBar.Panel:Point("BOTTOMRIGHT", GuildXPBar, "BOTTOMRIGHT", 0, 1) + end + + GuildLatestPerkButton:RemoveTextures() + GuildLatestPerkButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + GuildLatestPerkButtonIconTexture:ClearAllPoints() + GuildLatestPerkButtonIconTexture:Point("TOPLEFT", 2, -2) + GuildLatestPerkButton:SetPanelTemplate("Inset") + GuildLatestPerkButton.Panel:WrapOuter(GuildLatestPerkButtonIconTexture) + + GuildNextPerkButton:RemoveTextures() + GuildNextPerkButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + GuildNextPerkButtonIconTexture:ClearAllPoints() + GuildNextPerkButtonIconTexture:Point("TOPLEFT", 2, -2) + GuildNextPerkButton:SetPanelTemplate("Inset") + GuildNextPerkButton.Panel:WrapOuter(GuildNextPerkButtonIconTexture) + + GuildRosterContainer:SetBasicPanel(-2, 2, -1, -2) + STYLE:ApplyScrollFrameStyle(GuildRosterContainerScrollBar, 4, -4) + GuildRosterShowOfflineButton:SetCheckboxTemplate(true) + + for i = 1, 4 do + local btn = _G["GuildRosterColumnButton"..i] + if(btn) then + btn:RemoveTextures(true) + end + end + + STYLE:ApplyDropdownStyle(GuildRosterViewDropdown, 200) + + for i = 1, 14 do + local btn = _G["GuildRosterContainerButton"..i.."HeaderButton"] + if(btn) then + btn:RemoveTextures() + btn:SetButtonTemplate() + end + end + + GuildMemberDetailFrame:SetPanelTemplate("Default", true) + GuildMemberNoteBackground:SetBasicPanel() + GuildMemberOfficerNoteBackground:SetBasicPanel() + + GuildMemberRankDropdown:SetFrameLevel(GuildMemberRankDropdown:GetFrameLevel()+5) + STYLE:ApplyDropdownStyle(GuildMemberRankDropdown, 182) + GuildMemberRankDropdown.Panel:SetBackdropColor(0,0,0,1) + GuildNewsFrame:RemoveTextures() + GuildNewsContainer:SetBasicPanel(-2, 2, 0, -2) + + for i = 1, 17 do + local btn = _G["GuildNewsContainerButton"..i] + if(btn) then + if(btn.header) then btn.header:Die() end + btn:RemoveTextures() + btn:SetButtonTemplate() + end + end + + GuildNewsFiltersFrame:RemoveTextures() + GuildNewsFiltersFrame:SetFixedPanelTemplate("Transparent", true) + STYLE:ApplyCloseButtonStyle(GuildNewsFiltersFrameCloseButton) + + for i = 1, 7 do + local btn = _G["GuildNewsFilterButton"..i] + if(btn) then + btn:SetCheckboxTemplate(true) + end + end + + GuildNewsFiltersFrame:Point("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -20) + STYLE:ApplyScrollFrameStyle(GuildNewsContainerScrollBar, 4, 4) + STYLE:ApplyScrollFrameStyle(GuildInfoDetailsFrameScrollBar, 4, 4) + + for i = 1, 3 do + local tab = _G["GuildInfoFrameTab"..i] + if(tab) then + tab:RemoveTextures() + end + end + + local panel1 = CreateFrame("Frame", nil, GuildInfoFrameInfo) + panel1:SetPoint("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -22) + panel1:SetPoint("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 200) + panel1:SetBasicPanel() + + local panel2 = CreateFrame("Frame", nil, GuildInfoFrameInfo) + panel2:SetPoint("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -158) + panel2:SetPoint("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 118) + panel2:SetBasicPanel() + + local panel3 = CreateFrame("Frame", nil, GuildInfoFrameInfo) + panel3:SetPoint("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -233) + panel3:SetPoint("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 3) + panel3:SetBasicPanel() + + GuildRecruitmentCommentInputFrame:SetFixedPanelTemplate("Default") + GuildTextEditFrame:SetFixedPanelTemplate("Transparent", true) + STYLE:ApplyScrollFrameStyle(GuildTextEditScrollFrameScrollBar, 4, 4) + GuildTextEditContainer:SetFixedPanelTemplate("Default") + + local editChildren = GuildTextEditFrame:GetNumChildren() + + for i = 1, editChildren do + local child = select(i, GuildTextEditFrame:GetChildren()) + if(child:GetName() == "GuildTextEditFrameCloseButton") then + if(child:GetWidth() < 33) then + STYLE:ApplyCloseButtonStyle(child) + else + child:SetButtonTemplate() + end + end + end + + STYLE:ApplyScrollFrameStyle(GuildLogScrollFrameScrollBar, 4, 4) + GuildLogFrame:SetBasicPanel() + + local logChildren = GuildLogFrame:GetNumChildren() + + for i = 1, logChildren do + local child = select(i, GuildLogFrame:GetChildren()) + if child:GetName() == "GuildLogFrameCloseButton" then + if(child:GetWidth() < 33) then + STYLE:ApplyCloseButtonStyle(child) + else + child:SetButtonTemplate() + end + end + end + + GuildRewardsFrame:SetBasicPanel(2, 0, -22, 18) + STYLE:ApplyScrollFrameStyle(GuildRewardsContainerScrollBar, 4, -4) + + GuildNewPerksFrame:SetBasicPanel(-1, 0, 1, 0) + GuildPerksContainer:SetBasicPanel(-3, 0, 26, -3) + + STYLE:ApplyScrollFrameStyle(GuildPerksContainerScrollBar, 4, 2) + + for i = 1, 8 do + local button = _G["GuildPerksContainerButton"..i] + if button then + button:RemoveTextures() + if button.icon then + STYLE:ApplyItemButtonStyle(button, nil, true) + button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button.icon:ClearAllPoints() + button.icon:Point("TOPLEFT", button, "TOPLEFT", 2, -2) + button.icon:SetParent(button.Panel) + end + end + end + + for i = 1, 8 do + local button = _G["GuildRewardsContainerButton"..i] + if button then + button:RemoveTextures() + if button.icon then + button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button.icon:ClearAllPoints() + button.icon:Point("TOPLEFT", button, "TOPLEFT", 2, -2) + button:SetFixedPanelTemplate("Button") + button.Panel:WrapOuter(button.icon) + button.icon:SetParent(button.Panel) + end + end + end + + local maxCalendarEvents = CalendarGetNumGuildEvents(); + local scrollFrame = GuildInfoFrameApplicantsContainer; + local offset = HybridScrollFrame_GetOffset(scrollFrame); + local buttonIndex,counter = 0,0; + + for _,button in next, GuildInfoFrameApplicantsContainer.buttons do + counter = counter + 1; + buttonIndex = offset + counter; + button.selectedTex:Die() + button:GetHighlightTexture():Die() + button:SetBackdrop(nil) + end +end + +local function GuildControlStyle() + if SV.db[Schema].blizzard.enable~=true or SV.db[Schema].blizzard.guildcontrol~=true then return end + + GuildControlUI:RemoveTextures() + GuildControlUIHbar:RemoveTextures() + GuildControlUIRankBankFrameInset:RemoveTextures() + GuildControlUIRankBankFrameInsetScrollFrame:RemoveTextures() + + STYLE:ApplyWindowStyle(GuildControlUI) + + STYLE:ApplyScrollFrameStyle(GuildControlUIRankBankFrameInsetScrollFrameScrollBar) + + hooksecurefunc("GuildControlUI_RankOrder_Update",RankOrder_OnUpdate) + + GuildControlUIRankOrderFrameNewButton:HookScript("OnClick", function() + SV.Timers:ExecuteTimer(1,RankOrder_OnUpdate) + end) + + STYLE:ApplyDropdownStyle(GuildControlUINavigationDropDown) + STYLE:ApplyDropdownStyle(GuildControlUIRankSettingsFrameRankDropDown,180) + GuildControlUINavigationDropDownButton:Width(20) + GuildControlUIRankSettingsFrameRankDropDownButton:Width(20) + + for i=1, NUM_RANK_FLAGS do + local check = _G["GuildControlUIRankSettingsFrameCheckbox"..i] + if(check) then check:SetCheckboxTemplate(true) end + end + + GuildControlUIRankOrderFrameNewButton:SetButtonTemplate() + GuildControlUIRankSettingsFrameGoldBox:SetEditboxTemplate() + GuildControlUIRankSettingsFrameGoldBox.Panel:Point("TOPLEFT",-2,-4) + GuildControlUIRankSettingsFrameGoldBox.Panel:Point("BOTTOMRIGHT",2,4) + GuildControlUIRankSettingsFrameGoldBox:RemoveTextures() + GuildControlUIRankBankFrame:RemoveTextures() + + hooksecurefunc("GuildControlUI_BankTabPermissions_Update",function() + local tabs = GetNumGuildBankTabs() + + if tabs < MAX_BUY_GUILDBANK_TABS then + tabs = tabs + 1 + end + + for i=1, tabs do + local tab = _G["GuildControlBankTab"..i.."Owned"] + + if(tab) then + if(tab.tabIcon) then tab.tabIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) end + if(tab.editBox) then tab.editBox:SetEditboxTemplate() end + + if internalTest == false then + _G["GuildControlBankTab"..i.."BuyPurchaseButton"]:SetButtonTemplate() + _G["GuildControlBankTab"..i.."OwnedStackBox"]:SetEditboxTemplate() + _G["GuildControlBankTab"..i.."OwnedViewCheck"]:SetCheckboxTemplate(true) + _G["GuildControlBankTab"..i.."OwnedDepositCheck"]:SetCheckboxTemplate(true) + _G["GuildControlBankTab"..i.."OwnedUpdateInfoCheck"]:SetCheckboxTemplate(true) + + GCTabHelper(_G["GuildControlBankTab"..i.."OwnedStackBox"]) + GCTabHelper(_G["GuildControlBankTab"..i.."OwnedViewCheck"]) + GCTabHelper(_G["GuildControlBankTab"..i.."OwnedDepositCheck"]) + GCTabHelper(_G["GuildControlBankTab"..i.."OwnedUpdateInfoCheck"]) + end + end + end + internalTest = true + end) + + STYLE:ApplyDropdownStyle(GuildControlUIRankBankFrameRankDropDown, 180) + + GuildControlUIRankBankFrameRankDropDownButton:Width(20) +end + + +local function GuildRegistrarStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.guildregistrar ~= true then + return + end + + STYLE:ApplyWindowStyle(GuildRegistrarFrame, true, true) + + GuildRegistrarFrameInset:Die() + GuildRegistrarFrameEditBox:RemoveTextures() + GuildRegistrarGreetingFrame:RemoveTextures() + + GuildRegistrarFrameGoodbyeButton:SetButtonTemplate() + GuildRegistrarFrameCancelButton:SetButtonTemplate() + GuildRegistrarFramePurchaseButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(GuildRegistrarFrameCloseButton) + GuildRegistrarFrameEditBox:SetEditboxTemplate() + + for b = 1, GuildRegistrarFrameEditBox:GetNumRegions()do + local a2 = select(b, GuildRegistrarFrameEditBox:GetRegions()) + if a2 and a2:GetObjectType() == "Texture"then + if a2:GetTexture() == "Interface\\ChatFrame\\UI-ChatInputBorder-Left" or a2:GetTexture() == "Interface\\ChatFrame\\UI-ChatInputBorder-Right" then + a2:Die() + end + end + end + + GuildRegistrarFrameEditBox:Height(20) + + if(_G["GuildRegistrarButton1"]) then + _G["GuildRegistrarButton1"]:GetFontString():SetTextColor(1, 1, 1) + end + if(_G["GuildRegistrarButton2"]) then + _G["GuildRegistrarButton2"]:GetFontString():SetTextColor(1, 1, 1) + end + + GuildRegistrarPurchaseText:SetTextColor(1, 1, 1) + AvailableServicesText:SetTextColor(1, 1, 0) +end + +local function LFGuildFrameStyle() + if(SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.lfguild ~= true) then return end + + STYLE:ApplyWindowStyle(LookingForGuildFrame, true) + + for i = 1, #LFGFrameList do + local check = _G[LFGFrameList[i]] + if(check) then check:SetCheckboxTemplate(true) end + end + + LookingForGuildTankButton.checkButton:SetCheckboxTemplate(true) + LookingForGuildHealerButton.checkButton:SetCheckboxTemplate(true) + LookingForGuildDamagerButton.checkButton:SetCheckboxTemplate(true) + LookingForGuildFrameInset:RemoveTextures(false) + LookingForGuildBrowseButton_LeftSeparator:Die() + LookingForGuildRequestButton_RightSeparator:Die() + + STYLE:ApplyScrollFrameStyle(LookingForGuildBrowseFrameContainerScrollBar) + LookingForGuildBrowseButton:SetButtonTemplate() + LookingForGuildRequestButton:SetButtonTemplate() + + STYLE:ApplyCloseButtonStyle(LookingForGuildFrameCloseButton) + LookingForGuildCommentInputFrame:SetPanelTemplate("Default") + LookingForGuildCommentInputFrame:RemoveTextures(false) + + for u = 1, 5 do + local J = _G["LookingForGuildBrowseFrameContainerButton"..u] + local K = _G["LookingForGuildAppsFrameContainerButton"..u] + J:SetBackdrop(nil) + K:SetBackdrop(nil) + end + + for u = 1, 3 do + local tab = _G["LookingForGuildFrameTab"..u] + STYLE:ApplyTabStyle(tab) + tab:SetFrameStrata("HIGH") + tab:SetFrameLevel(99) + end + + GuildFinderRequestMembershipFrame:RemoveTextures(true) + GuildFinderRequestMembershipFrame:SetFixedPanelTemplate("Transparent", true) + GuildFinderRequestMembershipFrameAcceptButton:SetButtonTemplate() + GuildFinderRequestMembershipFrameCancelButton:SetButtonTemplate() + GuildFinderRequestMembershipFrameInputFrame:RemoveTextures() + GuildFinderRequestMembershipFrameInputFrame:SetFixedPanelTemplate("Default") +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_GuildBankUI",GuildBankStyle) +STYLE:SaveBlizzardStyle("Blizzard_GuildUI",GuildFrameStyle) +STYLE:SaveBlizzardStyle("Blizzard_GuildControlUI",GuildControlStyle) +STYLE:SaveCustomStyle(GuildRegistrarStyle) +STYLE:SaveBlizzardStyle("Blizzard_LookingForGuildUI",LFGuildFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/help.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/help.lua new file mode 100644 index 0000000..bf38890 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/help.lua @@ -0,0 +1,175 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local HelpFrameList = { + "HelpFrameLeftInset", + "HelpFrameMainInset", + "HelpFrameKnowledgebase", + "HelpFrameHeader", + "HelpFrameKnowledgebaseErrorFrame" +} + +local HelpFrameButtonList = { + "HelpFrameOpenTicketHelpItemRestoration", + "HelpFrameAccountSecurityOpenTicket", + "HelpFrameOpenTicketHelpTopIssues", + "HelpFrameOpenTicketHelpOpenTicket", + "HelpFrameKnowledgebaseSearchButton", + "HelpFrameKnowledgebaseNavBarHomeButton", + "HelpFrameCharacterStuckStuck", + "GMChatOpenLog", + "HelpFrameTicketSubmit", + "HelpFrameTicketCancel" +} + +local function NavBarHelper(button) + for i = 1, #button.navList do + local this = button.navList[i] + local last = button.navList[i - 1] + if this and last then + local level = last:GetFrameLevel() + if(level >= 2) then + level = level - 2 + else + level = 0 + end + this:SetFrameLevel(level) + end + end +end +--[[ +########################################################## +HELPFRAME STYLER +########################################################## +]]-- +local function HelpFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.help ~= true then + return + end + tinsert(HelpFrameButtonList, "HelpFrameButton16") + tinsert(HelpFrameButtonList, "HelpFrameSubmitSuggestionSubmit") + tinsert(HelpFrameButtonList, "HelpFrameReportBugSubmit") + for d = 1, #HelpFrameList do + _G[HelpFrameList[d]]:RemoveTextures(true) + _G[HelpFrameList[d]]:SetPanelTemplate("Default") + end + HelpFrameHeader:SetFrameLevel(HelpFrameHeader:GetFrameLevel()+2) + HelpFrameKnowledgebaseErrorFrame:SetFrameLevel(HelpFrameKnowledgebaseErrorFrame:GetFrameLevel()+2) + HelpFrameReportBugScrollFrame:RemoveTextures() + HelpFrameReportBugScrollFrame:SetPanelTemplate("Default") + HelpFrameReportBugScrollFrame.Panel:Point("TOPLEFT", -4, 4) + HelpFrameReportBugScrollFrame.Panel:Point("BOTTOMRIGHT", 6, -4) + for d = 1, HelpFrameReportBug:GetNumChildren()do + local e = select(d, HelpFrameReportBug:GetChildren()) + if not e:GetName() then + e:RemoveTextures() + end + end + STYLE:ApplyScrollFrameStyle(HelpFrameReportBugScrollFrameScrollBar) + HelpFrameSubmitSuggestionScrollFrame:RemoveTextures() + HelpFrameSubmitSuggestionScrollFrame:SetPanelTemplate("Default") + HelpFrameSubmitSuggestionScrollFrame.Panel:Point("TOPLEFT", -4, 4) + HelpFrameSubmitSuggestionScrollFrame.Panel:Point("BOTTOMRIGHT", 6, -4) + for d = 1, HelpFrameSubmitSuggestion:GetNumChildren()do + local e = select(d, HelpFrameSubmitSuggestion:GetChildren()) + if not e:GetName() then + e:RemoveTextures() + end + end + STYLE:ApplyScrollFrameStyle(HelpFrameSubmitSuggestionScrollFrameScrollBar) + HelpFrameTicketScrollFrame:RemoveTextures() + HelpFrameTicketScrollFrame:SetPanelTemplate("Default") + HelpFrameTicketScrollFrame.Panel:Point("TOPLEFT", -4, 4) + HelpFrameTicketScrollFrame.Panel:Point("BOTTOMRIGHT", 6, -4) + for d = 1, HelpFrameTicket:GetNumChildren()do + local e = select(d, HelpFrameTicket:GetChildren()) + if not e:GetName() then + e:RemoveTextures() + end + end + STYLE:ApplyScrollFrameStyle(HelpFrameKnowledgebaseScrollFrame2ScrollBar) + for d = 1, #HelpFrameButtonList do + _G[HelpFrameButtonList[d]]:RemoveTextures(true) + _G[HelpFrameButtonList[d]]:SetButtonTemplate() + if _G[HelpFrameButtonList[d]].text then + _G[HelpFrameButtonList[d]].text:ClearAllPoints() + _G[HelpFrameButtonList[d]].text:SetPoint("CENTER") + _G[HelpFrameButtonList[d]].text:SetJustifyH("CENTER") + end + end + for d = 1, 6 do + local f = _G["HelpFrameButton"..d] + f:SetButtonTemplate() + f.text:ClearAllPoints() + f.text:SetPoint("CENTER") + f.text:SetJustifyH("CENTER") + end + for d = 1, HelpFrameKnowledgebaseScrollFrameScrollChild:GetNumChildren()do + local f = _G["HelpFrameKnowledgebaseScrollFrameButton"..d] + f:RemoveTextures(true) + f:SetButtonTemplate() + end + HelpFrameKnowledgebaseSearchBox:ClearAllPoints() + HelpFrameKnowledgebaseSearchBox:Point("TOPLEFT", HelpFrameMainInset, "TOPLEFT", 13, -10) + HelpFrameKnowledgebaseNavBarOverlay:Die() + HelpFrameKnowledgebaseNavBar:RemoveTextures() + HelpFrame:RemoveTextures(true) + HelpFrame:SetPanelTemplate("Halftone") + HelpFrameKnowledgebaseSearchBox:SetEditboxTemplate() + STYLE:ApplyScrollFrameStyle(HelpFrameKnowledgebaseScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(HelpFrameTicketScrollFrameScrollBar, 4) + STYLE:ApplyCloseButtonStyle(HelpFrameCloseButton, HelpFrame.Panel) + STYLE:ApplyCloseButtonStyle(HelpFrameKnowledgebaseErrorFrameCloseButton, HelpFrameKnowledgebaseErrorFrame.Panel) + HelpFrameCharacterStuckHearthstone:SetButtonTemplate() + HelpFrameCharacterStuckHearthstone:SetFixedPanelTemplate("Default") + HelpFrameCharacterStuckHearthstone.IconTexture:FillInner() + HelpFrameCharacterStuckHearthstone.IconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + hooksecurefunc("NavBar_AddButton", function(h, k) + local i = h.navList[#h.navList] + if not i.styled then + i:SetButtonTemplate() + i.styled = true; + i:HookScript("OnClick", function() + NavBarHelper(h) + end) + end + NavBarHelper(h) + end) + HelpFrameGM_ResponseNeedMoreHelp:SetButtonTemplate() + HelpFrameGM_ResponseCancel:SetButtonTemplate() + for d = 1, HelpFrameGM_Response:GetNumChildren()do + local e = select(d, HelpFrameGM_Response:GetChildren()) + if e and e:GetObjectType() + == "Frame"and not e:GetName() + then + e:SetFixedPanelTemplate("Default") + end + end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(HelpFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/inspect.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/inspect.lua new file mode 100644 index 0000000..f0ed23f --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/inspect.lua @@ -0,0 +1,100 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local InspectSlotList = { + "HeadSlot", + "NeckSlot", + "ShoulderSlot", + "BackSlot", + "ChestSlot", + "ShirtSlot", + "TabardSlot", + "WristSlot", + "HandsSlot", + "WaistSlot", + "LegsSlot", + "FeetSlot", + "Finger0Slot", + "Finger1Slot", + "Trinket0Slot", + "Trinket1Slot", + "MainHandSlot", + "SecondaryHandSlot" +}; +--[[ +########################################################## +INSPECT UI STYLER +########################################################## +]]-- +local function InspectStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.inspect ~= true then + return + end + InspectFrame:RemoveTextures(true) + InspectFrameInset:RemoveTextures(true) + InspectFrame:SetPanelTemplate('Action') + STYLE:ApplyCloseButtonStyle(InspectFrameCloseButton) + for d = 1, 4 do + STYLE:ApplyTabStyle(_G["InspectFrameTab"..d]) + end + InspectModelFrameBorderTopLeft:Die() + InspectModelFrameBorderTopRight:Die() + InspectModelFrameBorderTop:Die() + InspectModelFrameBorderLeft:Die() + InspectModelFrameBorderRight:Die() + InspectModelFrameBorderBottomLeft:Die() + InspectModelFrameBorderBottomRight:Die() + InspectModelFrameBorderBottom:Die() + InspectModelFrameBorderBottom2:Die() + InspectModelFrameBackgroundOverlay:Die() + InspectModelFrame:SetPanelTemplate("Default") + for _, slot in pairs(InspectSlotList)do + local texture = _G["Inspect"..slot.."IconTexture"] + local frame = _G["Inspect"..slot] + frame:RemoveTextures() + frame:SetButtonTemplate() + texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + texture:FillInner() + frame:SetFrameLevel(frame:GetFrameLevel() + 1) + frame:SetFixedPanelTemplate() + end + hooksecurefunc('InspectPaperDollItemSlotButton_Update', function(q) + local unit = InspectFrame.unit; + local r = GetInventoryItemQuality(unit, q:GetID()) + if r and q.Panel then + local s, t, f = GetItemQualityColor(r) + q.Panel:SetBackdropBorderColor(s, t, f) + elseif q.Panel then + q.Panel:SetBackdropBorderColor(0,0,0,1) + end + end) + InspectGuildFrameBG:Die() + InspectTalentFrame:RemoveTextures() +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_InspectUI",InspectStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemsocketing.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemsocketing.lua new file mode 100644 index 0000000..b4c53f2 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemsocketing.lua @@ -0,0 +1,67 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +ITEMSOCKETING STYLER +########################################################## +]]-- +local function ItemSocketStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.socket ~= true then return end + ItemSocketingFrame:RemoveTextures() + ItemSocketingFrame:SetPanelTemplate("Action") + ItemSocketingFrameInset:Die() + ItemSocketingScrollFrame:RemoveTextures() + ItemSocketingScrollFrame:SetPanelTemplate("Inset", true) + STYLE:ApplyScrollFrameStyle(ItemSocketingScrollFrameScrollBar, 2) + for j = 1, MAX_NUM_SOCKETS do + local i = _G[("ItemSocketingSocket%d"):format(j)]; + local C = _G[("ItemSocketingSocket%dBracketFrame"):format(j)]; + local D = _G[("ItemSocketingSocket%dBackground"):format(j)]; + local E = _G[("ItemSocketingSocket%dIconTexture"):format(j)]; + i:RemoveTextures() + i:SetButtonTemplate() + i:SetFixedPanelTemplate("Button", true) + C:Die() + D:Die() + E:SetTexCoord(0.1, 0.9, 0.1, 0.9) + E:FillInner() + end + hooksecurefunc("ItemSocketingFrame_Update", function() + local max = GetNumSockets() + for j=1, max do + local i = _G[("ItemSocketingSocket%d"):format(j)]; + local G = GetSocketTypes(j); + local color = GEM_TYPE_INFO[G] + i:SetBackdropColor(color.r, color.g, color.b, 0.15); + i:SetBackdropBorderColor(color.r, color.g, color.b) + end + end) + ItemSocketingFramePortrait:Die() + ItemSocketingSocketButton:ClearAllPoints() + ItemSocketingSocketButton:Point("BOTTOMRIGHT", ItemSocketingFrame, "BOTTOMRIGHT", -5, 5) + ItemSocketingSocketButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(ItemSocketingFrameCloseButton) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_ItemSocketingUI",ItemSocketStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemupgrade.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemupgrade.lua new file mode 100644 index 0000000..86aab3e --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/itemupgrade.lua @@ -0,0 +1,55 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +ITEMUPGRADE UI STYLER +########################################################## +]]-- +local function ItemUpgradeStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.itemUpgrade ~= true then + return + end + + STYLE:ApplyWindowStyle(ItemUpgradeFrame, true) + + STYLE:ApplyCloseButtonStyle(ItemUpgradeFrameCloseButton) + ItemUpgradeFrameUpgradeButton:RemoveTextures() + ItemUpgradeFrameUpgradeButton:SetButtonTemplate() + ItemUpgradeFrame.ItemButton:RemoveTextures() + ItemUpgradeFrame.ItemButton:SetSlotTemplate(true) + ItemUpgradeFrame.ItemButton.IconTexture:FillInner() + hooksecurefunc('ItemUpgradeFrame_Update', function() + if GetItemUpgradeItemInfo() then + ItemUpgradeFrame.ItemButton.IconTexture:SetAlpha(1) + ItemUpgradeFrame.ItemButton.IconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + else + ItemUpgradeFrame.ItemButton.IconTexture:SetAlpha(0) + end + end) + ItemUpgradeFrameMoneyFrame:RemoveTextures() + ItemUpgradeFrame.FinishedGlow:Die() + ItemUpgradeFrame.ButtonFrame:DisableDrawLayer('BORDER') +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_ItemUpgradeUI",ItemUpgradeStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/keybinding.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/keybinding.lua new file mode 100644 index 0000000..bd456a5 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/keybinding.lua @@ -0,0 +1,66 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +KEYBINDING STYLER +########################################################## +]]-- +local BindButtons = { + "KeyBindingFrameDefaultButton", + "KeyBindingFrameUnbindButton", + "KeyBindingFrameOkayButton", + "KeyBindingFrameCancelButton" +} + +local function BindingStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.binding ~= true then return end + + for _, gName in pairs(BindButtons)do + local btn = _G[gName] + if(btn) then + btn:RemoveTextures() + btn:SetButtonTemplate() + end + end + + for i = 1, KEY_BINDINGS_DISPLAYED do + local button1 = _G["KeyBindingFrameBinding"..i.."Key1Button"] + if(button1) then + button1:RemoveTextures(true) + button1:SetEditboxTemplate() + end + + local button2 = _G["KeyBindingFrameBinding"..i.."Key2Button"] + if(button2) then + button2:RemoveTextures(true) + button2:SetEditboxTemplate() + end + end + + STYLE:ApplyScrollFrameStyle(KeyBindingFrameScrollFrameScrollBar) + KeyBindingFrame:RemoveTextures() + KeyBindingFrame:SetPanelTemplate("Halftone") +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_BindingUI", BindingStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua new file mode 100644 index 0000000..19859c9 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lfd.lua @@ -0,0 +1,412 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local LFDFrameList = { + "LFDQueueFrameRoleButtonHealer", + "LFDQueueFrameRoleButtonDPS", + "LFDQueueFrameRoleButtonLeader", + "LFDQueueFrameRoleButtonTank", + "RaidFinderQueueFrameRoleButtonHealer", + "RaidFinderQueueFrameRoleButtonDPS", + "RaidFinderQueueFrameRoleButtonLeader", + "RaidFinderQueueFrameRoleButtonTank", + "LFGInvitePopupRoleButtonTank", + "LFGInvitePopupRoleButtonHealer", + "LFGInvitePopupRoleButtonDPS" +}; + +local Incentive_OnShow = function(button) + ActionButton_ShowOverlayGlow(button:GetParent().checkButton) +end + +local Incentive_OnHide = function(button) + ActionButton_HideOverlayGlow(button:GetParent().checkButton) +end + +local LFDQueueRandom_OnUpdate = function() + LFDQueueFrame:RemoveTextures() + for u = 1, LFD_MAX_REWARDS do + local t = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u] + local icon = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."IconTexture"] + if t then + if not t.restyled then + local x = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."ShortageBorder"] + local y = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."Count"] + local z = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."NameFrame"] + icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + icon:SetDrawLayer("OVERLAY") + y:SetDrawLayer("OVERLAY") + z:SetTexture() + z:SetSize(118, 39) + x:SetAlpha(0) + t.border = CreateFrame("Frame", nil, t) + t.border:SetFixedPanelTemplate() + t.border:WrapOuter(icon) + icon:SetParent(t.border) + y:SetParent(t.border) + t.restyled = true; + for A = 1, 3 do + local B = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."RoleIcon"..A] + if B then + B:SetParent(t.border) + end + end + end + end + end +end + +local ScenarioQueueRandom_OnUpdate = function() + LFDQueueFrame:RemoveTextures() + for u = 1, LFD_MAX_REWARDS do + local t = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u] + local icon = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u.."IconTexture"] + if t then + if not t.restyled then + local x = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u.."ShortageBorder"] + local y = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u.."Count"] + local z = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u.."NameFrame"]icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + icon:SetDrawLayer("OVERLAY") + y:SetDrawLayer("OVERLAY") + z:SetTexture() + z:SetSize(118, 39) + x:SetAlpha(0) + t.border = CreateFrame("Frame", nil, t) + t.border:SetFixedPanelTemplate() + t.border:WrapOuter(icon) + icon:SetParent(t.border) + y:SetParent(t.border) + t.restyled = true + end + end + end +end +--[[ +########################################################## +LFD STYLER +########################################################## +]]-- +local function LFDFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.lfg ~= true then return end + + STYLE:ApplyWindowStyle(PVEFrame, true) + + PVEFrameLeftInset:RemoveTextures() + RaidFinderQueueFrame:RemoveTextures(true) + PVEFrameBg:Hide() + PVEFrameTitleBg:Hide() + PVEFramePortrait:Hide() + PVEFramePortraitFrame:Hide() + PVEFrameTopRightCorner:Hide() + PVEFrameTopBorder:Hide() + PVEFrameLeftInsetBg:Hide() + PVEFrame.shadows:Hide() + + LFDQueueFramePartyBackfillBackfillButton:SetButtonTemplate() + LFDQueueFramePartyBackfillNoBackfillButton:SetButtonTemplate() + LFDQueueFrameRandomScrollFrameChildFrameBonusRepFrame.ChooseButton:SetButtonTemplate() + ScenarioQueueFrameRandomScrollFrameChildFrameBonusRepFrame.ChooseButton:SetButtonTemplate() + + STYLE:ApplyScrollFrameStyle(ScenarioQueueFrameRandomScrollFrameScrollBar) + + GroupFinderFrameGroupButton1.icon:SetTexture("Interface\\Icons\\INV_Helmet_08") + GroupFinderFrameGroupButton2.icon:SetTexture("Interface\\Icons\\inv_helmet_06") + GroupFinderFrameGroupButton3.icon:SetTexture("Interface\\Icons\\Icon_Scenarios") + GroupFinderFrameGroupButton4.icon:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\SVUI-EMBLEM") + + LFGDungeonReadyDialogBackground:Die() + LFGDungeonReadyDialogEnterDungeonButton:SetButtonTemplate() + LFGDungeonReadyDialogLeaveQueueButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(LFGDungeonReadyDialogCloseButton) + + LFGDungeonReadyDialog:RemoveTextures() + LFGDungeonReadyDialog:SetPanelTemplate("Pattern", true, 2, 4, 4) + LFGDungeonReadyStatus:RemoveTextures() + LFGDungeonReadyStatus:SetPanelTemplate("Pattern", true, 2, 4, 4) + LFGDungeonReadyDialogRoleIconTexture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS") + LFGDungeonReadyDialogRoleIconTexture:SetAlpha(0.5) + + hooksecurefunc("LFGDungeonReadyPopup_Update", function() + local b, c, d, e, f, g, h, i, j, k, l, m = GetLFGProposal() + if LFGDungeonReadyDialogRoleIcon:IsShown() then + if h == "DAMAGER" then + LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonDPS.background:GetTexCoord()) + elseif h == "TANK" then + LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonTank.background:GetTexCoord()) + elseif h == "HEALER" then + LFGDungeonReadyDialogRoleIconTexture:SetTexCoord(LFDQueueFrameRoleButtonHealer.background:GetTexCoord()) + end + end + end) + + LFDQueueFrameRoleButtonTankIncentiveIcon:SetAlpha(0) + LFDQueueFrameRoleButtonHealerIncentiveIcon:SetAlpha(0) + LFDQueueFrameRoleButtonDPSIncentiveIcon:SetAlpha(0) + LFDQueueFrameRoleButtonTankIncentiveIcon:HookScript("OnShow", Incentive_OnShow) + LFDQueueFrameRoleButtonHealerIncentiveIcon:HookScript("OnShow", Incentive_OnShow) + LFDQueueFrameRoleButtonDPSIncentiveIcon:HookScript("OnShow", Incentive_OnShow) + LFDQueueFrameRoleButtonTankIncentiveIcon:HookScript("OnHide", Incentive_OnHide) + LFDQueueFrameRoleButtonHealerIncentiveIcon:HookScript("OnHide", Incentive_OnHide) + LFDQueueFrameRoleButtonDPSIncentiveIcon:HookScript("OnHide", Incentive_OnHide) + LFDQueueFrameRoleButtonTank.shortageBorder:Die() + LFDQueueFrameRoleButtonDPS.shortageBorder:Die() + LFDQueueFrameRoleButtonHealer.shortageBorder:Die() + LFGDungeonReadyDialog.filigree:SetAlpha(0) + LFGDungeonReadyDialog.bottomArt:SetAlpha(0) + STYLE:ApplyCloseButtonStyle(LFGDungeonReadyStatusCloseButton) + + for _,name in pairs(LFDFrameList) do + local frame = _G[name]; + if frame then + frame.checkButton:RemoveTextures() + frame.checkButton:SetCheckboxTemplate(true, -4, -4) + frame.checkButton:SetFrameLevel(frame.checkButton:GetFrameLevel() + 50) + frame:DisableDrawLayer("BACKGROUND") + frame:DisableDrawLayer("OVERLAY") + end + end + + LFDQueueFrameRoleButtonLeader.leadIcon = LFDQueueFrameRoleButtonLeader:CreateTexture(nil, 'BACKGROUND') + LFDQueueFrameRoleButtonLeader.leadIcon:SetTexture([[Interface\GroupFrame\UI-Group-LeaderIcon]]) + LFDQueueFrameRoleButtonLeader.leadIcon:SetPoint(LFDQueueFrameRoleButtonLeader:GetNormalTexture():GetPoint()) + LFDQueueFrameRoleButtonLeader.leadIcon:Size(50) + LFDQueueFrameRoleButtonLeader.leadIcon:SetAlpha(0.4) + RaidFinderQueueFrameRoleButtonLeader.leadIcon = RaidFinderQueueFrameRoleButtonLeader:CreateTexture(nil, 'BACKGROUND') + RaidFinderQueueFrameRoleButtonLeader.leadIcon:SetTexture([[Interface\GroupFrame\UI-Group-LeaderIcon]]) + RaidFinderQueueFrameRoleButtonLeader.leadIcon:SetPoint(RaidFinderQueueFrameRoleButtonLeader:GetNormalTexture():GetPoint()) + RaidFinderQueueFrameRoleButtonLeader.leadIcon:Size(50) + RaidFinderQueueFrameRoleButtonLeader.leadIcon:SetAlpha(0.4) + + hooksecurefunc('LFG_DisableRoleButton', function(self) + if self.checkButton:GetChecked() then + self.checkButton:SetAlpha(1) + else + self.checkButton:SetAlpha(0) + end + if self.background then + self.background:Show() + end + end) + + hooksecurefunc('LFG_EnableRoleButton', function(self) + self.checkButton:SetAlpha(1) + end) + + hooksecurefunc("LFG_PermanentlyDisableRoleButton", function(self) + if self.background then + self.background:Show() + self.background:SetDesaturated(true) + end + end) + + for i = 1, 4 do + local button = GroupFinderFrame["groupButton"..i] + if(button) then + button.ring:Hide() + button.bg:SetTexture(0,0,0,0) + button.bg:SetAllPoints() + button:SetFixedPanelTemplate('Button') + button:SetButtonTemplate() + button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button.icon:SetDrawLayer("OVERLAY") + button.icon:Size(40) + button.icon:ClearAllPoints() + button.icon:SetPoint("LEFT", 10, 0) + button.border = CreateFrame("Frame", nil, button) + button.border:SetFixedPanelTemplate('Default') + button.border:WrapOuter(button.icon) + button.icon:SetParent(button.border) + end + end + + for u = 1, 2 do + STYLE:ApplyTabStyle(_G['PVEFrameTab'..u]) + end + + PVEFrameTab1:SetPoint('BOTTOMLEFT', PVEFrame, 'BOTTOMLEFT', 19, -31) + STYLE:ApplyCloseButtonStyle(PVEFrameCloseButton) + LFDParentFrame:RemoveTextures() + LFDQueueFrameFindGroupButton:RemoveTextures() + LFDParentFrameInset:RemoveTextures() + LFDQueueFrameSpecificListScrollFrame:RemoveTextures() + LFDQueueFrameFindGroupButton:SetButtonTemplate() + hooksecurefunc("LFDQueueFrameRandom_UpdateFrame", LFDQueueRandom_OnUpdate) + + hooksecurefunc("ScenarioQueueFrameSpecific_Update", function() + for i = 1, NUM_SCENARIO_CHOICE_BUTTONS do + local box = _G["ScenarioQueueFrameSpecificButton"..i.."EnableButton"] + if(box and (not box.Panel)) then + box:RemoveTextures() + box:SetCheckboxTemplate(true, -2, -3) + end + end + end) + + STYLE:ApplyDropdownStyle(LFDQueueFrameTypeDropDown) + + RaidFinderFrame:RemoveTextures() + RaidFinderFrameBottomInset:RemoveTextures() + RaidFinderFrameRoleInset:RemoveTextures() + LFDQueueFrameRandomScrollFrameScrollBar:RemoveTextures() + ScenarioQueueFrameSpecificScrollFrame:RemoveTextures() + RaidFinderFrameBottomInsetBg:Hide() + RaidFinderFrameBtnCornerRight:Hide() + RaidFinderFrameButtonBottomBorder:Hide() + STYLE:ApplyDropdownStyle(RaidFinderQueueFrameSelectionDropDown) + RaidFinderFrameFindRaidButton:RemoveTextures() + RaidFinderFrameFindRaidButton:SetButtonTemplate() + RaidFinderQueueFrame:RemoveTextures() + + for u = 1, LFD_MAX_REWARDS do + local t = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u] + local icon = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."IconTexture"] + if t then + if not t.restyled then + local x = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."ShortageBorder"] + local y = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."Count"] + local z = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."NameFrame"] + t:RemoveTextures() + icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + icon:SetDrawLayer("OVERLAY") + y:SetDrawLayer("OVERLAY") + z:SetTexture() + z:SetSize(118, 39) + x:SetAlpha(0) + t.border = CreateFrame("Frame", nil, t) + t.border:SetFixedPanelTemplate() + t.border:WrapOuter(icon) + icon:SetParent(t.border) + y:SetParent(t.border) + t.restyled = true + end + end + end + + ScenarioFinderFrameInset:DisableDrawLayer("BORDER") + ScenarioFinderFrame.TopTileStreaks:Hide() + ScenarioFinderFrameBtnCornerRight:Hide() + ScenarioFinderFrameButtonBottomBorder:Hide() + ScenarioQueueFrame.Bg:Hide() + ScenarioFinderFrameInset:GetRegions():Hide() + hooksecurefunc("ScenarioQueueFrameRandom_UpdateFrame", ScenarioQueueRandom_OnUpdate) + ScenarioQueueFrameFindGroupButton:RemoveTextures() + ScenarioQueueFrameFindGroupButton:SetButtonTemplate() + STYLE:ApplyDropdownStyle(ScenarioQueueFrameTypeDropDown) + LFRBrowseFrameRoleInset:DisableDrawLayer("BORDER") + RaidBrowserFrameBg:Hide() + LFRQueueFrameSpecificListScrollFrameScrollBackgroundTopLeft:Hide() + LFRQueueFrameSpecificListScrollFrameScrollBackgroundBottomRight:Hide() + LFRBrowseFrameRoleInsetBg:Hide() + + for u = 1, 14 do + if u ~= 6 and u ~= 8 then + select(u, RaidBrowserFrame:GetRegions()):Hide() + end + end + + RaidBrowserFrame:SetPanelTemplate('Pattern') + STYLE:ApplyCloseButtonStyle(RaidBrowserFrameCloseButton) + LFRQueueFrameFindGroupButton:SetButtonTemplate() + LFRQueueFrameAcceptCommentButton:SetButtonTemplate() + STYLE:ApplyScrollFrameStyle(LFRQueueFrameCommentScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(LFDQueueFrameSpecificListScrollFrameScrollBar) + + RaidBrowserFrame:HookScript('OnShow', function() + if not LFRQueueFrameSpecificListScrollFrameScrollBar.styled then + STYLE:ApplyScrollFrameStyle(LFRQueueFrameSpecificListScrollFrameScrollBar) + LFRBrowseFrame:RemoveTextures() + for u = 1, 2 do + local C = _G['LFRParentFrameSideTab'..u] + C:DisableDrawLayer('BACKGROUND') + C:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) + C:GetNormalTexture():FillInner() + C.pushed = true; + C:SetPanelTemplate("Default") + C.Panel:SetAllPoints() + C:SetPanelTemplate() + hooksecurefunc(C:GetHighlightTexture(), "SetTexture", function(o, D) + if D ~= nil then + o:SetTexture(0,0,0,0) + end + end) + hooksecurefunc(C:GetCheckedTexture(), "SetTexture", function(o, D) + if D ~= nil then + o:SetTexture(0,0,0,0) + end + end) + end + for u = 1, 7 do + local C = _G['LFRBrowseFrameColumnHeader'..u] + C:DisableDrawLayer('BACKGROUND') + end + STYLE:ApplyDropdownStyle(LFRBrowseFrameRaidDropDown) + LFRBrowseFrameRefreshButton:SetButtonTemplate() + LFRBrowseFrameInviteButton:SetButtonTemplate() + LFRBrowseFrameSendMessageButton:SetButtonTemplate() + LFRQueueFrameSpecificListScrollFrameScrollBar.styled = true + end + end) + + LFGInvitePopup:RemoveTextures() + LFGInvitePopup:SetPanelTemplate("Pattern", true, 2, 4, 4) + LFGInvitePopupAcceptButton:SetButtonTemplate() + LFGInvitePopupDeclineButton:SetButtonTemplate() + + _G[LFDQueueFrame.PartyBackfill:GetName().."BackfillButton"]:SetButtonTemplate() + _G[LFDQueueFrame.PartyBackfill:GetName().."NoBackfillButton"]:SetButtonTemplate() + _G[RaidFinderQueueFrame.PartyBackfill:GetName().."BackfillButton"]:SetButtonTemplate() + _G[RaidFinderQueueFrame.PartyBackfill:GetName().."NoBackfillButton"]:SetButtonTemplate() + _G[ScenarioQueueFrame.PartyBackfill:GetName().."BackfillButton"]:SetButtonTemplate() + _G[ScenarioQueueFrame.PartyBackfill:GetName().."NoBackfillButton"]:SetButtonTemplate() + + STYLE:ApplyScrollFrameStyle(LFDQueueFrameRandomScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(ScenarioQueueFrameSpecificScrollFrameScrollBar) + LFDQueueFrameRandomScrollFrame:SetBasicPanel() + ScenarioQueueFrameRandomScrollFrame:SetBasicPanel() + RaidFinderQueueFrameScrollFrame:SetBasicPanel() + + for u = 1, NUM_LFD_CHOICE_BUTTONS do + local box = _G["LFDQueueFrameSpecificListButton"..u.."EnableButton"] + if(box and (not box.Panel)) then + box:RemoveTextures() + box:SetCheckboxTemplate(true, -2, -3) + box:SetFrameLevel(box:GetFrameLevel() + 50) + end + end + + for u = 1, NUM_LFR_CHOICE_BUTTONS do + local box = _G["LFRQueueFrameSpecificListButton"..u.."EnableButton"] + if(box and (not box.Panel)) then + box:RemoveTextures() + box:SetCheckboxTemplate(true, -2, -3) + box:SetFrameLevel(box:GetFrameLevel() + 50) + end + end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(LFDFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/loothistory.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/loothistory.lua new file mode 100644 index 0000000..6294540 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/loothistory.lua @@ -0,0 +1,132 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local MissingLootFrame_OnShow = function() + local N = GetNumMissingLootItems() + for u = 1, N do + local O = _G["MissingLootFrameItem"..u] + local icon = O.icon; + STYLE:ApplyItemButtonStyle(O, true) + local g, f, y, P = GetMissingLootItemInfo(u) + local color = GetItemQualityColor(P) or 0,0,0,1 + icon:SetTexture(g) + M:SetBackdropBorderColor(color) + end + local Q = ceil(N/2) + MissingLootFrame:SetHeight(Q * 43 + 38 + MissingLootFrameLabel:GetHeight()) +end + +local LootHistoryFrame_OnUpdate = function(o) + local N = C_LootHistory.GetNumItems() + for u = 1, N do + local M = LootHistoryFrame.itemFrames[u] + if not M.isStyled then + local Icon = M.Icon:GetTexture() + M:RemoveTextures() + M.Icon:SetTexture(Icon) + M.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + M:SetFixedPanelTemplate("Button") + M.Panel:WrapOuter(M.Icon) + M.Icon:SetParent(M.Panel) + M.isStyled = true + end + end +end +--[[ +########################################################## +LOOTHISTORY STYLER +########################################################## +]]-- +local function LootHistoryStyle() + LootHistoryFrame:SetFrameStrata('HIGH') + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.loot ~= true then return end + local M = MissingLootFrame; + M:RemoveTextures() + M:SetPanelTemplate("Pattern") + STYLE:ApplyCloseButtonStyle(MissingLootFramePassButton) + hooksecurefunc("MissingLootFrame_Show", MissingLootFrame_OnShow) + LootHistoryFrame:RemoveTextures() + STYLE:ApplyCloseButtonStyle(LootHistoryFrame.CloseButton) + LootHistoryFrame:RemoveTextures() + LootHistoryFrame:SetFixedPanelTemplate('Transparent') + STYLE:ApplyCloseButtonStyle(LootHistoryFrame.ResizeButton) + LootHistoryFrame.ResizeButton:SetFixedPanelTemplate() + LootHistoryFrame.ResizeButton:Width(LootHistoryFrame:GetWidth()) + LootHistoryFrame.ResizeButton:Height(19) + LootHistoryFrame.ResizeButton:ClearAllPoints() + LootHistoryFrame.ResizeButton:Point("TOP", LootHistoryFrame, "BOTTOM", 0, -2) + LootHistoryFrame.ResizeButton:SetNormalTexture("") + + local txt = LootHistoryFrame.ResizeButton:CreateFontString(nil,"OVERLAY") + txt:SetFont(SV.Media.font.roboto, 14, "NONE") + txt:SetAllPoints(LootHistoryFrame.ResizeButton) + txt:SetJustifyH("CENTER") + txt:SetText("RESIZE") + + LootHistoryFrameScrollFrame:RemoveTextures() + STYLE:ApplyScrollFrameStyle(LootHistoryFrameScrollFrameScrollBar) + hooksecurefunc("LootHistoryFrame_FullUpdate", LootHistoryFrame_OnUpdate) + MasterLooterFrame:RemoveTextures() + MasterLooterFrame:SetFixedPanelTemplate() + MasterLooterFrame:SetFrameStrata('FULLSCREEN_DIALOG') + hooksecurefunc("MasterLooterFrame_Show", function() + local J = MasterLooterFrame.Item; + if J then + local u = J.Icon; + local icon = u:GetTexture() + local S = ITEM_QUALITY_COLORS[LootFrame.selectedQuality] + J:RemoveTextures() + u:SetTexture(icon) + u:SetTexCoord(0.1, 0.9, 0.1, 0.9) + J:SetPanelTemplate("Pattern") + J.Panel:WrapOuter(u) + J.Panel:SetBackdropBorderColor(S.r, S.g, S.b) + end + for u = 1, MasterLooterFrame:GetNumChildren()do + local T = select(u, MasterLooterFrame:GetChildren()) + if T and not T.isStyled and not T:GetName() then + if T:GetObjectType() == "Button" then + if T:GetPushedTexture() then + STYLE:ApplyCloseButtonStyle(T) + else + T:SetFixedPanelTemplate() + T:SetButtonTemplate() + end + T.isStyled = true + end + end + end + end) + BonusRollFrame:RemoveTextures() + STYLE:ApplyAlertStyle(BonusRollFrame) + BonusRollFrame.PromptFrame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + BonusRollFrame.PromptFrame.Timer.Bar:SetTexture(SV.Media.bar.default) + BonusRollFrame.PromptFrame.Timer.Bar:SetVertexColor(0.1, 1, 0.1) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(LootHistoryStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lossofcontrol.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lossofcontrol.lua new file mode 100644 index 0000000..b96660e --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/lossofcontrol.lua @@ -0,0 +1,63 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +LOSSOFCONTROL STYLER +########################################################## +]]-- +local _hook_LossOfControl = function(self, ...) + self.Icon:ClearAllPoints() + self.Icon:SetPoint("CENTER", self, "CENTER", 0, 0) + self.AbilityName:ClearAllPoints() + self.AbilityName:SetPoint("BOTTOM", self, 0, -28) + self.AbilityName.scrollTime = nil; + self.AbilityName:SetFont(SV.Media.font.names, 20, 'OUTLINE') + self.TimeLeft.NumberText:ClearAllPoints() + self.TimeLeft.NumberText:SetPoint("BOTTOM", self, 4, -58) + self.TimeLeft.NumberText.scrollTime = nil; + self.TimeLeft.NumberText:SetFont(SV.Media.font.numbers, 20, 'OUTLINE') + self.TimeLeft.SecondsText:ClearAllPoints() + self.TimeLeft.SecondsText:SetPoint("BOTTOM", self, 0, -80) + self.TimeLeft.SecondsText.scrollTime = nil; + self.TimeLeft.SecondsText:SetFont(SV.Media.font.roboto, 20, 'OUTLINE') + if self.Anim:IsPlaying() then + self.Anim:Stop() + end +end + +local function LossOfControlStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.losscontrol ~= true then return end + local IconBackdrop = CreateFrame("Frame", nil, LossOfControlFrame) + IconBackdrop:WrapOuter(LossOfControlFrame.Icon) + IconBackdrop:SetFrameLevel(LossOfControlFrame:GetFrameLevel()-1) + IconBackdrop:SetPanelTemplate("Slot") + LossOfControlFrame.Icon:SetTexCoord(.1, .9, .1, .9) + LossOfControlFrame:RemoveTextures() + LossOfControlFrame.AbilityName:ClearAllPoints() + LossOfControlFrame:Size(LossOfControlFrame.Icon:GetWidth() + 50) + --local bg = CreateFrame("Frame", nil, LossOfControlFrame) + hooksecurefunc("LossOfControlFrame_SetUpDisplay", _hook_LossOfControl) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(LossOfControlStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/macro.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/macro.lua new file mode 100644 index 0000000..67f8299 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/macro.lua @@ -0,0 +1,126 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local MacroButtonList = { + "MacroSaveButton", "MacroCancelButton", "MacroDeleteButton", "MacroNewButton", "MacroExitButton", "MacroEditButton", "MacroFrameTab1", "MacroFrameTab2", "MacroPopupOkayButton", "MacroPopupCancelButton" +} +local MacroButtonList2 = { + "MacroDeleteButton", "MacroNewButton", "MacroExitButton" +} +--[[ +########################################################## +MACRO UI STYLER +########################################################## +]]-- +local function MacroUIStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.macro ~= true then return end + STYLE:ApplyCloseButtonStyle(MacroFrameCloseButton) + STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(MacroFrameScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(MacroPopupScrollFrameScrollBar) + MacroFrame:Width(360) + for b = 1, #MacroButtonList do + _G[MacroButtonList[b]]:RemoveTextures() + _G[MacroButtonList[b]]:SetButtonTemplate() + end + for b = 1, #MacroButtonList2 do + local a1,p,a2,x,y = _G[MacroButtonList2[b]]:GetPoint() + _G[MacroButtonList2[b]]:SetPoint(a1,p,a2,x,-25) + end + for b = 1, 2 do + tab = _G[format("MacroFrameTab%s", b)] + tab:Height(22) + end + MacroFrameTab1:Point("TOPLEFT", MacroFrame, "TOPLEFT", 85, -39) + MacroFrameTab2:Point("LEFT", MacroFrameTab1, "RIGHT", 4, 0) + MacroFrame:RemoveTextures() + MacroFrame:SetPanelTemplate("Action") + MacroFrame.Panel:SetPoint("BOTTOMRIGHT",MacroFrame,"BOTTOMRIGHT",0,-25) + MacroFrameText:SetFont(SV.Media.font.roboto, 10, "OUTLINE") + MacroFrameTextBackground:RemoveTextures() + MacroFrameTextBackground:SetBasicPanel() + MacroPopupFrame:RemoveTextures() + MacroPopupFrame:SetBasicPanel() + MacroPopupScrollFrame:RemoveTextures() + MacroPopupScrollFrame:SetPanelTemplate("Pattern") + MacroPopupScrollFrame.Panel:Point("TOPLEFT", 51, 2) + MacroPopupScrollFrame.Panel:Point("BOTTOMRIGHT", -4, 4) + MacroButtonScrollFrame:SetBasicPanel() + MacroPopupEditBox:SetEditboxTemplate() + MacroPopupNameLeft:SetTexture(0,0,0,0) + MacroPopupNameMiddle:SetTexture(0,0,0,0) + MacroPopupNameRight:SetTexture(0,0,0,0) + MacroFrameInset:Die() + MacroEditButton:ClearAllPoints() + MacroEditButton:Point("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 10, 0) + STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrame) + MacroPopupFrame:HookScript("OnShow", function(c) + c:ClearAllPoints() + c:Point("TOPLEFT", MacroFrame, "TOPRIGHT", 5, -2) + end) + MacroFrameSelectedMacroButton:RemoveTextures() + MacroFrameSelectedMacroButton:SetSlotTemplate() + MacroFrameSelectedMacroButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + MacroFrameSelectedMacroButtonIcon:FillInner() + MacroFrameCharLimitText:ClearAllPoints() + MacroFrameCharLimitText:Point("BOTTOM", MacroFrameTextBackground, -25, -35) + for b = 1, MAX_ACCOUNT_MACROS do + local d = _G["MacroButton"..b] + local e = _G["MacroButton"..b.."Icon"] + local f = _G["MacroPopupButton"..b] + local g = _G["MacroPopupButton"..b.."Icon"] + if d then + d:RemoveTextures() + d:SetButtonTemplate() + local level = d:GetFrameLevel() + if(level > 0) then + d.Panel:SetFrameLevel(level - 1) + else + d.Panel:SetFrameLevel(0) + end + d:SetBackdropColor(0, 0, 0, 0) + end + if e then + e:SetTexCoord(0.1, 0.9, 0.1, 0.9) + e:FillInner() + e:SetDrawLayer("OVERLAY") + end + if f then + f:RemoveTextures() + f:SetButtonTemplate() + f:SetBackdropColor(0, 0, 0, 0) + end + if g then + g:SetTexCoord(0.1, 0.9, 0.1, 0.9) + g:FillInner() + end + end +end + +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_MacroUI", MacroUIStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/mailbox.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/mailbox.lua new file mode 100644 index 0000000..972bf14 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/mailbox.lua @@ -0,0 +1,144 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local function MailFrame_OnUpdate() + for b = 1, ATTACHMENTS_MAX_SEND do + local d = _G["SendMailAttachment"..b] + if not d.styled then + d:RemoveTextures()d:SetFixedPanelTemplate("Default") + d:SetButtonTemplate() + d.styled = true + end + local e = d:GetNormalTexture() + if e then + e:SetTexCoord(0.1, 0.9, 0.1, 0.9) + e:FillInner() + end + end +end +--[[ +########################################################## +MAILBOX STYLER +########################################################## +]]-- +local function MailBoxStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.mail ~= true then return end + + STYLE:ApplyWindowStyle(MailFrame) + + for b = 1, INBOXITEMS_TO_DISPLAY do + local i = _G["MailItem"..b] + i:RemoveTextures() + i:SetPanelTemplate("Inset") + i.Panel:Point("TOPLEFT", 2, 1) + i.Panel:Point("BOTTOMRIGHT", -2, 2) + local d = _G["MailItem"..b.."Button"] + d:RemoveTextures() + d:SetButtonTemplate() + local e = _G["MailItem"..b.."ButtonIcon"] + e:SetTexCoord(0.1, 0.9, 0.1, 0.9) + e:FillInner() + end + STYLE:ApplyCloseButtonStyle(MailFrameCloseButton) + STYLE:ApplyPaginationStyle(InboxPrevPageButton) + STYLE:ApplyPaginationStyle(InboxNextPageButton) + MailFrameTab1:RemoveTextures() + MailFrameTab2:RemoveTextures() + STYLE:ApplyTabStyle(MailFrameTab1) + STYLE:ApplyTabStyle(MailFrameTab2) + SendMailScrollFrame:RemoveTextures(true) + SendMailScrollFrame:SetFixedPanelTemplate("Inset") + STYLE:ApplyScrollFrameStyle(SendMailScrollFrameScrollBar) + SendMailNameEditBox:SetEditboxTemplate() + SendMailSubjectEditBox:SetEditboxTemplate() + SendMailMoneyGold:SetEditboxTemplate() + SendMailMoneySilver:SetEditboxTemplate() + SendMailMoneyCopper:SetEditboxTemplate() + SendMailMoneyBg:Die() + SendMailMoneyInset:RemoveTextures() + + _G["SendMailMoneySilver"]:SetEditboxTemplate() + _G["SendMailMoneySilver"].Panel:Point("TOPLEFT", -2, 1) + _G["SendMailMoneySilver"].Panel:Point("BOTTOMRIGHT", -12, -1) + _G["SendMailMoneySilver"]:SetTextInsets(-1, -1, -2, -2) + + _G["SendMailMoneyCopper"]:SetEditboxTemplate() + _G["SendMailMoneyCopper"].Panel:Point("TOPLEFT", -2, 1) + _G["SendMailMoneyCopper"].Panel:Point("BOTTOMRIGHT", -12, -1) + _G["SendMailMoneyCopper"]:SetTextInsets(-1, -1, -2, -2) + + SendMailNameEditBox.Panel:Point("BOTTOMRIGHT", 2, 4) + SendMailSubjectEditBox.Panel:Point("BOTTOMRIGHT", 2, 0) + SendMailFrame:RemoveTextures() + + hooksecurefunc("SendMailFrame_Update", MailFrame_OnUpdate) + SendMailMailButton:SetButtonTemplate() + SendMailCancelButton:SetButtonTemplate() + OpenMailFrame:RemoveTextures(true) + OpenMailFrame:SetFixedPanelTemplate("Transparent", true) + OpenMailFrameInset:Die() + STYLE:ApplyCloseButtonStyle(OpenMailFrameCloseButton) + OpenMailReportSpamButton:SetButtonTemplate() + OpenMailReplyButton:SetButtonTemplate() + OpenMailDeleteButton:SetButtonTemplate() + OpenMailCancelButton:SetButtonTemplate() + InboxFrame:RemoveTextures() + MailFrameInset:Die() + OpenMailScrollFrame:RemoveTextures(true) + OpenMailScrollFrame:SetFixedPanelTemplate("Default") + STYLE:ApplyScrollFrameStyle(OpenMailScrollFrameScrollBar) + SendMailBodyEditBox:SetTextColor(1, 1, 1) + OpenMailBodyText:SetTextColor(1, 1, 1) + InvoiceTextFontNormal:SetTextColor(1, 1, 1) + OpenMailArithmeticLine:Die() + OpenMailLetterButton:RemoveTextures() + OpenMailLetterButton:SetFixedPanelTemplate("Default") + OpenMailLetterButton:SetButtonTemplate() + OpenMailLetterButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + OpenMailLetterButtonIconTexture:FillInner() + OpenMailMoneyButton:RemoveTextures() + OpenMailMoneyButton:SetFixedPanelTemplate("Default") + OpenMailMoneyButton:SetButtonTemplate() + OpenMailMoneyButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + OpenMailMoneyButtonIconTexture:FillInner() + for b = 1, ATTACHMENTS_MAX_SEND do + local d = _G["OpenMailAttachmentButton"..b] + d:RemoveTextures() + d:SetButtonTemplate() + local e = _G["OpenMailAttachmentButton"..b.."IconTexture"] + if e then + e:SetTexCoord(0.1, 0.9, 0.1, 0.9) + e:FillInner() + end + end + OpenMailReplyButton:Point("RIGHT", OpenMailDeleteButton, "LEFT", -2, 0) + OpenMailDeleteButton:Point("RIGHT", OpenMailCancelButton, "LEFT", -2, 0) + SendMailMailButton:Point("RIGHT", SendMailCancelButton, "LEFT", -2, 0) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(MailBoxStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/merchant.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/merchant.lua new file mode 100644 index 0000000..ee68517 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/merchant.lua @@ -0,0 +1,91 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +FRAME STYLER +########################################################## +]]-- +local function MerchantStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.merchant ~= true then return end + MerchantFrame:RemoveTextures(true) + MerchantFrame:SetPanelTemplate("Halftone", false, nil, 2, 4) + local level = MerchantFrame:GetFrameLevel() + if(level > 0) then + MerchantFrame:SetFrameLevel(level - 1) + else + MerchantFrame:SetFrameLevel(0) + end + MerchantBuyBackItem:RemoveTextures(true) + MerchantBuyBackItem:SetPanelTemplate("Inset", true, 2, 2, 3) + MerchantBuyBackItem.Panel:SetFrameLevel(MerchantBuyBackItem.Panel:GetFrameLevel() + 1) + MerchantBuyBackItemItemButton:RemoveTextures() + MerchantBuyBackItemItemButton:SetButtonTemplate() + MerchantExtraCurrencyInset:RemoveTextures() + MerchantExtraCurrencyBg:RemoveTextures() + MerchantFrameInset:RemoveTextures() + MerchantMoneyBg:RemoveTextures() + MerchantMoneyInset:RemoveTextures() + MerchantFrameInset:SetPanelTemplate("Inset") + MerchantFrameInset.Panel:SetFrameLevel(MerchantFrameInset.Panel:GetFrameLevel() + 1) + STYLE:ApplyDropdownStyle(MerchantFrameLootFilter) + for b = 1, 2 do + STYLE:ApplyTabStyle(_G["MerchantFrameTab"..b]) + end + for b = 1, 12 do + local d = _G["MerchantItem"..b.."ItemButton"] + local e = _G["MerchantItem"..b.."ItemButtonIconTexture"] + local o = _G["MerchantItem"..b]o:RemoveTextures(true) + o:SetFixedPanelTemplate("Inset") + d:RemoveTextures() + d:SetButtonTemplate() + d:Point("TOPLEFT", o, "TOPLEFT", 4, -4) + e:SetTexCoord(0.1, 0.9, 0.1, 0.9) + e:FillInner() + _G["MerchantItem"..b.."MoneyFrame"]:ClearAllPoints() + _G["MerchantItem"..b.."MoneyFrame"]:Point("BOTTOMLEFT", d, "BOTTOMRIGHT", 3, 0) + end + MerchantBuyBackItemItemButton:RemoveTextures() + MerchantBuyBackItemItemButton:SetButtonTemplate() + MerchantBuyBackItemItemButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + MerchantBuyBackItemItemButtonIconTexture:FillInner() + MerchantRepairItemButton:SetButtonTemplate() + for b = 1, MerchantRepairItemButton:GetNumRegions()do + local p = select(b, MerchantRepairItemButton:GetRegions()) + if p:GetObjectType() == "Texture"then + p:SetTexCoord(0.04, 0.24, 0.06, 0.5) + p:FillInner() + end + end MerchantGuildBankRepairButton:SetButtonTemplate() + MerchantGuildBankRepairButtonIcon:SetTexCoord(0.61, 0.82, 0.1, 0.52) + MerchantGuildBankRepairButtonIcon:FillInner() + MerchantRepairAllButton:SetButtonTemplate() + MerchantRepairAllIcon:SetTexCoord(0.34, 0.1, 0.34, 0.535, 0.535, 0.1, 0.535, 0.535) + MerchantRepairAllIcon:FillInner() + MerchantFrame:Width(360) + STYLE:ApplyCloseButtonStyle(MerchantFrameCloseButton, MerchantFrame.Panel) + STYLE:ApplyPaginationStyle(MerchantNextPageButton) + STYLE:ApplyPaginationStyle(MerchantPrevPageButton) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(MerchantStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua new file mode 100644 index 0000000..807a9c5 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petbattle.lua @@ -0,0 +1,379 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local PBAB_WIDTH = 382; +local PBAB_HEIGHT = 72; +local PetBattleActionBar = CreateFrame("Frame", "SVUI_PetBattleActionBar", UIParent) + +local function PetBattleButtonHelper(frame) + frame:SetPanelTemplate("Blackout") + frame:SetNormalTexture("") + frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + frame.Icon:SetDrawLayer('BORDER') + frame.Icon:SetParent(frame.Panel) + if(frame.SelectedHighlight) then frame.SelectedHighlight:SetAlpha(0) end + if(frame.checked) then frame.checked = true end + if(frame.pushed) then frame.pushed:FillInner(frame.Panel) end + if(frame.hover) then frame.hover:FillInner(frame.Panel) end + frame:SetFrameStrata('LOW') +end +--[[ +########################################################## +PETBATTLE STYLER +########################################################## +]]-- +local function PetBattleStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.petbattleui ~= true then + return + end + + local PetBattleFrame = _G["PetBattleFrame"]; + local BottomFrame = PetBattleFrame.BottomFrame; + local ActiveFramesList = { PetBattleFrame.ActiveAlly, PetBattleFrame.ActiveEnemy } + local StandardFramesList = { PetBattleFrame.Ally2, PetBattleFrame.Ally3, PetBattleFrame.Enemy2, PetBattleFrame.Enemy3 } + + STYLE:ApplyCloseButtonStyle(FloatingBattlePetTooltip.CloseButton) + PetBattleFrame:RemoveTextures() + + for i, frame in pairs(ActiveFramesList) do + if(not frame.isStyled) then + frame.Border:SetAlpha(0) + frame.Border2:SetAlpha(0) + frame.healthBarWidth = 300; + + frame.IconBackdrop = CreateFrame("Frame", nil, frame) + frame.IconBackdrop:SetFrameLevel(0) + frame.IconBackdrop:WrapOuter(frame.Icon, 3, 3) + frame.IconBackdrop:SetSlotTemplate(true, 3, 0, 0, true); + + frame.IconBackdrop.Panel:SetFixedPanelTemplate("Blackout") + + frame.BorderFlash:Die() + frame.HealthBarBG:Die() + frame.HealthBarFrame:Die() + frame.HealthBarBackdrop = CreateFrame("Frame", nil, frame) + frame.HealthBarBackdrop:SetFrameLevel(frame:GetFrameLevel()-1) + frame.HealthBarBackdrop:SetFixedPanelTemplate("Blackout") + frame.HealthBarBackdrop:Width(frame.healthBarWidth+(2)) + frame.ActualHealthBar:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) + frame.PetTypeFrame = CreateFrame("Frame", nil, frame) + frame.PetTypeFrame:Size(100, 23) + frame.PetTypeFrame.text = frame.PetTypeFrame:CreateFontString(nil, 'OVERLAY') + frame.PetTypeFrame.text:SetFont(SV.Media.font.roboto, 12, "OUTLINE") + frame.PetTypeFrame.text:SetText("") + frame.ActualHealthBar:ClearAllPoints() + frame.Name:SetFontObject(SystemFont_Shadow_Outline_Huge2) + frame.Name:ClearAllPoints() + frame.FirstAttack = frame:CreateTexture(nil, "ARTWORK") + frame.FirstAttack:Size(30) + frame.FirstAttack:SetTexture("Interface\\PetBattles\\PetBattle-StatIcons") + if i == 1 then + frame.HealthBarBackdrop:Point('TOPLEFT', frame.ActualHealthBar, 'TOPLEFT', -1, 1) + frame.HealthBarBackdrop:Point('BOTTOMLEFT', frame.ActualHealthBar, 'BOTTOMLEFT', -1, -1) + frame.ActualHealthBar:SetVertexColor(171/255, 214/255, 116/255) + PetBattleFrame.Ally2.iconPoint = frame.IconBackdrop; + PetBattleFrame.Ally3.iconPoint = frame.IconBackdrop; + frame.ActualHealthBar:Point('BOTTOMLEFT', frame.Icon, 'BOTTOMRIGHT', 10, 0) + frame.Name:Point('BOTTOMLEFT', frame.ActualHealthBar, 'TOPLEFT', 0, 8) + frame.PetTypeFrame:SetPoint("BOTTOMRIGHT", frame.HealthBarBackdrop, "TOPRIGHT", 0, 4) + frame.PetTypeFrame.text:SetPoint("RIGHT") + frame.FirstAttack:SetPoint("LEFT", frame.HealthBarBackdrop, "RIGHT", 5, 0) + frame.FirstAttack:SetTexCoord(frame.SpeedIcon:GetTexCoord()) + frame.FirstAttack:SetVertexColor(.1, .1, .1, 1) + else + frame.HealthBarBackdrop:Point('TOPRIGHT', frame.ActualHealthBar, 'TOPRIGHT', 1, 1) + frame.HealthBarBackdrop:Point('BOTTOMRIGHT', frame.ActualHealthBar, 'BOTTOMRIGHT', 1, -1) + frame.ActualHealthBar:SetVertexColor(196/255, 30/255, 60/255) + PetBattleFrame.Enemy2.iconPoint = frame.IconBackdrop; + PetBattleFrame.Enemy3.iconPoint = frame.IconBackdrop; + frame.ActualHealthBar:Point('BOTTOMRIGHT', frame.Icon, 'BOTTOMLEFT', -10, 0) + frame.Name:Point('BOTTOMRIGHT', frame.ActualHealthBar, 'TOPRIGHT', 0, 8) + frame.PetTypeFrame:SetPoint("BOTTOMLEFT", frame.HealthBarBackdrop, "TOPLEFT", 2, 4) + frame.PetTypeFrame.text:SetPoint("LEFT") + frame.FirstAttack:SetPoint("RIGHT", frame.HealthBarBackdrop, "LEFT", -5, 0) + frame.FirstAttack:SetTexCoord(.5, 0, .5, 1) + frame.FirstAttack:SetVertexColor(.1, .1, .1, 1) + end + frame.HealthText:ClearAllPoints() + frame.HealthText:SetPoint('CENTER', frame.HealthBarBackdrop, 'CENTER') + frame.PetType:SetFrameLevel(frame.PetTypeFrame:GetFrameLevel()+2) + frame.PetType:ClearAllPoints() + frame.PetType:SetAllPoints(frame.PetTypeFrame) + frame.PetType:SetAlpha(0) + frame.LevelUnderlay:SetAlpha(0) + frame.Level:SetFontObject(NumberFont_Outline_Huge) + frame.Level:ClearAllPoints() + frame.Level:Point('BOTTOMLEFT', frame.Icon, 'BOTTOMLEFT', -2, -2) + if frame.SpeedIcon then + frame.SpeedIcon:ClearAllPoints() + frame.SpeedIcon:SetPoint("CENTER") + frame.SpeedIcon:SetAlpha(0) + frame.SpeedUnderlay:SetAlpha(0) + end + frame.isStyled = true + end + end + + for _, frame in pairs(StandardFramesList) do + if(not frame.hasTempBG) then + frame.BorderAlive:SetAlpha(0) + frame.HealthBarBG:SetAlpha(0) + frame.HealthDivider:SetAlpha(0) + frame:Size(40) + + frame.IconBackdrop = CreateFrame("Frame", nil, frame) + frame.IconBackdrop:SetFrameLevel(0) + frame.IconBackdrop:WrapOuter(frame, 2, 2) + frame.IconBackdrop:SetSlotTemplate(true, 2, 0, 0, true); + + frame.IconBackdrop.Panel:SetFixedPanelTemplate("Blackout") + + frame:ClearAllPoints() + frame.healthBarWidth = 40; + frame.ActualHealthBar:ClearAllPoints() + frame.ActualHealthBar:SetPoint("TOPLEFT", frame.IconBackdrop, 'BOTTOMLEFT', 2, -3) + frame.ActualHealthBar:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) + frame.HealthBarBackdrop = CreateFrame("Frame", nil, frame) + frame.HealthBarBackdrop:SetFrameLevel(frame:GetFrameLevel()-1) + frame.HealthBarBackdrop:SetFixedPanelTemplate("Blackout") + frame.HealthBarBackdrop:Width(frame.healthBarWidth+2) + frame.HealthBarBackdrop:Point('TOPLEFT', frame.ActualHealthBar, 'TOPLEFT', -1, 1) + frame.HealthBarBackdrop:Point('BOTTOMLEFT', frame.ActualHealthBar, 'BOTTOMLEFT', -1, -1) + frame.hasTempBG = true + end + end + + PetBattleActionBar:SetParent(PetBattleFrame) + PetBattleActionBar:SetSize(PBAB_WIDTH, PBAB_HEIGHT) + PetBattleActionBar:EnableMouse(true) + PetBattleActionBar:SetFrameLevel(0) + PetBattleActionBar:SetFrameStrata('BACKGROUND') + PetBattleActionBar:SetFixedPanelTemplate("Blackout") + + if(SuperDockBottomDataAnchor) then + PetBattleActionBar:SetPoint("BOTTOM", SuperDockBottomDataAnchor, "TOP", 0, 4) + else + PetBattleActionBar:SetPoint("BOTTOM", SV.UIParent, "BOTTOM", 0, 4) + end + + PetBattleFrame.TopVersusText:ClearAllPoints() + PetBattleFrame.TopVersusText:SetPoint("TOP", PetBattleFrame, "TOP", 0, -42) + + PetBattleFrame.Ally2:SetPoint("TOPRIGHT", PetBattleFrame.Ally2.iconPoint, "TOPLEFT", -6, -2) + PetBattleFrame.Ally3:SetPoint('TOPRIGHT', PetBattleFrame.Ally2, 'TOPLEFT', -8, 0) + PetBattleFrame.Enemy2:SetPoint("TOPLEFT", PetBattleFrame.Enemy2.iconPoint, "TOPRIGHT", 6, -2) + PetBattleFrame.Enemy3:SetPoint('TOPLEFT', PetBattleFrame.Enemy2, 'TOPRIGHT', 8, 0) + + BottomFrame:RemoveTextures() + BottomFrame.TurnTimer:RemoveTextures() + + BottomFrame.TurnTimer.SkipButton:ClearAllPoints() + BottomFrame.TurnTimer.SkipButton:SetParent(PetBattleActionBar) + BottomFrame.TurnTimer.SkipButton:Size((PBAB_WIDTH * 0.2) - 4, 18) + BottomFrame.TurnTimer.SkipButton:SetPoint("BOTTOMLEFT", PetBattleActionBar.Panel, "TOPLEFT", 2, 2) + BottomFrame.TurnTimer.SkipButton:SetButtonTemplate() + + BottomFrame.TurnTimer:Size(BottomFrame.TurnTimer.SkipButton:GetWidth(), BottomFrame.TurnTimer.SkipButton:GetHeight()) + BottomFrame.TurnTimer:ClearAllPoints() + BottomFrame.TurnTimer:SetPoint("TOP", SV.UIParent, "TOP", 0, -140) + BottomFrame.TurnTimer.TimerText:SetPoint("CENTER") + + BottomFrame.FlowFrame:RemoveTextures() + BottomFrame.MicroButtonFrame:Die() + BottomFrame.Delimiter:RemoveTextures() + + BottomFrame.xpBar:ClearAllPoints() + BottomFrame.xpBar:SetParent(PetBattleActionBar) + BottomFrame.xpBar:Size((PBAB_WIDTH * 0.8) - 4, 16) + BottomFrame.xpBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) + BottomFrame.xpBar:SetPanelTemplate("Bar") + BottomFrame.xpBar:SetPoint("BOTTOMRIGHT", PetBattleActionBar.Panel, "TOPRIGHT", -3, 3) + BottomFrame.xpBar:SetScript("OnShow", function(self) + self:RemoveTextures() + self:SetStatusBarTexture(SV.Media.bar.default) + end) + + for i = 1, 3 do + local pet = BottomFrame.PetSelectionFrame["Pet"..i] + pet.HealthBarBG:SetAlpha(0) + pet.HealthDivider:SetAlpha(0) + pet.ActualHealthBar:SetAlpha(0) + pet.SelectedTexture:SetAlpha(0) + pet.MouseoverHighlight:SetAlpha(0) + pet.Framing:SetAlpha(0) + pet.Icon:SetAlpha(0) + pet.Name:SetAlpha(0) + pet.DeadOverlay:SetAlpha(0) + pet.Level:SetAlpha(0) + pet.HealthText:SetAlpha(0) + end + + PetBattleQueueReadyFrame:RemoveTextures() + PetBattleQueueReadyFrame:SetBasicPanel() + PetBattleQueueReadyFrame.AcceptButton:SetButtonTemplate() + PetBattleQueueReadyFrame.DeclineButton:SetButtonTemplate() + PetBattleQueueReadyFrame.Art:SetTexture([[Interface\PetBattles\PetBattlesQueue]]) + + --[[ TOO MANY GOD DAMN HOOKS ]]-- + hooksecurefunc("PetBattleFrame_UpdateSpeedIndicators", function() + if not PetBattleFrame.ActiveAlly.SpeedIcon:IsShown() and not PetBattleFrame.ActiveEnemy.SpeedIcon:IsShown() then + PetBattleFrame.ActiveAlly.FirstAttack:Hide() + PetBattleFrame.ActiveEnemy.FirstAttack:Hide() + return + end + PetBattleFrame.ActiveAlly.FirstAttack:Show() + if PetBattleFrame.ActiveAlly.SpeedIcon:IsShown() then + PetBattleFrame.ActiveAlly.FirstAttack:SetVertexColor(0, 1, 0, 1) + else + PetBattleFrame.ActiveAlly.FirstAttack:SetVertexColor(.8, 0, .3, 1) + end + PetBattleFrame.ActiveEnemy.FirstAttack:Show() + if PetBattleFrame.ActiveEnemy.SpeedIcon:IsShown() then + PetBattleFrame.ActiveEnemy.FirstAttack:SetVertexColor(0, 1, 0, 1) + else + PetBattleFrame.ActiveEnemy.FirstAttack:SetVertexColor(.8, 0, .3, 1) + end + end) + + hooksecurefunc("PetBattleUnitFrame_UpdatePetType", function(self) + if self.PetType then + local pettype = C_PetBattles.GetPetType(self.petOwner, self.petIndex) + if self.PetTypeFrame then + self.PetTypeFrame.text:SetText(PET_TYPE_SUFFIX[pettype]) + end + end + end) + + hooksecurefunc("PetBattleAuraHolder_Update", function(self) + if ( not self.petOwner or not self.petIndex ) then + self:Hide(); + return; + end + + local nextFrame = 1; + for i=1, C_PetBattles.GetNumAuras(self.petOwner, self.petIndex) do + local auraID, instanceID, turnsRemaining, isBuff = C_PetBattles.GetAuraInfo(self.petOwner, self.petIndex, i); + if ( (isBuff and self.displayBuffs) or (not isBuff and self.displayDebuffs) ) then + local frame = self.frames[nextFrame] + frame.DebuffBorder:Hide() + if not frame.isStyled then + frame:SetSlotTemplate(true, 2, -8,-2) + frame.Icon:FillInner(frame.Panel, 2, 2) + frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + frame.isStyled = true + end + if isBuff then + frame:SetBackdropBorderColor(0, 1, 0) + else + frame:SetBackdropBorderColor(1, 0, 0) + end + frame.Duration:SetFont(SV.Media.font.numbers, 16, "OUTLINE") + frame.Duration:ClearAllPoints() + frame.Duration:SetPoint("BOTTOMLEFT", frame.Icon, "BOTTOMLEFT", 4, 4) + if turnsRemaining > 0 then + frame.Duration:SetText(turnsRemaining) + end + nextFrame = nextFrame + 1 + end + end + end) + + hooksecurefunc("PetBattleWeatherFrame_Update", function(self) + local auraID = C_PetBattles.GetAuraInfo(LE_BATTLE_PET_WEATHER, PET_BATTLE_PAD_INDEX, 1) + if auraID then + self.Icon:Hide() + self.Name:Hide() + self.DurationShadow:Hide() + self.Label:Hide() + self.Duration:SetPoint("CENTER", self, 0, 8) + self:ClearAllPoints() + self:SetPoint("TOP", SV.UIParent, 0, -15) + end + end) + + hooksecurefunc("PetBattleUnitFrame_UpdateDisplay", function(self) + self.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + --Update the pet rarity border + if (self.IconBackdrop) then + local petOwner = self.petOwner; + local petIndex = self.petIndex; + local rarity = C_PetBattles.GetBreedQuality(petOwner, petIndex); + if (ENABLE_COLORBLIND_MODE ~= "1") then + self.IconBackdrop:SetBackdropColor(ITEM_QUALITY_COLORS[rarity-1].r, ITEM_QUALITY_COLORS[rarity-1].g, ITEM_QUALITY_COLORS[rarity-1].b); + self.IconBackdrop:SetBackdropBorderColor(ITEM_QUALITY_COLORS[rarity-1].r, ITEM_QUALITY_COLORS[rarity-1].g, ITEM_QUALITY_COLORS[rarity-1].b); + end + end + end) + + hooksecurefunc("PetBattleAbilityTooltip_Show", function() + SV:AnchorToCursor(PetBattlePrimaryAbilityTooltip) + end) + + hooksecurefunc(BottomFrame.TurnTimer.SkipButton, "SetPoint", function(self, arg1, _, arg2, arg3, arg4) + if (arg1 ~= "BOTTOMLEFT" or arg2 ~= "TOPLEFT" or arg3 ~= 2 or arg4 ~= 2) then + self:ClearAllPoints() + self:SetPoint("BOTTOMLEFT", PetBattleActionBar.Panel, "TOPLEFT", 2, 2) + end + end) + + hooksecurefunc("PetBattlePetSelectionFrame_Show", function() + BottomFrame.PetSelectionFrame:ClearAllPoints() + BottomFrame.PetSelectionFrame:SetPoint("BOTTOM", BottomFrame.xpBar, "TOP", 0, 8) + end) + + hooksecurefunc("PetBattleFrame_UpdateActionBarLayout", function(self) + for i = 1, NUM_BATTLE_PET_ABILITIES do + local actionButton = self.BottomFrame.abilityButtons[i] + PetBattleButtonHelper(actionButton) + actionButton:SetParent(PetBattleActionBar) + actionButton:ClearAllPoints() + if i == 1 then + actionButton:SetPoint("BOTTOMLEFT", 10, 10) + else + local lastActionButton = self.BottomFrame.abilityButtons[i - 1] + actionButton:SetPoint("LEFT", lastActionButton, "RIGHT", 10, 0) + end + end + self.BottomFrame.SwitchPetButton:SetParent(PetBattleActionBar) + self.BottomFrame.SwitchPetButton:ClearAllPoints() + self.BottomFrame.SwitchPetButton:SetPoint("LEFT", self.BottomFrame.abilityButtons[3], "RIGHT", 10, 0) + PetBattleButtonHelper(self.BottomFrame.SwitchPetButton) + self.BottomFrame.CatchButton:SetParent(PetBattleActionBar) + self.BottomFrame.CatchButton:ClearAllPoints() + self.BottomFrame.CatchButton:SetPoint("LEFT", self.BottomFrame.SwitchPetButton, "RIGHT", 10, 0) + PetBattleButtonHelper(self.BottomFrame.CatchButton) + self.BottomFrame.ForfeitButton:SetParent(PetBattleActionBar) + self.BottomFrame.ForfeitButton:ClearAllPoints() + self.BottomFrame.ForfeitButton:SetPoint("LEFT", self.BottomFrame.CatchButton, "RIGHT", 10, 0) + PetBattleButtonHelper(self.BottomFrame.ForfeitButton) + end) + + SV.SVTip:ReLoad() +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(PetBattleStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petition.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petition.lua new file mode 100644 index 0000000..ec4aecb --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petition.lua @@ -0,0 +1,54 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +PETITIONFRAME STYLER +########################################################## +]]-- +local function PetitionFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.petition ~= true then + return + end + PetitionFrame:RemoveTextures(true) + PetitionFrame:SetFixedPanelTemplate("Transparent", true) + PetitionFrameInset:Die() + PetitionFrameSignButton:SetButtonTemplate() + PetitionFrameRequestButton:SetButtonTemplate() + PetitionFrameRenameButton:SetButtonTemplate() + PetitionFrameCancelButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(PetitionFrameCloseButton) + PetitionFrameCharterTitle:SetTextColor(1, 1, 0) + PetitionFrameCharterName:SetTextColor(1, 1, 1) + PetitionFrameMasterTitle:SetTextColor(1, 1, 0) + PetitionFrameMasterName:SetTextColor(1, 1, 1) + PetitionFrameMemberTitle:SetTextColor(1, 1, 0) + for g = 1, 9 do + _G["PetitionFrameMemberName"..g]:SetTextColor(1, 1, 1) + end + PetitionFrameInstructions:SetTextColor(1, 1, 1) + PetitionFrameRenameButton:Point("LEFT", PetitionFrameRequestButton, "RIGHT", 3, 0) + PetitionFrameRenameButton:Point("RIGHT", PetitionFrameCancelButton, "LEFT", -3, 0) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(PetitionFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua new file mode 100644 index 0000000..fac1626 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petjournal.lua @@ -0,0 +1,275 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local function PetJournal_UpdateMounts() + for b = 1, #MountJournal.ListScrollFrame.buttons do + local d = _G["MountJournalListScrollFrameButton"..b] + local e = _G["MountJournalListScrollFrameButton"..b.."Name"] + if d.selectedTexture:IsShown() then + e:SetTextColor(1, 1, 0) + if d.Panel then + d:SetBackdropBorderColor(1, 1, 0) + end + if d.IconShadow then + d.IconShadow:SetBackdropBorderColor(1, 1, 0) + end + else + e:SetTextColor(1, 1, 1) + if d.Panel then + d:SetBackdropBorderColor(0,0,0,1) + end + if d.IconShadow then + d.IconShadow:SetBackdropBorderColor(0,0,0,1) + end + end + end +end + +local function PetJournal_UpdatePets() + local u = PetJournal.listScroll.buttons; + local isWild = PetJournal.isWild; + for b = 1, #u do + local v = u[b].index; + if not v then + break + end + local d = _G["PetJournalListScrollFrameButton"..b] + local e = _G["PetJournalListScrollFrameButton"..b.."Name"] + local w, x, y, z, level, favorite, A, B, C, D, E, F, G, H, I = C_PetJournal.GetPetInfoByIndex(v, isWild) + if w ~= nil then + local J, K, L, M, N = C_PetJournal.GetPetStats(w) + if d.selectedTexture:IsShown() then + e:SetTextColor(1, 1, 0) + else + e:SetTextColor(1, 1, 1) + end + if N then + local color = ITEM_QUALITY_COLORS[N-1] + if d.Panel then + d.Panel:SetBackdropBorderColor(color.r, color.g, color.b) + end + if d.IconShadow then + d.IconShadow:SetBackdropBorderColor(color.r, color.g, color.b) + end + else + if d.Panel then + d.Panel:SetBackdropBorderColor(1, 1, 0, 0.5) + end + if d.IconShadow then + d.IconShadow:SetBackdropBorderColor(1, 1, 0, 0.5) + end + end + end + end +end +--[[ +########################################################## +FRAME STYLER +########################################################## +]]-- +local function PetJournalStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.mounts ~= true then return end + + STYLE:ApplyWindowStyle(PetJournalParent) + + PetJournalParentPortrait:Hide() + STYLE:ApplyTabStyle(PetJournalParentTab1) + STYLE:ApplyTabStyle(PetJournalParentTab2) + STYLE:ApplyCloseButtonStyle(PetJournalParentCloseButton) + + MountJournal:RemoveTextures() + MountJournal.LeftInset:RemoveTextures() + MountJournal.RightInset:RemoveTextures() + MountJournal.MountDisplay:RemoveTextures() + MountJournal.MountDisplay.ShadowOverlay:RemoveTextures() + MountJournal.MountCount:RemoveTextures() + MountJournalListScrollFrame:RemoveTextures() + MountJournalMountButton:SetButtonTemplate() + MountJournalSearchBox:SetEditboxTemplate() + + STYLE:ApplyScrollFrameStyle(MountJournalListScrollFrameScrollBar) + MountJournal.MountDisplay:SetFixedPanelTemplate("ModelComic") + + for i = 1, #MountJournal.ListScrollFrame.buttons do + local button = _G["MountJournalListScrollFrameButton"..i] + if(button) then + STYLE:ApplyItemButtonStyle(button, nil, true, true) + local bar = _G["SVUI_MountSelectBar"..i] + if(bar) then bar:SetParent(button.Panel) end + end + end + + hooksecurefunc("MountJournal_UpdateMountList", PetJournal_UpdateMounts) + MountJournalListScrollFrame:HookScript("OnVerticalScroll", PetJournal_UpdateMounts) + MountJournalListScrollFrame:HookScript("OnMouseWheel", PetJournal_UpdateMounts) + PetJournalSummonButton:RemoveTextures() + PetJournalFindBattle:RemoveTextures() + PetJournalSummonButton:SetButtonTemplate() + PetJournalFindBattle:SetButtonTemplate() + PetJournalRightInset:RemoveTextures() + PetJournalLeftInset:RemoveTextures() + + for i = 1, 3 do + local button = _G["PetJournalLoadoutPet" .. i .. "HelpFrame"] + button:RemoveTextures() + end + + PetJournalTutorialButton:Die() + PetJournal.PetCount:RemoveTextures() + PetJournalSearchBox:SetEditboxTemplate() + PetJournalFilterButton:RemoveTextures(true) + PetJournalFilterButton:SetButtonTemplate() + PetJournalListScrollFrame:RemoveTextures() + STYLE:ApplyScrollFrameStyle(PetJournalListScrollFrameScrollBar) + + for i = 1, #PetJournal.listScroll.buttons do + local button = _G["PetJournalListScrollFrameButton" .. i] + local favorite = _G["PetJournalListScrollFrameButton" .. i .. "Favorite"] + STYLE:ApplyItemButtonStyle(button, false, true) + if(favorite) then + local fg = CreateFrame("Frame", nil, button) + fg:SetSize(40,40) + fg:SetPoint("TOPLEFT", button, "TOPLEFT", -1, 1) + fg:SetFrameLevel(button:GetFrameLevel() + 30) + favorite:SetParent(fg) + button.dragButton.favorite:SetParent(fg) + end + + button.dragButton.levelBG:SetAlpha(0) + button.dragButton.level:SetParent(button) + button.petTypeIcon:SetParent(button.Panel) + end + + hooksecurefunc('PetJournal_UpdatePetList', PetJournal_UpdatePets) + PetJournalListScrollFrame:HookScript("OnVerticalScroll", PetJournal_UpdatePets) + PetJournalListScrollFrame:HookScript("OnMouseWheel", PetJournal_UpdatePets) + PetJournalAchievementStatus:DisableDrawLayer('BACKGROUND') + STYLE:ApplyItemButtonStyle(PetJournalHealPetButton, true) + PetJournalHealPetButton.texture:SetTexture([[Interface\Icons\spell_magic_polymorphrabbit]]) + PetJournalLoadoutBorder:RemoveTextures() + + for b = 1, 3 do + local pjPet = _G['PetJournalLoadoutPet'..b] + pjPet:RemoveTextures() + pjPet.petTypeIcon:SetPoint('BOTTOMLEFT', 2, 2) + pjPet.dragButton:WrapOuter(_G['PetJournalLoadoutPet'..b..'Icon']) + pjPet.hover = true; + pjPet.pushed = true; + pjPet.checked = true; + STYLE:ApplyItemButtonStyle(pjPet, nil, nil, true) + pjPet.setButton:RemoveTextures() + _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:RemoveTextures() + _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:SetPanelTemplate('Default') + _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:SetStatusBarTexture(SV.Media.bar.default) + _G['PetJournalLoadoutPet'..b..'XPBar']:RemoveTextures() + _G['PetJournalLoadoutPet'..b..'XPBar']:SetPanelTemplate('Default') + _G['PetJournalLoadoutPet'..b..'XPBar']:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + _G['PetJournalLoadoutPet'..b..'XPBar']:SetFrameLevel(_G['PetJournalLoadoutPet'..b..'XPBar']:GetFrameLevel()+2) + for v = 1, 3 do + local s = _G['PetJournalLoadoutPet'..b..'Spell'..v] + STYLE:ApplyItemButtonStyle(s) + s.FlyoutArrow:SetTexture([[Interface\Buttons\ActionBarFlyoutButton]]) + _G['PetJournalLoadoutPet'..b..'Spell'..v..'Icon']:FillInner(s) + s.Panel:SetFrameLevel(s:GetFrameLevel() + 1) + _G['PetJournalLoadoutPet'..b..'Spell'..v..'Icon']:SetParent(s.Panel) + end + end + + PetJournalSpellSelect:RemoveTextures() + + for b = 1, 2 do + local Q = _G['PetJournalSpellSelectSpell'..b] + STYLE:ApplyItemButtonStyle(Q) + _G['PetJournalSpellSelectSpell'..b..'Icon']:FillInner(Q) + _G['PetJournalSpellSelectSpell'..b..'Icon']:SetDrawLayer('BORDER') + end + + PetJournalPetCard:RemoveTextures() + STYLE:ApplyItemButtonStyle(PetJournalPetCard, nil, nil, true) + PetJournalPetCardInset:RemoveTextures() + PetJournalPetCardPetInfo.levelBG:SetAlpha(0) + PetJournalPetCardPetInfoIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + STYLE:ApplyItemButtonStyle(PetJournalPetCardPetInfo, nil, true, true) + local fg = CreateFrame("Frame", nil, PetJournalPetCardPetInfo) + fg:SetSize(40,40) + fg:SetPoint("TOPLEFT", PetJournalPetCardPetInfo, "TOPLEFT", -1, 1) + fg:SetFrameLevel(PetJournalPetCardPetInfo:GetFrameLevel() + 30) + PetJournalPetCardPetInfo.favorite:SetParent(fg) + PetJournalPetCardPetInfo.Panel:WrapOuter(PetJournalPetCardPetInfoIcon) + PetJournalPetCardPetInfoIcon:SetParent(PetJournalPetCardPetInfo.Panel) + PetJournalPetCardPetInfo.level:SetParent(PetJournalPetCardPetInfo.Panel) + local R = PetJournalPrimaryAbilityTooltip;R.Background:SetTexture(0,0,0,0) + if R.Delimiter1 then + R.Delimiter1:SetTexture(0,0,0,0) + R.Delimiter2:SetTexture(0,0,0,0) + end + R.BorderTop:SetTexture(0,0,0,0) + R.BorderTopLeft:SetTexture(0,0,0,0) + R.BorderTopRight:SetTexture(0,0,0,0) + R.BorderLeft:SetTexture(0,0,0,0) + R.BorderRight:SetTexture(0,0,0,0) + R.BorderBottom:SetTexture(0,0,0,0) + R.BorderBottomRight:SetTexture(0,0,0,0) + R.BorderBottomLeft:SetTexture(0,0,0,0) + R:SetFixedPanelTemplate("Transparent", true) + for b = 1, 6 do + local S = _G['PetJournalPetCardSpell'..b] + S:SetFrameLevel(S:GetFrameLevel() + 2) + S:DisableDrawLayer('BACKGROUND') + S:SetPanelTemplate('Transparent') + S.Panel:SetAllPoints() + S.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + S.icon:FillInner(S.Panel) + end + PetJournalPetCardHealthFrame.healthBar:RemoveTextures() + PetJournalPetCardHealthFrame.healthBar:SetPanelTemplate('Default') + PetJournalPetCardHealthFrame.healthBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + PetJournalPetCardXPBar:RemoveTextures() + PetJournalPetCardXPBar:SetPanelTemplate('Default') + PetJournalPetCardXPBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + + if(SV.GameVersion >= 60000) then + STYLE:ApplyTabStyle(PetJournalParentTab3) + ToyBox:RemoveTextures() + ToyBoxProgressBar:SetPanelTemplate("Bar", true) + ToyBoxSearchBox:SetEditboxTemplate() + ToyBoxFilterButton:SetButtonTemplate() + STYLE:ApplyDropdownStyle(ToyBoxFilterDropDown) + ToyBoxIconsFrame:SetBasicPanel() + + for i = 1, 18 do + local gName = ("ToySpellButton%d"):format(i) + local button = _G[gName] + if(button) then + button:SetButtonTemplate() + end + end + end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_PetJournal", PetJournalStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petstable.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petstable.lua new file mode 100644 index 0000000..e296f8e --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/petstable.lua @@ -0,0 +1,51 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +PETSTABLE STYLER +########################################################## +]]-- +local function PetStableStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.stable ~= true then return end + PetStableFrame:RemoveTextures() + PetStableFrameInset:RemoveTextures() + PetStableLeftInset:RemoveTextures() + PetStableBottomInset:RemoveTextures() + PetStableFrame:SetPanelTemplate("Halftone") + PetStableFrameInset:SetFixedPanelTemplate('Inset') + STYLE:ApplyCloseButtonStyle(PetStableFrameCloseButton) + PetStablePrevPageButton:SetButtonTemplate() + PetStableNextPageButton:SetButtonTemplate() + STYLE:ApplyPaginationStyle(PetStablePrevPageButton) + STYLE:ApplyPaginationStyle(PetStableNextPageButton) + for j = 1, NUM_PET_ACTIVE_SLOTS do + STYLE:ApplyItemButtonStyle(_G['PetStableActivePet'..j], true) + end + for j = 1, NUM_PET_STABLE_SLOTS do + STYLE:ApplyItemButtonStyle(_G['PetStableStabledPet'..j], true) + end + PetStableSelectedPetIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(PetStableStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/pvp.lua new file mode 100644 index 0000000..f7d643e --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/pvp.lua @@ -0,0 +1,164 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +PVP STYLER +########################################################## +]]-- +-- LoadAddOn("Blizzard_PVPUI") + +local function PVPFrameStyle() + if (SV.db[Schema] and (SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.pvp ~= true)) then + return + end + + STYLE:ApplyWindowStyle(PVPUIFrame, true) + + STYLE:ApplyCloseButtonStyle(PVPUIFrameCloseButton) + + for g = 1, 2 do + STYLE:ApplyTabStyle(_G["PVPUIFrameTab"..g]) + end + + for i = 1, 3 do + local btn = _G["PVPQueueFrameCategoryButton"..i] + if(btn) then + btn.Background:Die() + btn.Ring:Die() + btn:SetButtonTemplate() + btn.Icon:Size(45) + btn.Icon:SetTexCoord(.15, .85, .15, .85) + btn.Icon:SetDrawLayer("OVERLAY", nil, 7) + btn.Panel:WrapOuter(btn.Icon) + end + end + + STYLE:ApplyDropdownStyle(HonorFrameTypeDropDown) + HonorFrame.Inset:RemoveTextures() + HonorFrame.Inset:SetFixedPanelTemplate("Inset") + STYLE:ApplyScrollFrameStyle(HonorFrameSpecificFrameScrollBar) + HonorFrameSoloQueueButton:RemoveTextures() + HonorFrameGroupQueueButton:RemoveTextures() + HonorFrameSoloQueueButton:SetButtonTemplate() + HonorFrameGroupQueueButton:SetButtonTemplate() + HonorFrame.BonusFrame:RemoveTextures() + HonorFrame.BonusFrame.ShadowOverlay:RemoveTextures() + HonorFrame.BonusFrame.RandomBGButton:RemoveTextures() + HonorFrame.BonusFrame.RandomBGButton:SetFixedPanelTemplate("Button") + HonorFrame.BonusFrame.RandomBGButton:SetButtonTemplate() + HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:FillInner() + HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) + + if(SV.GameVersion < 60000) then + PVPUIFrame.Shadows:RemoveTextures() + HonorFrame.BonusFrame.CallToArmsButton:RemoveTextures() + HonorFrame.BonusFrame.CallToArmsButton:SetFixedPanelTemplate("Button") + HonorFrame.BonusFrame.CallToArmsButton:SetButtonTemplate() + HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:FillInner() + HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) + for g = 1, 2 do + local I = HonorFrame.BonusFrame["WorldPVP"..g.."Button"] + I:RemoveTextures() + I:SetFixedPanelTemplate("Button", true) + I:SetButtonTemplate() + I.SelectedTexture:FillInner() + I.SelectedTexture:SetTexture(1, 1, 0, 0.1) + end + PVPUIFrame.LeftInset:RemoveTextures() + end + + HonorFrame.BonusFrame.DiceButton:DisableDrawLayer("ARTWORK") + HonorFrame.BonusFrame.DiceButton:SetHighlightTexture("") + HonorFrame.RoleInset:RemoveTextures() + HonorFrame.RoleInset.DPSIcon.checkButton:SetCheckboxTemplate(true) + HonorFrame.RoleInset.TankIcon.checkButton:SetCheckboxTemplate(true) + HonorFrame.RoleInset.HealerIcon.checkButton:SetCheckboxTemplate(true) + HonorFrame.RoleInset.TankIcon:DisableDrawLayer("OVERLAY") + HonorFrame.RoleInset.TankIcon:DisableDrawLayer("BACKGROUND") + HonorFrame.RoleInset.HealerIcon:DisableDrawLayer("OVERLAY") + HonorFrame.RoleInset.HealerIcon:DisableDrawLayer("BACKGROUND") + HonorFrame.RoleInset.DPSIcon:DisableDrawLayer("OVERLAY") + HonorFrame.RoleInset.DPSIcon:DisableDrawLayer("BACKGROUND") + hooksecurefunc("LFG_PermanentlyDisableRoleButton", function(n) + if n.bg then + n.bg:SetDesaturated(true) + end + end) + + ConquestFrame.Inset:RemoveTextures() + ConquestPointsBarLeft:Die() + ConquestPointsBarRight:Die() + ConquestPointsBarMiddle:Die() + ConquestPointsBarBG:Die() + ConquestPointsBarShadow:Die() + ConquestPointsBar.progress:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + ConquestPointsBar:SetFixedPanelTemplate('Inset') + ConquestPointsBar.Panel:WrapOuter(ConquestPointsBar, nil, -2) + ConquestFrame:RemoveTextures() + ConquestFrame.ShadowOverlay:RemoveTextures() + ConquestJoinButton:RemoveTextures() + ConquestJoinButton:SetButtonTemplate() + ConquestFrame.RatedBG:RemoveTextures() + ConquestFrame.RatedBG:SetFixedPanelTemplate("Inset") + ConquestFrame.RatedBG:SetButtonTemplate() + ConquestFrame.RatedBG.SelectedTexture:FillInner() + ConquestFrame.RatedBG.SelectedTexture:SetTexture(1, 1, 0, 0.1) + WarGamesFrame:RemoveTextures() + WarGamesFrame.RightInset:RemoveTextures() + WarGamesFrameInfoScrollFrame:RemoveTextures() + WarGamesFrameInfoScrollFrameScrollBar:RemoveTextures() + WarGameStartButton:RemoveTextures() + WarGameStartButton:SetButtonTemplate() + STYLE:ApplyScrollFrameStyle(WarGamesFrameScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(WarGamesFrameInfoScrollFrameScrollBar) + WarGamesFrame.HorizontalBar:RemoveTextures() + + PVPReadyDialog:RemoveTextures() + PVPReadyDialog:SetPanelTemplate("Pattern") + PVPReadyDialogEnterBattleButton:SetButtonTemplate() + PVPReadyDialogLeaveQueueButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(PVPReadyDialogCloseButton) + PVPReadyDialogRoleIcon.texture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS") + PVPReadyDialogRoleIcon.texture:SetAlpha(0.5) + + ConquestFrame.Inset:SetFixedPanelTemplate("Inset") + WarGamesFrameScrollFrame:SetPanelTemplate("Inset",false,2,2,6) + + hooksecurefunc("PVPReadyDialog_Display", function(self, l, N, O, P, Q, R) + if R == "DAMAGER" then + PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonDPS.background:GetTexCoord()) + elseif R == "TANK" then + PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonTank.background:GetTexCoord()) + elseif R == "HEALER" then + PVPReadyDialogRoleIcon.texture:SetTexCoord(LFDQueueFrameRoleButtonHealer.background:GetTexCoord()) + end + if P == "ARENA" then + self:SetHeight(100) + end + end) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle('Blizzard_PVPUI', PVPFrameStyle, true) + +-- /script StaticPopupSpecial_Show(PVPReadyDialog) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua new file mode 100644 index 0000000..8e2ceb7 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/quest.lua @@ -0,0 +1,279 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +credit: Elv. original logic from ElvUI. Adapted to SVUI # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local QuestFrameList = { + "QuestLogFrameAbandonButton", + "QuestLogFramePushQuestButton", + "QuestLogFrameTrackButton", + "QuestLogFrameCancelButton", + "QuestLogFrameCompleteButton" +}; + +local function QuestScrollHelper(b, c, d, e) + b:SetPanelTemplate("Inset") + b.spellTex = b:CreateTexture(nil, 'ARTWORK') + b.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) + if e then + b.spellTex:SetPoint("TOPLEFT", 2, -2) + else + b.spellTex:SetPoint("TOPLEFT") + end + b.spellTex:Size(c or 506, d or 615) + b.spellTex:SetTexCoord(0, 1, 0.02, 1) +end + +local function QueuedWatchFrameItems() + for i=1, WATCHFRAME_NUM_ITEMS do + local button = _G["WatchFrameItem"..i] + local point, relativeTo, relativePoint, xOffset, yOffset = button:GetPoint(1) + button:SetFrameStrata("LOW") + button:SetPoint("TOPRIGHT", relativeTo, "TOPLEFT", -30, -2); + if not button.styled then + button:SetSlotTemplate() + button:SetBackdropColor(0,0,0,0) + _G["WatchFrameItem"..i.."NormalTexture"]:SetAlpha(0) + _G["WatchFrameItem"..i.."IconTexture"]:FillInner() + _G["WatchFrameItem"..i.."IconTexture"]:SetTexCoord(0.1,0.9,0.1,0.9) + SV.Timers:AddCooldown(_G["WatchFrameItem"..i.."Cooldown"]) + button.styled = true + end + end +end + +local QuestRewardScrollFrame_OnShow = function(self) + if(not self.Panel) then + self:SetPanelTemplate("Default") + QuestScrollHelper(self, 509, 630, false) + self:Height(self:GetHeight() - 2) + end + if(self.spellTex) then + self.spellTex:Height(self:GetHeight() + 217) + end +end + +local Hook_QuestInfo_Display = function(self, ...) + for i = 1, MAX_NUM_ITEMS do + local name = ("QuestInfoItem%d"):format(i) + local item = _G[name] + if(item and item:IsShown()) then + local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = item:GetPoint() + if(i == 1) then + item:Point(initialAnchor, anchorParent, relativeAnchor, 0, yPosition) + elseif(relativeAnchor == "BOTTOMLEFT") then + item:Point(initialAnchor, anchorParent, relativeAnchor, 0, -4) + else + item:Point(initialAnchor, anchorParent, relativeAnchor, 4, 0) + end + end + end +end + +local Hook_QuestInfoItem_OnClick = function(self) + QuestInfoItemHighlight:ClearAllPoints() + QuestInfoItemHighlight:SetAllPoints(self) +end + +local Hook_QuestNPCModel = function(self, _, _, _, x, y) + QuestNPCModel:ClearAllPoints() + QuestNPCModel:SetPoint("TOPLEFT", self, "TOPRIGHT", x + 18, y) +end +--[[ +########################################################## +QUEST STYLERS +########################################################## +]]-- +local function QuestGreetingStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.greeting ~= true then + return + end + + QuestFrameGreetingPanel:HookScript("OnShow", function() + QuestFrameGreetingPanel:RemoveTextures() + QuestFrameGreetingGoodbyeButton:SetButtonTemplate() + QuestGreetingFrameHorizontalBreak:Die() + end) +end + +local function QuestFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.quest ~= true then return end + + STYLE:ApplyWindowStyle(QuestFrame, true, true) + + --[[ THIS SECTION NOT WORKING IN WOD ]]-- + if(SV.GameVersion < 60000) then + QuestLogScrollFrame:RemoveTextures() + QuestLogCount:RemoveTextures() + EmptyQuestLogFrame:RemoveTextures() + QuestProgressScrollFrame:RemoveTextures() + QuestLogFrameShowMapButton:RemoveTextures() + QuestLogFrameCompleteButton:RemoveTextures() + + STYLE:ApplyWindowStyle(QuestLogFrame) + QuestLogCount:SetFixedPanelTemplate("Default") + + QuestLogDetailFrameInset:Die() + QuestLogFrameInset:Die() + + QuestLogFrameShowMapButton:SetButtonTemplate() + QuestLogFrameShowMapButton.text:ClearAllPoints() + QuestLogFrameShowMapButton.text:SetPoint("CENTER") + + for _,i in pairs(QuestFrameList)do + _G[i]:SetButtonTemplate() + _G[i]:SetFrameLevel(_G[i]:GetFrameLevel() + 2) + end + + QuestLogFramePushQuestButton:Point("LEFT", QuestLogFrameAbandonButton, "RIGHT", 2, 0) + QuestLogFramePushQuestButton:Point("RIGHT", QuestLogFrameTrackButton, "LEFT", -2, 0) + + QuestLogDetailScrollFrame:HookScript('OnShow', function(k) + if not QuestLogDetailScrollFrame.Panel then + QuestLogDetailScrollFrame:SetPanelTemplate("Default") + QuestScrollHelper(QuestLogDetailScrollFrame, 509, 630, false) + QuestLogDetailScrollFrame:Height(k:GetHeight() - 2) + end + QuestLogDetailScrollFrame.spellTex:Height(k:GetHeight() + 217) + end) + + QuestLogFrame:HookScript("OnShow", function() + if not QuestLogScrollFrame.spellTex then + QuestLogScrollFrame:SetFixedPanelTemplate("Default") + QuestLogScrollFrame.spellTex = QuestLogScrollFrame:CreateTexture(nil, 'ARTWORK') + QuestLogScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBookBG]]) + QuestLogScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2) + QuestLogScrollFrame.spellTex:Size(514, 616) + QuestLogScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) + QuestLogScrollFrame.spellTex2 = QuestLogScrollFrame:CreateTexture(nil, 'BORDER') + QuestLogScrollFrame.spellTex2:SetTexture([[Interface\FrameGeneral\UI-Background-Rock]]) + QuestLogScrollFrame.spellTex2:FillInner() + end + end) + end + --[[ ############################### ]]-- + + STYLE:ApplyCloseButtonStyle(QuestLogFrameCloseButton) + STYLE:ApplyScrollFrameStyle(QuestLogDetailScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(QuestLogScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(QuestProgressScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(QuestRewardScrollFrameScrollBar) + + QuestGreetingScrollFrame:RemoveTextures() + STYLE:ApplyScrollFrameStyle(QuestGreetingScrollFrameScrollBar) + + for i = 1, MAX_NUM_ITEMS do + local item = _G["QuestInfoItem"..i] + if(item) then + local cLvl = item:GetFrameLevel() + 1 + item:RemoveTextures() + item:Width(item:GetWidth() - 4) + item:SetFrameLevel(cLvl) + + local tex = _G["QuestInfoItem"..i.."IconTexture"] + if(tex) then + tex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + tex:SetDrawLayer("OVERLAY",1) + tex:SetPoint("TOPLEFT", 2, -2) + tex:Size(tex:GetWidth() - 2, tex:GetHeight() - 2) + end + STYLE:ApplyItemButtonStyle(item) + end + end + + QuestInfoSkillPointFrame:RemoveTextures() + QuestInfoSkillPointFrame:Width(QuestInfoSkillPointFrame:GetWidth() - 4) + + local curLvl = QuestInfoSkillPointFrame:GetFrameLevel() + 1 + QuestInfoSkillPointFrame:SetFrameLevel(curLvl) + QuestInfoSkillPointFrame:SetFixedPanelTemplate("Slot") + QuestInfoSkillPointFrame:SetBackdropColor(1, 1, 0, 0.5) + QuestInfoSkillPointFrameIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + QuestInfoSkillPointFrameIconTexture:SetDrawLayer("OVERLAY") + QuestInfoSkillPointFrameIconTexture:Point("TOPLEFT", 2, -2) + QuestInfoSkillPointFrameIconTexture:Size(QuestInfoSkillPointFrameIconTexture:GetWidth()-2, QuestInfoSkillPointFrameIconTexture:GetHeight()-2) + QuestInfoSkillPointFrameCount:SetDrawLayer("OVERLAY") + QuestInfoItemHighlight:RemoveTextures() + QuestInfoItemHighlight:SetFixedPanelTemplate("Slot") + QuestInfoItemHighlight:SetBackdropBorderColor(1, 1, 0) + QuestInfoItemHighlight:SetBackdropColor(0, 0, 0, 0) + QuestInfoItemHighlight:Size(142, 40) + + hooksecurefunc("QuestInfoItem_OnClick", Hook_QuestInfoItem_OnClick) + hooksecurefunc("QuestInfo_Display", Hook_QuestInfo_Display) + + QuestRewardScrollFrame:HookScript("OnShow", QuestRewardScrollFrame_OnShow) + + QuestFrameInset:Die() + QuestFrameDetailPanel:RemoveTextures(true) + QuestDetailScrollFrame:RemoveTextures(true) + QuestScrollHelper(QuestDetailScrollFrame, 506, 615, true) + QuestProgressScrollFrame:SetFixedPanelTemplate() + QuestScrollHelper(QuestProgressScrollFrame, 506, 615, true) + QuestGreetingScrollFrame:SetFixedPanelTemplate() + QuestScrollHelper(QuestGreetingScrollFrame, 506, 615, true) + QuestDetailScrollChildFrame:RemoveTextures(true) + QuestRewardScrollFrame:RemoveTextures(true) + QuestRewardScrollChildFrame:RemoveTextures(true) + QuestFrameProgressPanel:RemoveTextures(true) + QuestFrameRewardPanel:RemoveTextures(true) + + QuestFrameAcceptButton:SetButtonTemplate() + QuestFrameDeclineButton:SetButtonTemplate() + QuestFrameCompleteButton:SetButtonTemplate() + QuestFrameGoodbyeButton:SetButtonTemplate() + QuestFrameCompleteQuestButton:SetButtonTemplate() + + STYLE:ApplyCloseButtonStyle(QuestFrameCloseButton, QuestFrame.Panel) + + for j = 1, 6 do + local i = _G["QuestProgressItem"..j] + local texture = _G["QuestProgressItem"..j.."IconTexture"] + i:RemoveTextures() + i:SetFixedPanelTemplate("Inset") + i:Width(_G["QuestProgressItem"..j]:GetWidth() - 4) + texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + texture:SetDrawLayer("OVERLAY") + texture:Point("TOPLEFT", 2, -2) + texture:Size(texture:GetWidth() - 2, texture:GetHeight() - 2) + _G["QuestProgressItem"..j.."Count"]:SetDrawLayer("OVERLAY") + end + + QuestNPCModel:RemoveTextures() + QuestNPCModel:SetPanelTemplate("Comic") + + QuestNPCModelTextFrame:RemoveTextures() + QuestNPCModelTextFrame:SetPanelTemplate("Default") + QuestNPCModelTextFrame.Panel:Point("TOPLEFT", QuestNPCModel.Panel, "BOTTOMLEFT", 0, -2) + + hooksecurefunc("QuestFrame_ShowQuestPortrait", Hook_QuestNPCModel) + +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(QuestFrameStyle) +STYLE:SaveCustomStyle(QuestGreetingStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/raid.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/raid.lua new file mode 100644 index 0000000..05c420e --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/raid.lua @@ -0,0 +1,102 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local RaidGroupList = { + "RaidGroup1", + "RaidGroup2", + "RaidGroup3", + "RaidGroup4", + "RaidGroup5", + "RaidGroup6", + "RaidGroup7", + "RaidGroup8" +}; + +local RaidInfoFrameList = { + "RaidFrameConvertToRaidButton", + "RaidFrameRaidInfoButton", + "RaidFrameNotInRaidRaidBrowserButton", + "RaidInfoExtendButton", + "RaidInfoCancelButton" +}; +--[[ +########################################################## +RAID STYLERS +########################################################## +]]-- +local function RaidUIStyle() + if InCombatLockdown() then return end + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.raid ~= true then return end + for _,group in pairs(RaidGroupList)do + if _G[group] then + _G[group]:RemoveTextures() + for i = 1, 5 do + local name = ("%sSlot%d"):format(group, i) + local slot = _G[name] + if(slot) then + slot:RemoveTextures() + slot:SetPanelTemplate("Inset", true) + end + end + end + end +end + +local function RaidInfoStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.nonraid ~= true then + return + end + + _G["RaidInfoFrame"]:RemoveTextures() + _G["RaidInfoInstanceLabel"]:RemoveTextures() + _G["RaidInfoIDLabel"]:RemoveTextures() + _G["RaidInfoScrollFrameScrollBarBG"]:Die() + _G["RaidInfoScrollFrameScrollBarTop"]:Die() + _G["RaidInfoScrollFrameScrollBarBottom"]:Die() + _G["RaidInfoScrollFrameScrollBarMiddle"]:Die() + + for g = 1, #RaidInfoFrameList do + if _G[RaidInfoFrameList[g]] then + _G[RaidInfoFrameList[g]]:SetButtonTemplate() + end + end + + RaidInfoScrollFrame:RemoveTextures() + RaidInfoFrame:SetBasicPanel() + RaidInfoFrame.Panel:Point("TOPLEFT", RaidInfoFrame, "TOPLEFT") + RaidInfoFrame.Panel:Point("BOTTOMRIGHT", RaidInfoFrame, "BOTTOMRIGHT") + + STYLE:ApplyCloseButtonStyle(RaidInfoCloseButton, RaidInfoFrame) + STYLE:ApplyScrollFrameStyle(RaidInfoScrollFrameScrollBar) + + if RaidFrameRaidBrowserButton then RaidFrameRaidBrowserButton:SetButtonTemplate() end + RaidFrameAllAssistCheckButton:SetCheckboxTemplate(true) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_RaidUI", RaidUIStyle) +STYLE:SaveCustomStyle(RaidInfoStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/reforging.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/reforging.lua new file mode 100644 index 0000000..6ea57b8 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/reforging.lua @@ -0,0 +1,59 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +REFORGING STYLER +########################################################## +]]-- +local function ReforgingStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.reforge ~= true then return end + + STYLE:ApplyWindowStyle(ReforgingFrame, true) + + ReforgingFrame.ButtonFrame:RemoveTextures() + ReforgingFrameReforgeButton:ClearAllPoints() + ReforgingFrameReforgeButton:Point("LEFT", ReforgingFrameRestoreButton, "RIGHT", 2, 0) + ReforgingFrameReforgeButton:Point("BOTTOMRIGHT", -3, 3) + ReforgingFrame.RestoreMessage:SetTextColor(1, 1, 1) + + ReforgingFrameRestoreButton:RemoveTextures() + ReforgingFrameReforgeButton:RemoveTextures() + ReforgingFrameRestoreButton:SetButtonTemplate() + ReforgingFrameReforgeButton:SetButtonTemplate() + + ReforgingFrame.ItemButton:RemoveTextures() + ReforgingFrame.ItemButton:SetSlotTemplate(true) + ReforgingFrame.ItemButton.IconTexture:FillInner() + hooksecurefunc("ReforgingFrame_Update", function(k) + local w, x, u, y, z, A = GetReforgeItemInfo() + if x then + ReforgingFrame.ItemButton.IconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + else + ReforgingFrame.ItemButton.IconTexture:SetTexture(0,0,0,0) + end + end) + STYLE:ApplyCloseButtonStyle(ReforgingFrameCloseButton) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_ReforgingUI",ReforgingStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/spellbook.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/spellbook.lua new file mode 100644 index 0000000..ea1731a --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/spellbook.lua @@ -0,0 +1,330 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G["SVUI"]; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +FRAME LISTS +########################################################## +]]-- +local bookFrames = { + "SpellBookFrame", + "SpellBookFrameInset", + "SpellBookSpellIconsFrame", + "SpellBookSideTabsFrame", + "SpellBookPageNavigationFrame" +} +local proButtons = { + "PrimaryProfession1SpellButtonTop", + "PrimaryProfession1SpellButtonBottom", + "PrimaryProfession2SpellButtonTop", + "PrimaryProfession2SpellButtonBottom", + "SecondaryProfession1SpellButtonLeft", + "SecondaryProfession1SpellButtonRight", + "SecondaryProfession2SpellButtonLeft", + "SecondaryProfession2SpellButtonRight", + "SecondaryProfession3SpellButtonLeft", + "SecondaryProfession3SpellButtonRight", + "SecondaryProfession4SpellButtonLeft", + "SecondaryProfession4SpellButtonRight" +} + +local proFrames = { + "PrimaryProfession1", + "PrimaryProfession2", + "SecondaryProfession1", + "SecondaryProfession2", + "SecondaryProfession3", + "SecondaryProfession4" +} +local proBars = { + "PrimaryProfession1StatusBar", + "PrimaryProfession2StatusBar", + "SecondaryProfession1StatusBar", + "SecondaryProfession2StatusBar", + "SecondaryProfession3StatusBar", + "SecondaryProfession4StatusBar" +} +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local function Tab_OnEnter(this) + this.backdrop:SetBackdropColor(0.1, 0.8, 0.8) + this.backdrop:SetBackdropBorderColor(0.1, 0.8, 0.8) +end + +local function Tab_OnLeave(this) + this.backdrop:SetBackdropColor(0,0,0,1) + this.backdrop:SetBackdropBorderColor(0,0,0,1) +end + +local function ChangeTabHelper(this) + this:RemoveTextures() + 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) + 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(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 + +local function SkillTabUpdateHelper() + for j = 1, MAX_SKILLLINE_TABS do + local S = _G["SpellBookSkillLineTab"..j] + local h, h, h, h, a0 = GetSpellTabInfo(j) + if a0 then + S:GetNormalTexture():FillInner() + S:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end +end + +local function AbilityButtonHelper(j) + local i = SpellBookCoreAbilitiesFrame.Abilities[j] + if i.styled then return end + local x = i.iconTexture; + if not InCombatLockdown() then + if not i.properFrameLevel then + i.properFrameLevel = i:GetFrameLevel() + 1 + end + i:SetFrameLevel(i.properFrameLevel) + end + if not i.styled then + for j = 1, i:GetNumRegions()do + local N = select(j, i:GetRegions()) + if N:GetObjectType() == "Texture"then + if N:GetTexture() ~= "Interface\\Buttons\\ActionBarFlyoutButton" then + N:SetTexture(0,0,0,0) + end + end + end + if i.highlightTexture then + hooksecurefunc(i.highlightTexture, "SetTexture", function(k, P, Q, R) + if P == [[Interface\Buttons\ButtonHilight-Square]] then + i.highlightTexture:SetTexture(1, 1, 1, 0.3) + end + end) + end + i.styled = true + + if x then + x:SetTexCoord(0.1, 0.9, 0.1, 0.9) + x:ClearAllPoints() + x:SetAllPoints() + if not i.Panel then + i:SetPanelTemplate("Inset", false, 3, 3, 3) + end + end + + if(i.Name) then i.Name:SetFontObject(NumberFont_Outline_Large) i.Name:SetTextColor(1,1,0) end + if(i.InfoText) then i.InfoText:SetFontObject(NumberFont_Shadow_Small) i.InfoText:SetTextColor(0.9,0.9,0.9) end + end + i.styled = true +end + +local function ButtonUpdateHelper(self, strip) + for j=1, SPELLS_PER_PAGE do + local name = "SpellButton"..j + local i = _G[name] + local x = _G[name.."IconTexture"] + local spellString = _G[name.."SpellName"]; + local subSpellString = _G[name.."SubSpellName"]; + if not InCombatLockdown() then + i:SetFrameLevel(SpellBookFrame:GetFrameLevel() + 5) + end + if strip then + for j = 1, i:GetNumRegions()do + local N = select(j, i:GetRegions()) + if N:GetObjectType() == "Texture"then + if N ~= i.FlyoutArrow then + N:SetTexture(0,0,0,0) + end + end + end + end + if _G[name.."Highlight"] then + _G[name.."Highlight"]:SetTexture(1, 1, 1, 0.3) + _G[name.."Highlight"]:ClearAllPoints() + _G[name.."Highlight"]:SetAllPoints(x) + end + if i.shine then + i.shine:ClearAllPoints() + i.shine:SetPoint('TOPLEFT', i, 'TOPLEFT', -3, 3) + i.shine:SetPoint('BOTTOMRIGHT', i, 'BOTTOMRIGHT', 3, -3) + end + if x then + x:SetTexCoord(0.1, 0.9, 0.1, 0.9) + x:ClearAllPoints() + x:SetAllPoints() + if not i.Panel then + i:SetPanelTemplate("Slot") + end + end + if(spellString) then spellString:SetFontObject(NumberFontNormal) spellString:SetTextColor(1,1,0) end + if(subSpellString) then subSpellString:SetFontObject(NumberFont_Shadow_Small) subSpellString:SetTextColor(0.9,0.9,0.9) end + end +end +--[[ +########################################################## +SPELLBOOK STYLER +########################################################## +]]-- +local function SpellBookStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.spellbook ~= true then return end + + STYLE:ApplyWindowStyle(SpellBookFrame) + STYLE:ApplyCloseButtonStyle(SpellBookFrameCloseButton) + + for _, gName in pairs(bookFrames) do + local frame = _G[gName] + if(frame) then + frame:RemoveTextures() + end + end + + -- SpellBookFrameInset:ClearAllPoints() + -- SpellBookFrameInset:Point("TOPLEFT", SpellBookFrame, "TOPLEFT", 20, -46) + -- SpellBookFrameInset:Point("BOTTOMRIGHT", SpellBookFrame, "BOTTOMRIGHT", -20, 20) + SpellBookFrameInset:SetFixedPanelTemplate("Blackout") + + _G["SpellBookFrameTutorialButton"]:Die() + + for i = 1, 2 do + local frame = _G[("SpellBookPage%d"):format(i)] + if(frame) then + frame:SetDrawLayer('BORDER', 3) + end + end + + STYLE:ApplyPaginationStyle(SpellBookPrevPageButton) + STYLE:ApplyPaginationStyle(SpellBookNextPageButton) + + ButtonUpdateHelper(nil, true) + + hooksecurefunc("SpellButton_UpdateButton", ButtonUpdateHelper) + hooksecurefunc("SpellBook_GetCoreAbilityButton", AbilityButtonHelper) + + for i = 1, MAX_SKILLLINE_TABS do + local tabName = ("SpellBookSkillLineTab%d"):format(i) + local tab = _G[tabName] + local tabFlash = _G[("%sFlash"):format(tabName)] + if(tabFlash) then tabFlash:Die() end + if(tab) then ChangeTabHelper(tab) end + end + + hooksecurefunc('SpellBook_GetCoreAbilitySpecTab', GetSpecTabHelper) + hooksecurefunc("SpellBookFrame_UpdateSkillLineTabs", SkillTabUpdateHelper) + + for _, gName in pairs(proFrames)do + local frame = _G[gName] + local frameMissing = _G[("%sMissing"):format(gName)] + if(frame and frame.missingText) then frame.missingText:SetTextColor(0, 0, 0) end + if(frameMissing) then frameMissing:SetTextColor(1, 1, 0) end + --frame.skillName + if(frame.missingHeader) then frame.missingHeader:SetFontObject(NumberFont_Outline_Large) frame.missingHeader:SetTextColor(1,1,0) end + if(frame.missingText) then frame.missingText:SetFontObject(NumberFont_Shadow_Small) frame.missingText:SetTextColor(0.9,0.9,0.9) end + if(frame.rank) then frame.rank:SetFontObject(NumberFontNormal) frame.rank:SetTextColor(0.9,0.9,0.9) end + if(frame.professionName) then frame.professionName:SetFontObject(NumberFont_Outline_Large) frame.professionName:SetTextColor(1,1,0) end + end + + for _, gName in pairs(proButtons)do + local button = _G[gName] + local buttonTex = _G[("%sIconTexture"):format(gName)] + if(button) then + button:RemoveTextures() + if(buttonTex) then + buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + buttonTex:FillInner() + button:SetFrameLevel(button:GetFrameLevel() + 2) + if not button.Panel then + button:SetPanelTemplate("Inset", false, 3, 3, 3) + button.Panel:SetAllPoints() + end + end + if(button.spellString) then button.spellString:SetFontObject(NumberFontNormal) button.spellString:SetTextColor(1,1,0) end + if(button.subSpellString) then button.subSpellString:SetFontObject(NumberFont_Shadow_Small) button.subSpellString:SetTextColor(0.9,0.9,0.9) end + end + end + + for _, gName in pairs(proBars) do + local bar = _G[gName] + if(bar) then + bar:RemoveTextures() + bar:SetHeight(12) + bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) + bar:SetStatusBarColor(0, 220/255, 0) + bar:SetPanelTemplate("Default") + bar.rankText:ClearAllPoints() + bar.rankText:SetPoint("CENTER") + end + end + + for i = 1, 5 do + local frame = _G[("SpellBookFrameTabButton%d"):format(i)] + if(frame) then + STYLE:ApplyTabStyle(frame) + end + end + + SpellBookFrameTabButton1:ClearAllPoints() + SpellBookFrameTabButton1:SetPoint('TOPLEFT', SpellBookFrame, 'BOTTOMLEFT', 0, 2) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(SpellBookStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/store.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/store.lua new file mode 100644 index 0000000..d4c8056 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/store.lua @@ -0,0 +1,38 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +TAXIFRAME STYLER +########################################################## +]]-- +local function StoreStyle() + -- if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.store ~= true then + -- return + -- end + + --STYLE:ApplyWindowStyle(StoreFrame) + STYLE:ApplyTooltipStyle(StoreTooltip) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_StoreUI", StoreStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua new file mode 100644 index 0000000..39f1ff1 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/system.lua @@ -0,0 +1,726 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +local ceil = math.ceil +--[[ +########################################################## +MASSIVE LIST OF LISTS +########################################################## +]]-- +local SystemPopList = { + "StaticPopup1", + "StaticPopup2", + "StaticPopup3" +}; +local SystemDropDownList = { + "DropDownList1MenuBackdrop", + "DropDownList2MenuBackdrop", + "DropDownList1Backdrop", + "DropDownList2Backdrop", +}; +local SystemFrameList1 = { + "GameMenuFrame", + "TicketStatusFrameButton", + "AutoCompleteBox", + "ConsolidatedBuffsTooltip", + "ReadyCheckFrame", + "StackSplitFrame", + "QueueStatusFrame", + "InterfaceOptionsFrame", + "VideoOptionsFrame", + "AudioOptionsFrame", +}; +local SystemFrameList4 = { + "Options", + "Store", + "SoundOptions", + "UIOptions", + "Keybindings", + "Macros", + "Ratings", + "AddOns", + "Logout", + "Quit", + "Continue", + "MacOptions", + "Help", + "WhatsNew", + "Addons" +}; +local SystemFrameList5 = { + "GameMenuFrame", + "InterfaceOptionsFrame", + "AudioOptionsFrame", + "VideoOptionsFrame", +}; +local SystemFrameList6 = { + "VideoOptionsFrameOkay", + "VideoOptionsFrameCancel", + "VideoOptionsFrameDefaults", + "VideoOptionsFrameApply", + "AudioOptionsFrameOkay", + "AudioOptionsFrameCancel", + "AudioOptionsFrameDefaults", + "InterfaceOptionsFrameDefaults", + "InterfaceOptionsFrameOkay", + "InterfaceOptionsFrameCancel", + "ReadyCheckFrameYesButton", + "ReadyCheckFrameNoButton", + "StackSplitOkayButton", + "StackSplitCancelButton", + "RolePollPopupAcceptButton" +}; + +local SystemFrameList13 = { + "VideoOptionsFrameCategoryFrame", + "VideoOptionsFramePanelContainer", + "InterfaceOptionsFrameCategories", + "InterfaceOptionsFramePanelContainer", + "InterfaceOptionsFrameAddOns", + "AudioOptionsSoundPanelPlayback", + "AudioOptionsSoundPanelVolume", + "AudioOptionsSoundPanelHardware", + "AudioOptionsVoicePanelTalking", + "AudioOptionsVoicePanelBinding", + "AudioOptionsVoicePanelListening", +}; +local SystemFrameList14 = { + "InterfaceOptionsFrameTab1", + "InterfaceOptionsFrameTab2", +}; +local SystemFrameList15 = { + "ControlsPanelBlockChatChannelInvites", + "ControlsPanelStickyTargeting", + "ControlsPanelAutoDismount", + "ControlsPanelAutoClearAFK", + "ControlsPanelBlockTrades", + "ControlsPanelBlockGuildInvites", + "ControlsPanelLootAtMouse", + "ControlsPanelAutoLootCorpse", + "ControlsPanelInteractOnLeftClick", + "ControlsPanelAutoOpenLootHistory", + "CombatPanelEnemyCastBarsOnOnlyTargetNameplates", + "CombatPanelEnemyCastBarsNameplateSpellNames", + "CombatPanelAttackOnAssist", + "CombatPanelStopAutoAttack", + "CombatPanelNameplateClassColors", + "CombatPanelTargetOfTarget", + "CombatPanelShowSpellAlerts", + "CombatPanelReducedLagTolerance", + "CombatPanelActionButtonUseKeyDown", + "CombatPanelEnemyCastBarsOnPortrait", + "CombatPanelEnemyCastBarsOnNameplates", + "CombatPanelAutoSelfCast", + "CombatPanelLossOfControl", + "DisplayPanelShowCloak", + "DisplayPanelShowHelm", + "DisplayPanelShowAggroPercentage", + "DisplayPanelPlayAggroSounds", + "DisplayPanelDetailedLootInfo", + "DisplayPanelShowSpellPointsAvg", + "DisplayPanelemphasizeMySpellEffects", + "DisplayPanelShowFreeBagSpace", + "DisplayPanelCinematicSubtitles", + "DisplayPanelRotateMinimap", + "DisplayPanelScreenEdgeFlash", + "DisplayPanelShowAccountAchievments", + "ObjectivesPanelAutoQuestTracking", + "ObjectivesPanelAutoQuestProgress", + "ObjectivesPanelMapQuestDifficulty", + "ObjectivesPanelAdvancedWorldMap", + "ObjectivesPanelWatchFrameWidth", + "SocialPanelProfanityFilter", + "SocialPanelSpamFilter", + "SocialPanelChatBubbles", + "SocialPanelPartyChat", + "SocialPanelChatHoverDelay", + "SocialPanelGuildMemberAlert", + "SocialPanelChatMouseScroll", + "ActionBarsPanelLockActionBars", + "ActionBarsPanelSecureAbilityToggle", + "ActionBarsPanelAlwaysShowActionBars", + "ActionBarsPanelBottomLeft", + "ActionBarsPanelBottomRight", + "ActionBarsPanelRight", + "ActionBarsPanelRightTwo", + "NamesPanelMyName", + "NamesPanelFriendlyPlayerNames", + "NamesPanelFriendlyPets", + "NamesPanelFriendlyGuardians", + "NamesPanelFriendlyTotems", + "NamesPanelUnitNameplatesFriends", + "NamesPanelUnitNameplatesFriendlyGuardians", + "NamesPanelUnitNameplatesFriendlyPets", + "NamesPanelUnitNameplatesFriendlyTotems", + "NamesPanelGuilds", + "NamesPanelGuildTitles", + "NamesPanelTitles", + "NamesPanelNonCombatCreature", + "NamesPanelEnemyPlayerNames", + "NamesPanelEnemyPets", + "NamesPanelEnemyGuardians", + "NamesPanelEnemyTotems", + "NamesPanelUnitNameplatesEnemyPets", + "NamesPanelUnitNameplatesEnemies", + "NamesPanelUnitNameplatesEnemyGuardians", + "NamesPanelUnitNameplatesEnemyTotems", + "CombatTextPanelTargetDamage", + "CombatTextPanelPeriodicDamage", + "CombatTextPanelPetDamage", + "CombatTextPanelHealing", + "CombatTextPanelHealingAbsorbTarget", + "CombatTextPanelHealingAbsorbSelf", + "CombatTextPanelTargetEffects", + "CombatTextPanelOtherTargetEffects", + "CombatTextPanelEnableFCT", + "CombatTextPanelDodgeParryMiss", + "CombatTextPanelDamageReduction", + "CombatTextPanelRepChanges", + "CombatTextPanelReactiveAbilities", + "CombatTextPanelFriendlyHealerNames", + "CombatTextPanelCombatState", + "CombatTextPanelComboPoints", + "CombatTextPanelLowManaHealth", + "CombatTextPanelEnergyGains", + "CombatTextPanelPeriodicEnergyGains", + "CombatTextPanelHonorGains", + "CombatTextPanelAuras", + "BuffsPanelBuffDurations", + "BuffsPanelDispellableDebuffs", + "BuffsPanelCastableBuffs", + "BuffsPanelConsolidateBuffs", + "BuffsPanelShowAllEnemyDebuffs", + "CameraPanelFollowTerrain", + "CameraPanelHeadBob", + "CameraPanelWaterCollision", + "CameraPanelSmartPivot", + "MousePanelInvertMouse", + "MousePanelClickToMove", + "MousePanelWoWMouse", + "HelpPanelShowTutorials", + "HelpPanelLoadingScreenTips", + "HelpPanelEnhancedTooltips", + "HelpPanelBeginnerTooltips", + "HelpPanelShowLuaErrors", + "HelpPanelColorblindMode", + "HelpPanelMovePad", + "BattlenetPanelOnlineFriends", + "BattlenetPanelOfflineFriends", + "BattlenetPanelBroadcasts", + "BattlenetPanelFriendRequests", + "BattlenetPanelConversations", + "BattlenetPanelShowToastWindow", + "StatusTextPanelPlayer", + "StatusTextPanelPet", + "StatusTextPanelParty", + "StatusTextPanelTarget", + "StatusTextPanelAlternateResource", + "StatusTextPanelPercentages", + "StatusTextPanelXP", + "UnitFramePanelPartyBackground", + "UnitFramePanelPartyPets", + "UnitFramePanelArenaEnemyFrames", + "UnitFramePanelArenaEnemyCastBar", + "UnitFramePanelArenaEnemyPets", + "UnitFramePanelFullSizeFocusFrame", + "NamesPanelUnitNameplatesNameplateClassColors", +}; +local SystemFrameList16 ={ + "ControlsPanelAutoLootKeyDropDown", + "CombatPanelTOTDropDown", + "CombatPanelFocusCastKeyDropDown", + "CombatPanelSelfCastKeyDropDown", + "CombatPanelLossOfControlFullDropDown", + "CombatPanelLossOfControlSilenceDropDown", + "CombatPanelLossOfControlInterruptDropDown", + "CombatPanelLossOfControlDisarmDropDown", + "CombatPanelLossOfControlRootDropDown", + "DisplayPanelAggroWarningDisplay", + "DisplayPanelWorldPVPObjectiveDisplay", + "SocialPanelChatStyle", + "SocialPanelWhisperMode", + "SocialPanelTimestamps", + "SocialPanelBnWhisperMode", + "SocialPanelConversationMode", + "ActionBarsPanelPickupActionKeyDropDown", + "NamesPanelNPCNamesDropDown", + "NamesPanelUnitNameplatesMotionDropDown", + "CombatTextPanelFCTDropDown", + "CameraPanelStyleDropDown", + "MousePanelClickMoveStyleDropDown", + "LanguagesPanelLocaleDropDown", + "StatusTextPanelDisplayDropDown" +}; +local SystemFrameList17 = { + "Advanced_MaxFPSCheckBox", + "Advanced_MaxFPSBKCheckBox", + "Advanced_UseUIScale", + "AudioOptionsSoundPanelEnableSound", + "AudioOptionsSoundPanelSoundEffects", + "AudioOptionsSoundPanelErrorSpeech", + "AudioOptionsSoundPanelEmoteSounds", + "AudioOptionsSoundPanelPetSounds", + "AudioOptionsSoundPanelMusic", + "AudioOptionsSoundPanelLoopMusic", + "AudioOptionsSoundPanelAmbientSounds", + "AudioOptionsSoundPanelSoundInBG", + "AudioOptionsSoundPanelReverb", + "AudioOptionsSoundPanelHRTF", + "AudioOptionsSoundPanelEnableDSPs", + "AudioOptionsSoundPanelUseHardware", + "AudioOptionsVoicePanelEnableVoice", + "AudioOptionsVoicePanelEnableMicrophone", + "AudioOptionsVoicePanelPushToTalkSound", + "AudioOptionsSoundPanelPetBattleMusic", + "NetworkOptionsPanelOptimizeSpeed", + "NetworkOptionsPanelUseIPv6", + "NetworkOptionsPanelAdvancedCombatLogging" +}; +local SystemFrameList18 = { + "Graphics_DisplayModeDropDown", + "Graphics_ResolutionDropDown", + "Graphics_RefreshDropDown", + "Graphics_PrimaryMonitorDropDown", + "Graphics_MultiSampleDropDown", + "Graphics_VerticalSyncDropDown", + "Graphics_TextureResolutionDropDown", + "Graphics_FilteringDropDown", + "Graphics_ProjectedTexturesDropDown", + "Graphics_ViewDistanceDropDown", + "Graphics_EnvironmentalDetailDropDown", + "Graphics_GroundClutterDropDown", + "Graphics_ShadowsDropDown", + "Graphics_LiquidDetailDropDown", + "Graphics_SunshaftsDropDown", + "Graphics_ParticleDensityDropDown", + "Graphics_SSAODropDown", + "Advanced_BufferingDropDown", + "Advanced_LagDropDown", + "Advanced_HardwareCursorDropDown", + "Advanced_GraphicsAPIDropDown", + "AudioOptionsSoundPanelHardwareDropDown", + "AudioOptionsSoundPanelSoundChannelsDropDown", + "AudioOptionsVoicePanelInputDeviceDropDown", + "AudioOptionsVoicePanelChatModeDropDown", + "AudioOptionsVoicePanelOutputDeviceDropDown", + "CompactUnitFrameProfilesProfileSelector", + "CompactUnitFrameProfilesGeneralOptionsFrameHealthTextDropdown", + "CompactUnitFrameProfilesGeneralOptionsFrameSortByDropdown", +}; +local SystemFrameList19 = { + "RecordLoopbackSoundButton", + "PlayLoopbackSoundButton", + "AudioOptionsVoicePanelChatMode1KeyBindingButton", + "CompactUnitFrameProfilesSaveButton", + "CompactUnitFrameProfilesDeleteButton", +}; +local SystemFrameList20 = { + "KeepGroupsTogether", + "DisplayIncomingHeals", + "DisplayPowerBar", + "DisplayAggroHighlight", + "UseClassColors", + "DisplayPets", + "DisplayMainTankAndAssist", + "DisplayBorder", + "ShowDebuffs", + "DisplayOnlyDispellableDebuffs", + "AutoActivate2Players", + "AutoActivate3Players", + "AutoActivate5Players", + "AutoActivate10Players", + "AutoActivate15Players", + "AutoActivate25Players", + "AutoActivate40Players", + "AutoActivateSpec1", + "AutoActivateSpec2", + "AutoActivatePvP", + "AutoActivatePvE", +}; +local SystemFrameList21 = { + "Graphics_Quality", + "Advanced_UIScaleSlider", + "Advanced_MaxFPSSlider", + "Advanced_MaxFPSBKSlider", + "AudioOptionsSoundPanelSoundQuality", + "AudioOptionsSoundPanelMasterVolume", + "AudioOptionsSoundPanelSoundVolume", + "AudioOptionsSoundPanelMusicVolume", + "AudioOptionsSoundPanelAmbienceVolume", + "AudioOptionsVoicePanelMicrophoneVolume", + "AudioOptionsVoicePanelSpeakerVolume", + "AudioOptionsVoicePanelSoundFade", + "AudioOptionsVoicePanelMusicFade", + "AudioOptionsVoicePanelAmbienceFade", + "InterfaceOptionsCombatPanelSpellAlertOpacitySlider", + "InterfaceOptionsCombatPanelMaxSpellStartRecoveryOffset", + "InterfaceOptionsBattlenetPanelToastDurationSlider", + "InterfaceOptionsCameraPanelMaxDistanceSlider", + "InterfaceOptionsCameraPanelFollowSpeedSlider", + "InterfaceOptionsMousePanelMouseSensitivitySlider", + "InterfaceOptionsMousePanelMouseLookSpeedSlider", + "OpacityFrameSlider", +}; +--[[ +########################################################## +HELPER FUNCTIONS +########################################################## +]]-- +local function forceBackdropColor(self, r, g, b, a) + if r ~= 0 or g ~= 0 or b ~= 0 or a ~= 0 then + GhostFrame:SetBackdropColor(0,0,0,0) + GhostFrame:SetBackdropBorderColor(0,0,0,0) + end +end +--[[ +########################################################## +SYSTEM WIDGET STYLERS +########################################################## +]]-- +local function SystemPanelQue() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.misc ~= true then return end + + QueueStatusFrame:RemoveTextures() + + for i = 1, #SystemPopList do + local this = _G[SystemPopList[i]] + if(this) then + this:RemoveTextures() + STYLE:ApplyAlertStyle(this) + this:SetBackdropColor(0.8, 0.2, 0.2) + end + end + for i = 1, #SystemDropDownList do + local this = _G[SystemDropDownList[i]] + if(this) then + this:RemoveTextures() + this:SetPanelTemplate("FramedTop") + end + end + for i = 1, #SystemFrameList1 do + local this = _G[SystemFrameList1[i]] + if(this) then + STYLE:ApplyWindowStyle(this) + end + end + + LFDRoleCheckPopup:RemoveTextures() + LFDRoleCheckPopup:SetFixedPanelTemplate() + LFDRoleCheckPopupAcceptButton:SetButtonTemplate() + LFDRoleCheckPopupDeclineButton:SetButtonTemplate() + LFDRoleCheckPopupRoleButtonTank.checkButton:SetCheckboxTemplate(true) + LFDRoleCheckPopupRoleButtonDPS.checkButton:SetCheckboxTemplate(true) + LFDRoleCheckPopupRoleButtonHealer.checkButton:SetCheckboxTemplate(true) + LFDRoleCheckPopupRoleButtonTank.checkButton:SetFrameLevel(LFDRoleCheckPopupRoleButtonTank.checkButton:GetFrameLevel() + 1) + LFDRoleCheckPopupRoleButtonDPS.checkButton:SetFrameLevel(LFDRoleCheckPopupRoleButtonDPS.checkButton:GetFrameLevel() + 1) + LFDRoleCheckPopupRoleButtonHealer.checkButton:SetFrameLevel(LFDRoleCheckPopupRoleButtonHealer.checkButton:GetFrameLevel() + 1) + for i = 1, 3 do + for j = 1, 3 do + _G["StaticPopup"..i.."Button"..j]:SetButtonTemplate() + _G["StaticPopup"..i.."EditBox"]:SetEditboxTemplate() + _G["StaticPopup"..i.."MoneyInputFrameGold"]:SetEditboxTemplate() + _G["StaticPopup"..i.."MoneyInputFrameSilver"]:SetEditboxTemplate() + _G["StaticPopup"..i.."MoneyInputFrameCopper"]:SetEditboxTemplate() + _G["StaticPopup"..i.."EditBox"].Panel:Point("TOPLEFT", -2, -4) + _G["StaticPopup"..i.."EditBox"].Panel:Point("BOTTOMRIGHT", 2, 4) + _G["StaticPopup"..i.."ItemFrameNameFrame"]:Die() + _G["StaticPopup"..i.."ItemFrame"]:GetNormalTexture():Die() + _G["StaticPopup"..i.."ItemFrame"]:SetFixedPanelTemplate("Default") + _G["StaticPopup"..i.."ItemFrame"]:SetButtonTemplate() + _G["StaticPopup"..i.."ItemFrameIconTexture"]:SetTexCoord(0.1,0.9,0.1,0.9 ) + _G["StaticPopup"..i.."ItemFrameIconTexture"]:FillInner() + end + end + for i = 1, #SystemFrameList4 do + local this = _G["GameMenuButton"..SystemFrameList4[i]] + if(this) then + this:SetButtonTemplate() + end + end + if IsAddOnLoaded("OptionHouse") then + GameMenuButtonOptionHouse:SetButtonTemplate() + end + do + GhostFrame:SetButtonTemplate() + GhostFrame:SetBackdropColor(0,0,0,0) + GhostFrame:SetBackdropBorderColor(0,0,0,0) + hooksecurefunc(GhostFrame, "SetBackdropColor", forceBackdropColor) + hooksecurefunc(GhostFrame, "SetBackdropBorderColor", forceBackdropColor) + GhostFrame:ClearAllPoints() + GhostFrame:SetPoint("TOP", SV.UIParent, "TOP", 0, -150) + GhostFrameContentsFrame:SetButtonTemplate() + GhostFrameContentsFrameIcon:SetTexture(0,0,0,0) + local x = CreateFrame("Frame", nil, GhostFrame) + x:SetFrameStrata("MEDIUM") + x:SetFixedPanelTemplate("Default") + x:WrapOuter(GhostFrameContentsFrameIcon) + local tex = x:CreateTexture(nil, "OVERLAY") + tex:SetTexture("Interface\\Icons\\spell_holy_guardianspirit") + tex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + tex:FillInner() + end + for i = 1, #SystemFrameList5 do + local this = _G[SystemFrameList5[i].."Header"] + if(this) then + this:SetTexture(0,0,0,0) + this:ClearAllPoints() + if this == _G["GameMenuFrameHeader"] then + this:SetPoint("TOP", GameMenuFrame, 0, 7) + else + this:SetPoint("TOP", SystemFrameList5[i], 0, 0) + end + end + end + for i = 1, #SystemFrameList6 do + local this = _G[SystemFrameList6[i]] + if(this) then + this:SetButtonTemplate() + end + end + VideoOptionsFrameCancel:ClearAllPoints() + VideoOptionsFrameCancel:SetPoint("RIGHT",VideoOptionsFrameApply,"LEFT",-4,0) + VideoOptionsFrameOkay:ClearAllPoints() + VideoOptionsFrameOkay:SetPoint("RIGHT",VideoOptionsFrameCancel,"LEFT",-4,0) + AudioOptionsFrameOkay:ClearAllPoints() + AudioOptionsFrameOkay:SetPoint("RIGHT",AudioOptionsFrameCancel,"LEFT",-4,0) + InterfaceOptionsFrameOkay:ClearAllPoints() + InterfaceOptionsFrameOkay:SetPoint("RIGHT",InterfaceOptionsFrameCancel,"LEFT", -4,0) + ReadyCheckFrameYesButton:SetParent(ReadyCheckFrame) + ReadyCheckFrameNoButton:SetParent(ReadyCheckFrame) + ReadyCheckFrameYesButton:SetPoint("RIGHT", ReadyCheckFrame, "CENTER", -1, 0) + ReadyCheckFrameNoButton:SetPoint("LEFT", ReadyCheckFrameYesButton, "RIGHT", 3, 0) + ReadyCheckFrameText:SetParent(ReadyCheckFrame) + ReadyCheckFrameText:ClearAllPoints() + ReadyCheckFrameText:SetPoint("TOP", 0, -12) + ReadyCheckListenerFrame:SetAlpha(0) + ReadyCheckFrame:HookScript("OnShow", function(self) if UnitIsUnit("player", self.initiator) then self:Hide() end end) + StackSplitFrame:GetRegions():Hide() + RolePollPopup:SetFixedPanelTemplate("Transparent", true) + InterfaceOptionsFrame:SetClampedToScreen(true) + InterfaceOptionsFrame:SetMovable(true) + InterfaceOptionsFrame:EnableMouse(true) + InterfaceOptionsFrame:RegisterForDrag("LeftButton", "RightButton") + InterfaceOptionsFrame:SetScript("OnDragStart", function(self) + if InCombatLockdown() then return end + if IsShiftKeyDown() then + self:StartMoving() + end + end) + InterfaceOptionsFrame:SetScript("OnDragStop", function(self) + self:StopMovingOrSizing() + end) + if IsMacClient() then + MacOptionsFrame:SetFixedPanelTemplate("Default") + MacOptionsFrameHeader:SetTexture(0,0,0,0) + MacOptionsFrameHeader:ClearAllPoints() + MacOptionsFrameHeader:SetPoint("TOP", MacOptionsFrame, 0, 0) + MacOptionsFrameMovieRecording:SetFixedPanelTemplate("Default") + MacOptionsITunesRemote:SetFixedPanelTemplate("Default") + MacOptionsFrameCancel:SetButtonTemplate() + MacOptionsFrameOkay:SetButtonTemplate() + MacOptionsButtonKeybindings:SetButtonTemplate() + MacOptionsFrameDefaults:SetButtonTemplate() + MacOptionsButtonCompress:SetButtonTemplate() + local tPoint, tRTo, tRP, tX, tY = MacOptionsButtonCompress:GetPoint() + MacOptionsButtonCompress:SetWidth(136) + MacOptionsButtonCompress:ClearAllPoints() + MacOptionsButtonCompress:Point(tPoint, tRTo, tRP, 4, tY) + MacOptionsFrameCancel:SetWidth(96) + MacOptionsFrameCancel:SetHeight(22) + tPoint, tRTo, tRP, tX, tY = MacOptionsFrameCancel:GetPoint() + MacOptionsFrameCancel:ClearAllPoints() + MacOptionsFrameCancel:Point(tPoint, tRTo, tRP, -14, tY) + MacOptionsFrameOkay:ClearAllPoints() + MacOptionsFrameOkay:SetWidth(96) + MacOptionsFrameOkay:SetHeight(22) + MacOptionsFrameOkay:Point("LEFT",MacOptionsFrameCancel, -99,0) + MacOptionsButtonKeybindings:ClearAllPoints() + MacOptionsButtonKeybindings:SetWidth(96) + MacOptionsButtonKeybindings:SetHeight(22) + MacOptionsButtonKeybindings:Point("LEFT",MacOptionsFrameOkay, -99,0) + MacOptionsFrameDefaults:SetWidth(96) + MacOptionsFrameDefaults:SetHeight(22) + end + OpacityFrame:RemoveTextures() + OpacityFrame:SetFixedPanelTemplate("Transparent", true) + + hooksecurefunc("UIDropDownMenu_InitializeHelper", function(self) + for i = 1, UIDROPDOWNMENU_MAXLEVELS do + local name = ("DropDownList%d"):format(i) + local bg = _G[("%sBackdrop"):format(name)] + bg:SetBasicPanel() + local menu = _G[("%sMenuBackdrop"):format(name)] + menu:SetBasicPanel() + end + end) + + if(SV.GameVersion < 60000) then + GuildInviteFrame:RemoveTextures() + GuildInviteFrame:SetFixedPanelTemplate('Transparent') + GuildInviteFrameLevel:RemoveTextures() + GuildInviteFrameLevel:ClearAllPoints() + GuildInviteFrameLevel:SetPoint('TOP', GuildInviteFrame, 'CENTER', -15, -25) + GuildInviteFrameJoinButton:SetButtonTemplate() + GuildInviteFrameDeclineButton:SetButtonTemplate() + GuildInviteFrame:Height(225) + GuildInviteFrame:HookScript("OnEvent", function() + GuildInviteFrame:Height(225) + end) + + GuildInviteFrameWarningText:Die() + BattleTagInviteFrame:RemoveTextures() + BattleTagInviteFrame:SetFixedPanelTemplate('Transparent') + end + --BattleTagInviteFrameScrollFrame:SetEditboxTemplate() + + for i=1, BattleTagInviteFrame:GetNumChildren() do + local child = select(i, BattleTagInviteFrame:GetChildren()) + if child:GetObjectType() == 'Button' then + child:SetButtonTemplate() + end + end + + for i = 1, #SystemFrameList13 do + local frame = _G[SystemFrameList13[i]] + if(frame) then + frame:RemoveTextures() + frame:SetBasicPanel() + end + end + + for i = 1, #SystemFrameList14 do + local this = _G[SystemFrameList14[i]] + if(this) then + this:RemoveTextures() + STYLE:ApplyTabStyle(this) + end + end + + InterfaceOptionsFrameTab1:ClearAllPoints() + InterfaceOptionsFrameTab1:SetPoint("BOTTOMLEFT",InterfaceOptionsFrameCategories,"TOPLEFT",-11,-2) + VideoOptionsFrameDefaults:ClearAllPoints() + InterfaceOptionsFrameDefaults:ClearAllPoints() + InterfaceOptionsFrameCancel:ClearAllPoints() + VideoOptionsFrameDefaults:SetPoint("TOPLEFT",VideoOptionsFrameCategoryFrame,"BOTTOMLEFT",-1,-5) + InterfaceOptionsFrameDefaults:SetPoint("TOPLEFT",InterfaceOptionsFrameCategories,"BOTTOMLEFT",-1,-5) + InterfaceOptionsFrameCancel:SetPoint("TOPRIGHT",InterfaceOptionsFramePanelContainer,"BOTTOMRIGHT",0,-6) + for i = 1, #SystemFrameList15 do + local this = _G["InterfaceOptions"..SystemFrameList15[i]] + if(this) then + this:SetCheckboxTemplate(true) + end + end + for i = 1, #SystemFrameList16 do + local this = _G["InterfaceOptions"..SystemFrameList16[i]] + if(this) then + STYLE:ApplyDropdownStyle(this) + end + end + InterfaceOptionsHelpPanelResetTutorials:SetButtonTemplate() + for i = 1, #SystemFrameList17 do + local this = _G[SystemFrameList17[i]] + if(this) then + this:SetCheckboxTemplate(true) + end + end + for i = 1, #SystemFrameList18 do + local this = _G[SystemFrameList18[i]] + if(this) then + STYLE:ApplyDropdownStyle(this, 165) + end + end + for i = 1, #SystemFrameList19 do + local this = _G[SystemFrameList19[i]] + if(this) then + this:SetButtonTemplate() + end + end + AudioOptionsVoicePanelChatMode1KeyBindingButton:ClearAllPoints() + AudioOptionsVoicePanelChatMode1KeyBindingButton:Point("CENTER", AudioOptionsVoicePanelBinding, "CENTER", 0, -10) + CompactUnitFrameProfilesRaidStylePartyFrames:SetCheckboxTemplate(true) + CompactUnitFrameProfilesGeneralOptionsFrameResetPositionButton:SetButtonTemplate() + + for i = 1, #SystemFrameList20 do + local this = _G["CompactUnitFrameProfilesGeneralOptionsFrame"..SystemFrameList20[i]] + if(this) then + this:SetCheckboxTemplate(true) + this:SetFrameLevel(40) + end + end + + for i = 1, #SystemFrameList21 do + local this = _G[SystemFrameList21[i]] + if(this) then + STYLE:ApplyScrollBarStyle(this) + end + end + Graphics_RightQuality:SetBackdrop(nil) + Graphics_RightQuality:Die() + + MacOptionsFrame:RemoveTextures() + MacOptionsFrame:SetFixedPanelTemplate() + MacOptionsButtonCompress:SetButtonTemplate() + MacOptionsButtonKeybindings:SetButtonTemplate() + MacOptionsFrameDefaults:SetButtonTemplate() + MacOptionsFrameOkay:SetButtonTemplate() + MacOptionsFrameCancel:SetButtonTemplate() + MacOptionsFrameMovieRecording:RemoveTextures() + MacOptionsITunesRemote:RemoveTextures() + MacOptionsFrameMisc:RemoveTextures() + STYLE:ApplyDropdownStyle(MacOptionsFrameResolutionDropDown) + STYLE:ApplyDropdownStyle(MacOptionsFrameFramerateDropDown) + STYLE:ApplyDropdownStyle(MacOptionsFrameCodecDropDown) + STYLE:ApplyScrollBarStyle(MacOptionsFrameQualitySlider) + for i = 1, 11 do + local this = _G["MacOptionsFrameCheckButton"..i] + if(this) then + this:SetCheckboxTemplate(true) + end + end + MacOptionsButtonKeybindings:ClearAllPoints() + MacOptionsButtonKeybindings:SetPoint("LEFT", MacOptionsFrameDefaults, "RIGHT", 2, 0) + MacOptionsFrameOkay:ClearAllPoints() + MacOptionsFrameOkay:SetPoint("LEFT", MacOptionsButtonKeybindings, "RIGHT", 2, 0) + MacOptionsFrameCancel:ClearAllPoints() + MacOptionsFrameCancel:SetPoint("LEFT", MacOptionsFrameOkay, "RIGHT", 2, 0) + MacOptionsFrameCancel:SetWidth(MacOptionsFrameCancel:GetWidth() - 6) + ReportCheatingDialog:RemoveTextures() + ReportCheatingDialogCommentFrame:RemoveTextures() + ReportCheatingDialogReportButton:SetButtonTemplate() + ReportCheatingDialogCancelButton:SetButtonTemplate() + ReportCheatingDialog:SetFixedPanelTemplate("Transparent", true) + ReportCheatingDialogCommentFrameEditBox:SetEditboxTemplate() + ReportPlayerNameDialog:RemoveTextures() + ReportPlayerNameDialogCommentFrame:RemoveTextures() + ReportPlayerNameDialogCommentFrameEditBox:SetEditboxTemplate() + ReportPlayerNameDialog:SetFixedPanelTemplate("Transparent", true) + ReportPlayerNameDialogReportButton:SetButtonTemplate() + ReportPlayerNameDialogCancelButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(SideDressUpModelCloseButton) + SideDressUpFrame:RemoveTextures() + SideDressUpFrame.BGTopLeft:Hide() + SideDressUpFrame.BGBottomLeft:Hide() + SideDressUpModelResetButton:SetButtonTemplate() +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(SystemPanelQue) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tabard.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tabard.lua new file mode 100644 index 0000000..663f239 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tabard.lua @@ -0,0 +1,93 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local function cleanT(a,b) + for c=1,a:GetNumRegions()do + local d=select(c,a:GetRegions()) + if d and d:GetObjectType()=="Texture"then + local n=d:GetName(); + if n=='TabardFrameEmblemTopRight' or n=='TabardFrameEmblemTopLeft' or n=='TabardFrameEmblemBottomRight' or n=='TabardFrameEmblemBottomLeft' then return end + if b and type(b)=='boolean'then + d:Die() + elseif d:GetDrawLayer()==b then + d:SetTexture(0,0,0,0) + elseif b and type(b)=='string'and d:GetTexture()~=b then + d:SetTexture(0,0,0,0) + else + d:SetTexture(0,0,0,0) + end + end + end +end +--[[ +########################################################## +TABARDFRAME STYLER +########################################################## +]]-- +local function TabardFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.tabard ~= true then + return + end + cleanT(TabardFrame, true) + TabardFrame:SetPanelTemplate("Action", false) + TabardModel:SetFixedPanelTemplate("Transparent") + TabardFrameCancelButton:SetButtonTemplate() + TabardFrameAcceptButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(TabardFrameCloseButton) + TabardFrameCostFrame:RemoveTextures() + TabardFrameCustomizationFrame:RemoveTextures() + TabardFrameInset:Die() + TabardFrameMoneyInset:Die() + TabardFrameMoneyBg:RemoveTextures() + for b = 1, 5 do + local c = "TabardFrameCustomization"..b;_G[c]:RemoveTextures() + STYLE:ApplyPaginationStyle(_G[c.."LeftButton"]) + STYLE:ApplyPaginationStyle(_G[c.."RightButton"]) + if b>1 then + _G[c]:ClearAllPoints() + _G[c]:Point("TOP", _G["TabardFrameCustomization"..b-1], "BOTTOM", 0, -6) + else + local d, e, f, g, h = _G[c]:GetPoint() + _G[c]:Point(d, e, f, g, h+4) + end + end + TabardCharacterModelRotateLeftButton:Point("BOTTOMLEFT", 4, 4) + TabardCharacterModelRotateRightButton:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) + hooksecurefunc(TabardCharacterModelRotateLeftButton, "SetPoint", function(i, d, j, k, l, m) + if d ~= "BOTTOMLEFT"or l ~= 4 or m ~= 4 then + i:Point("BOTTOMLEFT", 4, 4) + end + end) + hooksecurefunc(TabardCharacterModelRotateRightButton, "SetPoint", function(i, d, j, k, l, m) + if d ~= "TOPLEFT"or l ~= 4 or m ~= 0 then + i:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) + end + end) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(TabardFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/talents.lua new file mode 100644 index 0000000..f9fcfa4 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/talents.lua @@ -0,0 +1,386 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local borderTex = [[Interface\Addons\SVUI\assets\artwork\Template\ROUND]] + +local SpecButtonList = { + "PlayerTalentFrameSpecializationLearnButton", + "PlayerTalentFrameTalentsLearnButton", + "PlayerTalentFramePetSpecializationLearnButton" +}; + +local function Tab_OnEnter(this) + this.backdrop:SetPanelColor("highlight") + this.backdrop:SetBackdropBorderColor(0.1, 0.8, 0.8) +end + +local function Tab_OnLeave(this) + this.backdrop:SetPanelColor("dark") + this.backdrop:SetBackdropBorderColor(0,0,0,1) +end + +local function ChangeTabHelper(this) + this:RemoveTextures() + 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) + 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) +end + +local function StyleGlyphHolder(holder, offset) + if holder.styled then return end + + local outer = holder:CreateTexture(nil, "OVERLAY") + outer:WrapOuter(holder, offset, offset) + outer:SetTexture(borderTex) + outer:SetGradient(unpack(SV.Media.gradient.class)) + + local hover = holder:CreateTexture(nil, "HIGHLIGHT") + hover:WrapOuter(holder, offset, offset) + hover:SetTexture(borderTex) + hover:SetGradient(unpack(SV.Media.gradient.yellow)) + holder.hover = hover + + if holder.SetDisabledTexture then + local disabled = holder:CreateTexture(nil, "BORDER") + disabled:WrapOuter(holder, offset, offset) + disabled:SetTexture(borderTex) + disabled:SetGradient(unpack(SV.Media.gradient.default)) + holder:SetDisabledTexture(disabled) + end + + local cd = holder:GetName() and _G[holder:GetName().."Cooldown"] + if cd then + cd:ClearAllPoints() + cd:FillInner() + end + holder.styled = true +end +--[[ +########################################################## +TALENTFRAME STYLER +########################################################## +]]-- +local function TalentFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.talent ~= true then return end + + STYLE:ApplyWindowStyle(PlayerTalentFrame) + + PlayerTalentFrameInset:RemoveTextures() + PlayerTalentFrameTalents:RemoveTextures() + PlayerTalentFrameTalentsClearInfoFrame:RemoveTextures() + + PlayerTalentFrame.Panel:Point("BOTTOMRIGHT", PlayerTalentFrame, "BOTTOMRIGHT", 0, -5) + PlayerTalentFrameSpecializationTutorialButton:Die() + PlayerTalentFrameTalentsTutorialButton:Die() + PlayerTalentFramePetSpecializationTutorialButton:Die() + STYLE:ApplyCloseButtonStyle(PlayerTalentFrameCloseButton) + PlayerTalentFrameActivateButton:SetButtonTemplate() + + for _,name in pairs(SpecButtonList)do + local button = _G[name]; + if(button) then + button:RemoveTextures() + button:SetButtonTemplate() + local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = button:GetPoint() + button:SetPoint(initialAnchor, anchorParent, relativeAnchor, xPosition, -28) + end + end + + PlayerTalentFrameTalents:SetFixedPanelTemplate("Inset") + PlayerTalentFrameTalentsClearInfoFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + PlayerTalentFrameTalentsClearInfoFrame:Width(PlayerTalentFrameTalentsClearInfoFrame:GetWidth()-2) + PlayerTalentFrameTalentsClearInfoFrame:Height(PlayerTalentFrameTalentsClearInfoFrame:GetHeight()-2) + PlayerTalentFrameTalentsClearInfoFrame.icon:Size(PlayerTalentFrameTalentsClearInfoFrame:GetSize()) + PlayerTalentFrameTalentsClearInfoFrame:Point('TOPLEFT', PlayerTalentFrameTalents, 'BOTTOMLEFT', 8, -8) + + for i = 1, 4 do + STYLE:ApplyTabStyle(_G["PlayerTalentFrameTab"..i]) + if i == 1 then + local d, e, k, g = _G["PlayerTalentFrameTab"..i]:GetPoint() + _G["PlayerTalentFrameTab"..i]:Point(d, e, k, g, -4) + end + end + + hooksecurefunc("PlayerTalentFrame_UpdateTabs", function() + for i = 1, 4 do + local d, e, k, g = _G["PlayerTalentFrameTab"..i]:GetPoint() + _G["PlayerTalentFrameTab"..i]:Point(d, e, k, g, -4) + end + end) + + PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetTexture(1, 1, 1) + PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetAlpha(0.2) + + for i = 1, 2 do + local v = _G["PlayerSpecTab"..i] + _G["PlayerSpecTab"..i.."Background"]:Die() + ChangeTabHelper(v) + end + + hooksecurefunc("PlayerTalentFrame_UpdateSpecs", function() + local d, x, f, g, h = PlayerSpecTab1:GetPoint() + PlayerSpecTab1:Point(d, x, f, -1, h) + end) + + for i = 1, MAX_NUM_TALENT_TIERS do + local gName = ("PlayerTalentFrameTalentsTalentRow%d"):format(i) + local rowFrame = _G[gName] + if(rowFrame) then + local bgFrame = _G[("%sBg"):format(gName)] + if(bgFrame) then bgFrame:Hide() end + + rowFrame:DisableDrawLayer("BORDER") + rowFrame:RemoveTextures() + rowFrame.TopLine:Point("TOP", 0, 4) + rowFrame.BottomLine:Point("BOTTOM", 0, -4) + + for z = 1, NUM_TALENT_COLUMNS do + local talentItem = _G[("%sTalent%d"):format(gName, z)] + if(talentItem) then + STYLE:ApplyItemButtonStyle(talentItem, false, true) + end + end + end + end + + hooksecurefunc("TalentFrame_Update", function() + for i = 1, MAX_NUM_TALENT_TIERS do + local gName = ("PlayerTalentFrameTalentsTalentRow%d"):format(i) + + for z = 1, NUM_TALENT_COLUMNS do + local talentItem = _G[("%sTalent%d"):format(gName, z)] + if(talentItem) then + if talentItem.knownSelection:IsShown() then + talentItem:SetBackdropBorderColor(0, 1, 0) + else + talentItem:SetBackdropBorderColor(0, 0, 0) + end + if talentItem.learnSelection:IsShown() then + talentItem:SetBackdropBorderColor(1, 1, 0) + end + end + end + end + end) + + for b = 1, 5 do + select(b, PlayerTalentFrameSpecializationSpellScrollFrameScrollChild:GetRegions()):Hide() + end + + local C = _G["PlayerTalentFrameSpecializationSpellScrollFrameScrollChild"] + C.ring:Hide() + C:SetFixedPanelTemplate("Transparent") + C.Panel:WrapOuter(C.specIcon) + C.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + + local D = _G["PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild"] + D.ring:Hide() + D:SetFixedPanelTemplate("Transparent") + D.Panel:WrapOuter(D.specIcon) + D.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + + hooksecurefunc("PlayerTalentFrame_UpdateSpecFrame", function(i, E) + local F = GetSpecialization(nil, i.isPet, PlayerSpecTab2:GetChecked() and 2 or 1) + local G = E or F or 1; + local H, p, p, icon = GetSpecializationInfo(G, nil, i.isPet) + local I = i.spellsScroll.child; + I.specIcon:SetTexture(icon) + local J = 1; + local K; + if i.isPet then + K = { GetSpecializationSpells(G, nil, i.isPet) } + else + K = SPEC_SPELLS_DISPLAY[H] + end + for b = 1, #K, 2 do + local L = I["abilityButton"..J] + local p, icon = GetSpellTexture(K[b]) + L.icon:SetTexture(icon) + if not L.restyled then + L.restyled = true;L:Size(30, 30) + L.ring:Hide() + L:SetFixedPanelTemplate("Transparent") + L.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + L.icon:FillInner() + end + J = J+1 + end + for b = 1, GetNumSpecializations(nil, i.isPet)do + local A = i["specButton"..b] + A.SelectedTexture:FillInner(A.Panel) + if A.selected then + A.SelectedTexture:Show() + else + A.SelectedTexture:Hide() + end + end + end) + + for b = 1, GetNumSpecializations(false, nil)do + local button = PlayerTalentFrameSpecialization["specButton"..b] + if(button) then + local _, _, _, icon = GetSpecializationInfo(b, false, nil) + button.ring:Hide() + button.specIcon:SetTexture(icon) + button.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button.specIcon:SetSize(50, 50) + button.specIcon:Point("LEFT", button, "LEFT", 15, 0) + button.SelectedTexture = button:CreateTexture(nil, 'ARTWORK') + button.SelectedTexture:SetTexture(1, 1, 0, 0.1) + end + end + + local btnList = { + "PlayerTalentFrameSpecializationSpecButton", "PlayerTalentFramePetSpecializationSpecButton" + } + + for _, gName in pairs(btnList)do + for b = 1, 4 do + local button = _G[gName..b] + if(button) then + if(_G[gName..b.."Glow"]) then _G[gName..b.."Glow"]:Die() end + local bTex = button:CreateTexture(nil, 'ARTWORK') + bTex:SetTexture(1, 1, 1, 0.1) + button:SetHighlightTexture(bTex) + button.bg:SetAlpha(0) + button.learnedTex:SetAlpha(0) + button.selectedTex:SetAlpha(0) + button:SetFixedPanelTemplate("Button") + button:GetHighlightTexture():FillInner(button.Panel) + end + end + end + + if SV.class == "HUNTER" then + for b = 1, 6 do + select(b, PlayerTalentFramePetSpecialization:GetRegions()):Hide() + end + for b = 1, PlayerTalentFramePetSpecialization:GetNumChildren()do + local O = select(b, PlayerTalentFramePetSpecialization:GetChildren()) + if O and not O:GetName() then + O:DisableDrawLayer("OVERLAY") + end + end + for b = 1, 5 do + select(b, PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild:GetRegions()):Hide() + end + for b = 1, GetNumSpecializations(false, true)do + local A = PlayerTalentFramePetSpecialization["specButton"..b] + local p, p, p, icon = GetSpecializationInfo(b, false, true) + A.ring:Hide() + A.specIcon:SetTexture(icon) + A.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + A.specIcon:SetSize(50, 50) + A.specIcon:Point("LEFT", A, "LEFT", 15, 0) + A.SelectedTexture = A:CreateTexture(nil, 'ARTWORK') + A.SelectedTexture:SetTexture(1, 1, 0, 0.1) + end + PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild.Seperator:SetTexture(1, 1, 1) + PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild.Seperator:SetAlpha(0.2) + end + + PlayerTalentFrameSpecialization:DisableDrawLayer('ARTWORK') + PlayerTalentFrameSpecialization:DisableDrawLayer('BORDER') + + for b = 1, PlayerTalentFrameSpecialization:GetNumChildren()do + local O = select(b, PlayerTalentFrameSpecialization:GetChildren()) + if O and not O:GetName() then + O:DisableDrawLayer("OVERLAY") + end + end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_TalentUI", TalentFrameStyle) + +local function GlyphStyle() + GlyphFrame:RemoveTextures() + --GlyphFrame.background:ClearAllPoints() + --GlyphFrame.background:SetAllPoints(PlayerTalentFrameInset) + GlyphFrame:SetFixedPanelTemplate("Comic", false, 0, 3, 3) + GlyphFrameSideInset:RemoveTextures() + GlyphFrameClearInfoFrame:RemoveTextures() + GlyphFrameClearInfoFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) + GlyphFrameClearInfoFrame:Width(GlyphFrameClearInfoFrame:GetWidth()-2) + GlyphFrameClearInfoFrame:Height(GlyphFrameClearInfoFrame:GetHeight()-2) + GlyphFrameClearInfoFrame.icon:Size(GlyphFrameClearInfoFrame:GetSize()) + GlyphFrameClearInfoFrame:Point("TOPLEFT", GlyphFrame, "BOTTOMLEFT", 6, -10) + STYLE:ApplyDropdownStyle(GlyphFrameFilterDropDown, 212) + GlyphFrameSearchBox:SetEditboxTemplate() + STYLE:ApplyScrollFrameStyle(GlyphFrameScrollFrameScrollBar, 5) + + for b = 1, 10 do + local e = _G["GlyphFrameScrollFrameButton"..b] + local icon = _G["GlyphFrameScrollFrameButton"..b.."Icon"] + e:RemoveTextures() + STYLE:ApplyItemButtonStyle(e) + icon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) + end + + for b = 1, 6 do + local glyphHolder = _G["GlyphFrameGlyph"..b] + if glyphHolder then + glyphHolder:RemoveTextures() + if(b % 2 == 0) then + StyleGlyphHolder(glyphHolder, 4) + else + StyleGlyphHolder(glyphHolder, 1) + end + end + end + + GlyphFrameHeader1:RemoveTextures() + GlyphFrameHeader2:RemoveTextures() + GlyphFrameScrollFrame:SetPanelTemplate("Inset", false, 3, 2, 2) +end + +STYLE:SaveBlizzardStyle("Blizzard_GlyphUI", GlyphStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/taxi.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/taxi.lua new file mode 100644 index 0000000..2e3c82a --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/taxi.lua @@ -0,0 +1,42 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +TAXIFRAME STYLER +########################################################## +]]-- +local function TaxiStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.taxi ~= true then + return + end + + STYLE:ApplyWindowStyle(TaxiFrame) + + TaxiRouteMap:SetPanelTemplate("Blackout") + --TaxiRouteMap.Panel:WrapOuter(TaxiRouteMap, 4, 4) + + STYLE:ApplyCloseButtonStyle(TaxiFrame.CloseButton) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(TaxiStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/timemanager.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/timemanager.lua new file mode 100644 index 0000000..0a49a23 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/timemanager.lua @@ -0,0 +1,69 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +TIMEMANAGER STYLER +########################################################## +]]-- +local function TimeManagerStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.timemanager ~= true then + return + end + + STYLE:ApplyWindowStyle(TimeManagerFrame, true) + + STYLE:ApplyCloseButtonStyle(TimeManagerFrameCloseButton) + TimeManagerFrameInset:Die() + STYLE:ApplyDropdownStyle(TimeManagerAlarmHourDropDown, 80) + STYLE:ApplyDropdownStyle(TimeManagerAlarmMinuteDropDown, 80) + STYLE:ApplyDropdownStyle(TimeManagerAlarmAMPMDropDown, 80) + TimeManagerAlarmMessageEditBox:SetEditboxTemplate() + TimeManagerAlarmEnabledButton:SetCheckboxTemplate(true) + TimeManagerMilitaryTimeCheck:SetCheckboxTemplate(true) + TimeManagerLocalTimeCheck:SetCheckboxTemplate(true) + TimeManagerStopwatchFrame:RemoveTextures() + TimeManagerStopwatchCheck:SetFixedPanelTemplate("Default") + TimeManagerStopwatchCheck:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) + TimeManagerStopwatchCheck:GetNormalTexture():FillInner() + local sWatch = TimeManagerStopwatchCheck:CreateTexture(nil, "OVERLAY") + sWatch:SetTexture(1, 1, 1, 0.3) + sWatch:Point("TOPLEFT", TimeManagerStopwatchCheck, 2, -2) + sWatch:Point("BOTTOMRIGHT", TimeManagerStopwatchCheck, -2, 2) + TimeManagerStopwatchCheck:SetHighlightTexture(sWatch) + + StopwatchFrame:RemoveTextures() + StopwatchFrame:SetBasicPanel() + StopwatchFrame.Panel:Point("TOPLEFT", 0, -17) + StopwatchFrame.Panel:Point("BOTTOMRIGHT", 0, 2) + + StopwatchTabFrame:RemoveTextures() + + STYLE:ApplyCloseButtonStyle(StopwatchCloseButton) + STYLE:ApplyPaginationStyle(StopwatchPlayPauseButton) + STYLE:ApplyPaginationStyle(StopwatchResetButton) + StopwatchPlayPauseButton:Point("RIGHT", StopwatchResetButton, "LEFT", -4, 0) + StopwatchResetButton:Point("BOTTOMRIGHT", StopwatchFrame, "BOTTOMRIGHT", -4, 6) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_TimeManager",TimeManagerStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trade.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trade.lua new file mode 100644 index 0000000..a724c3f --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trade.lua @@ -0,0 +1,112 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +TRADEFRAME STYLER +########################################################## +]]-- +local function TradeFrameStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.trade ~= true then + return + end + + STYLE:ApplyWindowStyle(TradeFrame, true) + + TradeFrameInset:Die() + TradeFrameTradeButton:SetButtonTemplate() + TradeFrameCancelButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(TradeFrameCloseButton, TradeFrame.Panel) + TradePlayerInputMoneyFrameGold:SetEditboxTemplate() + TradePlayerInputMoneyFrameSilver:SetEditboxTemplate() + TradePlayerInputMoneyFrameCopper:SetEditboxTemplate() + TradeRecipientItemsInset:Die() + TradePlayerItemsInset:Die() + TradePlayerInputMoneyInset:Die() + TradePlayerEnchantInset:Die() + TradeRecipientEnchantInset:Die() + TradeRecipientMoneyInset:Die() + TradeRecipientMoneyBg:Die() + local inputs = { + "TradePlayerInputMoneyFrameSilver", + "TradePlayerInputMoneyFrameCopper" + } + for _,frame in pairs(inputs)do + _G[frame]:SetEditboxTemplate() + _G[frame].Panel:Point("TOPLEFT", -2, 1) + _G[frame].Panel:Point("BOTTOMRIGHT", -12, -1) + _G[frame]:SetTextInsets(-1, -1, -2, -2) + end + for i = 1, 7 do + local W = _G["TradePlayerItem"..i] + local X = _G["TradeRecipientItem"..i] + local Y = _G["TradePlayerItem"..i.."ItemButton"] + local Z = _G["TradeRecipientItem"..i.."ItemButton"] + local b = _G["TradePlayerItem"..i.."ItemButtonIconTexture"] + local z = _G["TradeRecipientItem"..i.."ItemButtonIconTexture"] + if Y and Z then + W:RemoveTextures() + X:RemoveTextures() + Y:RemoveTextures() + Z:RemoveTextures() + b:FillInner(Y) + b:SetTexCoord(0.1, 0.9, 0.1, 0.9) + Y:SetFixedPanelTemplate("Button", true) + Y:SetButtonTemplate() + Y.bg = CreateFrame("Frame", nil, Y) + Y.bg:SetPanelTemplate("Inset") + Y.bg:SetPoint("TOPLEFT", Y, "TOPRIGHT", 4, 0) + Y.bg:SetPoint("BOTTOMRIGHT", _G["TradePlayerItem"..i.."NameFrame"], "BOTTOMRIGHT", 0, 14) + Y.bg:SetFrameLevel(Y:GetFrameLevel()-3) + Y:SetFrameLevel(Y:GetFrameLevel()-1) + z:FillInner(Z) + z:SetTexCoord(0.1, 0.9, 0.1, 0.9) + Z:SetFixedPanelTemplate("Button", true) + Z:SetButtonTemplate() + Z.bg = CreateFrame("Frame", nil, Z) + Z.bg:SetPanelTemplate("Inset") + Z.bg:SetPoint("TOPLEFT", Z, "TOPRIGHT", 4, 0) + Z.bg:SetPoint("BOTTOMRIGHT", _G["TradeRecipientItem"..i.."NameFrame"], "BOTTOMRIGHT", 0, 14) + Z.bg:SetFrameLevel(Z:GetFrameLevel()-3) + Z:SetFrameLevel(Z:GetFrameLevel()-1) + end + end + TradeHighlightPlayerTop:SetTexture(0, 1, 0, 0.2) + TradeHighlightPlayerBottom:SetTexture(0, 1, 0, 0.2) + TradeHighlightPlayerMiddle:SetTexture(0, 1, 0, 0.2) + TradeHighlightPlayer:SetFrameStrata("HIGH") + TradeHighlightPlayerEnchantTop:SetTexture(0, 1, 0, 0.2) + TradeHighlightPlayerEnchantBottom:SetTexture(0, 1, 0, 0.2) + TradeHighlightPlayerEnchantMiddle:SetTexture(0, 1, 0, 0.2) + TradeHighlightPlayerEnchant:SetFrameStrata("HIGH") + TradeHighlightRecipientTop:SetTexture(0, 1, 0, 0.2) + TradeHighlightRecipientBottom:SetTexture(0, 1, 0, 0.2) + TradeHighlightRecipientMiddle:SetTexture(0, 1, 0, 0.2) + TradeHighlightRecipient:SetFrameStrata("HIGH") + TradeHighlightRecipientEnchantTop:SetTexture(0, 1, 0, 0.2) + TradeHighlightRecipientEnchantBottom:SetTexture(0, 1, 0, 0.2) + TradeHighlightRecipientEnchantMiddle:SetTexture(0, 1, 0, 0.2) + TradeHighlightRecipientEnchant:SetFrameStrata("HIGH") +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(TradeFrameStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tradeskill.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tradeskill.lua new file mode 100644 index 0000000..77634d4 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/tradeskill.lua @@ -0,0 +1,122 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +TRADESKILL STYLER +########################################################## +]]-- +local function TradeSkillStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.tradeskill ~= true then + return + end + + TradeSkillListScrollFrame:RemoveTextures() + TradeSkillDetailScrollFrame:RemoveTextures() + TradeSkillFrameInset:RemoveTextures() + TradeSkillExpandButtonFrame:RemoveTextures() + TradeSkillDetailScrollChildFrame:RemoveTextures() + TradeSkillRankFrame:RemoveTextures() + TradeSkillCreateButton:RemoveTextures(true) + TradeSkillCancelButton:RemoveTextures(true) + TradeSkillFilterButton:RemoveTextures(true) + TradeSkillCreateAllButton:RemoveTextures(true) + TradeSkillViewGuildCraftersButton:RemoveTextures(true) + + STYLE:ApplyWindowStyle(TradeSkillFrame, true, true) + STYLE:ApplyWindowStyle(TradeSkillGuildFrame) + + TradeSkillGuildFrame:Point("BOTTOMLEFT", TradeSkillFrame, "BOTTOMRIGHT", 3, 19) + TradeSkillGuildFrameContainer:RemoveTextures() + TradeSkillGuildFrameContainer:SetPanelTemplate("Inset") + STYLE:ApplyCloseButtonStyle(TradeSkillGuildFrameCloseButton) + + TradeSkillRankFrame:SetPanelTemplate("Bar", true) + TradeSkillRankFrame:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) + TradeSkillListScrollFrame:SetPanelTemplate("Inset") + TradeSkillDetailScrollFrame:SetPanelTemplate("Inset") + + TradeSkillCreateButton:SetButtonTemplate() + TradeSkillCancelButton:SetButtonTemplate() + TradeSkillFilterButton:SetButtonTemplate() + TradeSkillCreateAllButton:SetButtonTemplate() + TradeSkillViewGuildCraftersButton:SetButtonTemplate() + + STYLE:ApplyScrollFrameStyle(TradeSkillListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(TradeSkillDetailScrollFrameScrollBar) + + TradeSkillLinkButton:Size(17, 14) + TradeSkillLinkButton:Point("LEFT", TradeSkillLinkFrame, "LEFT", 5, -1) + TradeSkillLinkButton:SetButtonTemplate(nil, nil, nil, nil, true) + TradeSkillLinkButton:GetNormalTexture():SetTexCoord(0.25, 0.7, 0.45, 0.8) + + TradeSkillFrameSearchBox:SetEditboxTemplate() + TradeSkillInputBox:SetEditboxTemplate() + + STYLE:ApplyPaginationStyle(TradeSkillDecrementButton) + STYLE:ApplyPaginationStyle(TradeSkillIncrementButton) + + TradeSkillIncrementButton:Point("RIGHT", TradeSkillCreateButton, "LEFT", -13, 0) + STYLE:ApplyCloseButtonStyle(TradeSkillFrameCloseButton) + + TradeSkillSkillIcon:SetFixedPanelTemplate("Slot") + + local internalTest = false; + + hooksecurefunc("TradeSkillFrame_SetSelection", function(_) + TradeSkillSkillIcon:SetFixedPanelTemplate("Slot") + if TradeSkillSkillIcon:GetNormalTexture() then + TradeSkillSkillIcon:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + for i=1, MAX_TRADE_SKILL_REAGENTS do + local u = _G["TradeSkillReagent"..i] + local icon = _G["TradeSkillReagent"..i.."IconTexture"] + local a1 = _G["TradeSkillReagent"..i.."Count"] + icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + icon:SetDrawLayer("OVERLAY") + if not icon.backdrop then + local a2 = CreateFrame("Frame", nil, u) + if u:GetFrameLevel()-1 >= 0 then + a2:SetFrameLevel(u:GetFrameLevel()-1) + else + a2:SetFrameLevel(0) + end + a2:WrapOuter(icon) + a2:SetFixedPanelTemplate("Slot") + icon:SetParent(a2) + icon.backdrop = a2 + end + a1:SetParent(icon.backdrop) + a1:SetDrawLayer("OVERLAY") + if i > 2 and internalTest == false then + local d, a3, f, g, h = u:GetPoint() + u:ClearAllPoints() + u:Point(d, a3, f, g, h-3) + internalTest = true + end + _G["TradeSkillReagent"..i.."NameFrame"]:Die() + end + end) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_TradeSkillUI",TradeSkillStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trainer.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trainer.lua new file mode 100644 index 0000000..f5dbb31 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/trainer.lua @@ -0,0 +1,93 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local ClassTrainerFrameList = { + "ClassTrainerFrame", + "ClassTrainerScrollFrameScrollChild", + "ClassTrainerFrameSkillStepButton", + "ClassTrainerFrameBottomInset" +}; +local ClassTrainerTextureList = { + "ClassTrainerFrameInset", + "ClassTrainerFramePortrait", + "ClassTrainerScrollFrameScrollBarBG", + "ClassTrainerScrollFrameScrollBarTop", + "ClassTrainerScrollFrameScrollBarBottom", + "ClassTrainerScrollFrameScrollBarMiddle" +}; +--[[ +########################################################## +TRAINER STYLER +########################################################## +]]-- +local function TrainerStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.trainer ~= true then return end + + ClassTrainerFrame:SetHeight(ClassTrainerFrame:GetHeight() + 42) + STYLE:ApplyWindowStyle(ClassTrainerFrame) + + for i=1, 8 do + _G["ClassTrainerScrollFrameButton"..i]:RemoveTextures() + _G["ClassTrainerScrollFrameButton"..i]:SetFixedPanelTemplate() + _G["ClassTrainerScrollFrameButton"..i]:SetButtonTemplate() + _G["ClassTrainerScrollFrameButton"..i.."Icon"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) + _G["ClassTrainerScrollFrameButton"..i].Panel:WrapOuter(_G["ClassTrainerScrollFrameButton"..i.."Icon"]) + _G["ClassTrainerScrollFrameButton"..i.."Icon"]:SetParent(_G["ClassTrainerScrollFrameButton"..i].Panel) + _G["ClassTrainerScrollFrameButton"..i].selectedTex:SetTexture(1, 1, 1, 0.3) + _G["ClassTrainerScrollFrameButton"..i].selectedTex:FillInner() + end + + STYLE:ApplyScrollFrameStyle(ClassTrainerScrollFrameScrollBar, 5) + + for _,frame in pairs(ClassTrainerFrameList)do + _G[frame]:RemoveTextures() + end + + for _,texture in pairs(ClassTrainerTextureList)do + _G[texture]:Die() + end + + _G["ClassTrainerTrainButton"]:RemoveTextures() + _G["ClassTrainerTrainButton"]:SetButtonTemplate() + STYLE:ApplyDropdownStyle(ClassTrainerFrameFilterDropDown, 155) + ClassTrainerScrollFrame:SetFixedPanelTemplate("Inset") + STYLE:ApplyCloseButtonStyle(ClassTrainerFrameCloseButton, ClassTrainerFrame) + ClassTrainerFrameSkillStepButton.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + ClassTrainerFrameSkillStepButton:SetFixedPanelTemplate("Button", true) + --ClassTrainerFrameSkillStepButton.Panel:WrapOuter(ClassTrainerFrameSkillStepButton.icon) + --ClassTrainerFrameSkillStepButton.icon:SetParent(ClassTrainerFrameSkillStepButton.Panel) + ClassTrainerFrameSkillStepButtonHighlight:SetTexture(1, 1, 1, 0.3) + ClassTrainerFrameSkillStepButton.selectedTex:SetTexture(1, 1, 1, 0.3) + ClassTrainerStatusBar:RemoveTextures() + ClassTrainerStatusBar:SetStatusBarTexture(SV.Media.bar.default) + ClassTrainerStatusBar:SetPanelTemplate("Slot", true, 1, 2, 2) + ClassTrainerStatusBar.rankText:ClearAllPoints() + ClassTrainerStatusBar.rankText:SetPoint("CENTER", ClassTrainerStatusBar, "CENTER") +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_TrainerUI",TrainerStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/transmog.lua new file mode 100644 index 0000000..a91f476 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/transmog.lua @@ -0,0 +1,99 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local TransmogFrameList = { + "TransmogrifyModelFrameLines", + "TransmogrifyModelFrameMarbleBg", + "TransmogrifyFrameButtonFrameButtonBorder", + "TransmogrifyFrameButtonFrameButtonBottomBorder", + "TransmogrifyFrameButtonFrameMoneyLeft", + "TransmogrifyFrameButtonFrameMoneyRight", + "TransmogrifyFrameButtonFrameMoneyMiddle" +}; +local TransmogSlotList = { + "Head", + "Shoulder", + "Chest", + "Waist", + "Legs", + "Feet", + "Wrist", + "Hands", + "Back", + "MainHand", + "SecondaryHand" +}; +--[[ +########################################################## +TRANSMOG STYLER +########################################################## +]]-- +local function TransmogStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.transmogrify ~= true then return end + + STYLE:ApplyWindowStyle(TransmogrifyFrame, true) + + for p, texture in pairs(TransmogFrameList)do + _G[texture]:Die() + end + + select(2, TransmogrifyModelFrame:GetRegions()):Die() + + TransmogrifyModelFrame:SetFixedPanelTemplate("ModelComic") + TransmogrifyFrameButtonFrame:GetRegions():Die() + TransmogrifyApplyButton:RemoveTextures() + TransmogrifyApplyButton:SetButtonTemplate() + TransmogrifyApplyButton:Point("BOTTOMRIGHT", TransmogrifyFrame, "BOTTOMRIGHT", -4, 4) + STYLE:ApplyCloseButtonStyle(TransmogrifyArtFrameCloseButton) + TransmogrifyArtFrame:RemoveTextures() + + for p, a9 in pairs(TransmogSlotList)do + local icon = _G["TransmogrifyFrame"..a9 .."SlotIconTexture"] + local a9 = _G["TransmogrifyFrame"..a9 .."Slot"] + if a9 then + a9:RemoveTextures() + a9:SetSlotTemplate(true) + a9:SetFrameLevel(a9:GetFrameLevel()+2) + + a9.Panel:SetAllPoints() + icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + icon:ClearAllPoints() + icon:FillInner() + end + end + + TransmogrifyConfirmationPopup:SetParent(UIParent) + TransmogrifyConfirmationPopup:RemoveTextures() + TransmogrifyConfirmationPopup:SetPanelTemplate("Pattern") + TransmogrifyConfirmationPopup.Button1:SetButtonTemplate() + TransmogrifyConfirmationPopup.Button2:SetButtonTemplate() + STYLE:ApplyItemButtonStyle(TransmogrifyConfirmationPopupItemFrame1, true) + STYLE:ApplyItemButtonStyle(TransmogrifyConfirmationPopupItemFrame2, true) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_ItemAlterationUI", TransmogStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/voidstorage.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/voidstorage.lua new file mode 100644 index 0000000..981f67e --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/voidstorage.lua @@ -0,0 +1,94 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local VoidStorageList = { + "VoidStorageBorderFrame", + "VoidStorageDepositFrame", + "VoidStorageWithdrawFrame", + "VoidStorageCostFrame", + "VoidStorageStorageFrame", + "VoidStoragePurchaseFrame", + "VoidItemSearchBox" +}; +--[[ +########################################################## +VOIDSTORAGE STYLER +########################################################## +]]-- +local function VoidStorageStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.voidstorage ~= true then + return + end + + STYLE:ApplyWindowStyle(VoidStorageFrame, true) + + for _,frame in pairs(VoidStorageList)do + _G[frame]:RemoveTextures() + end + + VoidStoragePurchaseFrame:SetFrameStrata('DIALOG') + VoidStoragePurchaseFrame:SetFixedPanelTemplate("Button", true) + VoidStorageFrameMarbleBg:Die() + VoidStorageFrameLines:Die() + + select(2, VoidStorageFrame:GetRegions()):Die() + + VoidStoragePurchaseButton:SetButtonTemplate() + VoidStorageHelpBoxButton:SetButtonTemplate() + VoidStorageTransferButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(VoidStorageBorderFrame.CloseButton) + VoidItemSearchBox:SetPanelTemplate("Inset") + VoidItemSearchBox.Panel:Point("TOPLEFT", 10, -1) + VoidItemSearchBox.Panel:Point("BOTTOMRIGHT", 4, 1) + + for e = 1, 9 do + local f = _G["VoidStorageDepositButton"..e] + local g = _G["VoidStorageWithdrawButton"..e] + local h = _G["VoidStorageDepositButton"..e.."IconTexture"] + local i = _G["VoidStorageWithdrawButton"..e.."IconTexture"] + _G["VoidStorageDepositButton"..e.."Bg"]:Hide() + _G["VoidStorageWithdrawButton"..e.."Bg"]:Hide() + f:SetSlotTemplate(true) + g:SetSlotTemplate(true) + h:SetTexCoord(0.1, 0.9, 0.1, 0.9) + h:FillInner() + i:SetTexCoord(0.1, 0.9, 0.1, 0.9) + i:FillInner() + end + + for e = 1, 80 do + local j = _G["VoidStorageStorageButton"..e] + local k = _G["VoidStorageStorageButton"..e.."IconTexture"] + _G["VoidStorageStorageButton"..e.."Bg"]:Hide() + j:SetSlotTemplate(true) + k:SetTexCoord(0.1, 0.9, 0.1, 0.9) + k:FillInner() + end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_VoidStorageUI", VoidStorageStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldmap.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldmap.lua new file mode 100644 index 0000000..c38c8b2 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldmap.lua @@ -0,0 +1,241 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local function AdjustMapLevel() + if InCombatLockdown()then return end + WorldMapFrame:SetFrameLevel(4) + WorldMapDetailFrame:SetFrameLevel(6) + WorldMapFrame:SetFrameStrata('HIGH') + WorldMapArchaeologyDigSites:SetFrameLevel(8) + WorldMapArchaeologyDigSites:SetFrameStrata('DIALOG') +end + +local function WorldMap_SmallView() + WorldMapFrame.Panel:ClearAllPoints() + WorldMapFrame.Panel:WrapOuter(WorldMapFrame, 4, 4) + WorldMapFrame.Panel.Panel:WrapOuter(WorldMapFrame.Panel) +end + +local function WorldMap_FullView() + WorldMapFrame.Panel:ClearAllPoints() + + if(SV.GameVersion >= 60000) then + WorldMapFrame.Panel:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -12, 74) + WorldMapFrame.Panel:Point("BOTTOMRIGHT", WorldMapDetailFrame, "BOTTOMRIGHT", 12, -24) + else + WorldMapFrame.Panel:Point("TOPLEFT", WorldMapDetailFrame, "TOPLEFT", -12, 74) + WorldMapFrame.Panel:Point("BOTTOMRIGHT", WorldMapShowDropDown, "BOTTOMRIGHT", 4, -4) + end + WorldMapFrame.Panel.Panel:SetAllPoints(SV.UIParent) +end + +local function WorldMap_QuestView() + WorldMap_FullView() + if not WorldMapQuestDetailScrollFrame.Panel then + WorldMapQuestDetailScrollFrame:SetFixedPanelTemplate("Inset") + WorldMapQuestDetailScrollFrame.Panel:Point("TOPLEFT", -22, 2) + WorldMapQuestDetailScrollFrame.Panel:Point("BOTTOMRIGHT", WorldMapShowDropDown, 4, -4) + WorldMapQuestDetailScrollFrame.spellTex = WorldMapQuestDetailScrollFrame:CreateTexture(nil, 'ARTWORK') + WorldMapQuestDetailScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) + WorldMapQuestDetailScrollFrame.spellTex:SetPoint("TOPLEFT", WorldMapQuestDetailScrollFrame.Panel, 'TOPLEFT', 2, -2) + WorldMapQuestDetailScrollFrame.spellTex:Size(586, 310) + WorldMapQuestDetailScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) + end + if not WorldMapQuestRewardScrollFrame.Panel then + WorldMapQuestRewardScrollFrame:SetPanelTemplate("Inset") + WorldMapQuestRewardScrollFrame.Panel:Point("BOTTOMRIGHT", 22, -4) + WorldMapQuestRewardScrollFrame.spellTex = WorldMapQuestRewardScrollFrame:CreateTexture(nil, 'ARTWORK') + WorldMapQuestRewardScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) + WorldMapQuestRewardScrollFrame.spellTex:SetPoint("TOPLEFT", WorldMapQuestRewardScrollFrame.Panel, 'TOPLEFT', 2, -2) + WorldMapQuestRewardScrollFrame.spellTex:Size(585, 310) + WorldMapQuestRewardScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) + end + if not WorldMapQuestScrollFrame.Panel then + WorldMapQuestScrollFrame:SetPanelTemplate("Inset") + WorldMapQuestScrollFrame.Panel:Point("TOPLEFT", 0, 2) + WorldMapQuestScrollFrame.Panel:Point("BOTTOMRIGHT", 25, -3) + WorldMapQuestScrollFrame.spellTex = WorldMapQuestScrollFrame:CreateTexture(nil, 'ARTWORK') + WorldMapQuestScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) + WorldMapQuestScrollFrame.spellTex:SetPoint("TOPLEFT", WorldMapQuestScrollFrame.Panel, 'TOPLEFT', 2, -2) + WorldMapQuestScrollFrame.spellTex:Size(520, 1033) + WorldMapQuestScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) + end +end + +local function StripQuestMapFrame() + WorldMapFrame.BorderFrame:RemoveTextures(true) + WorldMapFrame.BorderFrame.ButtonFrameEdge:SetTexture(0,0,0,0) + WorldMapFrame.BorderFrame.InsetBorderTop:SetTexture(0,0,0,0) + WorldMapFrame.BorderFrame.Inset:RemoveTextures(true) + WorldMapTitleButton:RemoveTextures(true) + WorldMapFrameNavBar:RemoveTextures(true) + WorldMapFrameNavBarOverlay:RemoveTextures(true) + QuestMapFrame:RemoveTextures(true) + QuestMapFrame.DetailsFrame:RemoveTextures(true) + + QuestMapFrame.DetailsFrame:SetPanelTemplate("Paper") + + QuestMapFrame.DetailsFrame.CompleteQuestFrame:RemoveTextures(true) + QuestMapFrame.DetailsFrame.CompleteQuestFrame.CompleteButton:RemoveTextures(true) + QuestMapFrame.DetailsFrame.CompleteQuestFrame.CompleteButton:SetButtonTemplate() + + QuestMapFrame.DetailsFrame.BackButton:RemoveTextures(true) + QuestMapFrame.DetailsFrame.BackButton:SetButtonTemplate() + + QuestMapFrame.DetailsFrame.AbandonButton:RemoveTextures(true) + QuestMapFrame.DetailsFrame.AbandonButton:SetButtonTemplate() + + QuestMapFrame.DetailsFrame.ShareButton:RemoveTextures(true) + QuestMapFrame.DetailsFrame.ShareButton:SetButtonTemplate() + + QuestMapFrame.DetailsFrame.TrackButton:RemoveTextures(true) + QuestMapFrame.DetailsFrame.TrackButton:SetButtonTemplate() + + QuestMapFrame.DetailsFrame.RewardsFrame:RemoveTextures(true) + QuestMapFrame.DetailsFrame.RewardsFrame:SetPanelTemplate("Paper") + QuestMapFrame.DetailsFrame.RewardsFrame:SetPanelColor("dark") + + QuestScrollFrame:RemoveTextures(true) + + local w,h = WorldMapFrame.UIElementsFrame:GetSize() + local underlay = CreateFrame("Frame", nil, WorldMapFrame) + underlay:Size(w,h) + underlay:SetAllPoints(WorldMapFrame.UIElementsFrame) + underlay:SetPanelTemplate("Blackout") + + WorldMapFrame.UIElementsFrame:SetParent(underlay) + + local detailWidth = QuestMapFrame.DetailsFrame.RewardsFrame:GetWidth() + QuestMapFrame.DetailsFrame:ClearAllPoints() + QuestMapFrame.DetailsFrame:SetPoint("TOPLEFT", underlay, "TOPRIGHT", 2, 0) + QuestMapFrame.DetailsFrame:SetWidth(detailWidth) + + WorldMapFrameNavBar:ClearAllPoints() + WorldMapFrameNavBar:Point("TOPLEFT", WorldMapFrame.Panel, "TOPLEFT", 12, -22) + WorldMapFrameNavBar:SetPanelTemplate("Blackout") +end + +local function WorldMap_OnShow() + + if(SV.GameVersion >= 60000) then + --StripQuestMapFrame() + if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then + WorldMap_FullView() + elseif WORLDMAP_SETTINGS.size == WORLDMAP_WINDOWED_SIZE then + WorldMap_SmallView() + end + else + WorldMapFrame:RemoveTextures() + if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then + WorldMap_FullView() + elseif WORLDMAP_SETTINGS.size == WORLDMAP_WINDOWED_SIZE then + WorldMap_SmallView() + elseif WORLDMAP_SETTINGS.size == WORLDMAP_QUESTLIST_SIZE then + WorldMap_QuestView() + end + end + + if not SV.db.SVMap.tinyWorldMap then + BlackoutWorld:SetTexture(0, 0, 0, 1) + else + BlackoutWorld:SetTexture(0,0,0,0) + end + + WorldMapFrameAreaLabel:SetFontTemplate(nil, 50, "OUTLINE") + WorldMapFrameAreaLabel:SetShadowOffset(2, -2) + WorldMapFrameAreaLabel:SetTextColor(0.90, 0.8294, 0.6407) + WorldMapFrameAreaDescription:SetFontTemplate(nil, 40, "OUTLINE") + WorldMapFrameAreaDescription:SetShadowOffset(2, -2) + WorldMapFrameAreaPetLevels:SetFontTemplate(nil, 25, 'OUTLINE') + WorldMapZoneInfo:SetFontTemplate(nil, 27, "OUTLINE") + WorldMapZoneInfo:SetShadowOffset(2, -2) + + if InCombatLockdown() then return end + AdjustMapLevel() +end +--[[ +########################################################## +WORLDMAP STYLER +########################################################## +]]-- +local function WorldMapStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.worldmap ~= true then return end + + WorldMapFrame:SetFrameLevel(4) + STYLE:ApplyWindowStyle(WorldMapFrame, true, true) + WorldMapFrame.Panel:SetPanelTemplate("Blackout") + + STYLE:ApplyScrollFrameStyle(WorldMapQuestScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(WorldMapQuestDetailScrollFrameScrollBar, 4) + STYLE:ApplyScrollFrameStyle(WorldMapQuestRewardScrollFrameScrollBar, 4) + + WorldMapDetailFrame:SetFrameLevel(6) + WorldMapDetailFrame:SetPanelTemplate("Blackout") + + WorldMapArchaeologyDigSites:SetFrameLevel(8) + + WorldMapFrameSizeDownButton:SetFrameLevel(999) + WorldMapFrameSizeUpButton:SetFrameLevel(999) + WorldMapFrameCloseButton:SetFrameLevel(999) + + STYLE:ApplyCloseButtonStyle(WorldMapFrameCloseButton) + STYLE:ApplyArrowButtonStyle(WorldMapFrameSizeDownButton, "down") + STYLE:ApplyArrowButtonStyle(WorldMapFrameSizeUpButton, "up") + + STYLE:ApplyDropdownStyle(WorldMapLevelDropDown) + STYLE:ApplyDropdownStyle(WorldMapZoneMinimapDropDown) + STYLE:ApplyDropdownStyle(WorldMapContinentDropDown) + STYLE:ApplyDropdownStyle(WorldMapZoneDropDown) + STYLE:ApplyDropdownStyle(WorldMapShowDropDown) + + if(SV.GameVersion < 60000) then + WorldMapZoomOutButton:SetButtonTemplate() + WorldMapTrackQuest:SetCheckboxTemplate(true) + hooksecurefunc("WorldMapFrame_SetFullMapView", WorldMap_FullView) + hooksecurefunc("WorldMapFrame_SetQuestMapView", WorldMap_QuestView) + else + StripQuestMapFrame() + end + + WorldMapFrame:HookScript("OnShow", WorldMap_OnShow) + hooksecurefunc("WorldMap_ToggleSizeUp", WorldMap_OnShow) + BlackoutWorld:SetParent(WorldMapFrame.Panel.Panel) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(WorldMapStyle) + +--[[ +function ArchaeologyDigSiteFrame_OnUpdate() + WorldMapArchaeologyDigSites:DrawNone(); + local numEntries = ArchaeologyMapUpdateAll(); + for i = 1, numEntries do + local blobID = ArcheologyGetVisibleBlobID(i); + WorldMapArchaeologyDigSites:DrawBlob(blobID, true); + end +end +]] \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldstate.lua b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldstate.lua new file mode 100644 index 0000000..29182bd --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/blizzard/worldstate.lua @@ -0,0 +1,43 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +--[[ +########################################################## +WORLDSTATE STYLER +########################################################## +]]-- +local function WorldStateStyle() + if SV.db[Schema].blizzard.enable ~= true or SV.db[Schema].blizzard.bgscore ~= true then return end + WorldStateScoreScrollFrame:RemoveTextures() + WorldStateScoreFrame:RemoveTextures() + WorldStateScoreFrame:SetPanelTemplate("Halftone") + STYLE:ApplyCloseButtonStyle(WorldStateScoreFrameCloseButton) + STYLE:ApplyScrollFrameStyle(WorldStateScoreScrollFrameScrollBar) + WorldStateScoreFrameInset:SetAlpha(0) + WorldStateScoreFrameLeaveButton:SetButtonTemplate() + for b = 1, 3 do + STYLE:ApplyTabStyle(_G["WorldStateScoreFrameTab"..b]) + end +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(WorldStateStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua new file mode 100644 index 0000000..110e7c0 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/components/style_methods.lua @@ -0,0 +1,687 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local error = _G.error; +local pcall = _G.pcall; +local tinsert = _G.tinsert; +local string = _G.string; +local table = _G.table; +--[[ STRING METHODS ]]-- +local lower, upper, find = string.lower, string.upper, string.find; +--[[ TABLE METHODS ]]-- +local twipe = table.wipe; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV = _G.SVUI; +local L = SV.L; +local STYLE = select(2, ...); +local Schema = STYLE.Schema; +local LSM = LibStub("LibSharedMedia-3.0") +local NewHook = hooksecurefunc; +--[[ +########################################################## + /$$$$$$$$/$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$$$ +| $$_____/ $$__ $$ /$$__ $$| $$$ /$$$| $$_____/ +| $$ | $$ \ $$| $$ \ $$| $$$$ /$$$$| $$ +| $$$$$ | $$$$$$$/| $$$$$$$$| $$ $$/$$ $$| $$$$$ +| $$__/ | $$__ $$| $$__ $$| $$ $$$| $$| $$__/ +| $$ | $$ \ $$| $$ | $$| $$\ $ | $$| $$ +| $$ | $$ | $$| $$ | $$| $$ \/ | $$| $$$$$$$$ +|__/ |__/ |__/|__/ |__/|__/ |__/|________/ +########################################################## +]]-- +local levelDiff = 2 + +local _hook_WindowLevel = function(self, level) + local adjustment = level - levelDiff; + if(adjustment < 0) then adjustment = 0 end + self.Panel:SetFrameLevel(adjustment) +end + +function STYLE:ApplyFrameStyle(this, template, noStripping, fullStripping) + if(not this or (this and this.Panel)) then return end + if not noStripping then this:RemoveTextures(fullStripping) end + template = template or "Transparent" + this:SetPanelTemplate(template) +end + +function STYLE:ApplyUnderlayStyle(this, template, noStripping, fullStripping) + if(not this or (this and this.Panel)) then return end + if not noStripping then this:RemoveTextures(fullStripping) end + template = template or "Transparent" + this:SetFixedPanelTemplate(template) +end + +function STYLE:ApplyWindowStyle(this, action, fullStrip) + if(not this or (this and this.Panel)) then return end + local template = action and "Action" or "Halftone" + local baselevel = this:GetFrameLevel() + if(baselevel < 1) then + this:SetFrameLevel(1) + end + + this:RemoveTextures(fullStrip) + this:SetPanelTemplate(template) +end + +function STYLE:ApplyWindowHolder(this, fullStrip) + if(not this or (this and this.Panel)) then return end + local baselevel = this:GetFrameLevel() + if(baselevel < 1) then + this:SetFrameLevel(1) + end + + this:RemoveTextures(fullStrip) + this:SetPanelTemplate("Blackout") +end +--[[ +########################################################## + /$$$$$$$ /$$ /$$ /$$$$$$$$/$$$$$$$$/$$$$$$ /$$ /$$ +| $$__ $$| $$ | $$|__ $$__/__ $$__/$$__ $$| $$$ | $$ +| $$ \ $$| $$ | $$ | $$ | $$ | $$ \ $$| $$$$| $$ +| $$$$$$$ | $$ | $$ | $$ | $$ | $$ | $$| $$ $$ $$ +| $$__ $$| $$ | $$ | $$ | $$ | $$ | $$| $$ $$$$ +| $$ \ $$| $$ | $$ | $$ | $$ | $$ | $$| $$\ $$$ +| $$$$$$$/| $$$$$$/ | $$ | $$ | $$$$$$/| $$ \ $$ +|_______/ \______/ |__/ |__/ \______/ |__/ \__/ +########################################################## +]]-- +local Button_OnEnter = function(self) + self:SetBackdropColor(0.1, 0.8, 0.8) +end + +local Button_OnLeave = function(self) + self:SetBackdropColor(unpack(SV.Media.color.default)) +end + +function STYLE:ApplyButtonStyle(this) + if not this then return end + this:SetButtonTemplate() +end + +local ArrowButton_OnEnter = function(self) + self:SetBackdropBorderColor(0.1, 0.8, 0.8) +end + +local ArrowButton_OnLeave = function(self) + self:SetBackdropBorderColor(0,0,0,1) +end + +function STYLE:ApplyArrowButtonStyle(this, direction, anchor) + if not this then return end + this:RemoveTextures() + this:SetButtonTemplate(nil, 1, -7, -7, nil, "green") + this:SetFrameLevel(this:GetFrameLevel() + 4) + this:SetNormalTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\MOVE-]] .. direction:upper()) + if not this.hookedColors then + this:HookScript("OnEnter", ArrowButton_OnEnter) + this:HookScript("OnLeave", ArrowButton_OnLeave) + this.hookedColors = true + end + if anchor then + this:SetPoint("TOPRIGHT", anchor, "TOPRIGHT", 2, 2) + end +end + +--[[ CLOSE BUTTON ]]-- +local CloseButton_OnEnter = function(self) + self:SetBackdropBorderColor(0.1, 0.8, 0.8) +end + +local CloseButton_OnLeave = function(self) + self:SetBackdropBorderColor(0,0,0,1) +end + +function STYLE:ApplyCloseButtonStyle(this, anchor) + if not this then return end + this:RemoveTextures() + this:SetButtonTemplate(nil, 1, -7, -7, nil, "red") + this:SetFrameLevel(this:GetFrameLevel() + 4) + this:SetNormalTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\CLOSE-BUTTON]]) + if not this.hookedColors then + this:HookScript("OnEnter", CloseButton_OnEnter) + this:HookScript("OnLeave", CloseButton_OnLeave) + this.hookedColors = true + end + if anchor then + this:SetPoint("TOPRIGHT", anchor, "TOPRIGHT", 2, 2) + end +end + +--[[ ITEM BUTTON ]]-- + +function STYLE:ApplyItemButtonStyle(frame, adjust, shrink, noScript) + if(not frame or (frame and frame.StyleHooked)) then return end + + local link = frame:GetName() + + frame:RemoveTextures() + + if(not frame.Panel) then + if shrink then + frame:SetPanelTemplate("Button", true, 1, -2, -2) + else + frame:SetFixedPanelTemplate("Button") + end + end + + if(link) then + local nameObject = _G[("%sName"):format(link)] + local subNameObject = _G[("%sSubName"):format(link)] + local arrowObject = _G[("%sFlyoutArrow"):format(link)] + local levelObject = _G[("%sLevel"):format(link)] + local iconObject = _G[("%sIcon"):format(link)] or _G[("%sIconTexture"):format(link)] + local countObject = _G[("%sCount"):format(link)] + + if(iconObject and not frame.IconShadow) then + iconObject:SetTexCoord(0.1, 0.9, 0.1, 0.9) + + if adjust then + iconObject:FillInner(frame, 2, 2) + end + + frame.IconShadow = CreateFrame("Frame", nil, frame) + frame.IconShadow:WrapOuter(iconObject) + frame.IconShadow:SetBasicPanel(0,0,0,0,true) + + --iconObject:SetParent(frame.IconShadow) + end + + if(not frame.Riser) then + local fg = CreateFrame("Frame", nil, frame) + fg:SetSize(120, 22) + fg:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", 0, -11) + fg:SetFrameLevel(frame:GetFrameLevel() + 1) + frame.Riser = fg + end + + if(countObject) then + countObject:SetParent(frame.Riser) + countObject:SetAllPoints(frame.Riser) + countObject:SetFont(LSM:Fetch("font", SV.db.media.fonts.number), SV.db.media.fonts.size, "OUTLINE") + countObject:SetDrawLayer("ARTWORK", 7) + end + + if(nameObject) then nameObject:SetParent(frame.Riser) end + if(subNameObject) then subNameObject:SetParent(frame.Riser) end + if(arrowObject) then arrowObject:SetParent(frame.Riser) end + + if(levelObject) then + levelObject:SetParent(frame.Riser) + levelObject:SetFont(LSM:Fetch("font", SV.db.media.fonts.number), SV.db.media.fonts.size, "OUTLINE") + levelObject:SetDrawLayer("ARTWORK", 7) + end + + if(not noScript) then + frame:HookScript("OnEnter", Button_OnEnter) + frame:HookScript("OnLeave", Button_OnLeave) + end + end + + frame.StyleHooked = true +end +--[[ +########################################################## + /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$ + /$$__ $$ /$$__ $$| $$__ $$ /$$__ $$| $$ | $$ +| $$ \__/| $$ \__/| $$ \ $$| $$ \ $$| $$ | $$ +| $$$$$$ | $$ | $$$$$$$/| $$ | $$| $$ | $$ + \____ $$| $$ | $$__ $$| $$ | $$| $$ | $$ + /$$ \ $$| $$ $$| $$ \ $$| $$ | $$| $$ | $$ +| $$$$$$/| $$$$$$/| $$ | $$| $$$$$$/| $$$$$$$$| $$$$$$$$ + \______/ \______/ |__/ |__/ \______/ |________/|________/ +########################################################## +--]] +function STYLE:ApplyScrollFrameStyle(this, scale, yOffset) + if(not this or (this and this.StyleHooked)) then return end + + scale = scale or 5 + local scrollName = this:GetName() + local bg, track, top, bottom, mid, upButton, downButton + + + bg = _G[("%sBG"):format(scrollName)] + if(bg) then bg:SetTexture(0,0,0,0) end + + track = _G[("%sTrack"):format(scrollName)] + if(track) then track:SetTexture(0,0,0,0) end + + top = _G[("%sTop"):format(scrollName)] + if(top) then top:SetTexture(0,0,0,0) end + + bottom = _G[("%sBottom"):format(scrollName)] + if(bottom) then bottom:SetTexture(0,0,0,0) end + + mid = _G[("%sMiddle"):format(scrollName)] + if(mid) then mid:SetTexture(0,0,0,0) end + + upButton = _G[("%sScrollUpButton"):format(scrollName)] + downButton = _G[("%sScrollDownButton"):format(scrollName)] + + if(upButton and downButton) then + upButton:RemoveTextures() + if(not upButton.icon) then + local upW, upH = upButton:GetSize() + STYLE:ApplyPaginationStyle(upButton) + SquareButton_SetIcon(upButton, "UP") + upButton:Size(upW + scale, upH + scale) + if(yOffset) then + local anchor, parent, relative, xBase, yBase = upButton:GetPoint() + local yAdjust = (yOffset or 0) + yBase + upButton:ClearAllPoints() + upButton:SetPoint(anchor, parent, relative, xBase, yAdjust) + end + end + + downButton:RemoveTextures() + if(not downButton.icon) then + local dnW, dnH = downButton:GetSize() + STYLE:ApplyPaginationStyle(downButton) + SquareButton_SetIcon(downButton, "DOWN") + downButton:Size(dnW + scale, dnH + scale) + if(yOffset) then + local anchor, parent, relative, xBase, yBase = downButton:GetPoint() + local yAdjust = ((yOffset or 0) * -1) + yBase + downButton:ClearAllPoints() + downButton:SetPoint(anchor, parent, relative, xBase, yAdjust) + end + end + + if(not this.ScrollBG) then + this.ScrollBG = CreateFrame("Frame", nil, this) + this.ScrollBG:SetPoint("TOPLEFT", upButton, "BOTTOMLEFT", 0, -1) + this.ScrollBG:SetPoint("BOTTOMRIGHT", downButton, "TOPRIGHT", 0, 1) + this.ScrollBG:SetBasicPanel() + end + + if(this:GetThumbTexture()) then + this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") + end + end + + this.StyleHooked = true +end + +function STYLE:ApplyScrollBarStyle(this) + if(not this or (this and not this.GetOrientation)) then return end + + if(this:GetOrientation() == "VERTICAL") then + this:SetWidth(12) + else + this:SetHeight(12) + for i=1, this:GetNumRegions() do + local child = select(i, this:GetRegions()) + if(child and child:GetObjectType() == "FontString") then + local anchor, parent, relative, x, y = child:GetPoint() + if relative:find("BOTTOM") then + child:SetPoint(anchor, parent, relative, x, y - 4) + end + end + end + end + + this:RemoveTextures() + this:SetBackdrop(nil) + this:SetFixedPanelTemplate("Component") + this.Panel:SetBackdropBorderColor(0.2,0.2,0.2) + this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") + + this.StyleHooked = true +end +--[[ +########################################################## + /$$$$$$$$/$$$$$$ /$$$$$$$ /$$$$$$ +|__ $$__/$$__ $$| $$__ $$ /$$__ $$ + | $$ | $$ \ $$| $$ \ $$| $$ \__/ + | $$ | $$$$$$$$| $$$$$$$ | $$$$$$ + | $$ | $$__ $$| $$__ $$ \____ $$ + | $$ | $$ | $$| $$ \ $$ /$$ \ $$ + | $$ | $$ | $$| $$$$$$$/| $$$$$$/ + |__/ |__/ |__/|_______/ \______/ +########################################################## +--]] +local Tab_OnEnter = function(self) + self.backdrop:SetPanelColor("highlight") + self.backdrop:SetBackdropBorderColor(0.1, 0.8, 0.8) +end + +local Tab_OnLeave = function(self) + self.backdrop:SetPanelColor("dark") + self.backdrop:SetBackdropBorderColor(0,0,0,1) +end + +function STYLE:ApplyTabStyle(this, addBackground) + if(not this or (this and this.StyleHooked)) then return end + + local tab = this:GetName(); + + if _G[tab.."Left"] then _G[tab.."Left"]:SetTexture(0,0,0,0) end + if _G[tab.."LeftDisabled"] then _G[tab.."LeftDisabled"]:SetTexture(0,0,0,0) end + if _G[tab.."Right"] then _G[tab.."Right"]:SetTexture(0,0,0,0) end + if _G[tab.."RightDisabled"] then _G[tab.."RightDisabled"]:SetTexture(0,0,0,0) end + if _G[tab.."Middle"] then _G[tab.."Middle"]:SetTexture(0,0,0,0) end + if _G[tab.."MiddleDisabled"] then _G[tab.."MiddleDisabled"]:SetTexture(0,0,0,0) end + + if(this.GetHighlightTexture and this:GetHighlightTexture()) then + this:GetHighlightTexture():SetTexture(0,0,0,0) + end + + this:RemoveTextures() + + if(addBackground) then + 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) + 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) + + local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = this:GetPoint() + this:Point(initialAnchor, anchorParent, relativeAnchor, 1, yPosition) + else + this.backdrop = CreateFrame("Frame", nil, this) + this.backdrop:FillInner(this, 10, 3) + this.backdrop:SetFixedPanelTemplate("Component", true) + this.backdrop:SetPanelColor("dark") + + if(this:GetFrameLevel() > 0) then + this.backdrop:SetFrameLevel(this:GetFrameLevel() - 1) + end + end + + this:HookScript("OnEnter", Tab_OnEnter) + this:HookScript("OnLeave", Tab_OnLeave) + + this.StyleHooked = true +end +--[[ +########################################################## + /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$ +| $$__ $$ /$$__ $$ /$$__ $$| $$_____/ +| $$ \ $$| $$ \ $$| $$ \__/| $$ +| $$$$$$$/| $$$$$$$$| $$ /$$$$| $$$$$ +| $$____/ | $$__ $$| $$|_ $$| $$__/ +| $$ | $$ | $$| $$ \ $$| $$ +| $$ | $$ | $$| $$$$$$/| $$$$$$$$ +|__/ |__/ |__/ \______/ |________/ +########################################################## +--]] +function STYLE:ApplyPaginationStyle(button, isVertical) + if(not button or (button and not button:GetName()) or (button and button.StyleHooked)) then return end + + local bName = button:GetName() + local testName = bName:lower() + local leftDown = ((bName and testName:find('left')) or testName:find('prev') or testName:find('decrement')) or false + + button:RemoveTextures() + button:SetNormalTexture("") + button:SetPushedTexture(0,0,0,0) + button:SetHighlightTexture(0,0,0,0) + button:SetDisabledTexture("") + + button:SetButtonTemplate() + button:Size((button:GetWidth() - 7), (button:GetHeight() - 7)) + + if not button.icon then + button.icon = button:CreateTexture(nil,'ARTWORK') + button.icon:Size(13) + button.icon:SetPoint('CENTER') + button.icon:SetTexture([[Interface\Buttons\SquareButtonTextures]]) + button.icon:SetTexCoord(0.02, 0.2, 0.02, 0.2) + + button:SetScript('OnMouseDown',function(self) + if self:IsEnabled() then + self.icon:SetPoint("CENTER",-1,-1) + end + end) + + button:SetScript('OnMouseUp',function(self) + self.icon:SetPoint("CENTER",0,0) + end) + + button:SetScript('OnDisable',function(self) + SetDesaturation(self.icon, true) + self.icon:SetAlpha(0.5) + end) + + button:SetScript('OnEnable',function(self) + SetDesaturation(self.icon, false) + self.icon:SetAlpha(1.0) + end) + + if not button:IsEnabled() then + button:GetScript('OnDisable')(button) + end + end + + if isVertical then + if leftDown then SquareButton_SetIcon(button,'UP') else SquareButton_SetIcon(button,'DOWN')end + else + if leftDown then SquareButton_SetIcon(button,'LEFT') else SquareButton_SetIcon(button,'RIGHT')end + end + + button.StyleHooked = true +end +--[[ +########################################################## + /$$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$ +| $$__ $$| $$__ $$ /$$__ $$| $$__ $$ +| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ +| $$ | $$| $$$$$$$/| $$ | $$| $$$$$$$/ +| $$ | $$| $$__ $$| $$ | $$| $$____/ +| $$ | $$| $$ \ $$| $$ | $$| $$ +| $$$$$$$/| $$ | $$| $$$$$$/| $$ +|_______/ |__/ |__/ \______/ |__/ + /$$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$ +| $$__ $$ /$$__ $$| $$ /$ | $$| $$$ | $$ +| $$ \ $$| $$ \ $$| $$ /$$$| $$| $$$$| $$ +| $$ | $$| $$ | $$| $$/$$ $$ $$| $$ $$ $$ +| $$ | $$| $$ | $$| $$$$_ $$$$| $$ $$$$ +| $$ | $$| $$ | $$| $$$/ \ $$$| $$\ $$$ +| $$$$$$$/| $$$$$$/| $$/ \ $$| $$ \ $$ +|_______/ \______/ |__/ \__/|__/ \__/ +########################################################## +--]] +local _hook_DropDownButton_SetPoint = function(self, _, _, _, _, _, breaker) + if not breaker then + self:Point("RIGHT", self.AnchorParent, "RIGHT", -10, 3, true) + end +end + +function STYLE:ApplyDropdownStyle(this, width) + if(not this or (this and this.StyleHooked)) then return end + + local ddName = this:GetName(); + local ddText = _G[("%sText"):format(ddName)] + local ddButton = _G[("%sButton"):format(ddName)] + + if not width then width = 155 end + + this:RemoveTextures() + this:Width(width) + + if(ddButton) then + if(ddText) then + ddText:SetPoint("RIGHT", ddButton, "LEFT", 2, 0) + end + + ddButton:ClearAllPoints() + ddButton:Point("RIGHT", this, "RIGHT", -10, 3) + ddButton.AnchorParent = this + + NewHook(ddButton, "SetPoint", _hook_DropDownButton_SetPoint) + + STYLE:ApplyPaginationStyle(ddButton, true) + + local currentLevel = this:GetFrameLevel() + if(currentLevel == 0) then + currentLevel = 1 + end + + local bg = CreateFrame("Frame", nil, this) + bg:Point("TOPLEFT", this, "TOPLEFT", 18, -2) + bg:Point("BOTTOMRIGHT", ddButton, "BOTTOMRIGHT", 2, -2) + bg:SetBasicPanel() + bg:SetBackdropBorderColor(0.2,0.2,0.2) + this.Panel = bg + end + + this.StyleHooked = true +end +--[[ +########################################################## + /$$$$$$$$/$$$$$$ /$$$$$$ /$$ /$$$$$$$$/$$$$$$ /$$$$$$$ +|__ $$__/$$__ $$ /$$__ $$| $$ |__ $$__/_ $$_/| $$__ $$ + | $$ | $$ \ $$| $$ \ $$| $$ | $$ | $$ | $$ \ $$ + | $$ | $$ | $$| $$ | $$| $$ | $$ | $$ | $$$$$$$/ + | $$ | $$ | $$| $$ | $$| $$ | $$ | $$ | $$____/ + | $$ | $$ | $$| $$ | $$| $$ | $$ | $$ | $$ + | $$ | $$$$$$/| $$$$$$/| $$$$$$$$| $$ /$$$$$$| $$ + |__/ \______/ \______/ |________/|__/ |______/|__/ +########################################################## +--]] +local Tooltip_OnShow = function(self) + self:SetBackdrop({ + bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]], + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + edgeSize=1 + }) + self:SetBackdropColor(0,0,0,0.8) + self:SetBackdropBorderColor(0,0,0) +end + +function STYLE:ApplyTooltipStyle(frame) + if(not frame or (frame and frame.StyleHooked)) then return end + frame:HookScript('OnShow', Tooltip_OnShow) + frame.StyleHooked = true +end +--[[ +########################################################## + /$$$$$$ /$$ /$$$$$$$$ /$$$$$$$ /$$$$$$$$ + /$$__ $$| $$ | $$_____/| $$__ $$|__ $$__/ +| $$ \ $$| $$ | $$ | $$ \ $$ | $$ +| $$$$$$$$| $$ | $$$$$ | $$$$$$$/ | $$ +| $$__ $$| $$ | $$__/ | $$__ $$ | $$ +| $$ | $$| $$ | $$ | $$ \ $$ | $$ +| $$ | $$| $$$$$$$$| $$$$$$$$| $$ | $$ | $$ +|__/ |__/|________/|________/|__/ |__/ |__/ +########################################################## +--]] +function STYLE:ApplyAlertStyle(frame) + if(not frame or (frame and frame.StyleHooked)) then return end + + local alertpanel = CreateFrame("Frame", nil, frame) + alertpanel:SetAllPoints(frame) + alertpanel:SetFrameLevel(frame:GetFrameLevel() - 1) + alertpanel:SetBackdrop({ + bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-BG]] + }) + alertpanel:SetBackdropColor(0.8, 0.2, 0.2) + + --[[ LEFT ]]-- + local left = alertpanel:CreateTexture(nil, "BORDER") + left:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-LEFT]]) + left:Point("TOPRIGHT", alertpanel,"TOPLEFT", 0, 0) + left:Point("BOTTOMRIGHT", alertpanel, "BOTTOMLEFT", 0, 0) + left:Width(frame:GetHeight()) + + --[[ RIGHT ]]-- + local right = alertpanel:CreateTexture(nil, "BORDER") + right:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-RIGHT]]) + right:SetVertexColor(0.8, 0.2, 0.2) + right:Point("TOPLEFT", alertpanel,"TOPRIGHT", -1, 0) + right:Point("BOTTOMLEFT", alertpanel, "BOTTOMRIGHT", -1, 0) + right:Width(frame:GetHeight() * 2) + + --[[ TOP ]]-- + local top = alertpanel:CreateTexture(nil, "BORDER") + top:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-TOP]]) + top:Point("BOTTOMLEFT", alertpanel,"TOPLEFT", 0, 0) + top:Point("BOTTOMRIGHT", alertpanel, "TOPRIGHT", 0, 0) + top:Height(frame:GetHeight() * 0.5) + + --[[ BOTTOM ]]-- + local bottom = alertpanel:CreateTexture(nil, "BORDER") + bottom:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Alert\ALERT-BOTTOM]]) + bottom:Point("TOPLEFT", alertpanel,"BOTTOMLEFT", 0, 0) + bottom:Point("TOPRIGHT", alertpanel, "BOTTOMRIGHT", 0, 0) + bottom:Width(frame:GetHeight() * 0.5) + + frame.StyleHooked = true +end +--[[ +########################################################## + /$$ /$$ /$$$$$$ /$$$$$$ /$$$$$$ +| $$$ /$$$|_ $$_/ /$$__ $$ /$$__ $$ +| $$$$ /$$$$ | $$ | $$ \__/| $$ \__/ +| $$ $$/$$ $$ | $$ | $$$$$$ | $$ +| $$ $$$| $$ | $$ \____ $$| $$ +| $$\ $ | $$ | $$ /$$ \ $$| $$ $$ +| $$ \/ | $$ /$$$$$$| $$$$$$/| $$$$$$/ +|__/ |__/|______/ \______/ \______/ +########################################################## +--]] +function STYLE:ApplyEditBoxStyle(this, width, height) + if not this then return end + this:RemoveTextures(true) + this:SetEditboxTemplate() + if width then this:Width(width) end + if height then this:Height(height) end +end + +function STYLE:ApplyTextureStyle(this) + if not this then return end + this:SetTexCoord(0.1, 0.9, 0.1, 0.9) + local parent = this:GetParent() + if(parent) then + this:FillInner(parent, 1, 1) + end +end + +function STYLE:ApplyRotateStyle(this) + -- Do stuff +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua index 79ea6a8..19ca479 100644 --- a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua +++ b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.lua @@ -64,24 +64,11 @@ BINDING_NAME_SVUITRACK_DOODAD = "Toggle Tracking Device"; local NewHook = hooksecurefunc; local playerGUID = UnitGUID('player') local classColor = RAID_CLASS_COLORS -local radian90 = (3.141592653589793 / 2) * -1; -local GetDistance, GetTarget, GetFromPlayer; --[[ ########################################################## BUILD ########################################################## ]]-- -function SVUI_TrackingDoodad_OnLoad() - local frame = _G["SVUI_TrackingDoodad"] - frame.Border:SetGradient(unpack(SV.Media.gradient.special)) - frame.Arrow:SetVertexColor(0.1, 0.8, 0.8) - frame.Range:SetFont(SV.Media.font.roboto, 14, "OUTLINE") - frame.Range:SetTextColor(1, 1, 1, 0.75) - SV.Animate:Orbit(frame.Radar, 8, true) - frame:RegisterForDrag("LeftButton"); - frame:Hide() -end - function SVUIToggleTrackingDoodad() if(not SVUI_TrackingDoodad.Trackable) then SVUI_TrackingDoodad.Trackable = true @@ -94,441 +81,6 @@ function SVUIToggleTrackingDoodad() SVUI_TrackingDoodad:Hide() SV:AddonMessage("Tracking Device |cffFF0000Disabled|r") end -end - -do - local WORLDMAPAREA_DEFAULT_DUNGEON_FLOOR_IS_TERRAIN = 0x00000004 - local WORLDMAPAREA_VIRTUAL_CONTINENT = 0x00000008 - local DUNGEONMAP_MICRO_DUNGEON = 0x00000001 - local _failsafe, _cache, _dungeons, _transform = {}, {}, {}, {}; - - local _mapdata = { - [0] = { - height = 22266.74312, - system = -1, - width = 33400.121, - xOffset = 0, - yOffset = 0, - [1] = { - xOffset = -10311.71318, - yOffset = -19819.33898, - scale = 0.56089997291565, - }, - [0] = { - xOffset = -48226.86993, - yOffset = -16433.90283, - scale = 0.56300002336502, - }, - [571] = { - xOffset = -29750.89905, - yOffset = -11454.50802, - scale = 0.5949000120163, - }, - [870] = { - xOffset = -27693.71178, - yOffset = -29720.0585, - scale = 0.65140002965927, - }, - }, - } - - local _failsafeFunc = function(tbl, key) - if(type(key) == "number") then - return _failsafe; - else - return rawget(_failsafe, key); - end - end - - setmetatable(_failsafe, { xOffset = 0, height = 1, yOffset = 0, width = 1, __index = _failsafeFunc }); - setmetatable(_mapdata, _failsafe); - - for _, ID in ipairs(GetWorldMapTransforms()) do - local terrain, newterrain, _, _, transformMinY, transformMaxY, transformMinX, transformMaxX, offsetY, offsetX = GetWorldMapTransformInfo(ID) - if ( offsetX ~= 0 or offsetY ~= 0 ) then - _transform[ID] = { - terrain = terrain, - newterrain = newterrain, - BRy = -transformMinY, - TLy = -transformMaxY, - BRx = -transformMinX, - TLx = -transformMaxX, - offsetY = offsetY, - offsetX = offsetX, - } - end - end - - local function _getmapdata(t) - local chunk = {} - local mapName = GetMapInfo(); - local id = GetCurrentMapAreaID(); - local numFloors = GetNumDungeonMapLevels(); - chunk.mapName = mapName; - chunk.cont = (GetCurrentMapContinent()) or -100; - chunk.zone = (GetCurrentMapZone()) or -100; - chunk.numFloors = numFloors; - local _, TLx, TLy, BRx, BRy = GetCurrentMapZone(); - if(TLx and TLy and BRx and BRy and (TLx~=0 or TLy~=0 or BRx~=0 or BRy~=0)) then - chunk[0] = {}; - chunk[0].TLx = TLx; - chunk[0].TLy = TLy; - chunk[0].BRx = BRx; - chunk[0].BRy = BRy; - end - if(not chunk[0] and numFloors == 0 and (GetCurrentMapDungeonLevel()) == 1) then - numFloors = 1; - chunk.hiddenFloor = true; - end - if(numFloors > 0) then - for f = 1, numFloors do - SetDungeonMapLevel(f); - local _, TLx, TLy, BRx, BRy = GetCurrentMapDungeonLevel(); - if(TLx and TLy and BRx and BRy) then - chunk[f] = {}; - chunk[f].TLx = TLx; - chunk[f].TLy = TLy; - chunk[f].BRx = BRx; - chunk[f].BRy = BRy; - end - end - end - - t[id] = chunk; - end - - do - local continents = { GetMapContinents() }; - for C in pairs(continents) do - local zones = { GetMapZones(C) }; - continents[C] = zones; - local pass, error = pcall(SetMapZoom, C, 0) - if(pass) then - zones[0] = GetCurrentMapAreaID(); - _getmapdata(_cache); - for Z in ipairs(zones) do - SetMapZoom(C, Z); - zones[Z] = GetCurrentMapAreaID(); - _getmapdata(_cache); - end - end - end - - for _, id in ipairs(GetAreaMaps()) do - if not (_cache[id]) then - if(SetMapByID(id)) then - _getmapdata(_cache); - end - end - end - end - - for id, map in pairs(_cache) do - local terrain, _, _, _, _, _, _, _, _, flags = GetAreaMapInfo(id) - local origin = terrain; - local chunk = _mapdata[id]; - if not (chunk) then chunk = {}; end - if(map.numFloors > 0 or map.hiddenFloor) then - for f, coords in pairs(map) do - if(type(f) == "number" and f > 0) then - if not (chunk[f]) then - chunk[f] = {}; - end - local flr = chunk[f] - local TLx, TLy, BRx, BRy = -coords.BRx, -coords.BRy, -coords.TLx, -coords.TLy - if not (flr.width) then - flr.width = BRx - TLx - end - if not (flr.height) then - flr.height = BRy - TLy - end - if not (flr.xOffset) then - flr.xOffset = TLx - end - if not (flr.yOffset) then - flr.yOffset = TLy - end - end - end - for f = 1, map.numFloors do - if not (chunk[f]) then - if(f == 1 and map[0] and map[0].TLx and map[0].TLy and map[0].BRx and map[0].BRy and - band(flags, WORLDMAPAREA_DEFAULT_DUNGEON_FLOOR_IS_TERRAIN) == WORLDMAPAREA_DEFAULT_DUNGEON_FLOOR_IS_TERRAIN) then - chunk[f] = {}; - local flr = chunk[f] - local coords = map[0] - local TLx, TLy, BRx, BRy = -coords.TLx, -coords.TLy, -coords.BRx, -coords.BRy - flr.width = BRx - TLx - flr.height = BRy - TLy - flr.xOffset = TLx - flr.yOffset = TLy - end - end - end - if(map.hiddenFloor) then - chunk.width = chunk[1].width - chunk.height = chunk[1].height - chunk.xOffset = chunk[1].xOffset - chunk.yOffset = chunk[1].yOffset - end - else - local coords = map[0] - if(coords ~= nil) then - local TLx, TLy, BRx, BRy = -coords.TLx, -coords.TLy, -coords.BRx, -coords.BRy - for _, trans in pairs(_transform) do - if(trans.terrain == terrain) then - if((trans.TLx < TLx and BRx < trans.BRx) and (trans.TLy < TLy and BRy < trans.BRy)) then - TLx = TLx - trans.offsetX; - BRx = BRx - trans.offsetX; - BRy = BRy - trans.offsetY; - TLy = TLy - trans.offsetY; - terrain = trans.newterrain; - break; - end - end - end - if not (TLx==0 and TLy==0 and BRx==0 and BRy==0) then - if not (TLx < BRx) then - printError("Bad x-axis Orientation (Zone): ", id, TLx, BRx); - end - if not (TLy < BRy) then - printError("Bad y-axis Orientation (Zone): ", id, TLy, BRy); - end - end - if not (chunk.width) then - chunk.width = BRx - TLx - end - if not (chunk.height) then - chunk.height = BRy - TLy - end - if not (chunk.xOffset) then - chunk.xOffset = TLx - end - if not (chunk.yOffset) then - chunk.yOffset = TLy - end - end - end - if not (next(chunk, nil)) then - chunk = { xOffset = 0, height = 1, yOffset = 0, width = 1 }; - end - if not (chunk.origin) then - chunk.origin = origin; - end - _mapdata[id] = chunk; - if(chunk and chunk ~= _failsafe) then - if not (chunk.system) then - chunk.system = terrain; - end - if(map.cont > 0 and map.zone > 0) then - _dungeons[terrain] = {} - end - setmetatable(chunk, _failsafe); - end - end - - local function _getpos(map, mapFloor, x, y) - if not map then return end - if (mapFloor ~= 0) then - map = rawget(map, mapFloor) or _dungeons[map.origin][mapFloor]; - end - x = x * map.width + map.xOffset; - y = y * map.height + map.yOffset; - return x, y; - end - - function GetDistance(map1, floor1, x1, y1, map2, floor2, x2, y2) - if not (map1 and map2) then return end - floor1 = floor1 or min(#_mapdata[map1], 1); - floor2 = floor2 or min(#_mapdata[map2], 1); - local dist, xDelta, yDelta, angle; - if(map1 == map2 and floor1 == floor2) then - local chunk = _mapdata[map1]; - local tmp = chunk - if(floor1 ~= 0) then - tmp = rawget(chunk, floor1) - end - local w,h = 1,1 - if(not tmp) then - if(_dungeons[chunk.origin] and _dungeons[chunk.origin][floor1]) then - chunk = _dungeons[chunk.origin][floor1] - w = chunk.width - h = chunk.height - else - w = 1 - h = 1 - end - else - w = chunk.width - h = chunk.height - end - xDelta = (x2 - x1) * (w or 1); - yDelta = (y2 - y1) * (h or 1); - else - local map1 = _mapdata[map1]; - local map2 = _mapdata[map2]; - if(map1.system == map2.system) then - x1, y1 = _getpos(map1, floor1, x1, y1); - x2, y2 = _getpos(map2, floor2, x2, y2); - xDelta = (x2 - x1); - yDelta = (y2 - y1); - else - local s1 = map1.system; - local s2 = map2.system; - if((map1==0 or _mapdata[0][s1]) and (map2 == 0 or _mapdata[0][s2])) then - x1, y1 = _getpos(map1, floor1, x1, y1); - x2, y2 = _getpos(map2, floor2, x2, y2); - if(map1 ~= 0) then - local cont1 = _mapdata[0][s1]; - x1 = (x1 - cont1.xOffset) * cont1.scale; - y1 = (y1 - cont1.yOffset) * cont1.scale; - end - if(map2 ~= 0) then - local cont2 = _mapdata[0][s2]; - x2 = (x2 - cont2.xOffset) * cont2.scale; - y2 = (y2 - cont2.yOffset) * cont2.scale; - end - xDelta = x2 - x1; - yDelta = y2 - y1; - end - end - end - - if(xDelta and yDelta) then - local playerAngle = GetPlayerFacing() - dist = sqrt(xDelta * xDelta + yDelta * yDelta); - angle = (radian90 - playerAngle) - atan2(yDelta, xDelta) - end - - return dist, angle; - end -end - -do - local function _findunit(unit, doNotCheckMap) - local x, y = GetPlayerMapPosition(unit); - if(x <= 0 and y <= 0) then - if(doNotCheckMap) then return; end - local lastMapID, lastFloor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(); - SetMapToCurrentZone(); - x, y = GetPlayerMapPosition(unit); - if(x <= 0 and y <= 0) then - if(ZoomOut()) then - elseif(GetCurrentMapZone() ~= WORLDMAP_WORLD_ID) then - SetMapZoom(GetCurrentMapContinent()); - else - SetMapZoom(WORLDMAP_WORLD_ID); - end - x, y = GetPlayerMapPosition(unit); - if(x <= 0 and y <= 0) then - return; - end - end - local thisMapID, thisFloor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(); - if(thisMapID ~= lastMapID or thisFloor ~= lastFloor) then - SetMapByID(lastMapID); - SetDungeonMapLevel(lastFloor); - end - return thisMapID, thisFloor, x, y; - end - return GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(), x, y; - end - - local function _findplayer() - local x, y = GetPlayerMapPosition("player"); - if(x <= 0 and y <= 0) then - if(WorldMap and WorldMap:IsShown()) then return end - SetMapToCurrentZone(); - x, y = GetPlayerMapPosition("player"); - if(x <= 0 and y <= 0) then - if(ZoomOut()) then - elseif(GetCurrentMapZone() ~= WORLDMAP_WORLD_ID) then - SetMapZoom(GetCurrentMapContinent()); - else - SetMapZoom(WORLDMAP_WORLD_ID); - end - x, y = GetPlayerMapPosition("player"); - if(x <= 0 and y <= 0) then - return; - end - end - end - return GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(), x, y; - end - - function GetTarget(unit, doNotCheckMap) - local plot1, plot2, plot3, plot4; - if unit == "player" or UnitIsUnit("player", unit) then - plot1, plot2, plot3, plot4 = _findplayer() - else - plot1, plot2, plot3, plot4 = _findunit(unit, doNotCheckMap or WorldMapFrame:IsVisible()) - end - if not (plot1 and plot4) then - return false - else - return true, plot1, plot2, plot3, plot4 - end - end - - function GetFromPlayer(unit, noMapLocation) - if(WorldMap and WorldMap:IsShown()) then return end - local plot3, plot4 = GetPlayerMapPosition("player"); - if(plot3 <= 0 and plot4 <= 0) then - SetMapToCurrentZone(); - plot3, plot4 = GetPlayerMapPosition("player"); - if(plot3 <= 0 and plot4 <= 0) then - if(ZoomOut()) then - elseif(GetCurrentMapZone() ~= WORLDMAP_WORLD_ID) then - SetMapZoom(GetCurrentMapContinent()); - else - SetMapZoom(WORLDMAP_WORLD_ID); - end - plot3, plot4 = GetPlayerMapPosition("player"); - if(plot3 <= 0 and plot4 <= 0) then - return; - end - end - end - - local plot1 = GetCurrentMapAreaID() - local plot2 = GetCurrentMapDungeonLevel() - - local plot5, plot6; - local plot7, plot8 = GetPlayerMapPosition(unit); - - if(noMapLocation and (plot7 <= 0 and plot8 <= 0)) then - local lastMapID, lastFloor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(); - SetMapToCurrentZone(); - plot7, plot8 = GetPlayerMapPosition(unit); - if(plot7 <= 0 and plot8 <= 0) then - if(ZoomOut()) then - elseif(GetCurrentMapZone() ~= WORLDMAP_WORLD_ID) then - SetMapZoom(GetCurrentMapContinent()); - else - SetMapZoom(WORLDMAP_WORLD_ID); - end - plot7, plot8 = GetPlayerMapPosition(unit); - if(plot7 <= 0 and plot8 <= 0) then - return; - end - end - plot5, plot6 = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(); - if(plot5 ~= lastMapID or plot6 ~= lastFloor) then - SetMapByID(lastMapID); - SetDungeonMapLevel(lastFloor); - end - local distance, angle = GetDistance(plot1, plot2, plot3, plot4, plot5, plot6, plot7, plot8) - return distance, angle - end - - local distance, angle = GetDistance(plot1, plot2, plot3, plot4, plot1, plot2, plot7, plot8) - return distance, angle - end -end - -function Triangulate(unit, noMapLocation) - local distance, angle = GetFromPlayer(unit, noMapLocation) - return distance, angle end --[[ ########################################################## @@ -581,7 +133,7 @@ end local Tracker_OnUpdate = function(self, elapsed) if self.elapsed and self.elapsed > (self.throttle or 0.02) then if(self.Trackable) then - local distance, angle = Triangulate("target", true) + local distance, angle = self.Track("target", true) if not angle then self.throttle = 4 self.Arrow:SetAlpha(0) @@ -617,60 +169,6 @@ local Tracker_OnUpdate = function(self, elapsed) end --[[ ########################################################## -GROUP UNIT TRACKERS -########################################################## -]]-- -local GPS_Triangulate = function(self, unit) - local available = (self.OnlyProximity == false and self.onMouseOver == false) - local distance, angle = Triangulate(unit, available) - return distance, angle -end - -local RefreshGPS = function(self, frame, template) - if(frame.GPS) then - local config = SV.db[Schema] - if(config.groups) then - frame.GPS.OnlyProximity = config.proximity - local actualSz = min(frame.GPS.DefaultSize, (frame:GetHeight() - 2)) - if(not frame:IsElementEnabled("GPS")) then - frame:EnableElement("GPS") - end - else - if(frame:IsElementEnabled("GPS")) then - frame:DisableElement("GPS") - end - end - end -end - -function PLUGIN:CreateGPS(frame) - if not frame then return end - local size = 32 - - local gps = CreateFrame("Frame", nil, frame.InfoPanel) - gps:SetFrameLevel(99) - gps:Size(size, size) - gps.DefaultSize = size - gps:Point("RIGHT", frame, "RIGHT", 0, 0) - - gps.Arrow = gps:CreateTexture(nil, "OVERLAY", nil, 7) - gps.Arrow:SetTexture([[Interface\AddOns\SVUI_TrackOMatic\artwork\GPS-ARROW]]) - gps.Arrow:Size(size, size) - gps.Arrow:SetPoint("CENTER", gps, "CENTER", 0, 0) - gps.Arrow:SetVertexColor(0.1, 0.8, 0.8) - gps.Arrow:SetBlendMode("ADD") - - gps.onMouseOver = true - gps.OnlyProximity = false - - gps.Spin = Rotate_Arrow - - frame.GPS = gps - - --frame.GPS:Hide() -end ---[[ -########################################################## CORE ########################################################## ]]-- @@ -695,18 +193,26 @@ function PLUGIN:Load() if(_TRACKER) then + _TRACKER.Border:SetGradient(unpack(SV.Media.gradient.special)) + _TRACKER.Arrow:SetVertexColor(0.1, 0.8, 0.8) + _TRACKER.Range:SetFont(SV.Media.font.roboto, 14, "OUTLINE") + _TRACKER.Range:SetTextColor(1, 1, 1, 0.75) _TRACKER.Spin = Rotate_Arrow - _TRACKER:SetParent(SVUI_Target) + _TRACKER.Track = Triangulate + + _TRACKER:RegisterForDrag("LeftButton"); _TRACKER:SetScript("OnUpdate", Tracker_OnUpdate) - self:RegisterEvent("PLAYER_TARGET_CHANGED") - end + SV.Animate:Orbit(_TRACKER.Radar, 8, true) - if(_TARGET) then - local frame = _G["SVUI_TrackingDoodad"] - frame:SetPoint("LEFT", _TARGET, "RIGHT", 2, 0) - _TARGET:HookScript("OnShow", TargetFrame_OnChange) - end + _TRACKER:Hide() + + if(_TARGET) then + _TRACKER:SetParent(_TARGET) + _TRACKER:SetPoint("LEFT", _TARGET, "RIGHT", 2, 0) + _TARGET:HookScript("OnShow", TargetFrame_OnChange) + end - NewHook(SV.SVUnit, "RefreshUnitLayout", RefreshGPS) + self:RegisterEvent("PLAYER_TARGET_CHANGED") + end end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.xml b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.xml index da2b28d..ffe98db 100644 --- a/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.xml +++ b/Interface/AddOns/SVUI_TrackOMatic/SVUI_TrackOMatic.xml @@ -1,8 +1,4 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file='Loader.lua'/> - <Script file='SVUI_TrackOMatic.lua'/> - <Script file='libs\oUF_GPS\oUF_GPS.lua'/> - <Frame name="SVUI_TrackingDoodad" movable="true" frameStrata="DIALOG"> <Size x="70" y="70"/> <Anchors> @@ -33,7 +29,6 @@ </Layer> </Layers> <Scripts> - <OnLoad function="SVUI_TrackingDoodad_OnLoad"/> <OnDragStart> _G["SVUI_TrackingDoodad"].moving = true; _G["SVUI_TrackingDoodad"]:StartMoving(); @@ -44,4 +39,8 @@ </OnDragStop> </Scripts> </Frame> + + <Script file='Loader.lua'/> + <Script file='SVUI_TrackOMatic.lua'/> + <Include file='components\_load.xml'/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_TrackOMatic/components/_load.xml b/Interface/AddOns/SVUI_TrackOMatic/components/_load.xml new file mode 100644 index 0000000..de680a2 --- /dev/null +++ b/Interface/AddOns/SVUI_TrackOMatic/components/_load.xml @@ -0,0 +1,4 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file="triangulate.lua"/> + <Script file="unitframe_gps.lua"/> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua b/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua new file mode 100644 index 0000000..576b5f7 --- /dev/null +++ b/Interface/AddOns/SVUI_TrackOMatic/components/triangulate.lua @@ -0,0 +1,448 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local type = _G.type; +local tostring = _G.tostring; +local tonumber = _G.tonumber; +local tinsert = _G.tinsert; +local tremove = _G.tremove; +local string = _G.string; +local math = _G.math; +local bit = _G.bit; +local table = _G.table; +--[[ STRING METHODS ]]-- +local format, find, lower, match = string.format, string.find, string.lower, string.match; +--[[ MATH METHODS ]]-- +local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round; -- Basic +local fmod, modf, sqrt = math.fmod, math.modf, math.sqrt; -- Algebra +local atan2, cos, deg, rad, sin = math.atan2, math.cos, math.deg, math.rad, math.sin; -- Trigonometry +local min, huge, random = math.min, math.huge, math.random; -- Uncommon +local sqrt2, max = math.sqrt(2), math.max; +--[[ TABLE METHODS ]]-- +local tcopy, twipe, tsort, tconcat, tdump = table.copy, table.wipe, table.sort, table.concat, table.dump; +--[[ BINARY METHODS ]]-- +local band = bit.band; +--[[ +########################################################## +LOCALS +########################################################## +]]-- +local radian90 = (3.141592653589793 / 2) * -1; +local WORLDMAPAREA_DEFAULT_DUNGEON_FLOOR_IS_TERRAIN = 0x00000004 +local WORLDMAPAREA_VIRTUAL_CONTINENT = 0x00000008 +local DUNGEONMAP_MICRO_DUNGEON = 0x00000001 +--[[ +########################################################## +LOCALIZED BLIZZARD FUNCTIONS +########################################################## +]]-- +local GetMapInfo = GetMapInfo +local GetMapZones = GetMapZones +local GetPlayerFacing = GetPlayerFacing +local GetCurrentMapZone = GetCurrentMapZone +local GetCurrentMapAreaID = GetCurrentMapAreaID +local GetPlayerMapPosition = GetPlayerMapPosition +local GetNumDungeonMapLevels = GetNumDungeonMapLevels +local GetCurrentMapContinent = GetCurrentMapContinent +local GetWorldMapTransformInfo = GetWorldMapTransformInfo +--[[ +########################################################## +MAPPING DATA STORAGE +########################################################## +]]-- +local DUNGEON_DATA = {}; +local GEOGRAPHICAL_DATA = { + [0] = { + height = 22266.74312, + system = -1, + width = 33400.121, + xOffset = 0, + yOffset = 0, + [1] = { + xOffset = -10311.71318, + yOffset = -19819.33898, + scale = 0.56089997291565, + }, + [0] = { + xOffset = -48226.86993, + yOffset = -16433.90283, + scale = 0.56300002336502, + }, + [571] = { + xOffset = -29750.89905, + yOffset = -11454.50802, + scale = 0.5949000120163, + }, + [870] = { + xOffset = -27693.71178, + yOffset = -29720.0585, + scale = 0.65140002965927, + }, + }, +} + + +do + local backup_cache, temp_cache, swap_cache = {}, {}, {}; + + local meta_backup = { + xOffset = 0, + height = 1, + yOffset = 0, + width = 1, + __index = function(t, k) + if(type(k) == "number") then + return backup_cache; + else + return rawget(backup_cache, k); + end + end + }; + + setmetatable(backup_cache, meta_backup); + setmetatable(GEOGRAPHICAL_DATA, backup_cache); + + local transforms = GetWorldMapTransforms() + + for _,id in ipairs(transforms) do + local terrain, newterrain, _, _, transformMinY, transformMaxY, transformMinX, transformMaxX, offsetY, offsetX = GetWorldMapTransformInfo(id) + if ( offsetX ~= 0 or offsetY ~= 0 ) then + swap_cache[id] = { + terrain = terrain, + newterrain = newterrain, + BRy = -transformMinY, + TLy = -transformMaxY, + BRx = -transformMinX, + TLx = -transformMaxX, + offsetY = offsetY, + offsetX = offsetX, + } + end + end + + local function SetTempData() + local map = {} + local mapName = GetMapInfo(); + local id = GetCurrentMapAreaID(); + local numFloors = GetNumDungeonMapLevels(); + map.mapName = mapName; + map.cont = (GetCurrentMapContinent()) or -100; + map.zone = (GetCurrentMapZone()) or -100; + map.numFloors = numFloors; + local _, TLx, TLy, BRx, BRy = GetCurrentMapZone(); + if(TLx and TLy and BRx and BRy and (TLx~=0 or TLy~=0 or BRx~=0 or BRy~=0)) then + map[0] = {}; + map[0].TLx = TLx; + map[0].TLy = TLy; + map[0].BRx = BRx; + map[0].BRy = BRy; + end + if(not map[0] and numFloors == 0 and (GetCurrentMapDungeonLevel()) == 1) then + numFloors = 1; + map.hiddenFloor = true; + end + if(numFloors > 0) then + for i = 1, numFloors do + SetDungeonMapLevel(i); + local _, TLx, TLy, BRx, BRy = GetCurrentMapDungeonLevel(); + if(TLx and TLy and BRx and BRy) then + map[i] = {}; + map[i].TLx = TLx; + map[i].TLy = TLy; + map[i].BRx = BRx; + map[i].BRy = BRy; + end + end + end + + temp_cache[id] = map; + end + + local continent_map_data = { GetMapContinents() }; + + for continent in pairs(continent_map_data) do + local zone_map_data = { GetMapZones(continent) }; + continent_map_data[continent] = zone_map_data; + local pass, error = pcall(SetMapZoom, continent, 0) + if(pass) then + zone_map_data[0] = GetCurrentMapAreaID(); + SetTempData(); + for zone in ipairs(zone_map_data) do + SetMapZoom(continent, zone); + zone_map_data[zone] = GetCurrentMapAreaID(); + SetTempData(); + end + end + end + + local area_maps = GetAreaMaps() + + for _,id in ipairs(area_maps) do + if((not temp_cache[id]) and SetMapByID(id)) then + SetTempData(); + end + end + + for id, map in pairs(temp_cache) do + local terrain, _, _, _, _, _, _, _, _, flags = GetAreaMapInfo(id) + local origin = terrain; + local data = GEOGRAPHICAL_DATA[id]; + if not (data) then data = {}; end + if(map.numFloors > 0 or map.hiddenFloor) then + for f, coords in pairs(map) do + if(type(f) == "number" and f > 0) then + if not (data[f]) then + data[f] = {}; + end + local flr = data[f] + local TLx, TLy, BRx, BRy = -coords.BRx, -coords.BRy, -coords.TLx, -coords.TLy + if not (flr.width) then + flr.width = BRx - TLx + end + if not (flr.height) then + flr.height = BRy - TLy + end + if not (flr.xOffset) then + flr.xOffset = TLx + end + if not (flr.yOffset) then + flr.yOffset = TLy + end + end + end + for f = 1, map.numFloors do + if not (data[f]) then + if(f == 1 and map[0] and map[0].TLx and map[0].TLy and map[0].BRx and map[0].BRy and + band(flags, WORLDMAPAREA_DEFAULT_DUNGEON_FLOOR_IS_TERRAIN) == WORLDMAPAREA_DEFAULT_DUNGEON_FLOOR_IS_TERRAIN) then + data[f] = {}; + local flr = data[f] + local coords = map[0] + local TLx, TLy, BRx, BRy = -coords.TLx, -coords.TLy, -coords.BRx, -coords.BRy + flr.width = BRx - TLx + flr.height = BRy - TLy + flr.xOffset = TLx + flr.yOffset = TLy + end + end + end + if(map.hiddenFloor) then + data.width = data[1].width + data.height = data[1].height + data.xOffset = data[1].xOffset + data.yOffset = data[1].yOffset + end + else + local coords = map[0] + if(coords ~= nil) then + local TLx, TLy, BRx, BRy = -coords.TLx, -coords.TLy, -coords.BRx, -coords.BRy + for _, trans in pairs(swap_cache) do + if(trans.terrain == terrain) then + if((trans.TLx < TLx and BRx < trans.BRx) and (trans.TLy < TLy and BRy < trans.BRy)) then + TLx = TLx - trans.offsetX; + BRx = BRx - trans.offsetX; + BRy = BRy - trans.offsetY; + TLy = TLy - trans.offsetY; + terrain = trans.newterrain; + break; + end + end + end + if not (TLx==0 and TLy==0 and BRx==0 and BRy==0) then + if not (TLx < BRx) then + printError("Bad x-axis Orientation (Zone): ", id, TLx, BRx); + end + if not (TLy < BRy) then + printError("Bad y-axis Orientation (Zone): ", id, TLy, BRy); + end + end + if not (data.width) then + data.width = BRx - TLx + end + if not (data.height) then + data.height = BRy - TLy + end + if not (data.xOffset) then + data.xOffset = TLx + end + if not (data.yOffset) then + data.yOffset = TLy + end + end + end + + if(not next(data, nil)) then + data = { xOffset = 0, height = 1, yOffset = 0, width = 1 }; + end + + if(not data.origin) then + data.origin = origin; + end + + GEOGRAPHICAL_DATA[id] = data; + + if(data and data ~= backup_cache) then + if(not data.system) then + data.system = terrain; + end + if(map.cont > 0 and map.zone > 0) then + DUNGEON_DATA[terrain] = {} + end + setmetatable(data, backup_cache); + end + end +end + +local function GetCoordinates(map, mapFloor, x, y) + if not map then return end + if (mapFloor ~= 0) then + map = rawget(map, mapFloor) or DUNGEON_DATA[map.origin][mapFloor]; + end + x = x * map.width + map.xOffset; + y = y * map.height + map.yOffset; + return x, y; +end + +local function GetDistance(map1, floor1, x1, y1, map2, floor2, x2, y2) + if not (map1 and map2) then return end + floor1 = floor1 or min(#GEOGRAPHICAL_DATA[map1], 1); + floor2 = floor2 or min(#GEOGRAPHICAL_DATA[map2], 1); + local dist, xDelta, yDelta, angle; + if(map1 == map2 and floor1 == floor2) then + local chunk = GEOGRAPHICAL_DATA[map1]; + local tmp = chunk + if(floor1 ~= 0) then + tmp = rawget(chunk, floor1) + end + local w,h = 1,1 + if(not tmp) then + if(DUNGEON_DATA[chunk.origin] and DUNGEON_DATA[chunk.origin][floor1]) then + chunk = DUNGEON_DATA[chunk.origin][floor1] + w = chunk.width + h = chunk.height + else + w = 1 + h = 1 + end + else + w = chunk.width + h = chunk.height + end + xDelta = (x2 - x1) * (w or 1); + yDelta = (y2 - y1) * (h or 1); + else + local map1 = GEOGRAPHICAL_DATA[map1]; + local map2 = GEOGRAPHICAL_DATA[map2]; + if(map1.system == map2.system) then + x1, y1 = GetCoordinates(map1, floor1, x1, y1); + x2, y2 = GetCoordinates(map2, floor2, x2, y2); + xDelta = (x2 - x1); + yDelta = (y2 - y1); + else + local s1 = map1.system; + local s2 = map2.system; + if((map1==0 or GEOGRAPHICAL_DATA[0][s1]) and (map2 == 0 or GEOGRAPHICAL_DATA[0][s2])) then + x1, y1 = GetCoordinates(map1, floor1, x1, y1); + x2, y2 = GetCoordinates(map2, floor2, x2, y2); + if(map1 ~= 0) then + local cont1 = GEOGRAPHICAL_DATA[0][s1]; + x1 = (x1 - cont1.xOffset) * cont1.scale; + y1 = (y1 - cont1.yOffset) * cont1.scale; + end + if(map2 ~= 0) then + local cont2 = GEOGRAPHICAL_DATA[0][s2]; + x2 = (x2 - cont2.xOffset) * cont2.scale; + y2 = (y2 - cont2.yOffset) * cont2.scale; + end + xDelta = x2 - x1; + yDelta = y2 - y1; + end + end + end + + if(xDelta and yDelta) then + local playerAngle = GetPlayerFacing() + dist = sqrt(xDelta * xDelta + yDelta * yDelta); + angle = (radian90 - playerAngle) - atan2(yDelta, xDelta) + end + + return dist, angle; +end + +function Triangulate(unit, noMapLocation) + if(WorldMap and WorldMap:IsShown()) then return end + + local plot1, plot2, plot3, plot4, plot5, plot6, plot7, plot8; + + plot3, plot4 = GetPlayerMapPosition("player"); + + if(plot3 <= 0 and plot4 <= 0) then + SetMapToCurrentZone(); + plot3, plot4 = GetPlayerMapPosition("player"); + if(plot3 <= 0 and plot4 <= 0) then + if(ZoomOut()) then + elseif(GetCurrentMapZone() ~= WORLDMAP_WORLD_ID) then + SetMapZoom(GetCurrentMapContinent()); + else + SetMapZoom(WORLDMAP_WORLD_ID); + end + plot3, plot4 = GetPlayerMapPosition("player"); + if(plot3 <= 0 and plot4 <= 0) then + return; + end + end + end + + plot1 = GetCurrentMapAreaID() + plot2 = GetCurrentMapDungeonLevel() + plot7, plot8 = GetPlayerMapPosition(unit); + + if(noMapLocation and (plot7 <= 0 and plot8 <= 0)) then + local lastMapID, lastFloor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(); + SetMapToCurrentZone(); + plot7, plot8 = GetPlayerMapPosition(unit); + + if(plot7 <= 0 and plot8 <= 0) then + if(ZoomOut()) then + elseif(GetCurrentMapZone() ~= WORLDMAP_WORLD_ID) then + SetMapZoom(GetCurrentMapContinent()); + else + SetMapZoom(WORLDMAP_WORLD_ID); + end + plot7, plot8 = GetPlayerMapPosition(unit); + if(plot7 <= 0 and plot8 <= 0) then + return; + end + end + + plot5, plot6 = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(); + + if(plot5 ~= lastMapID or plot6 ~= lastFloor) then + SetMapByID(lastMapID); + SetDungeonMapLevel(lastFloor); + end + + return GetDistance(plot1, plot2, plot3, plot4, plot5, plot6, plot7, plot8) + end + + return GetDistance(plot1, plot2, plot3, plot4, plot1, plot2, plot7, plot8) +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_TrackOMatic/components/unitframe_gps.lua b/Interface/AddOns/SVUI_TrackOMatic/components/unitframe_gps.lua new file mode 100644 index 0000000..b058285 --- /dev/null +++ b/Interface/AddOns/SVUI_TrackOMatic/components/unitframe_gps.lua @@ -0,0 +1,329 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local type = _G.type; +local tostring = _G.tostring; +local tonumber = _G.tonumber; +local tinsert = _G.tinsert; +local tremove = _G.tremove; +local string = _G.string; +local math = _G.math; +local bit = _G.bit; +local table = _G.table; +--[[ STRING METHODS ]]-- +local format, find, lower, match = string.format, string.find, string.lower, string.match; +--[[ MATH METHODS ]]-- +local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round; -- Basic +local fmod, modf, sqrt = math.fmod, math.modf, math.sqrt; -- Algebra +local atan2, cos, deg, rad, sin = math.atan2, math.cos, math.deg, math.rad, math.sin; -- Trigonometry +local min, huge, random = math.min, math.huge, math.random; -- Uncommon +local sqrt2, max = math.sqrt(2), math.max; +--[[ TABLE METHODS ]]-- +local tcopy, twipe, tsort, tconcat, tdump = table.copy, table.wipe, table.sort, table.concat, table.dump; +--[[ BINARY METHODS ]]-- +local band = bit.band; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local oUF = oUF_Villain or oUF +assert(oUF, 'oUF not loaded') + +local PLUGIN = select(2, ...); + +local GPS_UpdateHandler = CreateFrame("Frame"); + +local playerGUID = UnitGUID("player") +local _FRAMES, _PROXIMITY = {}, {} +local minThrottle = 0.02 +local numArrows, inRange, GPS +local Triangulate = Triangulate +--[[ +########################################################## +oUF TAGS +########################################################## +]]-- +local taggedUnits = {} +local groupTagManager = CreateFrame("Frame") +groupTagManager:RegisterEvent("GROUP_ROSTER_UPDATE") +groupTagManager:SetScript("OnEvent", function() + local group, count; + twipe(taggedUnits) + if IsInRaid() then + group = "raid" + count = GetNumGroupMembers() + elseif IsInGroup() then + group = "party" + count = GetNumGroupMembers() - 1; + taggedUnits["player"] = true + else + group = "solo" + count = 1 + end + for i = 1, count do + local realName = group..i; + if not UnitIsUnit(realName, "player") then + taggedUnits[realName] = true + end + end +end); + +oUF.Tags.OnUpdateThrottle['nearbyplayers:8'] = 0.25 +oUF.Tags.Methods["nearbyplayers:8"] = function(unit) + local unitsInRange, distance = 0; + if UnitIsConnected(unit)then + for taggedUnit, _ in pairs(taggedUnits)do + if not UnitIsUnit(unit, taggedUnit) and UnitIsConnected(taggedUnit)then + distance = Triangulate(unit, taggedUnit, true) + if distance and distance <= 8 then + unitsInRange = unitsInRange + 1 + end + end + end + end + return unitsInRange +end + +oUF.Tags.OnUpdateThrottle['nearbyplayers:10'] = 0.25 +oUF.Tags.Methods["nearbyplayers:10"] = function(unit) + local unitsInRange, distance = 0; + if UnitIsConnected(unit)then + for taggedUnit, _ in pairs(taggedUnits)do + if not UnitIsUnit(unit, taggedUnit) and UnitIsConnected(taggedUnit)then + distance = Triangulate(unit, taggedUnit, true) + if distance and distance <= 10 then + unitsInRange = unitsInRange + 1 + end + end + end + end + return unitsInRange +end + +oUF.Tags.OnUpdateThrottle['nearbyplayers:30'] = 0.25 +oUF.Tags.Methods["nearbyplayers:30"] = function(unit) + local unitsInRange, distance = 0; + if UnitIsConnected(unit)then + for taggedUnit, _ in pairs(taggedUnits)do + if not UnitIsUnit(unit, taggedUnit) and UnitIsConnected(taggedUnit)then + distance = Triangulate(unit, taggedUnit, true) + if distance and distance <= 30 then + unitsInRange = unitsInRange + 1 + end + end + end + end + return unitsInRange +end + +oUF.Tags.OnUpdateThrottle['distance'] = 0.25 +oUF.Tags.Methods["distance"] = function(unit) + if not UnitIsConnected(unit) or UnitIsUnit(unit, "player")then return "" end + local dst = Triangulate("player", unit, true) + if dst and dst > 0 then + return format("%d", dst) + end + return "" +end +--[[ +########################################################## +GPS CONSTRUCTOR +########################################################## +]]-- +local GPS_Rotate_Arrow = function(self, angle) + local radius, ULx, ULy, LLx, LLy, URx, URy, LRx, LRy + + radius = angle - 0.785398163 + URx = 0.5 + cos(radius) / sqrt2 + URy = 0.5 + sin(radius) / sqrt2 + -- (-1) + radius = angle + 0.785398163 + LRx = 0.5 + cos(radius) / sqrt2 + LRy = 0.5 + sin(radius) / sqrt2 + -- 1 + radius = angle + 2.35619449 + LLx = 0.5 + cos(radius) / sqrt2 + LLy = 0.5 + sin(radius) / sqrt2 + -- 3 + radius = angle + 3.92699082 + ULx = 0.5 + cos(radius) / sqrt2 + ULy = 0.5 + sin(radius) / sqrt2 + -- 5 + + self.Arrow:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy); +end + +local RefreshGPS = function(self, frame, template) + if(frame.GPS) then + local config = SV.db[Schema] + if(config.groups) then + frame.GPS.OnlyProximity = config.proximity + local actualSz = min(frame.GPS.DefaultSize, (frame:GetHeight() - 2)) + if(not frame:IsElementEnabled("GPS")) then + frame:EnableElement("GPS") + end + else + if(frame:IsElementEnabled("GPS")) then + frame:DisableElement("GPS") + end + end + end +end + +local function CreateGPS(frame) + if not frame then return end + local size = 32 + + local gps = CreateFrame("Frame", nil, frame.InfoPanel) + gps:SetFrameLevel(99) + gps:Size(size, size) + gps.DefaultSize = size + gps:Point("RIGHT", frame, "RIGHT", 0, 0) + + gps.Arrow = gps:CreateTexture(nil, "OVERLAY", nil, 7) + gps.Arrow:SetTexture([[Interface\AddOns\SVUI_TrackOMatic\artwork\GPS-ARROW]]) + gps.Arrow:Size(size, size) + gps.Arrow:SetPoint("CENTER", gps, "CENTER", 0, 0) + gps.Arrow:SetVertexColor(0.1, 0.8, 0.8) + gps.Arrow:SetBlendMode("ADD") + + gps.onMouseOver = true + gps.OnlyProximity = false + + gps.Spin = GPS_Rotate_Arrow + + frame.GPS = gps +end +--[[ +########################################################## +GPS ELEMENT +########################################################## +]]-- +local sortFunc = function(a,b) return a[1] < b[1] end + +local Update = function(self, elapsed) + if self.elapsed and self.elapsed > (self.throttle or minThrottle) then + numArrows = 0 + twipe(_PROXIMITY) + for _, object in next, _FRAMES do + if(object:IsShown()) then + GPS = object.GPS + local unit = object.unit + if(unit) then + if(GPS.PreUpdate) then GPS:PreUpdate(frame) end + + local outOfRange = GPS.outOfRange and UnitInRange(unit) or false + + if(not unit or not (UnitInParty(unit) or UnitInRaid(unit)) or UnitIsUnit(unit, "player") or not UnitIsConnected(unit) or (not GPS.OnlyProximity and ((GPS.onMouseOver and (GetMouseFocus() ~= object)) or outOfRange))) then + GPS:Hide() + else + local distance, angle = self.Track(unit) + if not angle then + GPS:Hide() + else + if(GPS.OnlyProximity == false) then + GPS:Show() + else + GPS:Hide() + end + + if GPS.Arrow then + if(distance > 40) then + GPS.Arrow:SetVertexColor(1,0.1,0.1) + else + if(distance > 30) then + GPS.Arrow:SetVertexColor(0.4,0.8,0.1) + else + GPS.Arrow:SetVertexColor(0.1,1,0.1) + end + if(GPS.OnlyProximity and object.Health.percent and object.Health.percent < 80) then + local value = object.Health.percent + distance + _PROXIMITY[#_PROXIMITY + 1] = {value, GPS} + end + end + GPS:Spin(angle) + end + + if GPS.Text then + GPS.Text:SetText(floor(distance)) + end + + if(GPS.PostUpdate) then GPS:PostUpdate(frame, distance, angle) end + numArrows = numArrows + 1 + end + end + else + GPS:Hide() + end + end + end + + if(_PROXIMITY[1]) then + tsort(_PROXIMITY, sortFunc) + if(_PROXIMITY[1][2]) then + _PROXIMITY[1][2]:Show() + end + end + + self.elapsed = 0 + self.throttle = max(minThrottle, 0.005 * numArrows) + else + self.elapsed = (self.elapsed or 0) + elapsed + end +end + +local Enable = function(self) + local unit = self.unit + if(unit:find("raid") or unit:find("party")) then + if not self.GPS then CreateGPS(self) end + tinsert(_FRAMES, self) + + GPS_UpdateHandler:Show() + return true + end +end + +local Disable = function(self) + local GPS = self.GPS + if GPS then + for k, frame in next, _FRAMES do + if(frame == self) then + tremove(_FRAMES, k) + GPS:Hide() + break + end + end + + if #_FRAMES == 0 and GPS_UpdateHandler then + GPS_UpdateHandler:Hide() + end + end +end + +function PLUGIN:EnableGPS() + GPS_UpdateHandler.Track = Triangulate + GPS_UpdateHandler:SetScript("OnUpdate", Update) + oUF:AddElement('GPS', nil, Enable, Disable) + NewHook(SV.SVUnit, "RefreshUnitLayout", RefreshGPS) +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.lua b/Interface/AddOns/SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.lua deleted file mode 100644 index 2cf3bc3..0000000 --- a/Interface/AddOns/SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.lua +++ /dev/null @@ -1,211 +0,0 @@ -local oUF = oUF_Villain or oUF -assert(oUF, 'oUF not loaded') - -local PLUGIN = select(2, ...); - -local max, floor = math.max, math.floor; -local tinsert, tremove, tsort, twipe = table.insert, table.remove, table.sort, table.wipe; - -local playerGUID = UnitGUID("player") -local _FRAMES, _PROXIMITY, OnUpdateFrame = {}, {} -local minThrottle = 0.02 -local numArrows, inRange, GPS ---[[ -########################################################## -oUF TAGS -########################################################## -]]-- -local taggedUnits = {} -local groupTagManager = CreateFrame("Frame") -groupTagManager:RegisterEvent("GROUP_ROSTER_UPDATE") -groupTagManager:SetScript("OnEvent", function() - local group, count; - twipe(taggedUnits) - if IsInRaid() then - group = "raid" - count = GetNumGroupMembers() - elseif IsInGroup() then - group = "party" - count = GetNumGroupMembers() - 1; - taggedUnits["player"] = true - else - group = "solo" - count = 1 - end - for i = 1, count do - local realName = group..i; - if not UnitIsUnit(realName, "player") then - taggedUnits[realName] = true - end - end -end); - -oUF.Tags.OnUpdateThrottle['nearbyplayers:8'] = 0.25 -oUF.Tags.Methods["nearbyplayers:8"] = function(unit) - local unitsInRange, distance = 0; - if UnitIsConnected(unit)then - for taggedUnit, _ in pairs(taggedUnits)do - if not UnitIsUnit(unit, taggedUnit) and UnitIsConnected(taggedUnit)then - distance = Triangulate(unit, taggedUnit, true) - if distance and distance <= 8 then - unitsInRange = unitsInRange + 1 - end - end - end - end - return unitsInRange -end - -oUF.Tags.OnUpdateThrottle['nearbyplayers:10'] = 0.25 -oUF.Tags.Methods["nearbyplayers:10"] = function(unit) - local unitsInRange, distance = 0; - if UnitIsConnected(unit)then - for taggedUnit, _ in pairs(taggedUnits)do - if not UnitIsUnit(unit, taggedUnit) and UnitIsConnected(taggedUnit)then - distance = Triangulate(unit, taggedUnit, true) - if distance and distance <= 10 then - unitsInRange = unitsInRange + 1 - end - end - end - end - return unitsInRange -end - -oUF.Tags.OnUpdateThrottle['nearbyplayers:30'] = 0.25 -oUF.Tags.Methods["nearbyplayers:30"] = function(unit) - local unitsInRange, distance = 0; - if UnitIsConnected(unit)then - for taggedUnit, _ in pairs(taggedUnits)do - if not UnitIsUnit(unit, taggedUnit) and UnitIsConnected(taggedUnit)then - distance = Triangulate(unit, taggedUnit, true) - if distance and distance <= 30 then - unitsInRange = unitsInRange + 1 - end - end - end - end - return unitsInRange -end - -oUF.Tags.OnUpdateThrottle['distance'] = 0.25 -oUF.Tags.Methods["distance"] = function(unit) - if not UnitIsConnected(unit) or UnitIsUnit(unit, "player")then return "" end - local dst = Triangulate("player", unit, true) - if dst and dst > 0 then - return format("%d", dst) - end - return "" -end ---[[ -########################################################## -GPS ELEMENT -########################################################## -]]-- -local sortFunc = function(a,b) return a[1] < b[1] end - -local Update = function(self, elapsed) - if self.elapsed and self.elapsed > (self.throttle or minThrottle) then - numArrows = 0 - twipe(_PROXIMITY) - for _, object in next, _FRAMES do - if(object:IsShown()) then - GPS = object.GPS - local unit = object.unit - if(unit) then - if(GPS.PreUpdate) then GPS:PreUpdate(frame) end - - local outOfRange = GPS.outOfRange and UnitInRange(unit) or false - - if(not unit or not (UnitInParty(unit) or UnitInRaid(unit)) or UnitIsUnit(unit, "player") or not UnitIsConnected(unit) or (not GPS.OnlyProximity and ((GPS.onMouseOver and (GetMouseFocus() ~= object)) or outOfRange))) then - GPS:Hide() - else - local distance, angle = Triangulate(unit) - if not angle then - GPS:Hide() - else - if(GPS.OnlyProximity == false) then - GPS:Show() - else - GPS:Hide() - end - - if GPS.Arrow then - if(distance > 40) then - GPS.Arrow:SetVertexColor(1,0.1,0.1) - else - if(distance > 30) then - GPS.Arrow:SetVertexColor(0.4,0.8,0.1) - else - GPS.Arrow:SetVertexColor(0.1,1,0.1) - end - if(GPS.OnlyProximity and object.Health.percent and object.Health.percent < 80) then - local value = object.Health.percent + distance - _PROXIMITY[#_PROXIMITY + 1] = {value, GPS} - end - end - GPS:Spin(angle) - end - - if GPS.Text then - GPS.Text:SetText(floor(distance)) - end - - if(GPS.PostUpdate) then GPS:PostUpdate(frame, distance, angle) end - numArrows = numArrows + 1 - end - end - else - GPS:Hide() - end - end - end - - if(_PROXIMITY[1]) then - tsort(_PROXIMITY, sortFunc) - if(_PROXIMITY[1][2]) then - _PROXIMITY[1][2]:Show() - end - end - - self.elapsed = 0 - self.throttle = max(minThrottle, 0.005 * numArrows) - else - self.elapsed = (self.elapsed or 0) + elapsed - end -end - -local Enable = function(self) - local unit = self.unit - if(unit:find("raid") or unit:find("party")) then - if not self.GPS then PLUGIN:CreateGPS(self) end - tinsert(_FRAMES, self) - - if not OnUpdateFrame then - OnUpdateFrame = CreateFrame("Frame") - OnUpdateFrame:SetScript("OnUpdate", Update) - end - - OnUpdateFrame:Show() - return true - end -end - -local Disable = function(self) - local GPS = self.GPS - if GPS then - for k, frame in next, _FRAMES do - if(frame == self) then - tremove(_FRAMES, k) - GPS:Hide() - break - end - end - - if #_FRAMES == 0 and OnUpdateFrame then - OnUpdateFrame:Hide() - end - end -end - -oUF:AddElement('GPS', nil, Enable, Disable) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.toc b/Interface/AddOns/SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.toc deleted file mode 100644 index cdca787..0000000 --- a/Interface/AddOns/SVUI_TrackOMatic/libs/oUF_GPS/oUF_GPS.toc +++ /dev/null @@ -1,9 +0,0 @@ -## Interface: 50001 -## Title: oUF GPS -## Notes: Adds GPS arrow to frames. -## Author: Omega1970, Munglunch -## Version: 1.00 -## X-Category: oUF -## Dependencies: oUF - -oUF_GPS.lua \ No newline at end of file