diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua deleted file mode 100644 index 5a8af64..0000000 --- a/Interface/AddOns/SVUI/SVUI.lua +++ /dev/null @@ -1,991 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local type = _G.type; -local rawset = _G.rawset; -local rawget = _G.rawget; -local tinsert = _G.tinsert; -local tremove = _G.tremove; -local tostring = _G.tostring; -local error = _G.error; -local getmetatable = _G.getmetatable; -local setmetatable = _G.setmetatable; -local string = _G.string; -local math = _G.math; -local table = _G.table; ---[[ STRING METHODS ]]-- -local upper = string.upper; -local format, find, match, gsub = string.format, string.find, string.match, string.gsub; ---[[ MATH METHODS ]]-- -local floor = math.floor ---[[ TABLE METHODS ]]-- -local twipe, tsort, tconcat = table.wipe, table.sort, table.concat; ---[[ -############################################################ - /$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$$$$$ -| $$ /$$__ $$ /$$__ $$ /$$__ $$| $$ /$$__ $$ -| $$ | $$ \ $$| $$ \__/| $$ \ $$| $$ | $$ \__/ -| $$ | $$ | $$| $$ | $$$$$$$$| $$ | $$$$$$ -| $$ | $$ | $$| $$ | $$__ $$| $$ \____ $$ -| $$ | $$ | $$| $$ $$| $$ | $$| $$ /$$ \ $$ -| $$$$$$$$| $$$$$$/| $$$$$$/| $$ | $$| $$$$$$$$| $$$$$$/ -|________/ \______/ \______/ |__/ |__/|________/ \______/ -############################################################ -]]-- -local SVUI = {}; -local SVUINameSpace, SVUICore = ...; -local SVUIVersion = GetAddOnMetadata(..., "Version"); -local clientVersion, internalVersion, releaseDate, uiVersion = GetBuildInfo(); -local playerName = UnitName("player"); -local playerRealm = GetRealmName(); -local SetAddonCore; -local callbacks = {}; -local numCallbacks = 0; - ---[[ CONSTANTS ]]-- - -BINDING_HEADER_SVUI = "SuperVillain UI"; -SLASH_RELOADUI1 = "/rl" -SLASH_RELOADUI2 = "/reloadui" -SlashCmdList.RELOADUI = ReloadUI - ---[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- - -function enforce(condition, ...) - if not condition then - if next({...}) then - local fn = function (...) return(string.format(...)) end - local s,r = pcall(fn, ...) - if s then - error("Error!: " .. r, 2) - end - end - error("Error!", 2) - end -end -local assert = enforce; ---[[ -###################################################################### - /$$$$$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$$$$$ - /$$__ $$| $$ /$$__ $$| $$__ $$ /$$__ $$| $$ /$$__ $$ -| $$ \__/| $$ | $$ \ $$| $$ \ $$| $$ \ $$| $$ | $$ \__/ -| $$ /$$$$| $$ | $$ | $$| $$$$$$$ | $$$$$$$$| $$ | $$$$$$ -| $$|_ $$| $$ | $$ | $$| $$__ $$| $$__ $$| $$ \____ $$ -| $$ \ $$| $$ | $$ | $$| $$ \ $$| $$ | $$| $$ /$$ \ $$ -| $$$$$$/| $$$$$$$$| $$$$$$/| $$$$$$$/| $$ | $$| $$$$$$$$| $$$$$$/ - \______/ |________/ \______/ |_______/ |__/ |__/|________/ \______/ -###################################################################### -]]-- - ---[[ CLASS COLOR LOCALS ]]-- - -local function formatValueString(text) - if "string" == type(text) then - text = gsub(text,"\n","\\n") - if match(gsub(text,"[^'\"]",""),'^"+$') then - return "'"..text.."'"; - else - return '"'..gsub(text,'"','\\"')..'"'; - end - else - return tostring(text); - end -end -local function formatKeyString(text) - if "string"==type(text) and match(text,"^[_%a][_%a%d]*$") then - return text; - else - return "["..formatValueString(text).."]"; - end -end -local function RegisterCallback(self, m, h) - assert(type(m) == "string" or type(m) == "function", "Bad argument #1 to :RegisterCallback (string or function expected)") - if type(m) == "string" then - assert(type(h) == "table", "Bad argument #2 to :RegisterCallback (table expected)") - assert(type(h[m]) == "function", "Bad argument #1 to :RegisterCallback (m \"" .. m .. "\" not found)") - m = h[m] - end - callbacks[m] = h or true - numCallbacks = numCallbacks + 1 -end -local function UnregisterCallback(self, m, h) - assert(type(m) == "string" or type(m) == "function", "Bad argument #1 to :UnregisterCallback (string or function expected)") - if type(m) == "string" then - assert(type(h) == "table", "Bad argument #2 to :UnregisterCallback (table expected)") - assert(type(h[m]) == "function", "Bad argument #1 to :UnregisterCallback (m \"" .. m .. "\" not found)") - m = h[m] - end - callbacks[m] = nil - numCallbacks = numCallbacks + 1 -end -local function DispatchCallbacks() - if (numCallbacks < 1) then return end - for m, h in pairs(callbacks) do - local ok, err = pcall(m, h ~= true and h or nil) - if not ok then - print("ERROR:", err) - end - end -end - ---[[ BUILD CLASS COLOR GLOBAL ]]-- - -SVUI_CLASS_COLORS = {}; -do - local classes = {}; - local supercolors = { - ["HUNTER"] = { r = 0.454, g = 0.698, b = 0 }, - ["WARLOCK"] = { r = 0.286, g = 0, b = 0.788 }, - ["PRIEST"] = { r = 0.976, g = 1, b = 0.839 }, - ["PALADIN"] = { r = 0.956, g = 0.207, b = 0.733 }, - ["MAGE"] = { r = 0, g = 0.796, b = 1 }, - ["ROGUE"] = { r = 1, g = 0.894, b = 0.117 }, - ["DRUID"] = { r = 1, g = 0.513, b = 0 }, - ["SHAMAN"] = { r = 0, g = 0.38, b = 1 }, - ["WARRIOR"] = { r = 0.698, g = 0.36, b = 0.152 }, - ["DEATHKNIGHT"] = { r = 0.847, g = 0.117, b = 0.074 }, - ["MONK"] = { r = 0.015, g = 0.886, b = 0.38 }, - }; - for class in pairs(RAID_CLASS_COLORS) do - tinsert(classes, class) - end - tsort(classes) - setmetatable(SVUI_CLASS_COLORS,{ - __index = function(t, k) - if k == "RegisterCallback" then return RegisterCallback end - if k == "UnregisterCallback" then return UnregisterCallback end - if k == "DispatchCallbacks" then return DispatchCallbacks end - end - }); - for i, class in ipairs(classes) do - local color = supercolors[class] - local r, g, b = color.r, color.g, color.b - local hex = ("ff%02x%02x%02x"):format(r * 255, g * 255, b * 255) - if not SVUI_CLASS_COLORS[class] or not SVUI_CLASS_COLORS[class].r or not SVUI_CLASS_COLORS[class].g or not SVUI_CLASS_COLORS[class].b then - SVUI_CLASS_COLORS[class] = { - r = r, - g = g, - b = b, - colorStr = hex, - } - end - end - classes = nil -end - ---[[ APPENDED LUA METHODS ]]-- - -function math.parsefloat(value,decimal) - if decimal and decimal > 0 then - local calc1 = 10 ^ decimal; - local calc2 = (value * calc1) + 0.5; - return floor(calc2) / calc1 - end - return floor(value + 0.5) -end - -function table.dump(targetTable) - local dumpTable = {}; - local dumpCheck = {}; - for key,value in ipairs(targetTable) do - tinsert(dumpTable, formatValueString(value)); - dumpCheck[key] = true; - end - for key,value in pairs(targetTable) do - if not dumpCheck[key] then - tinsert(dumpTable, "\n "..formatKeyString(key).." = "..formatValueString(value)); - end - end - local output = tconcat(dumpTable, ", "); - return "{ "..output.." }"; -end - -function table.copy(targetTable,deepCopy,mergeTable) - mergeTable = mergeTable or {}; - if targetTable==nil then return nil end - if mergeTable[targetTable] then return mergeTable[targetTable] end - local replacementTable = {} - for key,value in pairs(targetTable)do - if deepCopy and type(value) == "table" then - replacementTable[key] = table.copy(value, deepCopy, mergeTable) - else - replacementTable[key] = value - end - end - setmetatable(replacementTable, table.copy(getmetatable(targetTable), deepCopy, mergeTable)) - mergeTable[targetTable] = replacementTable; - return replacementTable -end - -function string.trim(this) - return this:find('^%s*$') and '' or this:match('^%s*(.*%S)') -end - -function string.color(this, color) - return ("|cff%s%s|r"):format(color, this) -end - -function string.link(this, prefix, text, color) - text = tostring(text) - local colorstring = tostring(this):color(color or "ffffff") - return ("|H%s:%s|h%s|h"):format(prefix, text, colorstring) -end - -function string.explode(str, delim) - local res = { } - local pattern = string.format("([^%s]+)%s()", delim, delim) - while (true) do - line, pos = str:match(pattern, pos) - if line == nil then break end - table.insert(res, line) - end - return res -end ---[[ -############################################################################### - /$$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$/$$$$$$$ /$$ /$$ -| $$__ $$| $$_____/ /$$__ $$|_ $$_/ /$$__ $$|__ $$__/ $$__ $$| $$ /$$/ -| $$ \ $$| $$ | $$ \__/ | $$ | $$ \__/ | $$ | $$ \ $$ \ $$ /$$/ -| $$$$$$$/| $$$$$ | $$ /$$$$ | $$ | $$$$$$ | $$ | $$$$$$$/ \ $$$$/ -| $$__ $$| $$__/ | $$|_ $$ | $$ \____ $$ | $$ | $$__ $$ \ $$/ -| $$ \ $$| $$ | $$ \ $$ | $$ /$$ \ $$ | $$ | $$ \ $$ | $$ -| $$ | $$| $$$$$$$$| $$$$$$/ /$$$$$$| $$$$$$/ | $$ | $$ | $$ | $$ -|__/ |__/|________/ \______/ |______/ \______/ |__/ |__/ |__/ |__/ -############################################################################### -]]-- -do - local ModuleQueue, ScriptQueue = {},{}; - - local INFO_BY = "%s |cff0099FFby %s|r"; - local INFO_VERSION = "%s%s |cff33FF00Version: %s|r"; - local INFO_NAME = "Plugins"; - local INFO_HEADER = "SuperVillain UI (version %.3f): Plugins"; - - if GetLocale() == "ruRU" then - INFO_BY = "%s |cff0099FFот %s|r"; - INFO_VERSION = "%s%s |cff33FF00Версия: %s|r"; - INFO_NAME = "Плагины"; - INFO_HEADER = "SuperVillain UI (устарела %.3f): Плагины"; - end - - local PLUGIN_LISTING = ""; - - local rootstring = function(self) return self.___addonName end - - local changeDBVar = function(self, value, key, sub1, sub2, sub3) - local core = self.___core - local schema = self.___schema - local config = core.db[schema] - - if((sub1 and sub2 and sub3) and (config[sub1] and config[sub1][sub2] and config[sub1][sub2][sub3])) then - core.db[schema][sub1][sub2][sub3][key] = value - elseif((sub1 and sub2) and (config[sub1] and config[sub1][sub2])) then - core.db[schema][sub1][sub2][key] = value - elseif(sub1 and config[sub1]) then - core.db[schema][sub1][key] = value - else - core.db[schema][key] = value - end - - self.db = core.db[schema] - - if(self.UpdateLocals) then - self:UpdateLocals() - end - end - - local innerOnEvent = function(self, event, ...) - local obj = self.module - if self[event] and type(self[event]) == "function" then - self[event](obj, event, ...) - end - end - - local registerEvent = function(self, eventname, eventfunc) - if not self.___eventframe then - self.___eventframe = CreateFrame("Frame", nil) - self.___eventframe.module = self - self.___eventframe:SetScript("OnEvent", innerOnEvent) - end - - if(not self.___eventframe[eventname]) then - local fn = eventfunc - if type(eventfunc) == "string" then - fn = self[eventfunc] - elseif(not fn and self[eventname]) then - fn = self[eventname] - end - self.___eventframe[eventname] = fn - end - - self.___eventframe:RegisterEvent(eventname) - end - - local unregisterEvent = function(self, event, ...) - if(self.___eventframe) then - self.___eventframe:UnregisterEvent(event) - end - end - - local innerOnUpdate = function(self, elapsed) - if self.elapsed and self.elapsed > (self.throttle) then - local obj = self.module - local core = obj.___core - local callbacks = self.callbacks - - for name, fn in pairs(callbacks) do - local _, error = pcall(fn, obj) - if(error and core.Debugging) then - print(error) - end - end - - self.elapsed = 0 - else - self.elapsed = (self.elapsed or 0) + elapsed - end - end - - local registerUpdate = function(self, updatefunc, throttle) - if not self.___updateframe then - self.___updateframe = CreateFrame("Frame", nil); - self.___updateframe.module = self; - self.___updateframe.callbacks = {}; - self.___updateframe.elapsed = 0; - self.___updateframe.throttle = throttle or 0.2; - end - - if(updatefunc and type(updatefunc) == "string" and self[updatefunc]) then - self.___updateframe.callbacks[updatefunc] = self[updatefunc] - end - - self.___updateframe:SetScript("OnUpdate", innerOnUpdate) - end - - local unregisterUpdate = function(self, updatefunc) - if(updatefunc and type(updatefunc) == "string" and self.___updateframe.callbacks[updatefunc]) then - self.___updateframe.callbacks[updatefunc] = nil - if(#self.___updateframe.callbacks == 0) then - self.___updateframe:SetScript("OnUpdate", nil) - end - else - self.___updateframe:SetScript("OnUpdate", nil) - end - end - - local add_OptionsIndex = function(self, index, data) - local addonName = self.___addonName - local schema = self.___schema - local core = self.___core - local header = GetAddOnMetadata(addonName, "X-SVUI-Header") - - core.Options.args.plugins.args.pluginOptions.args[schema].args[index] = data - end - - local function SetPluginString(addonName) - local pluginString = PLUGIN_LISTING or "" - local author = GetAddOnMetadata(addonName, "Author") or "Unknown" - local Pname = GetAddOnMetadata(addonName, "Title") or addonName - local version = GetAddOnMetadata(addonName, "Version") or "???" - pluginString = INFO_BY:format(pluginString, author) - pluginString = ("%s%s"):format(pluginString, Pname) - pluginString = INFO_VERSION:format(pluginString, "|cff00FF00", version) - pluginString = ("%s|r\n"):format(pluginString) - - PLUGIN_LISTING = pluginString - end - - local function SetFoundAddon(core, addonName, lod) - local header = GetAddOnMetadata(addonName, "X-SVUI-Header") - local schema = GetAddOnMetadata(addonName, "X-SVUI-Schema") - - if(lod) then - -- print("ADDON: " .. addonName) - core.Options.args.plugins.args.pluginOptions.args[schema] = { - type = "group", - name = header, - childGroups = "tree", - args = { - enable = { - order = 1, - type = "execute", - width = "full", - name = function() - local nameString = "Disable" - if(not IsAddOnLoaded(addonName)) then - nameString = "Enable" - end - return nameString - end, - func = function() - if(not IsAddOnLoaded(addonName)) then - local loaded, reason = LoadAddOn(addonName) - core:UpdateDatabase() - core.db[schema].enable = true - core.Registry:LoadPackages() - else - core.db[schema].enable = false - core:StaticPopup_Show("RL_CLIENT") - end - end, - } - } - } - else - core.Options.args.plugins.args.pluginOptions.args[schema] = { - type = "group", - name = header, - childGroups = "tree", - args = { - enable = { - order = 1, - type = "execute", - width = "full", - name = function() - local nameString = "Enable" - if(core.db[schema].enable or core.db[schema].enable ~= false) then - nameString = "Disable" - end - return nameString - end, - func = function() - if(not core.db[schema].enable) then - core.db[schema].enable = true - else - core.db[schema].enable = false - end - end, - } - } - } - end - end - - local function SetPluginOptions(core, obj) - local addonName = obj.___addonName - local schema = obj.___schema - local header = obj.___header - local lod = obj.___lod - - if(lod) then - -- print("PLUGIN: " .. addonName) - core.Options.args.plugins.args.pluginOptions.args[schema] = { - type = "group", - name = header, - childGroups = "tree", - args = { - enable = { - order = 1, - type = "execute", - width = "full", - name = function() - local nameString = "Disable" - if(not IsAddOnLoaded(addonName)) then - nameString = "Enable" - end - return nameString - end, - func = function() - if(not IsAddOnLoaded(addonName)) then - local loaded, reason = LoadAddOn(addonName) - core:UpdateDatabase() - obj:ChangeDBVar(true, "enable") - else - obj:ChangeDBVar(false, "enable") - core:StaticPopup_Show("RL_CLIENT") - end - end, - } - } - } - else - core.Options.args.plugins.args.pluginOptions.args[schema] = { - type = "group", - name = header, - childGroups = "tree", - args = { - enable = { - order = 1, - type = "toggle", - name = "Enable", - get = function() return obj.db.enable end, - set = function(key, value) obj:ChangeDBVar(value, "enable") end, - } - } - } - end - end - - local function SetInternalModule(obj, core, schema) - local addonmeta = {} - local oldmeta = getmetatable(obj) - if oldmeta then - for k, v in pairs(oldmeta) do addonmeta[k] = v end - end - addonmeta.__tostring = rootstring - setmetatable( obj, addonmeta ) - - local addonName = ("SVUI [%s]"):format(schema) - - obj.___addonName = addonName - obj.___schema = schema - obj.___core = core - - obj.initialized = false - obj.CombatLocked = false - obj.ChangeDBVar = changeDBVar - obj.RegisterEvent = registerEvent - obj.UnregisterEvent = unregisterEvent - obj.RegisterUpdate = registerUpdate - obj.UnregisterUpdate = unregisterUpdate - - return obj - end - - local function SetExternalModule(obj, core, schema, addonName, header, lod) - local addonmeta = {} - local oldmeta = getmetatable(obj) - if oldmeta then - for k, v in pairs(oldmeta) do addonmeta[k] = v end - end - addonmeta.__tostring = rootstring - setmetatable( obj, addonmeta ) - - obj.___addonName = addonName - obj.___schema = schema - obj.___header = header - obj.___core = core - obj.___lod = lod - - obj.initialized = false - obj.CombatLocked = false - obj.ChangeDBVar = changeDBVar - obj.RegisterEvent = registerEvent - obj.UnregisterEvent = unregisterEvent - obj.RegisterUpdate = registerUpdate - obj.UnregisterUpdate = unregisterUpdate - obj.AddOption = add_OptionsIndex - - return obj - end - - local Registry_NewCallback = function(self, fn) - if(fn and type(fn) == "function") then - self.Callbacks[#self.Callbacks+1] = fn - end - end - - local Registry_NewScript = function(self, fn) - if(fn and type(fn) == "function") then - ScriptQueue[#ScriptQueue+1] = fn - end - end - - local Registry_NewPackage = function(self, obj, schema) - local core = self.___core - if(core[schema]) then return end - - ModuleQueue[#ModuleQueue+1] = schema - self.Modules[#self.Modules+1] = schema - - core[schema] = SetInternalModule(obj, core, schema) - - if(core.AddonLaunched) then - if(core[schema].Load) then - core[schema]:Load() - end - end - end - - local Registry_NewPlugin = function(self, obj) - local core = self.___core - local coreName = core.___addonName - local addonName = obj.___addonName - - if(addonName and addonName ~= coreName) then - local schema = GetAddOnMetadata(addonName, "X-SVUI-Schema"); - local header = GetAddOnMetadata(addonName, "X-SVUI-Header"); - local lod = IsAddOnLoadOnDemand(addonName) - if(not schema) then return end - - ModuleQueue[#ModuleQueue+1] = schema - self.Modules[#self.Modules+1] = schema - - SetPluginString(addonName) - - core[schema] = SetExternalModule(obj, core, schema, addonName, header, lod) - - SetPluginOptions(core, obj) - - if(core.AddonLaunched and core[schema].Load) then - core[schema]:Load() - end - end - end - - local Registry_FetchAddons = function(self) - local addonCount = GetNumAddOns() - local core = self.___core - - for i = 1, addonCount do - local addonName, _, _, _, _, reason = GetAddOnInfo(i) - local lod = IsAddOnLoadOnDemand(i) - local schema = GetAddOnMetadata(i, "X-SVUI-Schema") - - if(lod and schema) then - self.Addons[addonName] = schema; - SetFoundAddon(core, addonName, lod) - end - end - end - - local Registry_RunCallbacks = function(self) - local callbacks = self.Callbacks - for i=1, #callbacks do - local fn = callbacks[i] - if(fn and type(fn) == "function") then - fn() - end - end - end - - local Registry_Update = function(self, name, dataOnly) - local core = self.___core - local obj = core[name] - if obj then - if core.db[name] then - obj.db = core.db[name] - end - if obj.ReLoad and not dataOnly then - obj:ReLoad() - end - end - end - - local Registry_UpdateAll = function(self) - local modules = self.Modules - local core = self.___core - for _,name in pairs(modules) do - local obj = core[name] - - if core.db[name] then - obj.db = core.db[name] - end - - if obj and obj.ReLoad then - obj:ReLoad() - end - end - end - - local Registry_LoadOnDemand = function(self) - local core = self.___core - local addons = self.Addons - for name,schema in pairs(addons) do - local config = core.db[schema] - if(config and (config.enable or config.enable ~= false)) then - if(not IsAddOnLoaded(name)) then - local loaded, reason = LoadAddOn(name) - end - EnableAddOn(name) - end - end - end - - local Registry_Load = function(self) - if not ModuleQueue then return end - local core = self.___core - - for i=1,#ModuleQueue do - local name = ModuleQueue[i] - local obj = core[name] - if obj and not obj.initialized then - if core.db[name] then - obj.db = core.db[name] - end - - -- if obj.___lod then - -- print(table.dump(core.db[name])) - -- end - - if obj.Load then - local halt = false - if(obj.db.incompatible) then - for addon,_ in pairs(obj.db.incompatible) do - if IsAddOnLoaded(addon) then halt = true end - end - end - if(not halt) then - obj:Load() - obj.Load = nil - end - end - obj.initialized = true; - end - end - - twipe(ModuleQueue) - - if not ScriptQueue then return end - for i=1, #ScriptQueue do - local fn = ScriptQueue[i] - if(fn and type(fn) == "function") then - fn() - end - end - - ScriptQueue = nil - end - - --[[ GLOBAL NAMESPACE ]]-- - - function SetAddonCore(obj) - local version = GetAddOnMetadata(SVUINameSpace, "Version") - local schema = GetAddOnMetadata(SVUINameSpace, "X-SVUI-Schema") - - obj = { - ___addonName = SVUINameSpace, - ___version = version, - ___schema = schema, - ___interface = tonumber(uiVersion), - db = {}, - Global = { - Accountant = {}, - profiles = {}, - profileKeys = {}, - }, - Configs = {}, - Media = {}, - DisplayAudit = {}, - DynamicOptions = {}, - Dispellable = {}, - Snap = {}, - Options = { - type = "group", - name = "|cff339fffConfig-O-Matic|r", - args = { - plugins = { - order = -2, - type = "group", - name = "Plugins", - childGroups = "tab", - args = { - pluginheader = { - order = 1, - type = "header", - name = "SuperVillain Plugins", - }, - pluginOptions = { - order = 2, - type = "group", - name = "", - args = { - pluginlist = { - order = 1, - type = "group", - name = "Summary", - args = { - active = { - order = 1, - type = "description", - name = function() return PLUGIN_LISTING end - } - } - }, - } - } - } - } - } - }, - Registry = { - Modules = {}, - Addons = {}, - Callbacks = {}, - INFO_VERSION = INFO_VERSION, - INFO_NEW = INFO_NEW, - INFO_NAME = INFO_NAME, - INFO_HEADER = INFO_HEADER, - NewCallback = Registry_NewCallback, - NewScript = Registry_NewScript, - NewPackage = Registry_NewPackage, - NewPlugin = Registry_NewPlugin, - FindAddons = Registry_FetchAddons, - LoadRegisteredAddons = Registry_LoadOnDemand, - RunCallbacks = Registry_RunCallbacks, - Update = Registry_Update, - UpdateAll = Registry_UpdateAll, - LoadPackages = Registry_Load, - } - } - local mt = {} - local old = getmetatable(obj) - if old then - for k, v in pairs(old) do mt[k] = v end - end - mt.__tostring = rootstring - setmetatable(obj, mt) - - obj.Registry.___core = obj - - return obj - end -end - ---[[ LOCALIZATION HELPERS ]]-- - -local failsafe = function() assert(false) end - -local metaread = { - __index = function(self, key) - rawset(self, key, key) - return key - end -} - -local activeLocale - -local defaultwrite = setmetatable({}, { - __newindex = function(self, key, value) - if not rawget(activeLocale, key) then - rawset(activeLocale, key, value == true and key or value) - end - end, - __index = failsafe -}) - -local metawrite = setmetatable({}, { - __newindex = function(self, key, value) - rawset(activeLocale, key, value == true and key or value) - end, - __index = failsafe -}) ---[[ -########################################################## - /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$$$ - /$$__ $$ /$$__ $$| $$__ $$| $$_____/ -| $$ \__/| $$ \ $$| $$ \ $$| $$ -| $$ | $$ | $$| $$$$$$$/| $$$$$ -| $$ | $$ | $$| $$__ $$| $$__/ -| $$ $$| $$ | $$| $$ \ $$| $$ -| $$$$$$/| $$$$$$/| $$ | $$| $$$$$$$$ - \______/ \______/ |__/ |__/|________/ -########################################################## -]]-- -SVUI = SetAddonCore(SVUI) - -SVUI.Localization = setmetatable({}, metaread) - ---[[ MISC ]]-- - -SVUI.fubar = function() return end -SVUI.class = select(2,UnitClass("player")); -SVUI.ClassRole = ""; -SVUI.UnitRole = "NONE"; -SVUI.ConfigurationMode = false; -SVUI.DebuggingMode = false - ---[[ UTILITY FRAMES ]]-- - -SVUI.UIParent = CreateFrame("Frame", "SVUIParent", UIParent); -SVUI.UIParent:SetFrameLevel(UIParent:GetFrameLevel()); -SVUI.UIParent:SetPoint("CENTER", UIParent, "CENTER"); -SVUI.UIParent:SetSize(UIParent:GetSize()); -SVUI.Snap[1] = SVUI.UIParent; - -SVUI.Cloaked = CreateFrame("Frame", nil, UIParent); -SVUI.Cloaked:Hide(); - ---[[ COMMON FUNCTIONS ]]-- - -function SVUI:SetLocaleStrings(locale, isDefault) - local gameLocale = GetLocale() - if gameLocale == "enGB" then gameLocale = "enUS" end - - activeLocale = self.Localization - - if isDefault then - return defaultwrite - elseif(locale == GAME_LOCALE or locale == gameLocale) then - return metawrite - end -end - -function SVUI:Prototype(name) - local version = GetAddOnMetadata(name, "Version") - local schema = GetAddOnMetadata(name, "X-SVUI-Schema") - - self.Configs[schema] = {["enable"] = false} - - local obj = { - ___addonName = name, - ___version = version, - ___schema = schema - } - - local mt = {} - local old = getmetatable(obj) - if old then - for k, v in pairs(old) do mt[k] = v end - end - mt.__tostring = rootstring - setmetatable(obj, mt) - return obj -end - -do - local messagePattern = "|cffFF2F00%s:|r" - local debugPattern = "|cffFF2F00%s|r [|cff992FFF%s|r]|cffFF2F00:|r" - - local function _sendmessage(msg, prefix) - if(type(msg) == "table") then - msg = tostring(msg) - end - - if(not msg) then return end - - if(prefix) then - local outbound = ("%s %s"):format(prefix, msg); - print(outbound) - else - print(msg) - end - end - - function SVUI:Debugger(msg) - if(not self.DebuggingMode) then return end - local outbound = (debugPattern):format("SVUI", "DEBUG") - _sendmessage(msg, outbound) - end - - function SVUI:AddonMessage(msg) - local outbound = (messagePattern):format("SVUI") - _sendmessage(msg, outbound) - end -end - -SVUICore[1] = SVUI -SVUICore[2] = SVUI.Localization - ---[[ SET MASTER GLOBAL ]]-- - -_G[SVUINameSpace] = SVUICore; - --- TESTING INTERFACE METADATA --- /script print(SVUI[1].___interface) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index ddd855c..c56e174 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -6,10 +6,8 @@ ## SavedVariables: SVUI_Global ## SavedVariablesPerCharacter: SVUI_Profile, SVUI_Cache ## OptionalDeps: Blizzard_DebugTools, Blizzard_PetJournal, SharedMedia -## X-oUF: oUF_SuperVillain +## X-oUF: oUF_Villain ## X-Notes: Special thanks to Elv and Tukz for their incredible work. ## X-Email: munglunch@gmail.com -## X-SVUI-Header: Super Villain UI -## X-SVUI-Schema: SuperVillain SVUI.xml diff --git a/Interface/AddOns/SVUI/SVUI.xml b/Interface/AddOns/SVUI/SVUI.xml index a162118..b5ad17a 100644 --- a/Interface/AddOns/SVUI/SVUI.xml +++ b/Interface/AddOns/SVUI/SVUI.xml @@ -95,7 +95,8 @@ </Frames> </Frame> - <Script file='SVUI.lua'/> + <Script file="system\global.lua"/> + <Script file="system\registry.lua"/> <Script file="libs\LibStub\LibStub.lua"/> <Script file="libs\CallbackHandler-1.0\CallbackHandler-1.0.lua"/> @@ -117,19 +118,17 @@ <Script file="language\portuguese_ui.lua"/> <Script file="system\database.lua"/> - <Script file="system\system.lua"/> + <Script file="system\media.lua"/> + <Script file="system\utilities.lua"/> + <Script file="system\animate.lua"/> <Script file="system\common.lua"/> <Script file="system\visibility.lua"/> - <Script file="system\utilities.lua"/> <Script file="system\timers.lua"/> - <Script file="system\updates.lua"/> <Script file="system\slash.lua"/> <Script file="system\alerts.lua"/> <Script file="system\presets.lua"/> <Script file="system\installer.lua"/> - <Script file="system\mentalo.lua"/> <Include file="system\mentalo.xml"/> - <Script file="system\cartography.lua"/> <Include file="packages\stats\SVStats.xml"/> <Script file="packages\dock\SVDock.lua"/> @@ -153,4 +152,6 @@ <Script file="scripts\raid.lua"/> <Script file="scripts\reactions.lua"/> <Script file="scripts\spellbind.lua"/> + + <Script file="system\load.lua"/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ANIMATION.blp b/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ANIMATION.blp deleted file mode 100644 index 53d920b..0000000 Binary files a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ANIMATION.blp and /dev/null differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ARROW.blp b/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ARROW.blp deleted file mode 100644 index 9fb0a32..0000000 Binary files a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ARROW.blp and /dev/null differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-BORDER.blp b/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-BORDER.blp deleted file mode 100644 index 8bc4525..0000000 Binary files a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-BORDER.blp and /dev/null differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-CLOSE.blp b/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-CLOSE.blp deleted file mode 100644 index 6ff35be..0000000 Binary files a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-CLOSE.blp and /dev/null differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-OPEN.blp b/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-OPEN.blp deleted file mode 100644 index f705797..0000000 Binary files a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-OPEN.blp and /dev/null differ diff --git a/Interface/AddOns/SVUI/language/chinese_ui.lua b/Interface/AddOns/SVUI/language/chinese_ui.lua index 01848f6..a21ab8e 100644 --- a/Interface/AddOns/SVUI/language/chinese_ui.lua +++ b/Interface/AddOns/SVUI/language/chinese_ui.lua @@ -1,5 +1,5 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("zhCN"); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("zhCN"); if not L then return end --[[REACTION TEXTS]]-- L[" is drinking."] = true; diff --git a/Interface/AddOns/SVUI/language/english_ui.lua b/Interface/AddOns/SVUI/language/english_ui.lua index 42f231c..9447d8e 100644 --- a/Interface/AddOns/SVUI/language/english_ui.lua +++ b/Interface/AddOns/SVUI/language/english_ui.lua @@ -1,5 +1,5 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("enUS", true); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("enUS", true); if not L then return; end --[[REACTION TEXTS]]-- L[" is drinking."] = true; diff --git a/Interface/AddOns/SVUI/language/french_ui.lua b/Interface/AddOns/SVUI/language/french_ui.lua index 4a4b166..68862c7 100644 --- a/Interface/AddOns/SVUI/language/french_ui.lua +++ b/Interface/AddOns/SVUI/language/french_ui.lua @@ -1,5 +1,5 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("frFR"); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("frFR"); if not L then return; end --[[REACTION TEXTS]]-- L[" is drinking."] = true; diff --git a/Interface/AddOns/SVUI/language/german_ui.lua b/Interface/AddOns/SVUI/language/german_ui.lua index b66787d..08bc236 100644 --- a/Interface/AddOns/SVUI/language/german_ui.lua +++ b/Interface/AddOns/SVUI/language/german_ui.lua @@ -1,5 +1,5 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("deDE"); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("deDE"); if not L then return end --[[REACTION TEXTS]]-- L[" is drinking."] = true; diff --git a/Interface/AddOns/SVUI/language/italian_ui.lua b/Interface/AddOns/SVUI/language/italian_ui.lua index c507a6d..17e2ef9 100644 --- a/Interface/AddOns/SVUI/language/italian_ui.lua +++ b/Interface/AddOns/SVUI/language/italian_ui.lua @@ -1,5 +1,5 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("itIT"); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("itIT"); if not L then return; end --[[REACTION TEXTS]]-- L[" is drinking."] = true; diff --git a/Interface/AddOns/SVUI/language/korean_ui.lua b/Interface/AddOns/SVUI/language/korean_ui.lua index 03d21f5..05bfd00 100644 --- a/Interface/AddOns/SVUI/language/korean_ui.lua +++ b/Interface/AddOns/SVUI/language/korean_ui.lua @@ -1,5 +1,5 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("koKR"); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("koKR"); if not L then return; end --[[REACTION TEXTS]]-- L[" is drinking."] = true; diff --git a/Interface/AddOns/SVUI/language/portuguese_ui.lua b/Interface/AddOns/SVUI/language/portuguese_ui.lua index 8d18575..c2f89aa 100644 --- a/Interface/AddOns/SVUI/language/portuguese_ui.lua +++ b/Interface/AddOns/SVUI/language/portuguese_ui.lua @@ -1,5 +1,5 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("ptBR"); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("ptBR"); if not L then return; end --[[REACTION TEXTS]]-- L[" is drinking."] = true; diff --git a/Interface/AddOns/SVUI/language/russian_ui.lua b/Interface/AddOns/SVUI/language/russian_ui.lua index feae31d..c4dc965 100644 --- a/Interface/AddOns/SVUI/language/russian_ui.lua +++ b/Interface/AddOns/SVUI/language/russian_ui.lua @@ -1,5 +1,5 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("ruRU"); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("ruRU"); if not L then return; end --[[REACTION TEXTS]]-- L[" is drinking."] = true; diff --git a/Interface/AddOns/SVUI/language/spanish_ui.lua b/Interface/AddOns/SVUI/language/spanish_ui.lua index 94b5d87..83dfdf0 100644 --- a/Interface/AddOns/SVUI/language/spanish_ui.lua +++ b/Interface/AddOns/SVUI/language/spanish_ui.lua @@ -1,7 +1,7 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("esES"); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("esES"); if not L then - L = SuperVillain:SetLocaleStrings("esMX") + L = SV:SetLocaleStrings("esMX") end if not L then return; end --[[REACTION TEXTS]]-- @@ -426,7 +426,7 @@ L["You can access copy chat and chat menu functions by mouse over the top right L["You can see someones average item level of their gear by holding shift and mousing over them. It should appear inside the tooltip."]="Puedes ver la media de nivel de objeto de un objetivo manteniendo pulsado shift mientras pasas el ratón por encima de él. El iNvl aparecerá en la descripción emergente." L["You can set your keybinds quickly by typing /kb."]="Puedes establecer tus atajos rapidamente escribiendo /kb." L["You can toggle the microbar by using your middle mouse button on the minimap you can also accomplish this by enabling the actual microbar located in the actionbar settings."]="Puedes acceder a la microbarra usando tu botón central del ratón sobre el minimapa. También puedes activarla desde las opciones de las barras de acción." -L["You can use the /resetui command to reset all of your moveables. You can also use the command to reset a specific mover, /resetui <mover name>.\nExample: /resetui Player Frame"]="Puedes usar el commando /resetui para restablecer todos tus fijadores. También puedes usar el comando para restablecer alguno en específico, /resetui <fijador>. PSuperVillain: /resetui Player Frame" +L["You can use the /resetui command to reset all of your moveables. You can also use the command to reset a specific mover, /resetui <mover name>.\nExample: /resetui Player Frame"]="Puedes usar el commando /resetui para restablecer todos tus fijadores. También puedes usar el comando para restablecer alguno en específico, /resetui <fijador>. PSV: /resetui Player Frame" L["Ghost"]="Fantasma" L["Offline"]="Fuera de Línea" L["ENH_LOGIN_MSG"]="You are using |cff1784d1SVUI Enhanced|r version %s%s|r." diff --git a/Interface/AddOns/SVUI/language/taiwanese_ui.lua b/Interface/AddOns/SVUI/language/taiwanese_ui.lua index 67bd5d8..fecf485 100644 --- a/Interface/AddOns/SVUI/language/taiwanese_ui.lua +++ b/Interface/AddOns/SVUI/language/taiwanese_ui.lua @@ -1,5 +1,5 @@ -local SuperVillain, L = unpack(select(2, ...)) -local L = SuperVillain:SetLocaleStrings("zhTW"); +local SV, L = unpack(select(2, ...)) +local L = SV:SetLocaleStrings("zhTW"); if not L then return; end --[[REACTION TEXTS]]-- L[" is drinking."] = true; diff --git a/Interface/AddOns/SVUI/libs/LibActionButton-1.0/LibActionButton-1.0.lua b/Interface/AddOns/SVUI/libs/LibActionButton-1.0/LibActionButton-1.0.lua index 9a7be27..cdc1bd1 100644 --- a/Interface/AddOns/SVUI/libs/LibActionButton-1.0/LibActionButton-1.0.lua +++ b/Interface/AddOns/SVUI/libs/LibActionButton-1.0/LibActionButton-1.0.lua @@ -25,7 +25,7 @@ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGSuperVillain. +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ]] local MAJOR_VERSION = "LibActionButton-1.0" diff --git a/Interface/AddOns/SVUI/libs/LibBalancePowerTracker-1.1/LibBalancePowerTracker-1.1.lua b/Interface/AddOns/SVUI/libs/LibBalancePowerTracker-1.1/LibBalancePowerTracker-1.1.lua index a8fd0e2..a3e2b2d 100644 --- a/Interface/AddOns/SVUI/libs/LibBalancePowerTracker-1.1/LibBalancePowerTracker-1.1.lua +++ b/Interface/AddOns/SVUI/libs/LibBalancePowerTracker-1.1/LibBalancePowerTracker-1.1.lua @@ -54,7 +54,7 @@ v 1.1.4 Checks eclipse direction more often Removed double check for no energy change v 1.1.3 Cast failed detection improved - Included LICENSSuperVillain.txt in Lib + Included LICENSE.txt in Lib CPU usage by critter detection recalculated Fixed bug in loading check @@ -138,8 +138,8 @@ v 1.0.4 Changed Euphoria chance based on Hamlet's findings on www.elitistjerks.c v 1.0.3 Changed to use propperly SpellQueueADT 1.1.2 Now erases flying spells when teleporting. - FEATURSuperVillain: Eclipse chance calculation. - FEATURSuperVillain: Energy statistically calculation. + FEATURE: Eclipse chance calculation. + FEATURE: Energy statistically calculation. v 1.0.2 Fixed sometimes not fetching the direction properly. Fixed PvP bonus diff --git a/Interface/AddOns/SVUI/libs/oUF/LICENSE b/Interface/AddOns/SVUI/libs/oUF/LICENSE index a78d4f9..f67ac68 100644 --- a/Interface/AddOns/SVUI/libs/oUF/LICENSE +++ b/Interface/AddOns/SVUI/libs/oUF/LICENSE @@ -19,4 +19,4 @@ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARSuperVillain. +OTHER DEALINGS IN THE SOFTWARE. diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua b/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua index 38cec70..bf553fb 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua @@ -5,7 +5,7 @@ ]] local parent, ns = ... local oUF = ns.oUF -local SuperVillain = SVUI[1] + local updateSafeZone = function(self) local sz = self.SafeZone local width = self:GetWidth() @@ -269,8 +269,7 @@ local UNIT_SPELLCAST_CHANNEL_START = function(self, event, unit, spellname) end if(castbar.PostChannelStart) then castbar:PostChannelStart(unit, name) end - --castbar:Show() - SuperVillain:SecureFadeIn(castbar, 0.2, 0, 1) + castbar:Show() end local UNIT_SPELLCAST_CHANNEL_UPDATE = function(self, event, unit, spellname) diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua index d2863b4..62b179d 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua @@ -9,7 +9,6 @@ local updateFrequentUpdates local random = math.random oUF.colors.health = {49/255, 207/255, 37/255} - local Update = function(self, event, unit) if(self.unit ~= unit) or not unit then return end local health = self.Health @@ -17,6 +16,7 @@ local Update = function(self, event, unit) local min, max = UnitHealth(unit), UnitHealthMax(unit) local disconnected = not UnitIsConnected(unit) local invisible = ((min == max) or UnitIsDeadOrGhost(unit) or disconnected) + if invisible then health.lowAlerted = false end if health.fillInverted then health:SetReverseFill(true) @@ -24,16 +24,18 @@ local Update = function(self, event, unit) health:SetMinMaxValues(0, max) + local percent = 100 if(disconnected) then health:SetValue(max) - health.percent = 100 + percent = 100 else health:SetValue(min) - health.percent = (min / max) * 100 + percent = (min / max) * 100 end - health.percent = invisible and 100 or ((min / max) * 100) + percent = invisible and 100 or ((min / max) * 100) + health.percent = percent health.disconnected = disconnected if health.frequentUpdates ~= health.__frequentUpdates then @@ -89,15 +91,22 @@ local Update = function(self, event, unit) if self.ResurrectIcon then self.ResurrectIcon:SetAlpha(min == 0 and 1 or 0) - end + end + if self.isForced then min = random(1,max) health:SetValue(min) - end + end + if(health.gridMode) then health:SetOrientation("VERTICAL") end + if(health.percent < 10 and health.LowAlertFunc and not health.lowAlerted) then + health.lowAlerted = true + health.LowAlertFunc(self) + end + if(health.PostUpdate) then return health.PostUpdate(self, health.percent) end @@ -111,6 +120,7 @@ local CustomUpdate = function(self, event, unit) local disconnected = not UnitIsConnected(unit) local invisible = ((min == max) or UnitIsDeadOrGhost(unit) or disconnected); local tapped = (UnitIsTapped(unit) and (not UnitIsTappedByPlayer(unit))); + if invisible then health.lowAlerted = false end if health.fillInverted then health:SetReverseFill(true) @@ -145,7 +155,7 @@ local CustomUpdate = function(self, event, unit) health:SetStatusBarColor(0.6,0.4,1,0.5) health.animation[1]:SetVertexColor(0.8,0.3,1,0.4) elseif(health.colorOverlay) then - local t = oUF_SuperVillain.colors.health + local t = oUF_Villain.colors.health health:SetStatusBarColor(t[1], t[2], t[3], 0.9) else health:SetStatusBarColor(1, 0.25 * mu, 0, 0.85) @@ -168,12 +178,18 @@ local CustomUpdate = function(self, event, unit) if self.ResurrectIcon then self.ResurrectIcon:SetAlpha(min == 0 and 1 or 0) - end + end + if self.isForced then local current = random(1,max) health:SetValue(-current) end + if(health.percent < 10 and health.LowAlertFunc and not health.lowAlerted) then + health.lowAlerted = true + health.LowAlertFunc(self) + end + if(health.PostUpdate) then return health.PostUpdate(self, health.percent) end diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.lua b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.lua index 8de49c9..ac98666 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.lua @@ -53,7 +53,7 @@ local Update = function(self, event, unit) texture:SetTexture(media[3]) texture:SetGradient("VERTICAL",1,1,0,1,0,0) else - texture:SetTexture("") + texture:SetTexture(0,0,0,0) end end end diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_CombatFader/oUF_CombatFader.lua b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_CombatFader/oUF_CombatFader.lua index 342ee8c..f299d09 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_CombatFader/oUF_CombatFader.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_CombatFader/oUF_CombatFader.lua @@ -2,7 +2,7 @@ local parent, ns = ... local oUF = ns.oUF local frames, allFrames = {}, {} local showStatus -local SuperVillain; +local CORE; local CheckForReset = function() for frame, unit in pairs(allFrames) do @@ -14,16 +14,16 @@ local CheckForReset = function() end local FadeFramesInOut = function(fade, unit) - if(not SuperVillain) then SuperVillain = SVUI[1] end + if(not CORE) then return end for frame, unit in pairs(frames) do if not UnitExists(unit) then return end if fade then - if frame:GetAlpha() ~= 1 or (frame._secureFade and frame._secureFade.endAlpha == 0) then - SVUI[1]:SecureFadeIn(frame, 0.15) + if(frame:GetAlpha() ~= 1 or (frame._secureFade and frame._secureFade.endAlpha == 0)) then + CORE:SecureFadeIn(frame, 0.15) end else if frame:GetAlpha() ~= 0 then - SVUI[1]:SecureFadeOut(frame, 0.15) + CORE:SecureFadeOut(frame, 0.15) frame._secureFade.finishedFunc = CheckForReset else showStatus = false; @@ -38,13 +38,15 @@ local FadeFramesInOut = function(fade, unit) end local Update = function(self, arg1, arg2) + if(not CORE) then return end if arg1 == "UNIT_HEALTH" and self and self.unit ~= arg2 then return end if type(arg1) == 'boolean' and not frames[self] then return end - if not frames[self] then - if(not SuperVillain) then SuperVillain = SVUI[1] end - SVUI[1]:SecureFadeIn(self, 0.15) - self._secureFade.reset = true + if(not frames[self]) then + if(CORE) then + CORE:SecureFadeIn(self, 0.15) + self._secureFade.reset = true + end return end @@ -71,6 +73,8 @@ local Update = function(self, arg1, arg2) end local Enable = function(self, unit) + if(not CORE) then CORE = SVUI[1] end + if self.CombatFade then frames[self] = self.unit allFrames[self] = self.unit diff --git a/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua b/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua index 086f127..300d4ec 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua @@ -36,8 +36,8 @@ local tonumber = tonumber; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVBar; +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVBar; local _G = getfenv(0); @@ -183,22 +183,22 @@ PACKAGE PLUGIN function MOD:ToggleKeyBindingMode(deactivate, saveRequested) if not deactivate then Binder.active = true; - SuperVillain:StaticPopupSpecial_Show(SVUI_KeyBindPopup) + SV:StaticPopupSpecial_Show(SVUI_KeyBindPopup) MOD:RegisterEvent('PLAYER_REGEN_DISABLED','ToggleKeyBindingMode',true,false) else if saveRequested then SaveBindings(GetCurrentBindingSet()) - SuperVillain:AddonMessage(L["Binding Changes Stored"]) + SV:AddonMessage(L["Binding Changes Stored"]) else LoadBindings(GetCurrentBindingSet()) - SuperVillain:AddonMessage(L["Binding Changes Discarded"]) + SV:AddonMessage(L["Binding Changes Discarded"]) end Binder.active = false; Binder:ClearAllPoints() Binder:Hide() GameTooltip:Hide() MOD:UnregisterEvent("PLAYER_REGEN_DISABLED") - SuperVillain:StaticPopupSpecial_Hide(SVUI_KeyBindPopup) + SV:StaticPopupSpecial_Hide(SVUI_KeyBindPopup) MOD.bindingsChanged = false end end @@ -260,7 +260,7 @@ end local BinderButton_OnEnter = function(self) local parent = self.button:GetParent() if parent and parent._fade then - SuperVillain:SecureFadeIn(parent, 0.2, parent:GetAlpha(), parent._alpha) + SV:SecureFadeIn(parent, 0.2, parent:GetAlpha(), parent._alpha) end end @@ -270,7 +270,7 @@ local BinderButton_OnLeave = function(self) self:Hide() GameTooltip:Hide() if parent and parent._fade then - SuperVillain:SecureFadeOut(parent, 1, parent:GetAlpha(), 0) + SV:SecureFadeOut(parent, 1, parent:GetAlpha(), 0) end end @@ -283,7 +283,7 @@ local Binder_OnBinding = function(self, event) end local prefix = L["All keybindings cleared for |cff00ff00%s|r."] local strMsg = prefix:format(Binder.button.name) - SuperVillain:AddonMessage(strMsg) + SV:AddonMessage(strMsg) RefreshBindings(Binder.button, Binder.spellmacro) if(Binder.spellmacro ~= "MACRO") then GameTooltip:Hide() @@ -313,7 +313,7 @@ local Binder_OnBinding = function(self, event) local glue = L[" |cff00ff00bound to |r"] local addMsg = ("%s%s%s."):format(strBind, glue, Binder.button.name) - SuperVillain:AddonMessage(addMsg) + SV:AddonMessage(addMsg) RefreshBindings(Binder.button, Binder.spellmacro) if Binder.spellmacro ~= "MACRO" then @@ -350,7 +350,7 @@ end local Check_OnClick = function(self) if(MOD.bindingsChanged) then - SuperVillain:StaticPopup_Show("CONFIRM_LOSE_BINDING_CHANGES") + SV:StaticPopup_Show("CONFIRM_LOSE_BINDING_CHANGES") else if SVUI_KeyBindPopupCheckButton:GetChecked() then LoadBindings(2) @@ -407,7 +407,7 @@ end function MOD:LoadKeyBinder() self:RefreshActionBars() - Binder:SetParent(SuperVillain.UIParent) + Binder:SetParent(SV.UIParent) Binder:SetFrameStrata("DIALOG") Binder:SetFrameLevel(99) Binder:EnableMouse(true) diff --git a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua index 83c8647..db6f9bf 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua @@ -33,8 +33,8 @@ local ceil = math.ceil; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; MOD.ButtonCache = {}; --[[ @@ -71,7 +71,7 @@ LOCAL FUNCTIONS local LibAB = LibStub("LibActionButton-1.0"); local function NewActionBar(barName) - local bar = CreateFrame("Frame", barName, SuperVillain.UIParent, "SecureHandlerStateTemplate") + local bar = CreateFrame("Frame", barName, SV.UIParent, "SecureHandlerStateTemplate") bar.buttons = {} bar.conditions = "" bar.config = { @@ -126,13 +126,13 @@ end local Bar_OnEnter = function(self) if(self._fade) then - SuperVillain:SecureFadeIn(self, 0.2, self:GetAlpha(), self._alpha) + SV:SecureFadeIn(self, 0.2, self:GetAlpha(), self._alpha) end end local Bar_OnLeave = function(self) if(self._fade) then - SuperVillain:SecureFadeOut(self, 1, self:GetAlpha(), 0) + SV:SecureFadeOut(self, 1, self:GetAlpha(), 0) end end @@ -165,8 +165,8 @@ end local MicroButton_OnEnter = function(self) if(self._fade) then - SuperVillain:SecureFadeIn(SVUI_MicroBar,0.2,SVUI_MicroBar:GetAlpha(),1) - SuperVillain:SecureFadeOut(SVUI_MicroBar.screenMarker,0.1,SVUI_MicroBar:GetAlpha(),0) + SV:SecureFadeIn(SVUI_MicroBar,0.2,SVUI_MicroBar:GetAlpha(),1) + SV:SecureFadeOut(SVUI_MicroBar.screenMarker,0.1,SVUI_MicroBar:GetAlpha(),0) end if InCombatLockdown()then return end self.overlay:SetPanelColor("highlight") @@ -175,8 +175,8 @@ end local MicroButton_OnLeave = function(self) if(self._fade) then - SuperVillain:SecureFadeOut(SVUI_MicroBar,1,SVUI_MicroBar:GetAlpha(),0) - SuperVillain:SecureFadeIn(SVUI_MicroBar.screenMarker,5,SVUI_MicroBar:GetAlpha(),1) + SV:SecureFadeOut(SVUI_MicroBar,1,SVUI_MicroBar:GetAlpha(),0) + SV:SecureFadeIn(SVUI_MicroBar.screenMarker,5,SVUI_MicroBar:GetAlpha(),1) end if InCombatLockdown()then return end self.overlay:SetPanelColor("special") @@ -262,7 +262,7 @@ local function SaveActionButton(parent) cooldown.SizeOverride = MOD.db.cooldownSize MOD:FixKeybindText(parent) if not MOD.ButtonCache[parent] then - SuperVillain:AddCD(cooldown) + SV:AddCD(cooldown) MOD.ButtonCache[parent] = true end parent:SetSlotTemplate(true, 2, 0, 0) @@ -348,24 +348,24 @@ local function ModifyActionButton(parent) checked:SetTexture(1,1,1,.2) end if flash then - flash:SetTexture("") + flash:SetTexture(0,0,0,0) end if normal then - normal:SetTexture("") + normal:SetTexture(0,0,0,0) normal:Hide() normal:SetAlpha(0) end if parentTex then - parentTex:SetTexture("") + parentTex:SetTexture(0,0,0,0) parentTex:Hide() parentTex:SetAlpha(0) end - if border then border:MUNG()end + if border then border:Die()end if count then count:ClearAllPoints() count:SetPoint("BOTTOMRIGHT",1,1) count:SetShadowOffset(1,-1) - count:SetFontTemplate(SuperVillain.Shared:Fetch("font",MOD.db.countFont),MOD.db.countFontSize,MOD.db.countFontOutline) + count:SetFontTemplate(SV.Shared:Fetch("font",MOD.db.countFont),MOD.db.countFontSize,MOD.db.countFontOutline) end if icon then icon:SetTexCoord(.1,.9,.1,.9) @@ -376,7 +376,7 @@ local function ModifyActionButton(parent) if MOD.db.hotkeytext then hotkey:ClearAllPoints() hotkey:SetAllPoints() - hotkey:SetFontTemplate(SuperVillain.Shared:Fetch("font",MOD.db.font),MOD.db.fontSize,MOD.db.fontOutline) + hotkey:SetFontTemplate(SV.Shared:Fetch("font",MOD.db.font),MOD.db.fontSize,MOD.db.fontOutline) hotkey:SetJustifyH("RIGHT") hotkey:SetJustifyV("TOP") hotkey:SetShadowOffset(1,-1) @@ -397,7 +397,7 @@ do if anchorParent._fade then local alpha = anchorParent._alpha local actual = anchorParent:GetAlpha() - SuperVillain:SecureFadeIn(anchorParent, 0.2, actual, alpha) + SV:SecureFadeIn(anchorParent, 0.2, actual, alpha) end end @@ -408,7 +408,7 @@ do local anchorParent = anchor:GetParent() if anchorParent._fade then local actual = anchorParent:GetAlpha() - SuperVillain:SecureFadeOut(anchorParent, 1, actual, 0) + SV:SecureFadeOut(anchorParent, 1, actual, 0) end end @@ -458,7 +458,7 @@ do function SetSpellFlyoutHook() SpellFlyout:HookScript("OnShow",SpellFlyout_OnShow); - SuperVillain:ExecuteTimer(QualifyFlyouts, 5) + SV:ExecuteTimer(QualifyFlyouts, 5) end end --[[ @@ -572,7 +572,7 @@ function MOD:UpdateBarPagingDefaults() local mainbar = _G["SVUI_ActionBar1"] if(mainbar) then if self.db.Bar1.useCustomPaging then - custom = self.db.Bar1.customPaging[SuperVillain.class]; + custom = self.db.Bar1.customPaging[SV.class]; else custom = "" end @@ -584,11 +584,11 @@ function MOD:UpdateBarPagingDefaults() local id = ("Bar%d"):format(i) local bar = _G["SVUI_Action" .. id] if(bar and self.db[id].useCustomPaging) then - bar.conditions = self.db[id].customPaging[SuperVillain.class]; + bar.conditions = self.db[id].customPaging[SV.class]; end end - if((not SuperVillain.db.SVBar.enable or InCombatLockdown()) or not self.isInitialized) then return end + if((not SV.db.SVBar.enable or InCombatLockdown()) or not self.isInitialized) then return end local Bar2Option = InterfaceOptionsActionBarsPanelBottomRight local Bar3Option = InterfaceOptionsActionBarsPanelBottomLeft local Bar4Option = InterfaceOptionsActionBarsPanelRightTwo @@ -633,7 +633,7 @@ do local Button_OnEnter = function(self) local parent = self:GetParent() if parent and parent._fade then - SuperVillain:SecureFadeIn(parent, 0.2, parent:GetAlpha(), parent._alpha) + SV:SecureFadeIn(parent, 0.2, parent:GetAlpha(), parent._alpha) end end @@ -641,7 +641,7 @@ do local parent = self:GetParent() GameTooltip:Hide() if parent and parent._fade then - SuperVillain:SecureFadeOut(parent, 1, parent:GetAlpha(), 0) + SV:SecureFadeOut(parent, 1, parent:GetAlpha(), 0) end end @@ -732,7 +732,7 @@ do end local function _getPage(bar, defaultPage, condition) - local page = MOD.db[bar].customPaging[SuperVillain.class] + local page = MOD.db[bar].customPaging[SV.class] if not condition then condition = '' end if not page then page = '' end if page then @@ -844,7 +844,7 @@ do bar:Hide() UnregisterStateDriver(bar, "visibility") end - SuperVillain:SetSnapOffset(("SVUI_Action%d_MOVE"):format(id), (space / 2)) + SV:SetSnapOffset(("SVUI_Action%d_MOVE"):format(id), (space / 2)) end end end @@ -962,13 +962,13 @@ CreateActionBars = function(self) thisBar.page = barPageIndex[i] if(i == 1) then - thisBar:Point("BOTTOM", SuperVillain.UIParent, "BOTTOM", 0, 28) + thisBar:Point("BOTTOM", SV.UIParent, "BOTTOM", 0, 28) elseif(i == 2) then thisBar:Point("BOTTOM", _G["SVUI_ActionBar1"], "TOP", 0, 4) elseif(i == 3) then thisBar:Point("BOTTOMLEFT", _G["SVUI_ActionBar1"], "BOTTOMRIGHT", 4, 0) elseif(i == 4) then - thisBar:Point("RIGHT", SuperVillain.UIParent, "RIGHT", -4, 0) + thisBar:Point("RIGHT", SV.UIParent, "RIGHT", -4, 0) elseif(i == 5) then thisBar:Point("BOTTOMRIGHT", _G["SVUI_ActionBar1"], "BOTTOMLEFT", -4, 0) else @@ -1033,7 +1033,7 @@ CreateActionBars = function(self) ]]) self:RefreshBar(barID) - SuperVillain:SetSVMovable(thisBar, L[barID], nil, nil, nil, "ALL, ACTIONBARS") + SV:SetSVMovable(thisBar, L[barID], nil, nil, nil, "ALL, ACTIONBARS") end end @@ -1183,7 +1183,7 @@ do self:RegisterEvent("UPDATE_SHAPESHIFT_FORM", SetStanceBarButtons) self:RegisterEvent("ACTIONBAR_PAGE_CHANGED", SetStanceBarButtons) UpdateShapeshiftForms() - SuperVillain:SetSVMovable(stanceBar, L["Stance Bar"], nil, -3, nil, "ALL, ACTIONBARS") + SV:SetSVMovable(stanceBar, L["Stance Bar"], nil, -3, nil, "ALL, ACTIONBARS") self:RefreshBar("Stance") SetStanceBarButtons() self:UpdateBarBindings(false, true) @@ -1301,7 +1301,7 @@ do self:RegisterEvent("PLAYER_FARSIGHT_FOCUS_CHANGED", RefreshPet) self:RegisterEvent("PET_BAR_UPDATE_COOLDOWN", PetActionBar_UpdateCooldowns) - SuperVillain:SetSVMovable(petBar, L["Pet Bar"], nil, nil, nil, "ALL, ACTIONBARS") + SV:SetSVMovable(petBar, L["Pet Bar"], nil, nil, nil, "ALL, ACTIONBARS") end end @@ -1309,12 +1309,12 @@ CreateMicroBar = function(self) local buttonSize = self.db.Micro.buttonsize or 30; local spacing = self.db.Micro.buttonspacing or 1; local barWidth = (buttonSize + spacing) * 13; - local microBar = NewFrame('Frame','SVUI_MicroBar',SuperVillain.UIParent) + local microBar = NewFrame('Frame','SVUI_MicroBar',SV.UIParent) microBar:Size(barWidth,buttonSize + 6) microBar:SetFrameStrata("HIGH") microBar:SetFrameLevel(0) - microBar:Point('TOP',SuperVillain.UIParent,'TOP',0,4) - SuperVillain:AddToDisplayAudit(microBar) + microBar:Point('TOP',SV.UIParent,'TOP',0,4) + SV:AddToDisplayAudit(microBar) for i=1,13 do local data = ICON_DATA[i] @@ -1323,7 +1323,7 @@ CreateMicroBar = function(self) if(button) then button:SetParent(SVUI_MicroBar) button:Size(buttonSize, buttonSize + 28) - button.Flash:SetTexture("") + button.Flash:SetTexture(0,0,0,0) if button.SetPushedTexture then button:SetPushedTexture("") end @@ -1336,7 +1336,7 @@ CreateMicroBar = function(self) if button.SetHighlightTexture then button:SetHighlightTexture("") end - button:Formula409() + button:RemoveTextures() local buttonMask = NewFrame("Frame",nil,button) buttonMask:SetPoint("TOPLEFT",button,"TOPLEFT",0,-28) @@ -1370,12 +1370,12 @@ CreateMicroBar = function(self) SVUIMicroButtonsParent(microBar) SVUIMicroButton_SetNormal() - SuperVillain:SetSVMovable(microBar, L["Micro Bar"]) + SV:SetSVMovable(microBar, L["Micro Bar"]) RefreshMicrobar() - microBar.screenMarker = NewFrame('Frame',nil,SuperVillain.UIParent) - microBar.screenMarker:Point('TOP',SuperVillain.UIParent,'TOP',0,2) + microBar.screenMarker = NewFrame('Frame',nil,SV.UIParent) + microBar.screenMarker:Point('TOP',SV.UIParent,'TOP',0,2) microBar.screenMarker:Size(20,20) microBar.screenMarker:SetFrameStrata("BACKGROUND") microBar.screenMarker:SetFrameLevel(4) @@ -1388,8 +1388,8 @@ CreateMicroBar = function(self) end local CreateExtraBar = function(self) - local specialBar = CreateFrame("Frame", "SVUI_SpecialAbility", SuperVillain.UIParent) - specialBar:Point("TOP", SuperVillain.UIParent, "CENTER", 0, -50) + local specialBar = CreateFrame("Frame", "SVUI_SpecialAbility", SV.UIParent) + specialBar:Point("TOP", SV.UIParent, "CENTER", 0, -50) specialBar:Size(ExtraActionBarFrame:GetSize()) ExtraActionBarFrame:SetParent(specialBar) ExtraActionBarFrame:ClearAllPoints() @@ -1418,7 +1418,7 @@ local CreateExtraBar = function(self) if HasExtraActionBar()then ExtraActionBarFrame:Show() end - SuperVillain:SetSVMovable(specialBar, L["Boss Button"], nil, nil, nil, "ALL, ACTIONBAR") + SV:SetSVMovable(specialBar, L["Boss Button"], nil, nil, nil, "ALL, ACTIONBAR") end --[[ ########################################################## @@ -1799,4 +1799,4 @@ CONFIGS["SVBar"] = { }, } -SuperVillain.Registry:NewPackage(MOD, "SVBar") \ No newline at end of file +Registry:NewPackage(MOD, "SVBar") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/aura/SVAura.lua b/Interface/AddOns/SVUI/packages/aura/SVAura.lua index 91f5cb7..c05b410 100644 --- a/Interface/AddOns/SVUI/packages/aura/SVAura.lua +++ b/Interface/AddOns/SVUI/packages/aura/SVAura.lua @@ -42,8 +42,8 @@ local tremove, twipe = table.remove, table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; --[[ ########################################################## @@ -157,9 +157,9 @@ do end if(self.timeLeft > AURA_FADE_TIME) then - SuperVillain.Animate:StopFlash(self) + SV.Animate:StopFlash(self) else - SuperVillain.Animate:Flash(self, 1) + SV.Animate:Flash(self, 1) end end @@ -252,7 +252,7 @@ do end aura.Skinned = true end - local font = SuperVillain.Shared:Fetch("font", MOD.db.font) + local font = SV.Shared:Fetch("font", MOD.db.font) aura.texture = aura:CreateTexture(nil, "BORDER") aura.texture:FillInner(aura, 2, 2) aura.texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -265,7 +265,7 @@ do aura.highlight = aura:CreateTexture(nil, "HIGHLIGHT") aura.highlight:SetTexture(0, 0, 0, 0.45) aura.highlight:FillInner() - SuperVillain.Animate:Flash(aura) + SV.Animate:Flash(aura) aura:SetScript("OnAttributeChanged", Aura_OnAttributeChanged) end end @@ -353,7 +353,7 @@ do MOD:RegisterEvent("UNIT_AURA", UpdateConsolidatedReminder) MOD:RegisterEvent("GROUP_ROSTER_UPDATE", UpdateConsolidatedReminder) MOD:RegisterEvent("PLAYER_SPECIALIZATION_CHANGED", UpdateConsolidatedReminder) - SuperVillain.RoleChangedCallback = MOD.Update_ConsolidatedBuffsSettings + SV.RoleChangedCallback = MOD.Update_ConsolidatedBuffsSettings UpdateConsolidatedReminder() else SVUI_ConsolidatedBuffs:Hide() @@ -361,7 +361,7 @@ do MOD:UnregisterEvent("UNIT_AURA") MOD:UnregisterEvent("GROUP_ROSTER_UPDATE") MOD:UnregisterEvent("PLAYER_SPECIALIZATION_CHANGED") - SuperVillain.RoleChangedCallback = SuperVillain.fubar + SV.RoleChangedCallback = SV.fubar end end end @@ -389,7 +389,7 @@ do SVUI_ConsolidatedBuffs:SetAllPoints(SVUI_AurasAnchor) local swapIndex1, swapIndex2, hideIndex1, hideIndex2 if MOD.db.hyperBuffs.filter then - if SuperVillain.ClassRole == 'C' then + if SV.ClassRole == 'C' then swapIndex1 = 4 hideIndex1 = 3 swapIndex2 = 5 @@ -445,7 +445,7 @@ function MOD:UpdateAuraHeader(auraHeader) if(InCombatLockdown() or not auraHeader) then return end local db = MOD.db.debuffs local showBy = db.showBy - local font = SuperVillain.Shared:Fetch("font", MOD.db.font) + local font = SV.Shared:Fetch("font", MOD.db.font) if auraHeader:GetAttribute("filter") == "HELPFUL" then db = MOD.db.buffs; auraHeader:SetAttribute("consolidateTo", MOD.db.hyperBuffs.enable == true and 1 or 0) @@ -523,14 +523,14 @@ end function MOD:Load() CB_HEIGHT = Minimap:GetHeight() CB_WIDTH = (CB_HEIGHT / 5) + 4 - if not SuperVillain.db.SVAura.enable then return end - if SuperVillain.db.SVAura.disableBlizzard then - BuffFrame:MUNG() - ConsolidatedBuffs:MUNG() - TemporaryEnchantFrame:MUNG() + if not SV.db.SVAura.enable then return end + if SV.db.SVAura.disableBlizzard then + BuffFrame:Die() + ConsolidatedBuffs:Die() + TemporaryEnchantFrame:Die() InterfaceOptionsFrameCategoriesButton12:SetScale(0.0001) end - local auras = CreateFrame("Frame", "SVUI_AurasAnchor", SuperVillain.UIParent) + local auras = CreateFrame("Frame", "SVUI_AurasAnchor", SV.UIParent) auras:SetSize(CB_WIDTH, CB_HEIGHT) auras:Point("TOPRIGHT", Minimap, "TOPLEFT", -8, 0) self.BuffFrame = CreateAuraHeader("HELPFUL") @@ -538,7 +538,7 @@ function MOD:Load() self.DebuffFrame = CreateAuraHeader("HARMFUL") self.DebuffFrame:SetPoint( "BOTTOMRIGHT", auras, "BOTTOMLEFT", -8, 0) - SVUI_ConsolidatedBuffs:SetParent(SuperVillain.UIParent) + SVUI_ConsolidatedBuffs:SetParent(SV.UIParent) SVUI_ConsolidatedBuffs:SetAllPoints(auras) for i = 1, NUM_LE_RAID_BUFF_TYPES do @@ -548,7 +548,7 @@ function MOD:Load() self:Update_ConsolidatedBuffsSettings() - SuperVillain:SetSVMovable(auras, L["Auras Frame"]) + SV:SetSVMovable(auras, L["Auras Frame"]) end --[[ ########################################################## @@ -594,4 +594,4 @@ CONFIGS["SVAura"] = { }, } -SuperVillain.Registry:NewPackage(MOD, "SVAura") \ No newline at end of file +Registry:NewPackage(MOD, "SVAura") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index d3c9d59..a4217d3 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -40,10 +40,10 @@ local twipe = table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; -local TTIP = SuperVillain.SVTip; +local TTIP = SV.SVTip; --[[ ########################################################## LOCAL VARS @@ -99,13 +99,13 @@ local function StyleBagToolButton(button) local hover = button:CreateTexture(nil, "HIGHLIGHT") hover:WrapOuter(button, 6, 6) hover:SetTexture(borderTex) - hover:SetGradient(unpack(SuperVillain.Media.gradient.yellow)) + hover:SetGradient(unpack(SV.Media.gradient.yellow)) if button.SetPushedTexture then local pushed = button:CreateTexture(nil, "BORDER") pushed:WrapOuter(button, 6, 6) pushed:SetTexture(borderTex) - pushed:SetGradient(unpack(SuperVillain.Media.gradient.highlight)) + pushed:SetGradient(unpack(SV.Media.gradient.highlight)) button:SetPushedTexture(pushed) end @@ -113,7 +113,7 @@ local function StyleBagToolButton(button) local checked = button:CreateTexture(nil, "BORDER") checked:WrapOuter(button, 6, 6) checked:SetTexture(borderTex) - checked:SetGradient(unpack(SuperVillain.Media.gradient.green)) + checked:SetGradient(unpack(SV.Media.gradient.green)) button:SetCheckedTexture(checked) end @@ -121,7 +121,7 @@ local function StyleBagToolButton(button) local disabled = button:CreateTexture(nil, "BORDER") disabled:WrapOuter(button, 6, 6) disabled:SetTexture(borderTex) - disabled:SetGradient(unpack(SuperVillain.Media.gradient.default)) + disabled:SetGradient(unpack(SV.Media.gradient.default)) button:SetDisabledTexture(disabled) end @@ -208,7 +208,7 @@ end function MOD:DisableBlizzard() BankFrame:UnregisterAllEvents() for h = 1, NUM_CONTAINER_FRAMES do - _G["ContainerFrame"..h]:MUNG() + _G["ContainerFrame"..h]:Die() end end @@ -346,12 +346,12 @@ function MOD:FlushSlotFading(this) end function MOD:Layout(isBank) - if SuperVillain.db.SVBag.enable ~= true then return; end + if SV.db.SVBag.enable ~= true then return; end local f = MOD:GetContainerFrame(isBank); if not f then return; end local buttonSize = isBank and MOD.db.bankSize or MOD.db.bagSize; local buttonSpacing = 8; - local containerWidth = (MOD.db.alignToChat == true and (isBank and (SuperVillain.db.SVDock.dockLeftWidth - 14) or (SuperVillain.db.SVDock.dockRightWidth - 14))) or (isBank and MOD.db.bankWidth) or MOD.db.bagWidth + local containerWidth = (MOD.db.alignToChat == true and (isBank and (SV.db.SVDock.dockLeftWidth - 14) or (SV.db.SVDock.dockRightWidth - 14))) or (isBank and MOD.db.bankWidth) or MOD.db.bagWidth local numContainerColumns = floor(containerWidth / (buttonSize + buttonSpacing)); local holderWidth = ((buttonSize + buttonSpacing) * numContainerColumns) - buttonSpacing; local numContainerRows = 0; @@ -445,7 +445,7 @@ function MOD:Layout(isBank) f.Bags[bagID][slotID].iconTexture:FillInner(f.Bags[bagID][slotID]); f.Bags[bagID][slotID].iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9 ); f.Bags[bagID][slotID].cooldown = _G[f.Bags[bagID][slotID]:GetName().."Cooldown"]; - SuperVillain:AddCD(f.Bags[bagID][slotID].cooldown) + SV:AddCD(f.Bags[bagID][slotID].cooldown) f.Bags[bagID][slotID].bagID = bagID f.Bags[bagID][slotID].slotID = slotID end @@ -505,7 +505,7 @@ end function MOD:VendorGrays(arg1, arg2, arg3) if(not MerchantFrame or not MerchantFrame:IsShown()) and not arg1 and not arg3 then - SuperVillain:AddonMessage(L["You must be at a vendor."]) + SV:AddonMessage(L["You must be at a vendor."]) return end local copper = 0; @@ -550,20 +550,20 @@ function MOD:VendorGrays(arg1, arg2, arg3) elseif not arg2 then strMsg = L["No gray items to delete."] end - SuperVillain:AddonMessage(strMsg) + SV:AddonMessage(strMsg) end function MOD:ModifyBags() local docked = self.db.alignToChat local anchor, x, y if self.BagFrame then - local parent = docked and RightSuperDock or SuperVillain.UIParent + local parent = docked and RightSuperDock or SV.UIParent local anchor, x, y = self.db.bags.point, self.db.bags.xOffset, self.db.bags.yOffset self.BagFrame:ClearAllPoints() self.BagFrame:Point(anchor, parent, anchor, x, y) end if self.BankFrame then - local parent = docked and LeftSuperDock or SuperVillain.UIParent + local parent = docked and LeftSuperDock or SV.UIParent local anchor, x, y = self.db.bank.point, self.db.bank.xOffset, self.db.bank.yOffset self.BankFrame:ClearAllPoints() self.BankFrame:Point(anchor, parent, anchor, x, y) @@ -584,7 +584,7 @@ do local function AlterBagBar(bar) local icon = _G[bar:GetName().."IconTexture"] bar.oldTex = icon:GetTexture() - bar:Formula409() + bar:RemoveTextures() bar:SetFixedPanelTemplate("Default") bar:SetSlotTemplate(false, 1, nil, nil, true) icon:SetTexture(bar.oldTex) @@ -594,7 +594,7 @@ do local function LoadBagBar() if MOD.BagBarLoaded then return end - local bar = NewFrame("Frame", "SVUI_BagBar", SuperVillain.UIParent) + local bar = NewFrame("Frame", "SVUI_BagBar", SV.UIParent) bar:SetPoint("TOPRIGHT", RightSuperDock, "TOPLEFT", -4, 0) bar.buttons = {} bar:SetPanelTemplate() @@ -602,7 +602,7 @@ do bar:SetScript("OnEnter", Bags_OnEnter) bar:SetScript("OnLeave", Bags_OnLeave) MainMenuBarBackpackButton:SetParent(bar) - MainMenuBarBackpackButton.SetParent = SuperVillain.dummy; + MainMenuBarBackpackButton.SetParent = SV.dummy; MainMenuBarBackpackButton:ClearAllPoints() MainMenuBarBackpackButtonCount:SetFontTemplate(nil, 10) MainMenuBarBackpackButtonCount:ClearAllPoints() @@ -616,19 +616,19 @@ do for i = 0, frameCount do local bagSlot = _G["CharacterBag"..i.."Slot"] bagSlot:SetParent(bar) - bagSlot.SetParent = SuperVillain.dummy; + bagSlot.SetParent = SV.dummy; bagSlot:HookScript("OnEnter", Bags_OnEnter) bagSlot:HookScript("OnLeave", Bags_OnLeave) AlterBagBar(bagSlot) count = count + 1 bar.buttons[count] = bagSlot end - SuperVillain:SetSVMovable(bar, L["Bags"]) + SV:SetSVMovable(bar, L["Bags"]) MOD.BagBarLoaded = true end function MOD:ModifyBagBar() - if not SuperVillain.db.SVBag.bagBar.enable then return end + if not SV.db.SVBag.bagBar.enable then return end if not MOD.BagBarLoaded then LoadBagBar() end @@ -691,7 +691,7 @@ do local function UpdateEquipmentInfo(slot, bag, index) if not slot.equipmentinfo then slot.equipmentinfo = slot:CreateFontString(nil,"OVERLAY") - slot.equipmentinfo:SetFontTemplate(SuperVillain.Media.font.roboto, 10, "OUTLINE") + slot.equipmentinfo:SetFontTemplate(SV.Media.font.roboto, 10, "OUTLINE") slot.equipmentinfo:SetAllPoints(slot) slot.equipmentinfo:SetWordWrap(true) slot.equipmentinfo:SetJustifyH('LEFT') @@ -768,7 +768,7 @@ do MOD:Layout(self.isBank) return end - if(SuperVillain.db.SVGear.misc.setoverlay) then + if(SV.db.SVGear.misc.setoverlay) then for i = 1, numSlots do if self.Bags[id] and self.Bags[id][i] then UpdateEquipmentInfo(self.Bags[id][i], id, i) @@ -786,8 +786,8 @@ do local Vendor_OnClick = function(self) if IsShiftKeyDown()then - SuperVillain.SystemAlert["DELETE_GRAYS"].Money = MOD:VendorGrays(false,true,true) - SuperVillain:StaticPopup_Show('DELETE_GRAYS') + SV.SystemAlert["DELETE_GRAYS"].Money = MOD:VendorGrays(false,true,true) + SV:StaticPopup_Show('DELETE_GRAYS') else MOD:VendorGrays() end @@ -816,7 +816,7 @@ do GameTooltip:AddLine(' ') GameTooltip:AddDoubleLine(self.ttText2,self.ttText2desc,1,1,1) end - self:GetNormalTexture():SetGradient(unpack(SuperVillain.Media.gradient.highlight)) + self:GetNormalTexture():SetGradient(unpack(SV.Media.gradient.highlight)) GameTooltip:Show() end @@ -848,7 +848,7 @@ do container = MOD.BagFrame for _,id in ipairs(container.BagIDs) do numSlots = GetContainerNumSlots(id) - if(SuperVillain.db.SVGear.misc.setoverlay) then + if(SV.db.SVGear.misc.setoverlay) then for i=1,numSlots do if container.Bags[id] and container.Bags[id][i] then UpdateEquipmentInfo(container.Bags[id][i], id, i) @@ -867,7 +867,7 @@ do container = MOD.BankFrame for _,id in ipairs(container.BagIDs) do numSlots = GetContainerNumSlots(id) - if(SuperVillain.db.SVGear.misc.setoverlay) then + if(SV.db.SVGear.misc.setoverlay) then for i=1,numSlots do if container.Bags[id] and container.Bags[id][i] then UpdateEquipmentInfo(container.Bags[id][i], id, i) @@ -888,7 +888,7 @@ do local bagName = "SVUI_ContainerFrame" local uisCount = #UISpecialFrames + 1; local bagsCount = #self.BagFrames + 1; - local frame = NewFrame("Button", bagName, SuperVillain.UIParent) + local frame = NewFrame("Button", bagName, SV.UIParent) frame:SetPanelTemplate("Container") frame:SetFrameStrata("HIGH") frame.RefreshSlot = MOD.RefreshSlot; @@ -927,7 +927,7 @@ do frame.ContainerHolder:Hide() frame.goldText = frame:CreateFontString(nil, "OVERLAY") - frame.goldText:SetFontTemplate(SuperVillain.Media.font.numbers) + frame.goldText:SetFontTemplate(SV.Media.font.numbers) frame.goldText:Point("BOTTOMRIGHT", frame.holderFrame, "TOPRIGHT", -2, 4) frame.goldText:SetJustifyH("RIGHT") frame.editBox = NewFrame("EditBox", bagName.."EditBox", frame) @@ -946,7 +946,7 @@ do frame.editBox:SetScript("OnChar", Search_OnInput) frame.editBox.SearchReset = Search_OnKeyPressed frame.editBox:SetText(SEARCH) - frame.editBox:SetFontTemplate(SuperVillain.Media.font.roboto) + frame.editBox:SetFontTemplate(SV.Media.font.roboto) local searchButton = NewFrame("Button", nil, frame) searchButton:RegisterForClicks("LeftButtonUp", "RightButtonUp") @@ -955,7 +955,7 @@ do searchButton:SetButtonTemplate() searchButton:SetScript("OnClick", Search_OnClick) local searchText = searchButton:CreateFontString(nil, "OVERLAY") - searchText:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + searchText:SetFont(SV.Media.font.roboto, 12, "NONE") searchText:SetAllPoints(searchButton) searchText:SetJustifyH("CENTER") searchText:SetText("|cff9999ff"..SEARCH.."|r") @@ -1034,7 +1034,7 @@ do frame.currencyButton[h].icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) frame.currencyButton[h].text = frame.currencyButton[h]:CreateFontString(nil, "OVERLAY") frame.currencyButton[h].text:Point("LEFT", frame.currencyButton[h], "RIGHT", 2, 0) - frame.currencyButton[h].text:SetFontTemplate(SuperVillain.Media.font.numbers, 18, "NONE") + frame.currencyButton[h].text:SetFontTemplate(SV.Media.font.numbers, 18, "NONE") frame.currencyButton[h]:SetScript("OnEnter", Token_OnEnter) frame.currencyButton[h]:SetScript("OnLeave", Token_OnLeave) frame.currencyButton[h]:SetScript("OnClick", Token_OnClick) @@ -1052,7 +1052,7 @@ do local bagName = "SVUI_BankContainerFrame" local uisCount = #UISpecialFrames + 1; local bagsCount = #self.BagFrames + 1; - local frame = NewFrame("Button", bagName, SuperVillain.UIParent) + local frame = NewFrame("Button", bagName, SV.UIParent) frame:SetPanelTemplate("Container") frame:SetFrameStrata("HIGH") frame.RefreshSlot = MOD.RefreshSlot; @@ -1136,7 +1136,7 @@ do if numSlots >= 1 then ToggleFrame(frame.ContainerHolder) else - SuperVillain:StaticPopup_Show("NO_BANK_BAGS") + SV:StaticPopup_Show("NO_BANK_BAGS") end end frame.bagsButton:SetScript("OnClick", BagBtn_OnClick) @@ -1153,9 +1153,9 @@ do local PurchaseBtn_OnClick = function() local _, full = GetNumBankSlots() if not full then - SuperVillain:StaticPopup_Show("BUY_BANK_SLOT") + SV:StaticPopup_Show("BUY_BANK_SLOT") else - SuperVillain:StaticPopup_Show("CANNOT_BUY_BANK_SLOT") + SV:StaticPopup_Show("CANNOT_BUY_BANK_SLOT") end end frame.purchaseBagButton:SetScript("OnClick", PurchaseBtn_OnClick) @@ -1302,7 +1302,7 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:ReLoad() - if not SuperVillain.db.SVBag.enable then return end + if not SV.db.SVBag.enable then return end self:Layout(); self:Layout(true); self:ModifyBags(); @@ -1313,16 +1313,16 @@ function MOD:Load() if IsAddOnLoaded("AdiBags") then return end - if not SuperVillain.db.SVBag.enable then return end + if not SV.db.SVBag.enable then return end self:ModifyBagBar() - SuperVillain.bags = self; + SV.bags = self; self.BagFrames = {} self:MakeBags() SetBagHooks() self:ModifyBags() self:Layout(false) self:DisableBlizzard() - SuperVillain:ExecuteTimer(MOD.BreakStuffLoader, 5) + SV:ExecuteTimer(MOD.BreakStuffLoader, 5) self:RegisterEvent("INVENTORY_SEARCH_UPDATE") self:RegisterEvent("PLAYER_MONEY", "UpdateGoldText") self:RegisterEvent("PLAYER_ENTERING_WORLD") @@ -1374,4 +1374,4 @@ CONFIGS["SVBag"] = { }, } -SuperVillain.Registry:NewPackage(MOD, "SVBag"); \ No newline at end of file +Registry:NewPackage(MOD, "SVBag"); \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua b/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua index b6335e9..d32f201 100644 --- a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua +++ b/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua @@ -32,9 +32,9 @@ local tremove, tcopy, twipe, tsort, tcat = table.remove, table.copy, table.wipe, GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVBag; -local TTIP = SuperVillain.SVTip; +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVBag; +local TTIP = SV.SVTip; --[[ ########################################################## LOCAL VARS @@ -187,7 +187,7 @@ local BreakStuff_OnEnter = function(self) end if BreakStuffHandler.ReadyToSmash ~= true then self:SetPanelColor("class") - self.icon:SetGradient(unpack(SuperVillain.Media.gradient.highlight)) + self.icon:SetGradient(unpack(SV.Media.gradient.highlight)) end GameTooltip:Show() end @@ -212,7 +212,7 @@ local BreakStuff_OnClick = function(self) BreakStuffHandler.ReadyToSmash = true self.ttText = "BreakStuff : ON"; self:SetPanelColor("green") - self.icon:SetGradient(unpack(SuperVillain.Media.gradient.green)) + self.icon:SetGradient(unpack(SV.Media.gradient.green)) if(not MOD.BagFrame:IsShown()) then GameTooltip:Hide() MOD.BagFrame:Show() diff --git a/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua b/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua index 4cd636e..bfebcc7 100644 --- a/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua +++ b/Interface/AddOns/SVUI/packages/bag/tools/sorting.lua @@ -42,8 +42,8 @@ local tremove, tcopy, twipe, tsort = table.remove, table.copy, table.wipe, table GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVBag; +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVBag; --[[ ########################################################## LOCAL VARS diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua index a1ce2d1..0bec632 100644 --- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua +++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua @@ -34,8 +34,8 @@ local twipe = table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; --[[ ########################################################## @@ -268,7 +268,7 @@ do end local blockFlag = false local msg = author:upper() .. message; - if(author ~= UnitName("player") and msg ~= nil and (event == "CHAT_MSG_YELL" or event == "CHAT_MSG_CHANNEL")) then + if(author ~= UnitName("player") and msg ~= nil and (event == "CHAT_MSG_YELL")) then if THROTTLE_CACHE[msg] and CHAT_THROTTLE ~= 0 then if difftime(time(), THROTTLE_CACHE[msg]) <= CHAT_THROTTLE then blockFlag = true @@ -293,7 +293,7 @@ do chat.AddMessage = AddModifiedMessage end end - ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", ChatEventFilter) + --ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", ChatEventFilter) ChatFrame_AddMessageEventFilter("CHAT_MSG_YELL", ChatEventFilter) ChatFrame_AddMessageEventFilter("CHAT_MSG_SAY", ChatEventFilter) ChatFrame_AddMessageEventFilter("CHAT_MSG_WHISPER_INFORM", ChatEventFilter) @@ -382,11 +382,11 @@ do FCF_Tab_OnClick(self,button); local chatFrame = _G[("ChatFrame%d"):format(self:GetID())]; if(chatFrame:AtBottom() and ScrollIndicator:IsShown()) then - SuperVillain.Animate:StopFlash(ScrollIndicator) + SV.Animate:StopFlash(ScrollIndicator) ScrollIndicator:Hide() elseif(not chatFrame:AtBottom() and not ScrollIndicator:IsShown()) then ScrollIndicator:Show() - SuperVillain.Animate:Flash(ScrollIndicator,1,true) + SV.Animate:Flash(ScrollIndicator,1,true) end if ( chatFrame.isDocked and FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK) ~= chatFrame ) then self.IsOpen = true @@ -530,13 +530,13 @@ do tab.icon:SetAlpha(0.5) tab.TText = tabText; - --tab.SetWidth = SuperVillain.fubar - tab.SetHeight = SuperVillain.fubar - tab.SetSize = SuperVillain.fubar - tab.SetParent = SuperVillain.fubar - tab.ClearAllPoints = SuperVillain.fubar - tab.SetAllPoints = SuperVillain.fubar - tab.SetPoint = SuperVillain.fubar + --tab.SetWidth = SV.fubar + tab.SetHeight = SV.fubar + tab.SetSize = SV.fubar + tab.SetParent = SV.fubar + tab.ClearAllPoints = SV.fubar + tab.SetAllPoints = SV.fubar + tab.SetPoint = SV.fubar tab:SetScript("OnEnter", Tab_OnEnter); tab:SetScript("OnLeave", Tab_OnLeave); @@ -575,18 +575,18 @@ do chat:SetFrameLevel(4) chat:SetClampRectInsets(0, 0, 0, 0) chat:SetClampedToScreen(false) - chat:Formula409(true) - _G[chatName.."ButtonFrame"]:MUNG() + chat:RemoveTextures(true) + _G[chatName.."ButtonFrame"]:Die() ------------------------------------------- - _G[tabName .."Left"]:SetTexture("") - _G[tabName .."Middle"]:SetTexture("") - _G[tabName .."Right"]:SetTexture("") - _G[tabName .."SelectedLeft"]:SetTexture("") - _G[tabName .."SelectedMiddle"]:SetTexture("") - _G[tabName .."SelectedRight"]:SetTexture("") - _G[tabName .."HighlightLeft"]:SetTexture("") - _G[tabName .."HighlightMiddle"]:SetTexture("") - _G[tabName .."HighlightRight"]:SetTexture("") + _G[tabName .."Left"]:SetTexture(0,0,0,0) + _G[tabName .."Middle"]:SetTexture(0,0,0,0) + _G[tabName .."Right"]:SetTexture(0,0,0,0) + _G[tabName .."SelectedLeft"]:SetTexture(0,0,0,0) + _G[tabName .."SelectedMiddle"]:SetTexture(0,0,0,0) + _G[tabName .."SelectedRight"]:SetTexture(0,0,0,0) + _G[tabName .."HighlightLeft"]:SetTexture(0,0,0,0) + _G[tabName .."HighlightMiddle"]:SetTexture(0,0,0,0) + _G[tabName .."HighlightRight"]:SetTexture(0,0,0,0) tab.text = _G[chatName.."TabText"] tab.text:SetTextColor(1, 1, 1) @@ -606,16 +606,16 @@ do else tab:SetHeight(TAB_HEIGHT) tab:SetWidth(TAB_WIDTH) - tab.SetWidth = SuperVillain.fubar; + tab.SetWidth = SV.fubar; end ------------------------------------------- local ebPoint1, ebPoint2, ebPoint3 = select(6, editBox:GetRegions()) - ebPoint1:MUNG() - ebPoint2:MUNG() - ebPoint3:MUNG() - _G[editBoxName.."FocusLeft"]:MUNG() - _G[editBoxName.."FocusMid"]:MUNG() - _G[editBoxName.."FocusRight"]:MUNG() + ebPoint1:Die() + ebPoint2:Die() + ebPoint3:Die() + _G[editBoxName.."FocusLeft"]:Die() + _G[editBoxName.."FocusMid"]:Die() + _G[editBoxName.."FocusRight"]:Die() editBox:SetFixedPanelTemplate("Button", true) editBox:SetAltArrowKeyMode(false) editBox:SetAllPoints(SuperDockAlertLeft) @@ -663,7 +663,7 @@ do end function MOD:RefreshChatFrames(forced) - if (not SuperVillain.db.SVChat.enable) then return; end + if (not SV.db.SVChat.enable) then return; end if ((not forced) and refreshLocked and (IsMouseButtonDown("LeftButton") or InCombatLockdown())) then return; end for i,name in pairs(CHAT_FRAMES)do @@ -752,11 +752,11 @@ do end end if(self:AtBottom() and ScrollIndicator:IsShown()) then - SuperVillain.Animate:StopFlash(ScrollIndicator) + SV.Animate:StopFlash(ScrollIndicator) ScrollIndicator:Hide() elseif(not self:AtBottom() and not ScrollIndicator:IsShown()) then ScrollIndicator:Show() - SuperVillain.Animate:Flash(ScrollIndicator,1,true) + SV.Animate:Flash(ScrollIndicator,1,true) end end @@ -824,11 +824,11 @@ do ActiveHyperLink = false; end if(self:AtBottom() and ScrollIndicator:IsShown()) then - SuperVillain.Animate:StopFlash(ScrollIndicator) + SV.Animate:StopFlash(ScrollIndicator) ScrollIndicator:Hide() elseif(not self:AtBottom() and not ScrollIndicator:IsShown()) then ScrollIndicator:Show() - SuperVillain.Animate:Flash(ScrollIndicator,1,true) + SV.Animate:Flash(ScrollIndicator,1,true) end end @@ -863,12 +863,12 @@ do local _hook_FCFStartAlertFlash = function(self) if(not self.WhisperAlert) then return end self.WhisperAlert:Show() - SuperVillain.Animate:Flash(self.WhisperAlert,1,true) + SV.Animate:Flash(self.WhisperAlert,1,true) end local _hook_FCFStopAlertFlash = function(self) if(not self.WhisperAlert) then return end - SuperVillain.Animate:StopFlash(self.WhisperAlert) + SV.Animate:StopFlash(self.WhisperAlert) self.WhisperAlert:Hide() end @@ -901,23 +901,23 @@ do end function MOD:UpdateLocals() - CHAT_WIDTH = (SuperVillain.db.SVDock.dockLeftWidth or 350) - 10; - CHAT_HEIGHT = (SuperVillain.db.SVDock.dockLeftHeight or 180) - 15; + CHAT_WIDTH = (SV.db.SVDock.dockLeftWidth or 350) - 10; + CHAT_HEIGHT = (SV.db.SVDock.dockLeftHeight or 180) - 15; CHAT_THROTTLE = self.db.throttleInterval; CHAT_ALLOW_URL = self.db.url; CHAT_HOVER_URL = self.db.hyperlinkHover; CHAT_STICKY = self.db.sticky; - CHAT_FONT = SuperVillain.Shared:Fetch("font", self.db.font); - CHAT_FONTSIZE = SuperVillain.db.media.fonts.size or 12; + CHAT_FONT = SV.Shared:Fetch("font", self.db.font); + CHAT_FONTSIZE = SV.db.media.fonts.size or 12; CHAT_FONTOUTLINE = self.db.fontOutline; TAB_WIDTH = self.db.tabWidth; TAB_HEIGHT = self.db.tabHeight; TAB_SKINS = self.db.tabStyled; - TAB_FONT = SuperVillain.Shared:Fetch("font", self.db.tabFont); + TAB_FONT = SV.Shared:Fetch("font", self.db.tabFont); TAB_FONTSIZE = self.db.tabFontSize; TAB_FONTOUTLINE = self.db.tabFontOutline; CHAT_FADING = self.db.fade; - CHAT_PSST = SuperVillain.Shared:Fetch("sound", self.db.psst); + CHAT_PSST = SV.Shared:Fetch("sound", self.db.psst); TIME_STAMP_MASK = self.db.timeStampFormat; if(CHAT_THROTTLE and CHAT_THROTTLE == 0) then twipe(THROTTLE_CACHE) @@ -925,12 +925,12 @@ function MOD:UpdateLocals() end function MOD:ReLoad() - if(not SuperVillain.db.SVChat.enable) then return end + if(not SV.db.SVChat.enable) then return end self:RefreshChatFrames(true) end function MOD:Load() - if(not SuperVillain.db.SVChat.enable) then return end + if(not SV.db.SVChat.enable) then return end ScrollIndicator:SetParent(SuperDockWindowLeft) ScrollIndicator:SetSize(20,20) @@ -955,8 +955,8 @@ function MOD:Load() _G.GeneralDockManagerOverflowButtonList:SetFixedPanelTemplate('Transparent') _G.GeneralDockManager:SetAllPoints(SuperDockChatTabBar) SetAllChatHooks() - FriendsMicroButton:MUNG() - ChatFrameMenuButton:MUNG() + FriendsMicroButton:Die() + ChatFrameMenuButton:Die() _G.InterfaceOptionsSocialPanelTimestampsButton:SetAlpha(0) _G.InterfaceOptionsSocialPanelTimestampsButton:SetScale(0.000001) _G.InterfaceOptionsSocialPanelTimestamps:SetAlpha(0) @@ -995,4 +995,4 @@ CONFIGS["SVChat"] = { ["basicTools"] = true, } -SuperVillain.Registry:NewPackage(MOD, "SVChat") \ No newline at end of file +Registry:NewPackage(MOD, "SVChat") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua index 282815b..29d2e5a 100644 --- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua +++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua @@ -33,8 +33,8 @@ local format, gsub, strfind, strmatch, tonumber = format, gsub, strfind, strmatc GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD, DOCKLET_CACHE, TOOL_CACHE, SAFETY_CACHE = {}, {}, {}, {}; local PREV_TOOL, DEFAULT_DOCKLET; --[[ @@ -115,12 +115,12 @@ local ToggleDocks = function(self) GameTooltip:Hide() if MOD.SuperDockFaded then MOD.SuperDockFaded = nil; - SuperVillain:SecureFadeIn(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 1) - SuperVillain:SecureFadeIn(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 1) + SV:SecureFadeIn(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 1) + SV:SecureFadeIn(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 1) else MOD.SuperDockFaded = true; - SuperVillain:SecureFadeOut(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 0, true) - SuperVillain:SecureFadeOut(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 0, true) + SV:SecureFadeOut(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 0, true) + SV:SecureFadeOut(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 0, true) end SVUI_Cache["Dock"].SuperDockFaded = MOD.SuperDockFaded end @@ -142,7 +142,7 @@ local DockletButton_SaveColors = function(self, pG, iG, locked) self._iconGradient = iG self._colorLocked = locked self:SetPanelColor(pG) - self.icon:SetGradient(unpack(SuperVillain.Media.gradient[iG])) + self.icon:SetGradient(unpack(SV.Media.gradient[iG])) end local DockButtonActivate = function(self) @@ -158,13 +158,13 @@ end local DockletButton_OnEnter = function(self, ...) if MOD.SuperDockFaded then LeftSuperDock:Show() - SuperVillain:SecureFadeIn(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 1) + SV:SecureFadeIn(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 1) RightSuperDock:Show() - SuperVillain:SecureFadeIn(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 1) + SV:SecureFadeIn(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 1) end self:SetPanelColor("highlight") - self.icon:SetGradient(unpack(SuperVillain.Media.gradient.bizzaro)) + self.icon:SetGradient(unpack(SV.Media.gradient.bizzaro)) GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) GameTooltip:ClearLines() @@ -178,12 +178,12 @@ end local DockletButton_OnLeave = function(self, ...) if MOD.SuperDockFaded then - SuperVillain:SecureFadeOut(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 0, true) - SuperVillain:SecureFadeOut(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 0, true) + SV:SecureFadeOut(LeftSuperDock, 0.2, LeftSuperDock:GetAlpha(), 0, true) + SV:SecureFadeOut(RightSuperDock, 0.2, RightSuperDock:GetAlpha(), 0, true) end self:SetPanelColor(self._panelGradient) - self.icon:SetGradient(unpack(SuperVillain.Media.gradient[self._iconGradient])) + self.icon:SetGradient(unpack(SV.Media.gradient[self._iconGradient])) GameTooltip:Hide() end @@ -292,7 +292,7 @@ local function SetSuperDockStyle(dock) backdrop.bottom:Point("BOTTOMRIGHT", -1, 1) backdrop.bottom:Height(4) backdrop.top = backdrop:CreateTexture(nil, "OVERLAY") - backdrop.top:SetTexture("") + backdrop.top:SetTexture(0,0,0,0) backdrop.top:Point("TOPLEFT", 1, -1) backdrop.top:Point("TOPRIGHT", -1, 1) backdrop.top:SetAlpha(0) @@ -300,7 +300,7 @@ local function SetSuperDockStyle(dock) return backdrop end -SuperVillain.CycleDocklets = CycleDocklets +SV.CycleDocklets = CycleDocklets --[[ ########################################################## CORE FUNCTIONS @@ -349,7 +349,7 @@ function MOD:CreateBasicToolButton(name,texture,onclick,frameName,isdefault) local clickFunction = (type(onclick)=="function") and onclick or DockletButton_OnClick; local size = SuperDockToolBarRight.currentSize; local button = _G[fName .. "_ToolBarButton"] or CreateFrame("Button", ("%s_ToolBarButton"):format(fName), SuperDockToolBarRight) - SuperVillain.AddTool(button) + SV.AddTool(button) button:Size(size,size) button:SetFramedButtonTemplate() button.icon = button:CreateTexture(nil,"OVERLAY") @@ -372,9 +372,9 @@ DOCKS function MOD:CreateSuperBorders() local texture = [[Interface\AddOns\SVUI\assets\artwork\Template\BUTTON]]; - local TopPanel = CreateFrame("Frame", "SVUITopPanel", SuperVillain.UIParent) - TopPanel:Point("TOPLEFT", SuperVillain.UIParent, "TOPLEFT", -1, 1) - TopPanel:Point("TOPRIGHT", SuperVillain.UIParent, "TOPRIGHT", 1, 1) + local TopPanel = CreateFrame("Frame", "SVUITopPanel", SV.UIParent) + TopPanel:Point("TOPLEFT", SV.UIParent, "TOPLEFT", -1, 1) + TopPanel:Point("TOPRIGHT", SV.UIParent, "TOPRIGHT", 1, 1) TopPanel:Height(14) TopPanel:SetBackdrop({ bgFile = texture, @@ -384,7 +384,7 @@ function MOD:CreateSuperBorders() edgeSize = 1, insets = {left = 0, right = 0, top = 0, bottom = 0} }) - TopPanel:SetBackdropColor(unpack(SuperVillain.Media.color.special)) + TopPanel:SetBackdropColor(unpack(SV.Media.color.special)) TopPanel:SetBackdropBorderColor(0,0,0,1) TopPanel:SetFrameLevel(0) TopPanel:SetFrameStrata('BACKGROUND') @@ -395,9 +395,9 @@ function MOD:CreateSuperBorders() end) self:TopPanelVisibility() - local BottomPanel = CreateFrame("Frame", "SVUIBottomPanel", SuperVillain.UIParent) - BottomPanel:Point("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOMLEFT", -1, -1) - BottomPanel:Point("BOTTOMRIGHT", SuperVillain.UIParent, "BOTTOMRIGHT", 1, -1) + local BottomPanel = CreateFrame("Frame", "SVUIBottomPanel", SV.UIParent) + BottomPanel:Point("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", -1, -1) + BottomPanel:Point("BOTTOMRIGHT", SV.UIParent, "BOTTOMRIGHT", 1, -1) BottomPanel:Height(14) BottomPanel:SetBackdrop({ bgFile = texture, @@ -407,7 +407,7 @@ function MOD:CreateSuperBorders() edgeSize = 1, insets = {left = 0, right = 0, top = 0, bottom = 0} }) - BottomPanel:SetBackdropColor(unpack(SuperVillain.Media.color.special)) + BottomPanel:SetBackdropColor(unpack(SV.Media.color.special)) BottomPanel:SetBackdropBorderColor(0,0,0,1) BottomPanel:SetFrameLevel(0) BottomPanel:SetFrameStrata('BACKGROUND') @@ -420,13 +420,13 @@ function MOD:CreateSuperBorders() end local function BorderColorUpdates() - SVUITopPanel:SetBackdropColor(unpack(SuperVillain.Media.color.special)) + SVUITopPanel:SetBackdropColor(unpack(SV.Media.color.special)) SVUITopPanel:SetBackdropBorderColor(0,0,0,1) - SVUIBottomPanel:SetBackdropColor(unpack(SuperVillain.Media.color.special)) + SVUIBottomPanel:SetBackdropColor(unpack(SV.Media.color.special)) SVUIBottomPanel:SetBackdropBorderColor(0,0,0,1) end -SuperVillain.Registry:NewCallback(BorderColorUpdates) +Registry:NewCallback(BorderColorUpdates) function MOD:CreateDockPanels() self.SuperDockFaded = SVUI_Cache["Dock"].SuperDockFaded @@ -438,12 +438,12 @@ function MOD:CreateDockPanels() local buttonsize = self.db.buttonSize or 22; local spacing = self.db.buttonSpacing or 4; local statBarWidth = self.db.dockStatWidth - local STATS = SuperVillain.SVStats; + local STATS = SV.SVStats; -- [[ CORNER BUTTON ]] -- - local leftbutton = CreateFrame("Button", "LeftSuperDockToggleButton", SuperVillain.UIParent) - leftbutton:Point("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOMLEFT", 1, 2) + local leftbutton = CreateFrame("Button", "LeftSuperDockToggleButton", SV.UIParent) + leftbutton:Point("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", 1, 2) leftbutton:Size(buttonsize, buttonsize) leftbutton:SetFramedButtonTemplate() leftbutton.icon = leftbutton:CreateTexture(nil, "OVERLAY", nil, 0) @@ -454,24 +454,24 @@ function MOD:CreateDockPanels() MOD:ActivateDockletButton(leftbutton, ToggleDocks) -- [[ TOOLBARS AND OTHER NONSENSE ]] -- - local toolbarLeft = CreateFrame("Frame", "SuperDockToolBarLeft", SuperVillain.UIParent) + local toolbarLeft = CreateFrame("Frame", "SuperDockToolBarLeft", SV.UIParent) toolbarLeft:Point("LEFT", leftbutton, "RIGHT", spacing, 0) toolbarLeft:Width(1) toolbarLeft:Height(buttonsize) toolbarLeft.currentSize = buttonsize; - local leftstation = CreateFrame("Frame", "SuperDockChatTabBar", SuperVillain.UIParent) + local leftstation = CreateFrame("Frame", "SuperDockChatTabBar", SV.UIParent) leftstation:SetFrameStrata("BACKGROUND") leftstation:Size(leftWidth - buttonsize, buttonsize) leftstation:Point("LEFT", toolbarLeft, "RIGHT", spacing, 0) leftstation:SetFrameLevel(leftstation:GetFrameLevel() + 2) leftstation.currentSize = buttonsize; - local leftdock = CreateFrame("Frame", "LeftSuperDock", SuperVillain.UIParent) + local leftdock = CreateFrame("Frame", "LeftSuperDock", SV.UIParent) leftdock:SetFrameStrata("BACKGROUND") - leftdock:Point("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOMLEFT", 1, buttonsize + 10) + leftdock:Point("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", 1, buttonsize + 10) leftdock:Size(leftWidth, leftHeight) - SuperVillain:SetSVMovable(leftdock, L["Left Dock"]) + SV:SetSVMovable(leftdock, L["Left Dock"]) leftalert:SetParent(leftdock) leftalert:SetFrameStrata("BACKGROUND") @@ -489,8 +489,8 @@ function MOD:CreateDockPanels() -- [[ CORNER BUTTON ]] -- - local rightbutton = CreateFrame("Button", "RightSuperDockToggleButton", SuperVillain.UIParent) - rightbutton:Point("BOTTOMRIGHT", SuperVillain.UIParent, "BOTTOMRIGHT", -1, 2) + local rightbutton = CreateFrame("Button", "RightSuperDockToggleButton", SV.UIParent) + rightbutton:Point("BOTTOMRIGHT", SV.UIParent, "BOTTOMRIGHT", -1, 2) rightbutton:Size(buttonsize, buttonsize) rightbutton:SetFramedButtonTemplate() rightbutton.icon = rightbutton:CreateTexture(nil, "OVERLAY") @@ -498,24 +498,24 @@ function MOD:CreateDockPanels() rightbutton.icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-HENCHMAN]]) rightbutton.TText = "Call Henchman!" rightbutton:RegisterForClicks("AnyUp") - MOD:ActivateDockletButton(rightbutton, SuperVillain.ToggleHenchman) + MOD:ActivateDockletButton(rightbutton, SV.ToggleHenchman) -- [[ TOOLBARS AND OTHER NONSENSE ]] -- - local toolbarRight = CreateFrame("Frame", "SuperDockToolBarRight", SuperVillain.UIParent) + local toolbarRight = CreateFrame("Frame", "SuperDockToolBarRight", SV.UIParent) toolbarRight:Point("RIGHT", rightbutton, "LEFT", -spacing, 0) toolbarRight:Size(1, buttonsize) toolbarRight.currentSize = buttonsize; - local macrobar = CreateFrame("Frame", "SuperDockMacroBar", SuperVillain.UIParent) + local macrobar = CreateFrame("Frame", "SuperDockMacroBar", SV.UIParent) macrobar:Point("RIGHT", toolbarRight, "LEFT", -spacing, 0) macrobar:Size(1, buttonsize) macrobar.currentSize = buttonsize; - local rightdock = CreateFrame("Frame", "RightSuperDock", SuperVillain.UIParent) + local rightdock = CreateFrame("Frame", "RightSuperDock", SV.UIParent) rightdock:SetFrameStrata("BACKGROUND") - rightdock:Point("BOTTOMRIGHT", SuperVillain.UIParent, "BOTTOMRIGHT", -1, buttonsize + 10) + rightdock:Point("BOTTOMRIGHT", SV.UIParent, "BOTTOMRIGHT", -1, buttonsize + 10) rightdock:Size(rightWidth, rightHeight) - SuperVillain:SetSVMovable(rightdock, L["Right Dock"]) + SV:SetSVMovable(rightdock, L["Right Dock"]) rightalert:SetParent(rightdock) rightalert:SetFrameStrata("BACKGROUND") @@ -533,17 +533,17 @@ function MOD:CreateDockPanels() if MOD.SuperDockFaded then LeftSuperDock:Hide()RightSuperDock:Hide() end - local toolbarTop = CreateFrame("Frame", "SuperDockToolBarTop", SuperVillain.UIParent) - toolbarTop:Point("TOPLEFT", SuperVillain.UIParent, "TOPLEFT", 2, -4) + local toolbarTop = CreateFrame("Frame", "SuperDockToolBarTop", SV.UIParent) + toolbarTop:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 2, -4) toolbarTop:Size(1, buttonsize - 12) toolbarTop.openWidth = (leftWidth - 1) / 3; --TOP STAT HOLDERS local topWidth = (leftWidth + rightWidth) * 0.8 - local topanchor = CreateFrame("Frame", "SuperDockTopDataAnchor", SuperVillain.UIParent) + local topanchor = CreateFrame("Frame", "SuperDockTopDataAnchor", SV.UIParent) topanchor:Size(topWidth - 2, buttonsize - 8) topanchor:Point("LEFT", toolbarTop, "RIGHT", spacing, 0) - SuperVillain:AddToDisplayAudit(topanchor) + SV:AddToDisplayAudit(topanchor) local topleftdata = CreateFrame("Frame", "TopLeftDataPanel", topanchor) topleftdata:Size((topWidth * 0.5) - 1, buttonsize - 8) @@ -556,10 +556,10 @@ function MOD:CreateDockPanels() STATS:NewAnchor(toprightdata, 3, "ANCHOR_CURSOR", true) --BOTTOM STAT HOLDERS - local bottomanchor = CreateFrame("Frame", "SuperDockBottomDataAnchor", SuperVillain.UIParent) + local bottomanchor = CreateFrame("Frame", "SuperDockBottomDataAnchor", SV.UIParent) bottomanchor:Size(statBarWidth - 2, buttonsize - 8) - bottomanchor:Point("BOTTOM", SuperVillain.UIParent, "BOTTOM", 0, 2) - --SuperVillain:AddToDisplayAudit(bottomanchor) + bottomanchor:Point("BOTTOM", SV.UIParent, "BOTTOM", 0, 2) + --SV:AddToDisplayAudit(bottomanchor) local bottomleftdata = CreateFrame("Frame", "BottomLeftDataPanel", bottomanchor) bottomleftdata:Size((statBarWidth * 0.5) - 1, buttonsize - 8) @@ -744,8 +744,8 @@ end EXTERNALLY ACCESSIBLE METHODS ########################################################## ]]-- -SuperVillain.CurrentlyDocked = {}; -function SuperVillain:IsDockletReady(arg) +SV.CurrentlyDocked = {}; +function SV:IsDockletReady(arg) local addon = arg; if arg == "DockletMain" or arg == "DockletExtra" then addon = MOD.db.docklets[arg] @@ -757,7 +757,7 @@ function SuperVillain:IsDockletReady(arg) return true end -function SuperVillain:RemoveTool() +function SV:RemoveTool() if not self or not self.listIndex then return end local name = self:GetName(); if not SAFETY_CACHE[name] then return end @@ -772,7 +772,7 @@ function SuperVillain:RemoveTool() self:Hide() end -function SuperVillain:AddTool() +function SV:AddTool() local name = self:GetName(); if SAFETY_CACHE[name] then return end SAFETY_CACHE[name] = true; @@ -801,19 +801,19 @@ do local function UnregisterDocklets() local frame, i; - twipe(SuperVillain.CurrentlyDocked); - if SuperVillain:IsDockletReady("DockletMain") then + twipe(SV.CurrentlyDocked); + if SV:IsDockletReady("DockletMain") then frame = MOD.db.docklets.MainWindow if frame ~= nil and frame ~= "None" and _G[frame] then UnregisterDocklet(frame) MOD.db.docklets.MainWindow = "None" end elseif AddOnButton.IsRegistered then - SuperVillain.RemoveTool(AddOnButton) + SV.RemoveTool(AddOnButton) AddOnButton.TText = ""; AddOnButton.IsRegistered = false; end - if SuperVillain:IsDockletReady("DockletExtra") then + if SV:IsDockletReady("DockletExtra") then frame = MOD.db.docklets.ExtraWindow if frame ~= nil and frame ~= "None" and _G[frame] then UnregisterDocklet(frame) @@ -824,13 +824,13 @@ do SuperDockletExtra.FrameName = "None" end - function SuperVillain:ReloadDocklets(alert) + function SV:ReloadDocklets(alert) UnregisterDocklets() if InCombatLockdown()then return end local width = MOD.db.dockRightWidth or 350; local height = (MOD.db.dockRightHeight or 180) - 22 - if SuperVillain:IsDockletReady('DockletMain') then - if SuperVillain:IsDockletReady("DockletExtra") and MOD.db.docklets.enableExtra then + if SV:IsDockletReady('DockletMain') then + if SV:IsDockletReady("DockletExtra") and MOD.db.docklets.enableExtra then width = width * 0.5; end SuperDockletMain:ClearAllPoints() @@ -843,7 +843,7 @@ do end end -function SuperVillain:RegisterDocklet(name, tooltip, texture, onclick, isdefault) +function SV:RegisterDocklet(name, tooltip, texture, onclick, isdefault) local frame = _G[name]; if frame and (frame.IsObjectType and frame:IsObjectType("Frame")) and (frame.IsProtected and not frame:IsProtected()) then frame:ClearAllPoints() @@ -856,7 +856,7 @@ function SuperVillain:RegisterDocklet(name, tooltip, texture, onclick, isdefault end end -function SuperVillain:RegisterMainDocklet(name) +function SV:RegisterMainDocklet(name) local frame = _G[name]; if (frame and (frame.IsObjectType and frame:IsObjectType("Frame")) and (frame.IsProtected and not frame:IsProtected())) then SuperDockletMain.FrameName = name; @@ -875,7 +875,7 @@ function SuperVillain:RegisterMainDocklet(name) end end -function SuperVillain:RegisterExtraDocklet(name) +function SV:RegisterExtraDocklet(name) local frame = _G[name]; if (frame and (frame.IsObjectType and frame:IsObjectType("Frame")) and (frame.IsProtected and not frame:IsProtected())) then SuperDockletExtra.FrameName = name; @@ -918,7 +918,7 @@ function MOD:UpdateSuperDock() self:BottomPanelVisibility(); self:TopPanelVisibility(); self:UpdateDockBackdrops(); - SuperVillain:ReloadDocklets() + SV:ReloadDocklets() end function MOD:UpdateDockBackdrops() @@ -999,8 +999,8 @@ function MOD:Load() SuperDockletMain:SetScript("OnShow", DockletFrame_OnShow) SuperDockletExtra:SetScript("OnShow", DockletFrame_OnShow) - SuperVillain:ReloadDocklets(true) - SuperVillain:ExecuteTimer(self.LoadToolBarProfessions, 5) + SV:ReloadDocklets(true) + SV:ExecuteTimer(self.LoadToolBarProfessions, 5) end --[[ ########################################################## @@ -1030,4 +1030,4 @@ CONFIGS["SVDock"] = { }, } -SuperVillain.Registry:NewPackage(MOD, "SVDock") \ No newline at end of file +Registry:NewPackage(MOD, "SVDock") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/gear/SVGear.lua b/Interface/AddOns/SVUI/packages/gear/SVGear.lua index cacf755..9274f13 100644 --- a/Interface/AddOns/SVUI/packages/gear/SVGear.lua +++ b/Interface/AddOns/SVUI/packages/gear/SVGear.lua @@ -32,8 +32,8 @@ local ceil, floor, round = math.ceil, math.floor, math.round; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; --[[ ########################################################## @@ -99,7 +99,7 @@ local function SetItemDurabilityDisplay(globalName, slotId) if(current ~= total) then actual = current / total; perc = actual * 100; - r,g,b = SuperVillain:ColorGradient(actual,1,0,0,1,1,0,0,1,0) + r,g,b = SV:ColorGradient(actual,1,0,0,1,1,0,0,1,0) frame.DurabilityInfo.bar:SetValue(perc) frame.DurabilityInfo.bar:SetStatusBarColor(r,g,b) if not frame.DurabilityInfo:IsShown() then @@ -148,7 +148,7 @@ local function SetDisplayStats(arg) if(flags[1]) then frame.ItemLevel = frame:CreateFontString(nil, "OVERLAY") frame.ItemLevel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 2, 1) - frame.ItemLevel:SetFontTemplate(SuperVillain.Media.font.roboto, 10, "OUTLINE", "RIGHT") + frame.ItemLevel:SetFontTemplate(SV.Media.font.roboto, 10, "OUTLINE", "RIGHT") end if(arg == "Character" and flags[2]) then @@ -179,7 +179,7 @@ local function SetDisplayStats(arg) frame.DurabilityInfo:SetBackdropBorderColor(0, 0, 0, 0.8) frame.DurabilityInfo.bar = CreateFrame("StatusBar", nil, frame.DurabilityInfo) frame.DurabilityInfo.bar:FillInner(frame.DurabilityInfo, 2, 2) - frame.DurabilityInfo.bar:SetStatusBarTexture(SuperVillain.Media.bar.default) + frame.DurabilityInfo.bar:SetStatusBarTexture(SV.Media.bar.default) frame.DurabilityInfo.bar:SetOrientation("VERTICAL") frame.DurabilityInfo.bg = frame.DurabilityInfo:CreateTexture(nil, "BORDER") frame.DurabilityInfo.bg:FillInner(frame.DurabilityInfo, 2, 2) @@ -206,9 +206,9 @@ local function RefreshInspectedGear() if(not unit or (unit and not CanInspect(unit,false))) then return end if(SHOW_LEVEL) then - SuperVillain:ParseGearSlots(unit, true, SetItemLevelDisplay) + SV:ParseGearSlots(unit, true, SetItemLevelDisplay) else - SuperVillain:ParseGearSlots(unit, true) + SV:ParseGearSlots(unit, true) end end @@ -222,14 +222,14 @@ local function RefreshGear() end MOD:UpdateLocals() if(SHOW_LEVEL) then - SuperVillain:ParseGearSlots("player", false, SetItemLevelDisplay, SetItemDurabilityDisplay) + SV:ParseGearSlots("player", false, SetItemLevelDisplay, SetItemDurabilityDisplay) else - SuperVillain:ParseGearSlots("player", false, nil, SetItemDurabilityDisplay) + SV:ParseGearSlots("player", false, nil, SetItemDurabilityDisplay) end end local Gear_UpdateTabs = function() - SuperVillain:ExecuteTimer(RefreshInspectedGear, 0.2) + SV:ExecuteTimer(RefreshInspectedGear, 0.2) end local function GearSwap() @@ -262,7 +262,7 @@ function MOD:PLAYER_ENTERING_WORLD() SetDisplayStats("Character") SetDisplayStats("Inspect") NewHook('InspectFrame_UpdateTabs', Gear_UpdateTabs) - SuperVillain:ExecuteTimer(RefreshGear, 10) + SV:ExecuteTimer(RefreshGear, 10) GearSwap() self.PreBuildComplete = true end @@ -271,7 +271,7 @@ local MSG_PREFIX = "You have equipped equipment set: " local GearSwapComplete = function() if LIVESET then local strMsg = ("%s%s"):format(MSG_PREFIX, LIVESET) - SuperVillain:AddonMessage(strMsg) + SV:AddonMessage(strMsg) LIVESET = nil end end @@ -326,4 +326,4 @@ CONFIGS["SVGear"] = { setoverlay = true, } } -SuperVillain.Registry:NewPackage(MOD, "SVGear"); \ No newline at end of file +Registry:NewPackage(MOD, "SVGear"); \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua index a6598b5..19abf35 100644 --- a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua +++ b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua @@ -13,8 +13,8 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {} --[[ ########################################################## @@ -78,11 +78,11 @@ local AutomatedEvents = { SCRIPT HANDLERS ########################################################## ]]-- -local ColorFunc = function(arg) SuperVillain:SetColorTheme(arg, true); SuperVillain:ToggleHenchman() end -local UnitFunc = function(arg) SuperVillain:SetUnitframeLayout(arg, true); SuperVillain:ToggleHenchman() end -local BarFunc = function(arg) SuperVillain:SetupBarLayout(arg, true); SuperVillain:ToggleHenchman() end -local AuraFunc = function(arg) SuperVillain:SetupAuralayout(arg, true); SuperVillain:ToggleHenchman() end -local ConfigFunc = function() SuperVillain:ToggleConfig(); SuperVillain:ToggleHenchman() end +local ColorFunc = function(arg) SV:SetColorTheme(arg, true); SV:ToggleHenchman() end +local UnitFunc = function(arg) SV:SetUnitframeLayout(arg, true); SV:ToggleHenchman() end +local BarFunc = function(arg) SV:SetupBarLayout(arg, true); SV:ToggleHenchman() end +local AuraFunc = function(arg) SV:SetupAuralayout(arg, true); SV:ToggleHenchman() end +local ConfigFunc = function() SV:ToggleConfig(); SV:ToggleHenchman() end local speechTimer; local Tooltip_Show = function(self) @@ -140,8 +140,8 @@ local Speech_OnTimeout = function() end local Speech_OnEnter = function(self) - SuperVillain:SecureFadeOut(self, 0.5, 1, 0) - local newTimer = SuperVillain:ExecuteTimer(Speech_OnTimeout, 0.5, speechTimer) + SV:SecureFadeOut(self, 0.5, 1, 0) + local newTimer = SV:ExecuteTimer(Speech_OnTimeout, 0.5, speechTimer) speechTimer = newTimer self:SetScript("OnEnter", nil) end @@ -149,7 +149,7 @@ end local Speech_OnShow = function(self) if self.message then self.txt:SetText(self.message) - local newTimer = SuperVillain:ExecuteTimer(Speech_OnTimeout, 5, speechTimer) + local newTimer = SV:ExecuteTimer(Speech_OnTimeout, 5, speechTimer) speechTimer = newTimer self.message = nil self:SetScript("OnEnter", Speech_OnEnter) @@ -183,7 +183,7 @@ function GetAllMail() SVUI_GetMailButton:SetScript("OnClick",nil) SVUI_GetGoldButton:SetScript("OnClick",nil) baseInboxFrame_OnClick=InboxFrame_OnClick; - InboxFrame_OnClick = SuperVillain.fubar + InboxFrame_OnClick = SV.fubar SVUI_GetMailButton:RegisterEvent("UI_ERROR_MESSAGE") OpenMailItem(GetInboxNumItems()) end @@ -248,7 +248,7 @@ function StopOpeningMail(msg, ...) total_cash = nil; needsToWait = false; if msg then - SuperVillain:HenchmanSays(msg) + SV:HenchmanSays(msg) end end @@ -288,7 +288,7 @@ local function CreateMinionOptions(i) MOD.db[setting] = toggle; end end - SuperVillain.Animate:Slide(option,-500,-500) + SV.Animate:Slide(option,-500,-500) option:SetFrameStrata("DIALOG") option:SetFrameLevel(24) option:EnableMouse(true) @@ -299,14 +299,14 @@ local function CreateMinionOptions(i) option.bg:SetVertexColor(1,1,1,0.6) option.txt = option:CreateFontString(nil,"DIALOG") option.txt:FillInner(option) - option.txt:SetFont(SuperVillain.Media.font.dialog,12,"NONE") + option.txt:SetFont(SV.Media.font.dialog,12,"NONE") option.txt:SetJustifyH("CENTER") option.txt:SetJustifyV("MIDDLE") option.txt:SetText(options[2]) option.txt:SetTextColor(0,0,0) option.txthigh = option:CreateFontString(nil,"HIGHLIGHT") option.txthigh:FillInner(option) - option.txthigh:SetFont(SuperVillain.Media.font.dialog,12,"OUTLINE") + option.txthigh:SetFont(SV.Media.font.dialog,12,"OUTLINE") option.txthigh:SetJustifyH("CENTER") option.txthigh:SetJustifyV("MIDDLE") option.txthigh:SetText(options[2]) @@ -338,7 +338,7 @@ local function CreateHenchmenOptions(i) else option:Point("TOP",_G["HenchmenOptionButton"..lastIndex],"BOTTOM",offsetX,-32) end - SuperVillain.Animate:Slide(option,500,-500) + SV.Animate:Slide(option,500,-500) option:SetFrameStrata("DIALOG") option:SetFrameLevel(24) option:EnableMouse(true) @@ -349,14 +349,14 @@ local function CreateHenchmenOptions(i) option.bg:SetVertexColor(1,1,1,0.6) option.txt = option:CreateFontString(nil,"DIALOG") option.txt:FillInner(option) - option.txt:SetFont(SuperVillain.Media.font.dialog,12,"NONE") + option.txt:SetFont(SV.Media.font.dialog,12,"NONE") option.txt:SetJustifyH("CENTER") option.txt:SetJustifyV("MIDDLE") option.txt:SetText(options[2]) option.txt:SetTextColor(0,0,0) option.txthigh = option:CreateFontString(nil,"HIGHLIGHT") option.txthigh:FillInner(option) - option.txthigh:SetFont(SuperVillain.Media.font.dialog,12,"OUTLINE") + option.txthigh:SetFont(SV.Media.font.dialog,12,"OUTLINE") option.txthigh:SetJustifyH("CENTER") option.txthigh:SetJustifyV("MIDDLE") option.txthigh:SetText(options[2]) @@ -392,19 +392,19 @@ local function CreateHenchmenSubOptions(buttonIndex,optionIndex) frame.txthigh:FillInner(frame) frame.txthigh:SetFontTemplate(false,12,"OUTLINE","CENTER","MIDDLE") frame.txthigh:SetTextColor(1,1,0) - SuperVillain.Animate:Slide(frame,500,0) + SV.Animate:Slide(frame,500,0) tinsert(SUBOPTIONS,frame) end local function CreateHenchmenFrame() - HenchmenFrame:SetParent(SuperVillain.UIParent) + HenchmenFrame:SetParent(SV.UIParent) HenchmenFrame:SetPoint("CENTER",UIParent,"CENTER",0,0) HenchmenFrame:SetWidth(500) HenchmenFrame:SetHeight(500) HenchmenFrame:SetFrameStrata("DIALOG") HenchmenFrame:SetFrameLevel(24) - SuperVillain.Animate:Slide(HenchmenFrame,0,-500) + SV.Animate:Slide(HenchmenFrame,0,-500) local model = CreateFrame("PlayerModel", "HenchmenFrameModel", HenchmenFrame) model:SetPoint("TOPLEFT",HenchmenFrame,25,-25) @@ -415,26 +415,26 @@ local function CreateHenchmenFrame() HenchmenFrame:Hide() - local HenchmenCalloutFrame = CreateFrame("Frame","HenchmenCalloutFrame",SuperVillain.UIParent) + local HenchmenCalloutFrame = CreateFrame("Frame","HenchmenCalloutFrame",SV.UIParent) HenchmenCalloutFrame:SetPoint("BOTTOM",UIParent,"BOTTOM",100,150) HenchmenCalloutFrame:SetWidth(256) HenchmenCalloutFrame:SetHeight(128) HenchmenCalloutFrame:SetFrameStrata("DIALOG") HenchmenCalloutFrame:SetFrameLevel(24) - SuperVillain.Animate:Slide(HenchmenCalloutFrame,-356,-278) + SV.Animate:Slide(HenchmenCalloutFrame,-356,-278) HenchmenCalloutFramePic = HenchmenCalloutFrame:CreateTexture("HenchmenCalloutFramePic","ARTWORK") HenchmenCalloutFramePic:SetTexture([[Interface\Addons\SVUI\assets\artwork\Doodads\HENCHMEN-CALLOUT]]) HenchmenCalloutFramePic:SetAllPoints(HenchmenCalloutFrame) HenchmenCalloutFrame:Hide() - local HenchmenFrameBG = CreateFrame("Frame","HenchmenFrameBG",SuperVillain.UIParent) + local HenchmenFrameBG = CreateFrame("Frame","HenchmenFrameBG",SV.UIParent) HenchmenFrameBG:SetAllPoints(WorldFrame) HenchmenFrameBG:SetBackdrop({bgFile = [[Interface\BUTTONS\WHITE8X8]]}) HenchmenFrameBG:SetBackdropColor(0,0,0,0.9) HenchmenFrameBG:SetFrameStrata("DIALOG") HenchmenFrameBG:SetFrameLevel(22) HenchmenFrameBG:Hide() - HenchmenFrameBG:SetScript("OnMouseUp", SuperVillain.ToggleHenchman) + HenchmenFrameBG:SetScript("OnMouseUp", SV.ToggleHenchman) for i=1, 5 do CreateHenchmenOptions(i) @@ -565,7 +565,7 @@ local function CreateHenchmenFrame() MOD.PostLoaded = true end -function SuperVillain:ToggleHenchman() +function SV:ToggleHenchman() if InCombatLockdown()then return end if(not MOD.PostLoaded) then CreateHenchmenFrame() @@ -594,7 +594,7 @@ function SuperVillain:ToggleHenchman() minion:Show() minion.anim:Play() end - RightSuperDockToggleButton.icon:SetGradient(unpack(SuperVillain.Media.gradient.green)) + RightSuperDockToggleButton.icon:SetGradient(unpack(SV.Media.gradient.green)) else UpdateHenchmanModel(true) for _,frame in pairs(SUBOPTIONS)do @@ -622,7 +622,7 @@ function SuperVillain:ToggleHenchman() end end -function SuperVillain:HenchmanSays(msg) +function SV:HenchmanSays(msg) HenchmenSpeechBubble.message = msg; HenchmenSpeechBubble:Show(); end @@ -692,7 +692,7 @@ INVITE AUTOMATONS ########################################################## ]]-- function MOD:PARTY_INVITE_REQUEST(event, arg) - if not SuperVillain.db.SVHenchmen.autoAcceptInvite then return end + if not SV.db.SVHenchmen.autoAcceptInvite then return end if IsInGroup() or QueueStatusMinimapButton:IsShown() then return end @@ -706,7 +706,7 @@ function MOD:PARTY_INVITE_REQUEST(event, arg) if friend == arg then AcceptGroup() invited = true; - SuperVillain:AddonMessage("Accepted an Invite From Your Friends!") + SV:AddonMessage("Accepted an Invite From Your Friends!") break end end @@ -717,7 +717,7 @@ function MOD:PARTY_INVITE_REQUEST(event, arg) if friend == arg then AcceptGroup() invited = true; - SuperVillain:AddonMessage("Accepted an Invite!") + SV:AddonMessage("Accepted an Invite!") break end end @@ -728,7 +728,7 @@ function MOD:PARTY_INVITE_REQUEST(event, arg) if guildMate == arg then AcceptGroup() invited = true; - SuperVillain:AddonMessage("Accepted an Invite From Your Guild!") + SV:AddonMessage("Accepted an Invite From Your Guild!") break end end @@ -753,7 +753,7 @@ REPAIR AUTOMATONS ########################################################## ]]-- function MOD:MERCHANT_SHOW() - if self.db.vendorGrays then SuperVillain.SVBag:VendorGrays(nil,true) end + if self.db.vendorGrays then SV.SVBag:VendorGrays(nil,true) end local autoRepair = self.db.autoRepair; if IsShiftKeyDown() or autoRepair == "NONE" or not CanMerchantRepair() then return end local repairCost,canRepair=GetRepairAllCost() @@ -764,12 +764,12 @@ function MOD:MERCHANT_SHOW() RepairAllItems(autoRepair=='GUILD') local x,y,z= repairCost % 100,floor((repairCost % 10000)/100), floor(repairCost / 10000) if autoRepair=='GUILD' then - SuperVillain:HenchmanSays("Repairs Complete! ...Using Guild Money!\n"..GetCoinTextureString(repairCost,12)) + SV:HenchmanSays("Repairs Complete! ...Using Guild Money!\n"..GetCoinTextureString(repairCost,12)) else - SuperVillain:HenchmanSays("Repairs Complete!\n"..GetCoinTextureString(repairCost,12)) + SV:HenchmanSays("Repairs Complete!\n"..GetCoinTextureString(repairCost,12)) end else - SuperVillain:HenchmanSays("The Minions Say You Are Too Broke To Repair! They Are Laughing..") + SV:HenchmanSays("The Minions Say You Are Too Broke To Repair! They Are Laughing..") end end end @@ -791,7 +791,7 @@ function MOD:CHAT_MSG_COMBAT_FACTION_CHANGE(event, msg) if name == faction and name ~= active then -- local inactive = IsFactionInactive(factionIndex) or SetWatchedFactionIndex(factionIndex) local strMsg = ("Watching Faction: %s"):format(name) - SuperVillain:AddonMessage(strMsg) + SV:AddonMessage(strMsg) break end end @@ -880,7 +880,7 @@ function MOD:QUEST_COMPLETE() QuestInfoItemHighlight:SetAllPoints(chosenItem) QuestInfoItemHighlight:Show() QuestInfoFrame.itemChoice = chosenItem:GetID() - SuperVillain:HenchmanSays("A Minion Has Chosen Your Reward!") + SV:HenchmanSays("A Minion Has Chosen Your Reward!") end end auto_select = selection @@ -899,7 +899,7 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:Load() - local bubble = CreateFrame("Frame", "HenchmenSpeechBubble", SuperVillain.UIParent) + local bubble = CreateFrame("Frame", "HenchmenSpeechBubble", SV.UIParent) bubble:SetSize(256,128) bubble:Point("BOTTOMRIGHT", RightSuperDockToggleButton, "TOPLEFT", 0, 0) bubble:SetFrameStrata("DIALOG") @@ -911,7 +911,7 @@ function MOD:Load() bubble.txt = bubble:CreateFontString(nil,"DIALOG") bubble.txt:Point("TOPLEFT", bubble, "TOPLEFT", 5, -5) bubble.txt:Point("BOTTOMRIGHT", bubble, "BOTTOMRIGHT", -5, 20) - bubble.txt:SetFont(SuperVillain.Media.font.dialog,12,"NONE") + bubble.txt:SetFont(SV.Media.font.dialog,12,"NONE") bubble.txt:SetText("") bubble.txt:SetTextColor(0,0,0) bubble.txt:SetWordWrap(true) @@ -931,14 +931,14 @@ function MOD:Load() self:RegisterEvent(event) end - if SuperVillain.db.SVHenchmen.pvpautorelease then + if SV.db.SVHenchmen.pvpautorelease then local autoReleaseHandler = CreateFrame("frame") autoReleaseHandler:RegisterEvent("PLAYER_DEAD") autoReleaseHandler:SetScript("OnEvent",function(self,event) local isInstance, instanceType = IsInInstance() if(isInstance and instanceType == "pvp") then local spell = GetSpellInfo(20707) - if(SuperVillain.class ~= "SHAMAN" and not(spell and UnitBuff("player",spell))) then + if(SV.class ~= "SHAMAN" and not(spell and UnitBuff("player",spell))) then RepopMe() end end @@ -989,4 +989,4 @@ CONFIGS["SVHenchmen"] = { ["autoRepair"] = "PLAYER", } -SuperVillain.Registry:NewPackage(MOD, "SVHenchmen") \ No newline at end of file +Registry:NewPackage(MOD, "SVHenchmen") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index 82ab54c..10a6081 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -36,8 +36,8 @@ local parsefloat = math.parsefloat; -- Uncommon GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; --[[ ########################################################## @@ -53,7 +53,7 @@ LOCAL VARS ]]-- local temp = SLASH_CALENDAR1:gsub("/", ""); local calendar_string = temp:gsub("^%l", upper) -local cColor = RAID_CLASS_COLORS[SuperVillain.class]; +local cColor = RAID_CLASS_COLORS[SV.class]; local MM_COLOR = {"VERTICAL", 0.65, 0.65, 0.65, 0.95, 0.95, 0.95} local MM_BRDR = 0 local MM_SIZE = 240 @@ -221,7 +221,7 @@ do if frame:GetObjectType() == "Texture" then local iconFile = frame:GetTexture() if(iconFile ~= nil and (iconFile:find("Border") or iconFile:find("Background") or iconFile:find("AlphaMask"))) then - frame:SetTexture("") + frame:SetTexture(0,0,0,0) else frame:ClearAllPoints() frame:Point("TOPLEFT", btn, "TOPLEFT", 2, -2) @@ -229,7 +229,7 @@ do frame:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) frame:SetDrawLayer("ARTWORK") if name == "PS_MinimapButton" then - frame.SetPoint = SuperVillain.fubar + frame.SetPoint = SV.fubar end end end @@ -263,14 +263,14 @@ do function MOD:UpdateMinimapButtonSettings() if(not self.db.minimapbar.enable) then return end - SuperVillain:ExecuteTimer(StyleMinimapButtons, 4) + SV:ExecuteTimer(StyleMinimapButtons, 4) end end local function SetLargeWorldMap() if InCombatLockdown() then return end if MOD.db.tinyWorldMap == true then - WorldMapFrame:SetParent(SuperVillain.UIParent) + WorldMapFrame:SetParent(SV.UIParent) WorldMapFrame:EnableMouse(false) WorldMapFrame:EnableKeyboard(false) WorldMapFrame:SetScale(1) @@ -288,7 +288,7 @@ end local function SetQuestWorldMap() if InCombatLockdown() then return end if MOD.db.tinyWorldMap == true then - WorldMapFrame:SetParent(SuperVillain.UIParent) + WorldMapFrame:SetParent(SV.UIParent) WorldMapFrame:EnableMouse(false) WorldMapFrame:EnableKeyboard(false) if WorldMapFrame:GetAttribute('UIPanelLayout-area') ~= 'center'then @@ -329,7 +329,7 @@ local function AdjustMapSize() elseif WORLDMAP_SETTINGS.size == WORLDMAP_QUESTLIST_SIZE then SetQuestWorldMap() end - BlackoutWorld:SetTexture("") + BlackoutWorld:SetTexture(0,0,0,0) else if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then WorldMapFrame_SetFullMapView() @@ -414,7 +414,7 @@ local function UpdateWorldMapConfig() if(not MOD.db.playercoords or MOD.db.playercoords == "HIDE") then if MOD.CoordTimer then - SuperVillain:RemoveLoop(MOD.CoordTimer) + SV:RemoveLoop(MOD.CoordTimer) MOD.CoordTimer = nil; end SVUI_MiniMapCoords.playerXCoords:SetText("") @@ -422,7 +422,7 @@ local function UpdateWorldMapConfig() SVUI_MiniMapCoords:Hide() else SVUI_MiniMapCoords:Show() - MOD.CoordTimer = SuperVillain:ExecuteLoop(UpdateMapCoords, 0.2) + MOD.CoordTimer = SV:ExecuteLoop(UpdateMapCoords, 0.2) UpdateMapCoords() end AdjustMapSize() @@ -436,7 +436,7 @@ end local WorldMapFrameOnShow_Hook = function() MOD:RegisterEvent("PLAYER_REGEN_DISABLED"); if InCombatLockdown()then return end - if(not SuperVillain.db.SVMap.tinyWorldMap and not Initialized) then + if(not SV.db.SVMap.tinyWorldMap and not Initialized) then WorldMap_ToggleSizeUp() Initialized = true end @@ -538,20 +538,20 @@ do CoordsHolder.playerXCoords:SetPoint("BOTTOMLEFT", CoordsHolder, "BOTTOMLEFT", 0, 0) CoordsHolder.playerXCoords:SetWidth(70) CoordsHolder.playerXCoords:SetHeight(22) - CoordsHolder.playerXCoords:SetFontTemplate(SuperVillain.Media.font.numbers, 12, "OUTLINE") + CoordsHolder.playerXCoords:SetFontTemplate(SV.Media.font.numbers, 12, "OUTLINE") CoordsHolder.playerXCoords:SetTextColor(cColor.r, cColor.g, cColor.b) CoordsHolder.playerYCoords = CoordsHolder:CreateFontString(nil, "OVERLAY") CoordsHolder.playerYCoords:SetPoint("BOTTOMLEFT", CoordsHolder.playerXCoords, "BOTTOMRIGHT", 4, 0) CoordsHolder.playerXCoords:SetWidth(70) CoordsHolder.playerYCoords:SetHeight(22) - CoordsHolder.playerYCoords:SetFontTemplate(SuperVillain.Media.font.numbers, 12, "OUTLINE") + CoordsHolder.playerYCoords:SetFontTemplate(SV.Media.font.numbers, 12, "OUTLINE") CoordsHolder.playerYCoords:SetTextColor(cColor.r, cColor.g, cColor.b) local calendarButton = CreateFrame("Button", "SVUI_CalendarButton", CoordsHolder) calendarButton:SetSize(22,22) calendarButton:SetPoint("RIGHT", CoordsHolder, "RIGHT", 0, 0) - calendarButton:Formula409() + calendarButton:RemoveTextures() calendarButton:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-CALENDAR") calendarButton:SetPushedTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-CALENDAR") calendarButton:SetHighlightTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-CALENDAR") @@ -564,7 +564,7 @@ do local trackingButton = CreateFrame("Button", "SVUI_TrackingButton", CoordsHolder) trackingButton:SetSize(22,22) trackingButton:SetPoint("RIGHT", calendarButton, "LEFT", -4, 0) - trackingButton:Formula409() + trackingButton:RemoveTextures() trackingButton:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-TRACKING") trackingButton:SetPushedTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-TRACKING") trackingButton:SetHighlightTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP-TRACKING") @@ -607,7 +607,7 @@ local function UpdateMinimapTexts() end local function UpdateSizing() - MM_COLOR = SuperVillain.Media.gradient[MOD.db.bordercolor] + MM_COLOR = SV.Media.gradient[MOD.db.bordercolor] MM_BRDR = MOD.db.bordersize or 0 MM_SIZE = MOD.db.size or 240 MM_OFFSET_TOP = (MM_SIZE * 0.07) @@ -617,7 +617,7 @@ local function UpdateSizing() end function MOD:RefreshMiniMap() - if(not SuperVillain.db.SVMap.enable) then return; end + if(not SV.db.SVMap.enable) then return; end if(InCombatLockdown()) then self.CombatLocked = true return @@ -648,7 +648,7 @@ function MOD:RefreshMiniMap() if SVUI_AurasAnchor then SVUI_AurasAnchor:Height(MM_HEIGHT) - if SVUI_AurasAnchor_MOVE and not SuperVillain:TestMovableMoved('SVUI_AurasAnchor_MOVE') and not SuperVillain:TestMovableMoved('SVUI_MinimapFrame_MOVE') then + if SVUI_AurasAnchor_MOVE and not SV:TestMovableMoved('SVUI_AurasAnchor_MOVE') and not SV:TestMovableMoved('SVUI_MinimapFrame_MOVE') then SVUI_AurasAnchor_MOVE:ClearAllPoints() SVUI_AurasAnchor_MOVE:Point("TOPRIGHT", SVUI_MinimapFrame_MOVE, "TOPLEFT", -8, 0) end @@ -657,10 +657,10 @@ function MOD:RefreshMiniMap() end end if SVUI_HyperBuffs then - SuperVillain.SVAura:Update_HyperBuffsSettings() + SV.SVAura:Update_HyperBuffsSettings() end if TimeManagerClockButton then - TimeManagerClockButton:MUNG() + TimeManagerClockButton:Die() end SetMiniMapCoords() @@ -676,7 +676,7 @@ local function CreateMiniMapElements() Minimap:SetBlipTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Minimap\\MINIMAP_ICONS") Minimap:SetClampedToScreen(false) - SVUI_MinimapFrame:Point("TOPRIGHT", SuperVillain.UIParent, "TOPRIGHT", -10, -10) + SVUI_MinimapFrame:Point("TOPRIGHT", SV.UIParent, "TOPRIGHT", -10, -10) SVUI_MinimapFrame:Size(MM_WIDTH, MM_HEIGHT) SVUI_MinimapFrame.backdrop:ClearAllPoints() SVUI_MinimapFrame.backdrop:WrapOuter(SVUI_MinimapFrame, 2) @@ -708,7 +708,7 @@ local function CreateMiniMapElements() -- MOD:RefreshMiniMap() if TimeManagerClockButton then - TimeManagerClockButton:MUNG() + TimeManagerClockButton:Die() end Minimap:SetQuestBlobRingAlpha(0) @@ -723,7 +723,7 @@ local function CreateMiniMapElements() MinimapZoomIn:Hide() MinimapZoomOut:Hide() MiniMapVoiceChatFrame:Hide() - MinimapNorthTag:MUNG() + MinimapNorthTag:Die() GameTimeFrame:Hide() MinimapZoneTextButton:Hide() MiniMapTracking:Hide() @@ -757,10 +757,10 @@ local function CreateMiniMapElements() MiniMapChallengeMode:Point("BOTTOMLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 8, -8) end) if FeedbackUIButton then - FeedbackUIButton:MUNG() + FeedbackUIButton:Die() end - local mwfont = SuperVillain.Media.font.dialog + local mwfont = SV.Media.font.dialog SVUI_MinimapNarrator:Point("TOPLEFT", SVUI_MinimapFrame, "TOPLEFT", 2, -2) SVUI_MinimapNarrator:SetSize(100, 22) @@ -801,20 +801,20 @@ local function CreateMiniMapElements() PetJournalParent:SetAttribute("UIPanelLayout-"..name, value); end PetJournalParent:SetAttribute("UIPanelLayout-defined", true); - SuperVillain:SetSVMovable(SVUI_MinimapFrame, L["Minimap"]) + SV:SetSVMovable(SVUI_MinimapFrame, L["Minimap"]) MOD:RefreshMiniMap() end local function LoadWorldMap() - setfenv(WorldMapFrame_OnShow, setmetatable({ UpdateMicroButtons = SuperVillain.fubar }, { __index = _G })) + setfenv(WorldMapFrame_OnShow, setmetatable({ UpdateMicroButtons = SV.fubar }, { __index = _G })) WorldMapShowDropDown:Point('BOTTOMRIGHT',WorldMapPositioningGuide,'BOTTOMRIGHT',-2,-4) WorldMapZoomOutButton:Point("LEFT",WorldMapZoneDropDown,"RIGHT",0,4) WorldMapLevelUpButton:Point("TOPLEFT",WorldMapLevelDropDown,"TOPRIGHT",-2,8) WorldMapLevelDownButton:Point("BOTTOMLEFT",WorldMapLevelDropDown,"BOTTOMRIGHT",-2,2) - WorldMapFrame:SetParent(SuperVillain.UIParent) + WorldMapFrame:SetParent(SV.UIParent) WorldMapFrame:SetFrameLevel(4) WorldMapFrame:SetFrameStrata('HIGH') WorldMapDetailFrame:SetFrameLevel(6) @@ -838,7 +838,7 @@ local function LoadWorldMap() CoordsHolder.mouseCoords:SetText(MOUSE_LABEL..": 0, 0") DropDownList1:HookScript('OnShow',function(self) - if(DropDownList1:GetScale() ~= UIParent:GetScale() and SuperVillain.db.SVMap.tinyWorldMap) then + if(DropDownList1:GetScale() ~= UIParent:GetScale() and SV.db.SVMap.tinyWorldMap) then DropDownList1:SetScale(UIParent:GetScale()) end end) @@ -851,11 +851,11 @@ HOOKED / REGISTERED FUNCTIONS ]]-- function MOD:ADDON_LOADED(event, addon) if TimeManagerClockButton then - TimeManagerClockButton:MUNG() + TimeManagerClockButton:Die() end self:UnregisterEvent("ADDON_LOADED") if addon == "Blizzard_FeedbackUI" then - FeedbackUIButton:MUNG() + FeedbackUIButton:Die() end self:UpdateMinimapButtonSettings() end @@ -881,12 +881,12 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:ReLoad() - if(not SuperVillain.db.SVMap.enable) then return; end + if(not SV.db.SVMap.enable) then return; end self:RefreshMiniMap() end function MOD:Load() - if(not SuperVillain.db.SVMap.enable) then + if(not SV.db.SVMap.enable) then Minimap:SetMaskTexture('Textures\\MinimapMask') return end @@ -912,12 +912,12 @@ function MOD:Load() MMBBar:SetPoint("CENTER", MMBHolder, "CENTER", 0, 0) MMBBar:SetScript("OnEnter", MMB_OnEnter) MMBBar:SetScript("OnLeave", MMB_OnLeave) - SuperVillain:SetSVMovable(MMBHolder, L["Minimap Button Bar"]) + SV:SetSVMovable(MMBHolder, L["Minimap Button Bar"]) self:UpdateMinimapButtonSettings() end LoadWorldMap() - SuperVillain:AddToDisplayAudit(SVUI_MinimapFrame) + SV:AddToDisplayAudit(SVUI_MinimapFrame) self:ReLoad() end --[[ @@ -949,4 +949,4 @@ CONFIGS["SVMap"] = { }, } -SuperVillain.Registry:NewPackage(MOD, "SVMap") \ No newline at end of file +Registry:NewPackage(MOD, "SVMap") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index 78c2fcb..9cccd56 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -33,8 +33,8 @@ local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; MOD.LewtRollz = {}; --[[ @@ -125,7 +125,7 @@ local CaptureBarHandler = function() end local ErrorFrameHandler = function(self, event) - if not SuperVillain.db.system.hideErrorFrame then return end + if not SV.db.system.hideErrorFrame then return end if event == 'PLAYER_REGEN_DISABLED' then UIErrorsFrame:UnregisterEvent('UI_ERROR_MESSAGE') else @@ -139,8 +139,8 @@ local Vehicle_OnSetPoint = function(self,_,parent) if _G.VehicleSeatIndicator_MOVE then VehicleSeatIndicator:Point("BOTTOM", VehicleSeatIndicator_MOVE, "BOTTOM", 0, 0) else - VehicleSeatIndicator:Point("TOPLEFT", SuperVillain.UIParent, "TOPLEFT", 22, -45) - SuperVillain:SetSVMovable(VehicleSeatIndicator, L["Vehicle Seat Frame"]) + VehicleSeatIndicator:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 22, -45) + SV:SetSVMovable(VehicleSeatIndicator, L["Vehicle Seat Frame"]) end VehicleSeatIndicator:SetScale(0.8) end @@ -286,7 +286,7 @@ afrm:SetHeight(20); local AlertFramePostMove_Hook = function(forced) local b, c = SVUI_AlertFrame_MOVE:GetCenter() - local d = SuperVillain.UIParent:GetTop() + local d = SV.UIParent:GetTop() if(c > (d / 2)) then POSITION = "TOP" ANCHOR_POINT = "BOTTOM" @@ -343,7 +343,7 @@ MIRROR BARS ]]-- local SetMirrorPosition = function(bar) local yOffset = mirrorYOffset[bar.type] - return bar:Point("TOP", SuperVillain.UIParent, "TOP", 0, -yOffset) + return bar:Point("TOP", SV.UIParent, "TOP", 0, -yOffset) end local MirrorBar_OnUpdate = function(self, elapsed) @@ -377,12 +377,12 @@ local function MirrorBarRegistry(barType) if RegisteredMirrorBars[barType] then return RegisteredMirrorBars[barType] end - local bar = CreateFrame('StatusBar', nil, SuperVillain.UIParent) + local bar = CreateFrame('StatusBar', nil, SV.UIParent) bar:SetPanelTemplate("Bar", false, 3, 3, 3) bar:SetScript("OnUpdate", MirrorBar_OnUpdate) local r, g, b = unpack(mirrorTypeColor[barType]) bar.text = bar:CreateFontString(nil, 'OVERLAY') - bar.text:SetFontTemplate(SuperVillain.Media.font.roboto, 12, 'OUTLINE') + bar.text:SetFontTemplate(SV.Media.font.roboto, 12, 'OUTLINE') bar.text:SetJustifyH('CENTER') bar.text:SetTextColor(1, 1, 1) bar.text:SetPoint('LEFT', bar) @@ -404,9 +404,9 @@ local function SetTimerStyle(bar) for i=1, bar:GetNumRegions()do local child = select(i, bar:GetRegions()) if child:GetObjectType() == "Texture"then - child:SetTexture("") + child:SetTexture(0,0,0,0) elseif child:GetObjectType() == "FontString" then - child:SetFontTemplate(SuperVillain.Media.font.roboto, 12, 'OUTLINE') + child:SetFontTemplate(SV.Media.font.roboto, 12, 'OUTLINE') end end bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) @@ -435,7 +435,7 @@ local MirrorBarToggleHandler = function(_, event, arg, ...) end local MirrorBarUpdateHandler = function(_, event) - if not GetCVarBool("lockActionBars") and SuperVillain.db.SVBar.enable then + if not GetCVarBool("lockActionBars") and SV.db.SVBar.enable then SetCVar("lockActionBars", 1) end if(event == "PLAYER_ENTERING_WORLD") then @@ -458,11 +458,11 @@ local function UpdateLootUpvalues() end local Loot_OnHide = function(self) - SuperVillain:StaticPopup_Hide("CONFIRM_LOOT_DISTRIBUTION"); + SV:StaticPopup_Hide("CONFIRM_LOOT_DISTRIBUTION"); CloseLoot() end -local SVUI_LootFrameHolder = CreateFrame("Frame","SVUI_LootFrameHolder",SuperVillain.UIParent); +local SVUI_LootFrameHolder = CreateFrame("Frame","SVUI_LootFrameHolder",SV.UIParent); local SVUI_LootFrame = CreateFrame('Button', 'SVUI_LootFrame', SVUI_LootFrameHolder); SVUI_LootFrameHolder:Point("TOPLEFT",36,-195); SVUI_LootFrameHolder:Width(150); @@ -643,7 +643,7 @@ local function MakeSlots(id) slot.count = slot.iconFrame:CreateFontString(nil, "OVERLAY") slot.count:SetJustifyH("RIGHT") slot.count:Point("BOTTOMRIGHT", slot.iconFrame, -2, 2) - slot.count:SetFont(SuperVillain.Shared:Fetch("font", "Roboto"), 12, "OUTLINE") + slot.count:SetFont(SV.Shared:Fetch("font", "Roboto"), 12, "OUTLINE") slot.count:SetText(1) slot.name = slot:CreateFontString(nil, "OVERLAY") @@ -651,7 +651,7 @@ local function MakeSlots(id) slot.name:SetPoint("LEFT", slot) slot.name:SetPoint("RIGHT", slot.icon, "LEFT") slot.name:SetNonSpaceWrap(true) - slot.name:SetFont(SuperVillain.Shared:Fetch("font", "Roboto"), 12, "OUTLINE") + slot.name:SetFont(SV.Shared:Fetch("font", "Roboto"), 12, "OUTLINE") slot.drop = slot:CreateTexture(nil, "ARTWORK") slot.drop:SetTexture("Interface\\QuestFrame\\UI-QuestLogTitleHighlight") @@ -687,14 +687,14 @@ local function CreateRollButton(rollFrame, type, locale, anchor) rollButton:SetScript("OnClick", DoDaRoll) rollButton:SetMotionScriptsWhileDisabled(true) local text = rollButton:CreateFontString(nil, nil) - text:SetFont(SuperVillain.Shared:Fetch("font", "Roboto"),14,"OUTLINE") + text:SetFont(SV.Shared:Fetch("font", "Roboto"),14,"OUTLINE") text:Point("CENTER", 0, ((type == 2 and 1) or (type == 0 and -1.2) or 0)) return rollButton, text end local function CreateRollFrame() UpdateLootUpvalues() - local rollFrame = CreateFrame("Frame",nil,SuperVillain.UIParent) + local rollFrame = CreateFrame("Frame",nil,SV.UIParent) rollFrame:Size(LOOT_WIDTH,LOOT_HEIGHT) rollFrame:SetFixedPanelTemplate('Default') rollFrame:SetScript("OnEvent",LootRoll_OnEvent) @@ -741,16 +741,16 @@ local function CreateRollFrame() rollFrame.need,rollFrame.greed,rollFrame.pass,rollFrame.disenchant = needText,greedText,passText,deText; rollFrame.bindText = rollFrame:CreateFontString() rollFrame.bindText:Point("LEFT",passButton,"RIGHT",3,1) - rollFrame.bindText:SetFont(SuperVillain.Shared:Fetch("font", "SVUI Number Font"),14,"OUTLINE") + rollFrame.bindText:SetFont(SV.Shared:Fetch("font", "SVUI Number Font"),14,"OUTLINE") rollFrame.lootText = rollFrame:CreateFontString(nil,"ARTWORK") - rollFrame.lootText:SetFont(SuperVillain.Shared:Fetch("font", "SVUI Number Font"),14,"OUTLINE") + rollFrame.lootText:SetFont(SV.Shared:Fetch("font", "SVUI Number Font"),14,"OUTLINE") rollFrame.lootText:Point("LEFT",rollFrame.bindText,"RIGHT",0,0) rollFrame.lootText:Point("RIGHT",rollFrame,"RIGHT",-5,0) rollFrame.lootText:Size(200,10) rollFrame.lootText:SetJustifyH("LEFT") rollFrame.yourRoll = rollFrame:CreateFontString(nil,"ARTWORK") - rollFrame.yourRoll:SetFont(SuperVillain.Shared:Fetch("font", "SVUI Number Font"),18,"OUTLINE") + rollFrame.yourRoll:SetFont(SV.Shared:Fetch("font", "SVUI Number Font"),18,"OUTLINE") rollFrame.yourRoll:Size(22,22) rollFrame.yourRoll:Point("LEFT",rollFrame,"RIGHT",5,0) rollFrame.yourRoll:SetJustifyH("CENTER") @@ -957,7 +957,7 @@ local LootComplexEventsHandler = function(_, event, arg1, arg2) rollFrame:SetPoint("CENTER",WorldFrame,"CENTER") rollFrame:Show() AlertFrame_FixAnchors() - if SuperVillain.db.SVHenchmen.autoRoll and UnitLevel('player') == MAX_PLAYER_LEVEL and quality == 2 and not bindOnPickUp then + if SV.db.SVHenchmen.autoRoll and UnitLevel('player') == MAX_PLAYER_LEVEL and quality == 2 and not bindOnPickUp then if canBreak then RollOnLoot(arg1,3) else @@ -984,13 +984,13 @@ end local GroupLootDropDown_GiveLoot = function(self) if lastQuality >= MASTER_LOOT_THREHOLD then - local confirmed = SuperVillain:StaticPopup_Show("CONFIRM_LOOT_DISTRIBUTION",ITEM_QUALITY_COLORS[lastQuality].hex..lastName..FONT_COLOR_CODE_CLOSE,self:GetText()); + local confirmed = SV:StaticPopup_Show("CONFIRM_LOOT_DISTRIBUTION",ITEM_QUALITY_COLORS[lastQuality].hex..lastName..FONT_COLOR_CODE_CLOSE,self:GetText()); if confirmed then confirmed.data = self.value end else GiveMasterLoot(lastID, self.value) end CloseDropDownMenus() - SuperVillain.SystemAlert["CONFIRM_LOOT_DISTRIBUTION"].OnAccept = function(self,index) GiveMasterLoot(lastID,index) end + SV.SystemAlert["CONFIRM_LOOT_DISTRIBUTION"].OnAccept = function(self,index) GiveMasterLoot(lastID,index) end end local BailOut_OnEvent = function(self, event, ...) @@ -1006,19 +1006,19 @@ LOAD / UPDATE ########################################################## ]]-- function MOD:Load() - HelpOpenTicketButtonTutorial:MUNG() - TalentMicroButtonAlert:MUNG() - HelpPlate:MUNG() - HelpPlateTooltip:MUNG() - CompanionsMicroButtonAlert:MUNG() + HelpOpenTicketButtonTutorial:Die() + TalentMicroButtonAlert:Die() + HelpPlate:Die() + HelpPlateTooltip:Die() + CompanionsMicroButtonAlert:Die() UIPARENT_MANAGED_FRAME_POSITIONS["GroupLootContainer"] = nil; DurabilityFrame:SetFrameStrata("HIGH") NewHook(DurabilityFrame, "SetPoint", Dura_OnSetPoint) TicketStatusFrame:ClearAllPoints() - TicketStatusFrame:SetPoint("TOPLEFT", SuperVillain.UIParent, "TOPLEFT", 250, -5) - SuperVillain:SetSVMovable(TicketStatusFrame, L["GM Ticket Frame"], nil, nil, nil, nil, "GM") + TicketStatusFrame:SetPoint("TOPLEFT", SV.UIParent, "TOPLEFT", 250, -5) + SV:SetSVMovable(TicketStatusFrame, L["GM Ticket Frame"], nil, nil, nil, nil, "GM") HelpOpenTicketButton:SetParent(Minimap) HelpOpenTicketButton:ClearAllPoints() HelpOpenTicketButton:SetPoint("TOPRIGHT", Minimap, "TOPRIGHT") @@ -1032,9 +1032,9 @@ function MOD:Load() self:RegisterEvent('PLAYER_REGEN_DISABLED', ErrorFrameHandler) self:RegisterEvent('PLAYER_REGEN_ENABLED', ErrorFrameHandler) - SVUI_AlertFrame:SetParent(SuperVillain.UIParent) - SVUI_AlertFrame:SetPoint("TOP", SuperVillain.UIParent, "TOP", 0, -18); - SuperVillain:SetSVMovable(SVUI_AlertFrame, L["Loot / Alert Frames"], nil, nil, AlertFramePostMove_Hook) + SVUI_AlertFrame:SetParent(SV.UIParent) + SVUI_AlertFrame:SetPoint("TOP", SV.UIParent, "TOP", 0, -18); + SV:SetSVMovable(SVUI_AlertFrame, L["Loot / Alert Frames"], nil, nil, AlertFramePostMove_Hook) NewHook('AlertFrame_FixAnchors', AlertFramePostMove_Hook) NewHook('AlertFrame_SetLootAnchors', _hook_AlertFrame_SetLootAnchors) NewHook('AlertFrame_SetLootWonAnchors', _hook_AlertFrame_SetLootWonAnchors) @@ -1049,8 +1049,8 @@ function MOD:Load() LootFrame:UnregisterAllEvents(); SVUI_LootFrame:SetFixedPanelTemplate('Transparent'); - SVUI_LootFrame.title:SetFont(SuperVillain.Shared:Fetch("font", "SVUI Number Font"),18,"OUTLINE") - SuperVillain:SetSVMovable(SVUI_LootFrameHolder, L["Loot Frame"], nil, nil, nil, nil, "SVUI_LootFrame"); + SVUI_LootFrame.title:SetFont(SV.Shared:Fetch("font", "SVUI Number Font"),18,"OUTLINE") + SV:SetSVMovable(SVUI_LootFrameHolder, L["Loot Frame"], nil, nil, nil, nil, "SVUI_LootFrame"); tinsert(UISpecialFrames, "SVUI_LootFrame"); UIParent:UnregisterEvent("LOOT_BIND_CONFIRM") @@ -1081,7 +1081,7 @@ function MOD:Load() self:RegisterEvent("MIRROR_TIMER_PAUSE", MirrorBarToggleHandler) self:RegisterEvent("START_TIMER", MirrorBarToggleHandler) - local exit = CreateFrame("Button", "SVUI_BailOut", SuperVillain.UIParent) + local exit = CreateFrame("Button", "SVUI_BailOut", SV.UIParent) exit:Size(40, 40) exit:Point("TOPLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, -30) exit:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\EXIT") @@ -1098,24 +1098,24 @@ function MOD:Load() exit:SetScript("OnEvent", BailOut_OnEvent) exit:Hide() - SuperVillain:SetSVMovable(exit, L["Bail Out"]) + SV:SetSVMovable(exit, L["Bail Out"]) local altPower = CreateFrame("Frame", "SVUI_AltPowerBar", UIParent) - altPower:SetPoint("TOP", SuperVillain.UIParent, "TOP", 0, -18) + altPower:SetPoint("TOP", SV.UIParent, "TOP", 0, -18) altPower:Size(128, 50) PlayerPowerBarAlt:ClearAllPoints() PlayerPowerBarAlt:SetPoint("CENTER", altPower, "CENTER") PlayerPowerBarAlt:SetParent(altPower) PlayerPowerBarAlt.ignoreFramePositionManager = true; - SuperVillain:SetSVMovable(altPower, L["Alternative Power"]) + SV:SetSVMovable(altPower, L["Alternative Power"]) - local wsc = CreateFrame("Frame", "SVUI_WorldStateHolder", SuperVillain.UIParent) + local wsc = CreateFrame("Frame", "SVUI_WorldStateHolder", SV.UIParent) wsc:SetSize(200, 45) - wsc:SetPoint("TOP", SuperVillain.UIParent, "TOP", 0, -100) - SuperVillain:SetSVMovable(wsc, L["Capture Bars"]) + wsc:SetPoint("TOP", SV.UIParent, "TOP", 0, -100) + SV:SetSVMovable(wsc, L["Capture Bars"]) NewHook("UIParent_ManageFramePositions", CaptureBarHandler) - SuperVillain:SetSVMovable(LossOfControlFrame, L["Loss Control Icon"], nil, nil, nil, nil, "LoC") + SV:SetSVMovable(LossOfControlFrame, L["Loss Control Icon"], nil, nil, nil, nil, "LoC") end --[[ ########################################################## @@ -1130,4 +1130,4 @@ CONFIGS["SVOverride"] = { ["lootRollHeight"] = 28, } -SuperVillain.Registry:NewPackage(MOD, "SVOverride"); \ No newline at end of file +Registry:NewPackage(MOD, "SVOverride"); \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua index c7e9324..62ae4b0 100644 --- a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua +++ b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua @@ -49,8 +49,8 @@ local tremove, tcopy, twipe, tsort, tconcat = table.remove, table.copy, table.wi GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; --[[ ########################################################## @@ -83,7 +83,7 @@ local PLATE_LEFT = [[Interface\Addons\SVUI\assets\artwork\Template\Plate\PLATE-L is used to refresh these any time a change is made to configs and once when the mod is loaded. ]]-- -local NPClassRole = SuperVillain.ClassRole; +local NPClassRole = SV.ClassRole; local NPBaseAlpha = 0.6; local NPCombatHide = false; local NPNameMatch = false; @@ -236,7 +236,7 @@ local function SetPlateBorder(plate, point) point.backdrop = plate:CreateTexture(nil, "BORDER") point.backdrop:SetDrawLayer("BORDER", -4) point.backdrop:SetAllPoints(point) - point.backdrop:SetTexture(SuperVillain.Media.bar.default) + point.backdrop:SetTexture(SV.Media.bar.default) point.backdrop:SetVertexColor(0.1,0.1,0.1) point.bordertop = plate:CreateTexture(nil, "BORDER") @@ -1103,18 +1103,18 @@ do if not PLATE_ARGS.scaled and not PLATE_ARGS.tiny then SVUI_PLATE.health:SetSize(HBWidth, HBHeight) end - SVUI_PLATE.health:SetStatusBarTexture(SuperVillain.Media.bar.textured) - SVUI_PLATE.health.text:SetFontTemplate(SuperVillain.Media.font.roboto, 8, "OUTLINE") + SVUI_PLATE.health:SetStatusBarTexture(SV.Media.bar.textured) + SVUI_PLATE.health.text:SetFontTemplate(SV.Media.font.roboto, 8, "OUTLINE") SVUI_PLATE.cast:SetSize(HBWidth, (CBHeight + 20)) - SVUI_PLATE.cast:SetStatusBarTexture(SuperVillain.Media.bar.lazer) - SVUI_PLATE.cast.text:SetFont(SuperVillain.Media.font.roboto, 8, "OUTLINE") - plate.cast.text:SetFont(SuperVillain.Media.font.roboto, 8, "OUTLINE") + SVUI_PLATE.cast:SetStatusBarTexture(SV.Media.bar.lazer) + SVUI_PLATE.cast.text:SetFont(SV.Media.font.roboto, 8, "OUTLINE") + plate.cast.text:SetFont(SV.Media.font.roboto, 8, "OUTLINE") plate.cast.icon:Size((CBHeight + HBHeight) + 5) PLATE_REF.raidicon:ClearAllPoints() - SuperVillain:ReversePoint(PLATE_REF.raidicon, RIAnchor, SVUI_PLATE.health, RIXoffset, RIYoffset) + SV:ReversePoint(PLATE_REF.raidicon, RIAnchor, SVUI_PLATE.health, RIXoffset, RIYoffset) PLATE_REF.raidicon:SetSize(RISize, RISize) SVUI_PLATE.health.icon:ClearAllPoints() - SuperVillain:ReversePoint(SVUI_PLATE.health.icon, RIAnchor, SVUI_PLATE.health, RIXoffset, RIYoffset) + SV:ReversePoint(SVUI_PLATE.health.icon, RIAnchor, SVUI_PLATE.health, RIXoffset, RIYoffset) SVUI_PLATE.health.icon:SetSize(RISize, RISize) for index = 1, #PLATE_AURAICONS do if PLATE_AURAICONS and PLATE_AURAICONS[index] then @@ -1167,22 +1167,22 @@ do health:Hide() fontRegions:Hide() - ref.threat:SetTexture("") + ref.threat:SetTexture(0,0,0,0) ref.border:Hide() - ref.highlight:SetTexture("") + ref.highlight:SetTexture(0,0,0,0) ref.level:SetWidth( 000.1 ) ref.level:Hide() - ref.skullicon:SetTexture("") + ref.skullicon:SetTexture(0,0,0,0) ref.raidicon:SetAlpha( 0 ) - ref.eliteicon:SetTexture("") + ref.eliteicon:SetTexture(0,0,0,0) plate.name:Hide() - cast.border:SetTexture("") - cast.shield:SetTexture("") + cast.border:SetTexture(0,0,0,0) + cast.shield:SetTexture(0,0,0,0) cast.icon:SetTexCoord( 0, 0, 0, 0 ) cast.icon:SetWidth(.001) - cast.shadow:SetTexture("") + cast.shadow:SetTexture(0,0,0,0) cast.shadow:Hide() cast.text:Hide() @@ -1471,15 +1471,15 @@ function MOD:UpdateLocals() local db = self.db if not db then return end - NPClassRole = SuperVillain.ClassRole; + NPClassRole = SV.ClassRole; NPBaseAlpha = db.nonTargetAlpha; NPCombatHide = db.combatHide; - NPFont = SuperVillain.Shared:Fetch("font", db.font); + NPFont = SV.Shared:Fetch("font", db.font); NPFSize = db.fontSize; NPFOutline = db.fontOutline; - AuraFont = SuperVillain.Shared:Fetch("font", db.auras.font); + AuraFont = SV.Shared:Fetch("font", db.auras.font); AuraFSize = db.auras.fontSize; AuraFOutline = db.auras.fontOutline; AuraMaxCount = db.auras.numAuras; @@ -1524,14 +1524,14 @@ function MOD:UpdateLocals() NPReactNeutral = {rc.neutral[1], rc.neutral[2], rc.neutral[3]} NPReactEnemy = {rc.enemy[1], rc.enemy[2], rc.enemy[3]} - AuraFont = SuperVillain.Shared:Fetch("font", db.auras.font); + AuraFont = SV.Shared:Fetch("font", db.auras.font); AuraFSize = db.auras.fontSize; AuraFOutline = db.auras.fontOutline; AuraMaxCount = db.auras.numAuras; AuraFilterName = db.auras.additionalFilter - AuraFilter = SuperVillain.db.filter[AuraFilterName] + AuraFilter = SV.db.filter[AuraFilterName] - if (db.comboPoints and (SuperVillain.class == 'ROGUE' or SuperVillain.class == 'DRUID')) then + if (db.comboPoints and (SV.class == 'ROGUE' or SV.class == 'DRUID')) then self.UseCombo = true self:RegisterEvent("UNIT_COMBO_POINTS") else @@ -1557,7 +1557,7 @@ function MOD:CombatToggle(noToggle) end function MOD:ReLoad() - if SuperVillain.db["SVPlate"].enable ~= true then + if SV.db["SVPlate"].enable ~= true then self:DisableTracking() return end @@ -1565,7 +1565,7 @@ function MOD:ReLoad() end function MOD:Load() - if SuperVillain.db["SVPlate"].enable ~= true then return end + if SV.db["SVPlate"].enable ~= true then return end self:UpdateLocals() self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") @@ -1645,4 +1645,4 @@ CONFIGS["SVPlate"] = { }, } -SuperVillain.Registry:NewPackage(MOD, "SVPlate") \ No newline at end of file +Registry:NewPackage(MOD, "SVPlate") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/SVStats.lua b/Interface/AddOns/SVUI/packages/stats/SVStats.lua index c8dad65..eac71af 100644 --- a/Interface/AddOns/SVUI/packages/stats/SVStats.lua +++ b/Interface/AddOns/SVUI/packages/stats/SVStats.lua @@ -33,8 +33,8 @@ local min = math.min; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; MOD.Anchors = {}; MOD.Statistics = {}; @@ -215,7 +215,7 @@ function MOD:NewAnchor(parent, maxCount, tipAnchor, isTop, customTemplate, isVer parent.holders[position].barframe.bg = parent.holders[position].barframe:CreateTexture(nil, "BORDER") parent.holders[position].barframe.bg:FillInner(parent.holders[position].barframe, 2, 2) parent.holders[position].barframe.bg:SetTexture([[Interface\BUTTONS\WHITE8X8]]) - parent.holders[position].barframe.bg:SetGradient(unpack(SuperVillain.Media.gradient.dark)) + parent.holders[position].barframe.bg:SetGradient(unpack(SV.Media.gradient.dark)) end parent.holders[position].barframe:SetFrameLevel(parent.holders[position]:GetFrameLevel()-1) parent.holders[position].barframe:SetBackdrop({ @@ -236,11 +236,11 @@ function MOD:NewAnchor(parent, maxCount, tipAnchor, isTop, customTemplate, isVer parent.holders[position].barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\PLACEHOLDER") parent.holders[position].barframe.bar = CreateFrame("StatusBar", nil, parent.holders[position].barframe) parent.holders[position].barframe.bar:FillInner(parent.holders[position].barframe, 2, 2) - parent.holders[position].barframe.bar:SetStatusBarTexture(SuperVillain.Media.bar.default) + parent.holders[position].barframe.bar:SetStatusBarTexture(SV.Media.bar.default) parent.holders[position].barframe.bar.extra = CreateFrame("StatusBar", nil, parent.holders[position].barframe.bar) parent.holders[position].barframe.bar.extra:SetAllPoints() - parent.holders[position].barframe.bar.extra:SetStatusBarTexture(SuperVillain.Media.bar.default) + parent.holders[position].barframe.bar.extra:SetStatusBarTexture(SV.Media.bar.default) parent.holders[position].barframe.bar.extra:Hide() parent.holders[position].barframe:Hide() parent.holders[position].textframe = CreateFrame("Frame", nil, parent.holders[position]) @@ -249,11 +249,11 @@ function MOD:NewAnchor(parent, maxCount, tipAnchor, isTop, customTemplate, isVer parent.holders[position].text = parent.holders[position].textframe:CreateFontString(nil, "OVERLAY", nil, 7) parent.holders[position].text:SetAllPoints() if(MOD.db.showBackground) then - parent.holders[position].text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, "NONE", "CENTER", "MIDDLE") + parent.holders[position].text:SetFontTemplate(SV.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, "NONE", "CENTER", "MIDDLE") parent.holders[position].text:SetShadowColor(0, 0, 0, 0.5) parent.holders[position].text:SetShadowOffset(2, -4) else - parent.holders[position].text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + parent.holders[position].text:SetFontTemplate(SV.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) parent.holders[position].text:SetJustifyH("CENTER") parent.holders[position].text:SetJustifyV("MIDDLE") end @@ -392,7 +392,7 @@ do StatMenuFrame.buttons[i].hoverTex:Hide() StatMenuFrame.buttons[i].text = StatMenuFrame.buttons[i]:CreateFontString(nil, 'BORDER') StatMenuFrame.buttons[i].text:SetAllPoints() - StatMenuFrame.buttons[i].text:SetFont(SuperVillain.Media.font.roboto,12,"OUTLINE") + StatMenuFrame.buttons[i].text:SetFont(SV.Media.font.roboto,12,"OUTLINE") StatMenuFrame.buttons[i].text:SetJustifyH("LEFT") StatMenuFrame.buttons[i]:SetScript("OnEnter", DD_OnEnter) StatMenuFrame.buttons[i]:SetScript("OnLeave", DD_OnLeave) @@ -537,7 +537,7 @@ do local BG_OnClick = function() ForceHideBGStats = true; MOD:Generate() - SuperVillain:AddonMessage(L["Battleground statistics temporarily hidden, to show type \"/sv bg\" or \"/sv pvp\""]) + SV:AddonMessage(L["Battleground statistics temporarily hidden, to show type \"/sv bg\" or \"/sv pvp\""]) end local function SetMenuLists() @@ -574,9 +574,9 @@ do parent.holders[position]:SetScript("OnClick", nil) if(db.showBackground) then - parent.holders[position].text:SetFont(SuperVillain.Shared:Fetch("font", db.font), db.fontSize, "NONE") + parent.holders[position].text:SetFont(SV.Shared:Fetch("font", db.font), db.fontSize, "NONE") else - parent.holders[position].text:SetFont(SuperVillain.Shared:Fetch("font", db.font), db.fontSize, db.fontOutline) + parent.holders[position].text:SetFont(SV.Shared:Fetch("font", db.font), db.fontSize, db.fontOutline) end parent.holders[position].text:SetText(nil) @@ -628,7 +628,7 @@ function MOD:ReLoad() end function MOD:Load() - local hexHighlight = SuperVillain:HexColor("highlight") or "FFFFFF" + local hexHighlight = SV:HexColor("highlight") or "FFFFFF" local hexClass = classColor.colorStr BGStatString = "|cff" .. hexHighlight .. "%s: |c" .. hexClass .. "%s|r"; SVUI_Global["Accountant"] = SVUI_Global["Accountant"] or {}; @@ -642,11 +642,11 @@ function MOD:Load() self:CacheRepData() self:CacheTokenData() - StatMenuFrame:SetParent(SuperVillain.UIParent); + StatMenuFrame:SetParent(SV.UIParent); StatMenuFrame:SetPanelTemplate("Transparent"); StatMenuFrame:Hide() - self.tooltip:SetParent(SuperVillain.UIParent) + self.tooltip:SetParent(SV.UIParent) self.tooltip:SetFrameStrata("DIALOG") self.tooltip:HookScript("OnShow", _hook_TooltipOnShow) @@ -698,4 +698,4 @@ CONFIGS["SVStats"] = { ["panelTransparency"] = false, } -SuperVillain.Registry:NewPackage(MOD, "SVStats") \ No newline at end of file +Registry:NewPackage(MOD, "SVStats") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/bags.lua b/Interface/AddOns/SVUI/packages/stats/stats/bags.lua index 4469142..a078d3d 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/bags.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/bags.lua @@ -49,8 +49,8 @@ local twipe, tsort = table.wipe, table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L, Registry = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## BAG STATS @@ -92,11 +92,11 @@ local function bags_focus(this) end local BagsColorUpdate = function() - hexColor = SuperVillain:HexColor("highlight") + hexColor = SV:HexColor("highlight") if currentObject ~= nil then bags_events(currentObject) end end -SuperVillain.Registry:NewCallback(BagsColorUpdate) +Registry:NewCallback(BagsColorUpdate) MOD:Extend("Bags", StatEvents, bags_events, nil, bags_click, bags_focus); \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/cta.lua b/Interface/AddOns/SVUI/packages/stats/stats/cta.lua index 2dded9e..d3b9d13 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/cta.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/cta.lua @@ -49,8 +49,8 @@ local twipe, tsort = table.wipe, table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L, Registry = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## CALL TO ARMS STATS @@ -148,12 +148,12 @@ local function CTA_OnEnter(self) end local CTAColorUpdate = function() - local hexColor = SuperVillain:HexColor("highlight"); + local hexColor = SV:HexColor("highlight"); tooltipString = ("%s: |cff%sN/A|r"):format(BATTLEGROUND_HOLIDAY, hexColor) if currentObject ~= nil then CTA_OnEvent(currentObject) end end -SuperVillain.Registry:NewCallback(CTAColorUpdate) +Registry:NewCallback(CTAColorUpdate) MOD:Extend('Call to Arms', StatEvents, CTA_OnEvent, nil, CTA_OnClick, CTA_OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/dps.lua b/Interface/AddOns/SVUI/packages/stats/stats/dps.lua index 4f5b080..2cef27d 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/dps.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/dps.lua @@ -31,8 +31,8 @@ local match, sub, join = string.match, string.sub, string.join; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L, Registry = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## CALL TO ARMS STATS @@ -117,11 +117,11 @@ local function DPS_OnEvent(self, event, ...) end local DPSColorUpdate = function() - hexColor = SuperVillain:HexColor("highlight") + hexColor = SV:HexColor("highlight") if lastPanel ~= nil then DPS_OnEvent(lastPanel) end end -SuperVillain.Registry:NewCallback(DPSColorUpdate) +Registry:NewCallback(DPSColorUpdate) MOD:Extend('DPS', StatEvents, DPS_OnEvent, nil, DPS_OnClick, DPS_OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/durability.lua b/Interface/AddOns/SVUI/packages/stats/stats/durability.lua index cc5ee92..61014b9 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/durability.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/durability.lua @@ -49,8 +49,8 @@ local twipe, tsort = table.wipe, table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L, Registry = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## DURABILITY STATS @@ -83,7 +83,7 @@ local function Durability_OnEvent(self, ...) self.text:SetAllPoints(self) self.text:SetJustifyH("CENTER") self.barframe:Hide() - self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,SuperVillain.db.SVStats.fontOutline) + self.text:SetFontTemplate(SV.Shared:Fetch("font",SV.db.SVStats.font),SV.db.SVStats.fontSize,SV.db.SVStats.fontOutline) end for slot,name in pairs(inventoryMap)do local slotID = GetInventorySlotInfo(slot) @@ -104,7 +104,7 @@ local function DurabilityBar_OnEvent(self, ...) if not self.barframe:IsShown() then self.barframe:Show() self.barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\STAT-DUR") - self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,"NONE") + self.text:SetFontTemplate(SV.Shared:Fetch("font",SV.db.SVStats.font),SV.db.SVStats.fontSize,"NONE") end for slot,name in pairs(inventoryMap)do local slotID = GetInventorySlotInfo(slot) @@ -131,18 +131,18 @@ end local function Durability_OnEnter(self) MOD:Tip(self) for name,amt in pairs(equipment)do - MOD.tooltip:AddDoubleLine(name, format("%d%%", amt),1, 1, 1, SuperVillain:ColorGradient(amt * 0.01, 1, 0, 0, 1, 1, 0, 0, 1, 0)) + MOD.tooltip:AddDoubleLine(name, format("%d%%", amt),1, 1, 1, SV:ColorGradient(amt * 0.01, 1, 0, 0, 1, 1, 0, 0, 1, 0)) end MOD:ShowTip() end local DurColorUpdate = function() - hexColor = SuperVillain:HexColor("highlight") + hexColor = SV:HexColor("highlight") if currentObject ~= nil then Durability_OnEvent(currentObject) end end -SuperVillain.Registry:NewCallback(DurColorUpdate) +Registry:NewCallback(DurColorUpdate) MOD:Extend("Durability", StatEvents, Durability_OnEvent, nil, Durability_OnClick, Durability_OnEnter) MOD:Extend("Durability Bar", StatEvents, DurabilityBar_OnEvent, nil, Durability_OnClick, Durability_OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/experience.lua b/Interface/AddOns/SVUI/packages/stats/stats/experience.lua index 4d47b94..093f9c9 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/experience.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/experience.lua @@ -32,8 +32,8 @@ local gsub = string.gsub; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## EXPERIENCE STATS @@ -66,7 +66,7 @@ local function Experience_OnEvent(self, ...) self.text:SetAllPoints(self) self.text:SetJustifyH("CENTER") self.barframe:Hide() - self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,SuperVillain.db.SVStats.fontOutline) + self.text:SetFontTemplate(SV.Shared:Fetch("font",SV.db.SVStats.font),SV.db.SVStats.fontSize,SV.db.SVStats.fontOutline) end local f, g = getUnitXP("player") local h = GetXPExhaustion() @@ -88,7 +88,7 @@ local function ExperienceBar_OnEvent(self, ...) if (not self.barframe:IsShown())then self.barframe:Show() self.barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\STAT-XP") - self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,"NONE") + self.text:SetFontTemplate(SV.Shared:Fetch("font",SV.db.SVStats.font),SV.db.SVStats.fontSize,"NONE") end if not self.barframe.bar.extra:IsShown() then self.barframe.bar.extra:Show() diff --git a/Interface/AddOns/SVUI/packages/stats/stats/friends.lua b/Interface/AddOns/SVUI/packages/stats/stats/friends.lua index d4f4725..4fbf942 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/friends.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/friends.lua @@ -49,8 +49,8 @@ local twipe, tsort = table.wipe, table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L, Registry = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## LOCALIZED GLOBALS @@ -74,7 +74,7 @@ local StatEvents = { "CHAT_MSG_SYSTEM" }; -SuperVillain.SystemAlert.SET_BN_BROADCAST={ +SV.SystemAlert.SET_BN_BROADCAST={ text = BN_BROADCAST_TOOLTIP, button1 = ACCEPT, button2 = CANCEL, @@ -93,7 +93,7 @@ SuperVillain.SystemAlert.SET_BN_BROADCAST={ preferredIndex = 3 }; -local menuFrame = CreateFrame("Frame", "FriendDatatextRightClickMenu", SuperVillain.UIParent, "UIDropDownMenuTemplate") +local menuFrame = CreateFrame("Frame", "FriendDatatextRightClickMenu", SV.UIParent, "UIDropDownMenuTemplate") local menuList = { { text = OPTIONS_MENU, isTitle = true,notCheckable=true}, { text = INVITE, hasArrow = true,notCheckable=true, }, @@ -105,7 +105,7 @@ local menuList = { { text = "|cffFF0000"..AFK.."|r", notCheckable=true, func = function() if not IsChatAFK() then SendChatMessage("", "AFK") end end }, }, }, - { text = BN_BROADCAST_TOOLTIP, notCheckable=true, func = function() SuperVillain:StaticPopup_Show("SET_BN_BROADCAST") end }, + { text = BN_BROADCAST_TOOLTIP, notCheckable=true, func = function() SV:StaticPopup_Show("SET_BN_BROADCAST") end }, } local function inviteClick(self, name) @@ -373,12 +373,12 @@ local function OnEnter(self) end local FriendsColorUpdate = function() - hexColor = SuperVillain:HexColor("highlight") + hexColor = SV:HexColor("highlight") if lastPanel ~= nil then OnEvent(lastPanel,'SVUI_COLOR_UPDATE') end end -SuperVillain.Registry:NewCallback(FriendsColorUpdate) +Registry:NewCallback(FriendsColorUpdate) MOD:Extend('Friends', StatEvents, OnEvent, nil, Click, OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/gold.lua b/Interface/AddOns/SVUI/packages/stats/stats/gold.lua index 16a0c71..51e69b8 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/gold.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/gold.lua @@ -49,8 +49,8 @@ local twipe, tsort = table.wipe, table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## GOLD STATS diff --git a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua index 56b3c40..dba2cf8 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua @@ -36,8 +36,8 @@ local twipe, tsort = table.wipe, table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L, Registry = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## GUILD STATS @@ -49,7 +49,7 @@ local playerRealm = GetRealmName(); local StatEvents = {"PLAYER_ENTERING_WORLD","GUILD_ROSTER_UPDATE","GUILD_XP_UPDATE","PLAYER_GUILD_UPDATE","GUILD_MOTD"}; local updatedString = ""; -local patternColor = SuperVillain:HexColor(0.75,0.9,1); +local patternColor = SV:HexColor(0.75,0.9,1); local pattern1 = ("|cff%s%s"):format(patternColor, GUILD_EXPERIENCE_CURRENT); local pattern2 = ("|cff%s%s"):format(patternColor, GUILD_EXPERIENCE_DAILY); local guildFormattedName = "%s: %d/%d"; @@ -74,7 +74,7 @@ local MobileFlagFormat = { [2] = function()return "|TInterface\\ChatFrame\\UI-ChatIcon-ArmoryChat-BusyMobile:14:14:0:0:16:16:0:16:0:16|t" end }; -local GuildDatatTextRightClickMenu = CreateFrame("Frame", "GuildDatatTextRightClickMenu", SuperVillain.UIParent, "UIDropDownMenuTemplate") +local GuildDatatTextRightClickMenu = CreateFrame("Frame", "GuildDatatTextRightClickMenu", SV.UIParent, "UIDropDownMenuTemplate") local MenuMap = { {text = OPTIONS_MENU, isTitle = true, notCheckable = true}, @@ -144,8 +144,8 @@ local GuildStatEventHandler = { ["GUILD_MOTD"] = function(arg1, arg2) GuildStatMOTD = arg2 end, - ["SVUI_FORCE_RUN"] = SuperVillain.fubar, - ["SVUI_COLOR_UPDATE"] = SuperVillain.fubar + ["SVUI_FORCE_RUN"] = SV.fubar, + ["SVUI_COLOR_UPDATE"] = SV.fubar }; local function MenuInvite(self, unit) @@ -248,7 +248,7 @@ local function Guild_OnEnter(self, _, ap) MOD.tooltip:AddLine(' ') MOD.tooltip:AddLine(("%s |cffaaaaaa- |cffffffff%s"):format(GUILD_MOTD, GuildStatMOTD), 0.75, 0.9, 1, 1) end - local av = SuperVillain:HexColor(0.75,0.9,1) + local av = SV:HexColor(0.75,0.9,1) local _, _, standingID, barMin, barMax, barValue = GetGuildFactionInfo() if standingID ~= 8 then barMax = barMax - barMin; @@ -298,12 +298,12 @@ local function Guild_OnEnter(self, _, ap) end local GuildColorUpdate = function() - local hexColor = SuperVillain:HexColor("highlight"); + local hexColor = SV:HexColor("highlight"); updatedString = join("", GUILD, ": |cff", hexColor, "%d|r") if currentObject ~= nil then Guild_OnEvent(currentObject, 'SVUI_COLOR_UPDATE') end end -SuperVillain.Registry:NewCallback(GuildColorUpdate) +Registry:NewCallback(GuildColorUpdate) MOD:Extend('Guild', StatEvents, Guild_OnEvent, nil, Guild_OnClick, Guild_OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/hps.lua b/Interface/AddOns/SVUI/packages/stats/stats/hps.lua index 1a47746..734575f 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/hps.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/hps.lua @@ -32,8 +32,8 @@ local max = math.max; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L, Registry = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## CALL TO ARMS STATS @@ -124,11 +124,11 @@ local function HPS_OnEvent(self, event, ...) end local HPSColorUpdate = function() - hexColor = SuperVillain:HexColor("highlight"); + hexColor = SV:HexColor("highlight"); if lastPanel ~= nil then HPS_OnEvent(lastPanel) end end -SuperVillain.Registry:NewCallback(HPSColorUpdate) +Registry:NewCallback(HPSColorUpdate) MOD:Extend('HPS', StatEvents, HPS_OnEvent, nil, HPS_OnClick, HPS_OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua index 07cd838..9396f07 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua @@ -33,8 +33,8 @@ local format, gsub = string.format, string.gsub; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## REPUTATION STATS diff --git a/Interface/AddOns/SVUI/packages/stats/stats/system.lua b/Interface/AddOns/SVUI/packages/stats/stats/system.lua index 255bba8..f043880 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/system.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/system.lua @@ -37,8 +37,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## SYSTEM STATS (Credit: Elv) diff --git a/Interface/AddOns/SVUI/packages/stats/stats/time.lua b/Interface/AddOns/SVUI/packages/stats/stats/time.lua index ecb0e57..2bc1030 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/time.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/time.lua @@ -35,8 +35,8 @@ local floor = math.floor; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L, Registry = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## TIME STATS (Credit: Elv) @@ -192,9 +192,9 @@ function Update(self, t) if int > 0 then return end if GameTimeFrame.flashInvite then - SuperVillain.Animate:Flash(self, 0.53) + SV.Animate:Flash(self, 0.53) else - SuperVillain.Animate:StopFlash(self) + SV.Animate:StopFlash(self) end if enteredFrame then @@ -223,7 +223,7 @@ function Update(self, t) end local ColorUpdate = function() - local hexColor = SuperVillain:HexColor("highlight") + local hexColor = SV:HexColor("highlight") europeDisplayFormat = join("", "%02d|cff", hexColor, ":|r%02d") ukDisplayFormat = join("", "", "%d|cff", hexColor, ":|r%02d|cff", hexColor, " %s|r") if lastPanel ~= nil then @@ -231,6 +231,6 @@ local ColorUpdate = function() end end -SuperVillain.Registry:NewCallback(ColorUpdate) +Registry:NewCallback(ColorUpdate) MOD:Extend('Time', {"UPDATE_INSTANCE_INFO"}, OnEvent, Update, Click, OnEnter, OnLeave) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/tokens.lua b/Interface/AddOns/SVUI/packages/stats/stats/tokens.lua index 4944d9e..1825913 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/tokens.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/tokens.lua @@ -31,8 +31,8 @@ local twipe = table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVStats; +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVStats; --[[ ########################################################## GOLD STATS diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index 86c1ebe..d5e7c9a 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -36,8 +36,8 @@ local twipe, tconcat = table.wipe, table.concat; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(select(2, ...)); +local CONFIGS = SV.Configs local MOD = {}; --[[ ########################################################## @@ -302,7 +302,7 @@ function MOD:INSPECT_READY(_,guid) if MOD.lastGUID ~= guid then return end local unit = "mouseover" if UnitExists(unit) then - local itemLevel = SuperVillain:ParseGearSlots(unit, true) + local itemLevel = SV:ParseGearSlots(unit, true) local spec = GetTalentSpec(unit) inspectCache[guid] = {time = GetTime()} if spec then @@ -478,7 +478,7 @@ local _hook_GameTooltip_OnTooltipSetUnit = function(self) if(creatureType) then local family = UnitCreatureFamily(unit) or creatureType - if(SuperVillain.class == "HUNTER" and creatureType == PET_TYPE_SUFFIX[8] and (family and TAMABLE_FAMILIES[family])) then + if(SV.class == "HUNTER" and creatureType == PET_TYPE_SUFFIX[8] and (family and TAMABLE_FAMILIES[family])) then local hunterLevel = UnitLevel("player") if(unitLevel <= hunterLevel) then TamablePet = true @@ -577,7 +577,7 @@ local _hook_GameTooltip_ShowStatusBar = function(self, ...) local barName = ("%sStatusBar%d"):format(name, self.shownStatusBars) local bar = _G[barName] if bar and not bar.styled then - bar:Formula409() + bar:RemoveTextures() bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) bar:SetFixedPanelTemplate('Inset',true) if not bar.border then @@ -656,7 +656,7 @@ local _hook_GameTooltip_OnTooltipSetSpell = function(self) end local _hook_GameTooltip_SetDefaultAnchor = function(self, parent) - if SuperVillain.db.SVTip.enable ~= true then return end + if SV.db.SVTip.enable ~= true then return end if(self:GetAnchorType() ~= "ANCHOR_NONE") then return end if InCombatLockdown() and MOD.db.visibility.combat then self:Hide() @@ -670,13 +670,13 @@ local _hook_GameTooltip_SetDefaultAnchor = function(self, parent) self:SetOwner(parent, "ANCHOR_NONE") end end - if not SuperVillain:TestMovableMoved("SVUI_ToolTip_MOVE")then + if not SV:TestMovableMoved("SVUI_ToolTip_MOVE")then if(SVUI_ContainerFrame and SVUI_ContainerFrame:IsShown()) then self:SetPoint("BOTTOMLEFT", SVUI_ContainerFrame, "TOPLEFT", 0, 18) elseif(RightSuperDock:GetAlpha() == 1 and RightSuperDock:IsShown()) then self:SetPoint("BOTTOMRIGHT", RightSuperDock, "TOPRIGHT", -44, 18) else - self:SetPoint("BOTTOMRIGHT", SuperVillain.UIParent, "BOTTOMRIGHT", -44, 78) + self:SetPoint("BOTTOMRIGHT", SV.UIParent, "BOTTOMRIGHT", -44, 78) end else local point = Pinpoint(SVUI_ToolTip_MOVE) @@ -778,7 +778,7 @@ local _hook_OnTipHide = function(self) end local function ApplyTooltipSkins() - local barHeight = SuperVillain.db.SVTip.healthBar.height + local barHeight = SV.db.SVTip.healthBar.height for i, tooltip in pairs(tooltips) do if(not tooltip) then return end @@ -875,44 +875,44 @@ local function ApplyTooltipSkins() tooltip.SuperBorder = mask if tooltip.Background then - tooltip.Background:SetTexture("") + tooltip.Background:SetTexture(0,0,0,0) end if tooltip.Delimiter1 then - tooltip.Delimiter1:SetTexture("") - tooltip.Delimiter2:SetTexture("") + tooltip.Delimiter1:SetTexture(0,0,0,0) + tooltip.Delimiter2:SetTexture(0,0,0,0) end if tooltip.BorderTop then - tooltip.BorderTop:SetTexture("") + tooltip.BorderTop:SetTexture(0,0,0,0) end if tooltip.BorderTopLeft then - tooltip.BorderTopLeft:SetTexture("") + tooltip.BorderTopLeft:SetTexture(0,0,0,0) end if tooltip.BorderTopRight then - tooltip.BorderTopRight:SetTexture("") + tooltip.BorderTopRight:SetTexture(0,0,0,0) end if tooltip.BorderLeft then - tooltip.BorderLeft:SetTexture("") + tooltip.BorderLeft:SetTexture(0,0,0,0) end if tooltip.BorderRight then - tooltip.BorderRight:SetTexture("") + tooltip.BorderRight:SetTexture(0,0,0,0) end if tooltip.BorderBottom then - tooltip.BorderBottom:SetTexture("") + tooltip.BorderBottom:SetTexture(0,0,0,0) end if tooltip.BorderBottomRight then - tooltip.BorderBottomRight:SetTexture("") + tooltip.BorderBottomRight:SetTexture(0,0,0,0) end if tooltip.BorderBottomLeft then - tooltip.BorderBottomLeft:SetTexture("") + tooltip.BorderBottomLeft:SetTexture(0,0,0,0) end tooltip:SetBackdrop({ @@ -946,28 +946,28 @@ end function MOD:Load() BNToastFrame:Point("TOPRIGHT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, -10) - SuperVillain:SetSVMovable(BNToastFrame, L["BNet Frame"], nil, nil, nil, nil, "BNET") + SV:SetSVMovable(BNToastFrame, L["BNet Frame"], nil, nil, nil, nil, "BNET") NewHook(BNToastFrame, "SetPoint", _hook_BNToastOnShow) - if not SuperVillain.db.SVTip.enable then return end + if not SV.db.SVTip.enable then return end - local anchor = CreateFrame("Frame", "SVUI_ToolTip", SuperVillain.UIParent) + local anchor = CreateFrame("Frame", "SVUI_ToolTip", SV.UIParent) anchor:Point("BOTTOMRIGHT", RightSuperDock, "TOPRIGHT", 0, 60) anchor:Size(130, 20) anchor:SetFrameLevel(anchor:GetFrameLevel() + 50) - SuperVillain:SetSVMovable(anchor, L["Tooltip"]) + SV:SetSVMovable(anchor, L["Tooltip"]) local barHeight = self.db.healthBar.height ApplyTooltipSkins() GameTooltipStatusBar:Height(barHeight) - GameTooltipStatusBar:SetStatusBarTexture(SuperVillain.Media.bar.default) + GameTooltipStatusBar:SetStatusBarTexture(SV.Media.bar.default) GameTooltipStatusBar:ClearAllPoints() GameTooltipStatusBar:SetPoint("BOTTOMLEFT", GameTooltip.SuperBorder, "BOTTOMLEFT", 3, 3) GameTooltipStatusBar:SetPoint("BOTTOMRIGHT", GameTooltip.SuperBorder, "BOTTOMRIGHT", -3, 3) GameTooltipStatusBar.text = GameTooltipStatusBar:CreateFontString(nil, "OVERLAY") GameTooltipStatusBar.text:Point("CENTER", GameTooltipStatusBar, "CENTER", 0, 0) - GameTooltipStatusBar.text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.healthBar.font), MOD.db.healthBar.fontSize, "OUTLINE") + GameTooltipStatusBar.text:SetFontTemplate(SV.Shared:Fetch("font", MOD.db.healthBar.font), MOD.db.healthBar.fontSize, "OUTLINE") if not GameTooltipStatusBar.border then local border = CreateFrame("Frame", nil, GameTooltipStatusBar) @@ -1024,4 +1024,4 @@ CONFIGS["SVTip"] = { }, } -SuperVillain.Registry:NewPackage(MOD, "SVTip") \ No newline at end of file +Registry:NewPackage(MOD, "SVTip") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index bcf0679..0836e3c 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -41,10 +41,10 @@ local NewHook = hooksecurefunc; GET ADDON DATA AND TEST FOR oUF ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L, Registry = unpack(select(2, ...)); local _, ns = ... -local oUF_SuperVillain = ns.oUF -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +local oUF_Villain = ns.oUF +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## MODULE AND INNER CLASSES @@ -55,7 +55,7 @@ MOD.Units = {} MOD.Headers = {} MOD.Roster = {} -oUF_SuperVillain.SVConfigs = {} +oUF_Villain.SVConfigs = {} --[[ ########################################################## LOCALS @@ -155,8 +155,8 @@ do end end - function oUF_SuperVillain:DisableBlizzard(unit) - if(not SuperVillain.db.SVUnit.enable) then return end + function oUF_Villain:DisableBlizzard(unit) + if(not SV.db.SVUnit.enable) then return end if (not unit) or InCombatLockdown() then return end if (unit == "player") then @@ -296,35 +296,35 @@ function MOD:RestrictChildren(parentFrame, ...) end function MOD:ResetUnitOptions(unit) - SuperVillain.db:SetDefault("SVUnit", unit) + SV.db:SetDefault("SVUnit", unit) self:RefreshUnitFrames() end function MOD:RefreshUnitColors() - local db = SuperVillain.db.media.unitframes + local db = SV.db.media.unitframes for i, setting in pairs(db) do if setting and type(setting) == "table" then if(setting[1]) then - oUF_SuperVillain.colors[i] = setting + oUF_Villain.colors[i] = setting else local bt = {} for x, color in pairs(setting) do if(color)then bt[x] = color end - oUF_SuperVillain.colors[i] = bt + oUF_Villain.colors[i] = bt end end elseif setting then - oUF_SuperVillain.colors[i] = setting + oUF_Villain.colors[i] = setting end end local r, g, b = db.health[1], db.health[2], db.health[3] - oUF_SuperVillain.colors.smooth = {1, 0, 0, 1, 1, 0, r, g, b} + oUF_Villain.colors.smooth = {1, 0, 0, 1, 1, 0, r, g, b} - oUF_SuperVillain.SVConfigs.classbackdrop = SuperVillain.db.SVUnit.classbackdrop - oUF_SuperVillain.SVConfigs.healthclass = SuperVillain.db.SVUnit.healthclass - oUF_SuperVillain.SVConfigs.colorhealthbyvalue = SuperVillain.db.SVUnit.colorhealthbyvalue + oUF_Villain.SVConfigs.classbackdrop = SV.db.SVUnit.classbackdrop + oUF_Villain.SVConfigs.healthclass = SV.db.SVUnit.healthclass + oUF_Villain.SVConfigs.colorhealthbyvalue = SV.db.SVUnit.colorhealthbyvalue end function MOD:RefreshAllUnitMedia() @@ -358,9 +358,9 @@ function MOD:RefreshUnitFrames() if raidDebuffs then raidDebuffs:ResetDebuffData() if groupType == "party" or groupType == "raid" then - raidDebuffs:RegisterDebuffs(SuperVillain.db.filter["Raid"]) + raidDebuffs:RegisterDebuffs(SV.db.filter["Raid"]) else - raidDebuffs:RegisterDebuffs(SuperVillain.db.filter["CC"]) + raidDebuffs:RegisterDebuffs(SV.db.filter["CC"]) end end @@ -370,8 +370,8 @@ function MOD:RefreshUnitFrames() group:SetConfigEnvironment() end end - if SuperVillain.db.SVUnit.disableBlizzard then - oUF_SuperVillain:DisableBlizzard('party') + if SV.db.SVUnit.disableBlizzard then + oUF_Villain:DisableBlizzard('party') end collectgarbage("collect") end @@ -380,10 +380,10 @@ function MOD:RefreshUnitMedia(unitName) local db = MOD.db local key = unitName or self.___key if(not (db and db.enable) or not self) then return end - local CURRENT_BAR_TEXTURE = SuperVillain.Shared:Fetch("statusbar", db.statusbar) - local CURRENT_AURABAR_TEXTURE = SuperVillain.Shared:Fetch("statusbar", db.auraBarStatusbar); - local CURRENT_FONT = SuperVillain.Shared:Fetch("font", db.font) - local CURRENT_AURABAR_FONT = SuperVillain.Shared:Fetch("font", db.auraFont); + local CURRENT_BAR_TEXTURE = SV.Shared:Fetch("statusbar", db.statusbar) + local CURRENT_AURABAR_TEXTURE = SV.Shared:Fetch("statusbar", db.auraBarStatusbar); + local CURRENT_FONT = SV.Shared:Fetch("font", db.font) + local CURRENT_AURABAR_FONT = SV.Shared:Fetch("font", db.auraFont); local CURRENT_AURABAR_FONTSIZE = db.auraFontSize local CURRENT_AURABAR_FONTOUTLINE = db.auraFontOutline local unitDB = db[key] @@ -392,11 +392,11 @@ function MOD:RefreshUnitMedia(unitName) if(panel) then if(panel.Name and unitDB.name) then if(db.grid.enable and unitDB.gridAllowed) then - panel.Name:SetFont(SuperVillain.Media.font.pixel, 8, "MONOCHROMEOUTLINE") + panel.Name:SetFont(SV.Media.font.pixel, 8, "MONOCHROMEOUTLINE") panel.Name:SetShadowOffset(1, -1) panel.Name:SetShadowColor(0, 0, 0, 0.75) else - panel.Name:SetFont(SuperVillain.Shared:Fetch("font", unitDB.name.font), unitDB.name.fontSize, unitDB.name.fontOutline) + panel.Name:SetFont(SV.Shared:Fetch("font", unitDB.name.font), unitDB.name.fontSize, unitDB.name.fontOutline) panel.Name:SetShadowOffset(2, -2) panel.Name:SetShadowColor(0, 0, 0, 1) end @@ -424,8 +424,8 @@ function MOD:RefreshUnitMedia(unitName) cr,cg,cb = unitDB.castbar.sparkColor[1], unitDB.castbar.sparkColor[2], unitDB.castbar.sparkColor[3]; self.Castbar.SparkColor = {cr,cg,cb} else - self.Castbar.CastColor = oUF_SuperVillain.colors.casting - self.Castbar.SparkColor = oUF_SuperVillain.colors.spark + self.Castbar.CastColor = oUF_Villain.colors.casting + self.Castbar.SparkColor = oUF_Villain.colors.spark end end if(self.AuraBars and (unitDB.aurabar and unitDB.aurabar.enable)) then @@ -434,13 +434,13 @@ function MOD:RefreshUnitMedia(unitName) ab.textFont = CURRENT_AURABAR_FONT ab.textSize = db.auraFontSize ab.textOutline = db.auraFontOutline - ab.buffColor = oUF_SuperVillain.colors.buff_bars + ab.buffColor = oUF_Villain.colors.buff_bars if MOD.db.auraBarByType then ab.debuffColor = nil; - ab.defaultDebuffColor = oUF_SuperVillain.colors.debuff_bars + ab.defaultDebuffColor = oUF_Villain.colors.debuff_bars else - ab.debuffColor = oUF_SuperVillain.colors.debuff_bars + ab.debuffColor = oUF_Villain.colors.debuff_bars ab.defaultDebuffColor = nil end end @@ -568,7 +568,7 @@ function MOD:RefreshUnitLayout(frame, template) cX = db.name.xOffset cY = db.name.yOffset nametext:ClearAllPoints() - SuperVillain:ReversePoint(nametext, point, infoPanel, cX, cY) + SV:ReversePoint(nametext, point, infoPanel, cX, cY) if(nametext.initialAnchor:find("RIGHT")) then nametext:SetJustifyH("RIGHT") @@ -600,7 +600,7 @@ function MOD:RefreshUnitLayout(frame, template) cX = db.health.xOffset cY = db.health.yOffset healthtext:ClearAllPoints() - SuperVillain:ReversePoint(healthtext, point, infoPanel, cX, cY) + SV:ReversePoint(healthtext, point, infoPanel, cX, cY) frame:Tag(healthtext, db.health.tags) end end @@ -616,7 +616,7 @@ function MOD:RefreshUnitLayout(frame, template) cX = db.power.xOffset cY = db.power.yOffset powertext:ClearAllPoints() - SuperVillain:ReversePoint(powertext, point, infoPanel, cX, cY) + SV:ReversePoint(powertext, point, infoPanel, cX, cY) if db.power.attachTextToPower then powertext:SetParent(frame.Power) else @@ -843,7 +843,7 @@ function MOD:RefreshUnitLayout(frame, template) castbar.Spark[1]:SetAllPoints(castbar.Spark) castbar.Spark[2]:FillInner(castbar.Spark, 4, 4) end - castbar.Spark.SetHeight = SuperVillain.fubar + castbar.Spark.SetHeight = SV.fubar end castbar:SetFrameStrata("HIGH") if castbar.Holder then @@ -880,14 +880,14 @@ function MOD:RefreshUnitLayout(frame, template) cr,cg,cb = db.castbar.sparkColor[1], db.castbar.sparkColor[2], db.castbar.sparkColor[3]; castbar.SparkColor = {cr,cg,cb} else - castbar.CastColor = oUF_SuperVillain.colors.casting - castbar.SparkColor = oUF_SuperVillain.colors.spark + castbar.CastColor = oUF_Villain.colors.casting + castbar.SparkColor = oUF_Villain.colors.spark end if db.castbar.enable and not frame:IsElementEnabled('Castbar')then frame:EnableElement('Castbar') elseif not db.castbar.enable and frame:IsElementEnabled('Castbar')then - SuperVillain:AddonMessage("No castbar") + SV:AddonMessage("No castbar") frame:DisableElement('Castbar') end end @@ -929,7 +929,7 @@ function MOD:RefreshUnitLayout(frame, template) local attachTo = FindAnchorFrame(frame, db.buffs.attachTo, db.debuffs.attachTo == 'BUFFS' and db.buffs.attachTo == 'DEBUFFS') - SuperVillain:ReversePoint(buffs, db.buffs.anchorPoint, attachTo, db.buffs.xOffset + BOTTOM_MODIFIER, db.buffs.yOffset) + SV:ReversePoint(buffs, db.buffs.anchorPoint, attachTo, db.buffs.xOffset + BOTTOM_MODIFIER, db.buffs.yOffset) buffs:SetWidth((auraSize + buffs.spacing) * perRow) buffs:Height((auraSize + buffs.spacing) * numRows) buffs["growth-y"] = db.buffs.verticalGrowth; @@ -961,7 +961,7 @@ function MOD:RefreshUnitLayout(frame, template) local attachTo = FindAnchorFrame(frame, db.debuffs.attachTo, db.debuffs.attachTo == 'BUFFS' and db.buffs.attachTo == 'DEBUFFS') - SuperVillain:ReversePoint(debuffs, db.debuffs.anchorPoint, attachTo, db.debuffs.xOffset + BOTTOM_MODIFIER, db.debuffs.yOffset) + SV:ReversePoint(debuffs, db.debuffs.anchorPoint, attachTo, db.debuffs.xOffset + BOTTOM_MODIFIER, db.debuffs.yOffset) debuffs:SetWidth((auraSize + debuffs.spacing) * perRow) debuffs:Height((auraSize + debuffs.spacing) * numRows) debuffs["growth-y"] = db.debuffs.verticalGrowth; @@ -1009,13 +1009,13 @@ function MOD:RefreshUnitLayout(frame, template) auraBar:Point("BOTTOMLEFT", attachTo, "TOPLEFT", 1, preOffset) auraBar.down = false end - auraBar.buffColor = oUF_SuperVillain.colors.buff_bars + auraBar.buffColor = oUF_Villain.colors.buff_bars if self.db.auraBarByType then auraBar.debuffColor = nil; - auraBar.defaultDebuffColor = oUF_SuperVillain.colors.debuff_bars + auraBar.defaultDebuffColor = oUF_Villain.colors.debuff_bars else - auraBar.debuffColor = oUF_SuperVillain.colors.debuff_bars + auraBar.debuffColor = oUF_Villain.colors.debuff_bars auraBar.defaultDebuffColor = nil end @@ -1049,7 +1049,7 @@ function MOD:RefreshUnitLayout(frame, template) else raidIcon:SetAlpha(1) raidIcon:Size(size) - SuperVillain:ReversePoint(raidIcon, ico.raidicon.attachTo, healthPanel, ico.raidicon.xOffset, ico.raidicon.yOffset) + SV:ReversePoint(raidIcon, ico.raidicon.attachTo, healthPanel, ico.raidicon.xOffset, ico.raidicon.yOffset) end else frame:DisableElement('RaidIcon') @@ -1074,7 +1074,7 @@ function MOD:RefreshUnitLayout(frame, template) else lfd:SetAlpha(1) lfd:Size(size) - SuperVillain:ReversePoint(lfd, ico.roleIcon.attachTo, healthPanel, ico.roleIcon.xOffset, ico.roleIcon.yOffset) + SV:ReversePoint(lfd, ico.roleIcon.attachTo, healthPanel, ico.roleIcon.xOffset, ico.roleIcon.yOffset) end else frame:DisableElement('LFDRole') @@ -1100,7 +1100,7 @@ function MOD:RefreshUnitLayout(frame, template) else roles:SetAlpha(1) roles:Size(size) - SuperVillain:ReversePoint(roles, ico.raidRoleIcons.attachTo, healthPanel, ico.raidRoleIcons.xOffset, ico.raidRoleIcons.yOffset) + SV:ReversePoint(roles, ico.raidRoleIcons.attachTo, healthPanel, ico.raidRoleIcons.xOffset, ico.raidRoleIcons.yOffset) end else roles:Hide() @@ -1153,22 +1153,6 @@ function MOD:RefreshUnitLayout(frame, template) end end end - - if(frame.GPS) then - if(template ~= "target") then - frame.GPS.OnlyProximity = self.db.gpsLowHealth - end - if(db.gps) then - local actualSz = min(frame.GPS.DefaultSize, (UNIT_HEIGHT - 2)) - if(not frame:IsElementEnabled("GPS")) then - frame:EnableElement("GPS") - end - else - if(frame:IsElementEnabled("GPS")) then - frame:DisableElement("GPS") - end - end - end end --[[ ########################################################## @@ -1212,7 +1196,7 @@ local _ENV = { end return format("|cff%02x%02x%02x", r*255, g*255, b*255) end, - ColorGradient = oUF_SuperVillain.ColorGradient, + ColorGradient = oUF_Villain.ColorGradient, }; --[[ ########################################################## @@ -1222,27 +1206,27 @@ GROUP CONFIG VISIBILITY local function SetProxyEnv() if(_PROXY ~= nil) then return end _PROXY = setmetatable(_ENV, {__index = _G, __newindex = function(_,key,value) _G[key]=value end}); - tags['name:color'] = oUF_SuperVillain.Tags.Methods['name:color'] + tags['name:color'] = oUF_Villain.Tags.Methods['name:color'] for i=1, 30 do - tags['name:'..i] = oUF_SuperVillain.Tags.Methods['name:'..i] + tags['name:'..i] = oUF_Villain.Tags.Methods['name:'..i] end - tags['name:grid'] = oUF_SuperVillain.Tags.Methods['name:grid'] - tags['health:color'] = oUF_SuperVillain.Tags.Methods['health:color'] - tags['health:current'] = oUF_SuperVillain.Tags.Methods['health:current'] - tags['health:deficit'] = oUF_SuperVillain.Tags.Methods['health:deficit'] - tags['health:curpercent'] = oUF_SuperVillain.Tags.Methods['health:curpercent'] - tags['health:curmax'] = oUF_SuperVillain.Tags.Methods['health:curmax'] - tags['health:curmax-percent'] = oUF_SuperVillain.Tags.Methods['health:curmax-percent'] - tags['health:max'] = oUF_SuperVillain.Tags.Methods['health:max'] - tags['health:percent'] = oUF_SuperVillain.Tags.Methods['health:percent'] - tags['power:color'] = oUF_SuperVillain.Tags.Methods['power:color'] - tags['power:current'] = oUF_SuperVillain.Tags.Methods['power:current'] - tags['power:deficit'] = oUF_SuperVillain.Tags.Methods['power:deficit'] - tags['power:curpercent'] = oUF_SuperVillain.Tags.Methods['power:curpercent'] - tags['power:curmax'] = oUF_SuperVillain.Tags.Methods['power:curmax'] - tags['power:curmax-percent'] = oUF_SuperVillain.Tags.Methods['power:curmax-percent'] - tags['power:max'] = oUF_SuperVillain.Tags.Methods['power:max'] - tags['power:percent'] = oUF_SuperVillain.Tags.Methods['power:percent'] + tags['name:grid'] = oUF_Villain.Tags.Methods['name:grid'] + tags['health:color'] = oUF_Villain.Tags.Methods['health:color'] + tags['health:current'] = oUF_Villain.Tags.Methods['health:current'] + tags['health:deficit'] = oUF_Villain.Tags.Methods['health:deficit'] + tags['health:curpercent'] = oUF_Villain.Tags.Methods['health:curpercent'] + tags['health:curmax'] = oUF_Villain.Tags.Methods['health:curmax'] + tags['health:curmax-percent'] = oUF_Villain.Tags.Methods['health:curmax-percent'] + tags['health:max'] = oUF_Villain.Tags.Methods['health:max'] + tags['health:percent'] = oUF_Villain.Tags.Methods['health:percent'] + tags['power:color'] = oUF_Villain.Tags.Methods['power:color'] + tags['power:current'] = oUF_Villain.Tags.Methods['power:current'] + tags['power:deficit'] = oUF_Villain.Tags.Methods['power:deficit'] + tags['power:curpercent'] = oUF_Villain.Tags.Methods['power:curpercent'] + tags['power:curmax'] = oUF_Villain.Tags.Methods['power:curmax'] + tags['power:curmax-percent'] = oUF_Villain.Tags.Methods['power:curmax-percent'] + tags['power:max'] = oUF_Villain.Tags.Methods['power:max'] + tags['power:percent'] = oUF_Villain.Tags.Methods['power:percent'] end local function ChangeGroupIndex(self) @@ -1372,9 +1356,9 @@ end function MOD:KillBlizzardRaidFrames() if InCombatLockdown() then return end - CompactRaidFrameManager:MUNG() - CompactRaidFrameContainer:MUNG() - CompactUnitFrameProfiles:MUNG() + CompactRaidFrameManager:Die() + CompactRaidFrameContainer:Die() + CompactUnitFrameProfiles:Die() local crfmTest = CompactRaidFrameManager_GetSetting("IsShown") if crfmTest and crfmTest ~= "0" then CompactRaidFrameManager_SetSetting("IsShown","0") @@ -1403,7 +1387,7 @@ end function MOD:ADDON_LOADED(event, addon) self:KillBlizzardRaidFrames() if addon == 'Blizzard_ArenaUI' then - oUF_SuperVillain:DisableBlizzard('arena') + oUF_Villain:DisableBlizzard('arena') self:UnregisterEvent("ADDON_LOADED") end end @@ -1421,22 +1405,22 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:ReLoad() - if(not SuperVillain.db.SVUnit.enable) then return end + if(not SV.db.SVUnit.enable) then return end self:RefreshUnitFrames() end function MOD:Load() - if(not SuperVillain.db.SVUnit.enable) then return end + if(not SV.db.SVUnit.enable) then return end self:RefreshUnitColors() - local SVUI_UnitFrameParent = CreateFrame("Frame", "SVUI_UnitFrameParent", SuperVillain.UIParent, "SecureHandlerStateTemplate") + local SVUI_UnitFrameParent = CreateFrame("Frame", "SVUI_UnitFrameParent", SV.UIParent, "SecureHandlerStateTemplate") RegisterStateDriver(SVUI_UnitFrameParent, "visibility", "[petbattle] hide; show") self:FrameForge() self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("PLAYER_REGEN_DISABLED") - if(SuperVillain.db.SVUnit.disableBlizzard) then + if(SV.db.SVUnit.disableBlizzard) then self:KillBlizzardRaidFrames() NewHook("CompactUnitFrame_RegisterEvents", CompactUnitFrame_UnregisterEvents) NewHook("UnitFrameThreatIndicator_Initialize", UnitFrameThreatIndicator_Hook) @@ -1463,7 +1447,7 @@ function MOD:Load() if not IsAddOnLoaded("Blizzard_ArenaUI") then self:RegisterEvent("ADDON_LOADED") else - oUF_SuperVillain:DisableBlizzard("arena") + oUF_Villain:DisableBlizzard("arena") end self:RegisterEvent("GROUP_ROSTER_UPDATE", "KillBlizzardRaidFrames") @@ -1483,4 +1467,4 @@ end DEFINE CONFIG AND REGISTER ########################################################## ]]-- -SuperVillain.Registry:NewPackage(MOD, "SVUnit") \ No newline at end of file +Registry:NewPackage(MOD, "SVUnit") \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/config.lua b/Interface/AddOns/SVUI/packages/unit/config.lua index 897661f..043e8ff 100644 --- a/Interface/AddOns/SVUI/packages/unit/config.lua +++ b/Interface/AddOns/SVUI/packages/unit/config.lua @@ -25,8 +25,8 @@ local select = _G.select; GET ADDON DATA AND TEST FOR oUF ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local CONFIGS = SuperVillain.Configs +local SV, L = unpack(select(2, ...)); +local CONFIGS = SV.Configs --[[ ########################################################## LOCALS @@ -277,7 +277,6 @@ CONFIGS["SVUnit"] = { ["predict"] = false, ["smartAuraDisplay"] = "DISABLED", ["middleClickFocus"] = true, - ["gps"] = true, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -1595,7 +1594,6 @@ CONFIGS["SVUnit"] = { ["colorOverride"] = "USE_DEFAULT", ["width"] = 70, ["height"] = 70, - ["gps"] = true, ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, @@ -1773,7 +1771,6 @@ CONFIGS["SVUnit"] = { ["colorOverride"] = "USE_DEFAULT", ["width"] = 75, ["height"] = 34, - ["gps"] = false, ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, @@ -1924,7 +1921,6 @@ CONFIGS["SVUnit"] = { ["colorOverride"] = "USE_DEFAULT", ["width"] = 50, ["height"] = 30, - ["gps"] = false, ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, @@ -2074,7 +2070,6 @@ CONFIGS["SVUnit"] = { ["colorOverride"] = "USE_DEFAULT", ["width"] = 50, ["height"] = 30, - ["gps"] = false, ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, diff --git a/Interface/AddOns/SVUI/packages/unit/elements/auras.lua b/Interface/AddOns/SVUI/packages/unit/elements/auras.lua index 0d3f1bf..aa8c2f0 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/auras.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/auras.lua @@ -40,14 +40,14 @@ local tremove, tsort, twipe = table.remove, table.sort, table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH"s FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); +assert(oUF_Villain, "SVUI was unable to locate oUF."); local CustomAuraFilter,CustomBarFilter; local AURA_FONT = [[Interface\AddOns\SVUI\assets\fonts\Display.ttf]]; @@ -83,8 +83,8 @@ local AuraRemover_OnClick = function(self) if not IsShiftKeyDown() then return end local name = self.name; if name then - SuperVillain:AddonMessage((L["The spell '%s' has been added to the Blocked unitframe aura filter."]):format(name)) - SuperVillain.db.filter["Blocked"][name] = {["enable"] = true, ["priority"] = 0} + SV:AddonMessage((L["The spell '%s' has been added to the Blocked unitframe aura filter."]):format(name)) + SV.db.filter["Blocked"][name] = {["enable"] = true, ["priority"] = 0} MOD:RefreshUnitFrames() end end @@ -93,8 +93,8 @@ local AuraBarRemover_OnClick = function(self) if not IsShiftKeyDown() then return end local name = self:GetParent().aura.name if name then - SuperVillain:AddonMessage((L["The spell '%s' has been added to the Blocked unitframe aura filter."]):format(name)) - SuperVillain.db.filter["Blocked"][name] = {["enable"] = true, ["priority"] = 0} + SV:AddonMessage((L["The spell '%s' has been added to the Blocked unitframe aura filter."]):format(name)) + SV.db.filter["Blocked"][name] = {["enable"] = true, ["priority"] = 0} MOD:RefreshUnitFrames() end end @@ -108,8 +108,8 @@ local PostCreateAuraIcon = function(self, aura) aura.cd.noOCC = true; aura.cd.noCooldownCount = true; aura.cd:SetReverse() - aura.overlay:SetTexture("") - aura.stealable:SetTexture("") + aura.overlay:SetTexture(0,0,0,0) + aura.stealable:SetTexture(0,0,0,0) if aura.styled then return end if aura.SetNormalTexture then aura:SetNormalTexture("") end @@ -147,10 +147,10 @@ local ColorizeAuraBars = function(self) local color local spellName = auraBar.statusBar.aura.name; local spellID = auraBar.statusBar.aura.spellID; - if(SuperVillain.db.filter["Shield"][spellName]) then - color = oUF_SuperVillain.colors.shield_bars - elseif(SuperVillain.db.media.unitframes.spellcolor[spellName]) then - color = SuperVillain.db.media.unitframes.spellcolor[spellName] + if(SV.db.filter["Shield"][spellName]) then + color = oUF_Villain.colors.shield_bars + elseif(SV.db.media.unitframes.spellcolor[spellName]) then + color = SV.db.media.unitframes.spellcolor[spellName] end if color then auraBar.statusBar:SetStatusBarColor(unpack(color)) @@ -222,7 +222,7 @@ local PostUpdateAuraIcon = function(self, unit, button, index, offset) button.icon:SetDesaturated((unit and not unit:find('arena%d')) and true or false) else local color = DebuffTypeColor[dtype] or DebuffTypeColor.none - if (name == "Unstable Affliction" or name == "Vampiric Touch") and SuperVillain.class ~= "WARLOCK" then + if (name == "Unstable Affliction" or name == "Vampiric Touch") and SV.class ~= "WARLOCK" then button:SetBackdropBorderColor(0.05, 0.85, 0.94) else button:SetBackdropBorderColor(color.r * 0.6, color.g * 0.6, color.b * 0.6) @@ -300,7 +300,7 @@ do icon.name = name; icon.priority = 0; - local shieldSpell = SuperVillain.db.filter["Shield"][name] + local shieldSpell = SV.db.filter["Shield"][name] if shieldSpell and shieldSpell.enable then icon.priority = shieldSpell.priority end @@ -315,7 +315,7 @@ do pass = true end if _test(auraDB.filterDispellable, friendly) then - if (auraType == "buffs" and not isStealable) or (auraType == "debuffs" and debuffType and not SuperVillain.Dispellable[debuffType]) or debuffType == nil then + if (auraType == "buffs" and not isStealable) or (auraType == "debuffs" and debuffType and not SV.Dispellable[debuffType]) or debuffType == nil then filtered = false end pass = true @@ -331,14 +331,14 @@ do pass = true end if _test(auraDB.filterBlocked, friendly) then - local blackListSpell = SuperVillain.db.filter["Blocked"][name] + local blackListSpell = SV.db.filter["Blocked"][name] if blackListSpell and blackListSpell.enable then filtered = false end pass = true end if _test(auraDB.filterAllowed, friendly) then - local whiteListSpell = SuperVillain.db.filter["Allowed"][name] + local whiteListSpell = SV.db.filter["Allowed"][name] if whiteListSpell and whiteListSpell.enable then filtered = true; icon.priority = whiteListSpell.priority @@ -348,8 +348,8 @@ do pass = true end local active = auraDB.useFilter - if active and active ~= "" and SuperVillain.db.filter[active] then - local spellDB = SuperVillain.db.filter[active]; + if active and active ~= "" and SV.db.filter[active] then + local spellDB = SV.db.filter[active]; if active ~= "Blocked" then if spellDB[name] and spellDB[name].enable and fromPlayer then filtered = true; @@ -390,7 +390,7 @@ do pass = true end if _test(barDB.filterDispellable, friendly) then - if (debuffType and not SuperVillain.Dispellable[debuffType]) or debuffType == nil then + if (debuffType and not SV.Dispellable[debuffType]) or debuffType == nil then filtered = false end pass = true @@ -406,12 +406,12 @@ do pass = true end if _test(barDB.filterBlocked, friendly) then - local blackList = SuperVillain.db.filter["Blocked"][name] + local blackList = SV.db.filter["Blocked"][name] if blackList and blackList.enable then filtered = false end pass = true end if _test(barDB.filterAllowed, friendly) then - local whiteList = SuperVillain.db.filter["Allowed"][name] + local whiteList = SV.db.filter["Allowed"][name] if whiteList and whiteList.enable then filtered = true elseif not pass then @@ -420,8 +420,8 @@ do pass = true end local active = barDB.useFilter - if active and active ~= "" and SuperVillain.db.filter[active] then - local spellsDB = SuperVillain.db.filter[active]; + if active and active ~= "" and SV.db.filter[active] then + local spellsDB = SV.db.filter[active]; if active ~= "Blocked" then if spellsDB[name] and spellsDB[name].enable and fromPlayer then filtered = true @@ -449,7 +449,7 @@ function MOD:CreateBuffs(frame, unit) aura.CustomFilter = CustomAuraFilter; aura:SetFrameLevel(10) aura.type = "buffs" - aura.textFont = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) + aura.textFont = SV.Shared:Fetch("font", MOD.db.auraFont) aura.textSize = MOD.db.auraFontSize aura.textOutline = MOD.db.auraFontOutline return aura @@ -464,7 +464,7 @@ function MOD:CreateDebuffs(frame, unit) aura.CustomFilter = CustomAuraFilter; aura.type = "debuffs" aura:SetFrameLevel(10) - aura.textFont = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) + aura.textFont = SV.Shared:Fetch("font", MOD.db.auraFont) aura.textSize = MOD.db.auraFontSize aura.textOutline = MOD.db.auraFontOutline return aura @@ -490,9 +490,9 @@ function MOD:CreateAuraBarHeader(frame, unitName) auraBarParent.spark = true; auraBarParent.filter = CustomBarFilter; auraBarParent.PostUpdate = ColorizeAuraBars; - auraBarParent.barTexture = SuperVillain.Shared:Fetch("statusbar", MOD.db.auraBarStatusbar) - auraBarParent.timeFont = SuperVillain.Shared:Fetch("font", "Roboto") - auraBarParent.textFont = SuperVillain.Shared:Fetch("font", MOD.db.auraFont) + auraBarParent.barTexture = SV.Shared:Fetch("statusbar", MOD.db.auraBarStatusbar) + auraBarParent.timeFont = SV.Shared:Fetch("font", "Roboto") + auraBarParent.textFont = SV.Shared:Fetch("font", MOD.db.auraFont) auraBarParent.textSize = MOD.db.auraFontSize auraBarParent.textOutline = MOD.db.auraFontOutline return auraBarParent @@ -527,7 +527,7 @@ function MOD:SmartAuraDisplay() if buffs:IsShown() then buffs:ClearAllPoints() - SuperVillain:ReversePoint(buffs, db.buffs.anchorPoint, self, db.buffs.xOffset, db.buffs.yOffset) + SV:ReversePoint(buffs, db.buffs.anchorPoint, self, db.buffs.xOffset, db.buffs.yOffset) if db.aurabar.attachTo ~= 'FRAME' then bars:ClearAllPoints() bars:SetPoint('BOTTOMLEFT', buffs, 'TOPLEFT', 0, 1) @@ -537,7 +537,7 @@ function MOD:SmartAuraDisplay() if debuffs:IsShown() then debuffs:ClearAllPoints() - SuperVillain:ReversePoint(debuffs, db.debuffs.anchorPoint, self, db.debuffs.xOffset, db.debuffs.yOffset) + SV:ReversePoint(debuffs, db.debuffs.anchorPoint, self, db.debuffs.xOffset, db.debuffs.yOffset) if db.aurabar.attachTo ~= 'FRAME' then bars:ClearAllPoints() bars:SetPoint('BOTTOMLEFT', debuffs, 'TOPLEFT', 0, 1) @@ -567,7 +567,7 @@ function MOD:UpdateAuraWatch(frame, key, override) local bwSize = db.size; if key == "pet" and not override then - local petBW = SuperVillain.db.filter["PetBuffWatch"] + local petBW = SV.db.filter["PetBuffWatch"] if(petBW) then for _, buff in pairs(petBW)do if buff.style == "text" then @@ -577,7 +577,7 @@ function MOD:UpdateAuraWatch(frame, key, override) end end else - local unitBW = SuperVillain.db.filter["BuffWatch"] + local unitBW = SV.db.filter["BuffWatch"] if(unitBW) then for _, buff in pairs(unitBW)do if buff.style == "text" then @@ -604,7 +604,7 @@ function MOD:UpdateAuraWatch(frame, key, override) end end - local fontFile = SuperVillain.Shared:Fetch("font", self.db.auraFont) + local fontFile = SV.Shared:Fetch("font", self.db.auraFont) local fontSize = self.db.auraFontSize local fontOutline = self.db.auraFontOutline diff --git a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua index bb9518e..e13c52a 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua @@ -40,14 +40,14 @@ local tremove, tcopy, twipe, tsort, tconcat = table.remove, table.copy, table.wi GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); +assert(oUF_Villain, "SVUI was unable to locate oUF."); --[[ ########################################################## LOCAL VARIABLES @@ -57,7 +57,7 @@ local ticks = {} local function SpellName(id) local name, _, _, _, _, _, _, _, _ = GetSpellInfo(id) if not name then - SuperVillain:Debugger('|cffFF9900SVUI:|r Spell not found: (#ID) '..id) + SV:Debugger('|cffFF9900SVUI:|r Spell not found: (#ID) '..id) name = "Voodoo Doll"; end return name @@ -121,7 +121,7 @@ local function SetCastTicks(bar,count,mod) for i=1,count do if not ticks[i] then ticks[i] = bar:CreateTexture(nil,'OVERLAY') - ticks[i]:SetTexture(SuperVillain.Media.bar.lazer) + ticks[i]:SetTexture(SV.Media.bar.lazer) ticks[i]:SetVertexColor(0,0,0,0.8) ticks[i]:Width(1) ticks[i]:SetHeight(bar:GetHeight()) @@ -215,7 +215,7 @@ local function SetCastbarFading(frame, castbar, texture) fader.mask:SetBackdropColor(0, 0, 0, 0) fader.mask:SetAlpha(0) fader.txt = fader:CreateFontString(nil, "OVERLAY") - fader.txt:SetFont(SuperVillain.Media.font.alert, 16) + fader.txt:SetFont(SV.Media.font.alert, 16) fader.txt:SetAllPoints(fader) fader.txt:SetJustifyH("CENTER") fader.txt:SetJustifyV("CENTER") @@ -446,7 +446,7 @@ local CustomChannelUpdate = function(self, unit, index, hasTicks) end local CustomInterruptible = function(self, unit, useClass) - local colors = oUF_SuperVillain.colors + local colors = oUF_Villain.colors local r, g, b = self.CastColor[1], self.CastColor[2], self.CastColor[3] if useClass then local colorOverride; @@ -480,7 +480,7 @@ BUILD FUNCTION ########################################################## ]]-- function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) - local colors = oUF_SuperVillain.colors; + local colors = oUF_Villain.colors; local castbar = CreateFrame("StatusBar", nil, frame) castbar.OnUpdate = CustomCastBarUpdate; castbar.CustomDelayText = CustomCastDelayText; @@ -523,19 +523,19 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) local hadouken = CreateFrame("Frame", nil, castbar) if ryu then - castbar.Time:SetFont(SuperVillain.Media.font.numbers, 12, "OUTLINE") + castbar.Time:SetFont(SV.Media.font.numbers, 12, "OUTLINE") castbar.Time:SetShadowOffset(1, -1) castbar.Time:SetTextColor(1, 1, 1) - castbar.Text:SetFont(SuperVillain.Media.font.alert, 13, "OUTLINE") + castbar.Text:SetFont(SV.Media.font.alert, 13, "OUTLINE") castbar.Text:SetShadowOffset(1, -1) castbar.Text:SetTextColor(1, 1, 1) - castbar:SetStatusBarTexture(SuperVillain.Media.bar.lazer) + castbar:SetStatusBarTexture(SV.Media.bar.lazer) bgFrame:FillInner(castbar, -2, 10) bgFrame:SetFrameLevel(bgFrame:GetFrameLevel() - 1) - castbar.LatencyTexture:SetTexture(SuperVillain.Media.bar.lazer) + castbar.LatencyTexture:SetTexture(SV.Media.bar.lazer) castbar.noupdate = true; castbar.pewpew = true hadouken.iscustom = true; @@ -560,7 +560,7 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) hadouken[1].overlay:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\Castbar\\SKULLS-REVERSED") hadouken[1].overlay:SetVertexColor(1, 1, 1) - SuperVillain.Animate:Sprite(hadouken[1],false,false,true) + SV.Animate:Sprite(hadouken[1],false,false,true) hadouken[2] = hadouken:CreateTexture(nil, "ARTWORK") hadouken[2]:FillInner(hadouken, 4, 4) @@ -575,7 +575,7 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) hadouken[2].overlay:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\Castbar\\CHANNEL-REVERSED") hadouken[2].overlay:SetVertexColor(1, 1, 1) - SuperVillain.Animate:Sprite(hadouken[2],false,false,true) + SV.Animate:Sprite(hadouken[2],false,false,true) castbar:Point("BOTTOMLEFT", castbarHolder, "BOTTOMLEFT", 1, 1) iconHolder:Point("LEFT", castbar, "RIGHT", 4, 0) @@ -596,7 +596,7 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) hadouken[1].overlay:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\Castbar\\HADOUKEN") hadouken[1].overlay:SetVertexColor(1, 1, 1) - SuperVillain.Animate:Sprite(hadouken[1],false,false,true) + SV.Animate:Sprite(hadouken[1],false,false,true) hadouken[2] = hadouken:CreateTexture(nil, "ARTWORK") hadouken[2]:FillInner(hadouken, 4, 4) @@ -611,7 +611,7 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) hadouken[2].overlay:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\Castbar\\CHANNEL") hadouken[2].overlay:SetVertexColor(1, 1, 1) - SuperVillain.Animate:Sprite(hadouken[2],false,false,true) + SV.Animate:Sprite(hadouken[2],false,false,true) castbar:Point("BOTTOMRIGHT", castbarHolder, "BOTTOMRIGHT", -1, 1) iconHolder:Point("RIGHT", castbar, "LEFT", -4, 0) @@ -626,13 +626,13 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) castbar.Text:SetPoint("CENTER", castbar, "CENTER", 0, 0) castbar.Text:SetJustifyH("CENTER") else - castbar.Time:SetFont(SuperVillain.Media.font.roboto, 11) + castbar.Time:SetFont(SV.Media.font.roboto, 11) castbar.Time:SetShadowOffset(1, -1) castbar.Time:SetTextColor(1, 1, 1, 0.9) castbar.Time:SetPoint("RIGHT", castbar, "LEFT", -1, 0) castbar.Time:SetJustifyH("RIGHT") - castbar.Text:SetFont(SuperVillain.Media.font.roboto, 11) + castbar.Text:SetFont(SV.Media.font.roboto, 11) castbar.Text:SetShadowOffset(1, -1) castbar.Text:SetTextColor(1, 1, 1, 0.9) castbar.Text:Point("CENTER", castbar, "CENTER", 0, 0) @@ -640,14 +640,14 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) castbar.pewpew = false - castbar:SetStatusBarTexture(SuperVillain.Media.bar.glow) + castbar:SetStatusBarTexture(SV.Media.bar.glow) castbarHolder:Point("TOP", frame, "BOTTOM", 0, -4) castbar:FillInner(castbarHolder, 2, 2) bgFrame:SetAllPoints(castbarHolder) bgFrame:SetFrameLevel(bgFrame:GetFrameLevel() - 1) - castbar.LatencyTexture:SetTexture(SuperVillain.Media.bar.default) + castbar.LatencyTexture:SetTexture(SV.Media.bar.default) if reversed then castbar:SetReverseFill(true) @@ -659,7 +659,7 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) castbar.bg = bgFrame:CreateTexture(nil, "BACKGROUND") castbar.bg:SetAllPoints(bgFrame) - castbar.bg:SetTexture(SuperVillain.Media.bar.default) + castbar.bg:SetTexture(SV.Media.bar.default) castbar.bg:SetVertexColor(0,0,0,0.5) local borderB = bgFrame:CreateTexture(nil,"OVERLAY") @@ -692,15 +692,15 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) castbar.Spark = hadouken; castbar.Holder = castbarHolder; - castbar.CastColor = oUF_SuperVillain.colors.casting - castbar.SparkColor = oUF_SuperVillain.colors.spark + castbar.CastColor = oUF_Villain.colors.casting + castbar.SparkColor = oUF_Villain.colors.spark if moverName then - SuperVillain:SetSVMovable(castbar.Holder, moverName, nil, -6, nil, "ALL, SOLO") + SV:SetSVMovable(castbar.Holder, moverName, nil, -6, nil, "ALL, SOLO") end if useFader then - SetCastbarFading(frame, castbar, SuperVillain.Media.bar.lazer) + SetCastbarFading(frame, castbar, SV.Media.bar.lazer) end castbar.TimeFormat = "REMAINING" diff --git a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua index 8d34bbe..bbd9019 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua @@ -28,14 +28,14 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); +assert(oUF_Villain, "SVUI was unable to locate oUF."); --[[ ########################################################## LOCALS @@ -206,7 +206,7 @@ local function CreateThreat(frame, unit) aggro.bg = aggro:CreateTexture(nil, "BORDER") aggro.bg:FillInner(aggro) aggro.bg:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Unitframe\\UNIT-AGGRO") - SuperVillain.Animate:Pulse(aggro) + SV.Animate:Pulse(aggro) aggro:Hide() aggro:SetScript("OnShow", OhShit_OnShow) @@ -306,7 +306,7 @@ local function CreateNameText(frame, unitName) db = MOD.db[unitName].name end local name = frame:CreateFontString(nil, "OVERLAY") - name:SetFont(SuperVillain.Shared:Fetch("font", db.font), db.fontSize, db.fontOutline) + name:SetFont(SV.Shared:Fetch("font", db.font), db.fontSize, db.fontOutline) name:SetShadowOffset(2, -2) name:SetShadowColor(0, 0, 0, 1) if unitNmae == "target" then @@ -383,7 +383,7 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) stunned:SetSize(96, 96) stunned:SetTexture(STUNNED_ANIM) stunned:SetBlendMode("ADD") - SuperVillain.Animate:Sprite(stunned, 0.12, false, true) + SV.Animate:Sprite(stunned, 0.12, false, true) stunned:Hide() frame.LossOfControl.stunned = stunned @@ -414,7 +414,7 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) if(not noHealthText) then frame.InfoPanel.Health = frame.InfoPanel:CreateFontString(nil, "OVERLAY") - frame.InfoPanel.Health:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + frame.InfoPanel.Health:SetFont(SV.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) offset = reverse and 2 or -2; direction = reverse and "LEFT" or "RIGHT"; frame.InfoPanel.Health:Point(direction, frame.InfoPanel, direction, offset, 0) @@ -422,7 +422,7 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) if(not noPowerText) then frame.InfoPanel.Power = frame.InfoPanel:CreateFontString(nil, "OVERLAY") - frame.InfoPanel.Power:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + frame.InfoPanel.Power:SetFont(SV.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) offset = reverse and -2 or 2; direction = reverse and "RIGHT" or "LEFT"; frame.InfoPanel.Power:Point(direction, frame.InfoPanel, direction, offset, 0) @@ -430,7 +430,7 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) if(not noMiscText) then frame.InfoPanel.Misc = frame.InfoPanel:CreateFontString(nil, "OVERLAY") - frame.InfoPanel.Misc:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + frame.InfoPanel.Misc:SetFont(SV.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) frame.InfoPanel.Misc:Point("CENTER", frame, "CENTER", 0, 0) end @@ -476,11 +476,11 @@ function MOD:CreateHealthBar(frame, hasbg, reverse) local healthBar = CreateFrame("StatusBar", nil, frame) healthBar:SetFrameStrata("LOW") healthBar:SetFrameLevel(4) - healthBar:SetStatusBarTexture(SuperVillain.Media.bar.default) + healthBar:SetStatusBarTexture(SV.Media.bar.default) if hasbg then healthBar.bg = healthBar:CreateTexture(nil, "BORDER") healthBar.bg:SetAllPoints() - healthBar.bg:SetTexture(SuperVillain.Media.bar.gradient) + healthBar.bg:SetTexture(SV.Media.bar.gradient) healthBar.bg:SetVertexColor(0.4, 0.1, 0.1) healthBar.bg.multiplier = 0.25 end @@ -581,7 +581,7 @@ function MOD:CreateAltPowerBar(frame) altPower.text = altPower:CreateFontString(nil, "OVERLAY") altPower.text:SetPoint("CENTER") altPower.text:SetJustifyH("CENTER") - altPower.text:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + altPower.text:SetFont(SV.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) altPower.PostUpdate = PostUpdateAltPower; return altPower end @@ -595,15 +595,15 @@ function MOD:PostUpdatePower(unit, value, max) powerType = random(0, 4) self:SetValue(value) end - local colors = oUF_SuperVillain.colors.power[token[powerType]] + local colors = oUF_Villain.colors.power[token[powerType]] local mult = self.bg.multiplier or 1; local isPlayer = UnitPlayerControlled(unit) if isPlayer and self.colorClass then local _, class = UnitClassBase(unit); - colors = oUF_SuperVillain["colors"].class[class] + colors = oUF_Villain["colors"].class[class] elseif not isPlayer then local react = UnitReaction("player", unit) - colors = oUF_SuperVillain["colors"].reaction[react] + colors = oUF_Villain["colors"].reaction[react] end if not colors then return end self:SetStatusBarColor(colors[1], colors[2], colors[3]) diff --git a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua index d5c456d..a2b59fd 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua @@ -13,14 +13,14 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(select(2, ...)); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF."); +assert(oUF_Villain, "SVUI was unable to locate oUF."); --[[ ########################################################## LOCAL VARIABLES @@ -292,7 +292,7 @@ function MOD:CreateCombatIndicator(frame) combat.bg:SetAllPoints(combat) combat.bg:SetTexture(STATE_ICON_FILE) combat.bg:SetTexCoord(0,0.5,0,0.5) - SuperVillain.Animate:Pulse(combat) + SV.Animate:Pulse(combat) combat:SetScript("OnShow", function(this) if not this.anim:IsPlaying() then this.anim:Play() end end) @@ -322,13 +322,13 @@ function MOD:CreateExperienceRepBar(frame) xp.Rested:SetStatusBarColor(1, 0, 1, 0.6) xp.Value = xp:CreateFontString(nil, "TOOLTIP") xp.Value:SetAllPoints(xp) - xp.Value:SetFontTemplate(SuperVillain.Media.font.roboto, 10, "NONE") + xp.Value:SetFontTemplate(SV.Media.font.roboto, 10, "NONE") xp.Value:SetTextColor(0.2, 0.75, 1) xp.Value:SetShadowColor(0, 0, 0, 0) xp.Value:SetShadowOffset(0, 0) frame:Tag(xp.Value, "[curxp] / [maxxp]") xp.Rested:SetBackdrop({bgFile = [[Interface\BUTTONS\WHITE8X8]]}) - xp.Rested:SetBackdropColor(unpack(SuperVillain.Media.color.default)) + xp.Rested:SetBackdropColor(unpack(SV.Media.color.default)) xp:SetScript("OnEnter", ExRep_OnEnter) xp:SetScript("OnLeave", ExRep_OnLeave) xp:SetAlpha(0) @@ -346,7 +346,7 @@ function MOD:CreateExperienceRepBar(frame) rep.Tooltip = true; rep.Value = rep:CreateFontString(nil, "TOOLTIP") rep.Value:SetAllPoints(rep) - rep.Value:SetFontTemplate(SuperVillain.Media.font.roboto, 10, "NONE") + rep.Value:SetFontTemplate(SV.Media.font.roboto, 10, "NONE") rep.Value:SetTextColor(0.1, 1, 0.2) rep.Value:SetShadowColor(0, 0, 0, 0) rep.Value:SetShadowOffset(0, 0) @@ -526,7 +526,7 @@ function MOD:CreateHealPrediction(frame, fullSet) local absorbBar = CreateFrame('StatusBar', nil, health) absorbBar:SetFrameStrata("LOW") absorbBar:SetFrameLevel(7) - absorbBar:SetStatusBarTexture(SuperVillain.Media.bar.gradient) + absorbBar:SetStatusBarTexture(SV.Media.bar.gradient) absorbBar:SetStatusBarColor(1, 1, 0, 0.5) local healPrediction = { @@ -541,7 +541,7 @@ function MOD:CreateHealPrediction(frame, fullSet) local healAbsorbBar = CreateFrame('StatusBar', nil, health) healAbsorbBar:SetFrameStrata("LOW") healAbsorbBar:SetFrameLevel(9) - healAbsorbBar:SetStatusBarTexture(SuperVillain.Media.bar.gradient) + healAbsorbBar:SetStatusBarTexture(SV.Media.bar.gradient) healAbsorbBar:SetStatusBarColor(0.5, 0.2, 1, 0.9) healPrediction["healAbsorbBar"] = healAbsorbBar; end diff --git a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua index 17108b4..a77812a 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua @@ -30,12 +30,12 @@ local twipe = table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L = unpack(select(2, ...)); local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## LOCAL VARIABLES @@ -192,7 +192,7 @@ end local function UnitName(unit) local name = _G.UnitName(unit) - if name == UNKNOWN and SuperVillain.class == "MONK" and UnitIsUnit(unit, "pet") then + if name == UNKNOWN and SV.class == "MONK" and UnitIsUnit(unit, "pet") then name = ("%s\'s Spirit"):format(_G.UnitName("player")) else return name @@ -203,40 +203,40 @@ end TAG EVENTS ########################################################## ]]-- -oUF_SuperVillain.Tags.Events["name:color"] = "UNIT_NAME_UPDATE"; +oUF_Villain.Tags.Events["name:color"] = "UNIT_NAME_UPDATE"; for i = 1, 30 do - oUF_SuperVillain.Tags.Events["name:"..i] = "UNIT_NAME_UPDATE"; + oUF_Villain.Tags.Events["name:"..i] = "UNIT_NAME_UPDATE"; end -oUF_SuperVillain.Tags.Events["name:level"] = "UNIT_LEVEL PLAYER_LEVEL_UP PLAYER_FLAGS_CHANGED"; -oUF_SuperVillain.Tags.Events["name:grid"] = "UNIT_NAME_UPDATE"; - -oUF_SuperVillain.Tags.Events["health:color"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; -oUF_SuperVillain.Tags.Events["health:deficit"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; -oUF_SuperVillain.Tags.Events["health:current"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; -oUF_SuperVillain.Tags.Events["health:curmax"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; -oUF_SuperVillain.Tags.Events["health:curpercent"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; -oUF_SuperVillain.Tags.Events["health:curmax-percent"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; -oUF_SuperVillain.Tags.Events["health:percent"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; - -oUF_SuperVillain.Tags.Events["power:color"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; -oUF_SuperVillain.Tags.Events["power:deficit"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; -oUF_SuperVillain.Tags.Events["power:current"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; -oUF_SuperVillain.Tags.Events["power:curmax"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; -oUF_SuperVillain.Tags.Events["power:curpercent"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; -oUF_SuperVillain.Tags.Events["power:curmax-percent"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; -oUF_SuperVillain.Tags.Events["power:percent"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; - -oUF_SuperVillain.Tags.Events["absorbs"] = "UNIT_ABSORB_AMOUNT_CHANGED"; -oUF_SuperVillain.Tags.Events["incoming"] = "UNIT_HEAL_PREDICTION"; -oUF_SuperVillain.Tags.Events["classpower"] = "UNIT_POWER PLAYER_TALENT_UPDATE UPDATE_SHAPESHIFT_FORM"; -oUF_SuperVillain.Tags.Events["altpower"] = "UNIT_POWER UNIT_MAXPOWER"; -oUF_SuperVillain.Tags.Events["threat"] = "UNIT_THREAT_LIST_UPDATE GROUP_ROSTER_UPDATE"; +oUF_Villain.Tags.Events["name:level"] = "UNIT_LEVEL PLAYER_LEVEL_UP PLAYER_FLAGS_CHANGED"; +oUF_Villain.Tags.Events["name:grid"] = "UNIT_NAME_UPDATE"; + +oUF_Villain.Tags.Events["health:color"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; +oUF_Villain.Tags.Events["health:deficit"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; +oUF_Villain.Tags.Events["health:current"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; +oUF_Villain.Tags.Events["health:curmax"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; +oUF_Villain.Tags.Events["health:curpercent"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; +oUF_Villain.Tags.Events["health:curmax-percent"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; +oUF_Villain.Tags.Events["health:percent"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; + +oUF_Villain.Tags.Events["power:color"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; +oUF_Villain.Tags.Events["power:deficit"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; +oUF_Villain.Tags.Events["power:current"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; +oUF_Villain.Tags.Events["power:curmax"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; +oUF_Villain.Tags.Events["power:curpercent"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; +oUF_Villain.Tags.Events["power:curmax-percent"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; +oUF_Villain.Tags.Events["power:percent"] = "UNIT_POWER_FREQUENT UNIT_MAXPOWER"; + +oUF_Villain.Tags.Events["absorbs"] = "UNIT_ABSORB_AMOUNT_CHANGED"; +oUF_Villain.Tags.Events["incoming"] = "UNIT_HEAL_PREDICTION"; +oUF_Villain.Tags.Events["classpower"] = "UNIT_POWER PLAYER_TALENT_UPDATE UPDATE_SHAPESHIFT_FORM"; +oUF_Villain.Tags.Events["altpower"] = "UNIT_POWER UNIT_MAXPOWER"; +oUF_Villain.Tags.Events["threat"] = "UNIT_THREAT_LIST_UPDATE GROUP_ROSTER_UPDATE"; --[[ ########################################################## NAME TAG METHODS ########################################################## ]]-- -oUF_SuperVillain.Tags.Methods["name:color"] = function(unit) +oUF_Villain.Tags.Methods["name:color"] = function(unit) local unitReaction = UnitReaction(unit, "player") local _, classToken = UnitClass(unit) if UnitIsPlayer(unit) then @@ -244,7 +244,7 @@ oUF_SuperVillain.Tags.Methods["name:color"] = function(unit) if not class then return "" end return Hex(class.r, class.g, class.b) elseif unitReaction then - local reaction = oUF_SuperVillain["colors"].reaction[unitReaction] + local reaction = oUF_Villain["colors"].reaction[unitReaction] return Hex(reaction[1], reaction[2], reaction[3]) else return "|cFFC2C2C2" @@ -252,15 +252,14 @@ oUF_SuperVillain.Tags.Methods["name:color"] = function(unit) end for i = 1, 30 do - oUF_SuperVillain.Tags.Methods["name:"..i] = function(unit) + oUF_Villain.Tags.Methods["name:"..i] = function(unit) local name = UnitName(unit) local result = (name ~= nil) and (TrimTagText(name, i).."|r ") or "" return result end end - -oUF_SuperVillain.Tags.Methods["name:level"] = function(unit) +oUF_Villain.Tags.Methods["name:level"] = function(unit) local afk, dnd, c = UnitIsAFK(unit), UnitIsDND(unit), UnitClassification(unit) local r, g, b, color = 0.55, 0.57, 0.61; local hexString = ""; @@ -298,7 +297,7 @@ oUF_SuperVillain.Tags.Methods["name:level"] = function(unit) return ("%s%s|r"):format(hexString, levelString) end -oUF_SuperVillain.Tags.Methods["name:grid"] = function(unit) +oUF_Villain.Tags.Methods["name:grid"] = function(unit) local name = UnitName(unit) if not name then return "" end local unitReaction = UnitReaction(unit, "player") @@ -310,7 +309,7 @@ oUF_SuperVillain.Tags.Methods["name:grid"] = function(unit) result = Hex(class.r, class.g, class.b) end elseif unitReaction then - local reaction = oUF_SuperVillain["colors"].reaction[unitReaction] + local reaction = oUF_Villain["colors"].reaction[unitReaction] result = Hex(reaction[1], reaction[2], reaction[3]) end name = TrimTagText(name, 4) @@ -323,34 +322,34 @@ end HEALTH TAG METHODS ########################################################## ]]-- -oUF_SuperVillain.Tags.Methods["health:color"] = function(f) +oUF_Villain.Tags.Methods["health:color"] = function(f) if UnitIsDeadOrGhost(f) or not UnitIsConnected(f)then return Hex(0.84, 0.75, 0.65) else - local r, g, b = oUF_SuperVillain.ColorGradient(UnitHealth(f), UnitHealthMax(f), 0.89, 0.21, 0.21, 0.85, 0.53, 0.25, 0.23, 0.89, 0.33) + local r, g, b = oUF_Villain.ColorGradient(UnitHealth(f), UnitHealthMax(f), 0.89, 0.21, 0.21, 0.85, 0.53, 0.25, 0.23, 0.89, 0.33) return Hex(r, g, b) end end -oUF_SuperVillain.Tags.Methods["health:current"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("CURRENT", UnitHealth(f), UnitHealthMax(f))end end +oUF_Villain.Tags.Methods["health:current"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("CURRENT", UnitHealth(f), UnitHealthMax(f))end end -oUF_SuperVillain.Tags.Methods["health:curmax"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("CURRENT_MAX", UnitHealth(f), UnitHealthMax(f))end end +oUF_Villain.Tags.Methods["health:curmax"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("CURRENT_MAX", UnitHealth(f), UnitHealthMax(f))end end -oUF_SuperVillain.Tags.Methods["health:curpercent"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("CURRENT_PERCENT", UnitHealth(f), UnitHealthMax(f))end end +oUF_Villain.Tags.Methods["health:curpercent"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("CURRENT_PERCENT", UnitHealth(f), UnitHealthMax(f))end end -oUF_SuperVillain.Tags.Methods["health:curmax-percent"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("CURRENT_MAX_PERCENT", UnitHealth(f), UnitHealthMax(f))end end +oUF_Villain.Tags.Methods["health:curmax-percent"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("CURRENT_MAX_PERCENT", UnitHealth(f), UnitHealthMax(f))end end -oUF_SuperVillain.Tags.Methods["health:percent"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("PERCENT", UnitHealth(f), UnitHealthMax(f))end end +oUF_Villain.Tags.Methods["health:percent"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("PERCENT", UnitHealth(f), UnitHealthMax(f))end end -oUF_SuperVillain.Tags.Methods["health:deficit"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("DEFICIT", UnitHealth(f), UnitHealthMax(f))end end +oUF_Villain.Tags.Methods["health:deficit"] = function(f)local i = UnitIsDead(f)and DEAD or UnitIsGhost(f)and L["Ghost"]or not UnitIsConnected(f)and L["Offline"]if i then return i else return SetTagStyle("DEFICIT", UnitHealth(f), UnitHealthMax(f))end end --[[ ########################################################## POWER TAG METHODS ########################################################## ]]-- -oUF_SuperVillain.Tags.Methods["power:color"] = function(f) +oUF_Villain.Tags.Methods["power:color"] = function(f) local j, k, l, m, n = UnitPowerType(f) - local o = oUF_SuperVillain["colors"].power[k] + local o = oUF_Villain["colors"].power[k] if o then return Hex(o[1], o[2], o[3]) else @@ -358,23 +357,23 @@ oUF_SuperVillain.Tags.Methods["power:color"] = function(f) end end -oUF_SuperVillain.Tags.Methods["power:current"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("CURRENT", p, UnitPowerMax(f, j))end +oUF_Villain.Tags.Methods["power:current"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("CURRENT", p, UnitPowerMax(f, j))end -oUF_SuperVillain.Tags.Methods["power:curmax"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("CURRENT_MAX", p, UnitPowerMax(f, j))end +oUF_Villain.Tags.Methods["power:curmax"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("CURRENT_MAX", p, UnitPowerMax(f, j))end -oUF_SuperVillain.Tags.Methods["power:curpercent"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("CURRENT_PERCENT", p, UnitPowerMax(f, j))end +oUF_Villain.Tags.Methods["power:curpercent"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("CURRENT_PERCENT", p, UnitPowerMax(f, j))end -oUF_SuperVillain.Tags.Methods["power:curmax-percent"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("CURRENT_PERCENT", p, UnitPowerMax(f, j))end +oUF_Villain.Tags.Methods["power:curmax-percent"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("CURRENT_PERCENT", p, UnitPowerMax(f, j))end -oUF_SuperVillain.Tags.Methods["power:percent"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("PERCENT", p, UnitPowerMax(f, j))end +oUF_Villain.Tags.Methods["power:percent"] = function(f)local j = UnitPowerType(f)local p = UnitPower(f, j)return p == 0 and" "or SetTagStyle("PERCENT", p, UnitPowerMax(f, j))end -oUF_SuperVillain.Tags.Methods["power:deficit"] = function(f)local j = UnitPowerType(f)return SetTagStyle("DEFICIT", UnitPower(f, j), UnitPowerMax(f, j), r, g, b)end +oUF_Villain.Tags.Methods["power:deficit"] = function(f)local j = UnitPowerType(f)return SetTagStyle("DEFICIT", UnitPower(f, j), UnitPowerMax(f, j), r, g, b)end --[[ ########################################################## MISC TAG METHODS ########################################################## ]]-- -oUF_SuperVillain.Tags.Methods["absorbs"] = function(unit) +oUF_Villain.Tags.Methods["absorbs"] = function(unit) local asrb = UnitGetTotalAbsorbs(unit) or 0; if asrb == 0 then return " " @@ -384,7 +383,7 @@ oUF_SuperVillain.Tags.Methods["absorbs"] = function(unit) end end -oUF_SuperVillain.Tags.Methods["incoming"] = function(unit) +oUF_Villain.Tags.Methods["incoming"] = function(unit) local fromPlayer = UnitGetIncomingHeals(unit, "player") or 0; local fromOthers = UnitGetIncomingHeals(unit) or 0; local amt = fromPlayer + fromOthers; @@ -396,7 +395,7 @@ oUF_SuperVillain.Tags.Methods["incoming"] = function(unit) end end -oUF_SuperVillain.Tags.Methods["threat"] = function(unit) +oUF_Villain.Tags.Methods["threat"] = function(unit) if UnitCanAttack("player", unit)then local status, threat = select(2, UnitDetailedThreatSituation("player", unit)) if status then @@ -407,8 +406,8 @@ oUF_SuperVillain.Tags.Methods["threat"] = function(unit) return " " end -oUF_SuperVillain.Tags.Methods["classpower"] = function() - local currentPower, maxPower, r, g, b = GetClassPower(SuperVillain.class) +oUF_Villain.Tags.Methods["classpower"] = function() + local currentPower, maxPower, r, g, b = GetClassPower(SV.class) if currentPower == 0 then return " " else @@ -418,7 +417,7 @@ oUF_SuperVillain.Tags.Methods["classpower"] = function() end end -oUF_SuperVillain.Tags.Methods["altpower"] = function(unit) +oUF_Villain.Tags.Methods["altpower"] = function(unit) local power = UnitPower(unit, ALTERNATE_POWER_INDEX) if(power > 0) then local texture, r, g, b = UnitAlternatePowerTextureInfo(unit, 2) @@ -432,7 +431,7 @@ oUF_SuperVillain.Tags.Methods["altpower"] = function(unit) end end -oUF_SuperVillain.Tags.Methods["pvptimer"] = function(unit) +oUF_Villain.Tags.Methods["pvptimer"] = function(unit) if UnitIsPVPFreeForAll(unit) or UnitIsPVP(unit)then local clock = GetPVPTimer() if clock ~= 301000 and clock ~= -1 then @@ -445,91 +444,4 @@ oUF_SuperVillain.Tags.Methods["pvptimer"] = function(unit) else return "" end -end ---[[ -########################################################## -GROUP TAG HANDLER -########################################################## -]]-- -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_SuperVillain.Tags.OnUpdateThrottle['nearbyplayers:8'] = 0.25 -oUF_SuperVillain.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 = SuperVillain:Triangulate(unit, taggedUnit, true) - if distance and distance <= 8 then - unitsInRange = unitsInRange + 1 - end - end - end - end - return unitsInRange -end - -oUF_SuperVillain.Tags.OnUpdateThrottle['nearbyplayers:10'] = 0.25 -oUF_SuperVillain.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 = SuperVillain:Triangulate(unit, taggedUnit, true) - if distance and distance <= 10 then - unitsInRange = unitsInRange + 1 - end - end - end - end - return unitsInRange -end - -oUF_SuperVillain.Tags.OnUpdateThrottle['nearbyplayers:30'] = 0.25 -oUF_SuperVillain.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 = SuperVillain:Triangulate(unit, taggedUnit, true) - if distance and distance <= 30 then - unitsInRange = unitsInRange + 1 - end - end - end - end - return unitsInRange -end - -oUF_SuperVillain.Tags.OnUpdateThrottle['distance'] = 0.25 -oUF_SuperVillain.Tags.Methods["distance"] = function(unit) - if not UnitIsConnected(unit) or UnitIsUnit(unit, "player")then return "" end - local dst = SuperVillain:Triangulate("player", unit, true) - if dst and dst > 0 then - return format("%d", dst) - end - return "" -end \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua index d34e4c3..68a3d94 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames.lua @@ -29,13 +29,13 @@ local find, format, upper = string.find, string.format, string.upper; local match, gsub = string.match, string.gsub; local numMin = math.min; -local SuperVillain, L = unpack(select(2, ...)); +local SV, L = unpack(select(2, ...)); local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") -local MOD = SuperVillain.SVUnit +assert(oUF_Villain, "SVUI was unable to locate oUF.") +local MOD = SV.SVUnit local ceil,tinsert = math.ceil,table.insert --[[ ########################################################## @@ -153,7 +153,7 @@ local UpdatePlayerFrame = function(self) MOD.RefreshUnitMedia(self, "player") - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:Size(UNIT_WIDTH, UNIT_HEIGHT) local lossSize = UNIT_WIDTH * 0.6 self.LossOfControl.stunned:SetSize(lossSize, lossSize) @@ -168,7 +168,7 @@ local UpdatePlayerFrame = function(self) local size = iconDB.restIcon.size; resting:ClearAllPoints() resting:Size(size) - SuperVillain:ReversePoint(resting, iconDB.restIcon.attachTo, healthPanel, iconDB.restIcon.xOffset, iconDB.restIcon.yOffset) + SV:ReversePoint(resting, iconDB.restIcon.attachTo, healthPanel, iconDB.restIcon.xOffset, iconDB.restIcon.yOffset) if not self:IsElementEnabled("Resting")then self:EnableElement("Resting") end @@ -185,7 +185,7 @@ local UpdatePlayerFrame = function(self) local size = iconDB.combatIcon.size; combat:ClearAllPoints() combat:Size(size) - SuperVillain:ReversePoint(combat, iconDB.combatIcon.attachTo, healthPanel, iconDB.combatIcon.xOffset, iconDB.combatIcon.yOffset) + SV:ReversePoint(combat, iconDB.combatIcon.attachTo, healthPanel, iconDB.combatIcon.xOffset, iconDB.combatIcon.yOffset) if not self:IsElementEnabled("Combat")then self:EnableElement("Combat") end @@ -203,7 +203,7 @@ local UpdatePlayerFrame = function(self) self:Tag(pvp, db.pvp.tags) end do - if SuperVillain.class == "DRUID" and self.DruidAltMana then + if SV.class == "DRUID" and self.DruidAltMana then if db.power.druidMana then self:EnableElement("DruidAltMana") else @@ -211,7 +211,7 @@ local UpdatePlayerFrame = function(self) self.DruidAltMana:Hide() end end - if SuperVillain.class == "MONK" then + if SV.class == "MONK" then local stagger = self.DrunkenMaster; if db.stagger.enable then if not self:IsElementEnabled("DrunkenMaster")then @@ -314,13 +314,13 @@ local ConstructPlayer = function(self, unit) self.Resting = MOD:CreateRestingIndicator(self) self.Combat = MOD:CreateCombatIndicator(self) self.PvPText = self.InfoPanel:CreateFontString(nil,'OVERLAY') - self.PvPText:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + self.PvPText:SetFontTemplate(SV.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) self.Afflicted = MOD:CreateAfflicted(self) self.HealPrediction = MOD:CreateHealPrediction(self, true) self.AuraBars = MOD:CreateAuraBarHeader(self, key) self.CombatFade = true; - self:Point("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOM", -413, 182) - SuperVillain:SetSVMovable(self, L["Player Frame"], nil, nil, nil, "ALL, SOLO") + self:Point("BOTTOMLEFT", SV.UIParent, "BOTTOM", -413, 182) + SV:SetSVMovable(self, L["Player Frame"], nil, nil, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdatePlayerFrame @@ -342,7 +342,7 @@ local UpdateTargetFrame = function(self) self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, "target") - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:Size(UNIT_WIDTH, UNIT_HEIGHT) _G[self:GetName().."_MOVE"]:Size(self:GetSize()) if not self:IsElementEnabled("ActionPanel")then @@ -367,7 +367,7 @@ local UpdateTargetFrame = function(self) end end - if (SuperVillain.class == "ROGUE" or SuperVillain.class == "DRUID") and self.HyperCombo then + if (SV.class == "ROGUE" or SV.class == "DRUID") and self.HyperCombo then local comboBar = self.HyperCombo; if self.ComboRefresh then self.ComboRefresh(self) @@ -375,7 +375,7 @@ local UpdateTargetFrame = function(self) if db.combobar.autoHide then comboBar:SetParent(self) else - comboBar:SetParent(SuperVillain.UIParent) + comboBar:SetParent(SV.UIParent) end if comboBar.Avatar then @@ -426,9 +426,9 @@ CONSTRUCTORS["target"] = function(self, unit) self.RaidIcon = MOD:CreateRaidIcon(self) local isSmall = MOD.db[key].combobar.smallIcons - if(SuperVillain.class == "ROGUE") then + if(SV.class == "ROGUE") then self.HyperCombo = MOD:CreateRogueCombobar(self, isSmall) - elseif(SuperVillain.class == "DRUID") then + elseif(SV.class == "DRUID") then self.HyperCombo = MOD:CreateDruidCombobar(self, isSmall) end @@ -437,8 +437,8 @@ CONSTRUCTORS["target"] = function(self, unit) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self.XRay = MOD:CreateXRay(self) self.XRay:SetPoint("TOPRIGHT", 12, 12) - self:Point("BOTTOMRIGHT", SuperVillain.UIParent, "BOTTOM", 413, 182) - SuperVillain:SetSVMovable(self, L["Target Frame"], nil, nil, nil, "ALL, SOLO") + self:Point("BOTTOMRIGHT", SV.UIParent, "BOTTOM", 413, 182) + SV:SetSVMovable(self, L["Target Frame"], nil, nil, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateTargetFrame @@ -455,7 +455,7 @@ local UpdateTargetTargetFrame = function(self) local UNIT_HEIGHT = db.height self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, "targettarget") - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:Size(UNIT_WIDTH, UNIT_HEIGHT) _G[self:GetName().."_MOVE"]:Size(self:GetSize()) MOD:RefreshUnitLayout(self, "targettarget") @@ -480,8 +480,8 @@ CONSTRUCTORS["targettarget"] = function(self, unit) self.Debuffs = MOD:CreateDebuffs(self, key) self.RaidIcon = MOD:CreateRaidIcon(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } - self:Point("BOTTOM", SuperVillain.UIParent, "BOTTOM", 0, 213) - SuperVillain:SetSVMovable(self, L["TargetTarget Frame"], nil, nil, nil, "ALL, SOLO") + self:Point("BOTTOM", SV.UIParent, "BOTTOM", 0, 213) + SV:SetSVMovable(self, L["TargetTarget Frame"], nil, nil, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateTargetTargetFrame @@ -498,7 +498,7 @@ local UpdatePetFrame = function(self) local UNIT_HEIGHT = db.height; self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, "pet") - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:Size(UNIT_WIDTH, UNIT_HEIGHT) _G[self:GetName().."_MOVE"]:Size(self:GetSize()) MOD:RefreshUnitLayout(self, "pet") @@ -532,8 +532,8 @@ CONSTRUCTORS["pet"] = function(self, unit) self.AuraWatch = MOD:CreateAuraWatch(self, key) self.RaidIcon = MOD:CreateRaidIcon(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } - self:Point("BOTTOM", SuperVillain.UIParent, "BOTTOM", 0, 182) - SuperVillain:SetSVMovable(self, L["Pet Frame"], nil, nil, nil, "ALL, SOLO") + self:Point("BOTTOM", SV.UIParent, "BOTTOM", 0, 182) + SV:SetSVMovable(self, L["Pet Frame"], nil, nil, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdatePetFrame return self @@ -549,7 +549,7 @@ local UpdatePetTargetFrame = function(self) local UNIT_HEIGHT = db.height; self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, "pettarget") - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:Size(UNIT_WIDTH, UNIT_HEIGHT) _G[self:GetName().."_MOVE"]:Size(self:GetSize()) MOD:RefreshUnitLayout(self, "pettarget") @@ -578,7 +578,7 @@ CONSTRUCTORS["pettarget"] = function(self, unit) self.Debuffs = MOD:CreateDebuffs(self, key) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self:Point("BOTTOM", SVUI_Pet, "TOP", 0, 7) - SuperVillain:SetSVMovable(self, L["PetTarget Frame"], nil, -7, nil, "ALL, SOLO") + SV:SetSVMovable(self, L["PetTarget Frame"], nil, -7, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdatePetTargetFrame @@ -595,7 +595,7 @@ local UpdateFocusFrame = function(self) local UNIT_HEIGHT = db.height; self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, "focus") - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:Size(UNIT_WIDTH, UNIT_HEIGHT) _G[self:GetName().."_MOVE"]:Size(self:GetSize()) MOD:RefreshUnitLayout(self, "focus") @@ -643,7 +643,7 @@ CONSTRUCTORS["focus"] = function(self, unit) self.XRay = MOD:CreateXRay_Closer(self) self.XRay:SetPoint("RIGHT", 20, 0) self:Point("BOTTOMRIGHT", SVUI_Target, "TOPRIGHT", 0, 220) - SuperVillain:SetSVMovable(self, L["Focus Frame"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(self, L["Focus Frame"], nil, nil, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateFocusFrame @@ -660,7 +660,7 @@ local UpdateFocusTargetFrame = function(self) local UNIT_HEIGHT = db.height; self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, "focustarget") - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:Size(UNIT_WIDTH, UNIT_HEIGHT) _G[self:GetName().."_MOVE"]:Size(self:GetSize()) MOD:RefreshUnitLayout(self, "focustarget") @@ -685,7 +685,7 @@ CONSTRUCTORS["focustarget"] = function(self, unit) self.RaidIcon = MOD:CreateRaidIcon(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self:Point("BOTTOM", SVUI_Focus, "TOP", 0, 7) - SuperVillain:SetSVMovable(self, L["FocusTarget Frame"], nil, -7, nil, "ALL, SOLO") + SV:SetSVMovable(self, L["FocusTarget Frame"], nil, -7, nil, "ALL, SOLO") self.MediaUpdate = MOD.RefreshUnitMedia self.Update = UpdateFocusTargetFrame @@ -705,7 +705,7 @@ local UpdateBossFrame = function(self) MOD.RefreshUnitMedia(self, "boss") - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:Size(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() if(tonumber(INDEX) == 1) then @@ -755,8 +755,8 @@ CONSTRUCTORS["boss"] = function(self, unit) self:SetAttribute("type2", "focus") if(not _G["SVUI_Boss_MOVE"]) then - self:Point("RIGHT", SuperVillain.UIParent, "RIGHT", -105, 0) - SuperVillain:SetSVMovable(self, L["Boss Frames"], nil, nil, nil, "ALL, PARTY, RAID10, RAID25, RAID40", "SVUI_Boss") + self:Point("RIGHT", SV.UIParent, "RIGHT", -105, 0) + SV:SetSVMovable(self, L["Boss Frames"], nil, nil, nil, "ALL, PARTY, RAID10, RAID25, RAID40", "SVUI_Boss") else self:Point("TOPRIGHT", lastBossFrame, "BOTTOMRIGHT", 0, -20) end @@ -807,7 +807,7 @@ local function CreatePrepFrame(frameName, parentFrame, parentID) prep.SpecIcon = icon local text = prep.Health:CreateFontString(nil, "OVERLAY") - text:SetFont(SuperVillain.Media.font.names, 16, "OUTLINE") + text:SetFont(SV.Media.font.names, 16, "OUTLINE") text:SetTextColor(1, 1, 1) text:SetPoint("CENTER") prep.SpecClass = text @@ -824,7 +824,7 @@ local UpdateArenaFrame = function(self) MOD.RefreshUnitMedia(self, "arena") - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:Size(UNIT_WIDTH, UNIT_HEIGHT) self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") @@ -923,8 +923,8 @@ CONSTRUCTORS["arena"] = function(self, unit) if(not _G[prepName]) then CreatePrepFrame(prepName, self, selfID) end if(not _G["SVUI_Arena_MOVE"]) then - self:Point("RIGHT", SuperVillain.UIParent, "RIGHT", -105, 0) - SuperVillain:SetSVMovable(self, L["Arena Frames"], nil, nil, nil, "ALL, ARENA", "SVUI_Arena") + self:Point("RIGHT", SV.UIParent, "RIGHT", -105, 0) + SV:SetSVMovable(self, L["Arena Frames"], nil, nil, nil, "ALL, ARENA", "SVUI_Arena") else self:Point("TOPRIGHT", lastArenaFrame, "BOTTOMRIGHT", 0, -20) end @@ -943,7 +943,7 @@ local ArenaPrepHandler = CreateFrame("Frame") local ArenaPrepHandler_OnEvent = function(self, event) local prepframe local _, instanceType = IsInInstance() - if(not SuperVillain.db.SVUnit.arena.enable or instanceType ~= "arena") then return end + if(not SV.db.SVUnit.arena.enable or instanceType ~= "arena") then return end if event == "PLAYER_LOGIN" then for i = 1, 5 do prepframe = _G["SVUI_Arena"..i.."PrepFrame"] @@ -1020,11 +1020,11 @@ function MOD:SetUnitFrame(key) local styleName = "SVUI_"..realName local frame if not self.Units[unit] then - oUF_SuperVillain:RegisterStyle(styleName, CONSTRUCTORS[key]) - oUF_SuperVillain:SetActiveStyle(styleName) - frame = oUF_SuperVillain:Spawn(unit, styleName) + oUF_Villain:RegisterStyle(styleName, CONSTRUCTORS[key]) + oUF_Villain:SetActiveStyle(styleName) + frame = oUF_Villain:Spawn(unit, styleName) self.Units[unit] = frame - self.Roster[frame] = styleName + self.Roster[frame] = key else frame = self.Units[unit] end @@ -1048,11 +1048,11 @@ function MOD:SetEnemyFrames(key, maxCount) local styleName = "SVUI_"..realName local frame if not self.Units[unit] then - oUF_SuperVillain:RegisterStyle(styleName, CONSTRUCTORS[key]) - oUF_SuperVillain:SetActiveStyle(styleName) - frame = oUF_SuperVillain:Spawn(unit, styleName) + oUF_Villain:RegisterStyle(styleName, CONSTRUCTORS[key]) + oUF_Villain:SetActiveStyle(styleName) + frame = oUF_Villain:Spawn(unit, styleName) self.Units[unit] = frame - self.Roster[frame] = styleName + self.Roster[frame] = key else frame = self.Units[unit] end @@ -1182,7 +1182,7 @@ local Raid40Visibility = function(self, event) end local UpdateRaidSubUnit = function(self, key, db) - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db) if not InCombatLockdown() then @@ -1216,8 +1216,8 @@ local Raid10Update = function(self) local frame = self:GetParent() if not frame.positioned then frame:ClearAllPoints() - frame:Point("LEFT", SuperVillain.UIParent, "LEFT", 4, 0) - SuperVillain:SetSVMovable(frame, L["Raid 10 Frames"], nil, nil, nil, "ALL, RAID"..10) + frame:Point("LEFT", SV.UIParent, "LEFT", 4, 0) + SV:SetSVMovable(frame, L["Raid 10 Frames"], nil, nil, nil, "ALL, RAID"..10) frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:RegisterEvent("ZONE_CHANGED_NEW_AREA") frame:SetScript("OnEvent", Raid10Visibility) @@ -1246,8 +1246,8 @@ local Raid25Update = function(self) local frame = self:GetParent() if not frame.positioned then frame:ClearAllPoints() - frame:Point("LEFT", SuperVillain.UIParent, "LEFT", 4, 0) - SuperVillain:SetSVMovable(frame, L["Raid 25 Frames"], nil, nil, nil, "ALL, RAID"..25) + frame:Point("LEFT", SV.UIParent, "LEFT", 4, 0) + SV:SetSVMovable(frame, L["Raid 25 Frames"], nil, nil, nil, "ALL, RAID"..25) frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:RegisterEvent("ZONE_CHANGED_NEW_AREA") frame:SetScript("OnEvent", Raid25Visibility) @@ -1276,8 +1276,8 @@ local Raid40Update = function(self) local frame = self:GetParent() if not frame.positioned then frame:ClearAllPoints() - frame:Point("LEFT", SuperVillain.UIParent, "LEFT", 4, 0) - SuperVillain:SetSVMovable(frame, L["Raid 40 Frames"], nil, nil, nil, "ALL, RAID"..40) + frame:Point("LEFT", SV.UIParent, "LEFT", 4, 0) + SV:SetSVMovable(frame, L["Raid 40 Frames"], nil, nil, nil, "ALL, RAID"..40) frame:RegisterEvent("PLAYER_ENTERING_WORLD") frame:RegisterEvent("ZONE_CHANGED_NEW_AREA") frame:SetScript("OnEvent", Raid40Visibility) @@ -1413,8 +1413,8 @@ local UpdateRaidPetFrame = function(self) local raidPets = self:GetParent() if not raidPets.positioned then raidPets:ClearAllPoints() - raidPets:Point("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOMLEFT", 4, 433) - SuperVillain:SetSVMovable(raidPets, L["Raid Pet Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") + raidPets:Point("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", 4, 433) + SV:SetSVMovable(raidPets, L["Raid Pet Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") raidPets.positioned = true; raidPets:RegisterEvent("PLAYER_ENTERING_WORLD") raidPets:RegisterEvent("ZONE_CHANGED_NEW_AREA") @@ -1502,7 +1502,7 @@ local PartyVisibility = function(self, event) end local UpdatePartySubUnit = function(self, key, db) - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:RegisterForClicks(MOD.db.fastClickTarget and 'AnyDown' or 'AnyUp') MOD.RefreshUnitMedia(self, key) if self.isChild then @@ -1520,9 +1520,9 @@ local UpdatePartySubUnit = function(self, key, db) self:SetParent(self.originalParent) self:Size(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() - SuperVillain:ReversePoint(self, altDB.anchorPoint, self.originalParent, altDB.xOffset, altDB.yOffset) + SV:ReversePoint(self, altDB.anchorPoint, self.originalParent, altDB.xOffset, altDB.yOffset) else - self:SetParent(SuperVillain.Cloaked) + self:SetParent(SV.Cloaked) end end do @@ -1557,8 +1557,8 @@ local UpdatePartyFrame = function(self) local group = self:GetParent() if not group.positioned then group:ClearAllPoints() - group:Point("LEFT",SuperVillain.UIParent,"LEFT",40,0) - SuperVillain:SetSVMovable(group, L['Party Frames'], nil, nil, nil, 'ALL,PARTY,ARENA'); + group:Point("LEFT",SV.UIParent,"LEFT",40,0) + SV:SetSVMovable(group, L['Party Frames'], nil, nil, nil, 'ALL,PARTY,ARENA'); group.positioned = true; group:RegisterEvent("PLAYER_ENTERING_WORLD") group:RegisterEvent("ZONE_CHANGED_NEW_AREA") @@ -1644,7 +1644,7 @@ TANK ########################################################## ]]-- local UpdateTankSubUnit = function(self, key, db) - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, key) if self.isChild and self.originalParent then @@ -1659,9 +1659,9 @@ local UpdateTankSubUnit = function(self, key, db) self:SetParent(self.originalParent) self:Size(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() - SuperVillain:ReversePoint(self, targets.anchorPoint, self.originalParent, targets.xOffset, targets.yOffset) + SV:ReversePoint(self, targets.anchorPoint, self.originalParent, targets.xOffset, targets.yOffset) else - self:SetParent(SuperVillain.Cloaked) + self:SetParent(SV.Cloaked) end end elseif not InCombatLockdown() then @@ -1671,7 +1671,7 @@ local UpdateTankSubUnit = function(self, key, db) MOD:RefreshUnitLayout(self, key) do local nametext = self.InfoPanel.Name; - if oUF_SuperVillain.colors.healthclass then + if oUF_Villain.colors.healthclass then self:Tag(nametext, "[name:10]") else self:Tag(nametext, "[name:color][name:10]") @@ -1701,8 +1701,8 @@ local UpdateTankFrame = function(self) self:SetAttribute("yOffset", 7) if not self.positioned then self:ClearAllPoints() - self:Point("TOPLEFT", SuperVillain.UIParent, "TOPLEFT", 4, -40) - SuperVillain:SetSVMovable(self, L["Tank Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") + self:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 4, -40) + SV:SetSVMovable(self, L["Tank Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") self.Avatar.positionOverride = "TOPLEFT" self:SetAttribute("minHeight", self.dirtyHeight) self:SetAttribute("minWidth", self.dirtyWidth) @@ -1743,7 +1743,7 @@ ASSIST ########################################################## ]]-- local UpdateAssistSubUnit = function(self, key, db) - self.colors = oUF_SuperVillain.colors; + self.colors = oUF_Villain.colors; self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") MOD.RefreshUnitMedia(self, key) if self.isChild and self.originalParent then @@ -1758,9 +1758,9 @@ local UpdateAssistSubUnit = function(self, key, db) self:SetParent(self.originalParent) self:Size(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() - SuperVillain:ReversePoint(self, targets.anchorPoint, self.originalParent, targets.xOffset, targets.yOffset) + SV:ReversePoint(self, targets.anchorPoint, self.originalParent, targets.xOffset, targets.yOffset) else - self:SetParent(SuperVillain.Cloaked) + self:SetParent(SV.Cloaked) end end elseif not InCombatLockdown() then @@ -1772,7 +1772,7 @@ local UpdateAssistSubUnit = function(self, key, db) do local nametext = self.InfoPanel.Name; - if oUF_SuperVillain.colors.healthclass then + if oUF_Villain.colors.healthclass then self:Tag(nametext, "[name:10]") else self:Tag(nametext, "[name:color][name:10]") @@ -1797,8 +1797,8 @@ local UpdateAssistFrame = function(self) self:SetAttribute("yOffset", 7) if not self.positioned then self:ClearAllPoints() - self:Point("TOPLEFT", SuperVillain.UIParent, "TOPLEFT", 4, -140) - SuperVillain:SetSVMovable(self, L["Assist Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") + self:Point("TOPLEFT", SV.UIParent, "TOPLEFT", 4, -140) + SV:SetSVMovable(self, L["Assist Frames"], nil, nil, nil, "ALL, RAID10, RAID25, RAID40") self.Avatar.positionOverride = "TOPLEFT" self:SetAttribute("minHeight", self.dirtyHeight) self:SetAttribute("minWidth", self.dirtyWidth) @@ -1864,8 +1864,8 @@ end function MOD:ConstructGroupHeader(parentFrame, filter, styleName, headerName, template1, groupName, template2) local db = self.db[groupName] local UNIT_WIDTH, UNIT_HEIGHT = self:GetActiveSize(db) - oUF_SuperVillain:SetActiveStyle(styleName) - local groupHeader = oUF_SuperVillain:SpawnHeader(headerName, template2, nil, + oUF_Villain:SetActiveStyle(styleName) + local groupHeader = oUF_Villain:SpawnHeader(headerName, template2, nil, "oUF-initialConfigFunction", ("self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)"):format(UNIT_WIDTH, UNIT_HEIGHT), "groupFilter", filter, "showParty", true, @@ -2049,12 +2049,12 @@ function MOD:SetGroupFrame(key, filter, template1, forceUpdate, template2) local styleName = "SVUI_"..realName local frame, groupName if(not self.Headers[key]) then - oUF_SuperVillain:RegisterStyle(styleName, CONSTRUCTORS[key]) - oUF_SuperVillain:SetActiveStyle(styleName) + oUF_Villain:RegisterStyle(styleName, CONSTRUCTORS[key]) + oUF_Villain:SetActiveStyle(styleName) if(key == "tank" or key == "assist") then frame = self:ConstructGroupHeader(SVUI_UnitFrameParent, filter, styleName, styleName, template1, key, template2) - self.Roster[frame] = true + self.Roster[frame] = key else frame = CreateFrame("Frame", styleName, SVUI_UnitFrameParent, "SecureHandlerStateTemplate") frame.groups = {} @@ -2084,7 +2084,7 @@ function MOD:SetGroupFrame(key, filter, template1, forceUpdate, template2) groupName = styleName .. "Group1" local subunit = self:ConstructGroupHeader(frame, 1, styleName, groupName, template1, key, template2) frame.groups[1] = subunit - self.Roster[subunit] = styleName + self.Roster[subunit] = key end else for i = 1, db.groupCount do @@ -2092,7 +2092,7 @@ function MOD:SetGroupFrame(key, filter, template1, forceUpdate, template2) groupName = styleName .. "Group" .. i local subunit = self:ConstructGroupHeader(frame, i, styleName, groupName, template1, key, template2) frame.groups[i] = subunit - self.Roster[subunit] = styleName + self.Roster[subunit] = key end end end diff --git a/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua b/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua index 9204ad2..09ea35a 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua @@ -35,15 +35,15 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "DEATHKNIGHT") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "DEATHKNIGHT") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## LOCALS @@ -71,7 +71,7 @@ local Reposition = function(self) bar.Holder:Size(width, size) if(not db.classbar.detachFromFrame) then - SuperVillain:ResetMovables(L["Classbar"]) + SV:ResetMovables(L["Classbar"]) end local holderUpdate = bar.Holder:GetScript('OnSizeChanged') if holderUpdate then @@ -124,7 +124,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua index b59de03..5d842f2 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua @@ -35,15 +35,15 @@ local random,floor = math.random, math.floor; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "DRUID") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "DRUID") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## DRUID ALT MANA @@ -54,8 +54,8 @@ local TRACKER_FONT = [[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]] local UpdateAltPower = function(self, unit, arg1, arg2) local value = self:GetParent().InfoPanel.Power; if(arg1 ~= arg2) then - local color = oUF_SuperVillain.colors.power.MANA - color = SuperVillain:HexColor(color[1],color[2],color[3]) + local color = oUF_Villain.colors.power.MANA + color = SV:HexColor(color[1],color[2],color[3]) local altValue = floor(arg1 / arg2 * 100) local altStr = "" if(value:GetText()) then @@ -85,7 +85,7 @@ local function CreateAltMana(playerFrame, eclipse) bar.PostUpdatePower = UpdateAltPower; bar.ManaBar = CreateFrame("StatusBar", nil, bar) bar.ManaBar.noupdate = true; - bar.ManaBar:SetStatusBarTexture(SuperVillain.Media.bar.glow) + bar.ManaBar:SetStatusBarTexture(SV.Media.bar.glow) bar.ManaBar:FillInner(bar) bar.bg = bar:CreateTexture(nil, "BORDER") bar.bg:SetAllPoints(bar.ManaBar) @@ -93,7 +93,7 @@ local function CreateAltMana(playerFrame, eclipse) bar.bg.multiplier = 0.3; bar.Text = bar.ManaBar:CreateFontString(nil, "OVERLAY") bar.Text:SetAllPoints(bar.ManaBar) - bar.Text:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + bar.Text:SetFont(SV.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) return bar end --[[ @@ -114,7 +114,7 @@ local Reposition = function(self) bar.Holder:Size(width, height) if(not db.classbar.detachFromFrame) then - SuperVillain:ResetMovables(L["Classbar"]) + SV:ResetMovables(L["Classbar"]) end local holderUpdate = bar.Holder:GetScript('OnSizeChanged') if holderUpdate then @@ -203,7 +203,7 @@ function MOD:CreateClassBar(playerFrame) moon[1]:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Unitframe\\Class\\VORTEX") moon[1]:SetBlendMode("ADD") moon[1]:SetVertexColor(0, 0.5, 1) - SuperVillain.Animate:Orbit(moon[1], 10, false) + SV.Animate:Orbit(moon[1], 10, false) moon[2] = moon:CreateTexture(nil, "OVERLAY", nil, 2) moon[2]:Size(30, 30) @@ -214,7 +214,7 @@ function MOD:CreateClassBar(playerFrame) local lunar = CreateFrame('StatusBar', nil, bar) lunar:SetPoint("LEFT", moon, "RIGHT", -10, 0) lunar:Size(100,40) - lunar:SetStatusBarTexture(SuperVillain.Media.bar.lazer) + lunar:SetStatusBarTexture(SV.Media.bar.lazer) lunar.noupdate = true; bar.Moon = moon; @@ -224,7 +224,7 @@ function MOD:CreateClassBar(playerFrame) local solar = CreateFrame('StatusBar', nil, bar) solar:SetPoint('LEFT', lunar:GetStatusBarTexture(), 'RIGHT') solar:Size(100,40) - solar:SetStatusBarTexture(SuperVillain.Media.bar.lazer) + solar:SetStatusBarTexture(SV.Media.bar.lazer) solar.noupdate = true; local sun = CreateFrame('Frame', nil, bar) @@ -237,7 +237,7 @@ function MOD:CreateClassBar(playerFrame) sun[1]:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Unitframe\\Class\\VORTEX") sun[1]:SetBlendMode("ADD") sun[1]:SetVertexColor(1, 0.5, 0) - SuperVillain.Animate:Orbit(sun[1], 10, false) + SV.Animate:Orbit(sun[1], 10, false) sun[2] = sun:CreateTexture(nil, "OVERLAY", nil, 2) sun[2]:Size(30, 30) @@ -251,7 +251,7 @@ function MOD:CreateClassBar(playerFrame) bar.Text = lunar:CreateFontString(nil, 'OVERLAY') bar.Text:SetPoint("TOPLEFT", bar, "TOPLEFT", 10, 0) bar.Text:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -10, 0) - bar.Text:SetFont(SuperVillain.Media.font.roboto, 16, "NONE") + bar.Text:SetFont(SV.Media.font.roboto, 16, "NONE") bar.Text:SetShadowOffset(0,0) local hyper = CreateFrame("Frame",nil,playerFrame) @@ -280,7 +280,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") playerFrame.ClassBarRefresh = Reposition; playerFrame.EclipseBar = bar @@ -376,7 +376,7 @@ function MOD:CreateDruidCombobar(targetFrame, isSmall) blood:SetBlendMode("ADD") cpoint.Blood = blood - SuperVillain.Animate:SmallSprite(blood,0.08,2,true) + SV.Animate:SmallSprite(blood,0.08,2,true) else icon:SetTexture([[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\COMBO-POINT-SMALL]]) end diff --git a/Interface/AddOns/SVUI/packages/unit/resources/hunter.lua b/Interface/AddOns/SVUI/packages/unit/resources/hunter.lua index 7fd4e83..12c98fe 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/hunter.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/hunter.lua @@ -25,15 +25,15 @@ local select = _G.select; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "HUNTER") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "HUNTER") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## PLACEHOLDER diff --git a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua index 9848034..4222eac 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua @@ -35,15 +35,15 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "MAGE") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "MAGE") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## POSITIONING @@ -57,7 +57,7 @@ local Reposition = function(self) local width = size * max; bar.Holder:Size(width, size) if(not db.classbar.detachFromFrame) then - SuperVillain:ResetMovables(L["Classbar"]) + SV:ResetMovables(L["Classbar"]) end local holderUpdate = bar.Holder:GetScript('OnSizeChanged') if holderUpdate then @@ -174,13 +174,13 @@ function MOD:CreateClassBar(playerFrame) charge:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Unitframe\\Class\\MAGE-BG-ANIMATION") charge:SetBlendMode("ADD") charge:SetVertexColor(0.5, 1, 1) - SuperVillain.Animate:Sprite(charge, 10, false, true) + SV.Animate:Sprite(charge, 10, false, true) charge.anim:Play() - SuperVillain.Animate:Sprite(sparks, 0.08, 5, true) + SV.Animate:Sprite(sparks, 0.08, 5, true) sparks.anim:Play() bar[i].charge = charge; bar[i].sparks = sparks; - SuperVillain.Animate:Orbit(under, 15, false) + SV.Animate:Orbit(under, 15, false) bar[i].under = under; bar[i].bg = under.bg; end @@ -190,7 +190,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/monk.lua b/Interface/AddOns/SVUI/packages/unit/resources/monk.lua index 698f71c..54129d1 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/monk.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/monk.lua @@ -35,15 +35,15 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "MONK") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "MONK") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## POSITIONING @@ -57,7 +57,7 @@ local Reposition = function(self) local width = size * max; bar.Holder:Size(width, size) if(not db.classbar.detachFromFrame) then - SuperVillain:ResetMovables(L["Classbar"]) + SV:ResetMovables(L["Classbar"]) end local holderUpdate = bar.Holder:GetScript('OnSizeChanged') if holderUpdate then @@ -81,8 +81,8 @@ local Reposition = function(self) end end -local StartFlash = function(self) SuperVillain.Animate:Flash(self.overlay,1,true) end -local StopFlash = function(self) SuperVillain.Animate:StopFlash(self.overlay) end +local StartFlash = function(self) SV.Animate:Flash(self.overlay,1,true) end +local StopFlash = function(self) SV.Animate:StopFlash(self.overlay) end --[[ ########################################################## MONK STAGGER BAR @@ -153,7 +153,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") playerFrame.MaxClassPower = max playerFrame.DrunkenMaster = CreateDrunkenMasterBar(playerFrame) diff --git a/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua b/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua index 625ebd8..21e76b4 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua @@ -35,15 +35,15 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "PALADIN") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "PALADIN") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## LOCAL FUNCTIONS @@ -63,7 +63,7 @@ local Reposition = function(self) local width = size * max; bar.Holder:Size(width, size) if(not db.classbar.detachFromFrame) then - SuperVillain:ResetMovables(L["Classbar"]) + SV:ResetMovables(L["Classbar"]) end local holderUpdate = bar.Holder:GetScript('OnSizeChanged') if holderUpdate then @@ -155,7 +155,7 @@ function MOD:CreateClassBar(playerFrame) barAnimation[1]:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Unitframe\\Class\\SWIRL") barAnimation[1]:SetBlendMode("ADD") barAnimation[1]:SetVertexColor(0.5,0.5,0.15) - SuperVillain.Animate:Orbit(barAnimation[1],10) + SV.Animate:Orbit(barAnimation[1],10) barAnimation[2] = barAnimation:CreateTexture(nil,"BACKGROUND",nil,2) barAnimation[2]:Size(40,40) @@ -164,14 +164,14 @@ function MOD:CreateClassBar(playerFrame) barAnimation[2]:SetTexCoord(1,0,1,1,0,0,0,1) barAnimation[2]:SetBlendMode("ADD") barAnimation[2]:SetVertexColor(0.5,0.5,0.15) - SuperVillain.Animate:Orbit(barAnimation[2],10,true) + SV.Animate:Orbit(barAnimation[2],10,true) barAnimation[3] = barAnimation:CreateTexture(nil, "OVERLAY") barAnimation[3]:WrapOuter(barAnimation, 3, 3) barAnimation[3]:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Unitframe\\Class\\MAGE-FG-ANIMATION") barAnimation[3]:SetBlendMode("ADD") barAnimation[3]:SetVertexColor(1, 1, 0) - SuperVillain.Animate:Sprite(barAnimation[3], 0.08, 2, true) + SV.Animate:Sprite(barAnimation[3], 0.08, 2, true) bar[i].swirl = barAnimation; hooksecurefunc(bar[i], "SetAlpha", AlphaHook) @@ -182,7 +182,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/priest.lua b/Interface/AddOns/SVUI/packages/unit/resources/priest.lua index 19a959e..7ced591 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/priest.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/priest.lua @@ -35,15 +35,15 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "PRIEST") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "PRIEST") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") local ICON_FILE = [[Interface\AddOns\SVUI\assets\artwork\Unitframe\Class\PRIEST]] --[[ ########################################################## @@ -59,7 +59,7 @@ local Reposition = function(self) bar.Holder:Size(width, size) if(not db.classbar.detachFromFrame) then - SuperVillain:ResetMovables(L["Classbar"]) + SV:ResetMovables(L["Classbar"]) end local holderUpdate = bar.Holder:GetScript('OnSizeChanged') if holderUpdate then @@ -123,7 +123,7 @@ function MOD:CreateClassBar(playerFrame) swirl[1]:SetTexCoord(0.5,1,0.5,1) swirl[1]:SetBlendMode("ADD") swirl[1]:SetVertexColor(0.7, 0.5, 1) - SuperVillain.Animate:Orbit(swirl[1], 10, false) + SV.Animate:Orbit(swirl[1], 10, false) swirl[2] = swirl:CreateTexture(nil, "OVERLAY", nil, 1) swirl[2]:Size(30, 30) swirl[2]:SetPoint("CENTER") @@ -131,7 +131,7 @@ function MOD:CreateClassBar(playerFrame) swirl[2]:SetTexCoord(0.5,1,0.5,1) swirl[2]:SetBlendMode("BLEND") swirl[2]:SetVertexColor(0.2, 0.08, 0.01) - SuperVillain.Animate:Orbit(swirl[2], 10, true) + SV.Animate:Orbit(swirl[2], 10, true) bar[i].swirl = swirl; bar[i]:SetScript("OnShow", function(self) if not self.swirl[1].anim:IsPlaying() then @@ -153,7 +153,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua index 1bc7734..6c205e7 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua @@ -35,15 +35,15 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "ROGUE") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "ROGUE") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## LOCALS @@ -148,7 +148,7 @@ function MOD:CreateRogueCombobar(targetFrame, isSmall) blood:SetBlendMode("ADD") cpoint.Blood = blood - SuperVillain.Animate:SmallSprite(blood,0.08,2,true) + SV.Animate:SmallSprite(blood,0.08,2,true) else coords = ICON_COORDS[1] icon:SetTexCoord(coords[1],coords[2],coords[3],coords[4]) @@ -178,7 +178,7 @@ local RepositionTracker = function(self) local textwidth = size * 1.25; bar.Holder:Size(width, size) if(not db.classbar.detachFromFrame) then - SuperVillain:ResetMovables(L["Classbar"]) + SV:ResetMovables(L["Classbar"]) end local holderUpdate = bar.Holder:GetScript('OnSizeChanged') if holderUpdate then @@ -257,7 +257,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") playerFrame.MaxClassPower = 5; playerFrame.ClassBarRefresh = RepositionTracker; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua index 268e07f..fb151df 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua @@ -35,15 +35,15 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "SHAMAN") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "SHAMAN") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## LOCALS @@ -69,7 +69,7 @@ local Reposition = function(self) local width = size * totemMax bar.Holder:Size(width, size) if(not db.classbar.detachFromFrame) then - SuperVillain:ResetMovables(L["Classbar"]) + SV:ResetMovables(L["Classbar"]) end local holderUpdate = bar.Holder:GetScript('OnSizeChanged') if holderUpdate then @@ -116,7 +116,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") playerFrame.MaxClassPower = totemMax; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua index 48707a4..a82625a 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua @@ -35,15 +35,15 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "WARLOCK") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "WARLOCK") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## LOCAL FUNCTIONS @@ -86,7 +86,7 @@ local Reposition = function(self) local dbOffset = (size * 0.15) bar.Holder:Size(width, size) if(not db.classbar.detachFromFrame) then - SuperVillain:ResetMovables(L["Classbar"]) + SV:ResetMovables(L["Classbar"]) end local holderUpdate = bar.Holder:GetScript('OnSizeChanged') if holderUpdate then @@ -118,24 +118,24 @@ CUSTOM HANDLERS local UpdateTextures = function(bar, spec, max) if max == 0 then max = 4 end if spec == SPEC_WARLOCK_DEMONOLOGY then - bar[1].overlay:SetTexture("") - bar[1].underlay:SetTexture("") - SuperVillain.Animate:StopFlash(bar[1].overlay) + bar[1].overlay:SetTexture(0,0,0,0) + bar[1].underlay:SetTexture(0,0,0,0) + SV.Animate:StopFlash(bar[1].overlay) bar[1].underlay.anim:Finish() - bar[2].overlay:SetTexture("") - bar[2].underlay:SetTexture("") - SuperVillain.Animate:StopFlash(bar[2].overlay) + bar[2].overlay:SetTexture(0,0,0,0) + bar[2].underlay:SetTexture(0,0,0,0) + SV.Animate:StopFlash(bar[2].overlay) bar[2].underlay.anim:Finish() - bar[3].overlay:SetTexture("") - bar[3].underlay:SetTexture("") - SuperVillain.Animate:StopFlash(bar[3].overlay) + bar[3].overlay:SetTexture(0,0,0,0) + bar[3].underlay:SetTexture(0,0,0,0) + SV.Animate:StopFlash(bar[3].overlay) bar[3].underlay.anim:Finish() - bar[4].overlay:SetTexture("") - bar[4].underlay:SetTexture("") - SuperVillain.Animate:StopFlash(bar[4].overlay) + bar[4].overlay:SetTexture(0,0,0,0) + bar[4].underlay:SetTexture(0,0,0,0) + SV.Animate:StopFlash(bar[4].overlay) bar[4].underlay.anim:Finish() bar.CurrentSpec = spec elseif spec == SPEC_WARLOCK_AFFLICTION then @@ -212,10 +212,10 @@ local Update = function(self, event, unit, powerType) if (power >= MAX_POWER_PER_EMBER * i) then bar[i].overlay:Show() bar[i].underlay:Show() - SuperVillain.Animate:Flash(bar[i].overlay,1,true) + SV.Animate:Flash(bar[i].overlay,1,true) if not bar[i].underlay.anim:IsPlaying() then bar[i].underlay.anim:Play() end else - SuperVillain.Animate:StopFlash(bar[i].overlay) + SV.Animate:StopFlash(bar[i].overlay) bar[i].overlay:Hide() bar[i].underlay.anim:Stop() bar[i].underlay:Hide() @@ -241,12 +241,12 @@ local Update = function(self, event, unit, powerType) bar[i]:SetAlpha(1) bar[i].overlay:Show() bar[i].underlay:Show() - SuperVillain.Animate:Flash(bar[i].overlay,1,true) + SV.Animate:Flash(bar[i].overlay,1,true) if not bar[i].underlay.anim:IsPlaying() then bar[i].underlay.anim:Play() end else bar[i]:SetValue(0) bar[i]:SetAlpha(0) - SuperVillain.Animate:StopFlash(bar[i].overlay) + SV.Animate:StopFlash(bar[i].overlay) end end elseif spec == SPEC_WARLOCK_DEMONOLOGY then @@ -306,7 +306,7 @@ function MOD:CreateClassBar(playerFrame) bar[i].underlay:SetTexture('Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\Class\\WARLOCK-SOUL-ANIMATION') bar[i].underlay:SetBlendMode('ADD') bar[i].underlay:Hide() - SuperVillain.Animate:Sprite(bar[i].underlay,0.15,false,true) + SV.Animate:Sprite(bar[i].underlay,0.15,false,true) bar[i].backdrop:SetVertexColor(unpack(shardBGColor[1])) bar[i].overlay:SetVertexColor(unpack(shardOverColor[1])) @@ -316,7 +316,7 @@ function MOD:CreateClassBar(playerFrame) local demonBar = CreateFrame("StatusBar",nil,bar) demonBar.noupdate = true; demonBar:SetOrientation("HORIZONTAL") - demonBar:SetStatusBarTexture(SuperVillain.Media.bar.lazer) + demonBar:SetStatusBarTexture(SV.Media.bar.lazer) local bgFrame = CreateFrame("Frame", nil, demonBar) bgFrame:FillInner(demonBar, -2, 10) @@ -359,7 +359,7 @@ function MOD:CreateClassBar(playerFrame) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) bar:SetPoint("TOPLEFT", classBarHolder, "TOPLEFT", 0, 0) bar.Holder = classBarHolder - SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") + SV:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") playerFrame.MaxClassPower = max; playerFrame.ClassBarRefresh = Reposition; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/warrior.lua b/Interface/AddOns/SVUI/packages/unit/resources/warrior.lua index a61404c..53f6494 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/warrior.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/warrior.lua @@ -25,15 +25,15 @@ local select = _G.select; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "WARRIOR") then return end -local MOD = SuperVillain.SVUnit +local SV, L = unpack(select(2, ...)); +if(SV.class ~= "WARRIOR") then return end +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -local oUF_SuperVillain = ns.oUF +local oUF_Villain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- local assert = enforce; -assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") +assert(oUF_Villain, "SVUI was unable to locate oUF.") --[[ ########################################################## PLACEHOLDER diff --git a/Interface/AddOns/SVUI/scripts/comix.lua b/Interface/AddOns/SVUI/scripts/comix.lua index c7995bb..a518a97 100644 --- a/Interface/AddOns/SVUI/scripts/comix.lua +++ b/Interface/AddOns/SVUI/scripts/comix.lua @@ -28,7 +28,7 @@ local random = math.random; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L, Registry = unpack(select(2, ...)); local Comix = CreateFrame("Frame"); --[[ ########################################################## @@ -126,7 +126,7 @@ local Comix_OnEvent = function(self, event, ...) if subEvent == "PARTY_KILL" and guid == playerGUID and ready then self:ReadyState(false) local rng = random(1,15) - if((rng < 3) and SuperVillain.db.system.bigComix) then + if((rng < 3) and SV.db.system.bigComix) then self:LaunchPopup("PREMIUM") elseif rng < 8 then self:LaunchPopup("DELUXE") @@ -136,8 +136,8 @@ local Comix_OnEvent = function(self, event, ...) end end -function SuperVillain:ToggleComix() - if not SuperVillain.db.system.comix then +function SV:ToggleComix() + if not SV.db.system.comix then Comix:UnregisterEvent("COMBAT_LOG_EVENT_UNFILTERED") Comix:SetScript("OnEvent", nil) else @@ -146,7 +146,7 @@ function SuperVillain:ToggleComix() end end -function SuperVillain:ToastyKombat() +function SV:ToastyKombat() --Comix:LaunchPopup("DELUXE") ComixToastyPanelBG.anim[2]:SetOffset(256, -256) ComixToastyPanelBG.anim[2]:SetOffset(0, 0) @@ -157,52 +157,52 @@ end local Comix_OnUpdate = function() Comix:ReadyState(true) end local Toasty_OnUpdate = function(self) Comix:ReadyState(true);self.parent:SetAlpha(0) end -local function LoadSuperVillainComix() - local basic = CreateFrame("Frame", "ComixBasicPanel", SuperVillain.UIParent) +local function LoadSVComix() + local basic = CreateFrame("Frame", "ComixBasicPanel", SV.UIParent) basic:SetSize(100, 100) basic:SetFrameStrata("DIALOG") - basic:Point("CENTER", SuperVillain.UIParent, "CENTER", 0, -50) + basic:Point("CENTER", SV.UIParent, "CENTER", 0, -50) basic.tex = basic:CreateTexture(nil, "ARTWORK") basic.tex:FillInner(basic) basic.tex:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\COMICS-TYPE1]]) basic.tex:SetTexCoord(0,0.25,0,0.25) - SuperVillain.Animate:RandomSlide(basic, true) + SV.Animate:RandomSlide(basic, true) basic:SetAlpha(0) basic.anim[3]:SetScript("OnFinished", Comix_OnUpdate) - local deluxe = CreateFrame("Frame", "ComixDeluxePanel", SuperVillain.UIParent) + local deluxe = CreateFrame("Frame", "ComixDeluxePanel", SV.UIParent) deluxe:SetSize(100, 100) deluxe:SetFrameStrata("DIALOG") - deluxe:Point("CENTER", SuperVillain.UIParent, "CENTER", 0, -50) + deluxe:Point("CENTER", SV.UIParent, "CENTER", 0, -50) deluxe.tex = deluxe:CreateTexture(nil, "ARTWORK") deluxe.tex:FillInner(deluxe) deluxe.tex:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\COMICS-TYPE2]]) deluxe.tex:SetTexCoord(0,0.25,0,0.25) - SuperVillain.Animate:RandomSlide(deluxe, true) + SV.Animate:RandomSlide(deluxe, true) deluxe:SetAlpha(0) deluxe.anim[3]:SetScript("OnFinished", Comix_OnUpdate) - local premium = CreateFrame("Frame", "ComixPremiumPanel", SuperVillain.UIParent) + local premium = CreateFrame("Frame", "ComixPremiumPanel", SV.UIParent) premium:SetSize(100, 100) premium:SetFrameStrata("DIALOG") - premium:Point("CENTER", SuperVillain.UIParent, "CENTER", 0, -50) + premium:Point("CENTER", SV.UIParent, "CENTER", 0, -50) premium.tex = premium:CreateTexture(nil, "ARTWORK") premium.tex:FillInner(premium) premium.tex:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\COMICS-TYPE3]]) premium.tex:SetTexCoord(0,0.25,0,0.25) - SuperVillain.Animate:RandomSlide(premium, true) + SV.Animate:RandomSlide(premium, true) premium:SetAlpha(0) premium.anim[3]:SetScript("OnFinished", Comix_OnUpdate) - local premiumbg = CreateFrame("Frame", "ComixPremiumPanelBG", SuperVillain.UIParent) + local premiumbg = CreateFrame("Frame", "ComixPremiumPanelBG", SV.UIParent) premiumbg:SetSize(128, 128) premiumbg:SetFrameStrata("BACKGROUND") - premiumbg:Point("CENTER", SuperVillain.UIParent, "CENTER", 0, -50) + premiumbg:Point("CENTER", SV.UIParent, "CENTER", 0, -50) premiumbg.tex = premiumbg:CreateTexture(nil, "ARTWORK") premiumbg.tex:FillInner(premiumbg) premiumbg.tex:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\COMICS-TYPE3-BG]]) premiumbg.tex:SetTexCoord(0,0.25,0,0.25) - SuperVillain.Animate:RandomSlide(premiumbg, false) + SV.Animate:RandomSlide(premiumbg, false) premiumbg:SetAlpha(0) premiumbg.anim[3]:SetScript("OnFinished", Comix_OnUpdate) --MOD @@ -213,11 +213,11 @@ local function LoadSuperVillainComix() toasty.tex = toasty:CreateTexture(nil, "ARTWORK") toasty.tex:FillInner(toasty) toasty.tex:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\TOASTY]]) - SuperVillain.Animate:Slide(toasty, 256, -256, true) + SV.Animate:Slide(toasty, 256, -256, true) toasty:SetAlpha(0) toasty.anim[4]:SetScript("OnFinished", Toasty_OnUpdate) Comix:ReadyState(true) - SuperVillain:ToggleComix() + SV:ToggleComix() end -SuperVillain.Registry:NewScript(LoadSuperVillainComix) \ No newline at end of file +Registry:NewScript(LoadSVComix) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/misc.lua b/Interface/AddOns/SVUI/scripts/misc.lua index 9628ecd..2ac6f75 100644 --- a/Interface/AddOns/SVUI/scripts/misc.lua +++ b/Interface/AddOns/SVUI/scripts/misc.lua @@ -31,7 +31,7 @@ local cos, deg, rad, sin = math.cos, math.deg, math.rad, math.sin; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L, Registry = unpack(select(2, ...)); local toonclass = select(2, UnitClass('player')) --[[ ########################################################## @@ -63,7 +63,7 @@ local function LoadStyledChatBubbles() end end) - if(SuperVillain.db.system.bubbles == true) then + if(SV.db.system.bubbles == true) then local ChatBubbleHandler = CreateFrame("Frame", nil, UIParent) local total = 0 local numKids = 0 @@ -82,7 +82,7 @@ local function LoadStyledChatBubbles() region:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Chat\CHATBUBBLE-TAIL]]) needsUpdate = false else - region:SetTexture("") + region:SetTexture(0,0,0,0) end elseif(region:GetObjectType() == "FontString" and not frame.text) then frame.text = region @@ -98,7 +98,7 @@ local function LoadStyledChatBubbles() frame:SetFrameStrata("BACKGROUND") end if(frame.text) then - frame.text:SetFont(SuperVillain.Media.font.dialog, 10, "NONE") + frame.text:SetFont(SV.Media.font.dialog, 10, "NONE") frame.text:SetShadowColor(0,0,0,1) frame.text:SetShadowOffset(1,-1) end @@ -124,7 +124,7 @@ local function LoadStyledChatBubbles() end end -SuperVillain.Registry:NewScript(LoadStyledChatBubbles) +Registry:NewScript(LoadStyledChatBubbles) --[[ ########################################################## DRESSUP HELPERS by: Leatrix @@ -215,12 +215,12 @@ end local function LoadDressupHelper() --[[ PAPER DOLL ENHANCEMENT ]]-- - local tabard1 = SuperVillain:CreateButton(DressUpFrame, "Tabard", "BOTTOMLEFT", 26, 79, 80, 22, "") + local tabard1 = SV:CreateButton(DressUpFrame, "Tabard", "BOTTOMLEFT", 26, 79, 80, 22, "") tabard1:SetScript("OnClick", function() DressUpModel:UndressSlot(19) end) - local nude1 = SuperVillain:CreateButton(DressUpFrame, "Nude", "BOTTOMLEFT", 106, 79, 80, 22, "") + local nude1 = SV:CreateButton(DressUpFrame, "Nude", "BOTTOMLEFT", 106, 79, 80, 22, "") nude1:SetScript("OnClick", function() DressUpFrameResetButton:Click() for i = 1, 19 do @@ -231,14 +231,14 @@ local function LoadDressupHelper() local BtnStrata, BtnLevel = SideDressUpModelResetButton:GetFrameStrata(), SideDressUpModelResetButton:GetFrameLevel() - local tabard2 = SuperVillain:CreateButton(SideDressUpFrame, "Tabard", "BOTTOMLEFT", 14, 20, 60, 22, "") + local tabard2 = SV:CreateButton(SideDressUpFrame, "Tabard", "BOTTOMLEFT", 14, 20, 60, 22, "") tabard2:SetFrameStrata(BtnStrata); tabard2:SetFrameLevel(BtnLevel); tabard2:SetScript("OnClick", function() SideDressUpModel:UndressSlot(19) end) - local nude2 = SuperVillain:CreateButton(SideDressUpFrame, "Nude", "BOTTOMRIGHT", -18, 20, 60, 22, "") + local nude2 = SV:CreateButton(SideDressUpFrame, "Nude", "BOTTOMRIGHT", -18, 20, 60, 22, "") nude2:SetFrameStrata(BtnStrata); nude2:SetFrameLevel(BtnLevel); nude2:SetScript("OnClick", function() @@ -251,7 +251,7 @@ local function LoadDressupHelper() --[[ CLOAK AND HELMET TOGGLES ]]-- helmet = CreateFrame('CheckButton', nil, CharacterModelFrame, "OptionsCheckButtonTemplate") helmet:SetSize(24, 24) - helmet:Formula409() + helmet:RemoveTextures() helmet:SetCheckboxTemplate(true) helmet.text = helmet:CreateFontString(nil, 'OVERLAY', "GameFontNormal") helmet.text:SetPoint("LEFT", 24, 0) @@ -262,7 +262,7 @@ local function LoadDressupHelper() cloak = CreateFrame('CheckButton', nil, CharacterModelFrame, "OptionsCheckButtonTemplate") cloak:SetSize(24, 24) - cloak:Formula409() + cloak:RemoveTextures() cloak:SetCheckboxTemplate(true) cloak.text = cloak:CreateFontString(nil, 'OVERLAY', "GameFontNormal") cloak.text:SetPoint("LEFT", 24, 0) @@ -282,7 +282,7 @@ local function LoadDressupHelper() CharacterModelFrame:HookScript("OnShow", SetVanityPlacement) end -SuperVillain.Registry:NewScript(LoadDressupHelper) +Registry:NewScript(LoadDressupHelper) --[[ ########################################################## RAIDMARKERS @@ -354,8 +354,8 @@ end local function RaidMarkShowIcons() if not UnitExists("target") or UnitIsDead("target") then return end local x,y = GetCursorPosition() - local scale = SuperVillain.UIParent:GetEffectiveScale() - RaidMarkFrame:SetPoint("CENTER",SuperVillain.UIParent,"BOTTOMLEFT", (x / scale), (y / scale)) + local scale = SV.UIParent:GetEffectiveScale() + RaidMarkFrame:SetPoint("CENTER",SV.UIParent,"BOTTOMLEFT", (x / scale), (y / scale)) RaidMarkFrame:Show() end @@ -414,7 +414,7 @@ local Totems_OnEvent = function(self, event) end end -function SuperVillain:UpdateTotems() +function SV:UpdateTotems() local totemSize = self.db.system.totems.size; local totemSpace = self.db.system.totems.spacing; local totemGrowth = self.db.system.totems.showBy; @@ -470,10 +470,10 @@ local Totem_OnLeave = function() end local function CreateTotemBar() - if(not SuperVillain.db.system.totems.enable) then return; end - local xOffset = SuperVillain.db.SVDock.dockLeftWidth + 12 - TotemBar = CreateFrame("Frame", "SVUI_TotemBar", SuperVillain.UIParent) - TotemBar:SetPoint("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOMLEFT", xOffset, 40) + if(not SV.db.system.totems.enable) then return; end + local xOffset = SV.db.SVDock.dockLeftWidth + 12 + TotemBar = CreateFrame("Frame", "SVUI_TotemBar", SV.UIParent) + TotemBar:SetPoint("BOTTOMLEFT", SV.UIParent, "BOTTOMLEFT", xOffset, 40) for i = 1, MAX_TOTEMS do local id = priorities[i] local totem = CreateFrame("Button", "TotemBarTotem"..id, TotemBar) @@ -487,7 +487,7 @@ local function CreateTotemBar() totem.CD = CreateFrame("Cooldown", "TotemBarTotem"..id.."Cooldown", totem, "CooldownFrameTemplate") totem.CD:SetReverse(true) totem.CD:FillInner() - SuperVillain:AddCD(totem.CD) + SV:AddCD(totem.CD) totem.Anchor = CreateFrame("Frame", nil, totem) totem.Anchor:SetAllPoints() @@ -527,7 +527,7 @@ local function CreateTotemBar() Totems:RegisterEvent("PLAYER_ENTERING_WORLD") Totems:SetScript("OnEvent", Totems_OnEvent) Totems_OnEvent() - SuperVillain:UpdateTotems() + SV:UpdateTotems() local frame_name; if toonclass == "DEATHKNIGHT" then frame_name = L["Ghoul Bar"] @@ -536,10 +536,10 @@ local function CreateTotemBar() else frame_name = L["Totem Bar"] end - SuperVillain:SetSVMovable(TotemBar, frame_name) + SV:SetSVMovable(TotemBar, frame_name) end -SuperVillain.Registry:NewScript(CreateTotemBar) +Registry:NewScript(CreateTotemBar) --[[ ########################################################## THREAT THERMOMETER @@ -567,7 +567,7 @@ local function GetThreatBarColor(unitWithHighestThreat) if not colors then return 15,15,15 end return colors.r*255, colors.g*255, colors.b*255 elseif react then - local reaction=oUF_SuperVillain['colors'].reaction[react] + local reaction=oUF_Villain['colors'].reaction[react] return reaction[1]*255, reaction[2]*255, reaction[3]*255 else return 15,15,15 @@ -598,7 +598,7 @@ local function ThreatBar_OnEvent(self, event) local highestThreat,unitWithHighestThreat = UMadBro(scaledPercent) if highestThreat > 0 and unitWithHighestThreat ~= nil then local r,g,b = GetThreatBarColor(unitWithHighestThreat) - if SuperVillain.ClassRole == 'T' then + if SV.ClassRole == 'T' then self:SetStatusBarColor(0,0.839,0) self:SetValue(highestThreat) else @@ -621,8 +621,8 @@ local function ThreatBar_OnEvent(self, event) end local function LoadThreatBar() - if(SuperVillain.db.system.threatbar == true) then - local ThreatBar = CreateFrame('StatusBar', 'SVUI_ThreatBar', SuperVillain.UIParent); + if(SV.db.system.threatbar == true) then + local ThreatBar = CreateFrame('StatusBar', 'SVUI_ThreatBar', SV.UIParent); ThreatBar:SetStatusBarTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Doodads\\THREAT-BAR") ThreatBar:SetSize(50,100) ThreatBar:SetFrameStrata('MEDIUM') @@ -639,18 +639,18 @@ local function LoadThreatBar() ThreatBar.overlay:SetTexture(BARFILE) ThreatBar.overlay:SetTexCoord(0.75,1,0,0.5) ThreatBar.text = ThreatBar:CreateFontString(nil,'OVERLAY') - ThreatBar.text:SetFont(SuperVillain.Media.font.numbers, 10, "OUTLINE") + ThreatBar.text:SetFont(SV.Media.font.numbers, 10, "OUTLINE") ThreatBar.text:SetPoint('TOP',ThreatBar,'BOTTOM',0,0) ThreatBar:RegisterEvent('PLAYER_TARGET_CHANGED'); ThreatBar:RegisterEvent('UNIT_THREAT_LIST_UPDATE') ThreatBar:RegisterEvent('GROUP_ROSTER_UPDATE') ThreatBar:RegisterEvent('UNIT_PET') ThreatBar:SetScript("OnEvent", ThreatBar_OnEvent) - SuperVillain:SetSVMovable(ThreatBar, "Threat Bar"); + SV:SetSVMovable(ThreatBar, "Threat Bar"); end end -SuperVillain.Registry:NewScript(LoadThreatBar); +Registry:NewScript(LoadThreatBar); -- local PVP_POI = { -- [401] = { --Alterac Valley (15) diff --git a/Interface/AddOns/SVUI/scripts/mounts.lua b/Interface/AddOns/SVUI/scripts/mounts.lua index 20945b1..890dd3e 100644 --- a/Interface/AddOns/SVUI/scripts/mounts.lua +++ b/Interface/AddOns/SVUI/scripts/mounts.lua @@ -32,7 +32,7 @@ local twipe,band = table.wipe, bit.band; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L, Registry = unpack(select(2, ...)); -- SVUI_Cache.Mounts.types -- SVUI_Cache.Mounts.names --[[ @@ -270,7 +270,7 @@ local function SetMountCheckButtons() buttonBar["GROUND"] = CreateFrame("CheckButton", ("%s_GROUND"):format(barName), buttonBar, "UICheckButtonTemplate") buttonBar["GROUND"]:SetSize(width,height) buttonBar["GROUND"]:SetPoint("BOTTOMLEFT", buttonBar, "BOTTOMLEFT", 6, 4) - buttonBar["GROUND"]:Formula409() + buttonBar["GROUND"]:RemoveTextures() buttonBar["GROUND"]:SetCheckboxTemplate() buttonBar["GROUND"]:SetPanelColor(0.2, 0.7, 0.1, 0.15) buttonBar["GROUND"]:GetCheckedTexture():SetVertexColor(0.2, 0.7, 0.1, 1) @@ -287,7 +287,7 @@ local function SetMountCheckButtons() buttonBar["FLYING"] = CreateFrame("CheckButton", ("%s_FLYING"):format(barName), buttonBar, "UICheckButtonTemplate") buttonBar["FLYING"]:SetSize(width,height) buttonBar["FLYING"]:SetPoint("BOTTOMLEFT", buttonBar["GROUND"], "BOTTOMRIGHT", 2, 0) - buttonBar["FLYING"]:Formula409() + buttonBar["FLYING"]:RemoveTextures() buttonBar["FLYING"]:SetCheckboxTemplate() buttonBar["FLYING"]:SetPanelColor(1, 1, 0.2, 0.15) buttonBar["FLYING"]:GetCheckedTexture():SetVertexColor(1, 1, 0.2, 1) @@ -304,7 +304,7 @@ local function SetMountCheckButtons() buttonBar["SWIMMING"] = CreateFrame("CheckButton", ("%s_SWIMMING"):format(barName), buttonBar, "UICheckButtonTemplate") buttonBar["SWIMMING"]:SetSize(width,height) buttonBar["SWIMMING"]:SetPoint("BOTTOMLEFT", buttonBar["FLYING"], "BOTTOMRIGHT", 2, 0) - buttonBar["SWIMMING"]:Formula409() + buttonBar["SWIMMING"]:RemoveTextures() buttonBar["SWIMMING"]:SetCheckboxTemplate() buttonBar["SWIMMING"]:SetPanelColor(0.2, 0.42, 0.76, 0.15) buttonBar["SWIMMING"]:GetCheckedTexture():SetVertexColor(0.2, 0.42, 0.76, 1) @@ -321,7 +321,7 @@ local function SetMountCheckButtons() buttonBar["SPECIAL"] = CreateFrame("CheckButton", ("%s_SPECIAL"):format(barName), buttonBar, "UICheckButtonTemplate") buttonBar["SPECIAL"]:SetSize(width,height) buttonBar["SPECIAL"]:SetPoint("BOTTOMLEFT", buttonBar["SWIMMING"], "BOTTOMRIGHT", 2, 0) - buttonBar["SPECIAL"]:Formula409() + buttonBar["SPECIAL"]:RemoveTextures() buttonBar["SPECIAL"]:SetCheckboxTemplate() buttonBar["SPECIAL"]:SetPanelColor(0.7, 0.1, 0.1, 0.15) buttonBar["SPECIAL"]:GetCheckedTexture():SetVertexColor(0.7, 0.1, 0.1, 1) @@ -405,7 +405,7 @@ function SVUILetsRide() return else if(checkList["GROUND"]) then - SuperVillain:AddonMessage("No flying mount selected! Using your ground mount.") + SV:AddonMessage("No flying mount selected! Using your ground mount.") CallCompanion("MOUNT", checkList["GROUND"]) return end @@ -420,7 +420,7 @@ function SVUILetsRide() CallCompanion("MOUNT", checkList["SWIMMING"]) return elseif(letsFly and checkList["FLYING"]) then - SuperVillain:AddonMessage("No swimming mount selected! Using your flying mount.") + SV:AddonMessage("No swimming mount selected! Using your flying mount.") CallCompanion("MOUNT", checkList["FLYING"]) return end @@ -438,4 +438,4 @@ end LOADER ########################################################## ]]-- -SuperVillain.Registry:NewScript(SetMountCheckButtons); \ No newline at end of file +Registry:NewScript(SetMountCheckButtons); \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/questwatch.lua b/Interface/AddOns/SVUI/scripts/questwatch.lua index 5e212c8..c4d3515 100644 --- a/Interface/AddOns/SVUI/scripts/questwatch.lua +++ b/Interface/AddOns/SVUI/scripts/questwatch.lua @@ -51,7 +51,7 @@ local tremove, tcopy, twipe, tsort, tconcat = table.remove, table.copy, table.wi GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L, Registry = unpack(select(2, ...)); local QuestDocklet = CreateFrame("Frame", "SVQuestFrameEventListener", UIParent) --[[ ########################################################## @@ -111,7 +111,7 @@ local function QWQuestItems() _G["WatchFrameItem"..i.."NormalTexture"]:SetAlpha(0) _G["WatchFrameItem"..i.."IconTexture"]:FillInner() _G["WatchFrameItem"..i.."IconTexture"]:SetTexCoord(0.1,0.9,0.1,0.9) - SuperVillain:AddCD(_G["WatchFrameItem"..i.."Cooldown"]) + SV:AddCD(_G["WatchFrameItem"..i.."Cooldown"]) button.styled = true end end @@ -310,7 +310,7 @@ local QuestDocklet_OnEvent = function(self, event) if not SuperDockWindowRight:IsShown()then SuperDockWindowRight:Show() end - SuperVillain:CycleDocklets() + SV:CycleDocklets() QuestDockletFrame:Show() if button then button.IsOpen = true; @@ -322,7 +322,7 @@ end local function CreateQuestDocklet() SuperDockWindowRight = _G["SuperDockWindowRight"] - if(not SuperVillain.db.system.questWatch) then + if(not SV.db.system.questWatch) then local frame = CreateFrame("Frame", "SVUI_QuestFrame", UIParent); frame:SetSize(200, WatchFrame:GetHeight()); frame:SetPoint("RIGHT", UIParent, "RIGHT", -100, 0); @@ -331,19 +331,19 @@ local function CreateQuestDocklet() WatchFrame:SetParent(SVUI_QuestFrame) WatchFrame:SetAllPoints(SVUI_QuestFrame) WatchFrame:SetFrameLevel(SVUI_QuestFrame:GetFrameLevel() + 1) - WatchFrame.ClearAllPoints = SuperVillain.fubar; - WatchFrame.SetPoint = SuperVillain.fubar; - WatchFrame.SetAllPoints = SuperVillain.fubar; - WatchFrameLines.ClearAllPoints = SuperVillain.fubar; - WatchFrameLines.SetPoint = SuperVillain.fubar; - WatchFrameLines.SetAllPoints = SuperVillain.fubar; - SuperVillain:SetSVMovable(frame, "Quest Watch"); + WatchFrame.ClearAllPoints = SV.fubar; + WatchFrame.SetPoint = SV.fubar; + WatchFrame.SetAllPoints = SV.fubar; + WatchFrameLines.ClearAllPoints = SV.fubar; + WatchFrameLines.SetPoint = SV.fubar; + WatchFrameLines.SetAllPoints = SV.fubar; + SV:SetSVMovable(frame, "Quest Watch"); else local bgTex = [[Interface\BUTTONS\WHITE8X8]] - local bdTex = SuperVillain.Media.bar.glow + local bdTex = SV.Media.bar.glow QuestDockletFrame = CreateFrame("Frame", "QuestDockletFrame", SuperDockWindowRight); QuestDockletFrame:SetFrameStrata("BACKGROUND"); - SuperVillain:RegisterDocklet("QuestDockletFrame", "Quest Watch", ICON_FILE, false, true) + SV:RegisterDocklet("QuestDockletFrame", "Quest Watch", ICON_FILE, false, true) QuestDockletFrameList = CreateFrame("ScrollFrame", nil, QuestDockletFrame); QuestDockletFrameList:SetPoint("TOPLEFT", QuestDockletFrame, -62, 0); @@ -418,21 +418,21 @@ local function CreateQuestDocklet() QuestDockletFrameSlider:ClearAllPoints() QuestDockletFrameSlider:SetPoint("TOPRIGHT", QuestDockletFrame, "TOPRIGHT", -3, 0) - WatchFrameLines:Formula409(true) + WatchFrameLines:RemoveTextures(true) WatchFrameLines:SetPoint("TOPLEFT", WatchFrame, "TOPLEFT", 87, 0) WatchFrameLines:SetPoint("BOTTOMLEFT", WatchFrame, "BOTTOMLEFT", 87, 0) WatchFrameLines:SetWidth(WATCHFRAME_MAXLINEWIDTH - 100) --[[Lets murder some internals to prevent overriding]]-- - WatchFrame.ClearAllPoints = SuperVillain.fubar; - WatchFrame.SetPoint = SuperVillain.fubar; - WatchFrame.SetAllPoints = SuperVillain.fubar; - WatchFrameLines.ClearAllPoints = SuperVillain.fubar; - WatchFrameLines.SetPoint = SuperVillain.fubar; - WatchFrameLines.SetAllPoints = SuperVillain.fubar; - WatchFrameLines.SetWidth = SuperVillain.fubar; - WatchFrameCollapseExpandButton.ClearAllPoints = SuperVillain.fubar; - WatchFrameCollapseExpandButton.SetPoint = SuperVillain.fubar; - WatchFrameCollapseExpandButton.SetAllPoints = SuperVillain.fubar; + WatchFrame.ClearAllPoints = SV.fubar; + WatchFrame.SetPoint = SV.fubar; + WatchFrame.SetAllPoints = SV.fubar; + WatchFrameLines.ClearAllPoints = SV.fubar; + WatchFrameLines.SetPoint = SV.fubar; + WatchFrameLines.SetAllPoints = SV.fubar; + WatchFrameLines.SetWidth = SV.fubar; + WatchFrameCollapseExpandButton.ClearAllPoints = SV.fubar; + WatchFrameCollapseExpandButton.SetPoint = SV.fubar; + WatchFrameCollapseExpandButton.SetAllPoints = SV.fubar; SetQuestDockEvents() @@ -442,4 +442,4 @@ local function CreateQuestDocklet() end end -SuperVillain.Registry:NewScript(CreateQuestDocklet) \ No newline at end of file +Registry:NewScript(CreateQuestDocklet) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/raid.lua b/Interface/AddOns/SVUI/scripts/raid.lua index 27e387c..64c4c5c 100644 --- a/Interface/AddOns/SVUI/scripts/raid.lua +++ b/Interface/AddOns/SVUI/scripts/raid.lua @@ -26,7 +26,7 @@ local pairs = _G.pairs; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L, Registry = unpack(select(2, ...)); --[[ ########################################################## RAID UTILITY By: Elv @@ -61,7 +61,7 @@ local function CreateUtilButton(name, parent, template, width, height, point, re if text then local t = b:CreateFontString(nil,"OVERLAY") - t:SetFont(SuperVillain.Media.font.roboto, 14, "NONE") + t:SetFont(SV.Media.font.roboto, 14, "NONE") t:SetAllPoints(b) t:SetJustifyH("CENTER") t:SetText(text) @@ -110,7 +110,7 @@ RaidUtilFrame:SetScript("OnEvent", ToggleRaidUtil) local function LoadRaidUtility() --Create main frame - local RaidUtilityPanel = CreateFrame("Frame", "RaidUtilityPanel", SuperVillain.UIParent, "SecureHandlerClickTemplate") + local RaidUtilityPanel = CreateFrame("Frame", "RaidUtilityPanel", SV.UIParent, "SecureHandlerClickTemplate") RaidUtilityPanel:SetPanelTemplate('Transparent') RaidUtilityPanel:Width(120) RaidUtilityPanel:Height(PANEL_HEIGHT) @@ -118,10 +118,10 @@ local function LoadRaidUtility() RaidUtilityPanel:SetFrameLevel(3) RaidUtilityPanel.toggled = false RaidUtilityPanel:SetFrameStrata("HIGH") - SuperVillain:AddToDisplayAudit(RaidUtilityPanel) + SV:AddToDisplayAudit(RaidUtilityPanel) --Show Button - CreateUtilButton("RaidUtility_ShowButton", SuperVillain.UIParent, "UIMenuButtonStretchTemplate, SecureHandlerClickTemplate", SuperDockToolBarTop.openWidth, SuperDockToolBarTop:GetHeight(), "CENTER", SuperDockToolBarTop, "CENTER", 0, 0, RAID_CONTROL, nil) + CreateUtilButton("RaidUtility_ShowButton", SV.UIParent, "UIMenuButtonStretchTemplate, SecureHandlerClickTemplate", SuperDockToolBarTop.openWidth, SuperDockToolBarTop:GetHeight(), "CENTER", SuperDockToolBarTop, "CENTER", 0, 0, RAID_CONTROL, nil) RaidUtility_ShowButton:SetFrameRef("RaidUtilityPanel", RaidUtilityPanel) RaidUtility_ShowButton:SetAttribute("_onclick", [=[ local raidUtil = self:GetFrameRef("RaidUtilityPanel") @@ -159,19 +159,19 @@ local function LoadRaidUtility() RaidUtility_ShowButton:SetScript("OnDragStart", function(self) self:StartMoving() end) - SuperVillain:AddToDisplayAudit(RaidUtility_ShowButton) + SV:AddToDisplayAudit(RaidUtility_ShowButton) RaidUtility_ShowButton:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() local point = self:GetPoint() local xOffset = self:GetCenter() - local screenWidth = SuperVillain.UIParent:GetWidth() / 2 + local screenWidth = SV.UIParent:GetWidth() / 2 xOffset = xOffset - screenWidth self:ClearAllPoints() if find(point, "BOTTOM") then - self:SetPoint('BOTTOM', SuperVillain.UIParent, 'BOTTOM', xOffset, -1) + self:SetPoint('BOTTOM', SV.UIParent, 'BOTTOM', xOffset, -1) else - self:SetPoint('TOP', SuperVillain.UIParent, 'TOP', xOffset, 1) + self:SetPoint('TOP', SV.UIParent, 'TOP', xOffset, 1) end end) @@ -188,7 +188,7 @@ local function LoadRaidUtility() CreateUtilButton("DisbandRaidButton", RaidUtilityPanel, "UIMenuButtonStretchTemplate", buttonWidth, 18, "TOP", RaidUtilityPanel, "TOP", 0, -5, L['Disband Group'], nil) DisbandRaidButton:SetScript("OnMouseUp", function(self) if CheckRaidStatus() then - SuperVillain:StaticPopup_Show("DISBAND_RAID") + SV:StaticPopup_Show("DISBAND_RAID") end end) @@ -221,7 +221,7 @@ local function LoadRaidUtility() CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:Height(18) CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:SetWidth(buttonWidth) local markersText = CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton:CreateFontString(nil,"OVERLAY") - markersText:SetFont(SuperVillain.Media.font.roboto, 14, "NONE") + markersText:SetFont(SV.Media.font.roboto, 14, "NONE") markersText:SetAllPoints(CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButton) markersText:SetJustifyH("CENTER") markersText:SetText("World Markers") @@ -250,7 +250,7 @@ local function LoadRaidUtility() for i, gName in pairs(buttons) do local button = _G[gName] if(button) then - button:Formula409() + button:RemoveTextures() button:SetFramedButtonTemplate() button:HookScript("OnEnter", ButtonEnter) button:HookScript("OnLeave", ButtonLeave) @@ -258,4 +258,4 @@ local function LoadRaidUtility() end end end -SuperVillain.Registry:NewScript(LoadRaidUtility); \ No newline at end of file +Registry:NewScript(LoadRaidUtility); \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/reactions.lua b/Interface/AddOns/SVUI/scripts/reactions.lua index 30d91e6..5c2f0a3 100644 --- a/Interface/AddOns/SVUI/scripts/reactions.lua +++ b/Interface/AddOns/SVUI/scripts/reactions.lua @@ -32,7 +32,7 @@ local format, gsub = string.format, string.gsub; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L, Registry = unpack(select(2, ...)); --[[ ########################################################## LOCALS (from ShestakUI by:Shestak) @@ -138,7 +138,7 @@ local ChatLogHandler_OnEvent = function(self, event, ...) if not sourceName then return end - if(SuperVillain.db.system.pvpinterrupt) then + if(SV.db.system.pvpinterrupt) then if ((spellID == 6770) and (destName == toon) and (subEvent == "SPELL_AURA_APPLIED" or subEvent == "SPELL_AURA_REFRESH")) then local msg = SAPPED_MESSAGE[rng()] SendChatMessage(msg, "SAY") @@ -148,7 +148,7 @@ local ChatLogHandler_OnEvent = function(self, event, ...) end end - if(SuperVillain.db.system.woot) then + if(SV.db.system.woot) then for key, value in pairs(Reactions.Woot) do if spellID == key and value == true and destName == toon and sourceName ~= toon and (subEvent == "SPELL_AURA_APPLIED" or subEvent == "SPELL_CAST_SUCCESS") then SendChatMessage(L["Thanks for "]..GetSpellLink(spellID)..", "..sourceName, "WHISPER", nil, sourceName) @@ -157,7 +157,7 @@ local ChatLogHandler_OnEvent = function(self, event, ...) end end - if(SuperVillain.db.system.lookwhaticando) then + if(SV.db.system.lookwhaticando) then local spells = Reactions.LookWhatICanDo local _, _, difficultyID = GetInstanceInfo() if(difficultyID ~= 0 and subEvent == "SPELL_CAST_SUCCESS") then @@ -186,7 +186,7 @@ local ChatLogHandler_OnEvent = function(self, event, ...) end end - if(SuperVillain.db.system.sharingiscaring) then + if(SV.db.system.sharingiscaring) then if not IsInGroup() or InCombatLockdown() or not subEvent or not spellID then return end if not UnitInRaid(sourceName) and not UnitInParty(sourceName) then return end @@ -244,8 +244,8 @@ end CONFIG TOGGLE ########################################################## ]]-- -function SuperVillain:ToggleReactions() - local settings = SuperVillain.db.system +function SV:ToggleReactions() + local settings = SV.db.system if(settings.stupidhat) then StupidHatHandler:RegisterEvent("ZONE_CHANGED_NEW_AREA") @@ -269,7 +269,7 @@ LOADER ########################################################## ]]-- local function LoadReactions() - SuperVillain:ToggleReactions() + SV:ToggleReactions() end -SuperVillain.Registry:NewScript(LoadReactions) \ No newline at end of file +Registry:NewScript(LoadReactions) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/spellbind.lua b/Interface/AddOns/SVUI/scripts/spellbind.lua index cd6d206..7e72daf 100644 --- a/Interface/AddOns/SVUI/scripts/spellbind.lua +++ b/Interface/AddOns/SVUI/scripts/spellbind.lua @@ -32,7 +32,7 @@ local format, gsub = string.format, string.gsub; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L, Registry = unpack(select(2, ...)); --[[ ########################################################## Simple click2cast spell binder(sBinder by Fernir) @@ -204,7 +204,7 @@ local function binder_BuildSpells(self, delete) i = 1 while _G[i.."_cbs"] do _G[i.."_fs"]:SetText("") - _G[i.."_texture"]:SetTexture("") + _G[i.."_texture"]:SetTexture(0,0,0,0) _G[i.."_cbs"].checked = false _G[i.."_cbs"]:ClearAllPoints() _G[i.."_cbs"]:Hide() @@ -259,7 +259,7 @@ local function binder_BuildSpells(self, delete) bf.fs:SetText(spell.modifier..spell.origbutton) bf.fs:SetPoint("RIGHT", bf.delete, "LEFT", -4, 0) - for frame, j in pairs(self.roster) do + for frame,_ in pairs(self.roster) do if frame and DB.frames[frame] then if frame:CanChangeAttribute() or frame:CanChangeProtectedState() then if frame:GetAttribute(spell.modifier.."type"..spell.button) ~= "menu" then @@ -291,7 +291,7 @@ local function binder_BuildSpells(self, delete) end local function binder_BuildList(self) - for frame, value in pairs(self.roster) do + for frame,_ in pairs(self.roster) do DB.frames[frame] = DB.frames[frame] or true end end @@ -320,7 +320,7 @@ local function binder_DeleteSpell(self) local count = table.getn(DB.spells) for i, spell in ipairs(DB.spells) do if spell.checked then - for frame, j in pairs(self.roster) do + for frame,_ in pairs(self.roster) do local f if frame and type(frame) == "table" then f = frame:GetName() end if f then @@ -378,9 +378,9 @@ local function enable(frame) end end -local BindableFrames = SuperVillain.SVUnit.Roster -for unit,name in pairs(BindableFrames) do - binder.roster[unit] = name +local BindableFrames = SV.SVUnit.Roster +for frame,_ in pairs(BindableFrames) do + binder.roster[frame] = true end binder.BuildSpells = binder_BuildSpells @@ -394,18 +394,18 @@ _G["SVUI_SpellBinderCloseButton"]:SetScript("OnClick", SpellBindClose_OnClick) hooksecurefunc("SpellBookFrame_Update", _hook_SpellBookFrame_OnUpdate) hooksecurefunc(SpellBookFrame, "Hide", _hook_SpellBookFrame_OnHide) -binder:Formula409() -_G["SVUI_SpellBinderInset"]:Formula409() +binder:RemoveTextures() +_G["SVUI_SpellBinderInset"]:RemoveTextures() binder:SetPanelTemplate("Action") binder.Panel:SetPoint("TOPLEFT", -18, 0) binder.Panel:SetPoint("BOTTOMRIGHT", 0, 0) -binder.list:Formula409() +binder.list:RemoveTextures() binder.list:SetPanelTemplate("Inset") binder.tab = CreateFrame("CheckButton", nil, _G["SpellBookSkillLineTab1"], "SpellBookSkillLineTabTemplate") -binder.tab:Formula409() +binder.tab:RemoveTextures() binder.tab:SetButtonTemplate() binder.tab:SetNormalTexture("Interface\\ICONS\\Achievement_Guild_Doctorisin") binder.tab:GetNormalTexture():ClearAllPoints() @@ -424,10 +424,10 @@ binder:RegisterEvent("ZONE_CHANGED") binder:SetScript("OnEvent", SpellBind_OnEvent) local function LoadSpellBinder() - local BindableFrames = SuperVillain.SVUnit.Roster - for unit,name in pairs(BindableFrames) do - binder.roster[unit] = name + local BindableFrames = SV.SVUnit.Roster + for frame,_ in pairs(BindableFrames) do + binder.roster[frame] = true end end -SuperVillain.Registry:NewScript(LoadSpellBinder) \ No newline at end of file +Registry:NewScript(LoadSpellBinder) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index 4a2500a..46740c1 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -41,7 +41,7 @@ local assert = enforce; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L = unpack(select(2, ...)); --[[ ########################################################## LOCAL VARS @@ -49,49 +49,49 @@ LOCAL VARS ]]-- local BUFFER = {}; local function UpdateActionBarOptions() - if InCombatLockdown() or not SuperVillain.db.SVBar.IsLoaded then return end - if (SuperVillain.db.SVBar.Bar2.enable ~= InterfaceOptionsActionBarsPanelBottomRight:GetChecked()) then + if InCombatLockdown() or not SV.db.SVBar.IsLoaded then return end + if (SV.db.SVBar.Bar2.enable ~= InterfaceOptionsActionBarsPanelBottomRight:GetChecked()) then InterfaceOptionsActionBarsPanelBottomRight:Click() end - if (SuperVillain.db.SVBar.Bar3.enable ~= InterfaceOptionsActionBarsPanelRightTwo:GetChecked()) then + if (SV.db.SVBar.Bar3.enable ~= InterfaceOptionsActionBarsPanelRightTwo:GetChecked()) then InterfaceOptionsActionBarsPanelRightTwo:Click() end - if (SuperVillain.db.SVBar.Bar4.enable ~= InterfaceOptionsActionBarsPanelRight:GetChecked()) then + if (SV.db.SVBar.Bar4.enable ~= InterfaceOptionsActionBarsPanelRight:GetChecked()) then InterfaceOptionsActionBarsPanelRight:Click() end - if (SuperVillain.db.SVBar.Bar5.enable ~= InterfaceOptionsActionBarsPanelBottomLeft:GetChecked()) then + if (SV.db.SVBar.Bar5.enable ~= InterfaceOptionsActionBarsPanelBottomLeft:GetChecked()) then InterfaceOptionsActionBarsPanelBottomLeft:Click() end - SuperVillain.SVBar:RefreshBar("Bar1") - SuperVillain.SVBar:RefreshBar("Bar6") + SV.SVBar:RefreshBar("Bar1") + SV.SVBar:RefreshBar("Bar6") end --[[ ########################################################## DEFINITIONS ########################################################## ]]-- -SuperVillain.SystemAlert = {}; +SV.SystemAlert = {}; -SuperVillain.ActiveAlerts = {}; +SV.ActiveAlerts = {}; -SuperVillain.SystemAlert["CLIENT_UPDATE_REQUEST"] = { +SV.SystemAlert["CLIENT_UPDATE_REQUEST"] = { text = L["Detected that your SVUI Config addon is out of date. Update as soon as possible."], button1 = OKAY, - OnAccept = SuperVillain.fubar, + OnAccept = SV.fubar, state1 = 1 }; -SuperVillain.SystemAlert["FAILED_UISCALE"] = { +SV.SystemAlert["FAILED_UISCALE"] = { text = L["You have changed your UIScale, however you still have the AutoScale option enabled in SVUI. Press accept if you would like to disable the Auto Scale option."], button1 = ACCEPT, button2 = CANCEL, - OnAccept = function() SuperVillain.db.system.autoScale = false; ReloadUI(); end, + OnAccept = function() SV.db.system.autoScale = false; ReloadUI(); end, OnCancel = function() ReloadUI() end, timeout = 0, whileDead = 1, hideOnEscape = false, } -SuperVillain.SystemAlert["TAINT_RL"] = { +SV.SystemAlert["TAINT_RL"] = { text = L["SVUI has lost it's damned mind! I need to reload your UI to fix it."], button1 = ACCEPT, button2 = CANCEL, @@ -100,7 +100,7 @@ SuperVillain.SystemAlert["TAINT_RL"] = { whileDead = 1, hideOnEscape = true }; -SuperVillain.SystemAlert["RL_CLIENT"] = { +SV.SystemAlert["RL_CLIENT"] = { text = L["A setting you have changed requires that you reload your User Interface."], button1 = ACCEPT, button2 = CANCEL, @@ -109,28 +109,28 @@ SuperVillain.SystemAlert["RL_CLIENT"] = { whileDead = 1, hideOnEscape = false }; -SuperVillain.SystemAlert["KEYBIND_MODE"] = { +SV.SystemAlert["KEYBIND_MODE"] = { text = L["Hover your mouse over any actionbutton or spellbook button to bind it. Press the escape key or right click to clear the current actionbutton's keybinding."], button1 = L["Save"], button2 = L["Discard"], - OnAccept = function()SuperVillain.SVBar:ToggleKeyBindingMode(true, true)end, - OnCancel = function()SuperVillain.SVBar:ToggleKeyBindingMode(true, false)end, + OnAccept = function()SV.SVBar:ToggleKeyBindingMode(true, true)end, + OnCancel = function()SV.SVBar:ToggleKeyBindingMode(true, false)end, timeout = 0, whileDead = 1, hideOnEscape = false }; -SuperVillain.SystemAlert["DELETE_GRAYS"] = { +SV.SystemAlert["DELETE_GRAYS"] = { text = L["Are you sure you want to delete all your gray items?"], button1 = YES, button2 = NO, - OnAccept = function()SuperVillain.SVBag:VendorGrays(true) end, - OnShow = function(a)MoneyFrame_Update(a.moneyFrame, SuperVillain.SystemAlert["DELETE_GRAYS"].Money)end, + OnAccept = function()SV.SVBag:VendorGrays(true) end, + OnShow = function(a)MoneyFrame_Update(a.moneyFrame, SV.SystemAlert["DELETE_GRAYS"].Money)end, timeout = 0, whileDead = 1, hideOnEscape = false, hasMoneyFrame = 1 }; -SuperVillain.SystemAlert["BUY_BANK_SLOT"] = { +SV.SystemAlert["BUY_BANK_SLOT"] = { text = CONFIRM_BUY_BANK_SLOT, button1 = YES, button2 = NO, @@ -140,87 +140,87 @@ SuperVillain.SystemAlert["BUY_BANK_SLOT"] = { timeout = 0, hideOnEscape = 1 }; -SuperVillain.SystemAlert["CANNOT_BUY_BANK_SLOT"] = { +SV.SystemAlert["CANNOT_BUY_BANK_SLOT"] = { text = L["Can't buy anymore slots!"], button1 = ACCEPT, timeout = 0, whileDead = 1 }; -SuperVillain.SystemAlert["NO_BANK_BAGS"] = { +SV.SystemAlert["NO_BANK_BAGS"] = { text = L["You must purchase a bank slot first!"], button1 = ACCEPT, timeout = 0, whileDead = 1 }; -SuperVillain.SystemAlert["DISBAND_RAID"] = { +SV.SystemAlert["DISBAND_RAID"] = { text = L["Are you sure you want to disband the group?"], button1 = ACCEPT, button2 = CANCEL, - OnAccept = function() SuperVillain.SVOverride:DisbandRaidGroup() end, + OnAccept = function() SV.SVOverride:DisbandRaidGroup() end, timeout = 0, whileDead = 1, }; -SuperVillain.SystemAlert["RESETMOVERS_CHECK"] = { +SV.SystemAlert["RESETMOVERS_CHECK"] = { text = L["Are you sure you want to reset every mover back to it's default position?"], button1 = ACCEPT, button2 = CANCEL, - OnAccept = function(a)SuperVillain:ResetUI(true)end, + OnAccept = function(a)SV:ResetUI(true)end, timeout = 0, whileDead = 1 }; -SuperVillain.SystemAlert["RESET_UI_CHECK"] = { +SV.SystemAlert["RESET_UI_CHECK"] = { text = L["I will attempt to preserve some of your basic settings but no promises. This will clean out everything else. Are you sure you want to reset everything?"], button1 = ACCEPT, button2 = CANCEL, - OnAccept = function(a)SuperVillain:ResetAllUI(true)end, + OnAccept = function(a)SV:ResetAllUI(true)end, timeout = 0, whileDead = 1 }; -SuperVillain.SystemAlert["CONFIRM_LOOT_DISTRIBUTION"] = { +SV.SystemAlert["CONFIRM_LOOT_DISTRIBUTION"] = { text = CONFIRM_LOOT_DISTRIBUTION, button1 = YES, button2 = NO, timeout = 0, hideOnEscape = 1 }; -SuperVillain.SystemAlert["RESET_PROFILE_PROMPT"] = { +SV.SystemAlert["RESET_PROFILE_PROMPT"] = { text = L["Are you sure you want to reset all the settings on this profile?"], button1 = YES, button2 = NO, timeout = 0, hideOnEscape = 1, OnAccept = function() - SuperVillain.db:Reset() + SV.db:Reset() end }; -SuperVillain.SystemAlert["COPY_PROFILE_PROMPT"] = { +SV.SystemAlert["COPY_PROFILE_PROMPT"] = { text = L["Are you sure you want to copy all settings from this profile?"], button1 = YES, button2 = NO, timeout = 0, hideOnEscape = 1, - OnAccept = SuperVillain.fubar + OnAccept = SV.fubar }; -SuperVillain.SystemAlert["BAR6_CONFIRMATION"] = { +SV.SystemAlert["BAR6_CONFIRMATION"] = { text = L["Enabling / Disabling Bar #6 will toggle a paging option from your main actionbar to prevent duplicating bars, are you sure you want to do this?"], button1 = YES, button2 = NO, OnAccept = function(a) - if SuperVillain.db.SVBar["BAR6"].enable ~= true then - SuperVillain.db.SVBar.Bar6.enable = true; + if SV.db.SVBar["BAR6"].enable ~= true then + SV.db.SVBar.Bar6.enable = true; UpdateActionBarOptions() else - SuperVillain.db.SVBar.Bar6.enable = false; + SV.db.SVBar.Bar6.enable = false; UpdateActionBarOptions() end end, - OnCancel = SuperVillain.fubar, + OnCancel = SV.fubar, timeout = 0, whileDead = 1, state1 = 1 }; -SuperVillain.SystemAlert["CONFIRM_LOSE_BINDING_CHANGES"] = { +SV.SystemAlert["CONFIRM_LOSE_BINDING_CHANGES"] = { text = CONFIRM_LOSE_BINDING_CHANGES, button1 = OKAY, button2 = CANCEL, @@ -232,7 +232,7 @@ SuperVillain.SystemAlert["CONFIRM_LOSE_BINDING_CHANGES"] = { LoadBindings(1) SaveBindings(1) end - SuperVillain.SVBar.bindingsChanged = nil + SV.SVBar.bindingsChanged = nil end, OnCancel = function(a) if SVUI_KeyBindPopupCheckButton:GetChecked()then @@ -245,10 +245,10 @@ SuperVillain.SystemAlert["CONFIRM_LOSE_BINDING_CHANGES"] = { whileDead = 1, state1 = 1 }; -SuperVillain.SystemAlert["INCOMPATIBLE_ADDON"] = { +SV.SystemAlert["INCOMPATIBLE_ADDON"] = { text = L["INCOMPATIBLE_ADDON"], - OnAccept = function(a)DisableAddOn(SuperVillain.SystemAlert["INCOMPATIBLE_ADDON"].addon)ReloadUI()end, - OnCancel = function(a)SuperVillain.db[lower(SuperVillain.SystemAlert["INCOMPATIBLE_ADDON"].package)].enable = false;ReloadUI()end, + OnAccept = function(a)DisableAddOn(SV.SystemAlert["INCOMPATIBLE_ADDON"].addon)ReloadUI()end, + OnCancel = function(a)SV.db[lower(SV.SystemAlert["INCOMPATIBLE_ADDON"].package)].enable = false;ReloadUI()end, timeout = 0, whileDead = 1, hideOnEscape = false @@ -262,7 +262,7 @@ local MAX_STATIC_POPUPS = 4 local SysPop_Event_Show = function(self) PlaySound("igMainMenuOpen"); - local dialog = SuperVillain.SystemAlert[self.which]; + local dialog = SV.SystemAlert[self.which]; local OnShow = dialog.OnShow; if ( OnShow ) then @@ -278,9 +278,9 @@ end local SysBox_Event_KeyEscape = function(self) local closed = nil; - for _, frame in pairs(SuperVillain.ActiveAlerts) do + for _, frame in pairs(SV.ActiveAlerts) do if( frame:IsShown() and frame.hideOnEscape ) then - local standardDialog = SuperVillain.SystemAlert[frame.which]; + local standardDialog = SV.SystemAlert[frame.which]; if ( standardDialog ) then local OnCancel = standardDialog.OnCancel; local noCancelOnEscape = standardDialog.noCancelOnEscape; @@ -289,7 +289,7 @@ local SysBox_Event_KeyEscape = function(self) end frame:Hide(); else - SuperVillain:StaticPopupSpecial_Hide(frame); + SV:StaticPopupSpecial_Hide(frame); end closed = 1; end @@ -303,7 +303,7 @@ local SysPop_Close_Unique = function(self) end local SysPop_Close_Table = function() - local displayedFrames = SuperVillain.ActiveAlerts; + local displayedFrames = SV.ActiveAlerts; local index = #displayedFrames; while ( ( index >= 1 ) and ( not displayedFrames[index]:IsShown() ) ) do tremove(displayedFrames, index); @@ -312,14 +312,14 @@ local SysPop_Close_Table = function() end local SysPop_Move = function(self) - if ( not tContains(SuperVillain.ActiveAlerts, self) ) then - local lastFrame = SuperVillain.ActiveAlerts[#SuperVillain.ActiveAlerts]; + if ( not tContains(SV.ActiveAlerts, self) ) then + local lastFrame = SV.ActiveAlerts[#SV.ActiveAlerts]; if ( lastFrame ) then self:SetPoint("TOP", lastFrame, "BOTTOM", 0, -4); else - self:SetPoint("TOP", SuperVillain.UIParent, "TOP", 0, -100); + self:SetPoint("TOP", SV.UIParent, "TOP", 0, -100); end - tinsert(SuperVillain.ActiveAlerts, self); + tinsert(SV.ActiveAlerts, self); end end @@ -331,7 +331,7 @@ local SysPop_Event_KeyDown = function(self, key) return; end - local dialog = SuperVillain.SystemAlert[self.which]; + local dialog = SV.SystemAlert[self.which]; if ( dialog ) then if ( key == "ENTER" and dialog.enterClicksFirstButton ) then local frameName = self:GetName(); @@ -358,7 +358,7 @@ local SysPop_Event_Click = function(self, index) return; end local which = self.which; - local info = SuperVillain.SystemAlert[which]; + local info = SV.SystemAlert[which]; if ( not info ) then return nil; end @@ -390,7 +390,7 @@ local SysPop_Event_Hide = function(self) SysPop_Close_Table(); - local dialog = SuperVillain.SystemAlert[self.which]; + local dialog = SV.SystemAlert[self.which]; local OnHide = dialog.OnHide; if ( OnHide ) then OnHide(self, self.data); @@ -406,9 +406,9 @@ local SysPop_Event_Update = function(self, elapsed) local which = self.which; local timeleft = self.timeleft - elapsed; if ( timeleft <= 0 ) then - if ( not SuperVillain.SystemAlert[which].timeoutInformationalOnly ) then + if ( not SV.SystemAlert[which].timeoutInformationalOnly ) then self.timeleft = 0; - local OnCancel = SuperVillain.SystemAlert[which].OnCancel; + local OnCancel = SV.SystemAlert[which].OnCancel; if ( OnCancel ) then OnCancel(self, self.data, "timeout"); end @@ -425,7 +425,7 @@ local SysPop_Event_Update = function(self, elapsed) if ( timeleft <= 0 ) then self.startDelay = nil; local text = _G[self:GetName().."Text"]; - text:SetFormattedText(SuperVillain.SystemAlert[which].text, text.text_arg1, text.text_arg2); + text:SetFormattedText(SV.SystemAlert[which].text, text.text_arg1, text.text_arg2); local button1 = _G[self:GetName().."Button1"]; button1:Enable(); StaticPopup_Resize(self, which); @@ -434,7 +434,7 @@ local SysPop_Event_Update = function(self, elapsed) self.startDelay = timeleft; end - local onUpdate = SuperVillain.SystemAlert[self.which].OnUpdate; + local onUpdate = SV.SystemAlert[self.which].OnUpdate; if ( onUpdate ) then onUpdate(self, elapsed); end @@ -452,7 +452,7 @@ local SysBox_Event_KeyEnter = function(self) dialog = parent:GetParent(); end if ( not self.autoCompleteParams or not AutoCompleteEditBox_OnEnterPressed(self) ) then - EditBoxOnEnterPressed = SuperVillain.SystemAlert[which].EditBoxOnEnterPressed; + EditBoxOnEnterPressed = SV.SystemAlert[which].EditBoxOnEnterPressed; if ( EditBoxOnEnterPressed ) then EditBoxOnEnterPressed(self, dialog.data); end @@ -460,7 +460,7 @@ local SysBox_Event_KeyEnter = function(self) end local SysBox_Event_KeyEscape = function(self) - local EditBoxOnEscapePressed = SuperVillain.SystemAlert[self:GetParent().which].EditBoxOnEscapePressed; + local EditBoxOnEscapePressed = SV.SystemAlert[self:GetParent().which].EditBoxOnEscapePressed; if ( EditBoxOnEscapePressed ) then EditBoxOnEscapePressed(self, self:GetParent().data); end @@ -468,7 +468,7 @@ end local SysBox_Event_Change = function(self, userInput) if ( not self.autoCompleteParams or not AutoCompleteEditBox_OnTextChanged(self, userInput) ) then - local EditBoxOnTextChanged = SuperVillain.SystemAlert[self:GetParent().which].EditBoxOnTextChanged; + local EditBoxOnTextChanged = SV.SystemAlert[self:GetParent().which].EditBoxOnTextChanged; if ( EditBoxOnTextChanged ) then EditBoxOnTextChanged(self, self:GetParent().data); end @@ -476,7 +476,7 @@ local SysBox_Event_Change = function(self, userInput) end local SysPop_Size = function(self, which) - local info = SuperVillain.SystemAlert[which]; + local info = SV.SystemAlert[which]; if ( not info ) then return nil; end @@ -526,7 +526,7 @@ local SysPop_Event_Listener = function(self) end local SysPop_Find = function(which, data) - local info = SuperVillain.SystemAlert[which]; + local info = SV.SystemAlert[which]; if ( not info ) then return nil; end @@ -543,12 +543,12 @@ end CORE FUNCTIONS ########################################################## ]]-- -function SuperVillain:StaticPopupSpecial_Hide(frame) +function SV:StaticPopupSpecial_Hide(frame) frame:Hide(); SysPop_Close_Table(); end -function SuperVillain:StaticPopup_HideExclusive() +function SV:StaticPopup_HideExclusive() for _, frame in pairs(self.ActiveAlerts) do if ( frame:IsShown() and frame.exclusive ) then local standardDialog = self.SystemAlert[frame.which]; @@ -566,7 +566,7 @@ function SuperVillain:StaticPopup_HideExclusive() end end -function SuperVillain:StaticPopupSpecial_Show(frame) +function SV:StaticPopupSpecial_Show(frame) if ( frame.exclusive ) then self:StaticPopup_HideExclusive(); end @@ -574,8 +574,8 @@ function SuperVillain:StaticPopupSpecial_Show(frame) frame:Show(); end -function SuperVillain:StaticPopup_Show(which, text_arg1, text_arg2, data) - local info = SuperVillain.SystemAlert[which]; +function SV:StaticPopup_Show(which, text_arg1, text_arg2, data) + local info = SV.SystemAlert[which]; if ( not info ) then return nil; end @@ -596,7 +596,7 @@ function SuperVillain:StaticPopup_Show(which, text_arg1, text_arg2, data) local frame = _G["SVUI_SystemAlert"..index]; if ( frame:IsShown() and (frame.which == info.cancels) ) then frame:Hide(); - local OnCancel = SuperVillain.SystemAlert[frame.which].OnCancel; + local OnCancel = SV.SystemAlert[frame.which].OnCancel; if ( OnCancel ) then OnCancel(frame, frame.data, "override"); end @@ -802,7 +802,7 @@ function SuperVillain:StaticPopup_Show(which, text_arg1, text_arg2, data) return dialog; end -function SuperVillain:StaticPopup_Hide(which, data) +function SV:StaticPopup_Hide(which, data) for index = 1, MAX_STATIC_POPUPS, 1 do local dialog = _G["SVUI_SystemAlert"..index]; if ( (dialog.which == which) and (not data or (data == dialog.data)) ) then @@ -838,7 +838,7 @@ local function SetConfigAlertAnim(f) f.trans:SetScript("OnFinished",f.trans[3]:GetScript("OnStop")) end -function SuperVillain:SavedPopup() +function SV:SavedPopup() if not _G["SVUI_ConfigAlert"] then return end local alert = _G["SVUI_ConfigAlert"] local x,y = rng() @@ -861,7 +861,7 @@ local AlertButton_OnClick = function(self) SysPop_Event_Click(self:GetParent(), self:GetID()) end -function SuperVillain:LoadSystemAlerts() +function SV:LoadSystemAlerts() if not _G["SVUI_ConfigAlert"] then local configAlert = CreateFrame("Frame", "SVUI_ConfigAlert", UIParent) configAlert:SetFrameStrata("TOOLTIP") @@ -887,10 +887,10 @@ function SuperVillain:LoadSystemAlerts() fgtex:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\SAVED-FG") SetConfigAlertAnim(configAlert.bg, configAlert) SetConfigAlertAnim(configAlert.fg, configAlert) - SuperVillain.Animate:Orbit(configAlert.bg, 10, false, true) + SV.Animate:Orbit(configAlert.bg, 10, false, true) end for i = 1, 4 do - local alert = CreateFrame("Frame", "SVUI_SystemAlert"..i, SuperVillain.UIParent, "StaticPopupTemplate") + local alert = CreateFrame("Frame", "SVUI_SystemAlert"..i, SV.UIParent, "StaticPopupTemplate") alert:SetID(i) alert:SetScript("OnShow", SysPop_Event_Show) alert:SetScript("OnHide", SysPop_Event_Hide) @@ -909,8 +909,8 @@ function SuperVillain:LoadSystemAlerts() button:SetScript("OnClick", AlertButton_OnClick) alert.buttons[b] = button end - _G["SVUI_SystemAlert"..i.."ItemFrameNameFrame"]:MUNG() - _G["SVUI_SystemAlert"..i.."ItemFrame"]:GetNormalTexture():MUNG() + _G["SVUI_SystemAlert"..i.."ItemFrameNameFrame"]:Die() + _G["SVUI_SystemAlert"..i.."ItemFrame"]:GetNormalTexture():Die() _G["SVUI_SystemAlert"..i.."ItemFrame"]:SetButtonTemplate() _G["SVUI_SystemAlert"..i.."ItemFrameIconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) _G["SVUI_SystemAlert"..i.."ItemFrameIconTexture"]:FillInner() diff --git a/Interface/AddOns/SVUI/system/animate.lua b/Interface/AddOns/SVUI/system/animate.lua new file mode 100644 index 0000000..da06994 --- /dev/null +++ b/Interface/AddOns/SVUI/system/animate.lua @@ -0,0 +1,447 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +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, L, Registry = unpack(select(2, ...)) +--[[ +########################################################## +LOCALS +########################################################## +]]-- +local FlickerAlpha = {0.2,0.15,0.1,0.15,0.2,0.15,0.1,0.15} +local Animate = {}; +--[[ +###################################################################### + /$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$$/$$$$$$$$ + /$$__ $$| $$$ | $$|_ $$_/| $$$ /$$$ /$$__ $$|__ $$__/ $$_____/ +| $$ \ $$| $$$$| $$ | $$ | $$$$ /$$$$| $$ \ $$ | $$ | $$ +| $$$$$$$$| $$ $$ $$ | $$ | $$ $$/$$ $$| $$$$$$$$ | $$ | $$$$$ +| $$__ $$| $$ $$$$ | $$ | $$ $$$| $$| $$__ $$ | $$ | $$__/ +| $$ | $$| $$\ $$$ | $$ | $$\ $ | $$| $$ | $$ | $$ | $$ +| $$ | $$| $$ \ $$ /$$$$$$| $$ \/ | $$| $$ | $$ | $$ | $$$$$$$$ +|__/ |__/|__/ \__/|______/|__/ |__/|__/ |__/ |__/ |________/ +###################################################################### +]]-- +local Anim_OnShow = function(self) + if not self.anim:IsPlaying() then + self.anim:Play() + end +end + +local Anim_OnHide = function(self) + self.anim:Finish() +end + +local Anim_OnPlay = function(self) + local parent = self.parent + parent:SetAlpha(1) + if self.hideOnFinished and not parent:IsShown() then + parent:Show() + end +end + +local Anim_OnStop = function(self) + local parent = self.parent + if self.fadeOnFinished then + parent:SetAlpha(0) + else + parent:SetAlpha(1) + end + if self.hideOnFinished and parent:IsShown() then + parent:Hide() + end + if self.savedFrameLevel then + parent:SetScale(1) + parent:SetFrameLevel(self.savedFrameLevel) + end +end + +local Anim_OnFinished = function(self) + local parent = self.parent + local looped = self:GetLooping() + self:Stop() + if(looped and looped == "REPEAT" and parent:IsShown()) then + self:Play() + end +end + +local Sprite_OnUpdate = function(self) + local order = self:GetOrder() + local parent = self.parent + local left, right; + if(self.isFadeFrame) then + parent:SetAlpha(0) + return + end + left = (order - 1) * 0.25; + right = left + 0.25; + parent:SetTexCoord(left,right,0,1) + if parent.overlay then + parent.overlay:SetTexCoord(left,right,0,1) + parent.overlay:SetVertexColor(1,1,1,FlickerAlpha[order]) + end +end + +local SmallSprite_OnUpdate = function(self) + local order = self:GetOrder() + local parent = self.parent + local left, right; + if(self.isFadeFrame) then + parent:SetAlpha(0) + return + end + left = (order - 1) * 0.125; + right = left + 0.125; + parent:SetTexCoord(left,right,0,1) + if parent.overlay then + parent.overlay:SetTexCoord(left,right,0,1) + parent.overlay:SetVertexColor(1,1,1,FlickerAlpha[order]) + end +end + +local PulseIn_OnUpdate = function(self) + local parent = self.parent + local step = self:GetProgress() + if(parent.savedFrameLevel) then + parent:SetFrameLevel(128) + end + parent:SetScale(1 + (1.05 * step)) +end + +local PulseOut_OnUpdate = function(self) + local parent = self.parent + local step = self:GetProgress() + if(parent.savedFrameLevel) then + parent:SetFrameLevel(128) + end + parent:SetScale(1 + (1.05 * (1 - step))) +end + +local Slide_OnUpdate = function(self) + local parent = self.parent + local step = self:GetProgress() + parent:SetScale(1 + (1.05 * step)) +end + +local Slide_OnPlay = function(self) + local parent = self.parent + parent:SetScale(0.01) + parent:SetAlpha(1) +end + +local Slide_FadeStart = function(self) + local parent = self.parent + UIFrameFadeOut(parent, 0.3, 1, 0) +end + +local Slide_FadeStop = function(self) + self.parent:SetAlpha(0) +end + +--[[ HELPER FUNCTION ]]-- + +local function SetNewAnimation(frame, animType, subType) + local anim = frame:CreateAnimation(animType, subType) + anim.parent = frame.parent + return anim +end + +--[[ ANIMATION CLASS METHODS ]]-- + +function Animate:SetTemplate(frame, animType, hideOnFinished, speed, special, scriptToParent) + if not animType then return end + + frame.anim = frame:CreateAnimationGroup(animType) + frame.anim.parent = frame; + frame.anim.hideOnFinished = hideOnFinished + if animType ~= 'Flash' then + frame.anim:SetScript("OnPlay", Anim_OnPlay) + frame.anim:SetScript("OnFinished", Anim_OnFinished) + frame.anim:SetScript("OnStop", Anim_OnStop) + end + + if scriptToParent then + local frameParent = frame:GetParent(); + if(frameParent.SetScript) then + frameParent.anim = frame.anim; + frameParent:SetScript("OnShow", Anim_OnShow) + frameParent:SetScript("OnHide", Anim_OnHide) + end + elseif(frame.SetScript) then + frame:SetScript("OnShow", Anim_OnShow) + frame:SetScript("OnHide", Anim_OnHide) + end + + if animType == 'Flash'then + frame.anim.fadeOnFinished = true + if not speed then speed = 0.33 end + + frame.anim[1] = SetNewAnimation(frame.anim, "ALPHA", "FadeIn") + frame.anim[1]:SetChange(1) + frame.anim[1]:SetOrder(2) + frame.anim[1]:SetDuration(speed) + + frame.anim[2] = SetNewAnimation(frame.anim, "ALPHA","FadeOut") + frame.anim[2]:SetChange(-1) + frame.anim[2]:SetOrder(1) + frame.anim[2]:SetDuration(speed) + + if special then + frame.anim:SetLooping("REPEAT") + end + elseif animType == 'Orbit' then + frame.anim[1] = SetNewAnimation(frame.anim, "Rotation") + if special then + frame.anim[1]:SetDegrees(-360) + else + frame.anim[1]:SetDegrees(360) + end + frame.anim[1]:SetDuration(speed) + frame.anim:SetLooping("REPEAT") + frame.anim:Play() + elseif animType == 'Sprite' then + frame.anim[1] = SetNewAnimation(frame.anim, "Translation") + frame.anim[1]:SetOrder(1) + frame.anim[1]:SetDuration(speed) + frame.anim[1]:SetScript("OnUpdate", Sprite_OnUpdate) + + frame.anim[2] = SetNewAnimation(frame.anim, "Translation") + frame.anim[2]:SetOrder(2) + frame.anim[2]:SetDuration(speed) + frame.anim[2]:SetScript("OnUpdate", Sprite_OnUpdate) + + frame.anim[3] = SetNewAnimation(frame.anim, "Translation") + frame.anim[3]:SetOrder(3) + frame.anim[3]:SetDuration(speed) + frame.anim[3]:SetScript("OnUpdate", Sprite_OnUpdate) + + frame.anim[4] = SetNewAnimation(frame.anim, "Translation") + frame.anim[4]:SetOrder(4) + frame.anim[4]:SetDuration(speed) + frame.anim[4]:SetScript("OnUpdate", Sprite_OnUpdate) + + if special then + frame.anim[5] = SetNewAnimation(frame.anim, "Translation") + frame.anim[5]:SetOrder(5) + frame.anim[5]:SetDuration(special) + frame.anim[5].isFadeFrame = true; + frame.anim[5]:SetScript("OnUpdate", Sprite_OnUpdate) + end + + frame.anim:SetLooping("REPEAT") + elseif animType == 'SmallSprite' then + frame.anim[1] = SetNewAnimation(frame.anim, "Translation") + frame.anim[1]:SetOrder(1) + frame.anim[1]:SetDuration(speed) + frame.anim[1]:SetScript("OnUpdate", SmallSprite_OnUpdate) + + frame.anim[2] = SetNewAnimation(frame.anim, "Translation") + frame.anim[2]:SetOrder(2) + frame.anim[2]:SetDuration(speed) + frame.anim[2]:SetScript("OnUpdate", SmallSprite_OnUpdate) + + frame.anim[3] = SetNewAnimation(frame.anim, "Translation") + frame.anim[3]:SetOrder(3) + frame.anim[3]:SetDuration(speed) + frame.anim[3]:SetScript("OnUpdate", SmallSprite_OnUpdate) + + frame.anim[4] = SetNewAnimation(frame.anim, "Translation") + frame.anim[4]:SetOrder(4) + frame.anim[4]:SetDuration(speed) + frame.anim[4]:SetScript("OnUpdate", SmallSprite_OnUpdate) + + frame.anim[5] = SetNewAnimation(frame.anim, "Translation") + frame.anim[5]:SetOrder(5) + frame.anim[5]:SetDuration(speed) + frame.anim[5]:SetScript("OnUpdate", SmallSprite_OnUpdate) + + frame.anim[6] = SetNewAnimation(frame.anim, "Translation") + frame.anim[6]:SetOrder(6) + frame.anim[6]:SetDuration(speed) + frame.anim[6]:SetScript("OnUpdate", SmallSprite_OnUpdate) + + frame.anim[7] = SetNewAnimation(frame.anim, "Translation") + frame.anim[7]:SetOrder(7) + frame.anim[7]:SetDuration(speed) + frame.anim[7]:SetScript("OnUpdate", SmallSprite_OnUpdate) + + frame.anim[8] = SetNewAnimation(frame.anim, "Translation") + frame.anim[8]:SetOrder(8) + frame.anim[8]:SetDuration(speed) + frame.anim[8]:SetScript("OnUpdate", SmallSprite_OnUpdate) + + if special then + frame.anim[9] = SetNewAnimation(frame.anim, "Translation") + frame.anim[9]:SetOrder(9) + frame.anim[9]:SetDuration(special) + frame.anim[9].isFadeFrame = true; + frame.anim[9]:SetScript("OnUpdate", Sprite_OnUpdate) + end + + frame.anim:SetLooping("REPEAT") + elseif animType == 'Pulse' then + frame.anim.savedFrameLevel = frame:GetFrameLevel() + + frame.anim[1] = SetNewAnimation(frame.anim) + frame.anim[1]:SetDuration(0.2) + frame.anim[1]:SetEndDelay(0.1) + frame.anim[1]:SetOrder(1) + frame.anim[1]:SetScript("OnUpdate", PulseIn_OnUpdate) + + frame.anim[2] = SetNewAnimation(frame.anim) + frame.anim[2]:SetDuration(0.6) + frame.anim[2]:SetOrder(2) + frame.anim[2]:SetScript("OnUpdate", PulseOut_OnUpdate) + end +end + +--[[ ROTATE AND WOBBLE (kinda like twerking i guess...) ]]-- + +function Animate:Orbit(frame, speed, reversed, hideOnFinished) + if not frame then return end + if not speed then speed = 1 end + self:SetTemplate(frame, 'Orbit', hideOnFinished, speed, reversed) +end + +function Animate:Pulse(frame, hideOnFinished) + if not frame then return end + self:SetTemplate(frame, 'Pulse', hideOnFinished) +end + +--[[ ANIMATED SPRITES ]]-- + +function Animate:Sprite(frame, speed, fadeTime, scriptToParent) + if not frame then return end + speed = speed or 0.08; + self:SetTemplate(frame, 'Sprite', false, speed, fadeTime, scriptToParent) +end + +function Animate:SmallSprite(frame, speed, fadeTime, scriptToParent) + if not frame then return end + speed = speed or 0.08; + self:SetTemplate(frame, 'SmallSprite', false, speed, fadeTime, scriptToParent) +end + +function Animate:StopSprite(frame) + if not frame then return end + frame.anim:Finish() +end + +--[[ FLASHING ]]-- + +function Animate:Flash(frame, speed, looped) + if not frame.anim then + Animate:SetTemplate(frame, 'Flash', false, speed, looped) + end + if not frame.anim:IsPlaying() then + frame.anim:Play() + end +end + +function Animate:StopFlash(frame) + if not frame.anim then return end + frame.anim:Finish() + frame.anim:Stop() +end + +--[[ SLIDING ]]-- + +function Animate:Slide(frame, xDirection, yDirection, bounce) + if(not frame or (frame and frame.anim)) then return end + + frame.anim = frame:CreateAnimationGroup("Slide") + frame.anim.hideOnFinished = true; + frame.anim.parent = frame; + frame.anim:SetScript("OnPlay", Anim_OnPlay) + frame.anim:SetScript("OnFinished", Anim_OnFinished) + frame.anim:SetScript("OnStop", Anim_OnStop) + + frame.anim[1] = SetNewAnimation(frame.anim, "Translation") + frame.anim[1]:SetDuration(0) + frame.anim[1]:SetOrder(1) + + frame.anim[2] = SetNewAnimation(frame.anim, "Translation") + frame.anim[2]:SetDuration(0.3) + frame.anim[2]:SetOrder(2) + frame.anim[2]:SetSmoothing("OUT") + + if bounce then + frame.anim[3] = SetNewAnimation(frame.anim, "Translation") + frame.anim[3]:SetDuration(0.5) + frame.anim[3]:SetOrder(3) + + frame.anim[4] = SetNewAnimation(frame.anim, "Translation") + frame.anim[4]:SetDuration(0.3) + frame.anim[4]:SetOrder(4) + frame.anim[4]:SetSmoothing("IN") + frame.anim[4]:SetOffset(xDirection, yDirection) + end +end + +function Animate:RandomSlide(frame, raised) + if not frame then return end + if raised then + frame:SetFrameLevel(30) + else + frame:SetFrameLevel(20) + end + frame:SetPoint("CENTER", SV.UIParent, "CENTER", 0, -150) + + frame.anim = frame:CreateAnimationGroup("RandomSlide") + frame.anim.parent = frame; + frame.anim[1] = SetNewAnimation(frame.anim, "Translation") + frame.anim[1]:SetOrder(1) + frame.anim[1]:SetDuration(0.1) + frame.anim[1]:SetScript("OnUpdate", Slide_OnUpdate) + frame.anim[1]:SetScript("OnPlay", Slide_OnPlay) + + frame.anim[2] = SetNewAnimation(frame.anim, "Translation") + frame.anim[2]:SetOrder(2) + frame.anim[2]:SetDuration(1) + + frame.anim[3] = SetNewAnimation(frame.anim, "Translation") + frame.anim[3]:SetOrder(3) + frame.anim[3]:SetDuration(0.3) + frame.anim[3]:SetSmoothing("OUT") + frame.anim[3]:SetScript("OnPlay", Slide_FadeStart) + frame.anim[3]:SetScript("OnStop", Slide_FadeStop) + + frame.anim:SetScript("OnFinished", Slide_FadeStop) +end + +function Animate:SlideIn(frame) + if not frame.anim then return end + frame:Show() + frame.anim:Play() +end + +function Animate:SlideOut(frame) + if not frame.anim then return end + frame.anim:Finish() + frame.anim:Stop() +end + +SV.Animate = Animate; \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/cartography.lua b/Interface/AddOns/SVUI/system/cartography.lua deleted file mode 100644 index 631f8d4..0000000 --- a/Interface/AddOns/SVUI/system/cartography.lua +++ /dev/null @@ -1,491 +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 ipairs = _G.ipairs; -local type = _G.type; -local tinsert = _G.tinsert; -local math = _G.math; -local bit = _G.bit; ---[[ 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 ---[[ BINARY METHODS ]]-- -local band = bit.band; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SuperVillain, L = unpack(select(2, ...)) ---[[ -########################################################## -MEASURING UTILITY FUNCTIONS (from Astrolabe by: Esamynn) -########################################################## -]]-- -local radian90 = (3.141592653589793 / 2) * -1; -local GetDistance, GetTarget, GetFromPlayer - -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 (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 SuperVillain:PositionFromPlayer(unit, noMapLocation) - local distance, angle = GetFromPlayer(unit, noMapLocation) - return distance, angle -end - -function SuperVillain:Triangulate(unit1, unit2, doNotCheckMap) - local allowed, plot1, plot2, plot3, plot4 = GetTarget(unit1, doNotCheckMap) - if not allowed then return end - local allowed, plot5, plot6, plot7, plot8 = GetTarget(unit2, doNotCheckMap) - if not allowed then return end - local distance, angle = GetDistance(plot1, plot2, plot3, plot4, plot5, plot6, plot7, plot8) - return distance, angle -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/common.lua b/Interface/AddOns/SVUI/system/common.lua index 990cc76..1ac79ac 100644 --- a/Interface/AddOns/SVUI/system/common.lua +++ b/Interface/AddOns/SVUI/system/common.lua @@ -42,7 +42,7 @@ local tremove, tcopy, twipe, tsort, tconcat, tdump = table.remove, table.copy, t GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)) +local SV, L, Registry = unpack(select(2, ...)) --[[ ########################################################## LOCAL VARS @@ -55,6 +55,7 @@ local NewFrame = CreateFrame; local NewHook = hooksecurefunc; local STANDARD_TEXT_FONT = _G.STANDARD_TEXT_FONT local SCREEN_MOD = 1; + local function GetUsableScreen() local rez = GetCVar("gxResolution") local height = rez:match("%d+x(%d+)") @@ -69,11 +70,11 @@ end UI SCALING ########################################################## ]]-- --- function SuperVillain:UIScale(event) +-- function SV:ScreenCalibration(event) -- return -- end -function SuperVillain:UIScale(event) +function SV:ScreenCalibration(event) local scale, evalwidth local gxWidth, gxHeight, gxMod = GetUsableScreen() @@ -173,7 +174,7 @@ do local function scaled(value) if(not SCREEN_MOD) then - SuperVillain:UIScale() + SV:ScreenCalibration() end return SCREEN_MOD * floor(value / SCREEN_MOD + .5); end @@ -234,38 +235,42 @@ end APPENDED DESTROY METHODS ########################################################## ]]-- --- MUNG ( Modify - Until - No - Good ) -local MUNGFRAME = NewFrame("Frame", nil) -MUNGFRAME:Hide() +local _purgatory = NewFrame("Frame", nil) +_purgatory:Hide() -local function MUNG(self) +local function Die(self) if self.UnregisterAllEvents then self:UnregisterAllEvents() - self:SetParent(MUNGFRAME) + self:SetParent(_purgatory) else self:Hide() - self.Show = SuperVillain.fubar + self.Show = SV.fubar end -end +end -local function Formula409(self, option) +local function RemoveTextures(self, option) + local region, layer, texture for i = 1, self:GetNumRegions()do - local target = select(i, self:GetRegions()) - if(target and (target:GetObjectType() == "Texture")) then - if(option and (type(option) == "boolean")) then - if target.UnregisterAllEvents then - target:UnregisterAllEvents() - target:SetParent(MUNGFRAME) - else - target.Show = target.Hide - end - target:Hide() - elseif(target:GetDrawLayer() == option) then - target:SetTexture("") - elseif(option and (type(option) == "string") and (target:GetTexture() ~= option)) then - target:SetTexture("") + region = select(i, self:GetRegions()) + if(region and (region:GetObjectType() == "Texture")) then + + layer = region:GetDrawLayer() + texture = region:GetTexture() + + if(option) then + if(type(option) == "boolean") then + if region.UnregisterAllEvents then + region:UnregisterAllEvents() + region:SetParent(_purgatory) + else + region.Show = region.Hide + end + region:Hide() + elseif(type(option) == "string" and ((layer == option) or (texture ~= option))) then + region:SetTexture(0,0,0,0) + end else - target:SetTexture("") + region:SetTexture(0,0,0,0) end end end @@ -276,7 +281,7 @@ APPENDED FONT TEMPLATING METHODS ########################################################## ]]-- local function SetFontTemplate(self, font, fontSize, fontStyle, fontJustifyH, fontJustifyV, noUpdate) - local STANDARDFONTSIZE = SuperVillain.db.media.fonts.size + local STANDARDFONTSIZE = SV.db.media.fonts.size font = font or STANDARD_TEXT_FONT fontSize = fontSize or STANDARDFONTSIZE; fontJustifyH = fontJustifyH or "CENTER"; @@ -306,7 +311,7 @@ FONT UPDATE CALLBACK ########################################################## ]]-- local function FontTemplateUpdates() - local STANDARDFONTSIZE = SuperVillain.db.media.fonts.size; + local STANDARDFONTSIZE = SV.db.media.fonts.size; for i=1, #FontUpdateFrames do local frame = FontUpdateFrames[i] if frame then @@ -318,11 +323,11 @@ local function FontTemplateUpdates() end end -function SuperVillain:UpdateFontTemplates() +function SV:UpdateFontTemplates() FontTemplateUpdates() end -SuperVillain.Registry:NewCallback(FontTemplateUpdates) +Registry:NewCallback(FontTemplateUpdates) --[[ ########################################################## APPENDED TEMPLATING METHODS @@ -708,7 +713,7 @@ local HookVertexColor = function(self,...) end local HookCustomBackdrop = function(self) - local newBgFile = SuperVillain.Media.bg[self._bdtex] + local newBgFile = SV.Media.bg[self._bdtex] local bd = { bgFile = newBgFile, edgeFile = [[Interface\BUTTONS\WHITE8X8]], @@ -746,7 +751,7 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd local hasShadow = settings.shadow local bd = settings.backdrop local bypass = noupdate or settings.noupdate - local bgColor = SuperVillain.Media.color[colorName] or {0.18,0.18,0.18,1} + local bgColor = SV.Media.color[colorName] or {0.18,0.18,0.18,1} local borderColor = {0,0,0,1} local initLevel = 0; local needsHooks = false; @@ -887,8 +892,8 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd frame._skin:SetTexture(texFile) - if(gradientName and SuperVillain.Media.gradient[gradientName]) then - frame._skin:SetGradient(unpack(SuperVillain.Media.gradient[gradientName])) + if(gradientName and SV.Media.gradient[gradientName]) then + frame._skin:SetGradient(unpack(SV.Media.gradient[gradientName])) else frame._skin:SetVertexColor(bgColor[1], bgColor[2], bgColor[3], bgColor[4] or 1) end @@ -993,7 +998,7 @@ local function CreateButtonPanel(frame, noChecked, brightChecked) hover:FillInner(frame.Panel) frame.hover = hover; end - local color = SuperVillain.Media.color.highlight + local color = SV.Media.color.highlight frame.hover:SetTexture(color[1], color[2], color[3], 0.5) frame:SetHighlightTexture(frame.hover) end @@ -1146,26 +1151,26 @@ local function SetPanelColor(self, ...) if(type(arg1) == "string") then if(arg1 == "VERTICAL" or arg1 == "HORIZONTAL") then self._skin:SetGradient(...) - elseif(SuperVillain.Media.gradient[arg1]) then + elseif(SV.Media.gradient[arg1]) then if self.__border then - local d,r,g,b,r2,g2,b2 = unpack(SuperVillain.Media.gradient[arg1]) + local d,r,g,b,r2,g2,b2 = unpack(SV.Media.gradient[arg1]) --self._skin:SetGradient(d,r,g,b,r2,g2,b2) self.__border[1]:SetTexture(r2,g2,b2) self.__border[2]:SetTexture(r2,g2,b2) self.__border[3]:SetTexture(r2,g2,b2) self.__border[4]:SetTexture(r2,g2,b2) else - self._skin:SetGradient(unpack(SuperVillain.Media.gradient[arg1])) - if(SuperVillain.Media.color[arg1]) then - local t = SuperVillain.Media.color[arg1] + self._skin:SetGradient(unpack(SV.Media.gradient[arg1])) + if(SV.Media.color[arg1]) then + local t = SV.Media.color[arg1] local r,g,b,a = t[1], t[2], t[3], t[4] or 1; self:SetBackdropColor(r,g,b,a) end end end end - elseif(type(arg1) == "string" and SuperVillain.Media.color[arg1]) then - local t = SuperVillain.Media.color[arg1] + elseif(type(arg1) == "string" and SV.Media.color[arg1]) then + local t = SV.Media.color[arg1] local r,g,b,a = t[1], t[2], t[3], t[4] or 1; if self.__border then self.__border[1]:SetTexture(r,g,b) @@ -1229,7 +1234,7 @@ local function SetButtonTemplate(self, invisible, overridePadding, xOffset, yOff self.hover = hover; end - local color = SuperVillain.Media.color.highlight + local color = SV.Media.color.highlight self.hover:SetTexture(color[1], color[2], color[3], 0.5) self:SetHighlightTexture(self.hover) @@ -1299,24 +1304,24 @@ end local function SetEditboxTemplate(self, x, y) if(not self or (self and self.Panel)) then return end - if self.TopLeftTex then MUNG(self.TopLeftTex) end - if self.TopRightTex then MUNG(self.TopRightTex) end - if self.TopTex then MUNG(self.TopTex) end - if self.BottomLeftTex then MUNG(self.BottomLeftTex) end - if self.BottomRightTex then MUNG(self.BottomRightTex) end - if self.BottomTex then MUNG(self.BottomTex) end - if self.LeftTex then MUNG(self.LeftTex) end - if self.RightTex then MUNG(self.RightTex) end - if self.MiddleTex then MUNG(self.MiddleTex) end + if self.TopLeftTex then Die(self.TopLeftTex) end + if self.TopRightTex then Die(self.TopRightTex) end + if self.TopTex then Die(self.TopTex) end + if self.BottomLeftTex then Die(self.BottomLeftTex) end + if self.BottomRightTex then Die(self.BottomRightTex) end + if self.BottomTex then Die(self.BottomTex) end + 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", false, true, 1, x, y) local globalName = self:GetName(); if globalName then - if _G[globalName.."Left"] then MUNG(_G[globalName.."Left"]) end - if _G[globalName.."Middle"] then MUNG(_G[globalName.."Middle"]) end - if _G[globalName.."Right"] then MUNG(_G[globalName.."Right"]) end - if _G[globalName.."Mid"] then MUNG(_G[globalName.."Mid"]) end + if _G[globalName.."Left"] then Die(_G[globalName.."Left"]) end + if _G[globalName.."Middle"] then Die(_G[globalName.."Middle"]) end + if _G[globalName.."Right"] then Die(_G[globalName.."Right"]) end + if _G[globalName.."Mid"] then Die(_G[globalName.."Mid"]) end if globalName:find("Silver") or globalName:find("Copper") then self.Panel:SetPoint("BOTTOMRIGHT", -12, -2) end @@ -1353,7 +1358,7 @@ local function SetFramedButtonTemplate(self, template, borderSize) end if(not self.__border) then - local t = SuperVillain.Media.color.default + local t = SV.Media.color.default local r,g,b = t[1], t[2], t[3] local border = {} @@ -1413,7 +1418,7 @@ local function SetFramedButtonTemplate(self, template, borderSize) self.hover = self:CreateTexture(nil, "HIGHLIGHT") end - local color = SuperVillain.Media.color.highlight + local color = SV.Media.color.highlight self.hover:SetTexture(color[1], color[2], color[3], 0.5) self.hover:SetAllPoints() if(self.SetHighlightTexture) then @@ -1433,7 +1438,7 @@ TEMPLATE UPDATE CALLBACK local function FrameTemplateUpdates() for frame in pairs(TemplateUpdateFrames) do if(frame) then - local p = SuperVillain.Media.color[frame._color]; + local p = SV.Media.color[frame._color]; if(frame.BackdropNeedsUpdate) then if(frame.UpdateBackdrop) then frame:UpdateBackdrop() @@ -1444,13 +1449,13 @@ local function FrameTemplateUpdates() frame:SetBackdropBorderColor(0,0,0,1) end if(frame.TextureNeedsUpdate and frame._texture) then - local tex = SuperVillain.Media.bg[frame._texture] + local tex = SV.Media.bg[frame._texture] if(tex) then frame._skin:SetTexture(tex) end if(not frame.NoColorUpdate) then - if(frame._gradient and SuperVillain.Media.gradient[frame._gradient]) then - local g = SuperVillain.Media.gradient[frame._gradient] + if(frame._gradient and SV.Media.gradient[frame._gradient]) then + local g = SV.Media.gradient[frame._gradient] frame._skin:SetGradient(g[1], g[2], g[3], g[4], g[5], g[6], g[7]) elseif(p) then frame._skin:SetVertexColor(p[1], p[2], p[3], p[4] or 1) @@ -1460,7 +1465,8 @@ local function FrameTemplateUpdates() end end end -SuperVillain.Registry:NewCallback(FrameTemplateUpdates) + +Registry:NewCallback(FrameTemplateUpdates) --[[ ########################################################## ENUMERATION @@ -1474,8 +1480,8 @@ local function AppendMethods(OBJECT) if not OBJECT.Point then META.Point = PointScaled end if not OBJECT.WrapOuter then META.WrapOuter = WrapOuter end if not OBJECT.FillInner then META.FillInner = FillInner end - if not OBJECT.MUNG then META.MUNG = MUNG end - if not OBJECT.Formula409 then META.Formula409 = Formula409 end + if not OBJECT.Die then META.Die = Die end + if not OBJECT.RemoveTextures then META.RemoveTextures = RemoveTextures end if not OBJECT.SetBasicPanel then META.SetBasicPanel = SetBasicPanel end if not OBJECT.SetPanelTemplate then META.SetPanelTemplate = SetPanelTemplate end if not OBJECT.SetFixedPanelTemplate then META.SetFixedPanelTemplate = SetFixedPanelTemplate end diff --git a/Interface/AddOns/SVUI/system/database.lua b/Interface/AddOns/SVUI/system/database.lua index 3609bec..0b8cda1 100644 --- a/Interface/AddOns/SVUI/system/database.lua +++ b/Interface/AddOns/SVUI/system/database.lua @@ -34,137 +34,12 @@ local tremove, tcopy, twipe, tsort, tconcat, tdump = table.remove, table.copy, t GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -SuperVillain.Shared = LibStub("LibSharedMedia-3.0") +local SV, L, Registry = unpack(select(2, ...)); local realm = GetRealmName() local name = UnitName("player") local pkey = ("%s - %s"):format(name, realm) local databaseListener = CreateFrame("Frame", nil) -local CONFIGS = SuperVillain.Configs ---[[ -########################################################## -DEFINE SHARED MEDIA -########################################################## -]]-- -SuperVillain.Shared:Register("background","SVUI Backdrop 1",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN1]]) -SuperVillain.Shared:Register("background","SVUI Backdrop 2",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN2]]) -SuperVillain.Shared:Register("background","SVUI Backdrop 3",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN3]]) -SuperVillain.Shared:Register("background","SVUI Backdrop 4",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN4]]) -SuperVillain.Shared:Register("background","SVUI Backdrop 5",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN5]]) -SuperVillain.Shared:Register("background","SVUI Comic 1",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC1]]) -SuperVillain.Shared:Register("background","SVUI Comic 2",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC2]]) -SuperVillain.Shared:Register("background","SVUI Comic 3",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC3]]) -SuperVillain.Shared:Register("background","SVUI Comic 4",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC4]]) -SuperVillain.Shared:Register("background","SVUI Comic 5",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC5]]) -SuperVillain.Shared:Register("background","SVUI Comic 6",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC6]]) -SuperVillain.Shared:Register("background","SVUI Unit BG 1",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-BG1]]) -SuperVillain.Shared:Register("background","SVUI Unit BG 2",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-BG2]]) -SuperVillain.Shared:Register("background","SVUI Unit BG 3",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-BG3]]) -SuperVillain.Shared:Register("background","SVUI Unit BG 4",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-BG4]]) -SuperVillain.Shared:Register("background","SVUI Small BG 1",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-SMALL-BG1]]) -SuperVillain.Shared:Register("background","SVUI Small BG 2",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-SMALL-BG2]]) -SuperVillain.Shared:Register("background","SVUI Small BG 3",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-SMALL-BG3]]) -SuperVillain.Shared:Register("background","SVUI Small BG 4",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-SMALL-BG4]]) -SuperVillain.Shared:Register("statusbar","SVUI BasicBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) -SuperVillain.Shared:Register("statusbar","SVUI MultiColorBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\GRADIENT]]) -SuperVillain.Shared:Register("statusbar","SVUI SmoothBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\SMOOTH]]) -SuperVillain.Shared:Register("statusbar","SVUI PlainBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\FLAT]]) -SuperVillain.Shared:Register("statusbar","SVUI FancyBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\TEXTURED]]) -SuperVillain.Shared:Register("statusbar","SVUI GlossBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\GLOSS]]) -SuperVillain.Shared:Register("statusbar","SVUI GlowBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\GLOWING]]) -SuperVillain.Shared:Register("statusbar","SVUI LazerBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\LAZER]]) -SuperVillain.Shared:Register("sound", "Whisper Alert", [[Interface\AddOns\SVUI\assets\sounds\whisper.mp3]]) -SuperVillain.Shared:Register("sound", "Toasty", [[Interface\AddOns\SVUI\assets\sounds\toasty.mp3]]) -SuperVillain.Shared:Register("font","SVUI Default Font",[[Interface\AddOns\SVUI\assets\fonts\Default.ttf]]) -SuperVillain.Shared:Register("font","SVUI System Font",[[Interface\AddOns\SVUI\assets\fonts\System.ttf]]) -SuperVillain.Shared:Register("font","SVUI Dialog Font",[[Interface\AddOns\SVUI\assets\fonts\Dialog.ttf]]) -SuperVillain.Shared:Register("font","SVUI Narrator Font",[[Interface\AddOns\SVUI\assets\fonts\Narrative.ttf]]) -SuperVillain.Shared:Register("font","SVUI Number Font",[[Interface\AddOns\SVUI\assets\fonts\Numbers.ttf]]) -SuperVillain.Shared:Register("font","SVUI Combat Font",[[Interface\AddOns\SVUI\assets\fonts\Combat.ttf]]) -SuperVillain.Shared:Register("font","SVUI Action Font",[[Interface\AddOns\SVUI\assets\fonts\Action.ttf]]) -SuperVillain.Shared:Register("font","SVUI Name Font",[[Interface\AddOns\SVUI\assets\fonts\Names.ttf]]) -SuperVillain.Shared:Register("font","SVUI Alert Font",[[Interface\AddOns\SVUI\assets\fonts\Alert.ttf]]) -SuperVillain.Shared:Register("font","SVUI Pixel Font",[[Interface\AddOns\SVUI\assets\fonts\Pixel.ttf]],SuperVillain.Shared.LOCALE_BIT_ruRU+SuperVillain.Shared.LOCALE_BIT_western) -SuperVillain.Shared:Register("font","Roboto",[[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]],SuperVillain.Shared.LOCALE_BIT_ruRU+SuperVillain.Shared.LOCALE_BIT_western) ---[[ -########################################################## -POPULATE MEDIA TABLE -########################################################## -]]-- -do - local myclass = select(2,UnitClass("player")) - local cColor1 = SVUI_CLASS_COLORS[myclass] - local cColor2 = RAID_CLASS_COLORS[myclass] - local r1,g1,b1 = cColor1.r,cColor1.g,cColor1.b - local r2,g2,b2 = cColor2.r*.25, cColor2.g*.25, cColor2.b*.25 - local ir1,ig1,ib1 = (1 - r1), (1 - g1), (1 - b1) - local ir2,ig2,ib2 = (1 - cColor2.r)*.25, (1 - cColor2.g)*.25, (1 - cColor2.b)*.25 - local Shared = SuperVillain.Shared - - SuperVillain.Media["color"] = { - ["default"] = {0.2, 0.2, 0.2, 1}, - ["special"] = {.37, .32, .29, 1}, - ["unique"] = {0.32, 0.258, 0.21, 1}, - ["class"] = {r1, g1, b1, 1}, - ["bizzaro"] = {ir1, ig1, ib1, 1}, - ["dark"] = {0, 0, 0, 1}, - ["light"] = {0.95, 0.95, 0.95, 1}, - ["highlight"] = {0.1, 0.8, 0.8, 1}, - ["green"] = {0.25, 0.9, 0.08, 1}, - ["red"] = {0.9, 0.08, 0.08, 1}, - ["yellow"] = {1, 1, 0, 1}, - ["transparent"] = {0, 0, 0, 0.5}, - } - - SuperVillain.Media["font"] = { - ["default"] = Shared:Fetch("font", "SVUI Default Font"), - ["system"] = Shared:Fetch("font", "SVUI System Font"), - ["combat"] = Shared:Fetch("font", "SVUI Combat Font"), - ["dialog"] = Shared:Fetch("font", "SVUI Dialog Font"), - ["narrator"] = Shared:Fetch("font", "SVUI Narrator Font"), - ["action"] = Shared:Fetch("font", "SVUI Action Font"), - ["names"] = Shared:Fetch("font", "SVUI Name Font"), - ["alert"] = Shared:Fetch("font", "SVUI Alert Font"), - ["numbers"] = Shared:Fetch("font", "SVUI Number Font"), - ["pixel"] = Shared:Fetch("font", "SVUI Pixel Font"), - ["roboto"] = Shared:Fetch("font", "Roboto") - } - - SuperVillain.Media["bar"] = { - ["default"] = Shared:Fetch("statusbar", "SVUI BasicBar"), - ["gradient"] = Shared:Fetch("statusbar", "SVUI MultiColorBar"), - ["smooth"] = Shared:Fetch("statusbar", "SVUI SmoothBar"), - ["flat"] = Shared:Fetch("statusbar", "SVUI PlainBar"), - ["textured"] = Shared:Fetch("statusbar", "SVUI FancyBar"), - ["gloss"] = Shared:Fetch("statusbar", "SVUI GlossBar"), - ["glow"] = Shared:Fetch("statusbar", "SVUI GlowBar"), - ["lazer"] = Shared:Fetch("statusbar", "SVUI LazerBar"), - } - - SuperVillain.Media["bg"] = { - ["pattern"] = Shared:Fetch("background", "SVUI Backdrop 1"), - ["comic"] = Shared:Fetch("background", "SVUI Comic 1"), - ["unitlarge"] = Shared:Fetch("background", "SVUI Unit BG 3"), - ["unitsmall"] = Shared:Fetch("background", "SVUI Small BG 3") - } - - SuperVillain.Media["gradient"] = { - ["default"] = {"VERTICAL", 0.08, 0.08, 0.08, 0.22, 0.22, 0.22}, - ["special"] = {"VERTICAL", 0.33, 0.25, 0.13, 0.47, 0.39, 0.27}, - ["class"] = {"VERTICAL", r2, g2, b2, r1, g1, b1}, - ["bizzaro"] = {"VERTICAL", ir2, ig2, ib2, ir1, ig1, ib1}, - ["dark"] = {"VERTICAL", 0.02, 0.02, 0.02, 0.22, 0.22, 0.22}, - ["darkest"] = {"VERTICAL", 0.15, 0.15, 0.15, 0, 0, 0}, - ["darkest2"] = {"VERTICAL", 0, 0, 0, 0.12, 0.12, 0.12}, - ["light"] = {"VERTICAL", 0.65, 0.65, 0.65, 0.95, 0.95, 0.95}, - ["highlight"] = {"VERTICAL", 0.1, 0.8, 0.8, 0.2, 0.5, 1}, - ["green"] = {"VERTICAL", 0.08, 0.5, 0, 0.25, 0.9, 0.08}, - ["red"] = {"VERTICAL", 0.5, 0, 0, 0.9, 0.08, 0.08}, - ["yellow"] = {"VERTICAL", 1, 0.3, 0, 1, 1, 0}, - ["inverse"] = {"VERTICAL", 0.25, 0.25, 0.25, 0.12, 0.12, 0.12}, - ["icon"] = {"VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1} - } -end +local CONFIGS = SV.Configs --[[ ########################################################## DB BUILD HELPERS @@ -173,7 +48,7 @@ DB BUILD HELPERS local function SpellName(id) local name, _, _, _, _, _, _, _, _ = GetSpellInfo(id) if not name then - SuperVillain:Debugger('|cffFF9900SVUI:|r Spell not found: (#ID) '..id) + SV:Debugger('|cffFF9900SVUI:|r Spell not found: (#ID) '..id) name = "Voodoo Doll"; end return name @@ -838,7 +713,7 @@ local function safename(id) if type(id) == "string" then n = id else - SuperVillain:Debugger('|cffFF9900SVUI:|r Spell not found: (#ID) '..id) + SV:Debugger('|cffFF9900SVUI:|r Spell not found: (#ID) '..id) n = "Voodoo Doll"; end end @@ -863,7 +738,7 @@ for k, x in pairs(FilterIDs) do CONFIGS.filter[k] = src end -CONFIGS.filter.BuffWatch = CLASS_WATCH_INDEX[SuperVillain.class] or {} +CONFIGS.filter.BuffWatch = CLASS_WATCH_INDEX[SV.class] or {} CONFIGS.filter.PetBuffWatch = PET_WATCH --[[ ########################################################## @@ -955,7 +830,7 @@ end local function importprofile(t, key) local sv = rawget(t, "profile") local dv = rawget(t, "defaults") - local globals = SuperVillain.Global + local globals = SV.Global local src = globals.profiles[key] if(not src) then return end for k,v in pairs(sv) do @@ -967,15 +842,15 @@ local function importprofile(t, key) end local function importprompt(t, key) - SuperVillain.SystemAlert["COPY_PROFILE_PROMPT"].text = L["Are you sure you want to copy the profile '" .. key .. "'?"] - SuperVillain.SystemAlert["COPY_PROFILE_PROMPT"].OnAccept = function() importprofile(t, key) end - SuperVillain:StaticPopup_Show("COPY_PROFILE_PROMPT") + SV.SystemAlert["COPY_PROFILE_PROMPT"].text = L["Are you sure you want to copy the profile '" .. key .. "'?"] + SV.SystemAlert["COPY_PROFILE_PROMPT"].OnAccept = function() importprofile(t, key) end + SV:StaticPopup_Show("COPY_PROFILE_PROMPT") end local function exportprofile(t, key) local sv = rawget(t, "profile") local dv = rawget(t, "defaults") - local globals = SuperVillain.Global + local globals = SV.Global if(not globals.profiles[key]) then globals.profiles[key] = {} end local saved = globals.profiles[key] tablecopy(saved, sv) @@ -983,11 +858,11 @@ local function exportprofile(t, key) removedefaults(saved[k], dv[k]) end globals.profileKeys[key] = key - SuperVillain:SavedPopup() + SV:SavedPopup() end local function removeprofile(t, key) - local globals = SuperVillain.Global + local globals = SV.Global if(globals.profiles[key]) then globals.profiles[key] = nil end if(globals.profileKeys[key]) then globals.profileKeys[key] = nil end collectgarbage("collect") @@ -1014,9 +889,9 @@ local function initializedata(t) end local function SanitizeDatabase() - if(not SuperVillain.db) then return end - local db = SuperVillain.db - local src = SuperVillain.Configs + if(not SV.db) then return end + local db = SV.db + local src = SV.Configs for k,v in pairs(db) do if(src[k]) then removedefaults(db[k], src[k]) @@ -1028,7 +903,7 @@ local DataBase_OnEvent = function(self, event) if event == "PLAYER_LOGOUT" then SanitizeDatabase() elseif(event == "ACTIVE_TALENT_GROUP_CHANGED") then - SuperVillain:UpdateDatabase() + SV:UpdateDatabase() end end @@ -1058,7 +933,7 @@ local METAPROFILE = function(sv) db.profile = sv.STORED[key] db.protected = sv.SAFEDATA - db.defaults = SuperVillain.Configs + db.defaults = SV.Configs db.Init = initializedata db.Append = insertdata db.Reset = resetprofile @@ -1073,15 +948,15 @@ local METAPROFILE = function(sv) return db end -function SuperVillain:AppendDefaults(newIndex, newData) +function SV:AppendDefaults(newIndex, newData) self.Configs[newIndex] = newData end -function SuperVillain:GetProfiles() +function SV:GetProfiles() return self.Global.profileKeys or {} end -function SuperVillain:CheckProfiles() +function SV:CheckProfiles() local hasProfile = false local list = self.Global.profileKeys or {} for key,_ in pairs(list) do @@ -1090,7 +965,7 @@ function SuperVillain:CheckProfiles() return hasProfile end -function SuperVillain:UpdateDatabase(partial) +function SV:UpdateDatabase(partial) local sv = _G["SVUI_Profile"] twipe(self.db) @@ -1100,11 +975,11 @@ function SuperVillain:UpdateDatabase(partial) --print("Update db") if(not partial) then - self.Registry:UpdateAll() + Registry:UpdateAll() end end -function SuperVillain:ToggleSpecSwap(value) +function SV:ToggleSpecSwap(value) if(value) then databaseListener:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") self:UpdateDatabase() @@ -1113,33 +988,7 @@ function SuperVillain:ToggleSpecSwap(value) end end -function SuperVillain:HexColor(arg1,arg2,arg3) - local r,g,b; - if arg1 and type(arg1) == "string" then - local t - if(self.Media or self.db.media) then - t = self.Media.color[arg1] or self.db.media.unitframes[arg1] - else - t = self.Configs.media.colors[arg1] or self.Configs.media.unitframes[arg1] - end - if t then - r,g,b = t[1],t[2],t[3] - else - r,g,b = 0,0,0 - end - else - r = type(arg1) == "number" and arg1 or 0; - g = type(arg2) == "number" and arg2 or 0; - b = type(arg3) == "number" and arg3 or 0; - end - r = (r < 0 or r > 1) and 0 or (r * 255) - g = (g < 0 or g > 1) and 0 or (g * 255) - b = (b < 0 or b > 1) and 0 or (b * 255) - local hexString = ("%02x%02x%02x"):format(r,g,b) - return hexString -end - -function SuperVillain:TableSplice(targetTable, mergeTable) +function SV:TableSplice(targetTable, mergeTable) if type(targetTable) ~= "table" then targetTable = {} end if type(mergeTable) == 'table' then @@ -1153,7 +1002,7 @@ function SuperVillain:TableSplice(targetTable, mergeTable) return targetTable end -function SuperVillain:SetDatabaseObjects(init) +function SV:SetDatabaseObjects(init) if(init) then self.db = tcopy(self.Configs, true) else diff --git a/Interface/AddOns/SVUI/system/global.lua b/Interface/AddOns/SVUI/system/global.lua new file mode 100644 index 0000000..ca4d379 --- /dev/null +++ b/Interface/AddOns/SVUI/system/global.lua @@ -0,0 +1,481 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## ]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local type = _G.type; +local rawset = _G.rawset; +local rawget = _G.rawget; +local tinsert = _G.tinsert; +local tremove = _G.tremove; +local tostring = _G.tostring; +local error = _G.error; +local getmetatable = _G.getmetatable; +local setmetatable = _G.setmetatable; +local string = _G.string; +local math = _G.math; +local table = _G.table; +--[[ STRING METHODS ]]-- +local upper = string.upper; +local format, find, match, gsub = string.format, string.find, string.match, string.gsub; +--[[ MATH METHODS ]]-- +local floor = math.floor +--[[ TABLE METHODS ]]-- +local twipe, tsort, tconcat = table.wipe, table.sort, table.concat; +--[[ +############################################################################## + /$$$$$$ /$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ + /$$__ $$| $$ /$$__ $$| $$__ $$ /$$__ $$| $$ +| $$ \__/| $$ | $$ \ $$| $$ \ $$| $$ \ $$| $$ +| $$ /$$$$| $$ | $$ | $$| $$$$$$$ | $$$$$$$$| $$ +| $$|_ $$| $$ | $$ | $$| $$__ $$| $$__ $$| $$ +| $$ \ $$| $$ | $$ | $$| $$ \ $$| $$ | $$| $$ +| $$$$$$/| $$$$$$$$| $$$$$$/| $$$$$$$/| $$ | $$| $$$$$$$$ + \______/ |________/ \______/ |_______/ |__/ |__/|________/ +############################################################################## +]]-- + +--[[ LOCALS ]]-- + +local SVUINameSpace, SVUICore = ...; +local SVUIVersion = GetAddOnMetadata(..., "Version"); +local clientVersion, internalVersion, releaseDate, uiVersion = GetBuildInfo(); +local callbacks = {}; +local numCallbacks = 0; + +local messagePattern = "|cffFF2F00%s:|r" +local debugPattern = "|cffFF2F00%s|r [|cff992FFF%s|r]|cffFF2F00:|r" + +--[[ CONSTANTS ]]-- + +BINDING_HEADER_SVUI = "Supervillain UI"; +SLASH_RELOADUI1 = "/rl" +SLASH_RELOADUI2 = "/reloadui" +SlashCmdList.RELOADUI = ReloadUI + +--[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- + +function enforce(condition, ...) + if not condition then + if next({...}) then + local fn = function (...) return(string.format(...)) end + local s,r = pcall(fn, ...) + if s then + error("Error!: " .. r, 2) + end + end + error("Error!", 2) + end +end +local assert = enforce; + +--[[ META METHODS ]]-- + +local rootstring = function(self) return self.___addonName end + +--[[ LOCALIZATION HELPERS ]]-- + +local failsafe = function() assert(false) end + +local metaread = { + __index = function(self, key) + rawset(self, key, key) + return key + end +} + +local activeLocale + +local defaultwrite = setmetatable({}, { + __newindex = function(self, key, value) + if not rawget(activeLocale, key) then + rawset(activeLocale, key, value == true and key or value) + end + end, + __index = failsafe +}) + +local metawrite = setmetatable({}, { + __newindex = function(self, key, value) + rawset(activeLocale, key, value == true and key or value) + end, + __index = failsafe +}) + +--[[ CLASS COLOR LOCALS ]]-- + +local function formatValueString(text) + if "string" == type(text) then + text = gsub(text,"\n","\\n") + if match(gsub(text,"[^'\"]",""),'^"+$') then + return "'"..text.."'"; + else + return '"'..gsub(text,'"','\\"')..'"'; + end + else + return tostring(text); + end +end + +local function formatKeyString(text) + if "string"==type(text) and match(text,"^[_%a][_%a%d]*$") then + return text; + else + return "["..formatValueString(text).."]"; + end +end + +local function RegisterCallback(self, m, h) + assert(type(m) == "string" or type(m) == "function", "Bad argument #1 to :RegisterCallback (string or function expected)") + if type(m) == "string" then + assert(type(h) == "table", "Bad argument #2 to :RegisterCallback (table expected)") + assert(type(h[m]) == "function", "Bad argument #1 to :RegisterCallback (m \"" .. m .. "\" not found)") + m = h[m] + end + callbacks[m] = h or true + numCallbacks = numCallbacks + 1 +end + +local function UnregisterCallback(self, m, h) + assert(type(m) == "string" or type(m) == "function", "Bad argument #1 to :UnregisterCallback (string or function expected)") + if type(m) == "string" then + assert(type(h) == "table", "Bad argument #2 to :UnregisterCallback (table expected)") + assert(type(h[m]) == "function", "Bad argument #1 to :UnregisterCallback (m \"" .. m .. "\" not found)") + m = h[m] + end + callbacks[m] = nil + numCallbacks = numCallbacks + 1 +end + +local function DispatchCallbacks() + if (numCallbacks < 1) then return end + for m, h in pairs(callbacks) do + local ok, err = pcall(m, h ~= true and h or nil) + if not ok then + print("ERROR:", err) + end + end +end + +--[[ BUILD CLASS COLOR GLOBAL ]]-- + +SVUI_CLASS_COLORS = {}; +do + local classes = {}; + local supercolors = { + ["HUNTER"] = { r = 0.454, g = 0.698, b = 0 }, + ["WARLOCK"] = { r = 0.286, g = 0, b = 0.788 }, + ["PRIEST"] = { r = 0.976, g = 1, b = 0.839 }, + ["PALADIN"] = { r = 0.956, g = 0.207, b = 0.733 }, + ["MAGE"] = { r = 0, g = 0.796, b = 1 }, + ["ROGUE"] = { r = 1, g = 0.894, b = 0.117 }, + ["DRUID"] = { r = 1, g = 0.513, b = 0 }, + ["SHAMAN"] = { r = 0, g = 0.38, b = 1 }, + ["WARRIOR"] = { r = 0.698, g = 0.36, b = 0.152 }, + ["DEATHKNIGHT"] = { r = 0.847, g = 0.117, b = 0.074 }, + ["MONK"] = { r = 0.015, g = 0.886, b = 0.38 }, + }; + for class in pairs(RAID_CLASS_COLORS) do + tinsert(classes, class) + end + tsort(classes) + setmetatable(SVUI_CLASS_COLORS,{ + __index = function(t, k) + if k == "RegisterCallback" then return RegisterCallback end + if k == "UnregisterCallback" then return UnregisterCallback end + if k == "DispatchCallbacks" then return DispatchCallbacks end + end + }); + for i, class in ipairs(classes) do + local color = supercolors[class] + local r, g, b = color.r, color.g, color.b + local hex = ("ff%02x%02x%02x"):format(r * 255, g * 255, b * 255) + if not SVUI_CLASS_COLORS[class] or not SVUI_CLASS_COLORS[class].r or not SVUI_CLASS_COLORS[class].g or not SVUI_CLASS_COLORS[class].b then + SVUI_CLASS_COLORS[class] = { + r = r, + g = g, + b = b, + colorStr = hex, + } + end + end + classes = nil +end + +--[[ APPENDED LUA METHODS ]]-- + +function math.parsefloat(value,decimal) + if decimal and decimal > 0 then + local calc1 = 10 ^ decimal; + local calc2 = (value * calc1) + 0.5; + return floor(calc2) / calc1 + end + return floor(value + 0.5) +end + +function table.dump(targetTable) + local dumpTable = {}; + local dumpCheck = {}; + for key,value in ipairs(targetTable) do + tinsert(dumpTable, formatValueString(value)); + dumpCheck[key] = true; + end + for key,value in pairs(targetTable) do + if not dumpCheck[key] then + tinsert(dumpTable, "\n "..formatKeyString(key).." = "..formatValueString(value)); + end + end + local output = tconcat(dumpTable, ", "); + return "{ "..output.." }"; +end + +function table.copy(targetTable,deepCopy,mergeTable) + mergeTable = mergeTable or {}; + if targetTable==nil then return nil end + if mergeTable[targetTable] then return mergeTable[targetTable] end + local replacementTable = {} + for key,value in pairs(targetTable)do + if deepCopy and type(value) == "table" then + replacementTable[key] = table.copy(value, deepCopy, mergeTable) + else + replacementTable[key] = value + end + end + setmetatable(replacementTable, table.copy(getmetatable(targetTable), deepCopy, mergeTable)) + mergeTable[targetTable] = replacementTable; + return replacementTable +end + +function string.trim(this) + return this:find('^%s*$') and '' or this:match('^%s*(.*%S)') +end + +function string.color(this, color) + return ("|cff%s%s|r"):format(color, this) +end + +function string.link(this, prefix, text, color) + text = tostring(text) + local colorstring = tostring(this):color(color or "ffffff") + return ("|H%s:%s|h%s|h"):format(prefix, text, colorstring) +end + +function string.explode(str, delim) + local res = { } + local pattern = string.format("([^%s]+)%s()", delim, delim) + while (true) do + line, pos = str:match(pattern, pos) + if line == nil then break end + table.insert(res, line) + end + return res +end + +--[[ CORE ENGINE CONSTRUCT ]]-- + +local Core_StaticPopup_Show = function(self, arg) + if arg == "ADDON_ACTION_FORBIDDEN" then + StaticPopup_Hide(arg) + end +end + +local Core_ResetAllUI = function(self, confirmed) + if InCombatLockdown()then + SendAddonMessage(ERR_NOT_IN_COMBAT) + return + end + if(not confirmed) then + self:StaticPopup_Show('RESET_UI_CHECK') + return + end + self:ResetInstallation() +end + +local Core_ResetUI = function(self, confirmed) + if InCombatLockdown()then + SendAddonMessage(ERR_NOT_IN_COMBAT) + return + end + if(not confirmed) then + self:StaticPopup_Show('RESETMOVERS_CHECK') + return + end + self:ResetMovables() +end + +local Core_ToggleConfig = function(self) + if InCombatLockdown() then + SendAddonMessage(ERR_NOT_IN_COMBAT) + self.UIParent:RegisterEvent('PLAYER_REGEN_ENABLED') + return + end + if not IsAddOnLoaded("SVUI_ConfigOMatic") then + local _,_,_,_,_,state = GetAddOnInfo("SVUI_ConfigOMatic") + if state ~= "MISSING" and state ~= "DISABLED" then + LoadAddOn("SVUI_ConfigOMatic") + local config_version = GetAddOnMetadata("SVUI_ConfigOMatic", "Version") + if(tonumber(config_version) < 4) then + self:StaticPopup_Show("CLIENT_UPDATE_REQUEST") + end + else + self:AddonMessage("|cffff0000Error -- Addon 'SVUI_ConfigOMatic' not found or is disabled.|r") + return + end + end + local aceConfig = LibStub("AceConfigDialog-3.0") + local switch = not aceConfig.OpenFrames["SVUI"] and "Open" or "Close" + aceConfig[switch](aceConfig, "SVUI") + GameTooltip:Hide() +end + +--/script SVUI[1]:TaintHandler("SVUI", "Script", "Function") +local Core_TaintHandler = function(self, taint, sourceName, sourceFunc) + if GetCVarBool('scriptErrors') ~= 1 then return end + local errorString = ("Error Captured: %s->%s->{%s}"):format(taint, sourceName or "Unknown", sourceFunc or "Unknown") + SV:AddonMessage(errorString) + SV:StaticPopup_Show("TAINT_RL") +end + +local function _sendmessage(msg, prefix) + if(type(msg) == "table") then + msg = tostring(msg) + end + + if(not msg) then return end + + if(prefix) then + local outbound = ("%s %s"):format(prefix, msg); + print(outbound) + else + print(msg) + end +end + +local Core_Debugger = function(self, msg) + if(not self.DebuggingMode) then return end + local outbound = (debugPattern):format("SVUI", "DEBUG") + _sendmessage(msg, outbound) +end + +local Core_AddonMessage = function(self, msg) + local outbound = (messagePattern):format("SVUI") + _sendmessage(msg, outbound) +end + +local Core_SetLocaleStrings = function(self, locale, isDefault) + local gameLocale = GetLocale() + if gameLocale == "enGB" then gameLocale = "enUS" end + + activeLocale = self.Localization + + if isDefault then + return defaultwrite + elseif(locale == GAME_LOCALE or locale == gameLocale) then + return metawrite + end +end + +local Core_Prototype = function(self, name) + local version = GetAddOnMetadata(name, "Version") + local schema = GetAddOnMetadata(name, "X-SVUI-Schema") + + self.Configs[schema] = {["enable"] = false} + + local obj = { + ___addonName = name, + ___version = version, + ___schema = schema + } + + local mt = {} + local old = getmetatable(obj) + if old then + for k, v in pairs(old) do mt[k] = v end + end + mt.__tostring = rootstring + setmetatable(obj, mt) + return obj +end + +local SVUI = { + ___addonName = SVUINameSpace, + ___version = GetAddOnMetadata(SVUINameSpace, "Version"), + ___interface = tonumber(uiVersion), + db = {}, + Global = { + Accountant = {}, + profiles = {}, + profileKeys = {}, + }, + Configs = {}, + Media = {}, + DisplayAudit = {}, + DynamicOptions = {}, + Dispellable = {}, + Snap = {}, + SetLocaleStrings = Core_SetLocaleStrings, + Prototype = Core_Prototype, + AddonMessage = Core_AddonMessage, + Debugger = Core_Debugger, + StaticPopup_Show, + ResetAllUI = Core_ResetAllUI, + ResetUI = Core_ResetUI, + ToggleConfig = Core_ToggleConfig, + TaintHandler = Core_TaintHandler +} + +SVUI.Localization = setmetatable({}, metaread) +SVUI.Options = { type = "group", name = "|cff339fffConfig-O-Matic|r", args = {}} + +--[[ MISC ]]-- + +SVUI.fubar = function() return end +SVUI.class = select(2,UnitClass("player")); +SVUI.ClassRole = ""; +SVUI.UnitRole = "NONE"; +SVUI.ConfigurationMode = false; +SVUI.DebuggingMode = false + +--[[ UTILITY FRAMES ]]-- + +SVUI.UIParent = CreateFrame("Frame", "SVUIParent", UIParent); +SVUI.UIParent:SetFrameLevel(UIParent:GetFrameLevel()); +SVUI.UIParent:SetPoint("CENTER", UIParent, "CENTER"); +SVUI.UIParent:SetSize(UIParent:GetSize()); +SVUI.Snap[1] = SVUI.UIParent; + +SVUI.Cloaked = CreateFrame("Frame", nil, UIParent); +SVUI.Cloaked:Hide(); + +--[[ ENSURE META METHODS ]]-- + +local mt = {} +local old = getmetatable(SVUI) +if old then + for k, v in pairs(old) do mt[k] = v end +end +mt.__tostring = rootstring +setmetatable(SVUI, mt) + +--[[ COMMON FUNCTIONS ]]-- + +SVUICore[1] = SVUI +SVUICore[2] = SVUI.Localization + +--[[ SET MASTER GLOBAL ]]-- + +_G[SVUINameSpace] = SVUICore; \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/installer.lua b/Interface/AddOns/SVUI/system/installer.lua index f505822..c169aca 100644 --- a/Interface/AddOns/SVUI/system/installer.lua +++ b/Interface/AddOns/SVUI/system/installer.lua @@ -30,7 +30,7 @@ local tcopy = table.copy; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L, Registry = unpack(select(2, ...)); --[[ ########################################################## LOCAL VARS @@ -55,7 +55,7 @@ local function SetInstallButton(button) button:SetPushedTexture("") button:SetPushedTexture("") button:SetDisabledTexture("") - button:Formula409() + button:RemoveTextures() button:SetFrameLevel(button:GetFrameLevel() + 1) end @@ -81,114 +81,114 @@ end local function ShowLayout(show40) if(not _G["SVUI_Raid40"] or (show40 and _G["SVUI_Raid40"].forceShow == true)) then return end if(not show40 and _G["SVUI_Raid40"].forceShow ~= true) then return end - SuperVillain.SVUnit:UpdateGroupConfig(_G["SVUI_Raid40"], show40) + SV.SVUnit:UpdateGroupConfig(_G["SVUI_Raid40"], show40) end local function BarShuffle() - local bar2 = SuperVillain.db.SVBar.Bar2.enable; + local bar2 = SV.db.SVBar.Bar2.enable; local base = 30; - local bS = SuperVillain.db.SVBar.Bar1.buttonspacing; - local tH = SuperVillain.db.SVBar.Bar1.buttonsize + (base - bS); + local bS = SV.db.SVBar.Bar1.buttonspacing; + local tH = SV.db.SVBar.Bar1.buttonsize + (base - bS); local b2h = bar2 and tH or base; local sph = (400 - b2h); - if not SuperVillain.db.framelocations then SuperVillain.db.framelocations = {} end - SuperVillain.db.framelocations.SVUI_SpecialAbility_MOVE = "BOTTOMSVUIParentBOTTOM0"..sph; - SuperVillain.db.framelocations.SVUI_ActionBar2_MOVE = "BOTTOMSVUI_ActionBar1TOP0"..(-bS); - SuperVillain.db.framelocations.SVUI_ActionBar3_MOVE = "BOTTOMLEFTSVUI_ActionBar1BOTTOMRIGHT40"; - SuperVillain.db.framelocations.SVUI_ActionBar5_MOVE = "BOTTOMRIGHTSVUI_ActionBar1BOTTOMLEFT-40"; + if not SV.db.framelocations then SV.db.framelocations = {} end + SV.db.framelocations.SVUI_SpecialAbility_MOVE = "BOTTOMSVUIParentBOTTOM0"..sph; + SV.db.framelocations.SVUI_ActionBar2_MOVE = "BOTTOMSVUI_ActionBar1TOP0"..(-bS); + SV.db.framelocations.SVUI_ActionBar3_MOVE = "BOTTOMLEFTSVUI_ActionBar1BOTTOMRIGHT40"; + SV.db.framelocations.SVUI_ActionBar5_MOVE = "BOTTOMRIGHTSVUI_ActionBar1BOTTOMLEFT-40"; if bar2 then - SuperVillain.db.framelocations.SVUI_PetActionBar_MOVE = "BOTTOMLEFTSVUI_ActionBar2TOPLEFT04" - SuperVillain.db.framelocations.SVUI_StanceBar_MOVE = "BOTTOMRIGHTSVUI_ActionBar2TOPRIGHT04"; + SV.db.framelocations.SVUI_PetActionBar_MOVE = "BOTTOMLEFTSVUI_ActionBar2TOPLEFT04" + SV.db.framelocations.SVUI_StanceBar_MOVE = "BOTTOMRIGHTSVUI_ActionBar2TOPRIGHT04"; else - SuperVillain.db.framelocations.SVUI_PetActionBar_MOVE = "BOTTOMLEFTSVUI_ActionBar1TOPLEFT04" - SuperVillain.db.framelocations.SVUI_StanceBar_MOVE = "BOTTOMRIGHTSVUI_ActionBar1TOPRIGHT04"; + SV.db.framelocations.SVUI_PetActionBar_MOVE = "BOTTOMLEFTSVUI_ActionBar1TOPLEFT04" + SV.db.framelocations.SVUI_StanceBar_MOVE = "BOTTOMRIGHTSVUI_ActionBar1TOPRIGHT04"; end end local function UFMoveBottomQuadrant(toggle) - if not SuperVillain.db.framelocations then SuperVillain.db.framelocations = {} end + if not SV.db.framelocations then SV.db.framelocations = {} end if not toggle then - SuperVillain.db.framelocations.SVUI_Player_MOVE = "BOTTOMSVUIParentBOTTOM-278182" - SuperVillain.db.framelocations.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM-278122" - SuperVillain.db.framelocations.SVUI_Target_MOVE = "BOTTOMSVUIParentBOTTOM278182" - SuperVillain.db.framelocations.SVUI_TargetCastbar_MOVE = "BOTTOMSVUIParentBOTTOM278122" - SuperVillain.db.framelocations.SVUI_Pet_MOVE = "BOTTOMSVUIParentBOTTOM0181" - SuperVillain.db.framelocations.SVUI_TargetTarget_MOVE = "BOTTOMSVUIParentBOTTOM0214" - SuperVillain.db.framelocations.SVUI_Focus_MOVE = "BOTTOMSVUIParentBOTTOM310432" - SuperVillain.db.framelocations.SVUI_ThreatBar_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-495182" + SV.db.framelocations.SVUI_Player_MOVE = "BOTTOMSVUIParentBOTTOM-278182" + SV.db.framelocations.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM-278122" + SV.db.framelocations.SVUI_Target_MOVE = "BOTTOMSVUIParentBOTTOM278182" + SV.db.framelocations.SVUI_TargetCastbar_MOVE = "BOTTOMSVUIParentBOTTOM278122" + SV.db.framelocations.SVUI_Pet_MOVE = "BOTTOMSVUIParentBOTTOM0181" + SV.db.framelocations.SVUI_TargetTarget_MOVE = "BOTTOMSVUIParentBOTTOM0214" + SV.db.framelocations.SVUI_Focus_MOVE = "BOTTOMSVUIParentBOTTOM310432" + SV.db.framelocations.SVUI_ThreatBar_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-495182" elseif toggle == "shift" then - SuperVillain.db.framelocations.SVUI_Player_MOVE = "BOTTOMSVUIParentBOTTOM-278210" - SuperVillain.db.framelocations.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM-278150" - SuperVillain.db.framelocations.SVUI_Target_MOVE = "BOTTOMSVUIParentBOTTOM278210" - SuperVillain.db.framelocations.SVUI_TargetCastbar_MOVE = "BOTTOMSVUIParentBOTTOM278150" - SuperVillain.db.framelocations.SVUI_Pet_MOVE = "BOTTOMSVUIParentBOTTOM0209" - SuperVillain.db.framelocations.SVUI_TargetTarget_MOVE = "BOTTOMSVUIParentBOTTOM0242" - SuperVillain.db.framelocations.SVUI_Focus_MOVE = "BOTTOMSVUIParentBOTTOM310432" - SuperVillain.db.framelocations.SVUI_ThreatBar_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-495210" + SV.db.framelocations.SVUI_Player_MOVE = "BOTTOMSVUIParentBOTTOM-278210" + SV.db.framelocations.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM-278150" + SV.db.framelocations.SVUI_Target_MOVE = "BOTTOMSVUIParentBOTTOM278210" + SV.db.framelocations.SVUI_TargetCastbar_MOVE = "BOTTOMSVUIParentBOTTOM278150" + SV.db.framelocations.SVUI_Pet_MOVE = "BOTTOMSVUIParentBOTTOM0209" + SV.db.framelocations.SVUI_TargetTarget_MOVE = "BOTTOMSVUIParentBOTTOM0242" + SV.db.framelocations.SVUI_Focus_MOVE = "BOTTOMSVUIParentBOTTOM310432" + SV.db.framelocations.SVUI_ThreatBar_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-495210" else local c = 136; local d = 135; local e = 80; - SuperVillain.db.framelocations.SVUI_Player_MOVE = "BOTTOMSVUIParentBOTTOM"..-c..""..d; - SuperVillain.db.framelocations.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM"..-c..""..(d-60); - SuperVillain.db.framelocations.SVUI_Target_MOVE = "BOTTOMSVUIParentBOTTOM"..c..""..d; - SuperVillain.db.framelocations.SVUI_TargetCastbar_MOVE = "BOTTOMSVUIParentBOTTOM"..c..""..(d-60); - SuperVillain.db.framelocations.SVUI_Pet_MOVE = "BOTTOMSVUIParentBOTTOM"..-c..""..e; - SuperVillain.db.framelocations.SVUI_TargetTarget_MOVE = "BOTTOMSVUIParentBOTTOM"..c..""..e; - SuperVillain.db.framelocations.SVUI_Focus_MOVE = "BOTTOMSVUIParentBOTTOM"..c..""..(d + 150); - SuperVillain.db.framelocations.SVUI_ThreatBar_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-495"..d; + SV.db.framelocations.SVUI_Player_MOVE = "BOTTOMSVUIParentBOTTOM"..-c..""..d; + SV.db.framelocations.SVUI_PlayerCastbar_MOVE = "BOTTOMSVUIParentBOTTOM"..-c..""..(d-60); + SV.db.framelocations.SVUI_Target_MOVE = "BOTTOMSVUIParentBOTTOM"..c..""..d; + SV.db.framelocations.SVUI_TargetCastbar_MOVE = "BOTTOMSVUIParentBOTTOM"..c..""..(d-60); + SV.db.framelocations.SVUI_Pet_MOVE = "BOTTOMSVUIParentBOTTOM"..-c..""..e; + SV.db.framelocations.SVUI_TargetTarget_MOVE = "BOTTOMSVUIParentBOTTOM"..c..""..e; + SV.db.framelocations.SVUI_Focus_MOVE = "BOTTOMSVUIParentBOTTOM"..c..""..(d + 150); + SV.db.framelocations.SVUI_ThreatBar_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-495"..d; end end local function UFMoveLeftQuadrant(toggle) - if not SuperVillain.db.framelocations then SuperVillain.db.framelocations = {} end + if not SV.db.framelocations then SV.db.framelocations = {} end if not toggle then - SuperVillain.db.framelocations.SVUI_Assist_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-250" - SuperVillain.db.framelocations.SVUI_Tank_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-175" - SuperVillain.db.framelocations.SVUI_Raidpet_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-325" - SuperVillain.db.framelocations.SVUI_Party_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT"..XOFF.."400" - SuperVillain.db.framelocations.SVUI_Raid10_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT"..XOFF.."400" - SuperVillain.db.framelocations.SVUI_Raid25_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT"..XOFF.."400" - SuperVillain.db.framelocations.SVUI_Raid40_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT"..XOFF.."400" + SV.db.framelocations.SVUI_Assist_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-250" + SV.db.framelocations.SVUI_Tank_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-175" + SV.db.framelocations.SVUI_Raidpet_MOVE = "TOPLEFTSVUIParentTOPLEFT"..XOFF.."-325" + SV.db.framelocations.SVUI_Party_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT"..XOFF.."400" + SV.db.framelocations.SVUI_Raid10_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT"..XOFF.."400" + SV.db.framelocations.SVUI_Raid25_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT"..XOFF.."400" + SV.db.framelocations.SVUI_Raid40_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT"..XOFF.."400" else - SuperVillain.db.framelocations.SVUI_Assist_MOVE = "TOPLEFTSVUIParentTOPLEFT4-250" - SuperVillain.db.framelocations.SVUI_Tank_MOVE = "TOPLEFTSVUIParentTOPLEFT4-175" - SuperVillain.db.framelocations.SVUI_Raidpet_MOVE = "TOPLEFTSVUIParentTOPLEFT4-325" - SuperVillain.db.framelocations.SVUI_Party_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT4300" - SuperVillain.db.framelocations.SVUI_Raid40_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT4300" - SuperVillain.db.framelocations.SVUI_Raid10_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT4300" - SuperVillain.db.framelocations.SVUI_Raid25_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT4300" + SV.db.framelocations.SVUI_Assist_MOVE = "TOPLEFTSVUIParentTOPLEFT4-250" + SV.db.framelocations.SVUI_Tank_MOVE = "TOPLEFTSVUIParentTOPLEFT4-175" + SV.db.framelocations.SVUI_Raidpet_MOVE = "TOPLEFTSVUIParentTOPLEFT4-325" + SV.db.framelocations.SVUI_Party_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT4300" + SV.db.framelocations.SVUI_Raid40_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT4300" + SV.db.framelocations.SVUI_Raid10_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT4300" + SV.db.framelocations.SVUI_Raid25_MOVE = "BOTTOMLEFTSVUIParentBOTTOMLEFT4300" end end local function UFMoveTopQuadrant(toggle) - if not SuperVillain.db.framelocations then SuperVillain.db.framelocations = {} end + if not SV.db.framelocations then SV.db.framelocations = {} end if not toggle then - SuperVillain.db.framelocations.GM_MOVE = "TOPLEFTSVUIParentTOPLEFT250-25" - SuperVillain.db.framelocations.SVUI_LootFrame_MOVE = "BOTTOMSVUIParentBOTTOM0350" - SuperVillain.db.framelocations.SVUI_AltPowerBar_MOVE = "TOPSVUIParentTOP0-40" - SuperVillain.db.framelocations.LoC_MOVE = "BOTTOMSVUIParentBOTTOM0350" - SuperVillain.db.framelocations.BNET_MOVE = "TOPRIGHTSVUIParentTOPRIGHT-4-250" + SV.db.framelocations.GM_MOVE = "TOPLEFTSVUIParentTOPLEFT250-25" + SV.db.framelocations.SVUI_LootFrame_MOVE = "BOTTOMSVUIParentBOTTOM0350" + SV.db.framelocations.SVUI_AltPowerBar_MOVE = "TOPSVUIParentTOP0-40" + SV.db.framelocations.LoC_MOVE = "BOTTOMSVUIParentBOTTOM0350" + SV.db.framelocations.BNET_MOVE = "TOPRIGHTSVUIParentTOPRIGHT-4-250" else - SuperVillain.db.framelocations.GM_MOVE = "TOPLEFTSVUIParentTOPLEFT344-25" - SuperVillain.db.framelocations.SVUI_LootFrame_MOVE = "BOTTOMSVUIParentBOTTOM0254" - SuperVillain.db.framelocations.SVUI_AltPowerBar_MOVE = "TOPSVUIParentTOP0-39" - SuperVillain.db.framelocations.LoC_MOVE = "BOTTOMSVUIParentBOTTOM0443" - SuperVillain.db.framelocations.BNET_MOVE = "TOPRIGHTSVUIParentTOPRIGHT-4-248" + SV.db.framelocations.GM_MOVE = "TOPLEFTSVUIParentTOPLEFT344-25" + SV.db.framelocations.SVUI_LootFrame_MOVE = "BOTTOMSVUIParentBOTTOM0254" + SV.db.framelocations.SVUI_AltPowerBar_MOVE = "TOPSVUIParentTOP0-39" + SV.db.framelocations.LoC_MOVE = "BOTTOMSVUIParentBOTTOM0443" + SV.db.framelocations.BNET_MOVE = "TOPRIGHTSVUIParentTOPRIGHT-4-248" end end local function UFMoveRightQuadrant(toggle) - if not SuperVillain.db.framelocations then SuperVillain.db.framelocations = {} end - local dH = SuperVillain.db.SVDock.dockRightHeight + 60 + if not SV.db.framelocations then SV.db.framelocations = {} end + local dH = SV.db.SVDock.dockRightHeight + 60 if not toggle or toggle == "high" then - SuperVillain.db.framelocations.SVUI_BossHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" - SuperVillain.db.framelocations.SVUI_ArenaHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" - SuperVillain.db.framelocations.Tooltip_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-284"..dH; + SV.db.framelocations.SVUI_BossHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" + SV.db.framelocations.SVUI_ArenaHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" + SV.db.framelocations.Tooltip_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-284"..dH; else - SuperVillain.db.framelocations.SVUI_BossHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" - SuperVillain.db.framelocations.SVUI_ArenaHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" - SuperVillain.db.framelocations.Tooltip_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-284"..dH; + SV.db.framelocations.SVUI_BossHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" + SV.db.framelocations.SVUI_ArenaHolder_MOVE = "RIGHTSVUIParentRIGHT-1050" + SV.db.framelocations.Tooltip_MOVE = "BOTTOMRIGHTSVUIParentBOTTOMRIGHT-284"..dH; end end @@ -306,12 +306,12 @@ local function initChat(mungs) ChangeChatColor("CHANNEL3", 232 / 255, 228 / 255, 121 / 255) if not mungs then - if SuperVillain.Chat then - SuperVillain.Chat:ReLoad(true) + if SV.Chat then + SV.Chat:ReLoad(true) if SVUI_Cache["Dock"].RightSuperDockFaded == true then RightSuperDockToggleButton:Click()end if SVUI_Cache["Dock"].LeftSuperDockFaded == true then LeftSuperDockToggleButton:Click()end end - SuperVillain:SavedPopup() + SV:SavedPopup() end end --[[ @@ -319,7 +319,7 @@ end GLOBAL/MODULE FUNCTIONS ########################################################## ]]-- -function SuperVillain:SetUserScreen(rez, preserve) +function SV:SetUserScreen(rez, preserve) if not preserve then if okToResetMOVE then self:ResetMovables("") @@ -328,7 +328,7 @@ function SuperVillain:SetUserScreen(rez, preserve) self.db:SetDefault("SVUnit") end - if not SuperVillain.db.framelocations then SuperVillain.db.framelocations = {} end + if not SV.db.framelocations then SV.db.framelocations = {} end if rez == "low" then if not preserve then self.db.SVDock.dockLeftWidth = 350; @@ -378,15 +378,15 @@ function SuperVillain:SetUserScreen(rez, preserve) if(not preserve and not mungs) then BarShuffle() self:SetSVMovablesPositions() - self.Registry:Update('SVDock') - self.Registry:Update('SVAura') - self.Registry:Update('SVBar') - self.Registry:Update('SVUnit') - SuperVillain:SavedPopup() + Registry:Update('SVDock') + Registry:Update('SVAura') + Registry:Update('SVBar') + Registry:Update('SVUnit') + SV:SavedPopup() end end -function SuperVillain:SetColorTheme(style, preserve) +function SV:SetColorTheme(style, preserve) style = style or "default"; if not preserve then @@ -404,18 +404,18 @@ function SuperVillain:SetColorTheme(style, preserve) if(not mungs) then self:MediaUpdate() - self.Registry:Update('SVStats') - self.Registry:Update('SVUnit') + Registry:Update('SVStats') + Registry:Update('SVUnit') if(not preserve) then - SuperVillain:SavedPopup() + SV:SavedPopup() end end end -function SuperVillain:SetUnitframeLayout(style, preserve) +function SV:SetUnitframeLayout(style, preserve) style = style or "default"; - if not SuperVillain.db.framelocations then SuperVillain.db.framelocations = {} end + if not SV.db.framelocations then SV.db.framelocations = {} end if not preserve then self.db:SetDefault("SVUnit") @@ -442,32 +442,32 @@ function SuperVillain:SetUnitframeLayout(style, preserve) end self:SetSVMovablesPositions() end - self.Registry:Update('SVStats') - self.Registry:Update('SVUnit') + Registry:Update('SVStats') + Registry:Update('SVUnit') if(not preserve) then - SuperVillain:SavedPopup() + SV:SavedPopup() end end end -function SuperVillain:SetGroupframeLayout(style, preserve) +function SV:SetGroupframeLayout(style, preserve) style = style or "default"; local presets = self:LoadPresetData("layouts", style) self.db.LAYOUT.groupstyle = style if(not mungs) then - self.Registry:Update('SVUnit') + Registry:Update('SVUnit') if(not preserve) then - SuperVillain:SavedPopup() + SV:SavedPopup() end end end -function SuperVillain:SetupBarLayout(style, preserve) +function SV:SetupBarLayout(style, preserve) style = style or "default"; - if not SuperVillain.db.framelocations then SuperVillain.db.framelocations={} end + if not SV.db.framelocations then SV.db.framelocations={} end if not preserve then self.db:SetDefault("SVBar") if okToResetMOVE then @@ -491,25 +491,25 @@ function SuperVillain:SetupBarLayout(style, preserve) BarShuffle() self:SetSVMovablesPositions() end - self.Registry:Update('SVStats') - self.Registry:Update('SVBar') + Registry:Update('SVStats') + Registry:Update('SVBar') if(not preserve) then - SuperVillain:SavedPopup() + SV:SavedPopup() end end end -function SuperVillain:SetupAuralayout(style, preserve) +function SV:SetupAuralayout(style, preserve) style = style or "default"; local presets = self:LoadPresetData("auras", style) self.db.LAYOUT.aurastyle = style; if(not mungs) then - self.Registry:Update('SVStats') - self.Registry:Update('SVAura') - self.Registry:Update('SVUnit') + Registry:Update('SVStats') + Registry:Update('SVAura') + Registry:Update('SVUnit') if(not preserve) then - SuperVillain:SavedPopup() + SV:SavedPopup() end end end @@ -519,13 +519,13 @@ local function PlayThemeSong() SetCVar("Sound_MusicVolume", 100) SetCVar("Sound_EnableMusic", 1) StopMusic() - PlayMusic([[Interface\AddOns\SVUI\assets\sounds\SuperVillain.mp3]]) + PlayMusic([[Interface\AddOns\SVUI\assets\sounds\SV.mp3]]) musicIsPlaying = true end end local function InstallComplete() - SVUI_Profile.SAFEDATA.install_version = SuperVillain.___version; + SVUI_Profile.SAFEDATA.install_version = SV.___version; StopMusic() SetCVar("Sound_MusicVolume",user_music_vol) okToResetMOVE = false; @@ -536,15 +536,15 @@ local function InstallMungsChoice() mungs = true; okToResetMOVE = false; initChat(true); - SuperVillain:SetUserScreen('high'); - SuperVillain:SetColorTheme(); - SuperVillain.db.LAYOUT.unitstyle = nil; - SuperVillain:SetUnitframeLayout(); - SuperVillain.db.LAYOUT.groupstyle = nil; - SuperVillain.db.LAYOUT.barstyle = nil; - SuperVillain:SetupBarLayout(); - SuperVillain:SetupAuralayout(); - SVUI_Profile.SAFEDATA.install_version = SuperVillain.___version; + SV:SetUserScreen('high'); + SV:SetColorTheme(); + SV.db.LAYOUT.unitstyle = nil; + SV:SetUnitframeLayout(); + SV.db.LAYOUT.groupstyle = nil; + SV.db.LAYOUT.barstyle = nil; + SV:SetupBarLayout(); + SV:SetupAuralayout(); + SVUI_Profile.SAFEDATA.install_version = SV.___version; StopMusic() SetCVar("Sound_MusicVolume",user_music_vol) ReloadUI() @@ -612,7 +612,7 @@ local function SetPage(newPage) SVUI_InstallPrevButton:Disable() SVUI_InstallPrevButton:Hide() okToResetMOVE = true - setupFrame.SubTitle:SetText(format(L["This is Supervillain UI version %s!"], SuperVillain.___version)) + setupFrame.SubTitle:SetText(format(L["This is Supervillain UI version %s!"], SV.___version)) setupFrame.Desc1:SetText(L["Before I can turn you loose, persuing whatever villainy you feel will advance your professional career... I need to ask some questions and turn a few screws first."]) setupFrame.Desc2:SetText(L["At any time you can get to the config options by typing the command / sv. For quick changes to frame, bar or color sets, call your henchman by clicking the button on the bottom right of your screen. (Its the one with his stupid face on it)"]) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) @@ -644,8 +644,8 @@ local function SetPage(newPage) elseif newPage == 3 then local rez = GetCVar("gxResolution") setupFrame.SubTitle:SetText(RESOLUTION) - setupFrame.Desc1:SetText(format(L["Your current resolution is %s, this is considered a %s resolution."], rez, (SuperVillain.ghettoMonitor and LOW or HIGH))) - if SuperVillain.ghettoMonitor then + setupFrame.Desc1:SetText(format(L["Your current resolution is %s, this is considered a %s resolution."], rez, (SV.ghettoMonitor and LOW or HIGH))) + if SV.ghettoMonitor then setupFrame.Desc2:SetText(L["This resolution requires that you change some settings to get everything to fit on your screen."].." "..L["Click the button below to resize your chat frames, unitframes, and reposition your actionbars."].." "..L["You may need to further alter these settings depending how low your resolution is."]) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) else @@ -654,7 +654,7 @@ local function SetPage(newPage) end SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() - SuperVillain:SetUserScreen("high") + SV:SetUserScreen("high") SVUI_SetupHolder.Desc1:SetText(L["|cffFF9F00"..HIGH.." "..RESOLUTION.."!|r"]) SVUI_SetupHolder.Desc2:SetText(L["So what you think your better than me with your big monitor? HUH?!?!"]) SVUI_SetupHolder.Desc3:SetText(L["Dont forget whos in charge here! But enjoy the incredible detail."]) @@ -662,7 +662,7 @@ local function SetPage(newPage) SVUI_InstallOption1Button:SetText(HIGH) SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() - SuperVillain:SetUserScreen("low") + SV:SetUserScreen("low") SVUI_SetupHolder.Desc1:SetText(L["|cffFF9F00"..LOW.." "..RESOLUTION.."|r"]) SVUI_SetupHolder.Desc2:SetText(L["Why are you playing this on what I would assume is a calculator display?"]) SVUI_SetupHolder.Desc3:SetText(L["Enjoy the ONE incredible pixel that fits on this screen."]) @@ -676,7 +676,7 @@ local function SetPage(newPage) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() - SuperVillain:SetColorTheme("kaboom") + SV:SetColorTheme("kaboom") SVUI_SetupHolder.Desc1:SetText(L["|cffFF9F00KABOOOOM!|r"]) SVUI_SetupHolder.Desc2:SetText(L["This theme tells the world that you are a villain who can put on a show"]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["or better yet, you ARE the show!"]) @@ -684,7 +684,7 @@ local function SetPage(newPage) SVUI_InstallOption1Button:SetText(L["Kaboom!"]) SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() - SuperVillain:SetColorTheme("dark") + SV:SetColorTheme("dark") SVUI_SetupHolder.Desc1:SetText(L["|cffAF30FFThe Darkest Night|r"]) SVUI_SetupHolder.Desc2:SetText(L["This theme indicates that you have no interest in wasting time"]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L[" the dying begins NOW!"]) @@ -692,7 +692,7 @@ local function SetPage(newPage) SVUI_InstallOption2Button:SetText(L["Darkness"]) SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() - SuperVillain:SetColorTheme("classy") + SV:SetColorTheme("classy") SVUI_SetupHolder.Desc1:SetText(L["|cffFFFF00"..CLASS_COLORS.."|r"]) SVUI_SetupHolder.Desc2:SetText(L["This theme is for villains who take pride in their class"]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L[" villains know how to reprezent!"]) @@ -700,7 +700,7 @@ local function SetPage(newPage) SVUI_InstallOption3Button:SetText(L["Class" .. "\n" .. "Colors"]) SVUI_InstallOption4Button:Show() SVUI_InstallOption4Button:SetScript("OnClick", function() - SuperVillain:SetColorTheme() + SV:SetColorTheme() SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFPlain and Simple|r"]) SVUI_SetupHolder.Desc2:SetText(L["This theme is for any villain who sticks to their traditions"]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["you don't need fancyness to kick some ass!"]) @@ -715,8 +715,8 @@ local function SetPage(newPage) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.unitstyle = nil; - SuperVillain:SetUnitframeLayout("super") + SV.db.LAYOUT.unitstyle = nil; + SV:SetUnitframeLayout("super") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFLets Do This|r"]) SVUI_SetupHolder.Desc2:SetText(L["This layout is anything but minimal! Using this is like being at a rock concert"]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["then annihilating the crowd with frickin lazer beams!"]) @@ -724,8 +724,8 @@ local function SetPage(newPage) SVUI_InstallOption1Button:SetText(L["Super"]) SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.unitstyle = nil; - SuperVillain:SetUnitframeLayout("simple") + SV.db.LAYOUT.unitstyle = nil; + SV:SetUnitframeLayout("simple") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFSimply Simple|r"]) SVUI_SetupHolder.Desc2:SetText(L["This layout is for the villain who just wants to get things done!"]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["but he still wants to see your face before he hits you!"]) @@ -733,8 +733,8 @@ local function SetPage(newPage) SVUI_InstallOption2Button:SetText(L["Simple"]) SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.unitstyle = nil; - SuperVillain:SetUnitframeLayout("compact") + SV.db.LAYOUT.unitstyle = nil; + SV:SetUnitframeLayout("compact") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFEl Compacto|r"]) SVUI_SetupHolder.Desc2:SetText(L["Just the necessities so you can see more of the world around you"]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["you dont need no fanciness getting in the way of world domination do you?"]) @@ -750,8 +750,8 @@ local function SetPage(newPage) SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.groupstyle = "default"; - SuperVillain:SetGroupframeLayout("default") + SV.db.LAYOUT.groupstyle = "default"; + SV:SetGroupframeLayout("default") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFStandard|r"]) SVUI_SetupHolder.Desc2:SetText(L["You are good to go with the default layout"]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["frames schmames, lets kill some stuff!"]) @@ -760,8 +760,8 @@ local function SetPage(newPage) SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.groupstyle = nil; - SuperVillain:SetGroupframeLayout("healer") + SV.db.LAYOUT.groupstyle = nil; + SV:SetGroupframeLayout("healer") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFMEDIC!!|r"]) SVUI_SetupHolder.Desc2:SetText(L["You are pretty helpful.. for a VILLAIN!"]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["Hey, even a super villain gets his ass kicked once in awhile. We need the likes of you!"]) @@ -770,8 +770,8 @@ local function SetPage(newPage) SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.groupstyle = nil; - SuperVillain:SetGroupframeLayout("dps") + SV.db.LAYOUT.groupstyle = nil; + SV:SetGroupframeLayout("dps") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFDeath Dealer|r"]) SVUI_SetupHolder.Desc2:SetText(L["You are the kings of our craft. Handing out pain like its halloween candy."]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["I will move and squeeze group frames out of your way so you have more room for BOOM!"]) @@ -780,8 +780,8 @@ local function SetPage(newPage) SVUI_InstallOption4Button:Show() SVUI_InstallOption4Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.groupstyle = nil; - SuperVillain:SetGroupframeLayout("grid") + SV.db.LAYOUT.groupstyle = nil; + SV:SetGroupframeLayout("grid") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFCubed|r"]) SVUI_SetupHolder.Desc2:SetText(L["You are cold and calculated, your frames should reflect as much."]..CONTINUED) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["I'm gonna make these frames so precise that you can cut your finger on them!"]) @@ -795,8 +795,8 @@ local function SetPage(newPage) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.barstyle = nil; - SuperVillain:SetupBarLayout("default") + SV.db.LAYOUT.barstyle = nil; + SV:SetupBarLayout("default") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFLean And Clean|r"]) SVUI_SetupHolder.Desc2:SetText(L["Lets keep it slim and deadly, not unlike a ninja sword."]) SVUI_SetupHolder.Desc3:SetText(L["You dont ever even look at your bar hardly, so pick this one!"]) @@ -804,8 +804,8 @@ local function SetPage(newPage) SVUI_InstallOption1Button:SetText(L["Small" .. "\n" .. "Row"]) SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.barstyle = nil; - SuperVillain:SetupBarLayout("twosmall") + SV.db.LAYOUT.barstyle = nil; + SV:SetupBarLayout("twosmall") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFMore For Less|r"]) SVUI_SetupHolder.Desc2:SetText(L["Granted, you dont REALLY need the buttons due to your hotkey-leetness, you just like watching cooldowns!"]) SVUI_SetupHolder.Desc3:SetText(L["Sure thing cowboy, your secret is safe with me!"]) @@ -813,8 +813,8 @@ local function SetPage(newPage) SVUI_InstallOption2Button:SetText(L["2 Small" .. "\n" .. "Rows"]) SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.barstyle = nil; - SuperVillain:SetupBarLayout("onebig") + SV.db.LAYOUT.barstyle = nil; + SV:SetupBarLayout("onebig") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFWhat Big Buttons You Have|r"]) SVUI_SetupHolder.Desc2:SetText(L["The better to PEW-PEW you with my dear!"]) SVUI_SetupHolder.Desc3:SetText(L["When you have little time for mouse accuracy, choose this set!"]) @@ -822,8 +822,8 @@ local function SetPage(newPage) SVUI_InstallOption3Button:SetText(L["Big" .. "\n" .. "Row"]) SVUI_InstallOption4Button:Show() SVUI_InstallOption4Button:SetScript("OnClick", function() - SuperVillain.db.LAYOUT.barstyle = nil; - SuperVillain:SetupBarLayout("twobig") + SV.db.LAYOUT.barstyle = nil; + SV:SetupBarLayout("twobig") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFThe Double Down|r"]) SVUI_SetupHolder.Desc2:SetText(L["Lets be honest for a moment. Who doesnt like a huge pair in their face?"]) SVUI_SetupHolder.Desc3:SetText(L["Double your bars then double their size for maximum button goodness!"]) @@ -838,25 +838,25 @@ local function SetPage(newPage) SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() - SuperVillain:SetupAuralayout() + SV:SetupAuralayout() end) SVUI_InstallOption1Button:SetText(L["Vintage"]) SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() - SuperVillain:SetupAuralayout("icons") + SV:SetupAuralayout("icons") end) SVUI_InstallOption2Button:SetText(L["Icons"]) SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() - SuperVillain:SetupAuralayout("bars") + SV:SetupAuralayout("bars") end) SVUI_InstallOption3Button:SetText(L["Bars"]) SVUI_InstallOption4Button:Show() SVUI_InstallOption4Button:SetScript("OnClick", function() - SuperVillain:SetupAuralayout("theworks") + SV:SetupAuralayout("theworks") end) SVUI_InstallOption4Button:SetText(L["The" .. "\n" .. "Works!"]) @@ -893,47 +893,47 @@ local function ResetGlobalVariables() end end -function SuperVillain:ResetInstallation() +function SV:ResetInstallation() mungs = true; okToResetMOVE = false; initChat(true); - SuperVillain.db:Reset() - SuperVillain:SetUserScreen(); + SV.db:Reset() + SV:SetUserScreen(); - if SuperVillain.db.LAYOUT.mediastyle then - SuperVillain:SetColorTheme(SuperVillain.db.LAYOUT.mediastyle) + if SV.db.LAYOUT.mediastyle then + SV:SetColorTheme(SV.db.LAYOUT.mediastyle) else - SuperVillain.db.LAYOUT.mediastyle = nil; - SuperVillain:SetColorTheme() + SV.db.LAYOUT.mediastyle = nil; + SV:SetColorTheme() end - if SuperVillain.db.LAYOUT.unitstyle then - SuperVillain:SetUnitframeLayout(SuperVillain.db.LAYOUT.unitstyle) + if SV.db.LAYOUT.unitstyle then + SV:SetUnitframeLayout(SV.db.LAYOUT.unitstyle) else - SuperVillain.db.LAYOUT.unitstyle = nil; - SuperVillain:SetUnitframeLayout() + SV.db.LAYOUT.unitstyle = nil; + SV:SetUnitframeLayout() end - if SuperVillain.db.LAYOUT.barstyle then - SuperVillain:SetupBarLayout(SuperVillain.db.LAYOUT.barstyle) + if SV.db.LAYOUT.barstyle then + SV:SetupBarLayout(SV.db.LAYOUT.barstyle) else - SuperVillain.db.LAYOUT.barstyle = nil; - SuperVillain:SetupBarLayout() + SV.db.LAYOUT.barstyle = nil; + SV:SetupBarLayout() end - if SuperVillain.db.LAYOUT.aurastyle then - SuperVillain:SetupAuralayout(SuperVillain.db.LAYOUT.aurastyle) + if SV.db.LAYOUT.aurastyle then + SV:SetupAuralayout(SV.db.LAYOUT.aurastyle) else - SuperVillain.db.LAYOUT.aurastyle = nil; - SuperVillain:SetupAuralayout() + SV.db.LAYOUT.aurastyle = nil; + SV:SetupAuralayout() end - SVUI_Profile.SAFEDATA.install_version = SuperVillain.___version; + SVUI_Profile.SAFEDATA.install_version = SV.___version; ResetGlobalVariables() ReloadUI() end -function SuperVillain:Install(autoLoaded) +function SV:Install(autoLoaded) if(not user_music_vol) then user_music_vol = GetCVar("Sound_MusicVolume") end @@ -947,12 +947,12 @@ function SuperVillain:Install(autoLoaded) frame:SetPoint("CENTER") frame:SetFrameStrata("TOOLTIP") frame.Title = frame:CreateFontString(nil, "OVERLAY") - frame.Title:SetFont(SuperVillain.Media.font.narrator, 22, "OUTLINE") + frame.Title:SetFont(SV.Media.font.narrator, 22, "OUTLINE") frame.Title:Point("TOP", 0, -5) frame.Title:SetText(L["Supervillain UI Installation"]) frame.Next = CreateFrame("Button", "SVUI_InstallNextButton", frame, "UIPanelButtonTemplate") - frame.Next:Formula409() + frame.Next:RemoveTextures() frame.Next:Size(110, 25) frame.Next:Point("BOTTOMRIGHT", 50, 5) SetInstallButton(frame.Next) @@ -962,7 +962,7 @@ function SuperVillain:Install(autoLoaded) frame.Next.texture:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\OPTION-ARROW") frame.Next.texture:SetVertexColor(1, 0.5, 0) frame.Next.text = frame.Next:CreateFontString(nil, "OVERLAY") - frame.Next.text:SetFont(SuperVillain.Media.font.action, 18, "OUTLINE") + frame.Next.text:SetFont(SV.Media.font.action, 18, "OUTLINE") frame.Next.text:SetPoint("CENTER") frame.Next.text:SetText(CONTINUE) frame.Next:Disable() @@ -975,7 +975,7 @@ function SuperVillain:Install(autoLoaded) end) frame.Prev = CreateFrame("Button", "SVUI_InstallPrevButton", frame, "UIPanelButtonTemplate") - frame.Prev:Formula409() + frame.Prev:RemoveTextures() frame.Prev:Size(110, 25) frame.Prev:Point("BOTTOMLEFT", -50, 5) SetInstallButton(frame.Prev) @@ -986,7 +986,7 @@ function SuperVillain:Install(autoLoaded) frame.Prev.texture:SetTexCoord(1, 0, 1, 1, 0, 0, 0, 1) frame.Prev.texture:SetVertexColor(1, 0.5, 0) frame.Prev.text = frame.Prev:CreateFontString(nil, "OVERLAY") - frame.Prev.text:SetFont(SuperVillain.Media.font.action, 18, "OUTLINE") + frame.Prev.text:SetFont(SV.Media.font.action, 18, "OUTLINE") frame.Prev.text:SetPoint("CENTER") frame.Prev.text:SetText(PREVIOUS) frame.Prev:Disable() @@ -1002,12 +1002,12 @@ function SuperVillain:Install(autoLoaded) frame.Status:Size(150, 30) frame.Status:Point("BOTTOM", frame, "TOP", 0, 2) frame.Status.text = frame.Status:CreateFontString(nil, "OVERLAY") - frame.Status.text:SetFont(SuperVillain.Media.font.numbers, 22, "OUTLINE") + frame.Status.text:SetFont(SV.Media.font.numbers, 22, "OUTLINE") frame.Status.text:SetPoint("CENTER") frame.Status.text:SetText(CURRENT_PAGE.." / "..MAX_PAGE) frame.Option01 = CreateFrame("Button", "SVUI_InstallOption01Button", frame, "UIPanelButtonTemplate") - frame.Option01:Formula409() + frame.Option01:RemoveTextures() frame.Option01:Size(160, 30) frame.Option01:Point("BOTTOM", 0, 15) frame.Option01:SetText("") @@ -1031,7 +1031,7 @@ function SuperVillain:Install(autoLoaded) frame.Option01:Hide() frame.Option02 = CreateFrame("Button", "SVUI_InstallOption02Button", frame, "UIPanelButtonTemplate") - frame.Option02:Formula409() + frame.Option02:RemoveTextures() frame.Option02:Size(130, 30) frame.Option02:Point("BOTTOMLEFT", frame, "BOTTOM", 4, 15) frame.Option02:SetText("") @@ -1065,7 +1065,7 @@ function SuperVillain:Install(autoLoaded) frame.Option02:Hide() frame.Option03 = CreateFrame("Button", "SVUI_InstallOption03Button", frame, "UIPanelButtonTemplate") - frame.Option03:Formula409() + frame.Option03:RemoveTextures() frame.Option03:Size(130, 30) frame.Option03:Point("BOTTOM", frame, "BOTTOM", 0, 15) frame.Option03:SetText("") @@ -1105,7 +1105,7 @@ function SuperVillain:Install(autoLoaded) frame.Option03:Hide() frame.Option1 = CreateFrame("Button", "SVUI_InstallOption1Button", frame, "UIPanelButtonTemplate") - frame.Option1:Formula409() + frame.Option1:RemoveTextures() frame.Option1:Size(160, 30) frame.Option1:Point("BOTTOM", 0, 15) frame.Option1:SetText("") @@ -1129,7 +1129,7 @@ function SuperVillain:Install(autoLoaded) frame.Option1:Hide() frame.Option2 = CreateFrame("Button", "SVUI_InstallOption2Button", frame, "UIPanelButtonTemplate") - frame.Option2:Formula409() + frame.Option2:RemoveTextures() frame.Option2:Size(120, 30) frame.Option2:Point("BOTTOMLEFT", frame, "BOTTOM", 4, 15) frame.Option2:SetText("") @@ -1163,7 +1163,7 @@ function SuperVillain:Install(autoLoaded) frame.Option2:Hide() frame.Option3 = CreateFrame("Button", "SVUI_InstallOption3Button", frame, "UIPanelButtonTemplate") - frame.Option3:Formula409() + frame.Option3:RemoveTextures() frame.Option3:Size(110, 30) frame.Option3:Point("LEFT", frame.Option2, "RIGHT", 4, 0) frame.Option3:SetText("") @@ -1199,7 +1199,7 @@ function SuperVillain:Install(autoLoaded) frame.Option3:Hide() frame.Option4 = CreateFrame("Button", "SVUI_InstallOption4Button", frame, "UIPanelButtonTemplate") - frame.Option4:Formula409() + frame.Option4:RemoveTextures() frame.Option4:Size(110, 30) frame.Option4:Point("LEFT", frame.Option3, "RIGHT", 4, 0) frame.Option4:SetText("") @@ -1236,18 +1236,18 @@ function SuperVillain:Install(autoLoaded) frame.Option4:Hide() frame.SubTitle = frame:CreateFontString(nil, "OVERLAY") - frame.SubTitle:SetFont(SuperVillain.Media.font.roboto, 16, "OUTLINE") + frame.SubTitle:SetFont(SV.Media.font.roboto, 16, "OUTLINE") frame.SubTitle:Point("TOP", 0, -40) frame.Desc1 = frame:CreateFontString(nil, "OVERLAY") - frame.Desc1:SetFont(SuperVillain.Media.font.roboto, 14, "OUTLINE") + frame.Desc1:SetFont(SV.Media.font.roboto, 14, "OUTLINE") frame.Desc1:Point("TOPLEFT", 20, -75) frame.Desc1:Width(frame:GetWidth()-40) frame.Desc2 = frame:CreateFontString(nil, "OVERLAY") - frame.Desc2:SetFont(SuperVillain.Media.font.roboto, 14, "OUTLINE") + frame.Desc2:SetFont(SV.Media.font.roboto, 14, "OUTLINE") frame.Desc2:Point("TOPLEFT", 20, -125) frame.Desc2:Width(frame:GetWidth()-40) frame.Desc3 = frame:CreateFontString(nil, "OVERLAY") - frame.Desc3:SetFont(SuperVillain.Media.font.roboto, 14, "OUTLINE") + frame.Desc3:SetFont(SV.Media.font.roboto, 14, "OUTLINE") frame.Desc3:Point("TOPLEFT", 20, -175) frame.Desc3:Width(frame:GetWidth()-40) local closeButton = CreateFrame("Button", "SVUI_InstallCloseButton", frame, "UIPanelCloseButton") @@ -1270,6 +1270,6 @@ function SuperVillain:Install(autoLoaded) if(not autoLoaded) then PlayThemeSong() else - SuperVillain:ExecuteTimer(PlayThemeSong, 5) + SV:ExecuteTimer(PlayThemeSong, 5) end end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/load.lua b/Interface/AddOns/SVUI/system/load.lua new file mode 100644 index 0000000..067dd6c --- /dev/null +++ b/Interface/AddOns/SVUI/system/load.lua @@ -0,0 +1,317 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +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 tonumber = _G.tonumber; +local tinsert = _G.tinsert; +local string = _G.string; +local table = _G.table; +--[[ STRING METHODS ]]-- +local format, match = string.format, string.match; +--[[ TABLE METHODS ]]-- +local tcopy = table.copy; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV, L, Registry = unpack(select(2, ...)) +--[[ +########################################################## +LOCALS +########################################################## +]]-- +local NewHook = hooksecurefunc; +--[[ +########################################################## +SYSTEM UPDATES +########################################################## +]]-- +local function DeleteOldSavedVars() + --[[ BEGIN DEPRECATED ]]-- + if SVUI_DATA then SVUI_DATA = nil end + if SVUI_SAFE_DATA then SVUI_SAFE_DATA = nil end + if SVUI_TRACKER then SVUI_TRACKER = nil end + if SVUI_ENEMIES then SVUI_ENEMIES = nil end + if SVUI_JOURNAL then SVUI_JOURNAL = nil end + if SVUI_CHARACTER_LOG then SVUI_CHARACTER_LOG = nil end + if SVUI_MOVED_FRAMES then SVUI_MOVED_FRAMES = nil end + if SVUI_SystemData then SVUI_SystemData = nil end + if SVUI_ProfileData then SVUI_ProfileData = nil end + if SVUI_Filters then SVUI_Filters = nil end + if SVUI_AuraFilters then SVUI_AuraFilters = nil end + if SVUI_AuraWatch then SVUI_AuraWatch = nil end + if SVUI_Cache["Mentalo"]["Blizzard"] then SVUI_Cache["Mentalo"]["Blizzard"] = nil end + if SVUI_Cache["Mentalo"]["UI"] then SVUI_Cache["Mentalo"]["UI"] = nil end + if(SVUI_Profile.SAFEDATA.install_complete) then SVUI_Profile.SAFEDATA.install_complete = nil end + --[[ END DEPRECATED ]]-- +end + +function SV:VersionCheck() + local minimumVersion = 4.06; + local installedVersion = SVUI_Profile.SAFEDATA.install_version + if(installedVersion) then + if(type(installedVersion) == "string") then + installedVersion = tonumber(SVUI_Profile.SAFEDATA.install_version) + end + if(type(installedVersion) == "number" and installedVersion < minimumVersion) then + DeleteOldSavedVars() + self:Install(true) + end + else + DeleteOldSavedVars() + self:Install(true) + end +end + +function SV:RefreshEverything(bypass) + self:RefreshAllSystemMedia(); + + SV.UIParent:Hide(); + + self:SetSVMovablesPositions(); + Registry:Update('SVUnit'); + Registry:UpdateAll(); + + SV.UIParent:Show(); + + if not bypass then + self:VersionCheck() + end +end +--[[ +########################################################## +SVUI LOAD PROCESS +########################################################## +]]-- +local function PrepareStorage() + if(not SVUI_Profile) then return end + SVUI_Profile.STORED = {} + local old = SVUI_Profile.SAFEDATA + local media = old.mediastyle or "" + local bars = old.barstyle or "" + local units = old.unitstyle or "" + local groups = old.groupstyle or "" + local auras = old.aurastyle or "" + local spec = GetSpecialization() or 1 + SVUI_Profile.STORED[1] = tcopy(SVUI_Profile, true) + SVUI_Profile.STORED[1].LAYOUT = { + mediastyle = media, + barstyle = bars, + unitstyle = units, + groupstyle = groups, + aurastyle = auras + } + SVUI_Profile.SAFEDATA.mediastyle = nil + SVUI_Profile.SAFEDATA.barstyle = nil + SVUI_Profile.SAFEDATA.unitstyle = nil + SVUI_Profile.SAFEDATA.groupstyle = nil + SVUI_Profile.SAFEDATA.aurastyle = nil + SVUI_Profile.SAFEDATA.dualSpecEnabled = false +end + +function SV:Load() + self:ClearAllTimers() + + local rez = GetCVar("gxResolution"); + local gxHeight = tonumber(match(rez,"%d+x(%d+)")); + local gxWidth = tonumber(match(rez,"(%d+)x%d+")); + + if not SVUI_Global then SVUI_Global = {} end + if not SVUI_Global["profiles"] then SVUI_Global["profiles"] = {} end + if SVUI_Global["gold"] then SVUI_Global["gold"] = nil end + if SVUI_Global["profileKeys"] then SVUI_Global["profileKeys"] = nil end + + if not SVUI_Profile then SVUI_Profile = {} end + if not SVUI_Profile.SAFEDATA then SVUI_Profile.SAFEDATA = {dualSpecEnabled = false} end + if not SVUI_Profile.STORED then PrepareStorage() end + if not SVUI_Profile.STORED[2] then + SVUI_Profile.STORED[2] = {} + SVUI_Profile.STORED[2].LAYOUT = SVUI_Profile.STORED[1].LAYOUT + end + if not SVUI_Profile.STORED[3] then + SVUI_Profile.STORED[3] = {} + SVUI_Profile.STORED[3].LAYOUT = SVUI_Profile.STORED[1].LAYOUT + end + for k,v in pairs(SVUI_Profile) do + if(k ~= "STORED" and k ~= "SAFEDATA") then + SVUI_Profile[k] = nil + end + end + + if not SVUI_Cache then SVUI_Cache = {} end + if not SVUI_Cache["Dock"] then SVUI_Cache["Dock"] = {} end + if not SVUI_Cache["Mentalo"] then SVUI_Cache["Mentalo"] = {} end + if not SVUI_Cache["Bindings"] then SVUI_Cache["Bindings"] = {} end + if(not SVUI_Cache["screenheight"] or (SVUI_Cache["screenheight"] and type(SVUI_Cache["screenheight"]) ~= "number")) then + SVUI_Cache["screenheight"] = gxHeight + end + if(not SVUI_Cache["screenwidth"] or (SVUI_Cache["screenwidth"] and type(SVUI_Cache["screenwidth"]) ~= "number")) then + SVUI_Cache["screenwidth"] = gxWidth + end + + self:SetDatabaseObjects(true) + Registry:FindAddons() + + self:ScreenCalibration(); + self:RefreshSystemFonts(); + self:LoadSystemAlerts(); + + self.UIParent:RegisterEvent('PLAYER_REGEN_DISABLED'); + self.AddonLoaded = true +end + +function SV:Launch() + self:SetDatabaseObjects(); + self:ScreenCalibration("PLAYER_LOGIN"); + Registry:LoadRegisteredAddons(); + self:UpdateDatabase(true); + Registry:LoadPackages(); + self:DefinePlayerRole(); + self:LoadMovables(); + self:SetSVMovablesPositions(); + + self:VersionCheck() + + self:RefreshAllSystemMedia(); + + NewHook("StaticPopup_Show", self.StaticPopup_Show) + + self.UIParent:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); + self.UIParent:RegisterEvent("PLAYER_TALENT_UPDATE"); + self.UIParent:RegisterEvent("CHARACTER_POINTS_CHANGED"); + self.UIParent:RegisterEvent("UNIT_INVENTORY_CHANGED"); + self.UIParent:RegisterEvent("UPDATE_BONUS_ACTIONBAR"); + self.UIParent:RegisterEvent("UI_SCALE_CHANGED"); + self.UIParent:RegisterEvent("PLAYER_ENTERING_WORLD"); + self.UIParent:RegisterEvent("PET_BATTLE_CLOSE"); + self.UIParent:RegisterEvent("PET_BATTLE_OPENING_START"); + self.UIParent:RegisterEvent("ADDON_ACTION_BLOCKED"); + self.UIParent:RegisterEvent("ADDON_ACTION_FORBIDDEN"); + self.UIParent:RegisterEvent("SPELLS_CHANGED"); + + Registry:Update("SVMap"); + Registry:Update("SVUnit", true); + collectgarbage("collect") + + _G["SVUI_Mentalo"]:SetFixedPanelTemplate("Component") + _G["SVUI_Mentalo"]:SetPanelColor("yellow") + _G["SVUI_MentaloPrecision"]:SetPanelTemplate("Transparent") + + if self.db.system.loginmessage then + local logMsg = (L["LOGIN_MSG"]):format("|cffFFFF1A", "|cffAA78FF", self.___version) + self:AddonMessage(logMsg); + end + + self.AddonLaunched = true +end +--[[ +########################################################## +EVENT HANDLERS +########################################################## +]]-- +local PlayerClass = select(2,UnitClass("player")); +local droodSpell1, droodSpell2 = GetSpellInfo(110309), GetSpellInfo(4987); + +local SVUISystem_OnEvent = function(self, event, arg, ...) + if(event == "ADDON_LOADED" and arg == "SVUI") then + if(not SV.AddonLoaded) then + SV:Load() + self:UnregisterEvent("ADDON_LOADED") + end + end + if(event == "PLAYER_LOGIN") then + if(not SV.AddonLaunched and IsLoggedIn()) then + SV:Launch() + self:UnregisterEvent("PLAYER_LOGIN") + end + end + if(event == "ACTIVE_TALENT_GROUP_CHANGED" or event == "PLAYER_TALENT_UPDATE" or event == "CHARACTER_POINTS_CHANGED" or event == "UNIT_INVENTORY_CHANGED" or event == "UPDATE_BONUS_ACTIONBAR") then + SV:DefinePlayerRole() + elseif(event == "UI_SCALE_CHANGED") then + SV:ScreenCalibration("UI_SCALE_CHANGED") + elseif(event == "PLAYER_ENTERING_WORLD") then + if(not SV.RoleIsSet) then + SV:DefinePlayerRole() + end + if(not SV.MediaInitialized) then + SV:RefreshAllSystemMedia() + end + local a,b = IsInInstance() + if(b == "pvp") then + SV.BGTimer = SV:ExecuteLoop(RequestBattlefieldScoreData, 5) + elseif(SV.BGTimer) then + SV:RemoveLoop(SV.BGTimer) + SV.BGTimer = nil + end + elseif(event == "SPELLS_CHANGED") then + if (PlayerClass ~= "DRUID") then + self:UnregisterEvent("SPELLS_CHANGED") + return + end + if GetSpellInfo(droodSpell1) == droodSpell2 then + SV.Dispellable["Disease"] = true + elseif(SV.Dispellable["Disease"]) then + SV.Dispellable["Disease"] = nil + end + elseif(event == "PET_BATTLE_CLOSE") then + SV:PushDisplayAudit() + elseif(event == "PET_BATTLE_OPENING_START") then + SV:FlushDisplayAudit() + elseif(event == "ADDON_ACTION_BLOCKED" or event == "ADDON_ACTION_FORBIDDEN") then + SV:TaintHandler(arg, ...) + elseif(event == "PLAYER_REGEN_DISABLED") then + local forceClosed = false; + if IsAddOnLoaded("SVUI_ConfigOMatic") then + local aceConfig=LibStub("AceConfigDialog-3.0") + if aceConfig.OpenFrames["SVUI"] then + self:RegisterEvent('PLAYER_REGEN_ENABLED') + aceConfig:Close("SVUI") + forceClosed = true + end + end + if SV.MentaloFrames then + for frame,_ in pairs(SV.MentaloFrames) do + if _G[frame] and _G[frame]:IsShown() then + forceClosed = true; + _G[frame]:Hide() + end + end + end + if(HenchmenFrameModel and HenchmenFrame and HenchmenFrame:IsShown()) then + HenchmenFrame:Hide() + HenchmenFrameBG:Hide() + forceClosed = true; + end + if forceClosed == true then + SendAddonMessage(ERR_NOT_IN_COMBAT) + end + elseif(event == "PLAYER_REGEN_ENABLED") then + SV:ToggleConfig() + self:UnregisterEvent('PLAYER_REGEN_ENABLED') + end +end + +SV.UIParent:RegisterEvent("ADDON_LOADED") +SV.UIParent:RegisterEvent("PLAYER_LOGIN") +SV.UIParent:SetScript("OnEvent", SVUISystem_OnEvent) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/media.lua b/Interface/AddOns/SVUI/system/media.lua new file mode 100644 index 0000000..387109c --- /dev/null +++ b/Interface/AddOns/SVUI/system/media.lua @@ -0,0 +1,433 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local select = _G.select; +local pairs = _G.pairs; +local ipairs = _G.ipairs; +local type = _G.type; +local string = _G.string; +local math = _G.math; +local table = _G.table; +local GetTime = _G.GetTime; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ MATH METHODS ]]-- +local floor, modf = math.floor, math.modf; +--[[ TABLE METHODS ]]-- +local twipe, tsort = table.wipe, table.sort; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV, L, Registry = unpack(select(2, ...)) +--[[ +########################################################## +LOCALIZED GLOBALS +########################################################## +]]-- +local STANDARD_TEXT_FONT = _G.STANDARD_TEXT_FONT +local UNIT_NAME_FONT = _G.UNIT_NAME_FONT +local DAMAGE_TEXT_FONT = _G.DAMAGE_TEXT_FONT +local SVUI_CLASS_COLORS = _G.SVUI_CLASS_COLORS +local RAID_CLASS_COLORS = _G.RAID_CLASS_COLORS +--[[ +########################################################## +PRE VARS/FUNCTIONS +########################################################## +]]-- +local function SetFont(fontObject, font, fontSize, fontOutline, fontAlpha, color, shadowColor, offsetX, offsetY) + if not font then return end + fontObject:SetFont(font,fontSize,fontOutline); + if fontAlpha then + fontObject:SetAlpha(fontAlpha) + end + if color and type(color) == "table" then + fontObject:SetTextColor(unpack(color)) + end + if shadowColor and type(shadowColor) == "table" then + fontObject:SetShadowColor(unpack(shadowColor)) + end + if offsetX and offsetY then + fontObject:SetShadowOffset(offsetX,offsetY) + end +end +--[[ +########################################################## +DEFINE SHARED MEDIA +########################################################## +]]-- +SV.Shared = LibStub("LibSharedMedia-3.0") + +SV.Shared:Register("background","SVUI Backdrop 1",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN1]]) +SV.Shared:Register("background","SVUI Backdrop 2",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN2]]) +SV.Shared:Register("background","SVUI Backdrop 3",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN3]]) +SV.Shared:Register("background","SVUI Backdrop 4",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN4]]) +SV.Shared:Register("background","SVUI Backdrop 5",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\PATTERN5]]) +SV.Shared:Register("background","SVUI Comic 1",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC1]]) +SV.Shared:Register("background","SVUI Comic 2",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC2]]) +SV.Shared:Register("background","SVUI Comic 3",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC3]]) +SV.Shared:Register("background","SVUI Comic 4",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC4]]) +SV.Shared:Register("background","SVUI Comic 5",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC5]]) +SV.Shared:Register("background","SVUI Comic 6",[[Interface\AddOns\SVUI\assets\artwork\Template\Background\COMIC6]]) +SV.Shared:Register("background","SVUI Unit BG 1",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-BG1]]) +SV.Shared:Register("background","SVUI Unit BG 2",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-BG2]]) +SV.Shared:Register("background","SVUI Unit BG 3",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-BG3]]) +SV.Shared:Register("background","SVUI Unit BG 4",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-BG4]]) +SV.Shared:Register("background","SVUI Small BG 1",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-SMALL-BG1]]) +SV.Shared:Register("background","SVUI Small BG 2",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-SMALL-BG2]]) +SV.Shared:Register("background","SVUI Small BG 3",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-SMALL-BG3]]) +SV.Shared:Register("background","SVUI Small BG 4",[[Interface\AddOns\SVUI\assets\artwork\Unitframe\Background\UNIT-SMALL-BG4]]) +SV.Shared:Register("statusbar","SVUI BasicBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) +SV.Shared:Register("statusbar","SVUI MultiColorBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\GRADIENT]]) +SV.Shared:Register("statusbar","SVUI SmoothBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\SMOOTH]]) +SV.Shared:Register("statusbar","SVUI PlainBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\FLAT]]) +SV.Shared:Register("statusbar","SVUI FancyBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\TEXTURED]]) +SV.Shared:Register("statusbar","SVUI GlossBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\GLOSS]]) +SV.Shared:Register("statusbar","SVUI GlowBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\GLOWING]]) +SV.Shared:Register("statusbar","SVUI LazerBar",[[Interface\AddOns\SVUI\assets\artwork\Bars\LAZER]]) +SV.Shared:Register("sound", "Whisper Alert", [[Interface\AddOns\SVUI\assets\sounds\whisper.mp3]]) +SV.Shared:Register("sound", "Toasty", [[Interface\AddOns\SVUI\assets\sounds\toasty.mp3]]) +SV.Shared:Register("font","SVUI Default Font",[[Interface\AddOns\SVUI\assets\fonts\Default.ttf]]) +SV.Shared:Register("font","SVUI System Font",[[Interface\AddOns\SVUI\assets\fonts\System.ttf]]) +SV.Shared:Register("font","SVUI Dialog Font",[[Interface\AddOns\SVUI\assets\fonts\Dialog.ttf]]) +SV.Shared:Register("font","SVUI Narrator Font",[[Interface\AddOns\SVUI\assets\fonts\Narrative.ttf]]) +SV.Shared:Register("font","SVUI Number Font",[[Interface\AddOns\SVUI\assets\fonts\Numbers.ttf]]) +SV.Shared:Register("font","SVUI Combat Font",[[Interface\AddOns\SVUI\assets\fonts\Combat.ttf]]) +SV.Shared:Register("font","SVUI Action Font",[[Interface\AddOns\SVUI\assets\fonts\Action.ttf]]) +SV.Shared:Register("font","SVUI Name Font",[[Interface\AddOns\SVUI\assets\fonts\Names.ttf]]) +SV.Shared:Register("font","SVUI Alert Font",[[Interface\AddOns\SVUI\assets\fonts\Alert.ttf]]) +SV.Shared:Register("font","SVUI Pixel Font",[[Interface\AddOns\SVUI\assets\fonts\Pixel.ttf]],SV.Shared.LOCALE_BIT_ruRU+SV.Shared.LOCALE_BIT_western) +SV.Shared:Register("font","Roboto",[[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]],SV.Shared.LOCALE_BIT_ruRU+SV.Shared.LOCALE_BIT_western) +--[[ +########################################################## +POPULATE MEDIA TABLE +########################################################## +]]-- +do + local myclass = select(2,UnitClass("player")) + local cColor1 = SVUI_CLASS_COLORS[myclass] + local cColor2 = RAID_CLASS_COLORS[myclass] + local r1,g1,b1 = cColor1.r,cColor1.g,cColor1.b + local r2,g2,b2 = cColor2.r*.25, cColor2.g*.25, cColor2.b*.25 + local ir1,ig1,ib1 = (1 - r1), (1 - g1), (1 - b1) + local ir2,ig2,ib2 = (1 - cColor2.r)*.25, (1 - cColor2.g)*.25, (1 - cColor2.b)*.25 + local Shared = SV.Shared + + SV.Media["color"] = { + ["default"] = {0.2, 0.2, 0.2, 1}, + ["special"] = {.37, .32, .29, 1}, + ["unique"] = {0.32, 0.258, 0.21, 1}, + ["class"] = {r1, g1, b1, 1}, + ["bizzaro"] = {ir1, ig1, ib1, 1}, + ["dark"] = {0, 0, 0, 1}, + ["light"] = {0.95, 0.95, 0.95, 1}, + ["highlight"] = {0.1, 0.8, 0.8, 1}, + ["green"] = {0.25, 0.9, 0.08, 1}, + ["red"] = {0.9, 0.08, 0.08, 1}, + ["yellow"] = {1, 1, 0, 1}, + ["transparent"] = {0, 0, 0, 0.5}, + } + + SV.Media["font"] = { + ["default"] = Shared:Fetch("font", "SVUI Default Font"), + ["system"] = Shared:Fetch("font", "SVUI System Font"), + ["combat"] = Shared:Fetch("font", "SVUI Combat Font"), + ["dialog"] = Shared:Fetch("font", "SVUI Dialog Font"), + ["narrator"] = Shared:Fetch("font", "SVUI Narrator Font"), + ["action"] = Shared:Fetch("font", "SVUI Action Font"), + ["names"] = Shared:Fetch("font", "SVUI Name Font"), + ["alert"] = Shared:Fetch("font", "SVUI Alert Font"), + ["numbers"] = Shared:Fetch("font", "SVUI Number Font"), + ["pixel"] = Shared:Fetch("font", "SVUI Pixel Font"), + ["roboto"] = Shared:Fetch("font", "Roboto") + } + + SV.Media["bar"] = { + ["default"] = Shared:Fetch("statusbar", "SVUI BasicBar"), + ["gradient"] = Shared:Fetch("statusbar", "SVUI MultiColorBar"), + ["smooth"] = Shared:Fetch("statusbar", "SVUI SmoothBar"), + ["flat"] = Shared:Fetch("statusbar", "SVUI PlainBar"), + ["textured"] = Shared:Fetch("statusbar", "SVUI FancyBar"), + ["gloss"] = Shared:Fetch("statusbar", "SVUI GlossBar"), + ["glow"] = Shared:Fetch("statusbar", "SVUI GlowBar"), + ["lazer"] = Shared:Fetch("statusbar", "SVUI LazerBar"), + } + + SV.Media["bg"] = { + ["pattern"] = Shared:Fetch("background", "SVUI Backdrop 1"), + ["comic"] = Shared:Fetch("background", "SVUI Comic 1"), + ["unitlarge"] = Shared:Fetch("background", "SVUI Unit BG 3"), + ["unitsmall"] = Shared:Fetch("background", "SVUI Small BG 3") + } + + SV.Media["gradient"] = { + ["default"] = {"VERTICAL", 0.08, 0.08, 0.08, 0.22, 0.22, 0.22}, + ["special"] = {"VERTICAL", 0.33, 0.25, 0.13, 0.47, 0.39, 0.27}, + ["class"] = {"VERTICAL", r2, g2, b2, r1, g1, b1}, + ["bizzaro"] = {"VERTICAL", ir2, ig2, ib2, ir1, ig1, ib1}, + ["dark"] = {"VERTICAL", 0.02, 0.02, 0.02, 0.22, 0.22, 0.22}, + ["darkest"] = {"VERTICAL", 0.15, 0.15, 0.15, 0, 0, 0}, + ["darkest2"] = {"VERTICAL", 0, 0, 0, 0.12, 0.12, 0.12}, + ["light"] = {"VERTICAL", 0.65, 0.65, 0.65, 0.95, 0.95, 0.95}, + ["highlight"] = {"VERTICAL", 0.1, 0.8, 0.8, 0.2, 0.5, 1}, + ["green"] = {"VERTICAL", 0.08, 0.5, 0, 0.25, 0.9, 0.08}, + ["red"] = {"VERTICAL", 0.5, 0, 0, 0.9, 0.08, 0.08}, + ["yellow"] = {"VERTICAL", 1, 0.3, 0, 1, 1, 0}, + ["inverse"] = {"VERTICAL", 0.25, 0.25, 0.25, 0.12, 0.12, 0.12}, + ["icon"] = {"VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1} + } +end +--[[ +########################################################## +CORE FUNCTIONS +########################################################## +]]-- +function SV:ColorGradient(perc, ...) + if perc >= 1 then + return select(select('#', ...) - 2, ...) + elseif perc <= 0 then + return ... + end + local num = select('#', ...) / 3 + local segment, relperc = modf(perc*(num-1)) + local r1, g1, b1, r2, g2, b2 = select((segment*3)+1, ...) + return r1 + (r2-r1)*relperc, g1 + (g2-g1)*relperc, b1 + (b2-b1)*relperc +end + +function SV:HexColor(arg1,arg2,arg3) + local r,g,b; + if arg1 and type(arg1) == "string" then + local t + if(self.Media or self.db.media) then + t = self.Media.color[arg1] or self.db.media.unitframes[arg1] + else + t = self.Configs.media.colors[arg1] or self.Configs.media.unitframes[arg1] + end + if t then + r,g,b = t[1],t[2],t[3] + else + r,g,b = 0,0,0 + end + else + r = type(arg1) == "number" and arg1 or 0; + g = type(arg2) == "number" and arg2 or 0; + b = type(arg3) == "number" and arg3 or 0; + end + r = (r < 0 or r > 1) and 0 or (r * 255) + g = (g < 0 or g > 1) and 0 or (g * 255) + b = (b < 0 or b > 1) and 0 or (b * 255) + local hexString = ("%02x%02x%02x"):format(r,g,b) + return hexString +end + +function SV:MediaUpdate() + self.Media.color.default = self.db.media.colors.default + self.Media.color.special = self.db.media.colors.special + self.Media.bg.pattern = self.Shared:Fetch("background", self.db.media.textures.pattern) + self.Media.bg.comic = self.Shared:Fetch("background", self.db.media.textures.comic) + self.Media.bg.unitlarge = self.Shared:Fetch("background", self.db.media.textures.unitlarge) + self.Media.bg.unitsmall = self.Shared:Fetch("background", self.db.media.textures.unitsmall) + + local cColor1 = self.Media.color.special + local cColor2 = self.Media.color.default + local r1,g1,b1 = cColor1[1], cColor1[2], cColor1[3] + local r2,g2,b2 = cColor2[1], cColor2[2], cColor2[3] + + self.Media.gradient.special = {"VERTICAL",r1,g1,b1,r2,g2,b2} + + Registry:RunCallbacks() +end + +function SV:RefreshSystemFonts() + local fontsize = self.db.media.fonts.size + local unicodesize = self.db.media.fonts.unicodeSize + + local NUMBER_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.number); + local GIANT_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.giant); + STANDARD_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.default); + UNIT_NAME_FONT = self.Shared:Fetch("font", self.db.media.fonts.name); + DAMAGE_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.combat); + NAMEPLATE_FONT = STANDARD_TEXT_FONT + CHAT_FONT_HEIGHTS = {8,9,10,11,12,13,14,15,16,17,18,19,20} + UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = fontsize + + -- SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32) + -- SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE") + -- SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE") + + SetFont(QuestFont_Large, UNIT_NAME_FONT, fontsize+4) + SetFont(ZoneTextString, UNIT_NAME_FONT, fontsize*4.2, "OUTLINE") + SetFont(SubZoneTextString, UNIT_NAME_FONT, fontsize*3.2, "OUTLINE") + SetFont(PVPInfoTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE") + SetFont(PVPArenaTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE") + SetFont(SystemFont_Shadow_Outline_Huge2, UNIT_NAME_FONT, fontsize*1.8, "OUTLINE") + + SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER_TEXT_FONT, fontsize, "OUTLINE") + SetFont(NumberFont_Outline_Huge, NUMBER_TEXT_FONT, fontsize*2, "THICKOUTLINE", 28) + SetFont(NumberFont_Outline_Large, NUMBER_TEXT_FONT, fontsize+4, "OUTLINE") + SetFont(NumberFont_Outline_Med, NUMBER_TEXT_FONT, fontsize+2, "OUTLINE") + SetFont(NumberFontNormal, NUMBER_TEXT_FONT, fontsize, "OUTLINE") + + SetFont(GameFontHighlight, STANDARD_TEXT_FONT, fontsize) + SetFont(GameFontWhite, STANDARD_TEXT_FONT, fontsize, 'OUTLINE', 1, {1,1,1}) + SetFont(GameFontWhiteSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {1,1,1}) + SetFont(GameFontBlack, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0}) + SetFont(GameFontBlackSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0}) + SetFont(GameFontNormal, STANDARD_TEXT_FONT, fontsize) + SetFont(QuestFont, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Large, STANDARD_TEXT_FONT, fontsize+2) + SetFont(GameFontNormalMed3, STANDARD_TEXT_FONT, fontsize+1) + SetFont(SystemFont_Med1, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Med3, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Outline_Small, STANDARD_TEXT_FONT, fontsize, "OUTLINE") + SetFont(SystemFont_Shadow_Large, STANDARD_TEXT_FONT, fontsize+2) + SetFont(SystemFont_Shadow_Med1, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Shadow_Med3, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Shadow_Small, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Small, STANDARD_TEXT_FONT, fontsize) + SetFont(FriendsFont_Normal, STANDARD_TEXT_FONT, fontsize) + SetFont(FriendsFont_Small, STANDARD_TEXT_FONT, fontsize-2) + SetFont(FriendsFont_Large, STANDARD_TEXT_FONT, fontsize) + SetFont(FriendsFont_UserText, STANDARD_TEXT_FONT, fontsize) + + SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32) + SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, 200, "OUTLINE") + SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, 200, "THICKOUTLINE") + + SetFont(SystemFont_Shadow_Huge3, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") + SetFont(CombatTextFont, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") + + local UNICODE_FONT = self.Media.font.roboto; + + SetFont(GameTooltipHeader, UNICODE_FONT, unicodesize+2) + SetFont(Tooltip_Med, UNICODE_FONT, unicodesize) + SetFont(Tooltip_Small, UNICODE_FONT, unicodesize) + SetFont(GameFontNormalSmall, UNICODE_FONT, unicodesize) + SetFont(GameFontHighlightSmall, UNICODE_FONT, unicodesize) + SetFont(NumberFont_Shadow_Med, UNICODE_FONT, unicodesize) + SetFont(NumberFont_Shadow_Small, UNICODE_FONT, unicodesize) + SetFont(SystemFont_Tiny, UNICODE_FONT, unicodesize) + + self:UpdateFontTemplates() +end + +function SV:RefreshAllSystemMedia() + local fontsize = self.db.media.fonts.size + local unicodesize = self.db.media.fonts.unicodeSize + + local NUMBER_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.number); + local GIANT_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.giant); + STANDARD_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.default); + UNIT_NAME_FONT = self.Shared:Fetch("font", self.db.media.fonts.name); + DAMAGE_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.combat); + NAMEPLATE_FONT = STANDARD_TEXT_FONT + CHAT_FONT_HEIGHTS = {8,9,10,11,12,13,14,15,16,17,18,19,20} + UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = fontsize + + -- SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32) + -- SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE") + -- SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE") + + SetFont(QuestFont_Large, UNIT_NAME_FONT, fontsize+4) + SetFont(ZoneTextString, UNIT_NAME_FONT, fontsize*4.2, "OUTLINE") + SetFont(SubZoneTextString, UNIT_NAME_FONT, fontsize*3.2, "OUTLINE") + SetFont(PVPInfoTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE") + SetFont(PVPArenaTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE") + SetFont(SystemFont_Shadow_Outline_Huge2, UNIT_NAME_FONT, fontsize*1.8, "OUTLINE") + + SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER_TEXT_FONT, fontsize, "OUTLINE") + SetFont(NumberFont_Outline_Huge, NUMBER_TEXT_FONT, fontsize*2, "THICKOUTLINE", 28) + SetFont(NumberFont_Outline_Large, NUMBER_TEXT_FONT, fontsize+4, "OUTLINE") + SetFont(NumberFont_Outline_Med, NUMBER_TEXT_FONT, fontsize+2, "OUTLINE") + SetFont(NumberFontNormal, NUMBER_TEXT_FONT, fontsize, "OUTLINE") + + SetFont(GameFontHighlight, STANDARD_TEXT_FONT, fontsize) + SetFont(GameFontWhite, STANDARD_TEXT_FONT, fontsize, 'OUTLINE', 1, {1,1,1}) + SetFont(GameFontWhiteSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {1,1,1}) + SetFont(GameFontBlack, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0}) + SetFont(GameFontBlackSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0}) + SetFont(GameFontNormal, STANDARD_TEXT_FONT, fontsize) + SetFont(QuestFont, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Large, STANDARD_TEXT_FONT, fontsize+2) + SetFont(GameFontNormalMed3, STANDARD_TEXT_FONT, fontsize+1) + SetFont(SystemFont_Med1, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Med3, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Outline_Small, STANDARD_TEXT_FONT, fontsize, "OUTLINE") + SetFont(SystemFont_Shadow_Large, STANDARD_TEXT_FONT, fontsize+2) + SetFont(SystemFont_Shadow_Med1, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Shadow_Med3, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Shadow_Small, STANDARD_TEXT_FONT, fontsize) + SetFont(SystemFont_Small, STANDARD_TEXT_FONT, fontsize) + SetFont(FriendsFont_Normal, STANDARD_TEXT_FONT, fontsize) + SetFont(FriendsFont_Small, STANDARD_TEXT_FONT, fontsize-2) + SetFont(FriendsFont_Large, STANDARD_TEXT_FONT, fontsize) + SetFont(FriendsFont_UserText, STANDARD_TEXT_FONT, fontsize) + + SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32) + SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, 200, "OUTLINE") + SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, 200, "THICKOUTLINE") + + SetFont(SystemFont_Shadow_Huge3, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") + SetFont(CombatTextFont, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") + + local UNICODE_FONT = self.Media.font.roboto; + + SetFont(GameTooltipHeader, UNICODE_FONT, unicodesize+2) + SetFont(Tooltip_Med, UNICODE_FONT, unicodesize) + SetFont(Tooltip_Small, UNICODE_FONT, unicodesize) + SetFont(GameFontNormalSmall, UNICODE_FONT, unicodesize) + SetFont(GameFontHighlightSmall, UNICODE_FONT, unicodesize) + SetFont(NumberFont_Shadow_Med, UNICODE_FONT, unicodesize) + SetFont(NumberFont_Shadow_Small, UNICODE_FONT, unicodesize) + SetFont(SystemFont_Tiny, UNICODE_FONT, unicodesize) + + self:MediaUpdate() + self.MediaInitialized = true +end +--[[ +########################################################## +INIT SOME COMBAT FONTS +########################################################## +]]-- +do + local fontFile = "Interface\\AddOns\\SVUI\\assets\\fonts\\Combat.ttf" + + DAMAGE_TEXT_FONT = fontFile + NUM_COMBAT_TEXT_LINES = 20; + COMBAT_TEXT_SCROLLSPEED = 1.0; + COMBAT_TEXT_FADEOUT_TIME = 1.0; + COMBAT_TEXT_HEIGHT = 18; + COMBAT_TEXT_CRIT_MAXHEIGHT = 2.0; + COMBAT_TEXT_CRIT_MINHEIGHT = 1.2; + COMBAT_TEXT_CRIT_SCALE_TIME = 0.7; + COMBAT_TEXT_CRIT_SHRINKTIME = 0.2; + COMBAT_TEXT_TO_ANIMATE = {}; + COMBAT_TEXT_STAGGER_RANGE = 20; + COMBAT_TEXT_SPACING = 7; + COMBAT_TEXT_MAX_OFFSET = 130; + COMBAT_TEXT_LOW_HEALTH_THRESHOLD = 0.2; + COMBAT_TEXT_LOW_MANA_THRESHOLD = 0.2; + COMBAT_TEXT_LOCATIONS = {}; + + local fName, fHeight, fFlags = CombatTextFont:GetFont() + + CombatTextFont:SetFont(fontFile, 24, fFlags) +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/mentalo.lua b/Interface/AddOns/SVUI/system/mentalo.lua index e5c4575..3025ac0 100644 --- a/Interface/AddOns/SVUI/system/mentalo.lua +++ b/Interface/AddOns/SVUI/system/mentalo.lua @@ -33,8 +33,8 @@ local parsefloat = math.parsefloat; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -SuperVillain.MentaloFrames = {} +local SV, L = unpack(select(2, ...)); +SV.MentaloFrames = {} local Sticky = {}; Sticky.scripts = Sticky.scripts or {} Sticky.rangeX = 15 @@ -230,7 +230,7 @@ local DraggableFrames = { -- local MentaloUIFrames = { -- "ArcheologyDigsiteProgressBar", -- }; -local theHand = CreateFrame("Frame", "SVUI_HandOfMentalo", SuperVillain.UIParent) +local theHand = CreateFrame("Frame", "SVUI_HandOfMentalo", SV.UIParent) theHand:SetFrameStrata("DIALOG") theHand:SetFrameLevel(99) theHand:SetClampedToScreen(true) @@ -242,7 +242,7 @@ theHand.bg:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-HAN theHand.energy = theHand:CreateTexture(nil, "OVERLAY") theHand.energy:SetAllPoints(theHand) theHand.energy:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-ENERGY]]) -SuperVillain.Animate:Orbit(theHand.energy, 10) +SV.Animate:Orbit(theHand.energy, 10) theHand.flash = theHand.energy.anim; theHand.energy:Hide() theHand.elapsedTime = 0; @@ -296,8 +296,8 @@ local TheHand_OnUpdate = function(self, elapsed) if self.elapsedTime > 0.1 then self.elapsedTime = 0 local x, y = GetCursorPosition() - local scale = SuperVillain.UIParent:GetEffectiveScale() - self:SetPoint("CENTER", SuperVillain.UIParent, "BOTTOMLEFT", (x / scale) + 50, (y / scale) + 50) + local scale = SV.UIParent:GetEffectiveScale() + self:SetPoint("CENTER", SV.UIParent, "BOTTOMLEFT", (x / scale) + 50, (y / scale) + 50) end end @@ -377,7 +377,7 @@ local function MakeMovable(frame) end local function GrabUsableRegions(frame) - local parent = frame or SuperVillain.UIParent + local parent = frame or SV.UIParent local right = parent:GetRight() local top = parent:GetTop() local center = parent:GetCenter() @@ -410,9 +410,9 @@ end local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) if(not frame) then return end - if SuperVillain.MentaloFrames[moveName].Created then return end + if SV.MentaloFrames[moveName].Created then return end if raised == nil then raised = true end - local movable = CreateFrame("Button", moveName, SuperVillain.UIParent) + local movable = CreateFrame("Button", moveName, SV.UIParent) movable:SetFrameLevel(frame:GetFrameLevel() + 1) movable:SetClampedToScreen(true) movable:SetWidth(frame:GetWidth()) @@ -423,21 +423,21 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) movable.postdrag = dragStopFunc; movable.overlay = raised; movable.snapOffset = snap or -2; - SuperVillain.MentaloFrames[moveName].Avatar = movable; - SuperVillain["Snap"][#SuperVillain["Snap"] + 1] = movable; + SV.MentaloFrames[moveName].Avatar = movable; + SV["Snap"][#SV["Snap"] + 1] = movable; if raised == true then movable:SetFrameStrata("DIALOG") else movable:SetFrameStrata("BACKGROUND") end local anchor1, anchorParent, anchor2, xPos, yPos = split("\031", FindLoc(frame)) - if SuperVillain.db.framelocations and SuperVillain.db.framelocations[moveName] then - if type(SuperVillain.db.framelocations[moveName]) == "table"then - movable:SetPoint(SuperVillain.db.framelocations[moveName]["p"], SuperVillain.UIParent, SuperVillain.db.framelocations[moveName]["p2"], SuperVillain.db.framelocations[moveName]["p3"], SuperVillain.db.framelocations[moveName]["p4"]) - SuperVillain.db.framelocations[moveName] = FindLoc(movable) + if SV.db.framelocations and SV.db.framelocations[moveName] then + if type(SV.db.framelocations[moveName]) == "table"then + movable:SetPoint(SV.db.framelocations[moveName]["p"], SV.UIParent, SV.db.framelocations[moveName]["p2"], SV.db.framelocations[moveName]["p3"], SV.db.framelocations[moveName]["p4"]) + SV.db.framelocations[moveName] = FindLoc(movable) movable:ClearAllPoints() end - anchor1, anchorParent, anchor2, xPos, yPos = split("\031", SuperVillain.db.framelocations[moveName]) + anchor1, anchorParent, anchor2, xPos, yPos = split("\031", SV.db.framelocations[moveName]) movable:SetPoint(anchor1, anchorParent, anchor2, xPos, yPos) else movable:SetPoint(anchor1, anchorParent, anchor2, xPos, yPos) @@ -446,9 +446,9 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) movable:SetAlpha(0.4) movable:RegisterForDrag("LeftButton", "RightButton") movable:SetScript("OnDragStart", function(this) - if InCombatLockdown()then SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT)return end - if SuperVillain.db["system"].stickyFrames then - Sticky:StartMoving(this, SuperVillain["Snap"], movable.snapOffset, movable.snapOffset, movable.snapOffset, movable.snapOffset) + if InCombatLockdown()then SV:AddonMessage(ERR_NOT_IN_COMBAT)return end + if SV.db["system"].stickyFrames then + Sticky:StartMoving(this, SV["Snap"], movable.snapOffset, movable.snapOffset, movable.snapOffset, movable.snapOffset) else this:StartMoving() end @@ -457,11 +457,11 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) EnableTheHand() userHolding = true end) - movable:SetScript("OnMouseUp", SuperVillain.MovableFocused) + movable:SetScript("OnMouseUp", SV.MovableFocused) movable:SetScript("OnDragStop", function(this) - if InCombatLockdown()then SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT)return end + if InCombatLockdown()then SV:AddonMessage(ERR_NOT_IN_COMBAT)return end userHolding = false; - if SuperVillain.db["system"].stickyFrames then + if SV.db["system"].stickyFrames then Sticky:StopMoving(this) else this:StopMovingOrSizing() @@ -490,10 +490,10 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) this.parent:Point(this.positionOverride, this, this.positionOverride) end this:ClearAllPoints() - this:Point(newAnchor, SuperVillain.UIParent, newAnchor, cX, cY) - SuperVillain:SaveMovableLoc(moveName) + this:Point(newAnchor, SV.UIParent, newAnchor, cX, cY) + SV:SaveMovableLoc(moveName) if SVUI_MentaloPrecision then - SuperVillain:MentaloFocusUpdate(this) + SV:MentaloFocusUpdate(this) end UpdateFrameTarget = nil; _G["SVUI_MentaloEventHandler"]:Hide() @@ -514,7 +514,7 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) u:SetJustifyH("CENTER") u:SetPoint("CENTER") u:SetText(title or moveName) - u:SetTextColor(unpack(SuperVillain.Media.color.highlight)) + u:SetTextColor(unpack(SV.Media.color.highlight)) movable:SetFontString(u) movable.text = u; @@ -529,14 +529,14 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) theHand:Show() if CurrentFrameTarget ~= this then SVUI_MentaloPrecision:Hide() - SuperVillain.MovableFocused(this) + SV.MovableFocused(this) end end) movable:SetScript("OnMouseDown", function(this, arg) if arg == "RightButton"then userHolding = false; SVUI_MentaloPrecision:Show() - if SuperVillain.db["system"].stickyFrames then + if SV.db["system"].stickyFrames then Sticky:StopMoving(this) else this:StopMovingOrSizing() @@ -546,11 +546,11 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) movable:SetScript("OnLeave", function(this) if userHolding then return end this:SetAlpha(0.4) - this.text:SetTextColor(unpack(SuperVillain.Media.color.highlight)) + this.text:SetTextColor(unpack(SV.Media.color.highlight)) SVUI_Mentalo.Avatar:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\MENTALO-OFF]]) theHand:Hide() end) - movable:SetScript("OnShow", function(this)this:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight))end) + movable:SetScript("OnShow", function(this)this:SetBackdropBorderColor(unpack(SV.Media.color.highlight))end) movable:SetMovable(true) movable:Hide() if dragStopFunc ~= nil and type(dragStopFunc) == "function"then @@ -560,78 +560,78 @@ local function SetSVMovable(frame, moveName, title, raised, snap, dragStopFunc) this:UnregisterAllEvents() end) end - SuperVillain.MentaloFrames[moveName].Created = true + SV.MentaloFrames[moveName].Created = true end --[[ ########################################################## GLOBAL/MODULE FUNCTIONS ########################################################## ]]-- -function SuperVillain:MentaloForced(frame) +function SV:MentaloForced(frame) if _G[frame] and _G[frame]:GetScript("OnDragStop") then _G[frame]:GetScript("OnDragStop")(_G[frame]) end end -function SuperVillain:TestMovableMoved(frame) - if SuperVillain.db.framelocations and SuperVillain.db.framelocations[frame] then +function SV:TestMovableMoved(frame) + if SV.db.framelocations and SV.db.framelocations[frame] then return true else return false end end -function SuperVillain:SaveMovableLoc(frame) +function SV:SaveMovableLoc(frame) if not _G[frame] then return end - if not SuperVillain.db.framelocations then - SuperVillain.db.framelocations = {} + if not SV.db.framelocations then + SV.db.framelocations = {} end - SuperVillain.db.framelocations[frame] = FindLoc(_G[frame]) + SV.db.framelocations[frame] = FindLoc(_G[frame]) end -function SuperVillain:SetSnapOffset(frame, snapOffset) - if not _G[frame] or not SuperVillain.MentaloFrames[frame] then return end - SuperVillain.MentaloFrames[frame].Avatar.snapOffset = snapOffset or -2; - SuperVillain.MentaloFrames[frame]["snapoffset"] = snapOffset or -2 +function SV:SetSnapOffset(frame, snapOffset) + if not _G[frame] or not SV.MentaloFrames[frame] then return end + SV.MentaloFrames[frame].Avatar.snapOffset = snapOffset or -2; + SV.MentaloFrames[frame]["snapoffset"] = snapOffset or -2 end -function SuperVillain:SaveMovableOrigin(frame) +function SV:SaveMovableOrigin(frame) if not _G[frame] then return end - SuperVillain.MentaloFrames[frame]["point"] = FindLoc(_G[frame]) - SuperVillain.MentaloFrames[frame]["postdrag"](_G[frame], Pinpoint(_G[frame])) + SV.MentaloFrames[frame]["point"] = FindLoc(_G[frame]) + SV.MentaloFrames[frame]["postdrag"](_G[frame], Pinpoint(_G[frame])) end -function SuperVillain:SetSVMovable(frame, title, raised, snapOffset, dragStopFunc, movableGroup, overrideName) +function SV:SetSVMovable(frame, title, raised, snapOffset, dragStopFunc, movableGroup, overrideName) if(not frame or (not overrideName and not frame:GetName())) then return end local frameName = overrideName or frame:GetName() local moveName = ("%s_MOVE"):format(frameName) if not movableGroup then movableGroup = "ALL, GENERAL" end - if SuperVillain.MentaloFrames[moveName] == nil then - SuperVillain.MentaloFrames[moveName] = {} - SuperVillain.MentaloFrames[moveName]["parent"] = frame; - SuperVillain.MentaloFrames[moveName]["text"] = title; - SuperVillain.MentaloFrames[moveName]["overlay"] = raised; - SuperVillain.MentaloFrames[moveName]["postdrag"] = dragStopFunc; - SuperVillain.MentaloFrames[moveName]["snapoffset"] = snapOffset; - SuperVillain.MentaloFrames[moveName]["point"] = FindLoc(frame) - SuperVillain.MentaloFrames[moveName]["type"] = {} + if SV.MentaloFrames[moveName] == nil then + SV.MentaloFrames[moveName] = {} + SV.MentaloFrames[moveName]["parent"] = frame; + SV.MentaloFrames[moveName]["text"] = title; + SV.MentaloFrames[moveName]["overlay"] = raised; + SV.MentaloFrames[moveName]["postdrag"] = dragStopFunc; + SV.MentaloFrames[moveName]["snapoffset"] = snapOffset; + SV.MentaloFrames[moveName]["point"] = FindLoc(frame) + SV.MentaloFrames[moveName]["type"] = {} local group = {split(", ", movableGroup)} for i = 1, #group do local this = group[i] - SuperVillain.MentaloFrames[moveName]["type"][this] = true + SV.MentaloFrames[moveName]["type"][this] = true end end SetSVMovable(frame, moveName, title, raised, snapOffset, dragStopFunc) end -function SuperVillain:ToggleMovables(enabled, configType) - for frameName, _ in pairs(SuperVillain.MentaloFrames)do +function SV:ToggleMovables(enabled, configType) + for frameName, _ in pairs(SV.MentaloFrames)do if(_G[frameName]) then local movable = _G[frameName] if(not enabled) then movable:Hide() else - if SuperVillain.MentaloFrames[frameName]["type"][configType]then + if SV.MentaloFrames[frameName]["type"][configType]then movable:Show() else movable:Hide() @@ -641,38 +641,38 @@ function SuperVillain:ToggleMovables(enabled, configType) end end -function SuperVillain:ResetMovables(request) +function SV:ResetMovables(request) if request == "" or request == nil then - for name, _ in pairs(SuperVillain.MentaloFrames)do + for name, _ in pairs(SV.MentaloFrames)do local frame = _G[name]; - if SuperVillain.MentaloFrames[name]["point"] then - local u, v, w, x, y = split("\031", SuperVillain.MentaloFrames[name]["point"]) + if SV.MentaloFrames[name]["point"] then + local u, v, w, x, y = split("\031", SV.MentaloFrames[name]["point"]) frame:ClearAllPoints() frame:SetPoint(u, v, w, x, y) - for arg, func in pairs(SuperVillain.MentaloFrames[name])do + for arg, func in pairs(SV.MentaloFrames[name])do if arg == "postdrag" and type(func) == "function" then func(frame, Pinpoint(frame)) end end end end - SuperVillain.db:SetDefault("framelocations") + SV.db:SetDefault("framelocations") else - for name, _ in pairs(SuperVillain.MentaloFrames)do - if SuperVillain.MentaloFrames[name]["point"] then - for arg1, arg2 in pairs(SuperVillain.MentaloFrames[name])do + for name, _ in pairs(SV.MentaloFrames)do + if SV.MentaloFrames[name]["point"] then + for arg1, arg2 in pairs(SV.MentaloFrames[name])do local mover; if arg1 == "text" then if request == arg2 then local frame = _G[name] - local u, v, w, x, y = split("\031", SuperVillain.MentaloFrames[name]["point"]) + local u, v, w, x, y = split("\031", SV.MentaloFrames[name]["point"]) frame:ClearAllPoints() frame:SetPoint(u, v, w, x, y) - if SuperVillain.db.framelocations then - SuperVillain.db.framelocations[name] = nil + if SV.db.framelocations then + SV.db.framelocations[name] = nil end - if (SuperVillain.MentaloFrames[name]["postdrag"] ~= nil and type(SuperVillain.MentaloFrames[name]["postdrag"]) == "function")then - SuperVillain.MentaloFrames[name]["postdrag"](frame, Pinpoint(frame)) + if (SV.MentaloFrames[name]["postdrag"] ~= nil and type(SV.MentaloFrames[name]["postdrag"]) == "function")then + SV.MentaloFrames[name]["postdrag"](frame, Pinpoint(frame)) end end end @@ -682,17 +682,17 @@ function SuperVillain:ResetMovables(request) end end -function SuperVillain:SetSVMovablesPositions() - for name, _ in pairs(SuperVillain.MentaloFrames)do +function SV:SetSVMovablesPositions() + for name, _ in pairs(SV.MentaloFrames)do local frame = _G[name]; local anchor1, parent, anchor2, x, y; if frame then - if (SuperVillain.db.framelocations and SuperVillain.db.framelocations[name] and type(SuperVillain.db.framelocations[name]) == "string") then - anchor1, parent, anchor2, x, y = split("\031", SuperVillain.db.framelocations[name]) + if (SV.db.framelocations and SV.db.framelocations[name] and type(SV.db.framelocations[name]) == "string") then + anchor1, parent, anchor2, x, y = split("\031", SV.db.framelocations[name]) frame:ClearAllPoints() frame:SetPoint(anchor1, parent, anchor2, x, y) - elseif SuperVillain.MentaloFrames[name]["point"] then - anchor1, parent, anchor2, x, y = split("\031", SuperVillain.MentaloFrames[name]["point"]) + elseif SV.MentaloFrames[name]["point"] then + anchor1, parent, anchor2, x, y = split("\031", SV.MentaloFrames[name]["point"]) frame:ClearAllPoints() frame:SetPoint(anchor1, parent, anchor2, x, y) end @@ -700,7 +700,7 @@ function SuperVillain:SetSVMovablesPositions() end end -function SuperVillain:LoadMovables() +function SV:LoadMovables() for name, _ in pairs(self.MentaloFrames)do local parent, text, overlay, snapoffset, postdrag; for key, value in pairs(self.MentaloFrames[name])do @@ -721,7 +721,7 @@ function SuperVillain:LoadMovables() end end -function SuperVillain:UseMentalo(isConfigMode, configType) +function SV:UseMentalo(isConfigMode, configType) if(InCombatLockdown()) then return end local enabled = false; if(isConfigMode ~= nil and isConfigMode ~= "") then @@ -754,7 +754,7 @@ function SuperVillain:UseMentalo(isConfigMode, configType) self:ToggleMovables(enabled, configType) end -function SuperVillain:MentaloFocus() +function SV:MentaloFocus() local frame = CurrentFrameTarget; local s, t, u = GrabUsableRegions() local v, w = frame:GetCenter() @@ -767,11 +767,11 @@ function SuperVillain:MentaloFocus() v = tonumber(SVUI_MentaloPrecisionSetX.CurrentValue) w = tonumber(SVUI_MentaloPrecisionSetY.CurrentValue) frame:ClearAllPoints() - frame:Point(x, SuperVillain.UIParent, x, v, w) - SuperVillain:SaveMovableLoc(frame.name) + frame:Point(x, SV.UIParent, x, v, w) + SV:SaveMovableLoc(frame.name) end -function SuperVillain:MentaloFocusUpdate(frame) +function SV:MentaloFocusUpdate(frame) local s, t, u = GrabUsableRegions() local v, w = frame:GetCenter() local y = (s / 3); @@ -788,16 +788,16 @@ function SuperVillain:MentaloFocusUpdate(frame) SVUI_MentaloPrecision.Title:SetText(frame.textString) end -function SuperVillain:MovableFocused() +function SV:MovableFocused() CurrentFrameTarget = self; - SuperVillain:MentaloFocusUpdate(self) + SV:MentaloFocusUpdate(self) end -function SuperVillain:SetMentaloAlphas() - hooksecurefunc(SuperVillain, "SetSVMovable", function(_, frame) +function SV:SetMentaloAlphas() + hooksecurefunc(SV, "SetSVMovable", function(_, frame) frame.Avatar:SetAlpha(0.5) end) - ghost(SuperVillain.MentaloFrames, 0.5) + ghost(SV.MentaloFrames, 0.5) end --[[ ########################################################## @@ -847,7 +847,7 @@ function SVUI_MentaloEventHandler_Update(self) end SVUI_MentaloPrecision:ClearAllPoints() SVUI_MentaloPrecision:SetPoint(anchor1, frame, anchor2, 0, 0) - SuperVillain:MentaloFocusUpdate(frame) + SV:MentaloFocusUpdate(frame) end function SVUI_Mentalo_OnLoad() @@ -859,12 +859,12 @@ end function SVUI_Mentalo_OnEvent() if _G["SVUI_Mentalo"]:IsShown() then _G["SVUI_Mentalo"]:Hide() - SuperVillain:UseMentalo(true) + SV:UseMentalo(true) end end function SVUI_MentaloLockButton_OnClick() - SuperVillain:UseMentalo(true) + SV:UseMentalo(true) if IsAddOnLoaded("SVUI_ConfigOMatic")then LibStub("AceConfigDialog-3.0"):Open("SVUI") end @@ -872,7 +872,7 @@ end function SVUI_MentaloPrecisionResetButton_OnClick() local name = CurrentFrameTarget.name - SuperVillain:ResetMovables(name) + SV:ResetMovables(name) end function SVUI_MentaloPrecisionInput_EscapePressed(self) @@ -884,7 +884,7 @@ function SVUI_MentaloPrecisionInput_EnterPressed(self) local txt = tonumber(self:GetText()) if(txt) then self.CurrentValue = txt; - SuperVillain:MentaloFocus() + SV:MentaloFocus() end self:SetText(parsefloat(self.CurrentValue)) EditBox_ClearFocus(self) diff --git a/Interface/AddOns/SVUI/system/mentalo.xml b/Interface/AddOns/SVUI/system/mentalo.xml index 7598d26..57c4409 100644 --- a/Interface/AddOns/SVUI/system/mentalo.xml +++ b/Interface/AddOns/SVUI/system/mentalo.xml @@ -1,4 +1,6 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file="mentalo.lua"/> + <Frame name="SVUI_MoveEventHandler" hidden="true"> <Scripts> <OnLoad> diff --git a/Interface/AddOns/SVUI/system/presets.lua b/Interface/AddOns/SVUI/system/presets.lua index ab30e35..ec59c2d 100644 --- a/Interface/AddOns/SVUI/system/presets.lua +++ b/Interface/AddOns/SVUI/system/presets.lua @@ -33,9 +33,9 @@ local RAID_CLASS_COLORS = _G.RAID_CLASS_COLORS GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); -local scc = SVUI_CLASS_COLORS[SuperVillain.class]; -local rcc = RAID_CLASS_COLORS[SuperVillain.class]; +local SV, L = unpack(select(2, ...)); +local scc = SVUI_CLASS_COLORS[SV.class]; +local rcc = RAID_CLASS_COLORS[SV.class]; local r2 = .1 + (rcc.r * .1) local g2 = .1 + (rcc.g * .1) local b2 = .1 + (rcc.b * .1) @@ -1136,11 +1136,11 @@ local function CopyLayout(saved, preset) end end -function SuperVillain:LoadPresetData(category, theme) +function SV:LoadPresetData(category, theme) if(presets[category] and presets[category]["link"]) then theme = theme or "default" local saved = presets[category]["link"] local preset = presets[category][theme] - CopyLayout(SuperVillain.db[saved], preset) + CopyLayout(SV.db[saved], preset) end end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/registry.lua b/Interface/AddOns/SVUI/system/registry.lua new file mode 100644 index 0000000..2de4168 --- /dev/null +++ b/Interface/AddOns/SVUI/system/registry.lua @@ -0,0 +1,571 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## ]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local type = _G.type; +local rawset = _G.rawset; +local rawget = _G.rawget; +local tinsert = _G.tinsert; +local tremove = _G.tremove; +local tostring = _G.tostring; +local error = _G.error; +local getmetatable = _G.getmetatable; +local setmetatable = _G.setmetatable; +local string = _G.string; +local math = _G.math; +local table = _G.table; +--[[ STRING METHODS ]]-- +local upper = string.upper; +local format, find, match, gsub = string.format, string.find, string.match, string.gsub; +--[[ MATH METHODS ]]-- +local floor = math.floor +--[[ TABLE METHODS ]]-- +local twipe, tsort, tconcat = table.wipe, table.sort, table.concat; +--[[ +############################################################ + /$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$$$$$ +| $$ /$$__ $$ /$$__ $$ /$$__ $$| $$ /$$__ $$ +| $$ | $$ \ $$| $$ \__/| $$ \ $$| $$ | $$ \__/ +| $$ | $$ | $$| $$ | $$$$$$$$| $$ | $$$$$$ +| $$ | $$ | $$| $$ | $$__ $$| $$ \____ $$ +| $$ | $$ | $$| $$ $$| $$ | $$| $$ /$$ \ $$ +| $$$$$$$$| $$$$$$/| $$$$$$/| $$ | $$| $$$$$$$$| $$$$$$/ +|________/ \______/ \______/ |__/ |__/|________/ \______/ +############################################################ +]]-- +local PLUGIN_LISTING = ""; +local ModuleQueue, ScriptQueue = {},{}; + +local INFO_BY = "%s |cff0099FFby %s|r"; +local INFO_VERSION = "%s%s |cff33FF00Version: %s|r"; +local INFO_NAME = "Plugins"; +local INFO_HEADER = "Supervillain UI (version %.3f): Plugins"; + +if GetLocale() == "ruRU" then + INFO_BY = "%s |cff0099FFот %s|r"; + INFO_VERSION = "%s%s |cff33FF00Версия: %s|r"; + INFO_NAME = "Плагины"; + INFO_HEADER = "Supervillain UI (устарела %.3f): Плагины"; +end + +--[[ APPENDED OPTIONS TABLE ]]-- +SVUI[1].Options.args.plugins = { + order = -2, + type = "group", + name = "Plugins", + childGroups = "tab", + args = { + pluginheader = { + order = 1, + type = "header", + name = "Supervillain Plugins", + }, + pluginOptions = { + order = 2, + type = "group", + name = "", + args = { + pluginlist = { + order = 1, + type = "group", + name = "Summary", + args = { + active = { + order = 1, + type = "description", + name = function() return PLUGIN_LISTING end + } + } + }, + } + } + } +} +--[[ +############################################################################### + /$$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$/$$$$$$$ /$$ /$$ +| $$__ $$| $$_____/ /$$__ $$|_ $$_/ /$$__ $$|__ $$__/ $$__ $$| $$ /$$/ +| $$ \ $$| $$ | $$ \__/ | $$ | $$ \__/ | $$ | $$ \ $$ \ $$ /$$/ +| $$$$$$$/| $$$$$ | $$ /$$$$ | $$ | $$$$$$ | $$ | $$$$$$$/ \ $$$$/ +| $$__ $$| $$__/ | $$|_ $$ | $$ \____ $$ | $$ | $$__ $$ \ $$/ +| $$ \ $$| $$ | $$ \ $$ | $$ /$$ \ $$ | $$ | $$ \ $$ | $$ +| $$ | $$| $$$$$$$$| $$$$$$/ /$$$$$$| $$$$$$/ | $$ | $$ | $$ | $$ +|__/ |__/|________/ \______/ |______/ \______/ |__/ |__/ |__/ |__/ +############################################################################### +]]-- +local rootstring = function(self) return self.___addonName end + +local changeDBVar = function(self, value, key, sub1, sub2, sub3) + local core = self.___core + local schema = self.___schema + local config = core.db[schema] + + if((sub1 and sub2 and sub3) and (config[sub1] and config[sub1][sub2] and config[sub1][sub2][sub3])) then + core.db[schema][sub1][sub2][sub3][key] = value + elseif((sub1 and sub2) and (config[sub1] and config[sub1][sub2])) then + core.db[schema][sub1][sub2][key] = value + elseif(sub1 and config[sub1]) then + core.db[schema][sub1][key] = value + else + core.db[schema][key] = value + end + + self.db = core.db[schema] + + if(self.UpdateLocals) then + self:UpdateLocals() + end +end + +local innerOnEvent = function(self, event, ...) + local obj = self.module + if self[event] and type(self[event]) == "function" then + self[event](obj, event, ...) + end +end + +local registerEvent = function(self, eventname, eventfunc) + if not self.___eventframe then + self.___eventframe = CreateFrame("Frame", nil) + self.___eventframe.module = self + self.___eventframe:SetScript("OnEvent", innerOnEvent) + end + + if(not self.___eventframe[eventname]) then + local fn = eventfunc + if type(eventfunc) == "string" then + fn = self[eventfunc] + elseif(not fn and self[eventname]) then + fn = self[eventname] + end + self.___eventframe[eventname] = fn + end + + self.___eventframe:RegisterEvent(eventname) +end + +local unregisterEvent = function(self, event, ...) + if(self.___eventframe) then + self.___eventframe:UnregisterEvent(event) + end +end + +local innerOnUpdate = function(self, elapsed) + if self.elapsed and self.elapsed > (self.throttle) then + local obj = self.module + local core = obj.___core + local callbacks = self.callbacks + + for name, fn in pairs(callbacks) do + local _, error = pcall(fn, obj) + if(error and core.Debugging) then + print(error) + end + end + + self.elapsed = 0 + else + self.elapsed = (self.elapsed or 0) + elapsed + end +end + +local registerUpdate = function(self, updatefunc, throttle) + if not self.___updateframe then + self.___updateframe = CreateFrame("Frame", nil); + self.___updateframe.module = self; + self.___updateframe.callbacks = {}; + self.___updateframe.elapsed = 0; + self.___updateframe.throttle = throttle or 0.2; + end + + if(updatefunc and type(updatefunc) == "string" and self[updatefunc]) then + self.___updateframe.callbacks[updatefunc] = self[updatefunc] + end + + self.___updateframe:SetScript("OnUpdate", innerOnUpdate) +end + +local unregisterUpdate = function(self, updatefunc) + if(updatefunc and type(updatefunc) == "string" and self.___updateframe.callbacks[updatefunc]) then + self.___updateframe.callbacks[updatefunc] = nil + if(#self.___updateframe.callbacks == 0) then + self.___updateframe:SetScript("OnUpdate", nil) + end + else + self.___updateframe:SetScript("OnUpdate", nil) + end +end + +local add_OptionsIndex = function(self, index, data) + local addonName = self.___addonName + local schema = self.___schema + local core = self.___core + local header = GetAddOnMetadata(addonName, "X-SVUI-Header") + + core.Options.args.plugins.args.pluginOptions.args[schema].args[index] = data +end + +local function SetPluginString(addonName) + local pluginString = PLUGIN_LISTING or "" + local author = GetAddOnMetadata(addonName, "Author") or "Unknown" + local Pname = GetAddOnMetadata(addonName, "Title") or addonName + local version = GetAddOnMetadata(addonName, "Version") or "???" + pluginString = INFO_BY:format(pluginString, author) + pluginString = ("%s%s"):format(pluginString, Pname) + pluginString = INFO_VERSION:format(pluginString, "|cff00FF00", version) + pluginString = ("%s|r\n"):format(pluginString) + + PLUGIN_LISTING = pluginString +end + +local function SetInternalModule(obj, core, schema) + local addonmeta = {} + local oldmeta = getmetatable(obj) + if oldmeta then + for k, v in pairs(oldmeta) do addonmeta[k] = v end + end + addonmeta.__tostring = rootstring + setmetatable( obj, addonmeta ) + + local addonName = ("SVUI [%s]"):format(schema) + + obj.___addonName = addonName + obj.___schema = schema + obj.___core = core + + obj.initialized = false + obj.CombatLocked = false + obj.ChangeDBVar = changeDBVar + obj.RegisterEvent = registerEvent + obj.UnregisterEvent = unregisterEvent + obj.RegisterUpdate = registerUpdate + obj.UnregisterUpdate = unregisterUpdate + + return obj +end + +local function SetExternalModule(obj, core, schema, addonName, header, lod) + local addonmeta = {} + local oldmeta = getmetatable(obj) + if oldmeta then + for k, v in pairs(oldmeta) do addonmeta[k] = v end + end + addonmeta.__tostring = rootstring + setmetatable( obj, addonmeta ) + + obj.___addonName = addonName + obj.___schema = schema + obj.___header = header + obj.___core = core + obj.___lod = lod + + obj.initialized = false + obj.CombatLocked = false + obj.ChangeDBVar = changeDBVar + obj.RegisterEvent = registerEvent + obj.UnregisterEvent = unregisterEvent + obj.RegisterUpdate = registerUpdate + obj.UnregisterUpdate = unregisterUpdate + obj.AddOption = add_OptionsIndex + + if(lod) then + -- print("PLUGIN: " .. addonName) + core.Options.args.plugins.args.pluginOptions.args[schema] = { + type = "group", + name = header, + childGroups = "tree", + args = { + enable = { + order = 1, + type = "execute", + width = "full", + name = function() + local nameString = "Disable" + if(not IsAddOnLoaded(addonName)) then + nameString = "Enable" + end + return nameString + end, + func = function() + if(not IsAddOnLoaded(addonName)) then + local loaded, reason = LoadAddOn(addonName) + core:UpdateDatabase() + obj:ChangeDBVar(true, "enable") + else + obj:ChangeDBVar(false, "enable") + core:StaticPopup_Show("RL_CLIENT") + end + end, + } + } + } + else + core.Options.args.plugins.args.pluginOptions.args[schema] = { + type = "group", + name = header, + childGroups = "tree", + args = { + enable = { + order = 1, + type = "toggle", + name = "Enable", + get = function() return obj.db.enable end, + set = function(key, value) obj:ChangeDBVar(value, "enable") end, + } + } + } + end + + return obj +end + +local Registry_NewCallback = function(self, fn) + if(fn and type(fn) == "function") then + self.Callbacks[#self.Callbacks+1] = fn + end +end + +local Registry_NewScript = function(self, fn) + if(fn and type(fn) == "function") then + ScriptQueue[#ScriptQueue+1] = fn + end +end + +local Registry_NewPackage = function(self, obj, schema) + local core = self.___core + if(core[schema]) then return end + + ModuleQueue[#ModuleQueue+1] = schema + self.Modules[#self.Modules+1] = schema + + core[schema] = SetInternalModule(obj, core, schema) + + if(core.AddonLaunched) then + if(core[schema].Load) then + core[schema]:Load() + end + end +end + +local Registry_NewPlugin = function(self, obj) + local core = self.___core + local coreName = core.___addonName + local addonName = obj.___addonName + + if(addonName and addonName ~= coreName) then + local schema = GetAddOnMetadata(addonName, "X-SVUI-Schema"); + local header = GetAddOnMetadata(addonName, "X-SVUI-Header"); + local lod = IsAddOnLoadOnDemand(addonName) + if(not schema) then return end + + ModuleQueue[#ModuleQueue+1] = schema + self.Modules[#self.Modules+1] = schema + + SetPluginString(addonName) + + core[schema] = SetExternalModule(obj, core, schema, addonName, header, lod) + + if(core.AddonLaunched and core[schema].Load) then + core[schema]:Load() + end + end +end + +local Registry_NewAddon = function(self, addonName, schema, header) + local core = self.___core + self.Addons[addonName] = schema; + + core.Options.args.plugins.args.pluginOptions.args[schema] = { + type = "group", + name = header, + childGroups = "tree", + args = { + enable = { + order = 1, + type = "execute", + width = "full", + name = function() + local nameString = "Disable" + if(not IsAddOnLoaded(addonName)) then + nameString = "Enable" + end + return nameString + end, + func = function() + if(not IsAddOnLoaded(addonName)) then + local loaded, reason = LoadAddOn(addonName) + core:UpdateDatabase() + core.db[schema].enable = true + self:LoadPackages() + else + core.db[schema].enable = false + core:StaticPopup_Show("RL_CLIENT") + end + end, + } + } + } +end + +local Registry_FetchAddons = function(self) + local addonCount = GetNumAddOns() + local core = self.___core + + for i = 1, addonCount do + local addonName, _, _, _, _, reason = GetAddOnInfo(i) + local lod = IsAddOnLoadOnDemand(i) + local header = GetAddOnMetadata(i, "X-SVUI-Header") + local schema = GetAddOnMetadata(i, "X-SVUI-Schema") + + if(lod and schema) then + self:NewAddon(addonName, schema, header) + end + end +end + +local Registry_RunCallbacks = function(self) + local callbacks = self.Callbacks + for i=1, #callbacks do + local fn = callbacks[i] + if(fn and type(fn) == "function") then + fn() + end + end +end + +local Registry_Update = function(self, name, dataOnly) + local core = self.___core + local obj = core[name] + if obj then + if core.db[name] then + obj.db = core.db[name] + end + if obj.ReLoad and not dataOnly then + obj:ReLoad() + end + end +end + +local Registry_UpdateAll = function(self) + local modules = self.Modules + local core = self.___core + for _,name in pairs(modules) do + local obj = core[name] + + if core.db[name] then + obj.db = core.db[name] + end + + if obj and obj.ReLoad then + obj:ReLoad() + end + end +end + +local Registry_LoadOnDemand = function(self) + local core = self.___core + local addons = self.Addons + for name,schema in pairs(addons) do + local config = core.db[schema] + if(config and (config.enable or config.enable ~= false)) then + if(not IsAddOnLoaded(name)) then + local loaded, reason = LoadAddOn(name) + end + EnableAddOn(name) + end + end +end + +local Registry_Load = function(self) + if not ModuleQueue then return end + local core = self.___core + + for i=1,#ModuleQueue do + local name = ModuleQueue[i] + local obj = core[name] + if obj and not obj.initialized then + if core.db[name] then + obj.db = core.db[name] + end + + -- if obj.___lod then + -- print(table.dump(core.db[name])) + -- end + + if obj.Load then + local halt = false + if(obj.db.incompatible) then + for addon,_ in pairs(obj.db.incompatible) do + if IsAddOnLoaded(addon) then halt = true end + end + end + if(not halt) then + obj:Load() + obj.Load = nil + end + end + obj.initialized = true; + end + end + + twipe(ModuleQueue) + + if not ScriptQueue then return end + for i=1, #ScriptQueue do + local fn = ScriptQueue[i] + if(fn and type(fn) == "function") then + fn() + end + end + + ScriptQueue = nil +end + +local Registry = { + ___core = SVUI[1], + Modules = {}, + Addons = {}, + Callbacks = {}, + INFO_VERSION = INFO_VERSION, + INFO_NEW = INFO_NEW, + INFO_NAME = INFO_NAME, + INFO_HEADER = INFO_HEADER, + NewCallback = Registry_NewCallback, + NewScript = Registry_NewScript, + NewPackage = Registry_NewPackage, + NewPlugin = Registry_NewPlugin, + NewAddon = Registry_NewAddon, + FindAddons = Registry_FetchAddons, + LoadRegisteredAddons = Registry_LoadOnDemand, + RunCallbacks = Registry_RunCallbacks, + Update = Registry_Update, + UpdateAll = Registry_UpdateAll, + LoadPackages = Registry_Load, +} + +--[[ ENSURE META METHODS ]]-- + +local mt = {} +local old = getmetatable(Registry) +if old then + for k, v in pairs(old) do mt[k] = v end +end +mt.__tostring = rootstring +setmetatable(Registry, mt) + +SVUI[3] = Registry \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/slash.lua b/Interface/AddOns/SVUI/system/slash.lua index a2c8a99..ab48969 100644 --- a/Interface/AddOns/SVUI/system/slash.lua +++ b/Interface/AddOns/SVUI/system/slash.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(select(2, ...)); +local SV, L = unpack(select(2, ...)); --[[ ########################################################## LOCAL VARS @@ -45,27 +45,27 @@ local function SVUIMasterCommand(msg) if msg then msg = lower(trim(msg)) if (msg == "install") then - SuperVillain:Install() + SV:Install() elseif (msg == "move" or msg == "mentalo") then - SuperVillain:UseMentalo() - elseif (msg == "kb" or msg == "bind") and SuperVillain.db.SVBar.enable then - SuperVillain.SVBar:ToggleKeyBindingMode() + SV:UseMentalo() + elseif (msg == "kb" or msg == "bind") and SV.db.SVBar.enable then + SV.SVBar:ToggleKeyBindingMode() elseif (msg == "reset" or msg == "resetui") then - SuperVillain:ResetAllUI() + SV:ResetAllUI() elseif (msg == "bg" or msg == "pvp") then - local MOD = SuperVillain.SVStats + local MOD = SV.SVStats MOD.ForceHideBGStats = nil; MOD:Generate() - SuperVillain:AddonMessage(L['Battleground statistics will now show again if you are inside a battleground.']) + SV:AddonMessage(L['Battleground statistics will now show again if you are inside a battleground.']) elseif (msg == "toasty" or msg == "kombat") then - SuperVillain:ToastyKombat() + SV:ToastyKombat() elseif (msg == "lol") then PlaySoundFile("Sound\\Character\\Human\\HumanVocalFemale\\HumanFemalePissed04.wav") else - SuperVillain:ToggleConfig() + SV:ToggleConfig() end else - SuperVillain:ToggleConfig() + SV:ToggleConfig() end end diff --git a/Interface/AddOns/SVUI/system/system.lua b/Interface/AddOns/SVUI/system/system.lua deleted file mode 100644 index f39ce80..0000000 --- a/Interface/AddOns/SVUI/system/system.lua +++ /dev/null @@ -1,929 +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 ipairs = _G.ipairs; -local type = _G.type; -local error = _G.error; -local pcall = _G.pcall; -local tostring = _G.tostring; -local tonumber = _G.tonumber; -local tinsert = _G.tinsert; -local string = _G.string; -local math = _G.math; -local bit = _G.bit; -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 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 parsefloat, huge, random = math.parsefloat, math.huge, math.random; -- Uncommon ---[[ BINARY METHODS ]]-- -local band, bor = bit.band, bit.bor; ---[[ TABLE METHODS ]]-- -local tremove, tcopy, twipe, tsort, tconcat, tdump = table.remove, table.copy, table.wipe, table.sort, table.concat, table.dump; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SuperVillain, L = unpack(select(2, ...)) ---[[ -########################################################## -LOCALS -########################################################## -]]-- -local toonClass = select(2,UnitClass("player")); -local rez = GetCVar("gxResolution"); -local gxHeight = tonumber(match(rez,"%d+x(%d+)")); -local gxWidth = tonumber(match(rez,"(%d+)x%d+")); -local NewHook = hooksecurefunc; -local version = GetAddOnMetadata(..., "Version"); ---[[ -########################################################## -DISPEL MECHANICS -########################################################## -]]-- -local droodSpell1, droodSpell2 = GetSpellInfo(110309), GetSpellInfo(4987); -local RefClassRoles, RefUnitRoles; -local RefMagicSpec; --- canBeTank, canBeHealer, canBeDPS = UnitGetAvailableRoles("unit") -do - if(toonClass == "PRIEST") then - RefClassRoles = {"C", "C", "C"} - RefUnitRoles = {"HEALER", "HEALER", "DAMAGER"} - SuperVillain.Dispellable = {["Magic"] = true, ["Disease"] = true} - elseif(toonClass == "WARLOCK") then - RefClassRoles = {"C", "C", "C"} - RefUnitRoles = {"DAMAGER", "DAMAGER", "DAMAGER"} - elseif(toonClass == "WARRIOR") then - RefClassRoles = {"M", "M", "T"} - RefUnitRoles = {"DAMAGER", "DAMAGER", "TANK"} - elseif(toonClass == "HUNTER") then - RefClassRoles = {"M", "M", "M"} - RefUnitRoles = {"DAMAGER", "DAMAGER", "DAMAGER"} - elseif(toonClass == "ROGUE") then - RefClassRoles = {"M", "M", "M"} - RefUnitRoles = {"DAMAGER", "DAMAGER", "DAMAGER"} - elseif(toonClass == "MAGE") then - RefClassRoles = {"C", "C", "C"} - RefUnitRoles = {"DAMAGER", "DAMAGER", "DAMAGER"} - SuperVillain.Dispellable = {["Curse"] = true} - elseif(toonClass == "DEATHKNIGHT") then - RefClassRoles = {"T", "M", "M"} - RefUnitRoles = {"TANK", "DAMAGER", "DAMAGER"} - elseif(toonClass == "DRUID") then - RefMagicSpec = 4 - RefClassRoles = {"C", "M", "T", "C"} - RefUnitRoles = {"DAMAGER", "DAMAGER", "TANK", "HEALER"} - SuperVillain.Dispellable = {["Curse"] = true, ["Poison"] = true} - elseif(toonClass == "SHAMAN") then - RefMagicSpec = 3 - RefClassRoles = {"C", "M", "C"} - RefUnitRoles = {"DAMAGER", "DAMAGER", "HEALER"} - SuperVillain.Dispellable = {["Curse"] = true} - elseif(toonClass == "MONK") then - RefMagicSpec = 2 - RefClassRoles = {"T", "C", "M"} - RefUnitRoles = {"TANK", "HEALER", "DAMAGER"} - SuperVillain.Dispellable = {["Disease"] = true, ["Poison"] = true} - elseif(toonClass == "PALADIN") then - RefMagicSpec = 1 - RefClassRoles = {"C", "T", "M"} - RefUnitRoles = {"HEALER", "TANK", "DAMAGER"} - SuperVillain.Dispellable = {["Poison"] = true, ["Disease"] = true} - end -end - -local function GetTalentInfo(arg) - if type(arg) == "number" then - return arg == GetActiveSpecGroup(); - else - return false; - end -end - -function SuperVillain:DefinePlayerRole() - local spec = GetSpecialization() - local role, unitRole; - if spec then - if(self.CurrentSpec == spec) then return end - role = RefClassRoles[spec] - unitRole = RefUnitRoles[spec] - if role == "T" and UnitLevel("player") == MAX_PLAYER_LEVEL then - local bonus, pvp = GetCombatRatingBonus(COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN), false; - if bonus > GetDodgeChance() and bonus > GetParryChance() then - role = "M" - end - end - self.CurrentSpec = spec - self.RoleIsSet = true - else - local intellect = select(2, UnitStat("player", 4)) - local agility = select(2, UnitStat("player", 2)) - local baseAP, posAP, negAP = UnitAttackPower("player") - local totalAP = baseAP + posAP + negAP; - if totalAP > intellect or agility > intellect then - role = "M" - else - role = "C" - end - end - if self.UnitRole ~= unitRole then - self.UnitRole = unitRole - end - if self.ClassRole ~= role then - self.ClassRole = role; - if self.RoleChangedCallback then - self.RoleChangedCallback() - end - end - if RefMagicSpec then - if(GetTalentInfo(RefMagicSpec)) then - self.Dispellable["Magic"] = true - elseif(self.Dispellable["Magic"]) then - self.Dispellable["Magic"] = nil - end - end -end ---[[ -########################################################## -SYSTEM FUNCTIONS -########################################################## -]]-- -function SuperVillain:StaticPopup_Show(arg) - if arg == "ADDON_ACTION_FORBIDDEN" then - StaticPopup_Hide(arg) - end -end - -function SuperVillain:ResetAllUI(confirmed) - if InCombatLockdown()then - SendAddonMessage(ERR_NOT_IN_COMBAT) - return - end - if(not confirmed) then - self:StaticPopup_Show('RESET_UI_CHECK') - return - end - self:ResetInstallation() -end - -function SuperVillain:ResetUI(confirmed) - if InCombatLockdown()then - SendAddonMessage(ERR_NOT_IN_COMBAT) - return - end - if(not confirmed) then - self:StaticPopup_Show('RESETMOVERS_CHECK') - return - end - self:ResetMovables() -end - -function SuperVillain:ToggleConfig() - if InCombatLockdown() then - SendAddonMessage(ERR_NOT_IN_COMBAT) - self.UIParent:RegisterEvent('PLAYER_REGEN_ENABLED') - return - end - if not IsAddOnLoaded("SVUI_ConfigOMatic") then - local _,_,_,_,_,state = GetAddOnInfo("SVUI_ConfigOMatic") - if state ~= "MISSING" and state ~= "DISABLED" then - LoadAddOn("SVUI_ConfigOMatic") - local config_version = GetAddOnMetadata("SVUI_ConfigOMatic", "Version") - if(tonumber(config_version) < 4) then - self:StaticPopup_Show("CLIENT_UPDATE_REQUEST") - end - else - self:AddonMessage("|cffff0000Error -- Addon 'SVUI_ConfigOMatic' not found or is disabled.|r") - return - end - end - local aceConfig = LibStub("AceConfigDialog-3.0") - local switch = not aceConfig.OpenFrames["SVUI"] and "Open" or "Close" - aceConfig[switch](aceConfig, "SVUI") - GameTooltip:Hide() -end - ---/script SVUI[1]:TaintHandler("SVUI", "Script", "Function") -function SuperVillain:TaintHandler(taint, sourceName, sourceFunc) - if GetCVarBool('scriptErrors') ~= 1 then return end - local errorString = ("Error Captured: %s->%s->{%s}"):format(taint, sourceName or "Unknown", sourceFunc or "Unknown") - SuperVillain:AddonMessage(errorString) - SuperVillain:StaticPopup_Show("TAINT_RL") -end ---[[ -########################################################## -ANIMATION CLASS -########################################################## -]]-- -local FlickerAlpha = {0.2,0.15,0.1,0.15,0.2,0.15,0.1,0.15} -local Animate = {}; ---[[ HANDLERS ]]-- - -local Anim_OnShow = function(self) - if not self.anim:IsPlaying() then - self.anim:Play() - end -end - -local Anim_OnHide = function(self) - self.anim:Finish() -end - -local Anim_OnPlay = function(self) - local parent = self.parent - parent:SetAlpha(1) - if self.hideOnFinished and not parent:IsShown() then - parent:Show() - end -end - -local Anim_OnStop = function(self) - local parent = self.parent - if self.fadeOnFinished then - parent:SetAlpha(0) - else - parent:SetAlpha(1) - end - if self.hideOnFinished and parent:IsShown() then - parent:Hide() - end - if self.savedFrameLevel then - parent:SetScale(1) - parent:SetFrameLevel(self.savedFrameLevel) - end -end - -local Anim_OnFinished = function(self) - local parent = self.parent - local looped = self:GetLooping() - self:Stop() - if(looped and looped == "REPEAT" and parent:IsShown()) then - self:Play() - end -end - -local Sprite_OnUpdate = function(self) - local order = self:GetOrder() - local parent = self.parent - local left, right; - if(self.isFadeFrame) then - parent:SetAlpha(0) - return - end - left = (order - 1) * 0.25; - right = left + 0.25; - parent:SetTexCoord(left,right,0,1) - if parent.overlay then - parent.overlay:SetTexCoord(left,right,0,1) - parent.overlay:SetVertexColor(1,1,1,FlickerAlpha[order]) - end -end - -local SmallSprite_OnUpdate = function(self) - local order = self:GetOrder() - local parent = self.parent - local left, right; - if(self.isFadeFrame) then - parent:SetAlpha(0) - return - end - left = (order - 1) * 0.125; - right = left + 0.125; - parent:SetTexCoord(left,right,0,1) - if parent.overlay then - parent.overlay:SetTexCoord(left,right,0,1) - parent.overlay:SetVertexColor(1,1,1,FlickerAlpha[order]) - end -end - -local PulseIn_OnUpdate = function(self) - local parent = self.parent - local step = self:GetProgress() - if(parent.savedFrameLevel) then - parent:SetFrameLevel(128) - end - parent:SetScale(1 + (1.05 * step)) -end - -local PulseOut_OnUpdate = function(self) - local parent = self.parent - local step = self:GetProgress() - if(parent.savedFrameLevel) then - parent:SetFrameLevel(128) - end - parent:SetScale(1 + (1.05 * (1 - step))) -end - -local Slide_OnUpdate = function(self) - local parent = self.parent - local step = self:GetProgress() - parent:SetScale(1 + (1.05 * step)) -end - -local Slide_OnPlay = function(self) - local parent = self.parent - parent:SetScale(0.01) - parent:SetAlpha(1) -end - -local Slide_FadeStart = function(self) - local parent = self.parent - UIFrameFadeOut(parent, 0.3, 1, 0) -end - -local Slide_FadeStop = function(self) - self.parent:SetAlpha(0) -end - ---[[ HELPER FUNCTION ]]-- - -local function SetNewAnimation(frame, animType, subType) - local anim = frame:CreateAnimation(animType, subType) - anim.parent = frame.parent - return anim -end - ---[[ ANIMATION CLASS METHODS ]]-- - -function Animate:SetTemplate(frame, animType, hideOnFinished, speed, special, scriptToParent) - if not animType then return end - - frame.anim = frame:CreateAnimationGroup(animType) - frame.anim.parent = frame; - frame.anim.hideOnFinished = hideOnFinished - if animType ~= 'Flash' then - frame.anim:SetScript("OnPlay", Anim_OnPlay) - frame.anim:SetScript("OnFinished", Anim_OnFinished) - frame.anim:SetScript("OnStop", Anim_OnStop) - end - - if scriptToParent then - local frameParent = frame:GetParent(); - if(frameParent.SetScript) then - frameParent.anim = frame.anim; - frameParent:SetScript("OnShow", Anim_OnShow) - frameParent:SetScript("OnHide", Anim_OnHide) - end - elseif(frame.SetScript) then - frame:SetScript("OnShow", Anim_OnShow) - frame:SetScript("OnHide", Anim_OnHide) - end - - if animType == 'Flash'then - frame.anim.fadeOnFinished = true - if not speed then speed = 0.33 end - - frame.anim[1] = SetNewAnimation(frame.anim, "ALPHA", "FadeIn") - frame.anim[1]:SetChange(1) - frame.anim[1]:SetOrder(2) - frame.anim[1]:SetDuration(speed) - - frame.anim[2] = SetNewAnimation(frame.anim, "ALPHA","FadeOut") - frame.anim[2]:SetChange(-1) - frame.anim[2]:SetOrder(1) - frame.anim[2]:SetDuration(speed) - - if special then - frame.anim:SetLooping("REPEAT") - end - elseif animType == 'Orbit' then - frame.anim[1] = SetNewAnimation(frame.anim, "Rotation") - if special then - frame.anim[1]:SetDegrees(-360) - else - frame.anim[1]:SetDegrees(360) - end - frame.anim[1]:SetDuration(speed) - frame.anim:SetLooping("REPEAT") - frame.anim:Play() - elseif animType == 'Sprite' then - frame.anim[1] = SetNewAnimation(frame.anim, "Translation") - frame.anim[1]:SetOrder(1) - frame.anim[1]:SetDuration(speed) - frame.anim[1]:SetScript("OnUpdate", Sprite_OnUpdate) - - frame.anim[2] = SetNewAnimation(frame.anim, "Translation") - frame.anim[2]:SetOrder(2) - frame.anim[2]:SetDuration(speed) - frame.anim[2]:SetScript("OnUpdate", Sprite_OnUpdate) - - frame.anim[3] = SetNewAnimation(frame.anim, "Translation") - frame.anim[3]:SetOrder(3) - frame.anim[3]:SetDuration(speed) - frame.anim[3]:SetScript("OnUpdate", Sprite_OnUpdate) - - frame.anim[4] = SetNewAnimation(frame.anim, "Translation") - frame.anim[4]:SetOrder(4) - frame.anim[4]:SetDuration(speed) - frame.anim[4]:SetScript("OnUpdate", Sprite_OnUpdate) - - if special then - frame.anim[5] = SetNewAnimation(frame.anim, "Translation") - frame.anim[5]:SetOrder(5) - frame.anim[5]:SetDuration(special) - frame.anim[5].isFadeFrame = true; - frame.anim[5]:SetScript("OnUpdate", Sprite_OnUpdate) - end - - frame.anim:SetLooping("REPEAT") - elseif animType == 'SmallSprite' then - frame.anim[1] = SetNewAnimation(frame.anim, "Translation") - frame.anim[1]:SetOrder(1) - frame.anim[1]:SetDuration(speed) - frame.anim[1]:SetScript("OnUpdate", SmallSprite_OnUpdate) - - frame.anim[2] = SetNewAnimation(frame.anim, "Translation") - frame.anim[2]:SetOrder(2) - frame.anim[2]:SetDuration(speed) - frame.anim[2]:SetScript("OnUpdate", SmallSprite_OnUpdate) - - frame.anim[3] = SetNewAnimation(frame.anim, "Translation") - frame.anim[3]:SetOrder(3) - frame.anim[3]:SetDuration(speed) - frame.anim[3]:SetScript("OnUpdate", SmallSprite_OnUpdate) - - frame.anim[4] = SetNewAnimation(frame.anim, "Translation") - frame.anim[4]:SetOrder(4) - frame.anim[4]:SetDuration(speed) - frame.anim[4]:SetScript("OnUpdate", SmallSprite_OnUpdate) - - frame.anim[5] = SetNewAnimation(frame.anim, "Translation") - frame.anim[5]:SetOrder(5) - frame.anim[5]:SetDuration(speed) - frame.anim[5]:SetScript("OnUpdate", SmallSprite_OnUpdate) - - frame.anim[6] = SetNewAnimation(frame.anim, "Translation") - frame.anim[6]:SetOrder(6) - frame.anim[6]:SetDuration(speed) - frame.anim[6]:SetScript("OnUpdate", SmallSprite_OnUpdate) - - frame.anim[7] = SetNewAnimation(frame.anim, "Translation") - frame.anim[7]:SetOrder(7) - frame.anim[7]:SetDuration(speed) - frame.anim[7]:SetScript("OnUpdate", SmallSprite_OnUpdate) - - frame.anim[8] = SetNewAnimation(frame.anim, "Translation") - frame.anim[8]:SetOrder(8) - frame.anim[8]:SetDuration(speed) - frame.anim[8]:SetScript("OnUpdate", SmallSprite_OnUpdate) - - if special then - frame.anim[9] = SetNewAnimation(frame.anim, "Translation") - frame.anim[9]:SetOrder(9) - frame.anim[9]:SetDuration(special) - frame.anim[9].isFadeFrame = true; - frame.anim[9]:SetScript("OnUpdate", Sprite_OnUpdate) - end - - frame.anim:SetLooping("REPEAT") - elseif animType == 'Pulse' then - frame.anim.savedFrameLevel = frame:GetFrameLevel() - - frame.anim[1] = SetNewAnimation(frame.anim) - frame.anim[1]:SetDuration(0.2) - frame.anim[1]:SetEndDelay(0.1) - frame.anim[1]:SetOrder(1) - frame.anim[1]:SetScript("OnUpdate", PulseIn_OnUpdate) - - frame.anim[2] = SetNewAnimation(frame.anim) - frame.anim[2]:SetDuration(0.6) - frame.anim[2]:SetOrder(2) - frame.anim[2]:SetScript("OnUpdate", PulseOut_OnUpdate) - end -end - ---[[ ROTATE AND WOBBLE (kinda like twerking i guess...) ]]-- - -function Animate:Orbit(frame, speed, reversed, hideOnFinished) - if not frame then return end - if not speed then speed = 1 end - self:SetTemplate(frame, 'Orbit', hideOnFinished, speed, reversed) -end - -function Animate:Pulse(frame, hideOnFinished) - if not frame then return end - self:SetTemplate(frame, 'Pulse', hideOnFinished) -end - ---[[ ANIMATED SPRITES ]]-- - -function Animate:Sprite(frame, speed, fadeTime, scriptToParent) - if not frame then return end - speed = speed or 0.08; - self:SetTemplate(frame, 'Sprite', false, speed, fadeTime, scriptToParent) -end - -function Animate:SmallSprite(frame, speed, fadeTime, scriptToParent) - if not frame then return end - speed = speed or 0.08; - self:SetTemplate(frame, 'SmallSprite', false, speed, fadeTime, scriptToParent) -end - -function Animate:StopSprite(frame) - if not frame then return end - frame.anim:Finish() -end - ---[[ FLASHING ]]-- - -function Animate:Flash(frame, speed, looped) - if not frame.anim then - Animate:SetTemplate(frame, 'Flash', false, speed, looped) - end - if not frame.anim:IsPlaying() then - frame.anim:Play() - end -end - -function Animate:StopFlash(frame) - if not frame.anim then return end - frame.anim:Finish() - frame.anim:Stop() -end - ---[[ SLIDING ]]-- - -function Animate:Slide(frame, xDirection, yDirection, bounce) - if(not frame or (frame and frame.anim)) then return end - - frame.anim = frame:CreateAnimationGroup("Slide") - frame.anim.hideOnFinished = true; - frame.anim.parent = frame; - frame.anim:SetScript("OnPlay", Anim_OnPlay) - frame.anim:SetScript("OnFinished", Anim_OnFinished) - frame.anim:SetScript("OnStop", Anim_OnStop) - - frame.anim[1] = SetNewAnimation(frame.anim, "Translation") - frame.anim[1]:SetDuration(0) - frame.anim[1]:SetOrder(1) - - frame.anim[2] = SetNewAnimation(frame.anim, "Translation") - frame.anim[2]:SetDuration(0.3) - frame.anim[2]:SetOrder(2) - frame.anim[2]:SetSmoothing("OUT") - - if bounce then - frame.anim[3] = SetNewAnimation(frame.anim, "Translation") - frame.anim[3]:SetDuration(0.5) - frame.anim[3]:SetOrder(3) - - frame.anim[4] = SetNewAnimation(frame.anim, "Translation") - frame.anim[4]:SetDuration(0.3) - frame.anim[4]:SetOrder(4) - frame.anim[4]:SetSmoothing("IN") - frame.anim[4]:SetOffset(xDirection, yDirection) - end -end - -function Animate:RandomSlide(frame, raised) - if not frame then return end - if raised then - frame:SetFrameLevel(30) - else - frame:SetFrameLevel(20) - end - frame:SetPoint("CENTER", SuperVillain.UIParent, "CENTER", 0, -150) - - frame.anim = frame:CreateAnimationGroup("RandomSlide") - frame.anim.parent = frame; - frame.anim[1] = SetNewAnimation(frame.anim, "Translation") - frame.anim[1]:SetOrder(1) - frame.anim[1]:SetDuration(0.1) - frame.anim[1]:SetScript("OnUpdate", Slide_OnUpdate) - frame.anim[1]:SetScript("OnPlay", Slide_OnPlay) - - frame.anim[2] = SetNewAnimation(frame.anim, "Translation") - frame.anim[2]:SetOrder(2) - frame.anim[2]:SetDuration(1) - - frame.anim[3] = SetNewAnimation(frame.anim, "Translation") - frame.anim[3]:SetOrder(3) - frame.anim[3]:SetDuration(0.3) - frame.anim[3]:SetSmoothing("OUT") - frame.anim[3]:SetScript("OnPlay", Slide_FadeStart) - frame.anim[3]:SetScript("OnStop", Slide_FadeStop) - - frame.anim:SetScript("OnFinished", Slide_FadeStop) -end - -function Animate:SlideIn(frame) - if not frame.anim then return end - frame:Show() - frame.anim:Play() -end - -function Animate:SlideOut(frame) - if not frame.anim then return end - frame.anim:Finish() - frame.anim:Stop() -end - -SuperVillain.Animate = Animate; ---[[ -########################################################## -SYSTEM UPDATES -########################################################## -]]-- -local function DeleteOldSavedVars() - --[[ BEGIN DEPRECATED ]]-- - if SVUI_DATA then SVUI_DATA = nil end - if SVUI_SAFE_DATA then SVUI_SAFE_DATA = nil end - if SVUI_TRACKER then SVUI_TRACKER = nil end - if SVUI_ENEMIES then SVUI_ENEMIES = nil end - if SVUI_JOURNAL then SVUI_JOURNAL = nil end - if SVUI_CHARACTER_LOG then SVUI_CHARACTER_LOG = nil end - if SVUI_MOVED_FRAMES then SVUI_MOVED_FRAMES = nil end - if SVUI_SystemData then SVUI_SystemData = nil end - if SVUI_ProfileData then SVUI_ProfileData = nil end - if SVUI_Filters then SVUI_Filters = nil end - if SVUI_AuraFilters then SVUI_AuraFilters = nil end - if SVUI_AuraWatch then SVUI_AuraWatch = nil end - if SVUI_Cache["Mentalo"]["Blizzard"] then SVUI_Cache["Mentalo"]["Blizzard"] = nil end - if SVUI_Cache["Mentalo"]["UI"] then SVUI_Cache["Mentalo"]["UI"] = nil end - if(SVUI_Profile.SAFEDATA.install_complete) then SVUI_Profile.SAFEDATA.install_complete = nil end - --[[ END DEPRECATED ]]-- -end - -function SuperVillain:VersionCheck() - local minimumVersion = 4.06; - local installedVersion = SVUI_Profile.SAFEDATA.install_version - if(installedVersion) then - if(type(installedVersion) == "string") then - installedVersion = tonumber(SVUI_Profile.SAFEDATA.install_version) - end - if(type(installedVersion) == "number" and installedVersion < minimumVersion) then - DeleteOldSavedVars() - self:Install(true) - end - else - DeleteOldSavedVars() - self:Install(true) - end -end - -function SuperVillain:RefreshEverything(bypass) - self:RefreshAllSystemMedia(); - - SuperVillain.UIParent:Hide(); - - self:SetSVMovablesPositions(); - self.Registry:Update('SVUnit'); - self.Registry:UpdateAll(); - - SuperVillain.UIParent:Show(); - - if not bypass then - self:VersionCheck() - end -end ---[[ -########################################################## -SVUI LOAD PROCESS -########################################################## -]]-- -local function PrepareStorage() - if(not SVUI_Profile) then return end - SVUI_Profile.STORED = {} - local old = SVUI_Profile.SAFEDATA - local media = old.mediastyle or "" - local bars = old.barstyle or "" - local units = old.unitstyle or "" - local groups = old.groupstyle or "" - local auras = old.aurastyle or "" - local spec = GetSpecialization() or 1 - SVUI_Profile.STORED[1] = tcopy(SVUI_Profile, true) - SVUI_Profile.STORED[1].LAYOUT = { - mediastyle = media, - barstyle = bars, - unitstyle = units, - groupstyle = groups, - aurastyle = auras - } - SVUI_Profile.SAFEDATA.mediastyle = nil - SVUI_Profile.SAFEDATA.barstyle = nil - SVUI_Profile.SAFEDATA.unitstyle = nil - SVUI_Profile.SAFEDATA.groupstyle = nil - SVUI_Profile.SAFEDATA.aurastyle = nil - SVUI_Profile.SAFEDATA.dualSpecEnabled = false -end - -function SuperVillain:Load() - self:ClearAllTimers() - - if not SVUI_Global then SVUI_Global = {} end - if not SVUI_Global["profiles"] then SVUI_Global["profiles"] = {} end - if SVUI_Global["gold"] then SVUI_Global["gold"] = nil end - if SVUI_Global["profileKeys"] then SVUI_Global["profileKeys"] = nil end - - if not SVUI_Profile then SVUI_Profile = {} end - if not SVUI_Profile.SAFEDATA then SVUI_Profile.SAFEDATA = {dualSpecEnabled = false} end - if not SVUI_Profile.STORED then PrepareStorage() end - if not SVUI_Profile.STORED[2] then - SVUI_Profile.STORED[2] = {} - SVUI_Profile.STORED[2].LAYOUT = SVUI_Profile.STORED[1].LAYOUT - end - if not SVUI_Profile.STORED[3] then - SVUI_Profile.STORED[3] = {} - SVUI_Profile.STORED[3].LAYOUT = SVUI_Profile.STORED[1].LAYOUT - end - for k,v in pairs(SVUI_Profile) do - if(k ~= "STORED" and k ~= "SAFEDATA") then - SVUI_Profile[k] = nil - end - end - - if not SVUI_Cache then SVUI_Cache = {} end - if not SVUI_Cache["Dock"] then SVUI_Cache["Dock"] = {} end - if not SVUI_Cache["Mentalo"] then SVUI_Cache["Mentalo"] = {} end - if not SVUI_Cache["Bindings"] then SVUI_Cache["Bindings"] = {} end - if(not SVUI_Cache["screenheight"] or (SVUI_Cache["screenheight"] and type(SVUI_Cache["screenheight"]) ~= "number")) then - SVUI_Cache["screenheight"] = gxHeight - end - if(not SVUI_Cache["screenwidth"] or (SVUI_Cache["screenwidth"] and type(SVUI_Cache["screenwidth"]) ~= "number")) then - SVUI_Cache["screenwidth"] = gxWidth - end - - self:SetDatabaseObjects(true) - self.Registry:FindAddons() - - self:UIScale(); - self:RefreshSystemFonts(); - self:LoadSystemAlerts(); - - self.UIParent:RegisterEvent('PLAYER_REGEN_DISABLED'); - self.AddonLoaded = true -end - -function SuperVillain:Launch() - self:SetDatabaseObjects(); - self:UIScale("PLAYER_LOGIN"); - self.Registry:LoadRegisteredAddons(); - self:UpdateDatabase(true); - self.Registry:LoadPackages(); - self:DefinePlayerRole(); - self:LoadMovables(); - self:SetSVMovablesPositions(); - - self:VersionCheck() - - self:RefreshAllSystemMedia(); - - NewHook("StaticPopup_Show", self.StaticPopup_Show) - - self.UIParent:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED"); - self.UIParent:RegisterEvent("PLAYER_TALENT_UPDATE"); - self.UIParent:RegisterEvent("CHARACTER_POINTS_CHANGED"); - self.UIParent:RegisterEvent("UNIT_INVENTORY_CHANGED"); - self.UIParent:RegisterEvent("UPDATE_BONUS_ACTIONBAR"); - self.UIParent:RegisterEvent("UI_SCALE_CHANGED"); - self.UIParent:RegisterEvent("PLAYER_ENTERING_WORLD"); - self.UIParent:RegisterEvent("PET_BATTLE_CLOSE"); - self.UIParent:RegisterEvent("PET_BATTLE_OPENING_START"); - self.UIParent:RegisterEvent("ADDON_ACTION_BLOCKED"); - self.UIParent:RegisterEvent("ADDON_ACTION_FORBIDDEN"); - self.UIParent:RegisterEvent("SPELLS_CHANGED"); - - self.Registry:Update("SVMap"); - self.Registry:Update("SVUnit", true); - collectgarbage("collect") - - _G["SVUI_Mentalo"]:SetFixedPanelTemplate("Component") - _G["SVUI_Mentalo"]:SetPanelColor("yellow") - _G["SVUI_MentaloPrecision"]:SetPanelTemplate("Transparent") - - if self.db.system.loginmessage then - local logMsg = (L["LOGIN_MSG"]):format("|cffFFFF1A", "|cffAA78FF", self.___version) - self:AddonMessage(logMsg); - end - - self.AddonLaunched = true -end ---[[ -########################################################## -EVENT HANDLERS -########################################################## -]]-- -local SVUISystem_OnEvent = function(self, event, arg, ...) - if(event == "ADDON_LOADED" and arg == "SVUI") then - if(not SuperVillain.AddonLoaded) then - SuperVillain:Load() - self:UnregisterEvent("ADDON_LOADED") - end - end - if(event == "PLAYER_LOGIN") then - if(not SuperVillain.AddonLaunched and IsLoggedIn()) then - SuperVillain:Launch() - self:UnregisterEvent("PLAYER_LOGIN") - end - end - if(event == "ACTIVE_TALENT_GROUP_CHANGED" or event == "PLAYER_TALENT_UPDATE" or event == "CHARACTER_POINTS_CHANGED" or event == "UNIT_INVENTORY_CHANGED" or event == "UPDATE_BONUS_ACTIONBAR") then - SuperVillain:DefinePlayerRole() - elseif(event == "UI_SCALE_CHANGED") then - SuperVillain:UIScale("UI_SCALE_CHANGED") - elseif(event == "PLAYER_ENTERING_WORLD") then - if(not SuperVillain.RoleIsSet) then - SuperVillain:DefinePlayerRole() - end - if(not SuperVillain.MediaInitialized) then - SuperVillain:RefreshAllSystemMedia() - end - local a,b = IsInInstance() - if(b == "pvp") then - SuperVillain.BGTimer = SuperVillain:ExecuteLoop(RequestBattlefieldScoreData, 5) - elseif(SuperVillain.BGTimer) then - SuperVillain:RemoveLoop(SuperVillain.BGTimer) - SuperVillain.BGTimer = nil - end - elseif(event == "SPELLS_CHANGED") then - if (toonClass ~= "DRUID") then - self:UnregisterEvent("SPELLS_CHANGED") - return - end - if GetSpellInfo(droodSpell1) == droodSpell2 then - SuperVillain.Dispellable["Disease"] = true - elseif(SuperVillain.Dispellable["Disease"]) then - SuperVillain.Dispellable["Disease"] = nil - end - elseif(event == "PET_BATTLE_CLOSE") then - SuperVillain:PushDisplayAudit() - elseif(event == "PET_BATTLE_OPENING_START") then - SuperVillain:FlushDisplayAudit() - elseif(event == "ADDON_ACTION_BLOCKED" or event == "ADDON_ACTION_FORBIDDEN") then - SuperVillain:TaintHandler(arg, ...) - elseif(event == "PLAYER_REGEN_DISABLED") then - local forceClosed = false; - if IsAddOnLoaded("SVUI_ConfigOMatic") then - local aceConfig=LibStub("AceConfigDialog-3.0") - if aceConfig.OpenFrames["SVUI"] then - self:RegisterEvent('PLAYER_REGEN_ENABLED') - aceConfig:Close("SVUI") - forceClosed = true - end - end - if SuperVillain.MentaloFrames then - for frame,_ in pairs(SuperVillain.MentaloFrames) do - if _G[frame] and _G[frame]:IsShown() then - forceClosed = true; - _G[frame]:Hide() - end - end - end - if(HenchmenFrameModel and HenchmenFrame and HenchmenFrame:IsShown()) then - HenchmenFrame:Hide() - HenchmenFrameBG:Hide() - forceClosed = true; - end - if forceClosed == true then - SendAddonMessage(ERR_NOT_IN_COMBAT) - end - elseif(event == "PLAYER_REGEN_ENABLED") then - SuperVillain:ToggleConfig() - self:UnregisterEvent('PLAYER_REGEN_ENABLED') - end -end - -SuperVillain.UIParent:RegisterEvent("ADDON_LOADED") -SuperVillain.UIParent:RegisterEvent("PLAYER_LOGIN") -SuperVillain.UIParent:SetScript("OnEvent", SVUISystem_OnEvent) ---[[ -########################################################## -THE CLEANING LADY -########################################################## -]]-- --- local LemonPledge = 0; --- local Consuela = CreateFrame("Frame", nil) --- Consuela:RegisterAllEvents() --- Consuela:SetScript("OnEvent", function(self, event) --- LemonPledge = LemonPledge + 1 --- if (InCombatLockdown() and LemonPledge > 25000) or (not InCombatLockdown() and LemonPledge > 10000) then --- collectgarbage("collect") --- LemonPledge = 0; --- end --- end) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/timers.lua b/Interface/AddOns/SVUI/system/timers.lua index 4636bd1..042f170 100644 --- a/Interface/AddOns/SVUI/system/timers.lua +++ b/Interface/AddOns/SVUI/system/timers.lua @@ -36,7 +36,7 @@ local tremove = table.remove; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L = unpack(select(2, ...)); --[[ ########################################################## LOCAL VARS @@ -50,12 +50,12 @@ GLOBAL TIMEOUT QUEUE ExecuteTimer: Create a timer that runs once and CANNOT be stopped ExecuteLoop: Create a timer that loops continuously and CAN be removed ]]-- -SuperVillain.TimerCount = 0; +SV.TimerCount = 0; local ExeTimerQueue = {}; local ExeTimerManager = CreateFrame("Frame"); local ExeTimerManager_OnUpdate = function(self, elapsed) - if(SuperVillain.TimerCount > 0) then + if(SV.TimerCount > 0) then for id,_ in pairs(ExeTimerQueue) do local callback = ExeTimerQueue[id] if(callback.f) then @@ -68,7 +68,7 @@ local ExeTimerManager_OnUpdate = function(self, elapsed) ExeTimerQueue[id].t = callback.x else ExeTimerQueue[id] = nil - SuperVillain.TimerCount = SuperVillain.TimerCount - 1; + SV.TimerCount = SV.TimerCount - 1; end end end @@ -77,7 +77,7 @@ local ExeTimerManager_OnUpdate = function(self, elapsed) end ExeTimerManager:SetScript("OnUpdate", ExeTimerManager_OnUpdate) -function SuperVillain:ExecuteTimer(timeOutFunction, duration, idCheck) +function SV:ExecuteTimer(timeOutFunction, duration, idCheck) if(type(duration) == "number" and type(timeOutFunction) == "function") then if(idCheck and ExeTimerQueue[idCheck]) then ExeTimerQueue[idCheck].t = duration @@ -92,7 +92,7 @@ function SuperVillain:ExecuteTimer(timeOutFunction, duration, idCheck) return false end -function SuperVillain:ExecuteLoop(timeOutFunction, duration, idCheck) +function SV:ExecuteLoop(timeOutFunction, duration, idCheck) if(type(duration) == "number" and type(timeOutFunction) == "function") then if(idCheck and ExeTimerQueue[idCheck]) then ExeTimerQueue[idCheck].x = duration @@ -108,14 +108,14 @@ function SuperVillain:ExecuteLoop(timeOutFunction, duration, idCheck) return false end -function SuperVillain:RemoveLoop(id) +function SV:RemoveLoop(id) if(ExeTimerQueue[id]) then ExeTimerQueue[id] = nil self.TimerCount = self.TimerCount - 1; end end -function SuperVillain:ClearAllTimers() +function SV:ClearAllTimers() ExeTimerManager:SetScript("OnUpdate", nil) ExeTimerQueue = {} ExeTimerManager:SetScript("OnUpdate", ExeTimerManager_OnUpdate) @@ -246,7 +246,7 @@ local Cooldown_OnLoad = function(self, start, duration, elapsed) end end -function SuperVillain:AddCD(cooldown) - if not SuperVillain.db.system.cooldown then return end +function SV:AddCD(cooldown) + if not SV.db.system.cooldown then return end hooksecurefunc(cooldown, "SetCooldown", Cooldown_OnLoad) end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/updates.lua b/Interface/AddOns/SVUI/system/updates.lua deleted file mode 100644 index c608be4..0000000 --- a/Interface/AddOns/SVUI/system/updates.lua +++ /dev/null @@ -1,269 +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 select = _G.select; -local pairs = _G.pairs; -local ipairs = _G.ipairs; -local type = _G.type; -local string = _G.string; -local math = _G.math; -local table = _G.table; -local GetTime = _G.GetTime; ---[[ STRING METHODS ]]-- -local format = string.format; ---[[ MATH METHODS ]]-- -local floor = math.floor; -- Basic ---[[ TABLE METHODS ]]-- -local twipe, tsort = table.wipe, table.sort; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SuperVillain, L = unpack(select(2, ...)) ---[[ -########################################################## -LOCALIZED GLOBALS -########################################################## -]]-- -local STANDARD_TEXT_FONT = _G.STANDARD_TEXT_FONT -local UNIT_NAME_FONT = _G.UNIT_NAME_FONT -local DAMAGE_TEXT_FONT = _G.DAMAGE_TEXT_FONT -local SVUI_CLASS_COLORS = _G.SVUI_CLASS_COLORS -local RAID_CLASS_COLORS = _G.RAID_CLASS_COLORS ---[[ -########################################################## -PRE VARS/FUNCTIONS -########################################################## -]]-- -local function SetFont(fontObject, font, fontSize, fontOutline, fontAlpha, color, shadowColor, offsetX, offsetY) - if not font then return end - fontObject:SetFont(font,fontSize,fontOutline); - if fontAlpha then - fontObject:SetAlpha(fontAlpha) - end - if color and type(color) == "table" then - fontObject:SetTextColor(unpack(color)) - end - if shadowColor and type(shadowColor) == "table" then - fontObject:SetShadowColor(unpack(shadowColor)) - end - if offsetX and offsetY then - fontObject:SetShadowOffset(offsetX,offsetY) - end -end ---[[ -########################################################## -CORE FUNCTIONS -########################################################## -]]-- -function SuperVillain:MediaUpdate() - self.Media.color.default = self.db.media.colors.default - self.Media.color.special = self.db.media.colors.special - self.Media.bg.pattern = self.Shared:Fetch("background", self.db.media.textures.pattern) - self.Media.bg.comic = self.Shared:Fetch("background", self.db.media.textures.comic) - self.Media.bg.unitlarge = self.Shared:Fetch("background", self.db.media.textures.unitlarge) - self.Media.bg.unitsmall = self.Shared:Fetch("background", self.db.media.textures.unitsmall) - - local cColor1 = self.Media.color.special - local cColor2 = self.Media.color.default - local r1,g1,b1 = cColor1[1], cColor1[2], cColor1[3] - local r2,g2,b2 = cColor2[1], cColor2[2], cColor2[3] - - self.Media.gradient.special = {"VERTICAL",r1,g1,b1,r2,g2,b2} - - self.Registry:RunCallbacks() -end - -function SuperVillain:RefreshSystemFonts() - local fontsize = self.db.media.fonts.size - local unicodesize = self.db.media.fonts.unicodeSize - - local NUMBER_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.number); - local GIANT_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.giant); - STANDARD_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.default); - UNIT_NAME_FONT = self.Shared:Fetch("font", self.db.media.fonts.name); - DAMAGE_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.combat); - NAMEPLATE_FONT = STANDARD_TEXT_FONT - CHAT_FONT_HEIGHTS = {8,9,10,11,12,13,14,15,16,17,18,19,20} - UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = fontsize - - -- SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32) - -- SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE") - -- SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE") - - SetFont(QuestFont_Large, UNIT_NAME_FONT, fontsize+4) - SetFont(ZoneTextString, UNIT_NAME_FONT, fontsize*4.2, "OUTLINE") - SetFont(SubZoneTextString, UNIT_NAME_FONT, fontsize*3.2, "OUTLINE") - SetFont(PVPInfoTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE") - SetFont(PVPArenaTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE") - SetFont(SystemFont_Shadow_Outline_Huge2, UNIT_NAME_FONT, fontsize*1.8, "OUTLINE") - - SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER_TEXT_FONT, fontsize, "OUTLINE") - SetFont(NumberFont_Outline_Huge, NUMBER_TEXT_FONT, fontsize*2, "THICKOUTLINE", 28) - SetFont(NumberFont_Outline_Large, NUMBER_TEXT_FONT, fontsize+4, "OUTLINE") - SetFont(NumberFont_Outline_Med, NUMBER_TEXT_FONT, fontsize+2, "OUTLINE") - SetFont(NumberFontNormal, NUMBER_TEXT_FONT, fontsize, "OUTLINE") - - SetFont(GameFontHighlight, STANDARD_TEXT_FONT, fontsize) - SetFont(GameFontWhite, STANDARD_TEXT_FONT, fontsize, 'OUTLINE', 1, {1,1,1}) - SetFont(GameFontWhiteSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {1,1,1}) - SetFont(GameFontBlack, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0}) - SetFont(GameFontBlackSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0}) - SetFont(GameFontNormal, STANDARD_TEXT_FONT, fontsize) - SetFont(QuestFont, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Large, STANDARD_TEXT_FONT, fontsize+2) - SetFont(GameFontNormalMed3, STANDARD_TEXT_FONT, fontsize+1) - SetFont(SystemFont_Med1, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Med3, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Outline_Small, STANDARD_TEXT_FONT, fontsize, "OUTLINE") - SetFont(SystemFont_Shadow_Large, STANDARD_TEXT_FONT, fontsize+2) - SetFont(SystemFont_Shadow_Med1, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Shadow_Med3, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Shadow_Small, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Small, STANDARD_TEXT_FONT, fontsize) - SetFont(FriendsFont_Normal, STANDARD_TEXT_FONT, fontsize) - SetFont(FriendsFont_Small, STANDARD_TEXT_FONT, fontsize-2) - SetFont(FriendsFont_Large, STANDARD_TEXT_FONT, fontsize) - SetFont(FriendsFont_UserText, STANDARD_TEXT_FONT, fontsize) - - SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32) - SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, 200, "OUTLINE") - SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, 200, "THICKOUTLINE") - - SetFont(SystemFont_Shadow_Huge3, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") - SetFont(CombatTextFont, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") - - local UNICODE_FONT = self.Media.font.roboto; - - SetFont(GameTooltipHeader, UNICODE_FONT, unicodesize+2) - SetFont(Tooltip_Med, UNICODE_FONT, unicodesize) - SetFont(Tooltip_Small, UNICODE_FONT, unicodesize) - SetFont(GameFontNormalSmall, UNICODE_FONT, unicodesize) - SetFont(GameFontHighlightSmall, UNICODE_FONT, unicodesize) - SetFont(NumberFont_Shadow_Med, UNICODE_FONT, unicodesize) - SetFont(NumberFont_Shadow_Small, UNICODE_FONT, unicodesize) - SetFont(SystemFont_Tiny, UNICODE_FONT, unicodesize) - - self:UpdateFontTemplates() -end - -function SuperVillain:RefreshAllSystemMedia() - local fontsize = self.db.media.fonts.size - local unicodesize = self.db.media.fonts.unicodeSize - - local NUMBER_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.number); - local GIANT_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.giant); - STANDARD_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.default); - UNIT_NAME_FONT = self.Shared:Fetch("font", self.db.media.fonts.name); - DAMAGE_TEXT_FONT = self.Shared:Fetch("font", self.db.media.fonts.combat); - NAMEPLATE_FONT = STANDARD_TEXT_FONT - CHAT_FONT_HEIGHTS = {8,9,10,11,12,13,14,15,16,17,18,19,20} - UIDROPDOWNMENU_DEFAULT_TEXT_HEIGHT = fontsize - - -- SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, fontsize*3, "THICKOUTLINE", 32) - -- SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, fontsize*1.8, "OUTLINE") - -- SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, fontsize*1.8, "THICKOUTLINE") - - SetFont(QuestFont_Large, UNIT_NAME_FONT, fontsize+4) - SetFont(ZoneTextString, UNIT_NAME_FONT, fontsize*4.2, "OUTLINE") - SetFont(SubZoneTextString, UNIT_NAME_FONT, fontsize*3.2, "OUTLINE") - SetFont(PVPInfoTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE") - SetFont(PVPArenaTextString, UNIT_NAME_FONT, fontsize*1.9, "OUTLINE") - SetFont(SystemFont_Shadow_Outline_Huge2, UNIT_NAME_FONT, fontsize*1.8, "OUTLINE") - - SetFont(NumberFont_OutlineThick_Mono_Small, NUMBER_TEXT_FONT, fontsize, "OUTLINE") - SetFont(NumberFont_Outline_Huge, NUMBER_TEXT_FONT, fontsize*2, "THICKOUTLINE", 28) - SetFont(NumberFont_Outline_Large, NUMBER_TEXT_FONT, fontsize+4, "OUTLINE") - SetFont(NumberFont_Outline_Med, NUMBER_TEXT_FONT, fontsize+2, "OUTLINE") - SetFont(NumberFontNormal, NUMBER_TEXT_FONT, fontsize, "OUTLINE") - - SetFont(GameFontHighlight, STANDARD_TEXT_FONT, fontsize) - SetFont(GameFontWhite, STANDARD_TEXT_FONT, fontsize, 'OUTLINE', 1, {1,1,1}) - SetFont(GameFontWhiteSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {1,1,1}) - SetFont(GameFontBlack, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0}) - SetFont(GameFontBlackSmall, STANDARD_TEXT_FONT, fontsize, 'NONE', 1, {0,0,0}) - SetFont(GameFontNormal, STANDARD_TEXT_FONT, fontsize) - SetFont(QuestFont, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Large, STANDARD_TEXT_FONT, fontsize+2) - SetFont(GameFontNormalMed3, STANDARD_TEXT_FONT, fontsize+1) - SetFont(SystemFont_Med1, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Med3, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Outline_Small, STANDARD_TEXT_FONT, fontsize, "OUTLINE") - SetFont(SystemFont_Shadow_Large, STANDARD_TEXT_FONT, fontsize+2) - SetFont(SystemFont_Shadow_Med1, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Shadow_Med3, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Shadow_Small, STANDARD_TEXT_FONT, fontsize) - SetFont(SystemFont_Small, STANDARD_TEXT_FONT, fontsize) - SetFont(FriendsFont_Normal, STANDARD_TEXT_FONT, fontsize) - SetFont(FriendsFont_Small, STANDARD_TEXT_FONT, fontsize-2) - SetFont(FriendsFont_Large, STANDARD_TEXT_FONT, fontsize) - SetFont(FriendsFont_UserText, STANDARD_TEXT_FONT, fontsize) - - SetFont(GameFont_Gigantic, GIANT_TEXT_FONT, 200, "THICKOUTLINE", 32) - SetFont(SystemFont_Shadow_Huge1, GIANT_TEXT_FONT, 200, "OUTLINE") - SetFont(SystemFont_OutlineThick_Huge2, GIANT_TEXT_FONT, 200, "THICKOUTLINE") - - SetFont(SystemFont_Shadow_Huge3, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") - SetFont(CombatTextFont, DAMAGE_TEXT_FONT, 200, "THICKOUTLINE") - - local UNICODE_FONT = self.Media.font.roboto; - - SetFont(GameTooltipHeader, UNICODE_FONT, unicodesize+2) - SetFont(Tooltip_Med, UNICODE_FONT, unicodesize) - SetFont(Tooltip_Small, UNICODE_FONT, unicodesize) - SetFont(GameFontNormalSmall, UNICODE_FONT, unicodesize) - SetFont(GameFontHighlightSmall, UNICODE_FONT, unicodesize) - SetFont(NumberFont_Shadow_Med, UNICODE_FONT, unicodesize) - SetFont(NumberFont_Shadow_Small, UNICODE_FONT, unicodesize) - SetFont(SystemFont_Tiny, UNICODE_FONT, unicodesize) - - self:MediaUpdate() - self.MediaInitialized = true -end ---[[ -########################################################## -INIT SOME COMBAT FONTS -########################################################## -]]-- -do - local fontFile = "Interface\\AddOns\\SVUI\\assets\\fonts\\Combat.ttf" - - DAMAGE_TEXT_FONT = fontFile - NUM_COMBAT_TEXT_LINES = 20; - COMBAT_TEXT_SCROLLSPEED = 1.0; - COMBAT_TEXT_FADEOUT_TIME = 1.0; - COMBAT_TEXT_HEIGHT = 18; - COMBAT_TEXT_CRIT_MAXHEIGHT = 2.0; - COMBAT_TEXT_CRIT_MINHEIGHT = 1.2; - COMBAT_TEXT_CRIT_SCALE_TIME = 0.7; - COMBAT_TEXT_CRIT_SHRINKTIME = 0.2; - COMBAT_TEXT_TO_ANIMATE = {}; - COMBAT_TEXT_STAGGER_RANGE = 20; - COMBAT_TEXT_SPACING = 7; - COMBAT_TEXT_MAX_OFFSET = 130; - COMBAT_TEXT_LOW_HEALTH_THRESHOLD = 0.2; - COMBAT_TEXT_LOW_MANA_THRESHOLD = 0.2; - COMBAT_TEXT_LOCATIONS = {}; - - local fName, fHeight, fFlags = CombatTextFont:GetFont() - - CombatTextFont:SetFont(fontFile, 24, fFlags) -end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/utilities.lua b/Interface/AddOns/SVUI/system/utilities.lua index 99c2177..29e0be2 100644 --- a/Interface/AddOns/SVUI/system/utilities.lua +++ b/Interface/AddOns/SVUI/system/utilities.lua @@ -37,29 +37,124 @@ local iLevelFilter = ITEM_LEVEL:gsub( "%%d", "(%%d+)" ) GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)) +local SV, L = unpack(select(2, ...)) --[[ ########################################################## MISC UTILITY FUNCTIONS ########################################################## ]]-- -function SuperVillain:ColorGradient(perc, ...) - if perc >= 1 then - return select(select('#', ...) - 2, ...) - elseif perc <= 0 then - return ... + +--[[ +########################################################## +DISPEL MECHANICS +########################################################## +]]-- +local RefClassRoles, RefUnitRoles; +local RefMagicSpec; +local PlayerClass = select(2,UnitClass("player")); + +if(PlayerClass == "PRIEST") then + RefClassRoles = {"C", "C", "C"} + RefUnitRoles = {"HEALER", "HEALER", "DAMAGER"} + SV.Dispellable = {["Magic"] = true, ["Disease"] = true} +elseif(PlayerClass == "WARLOCK") then + RefClassRoles = {"C", "C", "C"} + RefUnitRoles = {"DAMAGER", "DAMAGER", "DAMAGER"} +elseif(PlayerClass == "WARRIOR") then + RefClassRoles = {"M", "M", "T"} + RefUnitRoles = {"DAMAGER", "DAMAGER", "TANK"} +elseif(PlayerClass == "HUNTER") then + RefClassRoles = {"M", "M", "M"} + RefUnitRoles = {"DAMAGER", "DAMAGER", "DAMAGER"} +elseif(PlayerClass == "ROGUE") then + RefClassRoles = {"M", "M", "M"} + RefUnitRoles = {"DAMAGER", "DAMAGER", "DAMAGER"} +elseif(PlayerClass == "MAGE") then + RefClassRoles = {"C", "C", "C"} + RefUnitRoles = {"DAMAGER", "DAMAGER", "DAMAGER"} + SV.Dispellable = {["Curse"] = true} +elseif(PlayerClass == "DEATHKNIGHT") then + RefClassRoles = {"T", "M", "M"} + RefUnitRoles = {"TANK", "DAMAGER", "DAMAGER"} +elseif(PlayerClass == "DRUID") then + RefMagicSpec = 4 + RefClassRoles = {"C", "M", "T", "C"} + RefUnitRoles = {"DAMAGER", "DAMAGER", "TANK", "HEALER"} + SV.Dispellable = {["Curse"] = true, ["Poison"] = true} +elseif(PlayerClass == "SHAMAN") then + RefMagicSpec = 3 + RefClassRoles = {"C", "M", "C"} + RefUnitRoles = {"DAMAGER", "DAMAGER", "HEALER"} + SV.Dispellable = {["Curse"] = true} +elseif(PlayerClass == "MONK") then + RefMagicSpec = 2 + RefClassRoles = {"T", "C", "M"} + RefUnitRoles = {"TANK", "HEALER", "DAMAGER"} + SV.Dispellable = {["Disease"] = true, ["Poison"] = true} +elseif(PlayerClass == "PALADIN") then + RefMagicSpec = 1 + RefClassRoles = {"C", "T", "M"} + RefUnitRoles = {"HEALER", "TANK", "DAMAGER"} + SV.Dispellable = {["Poison"] = true, ["Disease"] = true} +end + +local function GetTalentInfo(arg) + if type(arg) == "number" then + return arg == GetActiveSpecGroup(); + else + return false; + end +end + +function SV:DefinePlayerRole() + local spec = GetSpecialization() + local role, unitRole; + if spec then + if(self.CurrentSpec == spec) then return end + role = RefClassRoles[spec] + unitRole = RefUnitRoles[spec] + if role == "T" and UnitLevel("player") == MAX_PLAYER_LEVEL then + local bonus, pvp = GetCombatRatingBonus(COMBAT_RATING_RESILIENCE_PLAYER_DAMAGE_TAKEN), false; + if bonus > GetDodgeChance() and bonus > GetParryChance() then + role = "M" + end + end + self.CurrentSpec = spec + self.RoleIsSet = true + else + local intellect = select(2, UnitStat("player", 4)) + local agility = select(2, UnitStat("player", 2)) + local baseAP, posAP, negAP = UnitAttackPower("player") + local totalAP = baseAP + posAP + negAP; + if totalAP > intellect or agility > intellect then + role = "M" + else + role = "C" + end end - local num = select('#', ...) / 3 - local segment, relperc = modf(perc*(num-1)) - local r1, g1, b1, r2, g2, b2 = select((segment*3)+1, ...) - return r1 + (r2-r1)*relperc, g1 + (g2-g1)*relperc, b1 + (b2-b1)*relperc -end + if self.UnitRole ~= unitRole then + self.UnitRole = unitRole + end + if self.ClassRole ~= role then + self.ClassRole = role; + if self.RoleChangedCallback then + self.RoleChangedCallback() + end + end + if RefMagicSpec then + if(GetTalentInfo(RefMagicSpec)) then + self.Dispellable["Magic"] = true + elseif(self.Dispellable["Magic"]) then + self.Dispellable["Magic"] = nil + end + end +end --[[ ########################################################## POSITIONING UTILITY FUNCTIONS ########################################################## ]]-- -SuperVillain.PointIndexes = { +SV.PointIndexes = { ["TOP"] = "TOP", ["BOTTOM"] = "BOTTOM", ["LEFT"] = "LEFT", @@ -132,7 +227,7 @@ do return "CENTER" end}) - function SuperVillain:ReversePoint(frame, point, target, x, y) + function SV:ReversePoint(frame, point, target, x, y) if((not frame) or (not point)) then return; end local anchor = _inverted[point]; local relative = _translated[point]; @@ -266,7 +361,7 @@ do return iLevel end - function SuperVillain:ParseGearSlots(unit, inspecting, firstCallback, secondCallback) + function SV:ParseGearSlots(unit, inspecting, firstCallback, secondCallback) local category = (inspecting) and "Inspect" or "Character"; local averageLevel,totalSlots,upgradeAdjust,globalName = 0,0,0; for slotName,flags in pairs(_slots) do @@ -369,7 +464,7 @@ do end) end if highest_index == 0 then - cache[pattern] = SuperVillain.fubar + cache[pattern] = SV.fubar else local t = {} t[#t+1] = [=[ @@ -422,7 +517,7 @@ do return cache[pattern] end - function SuperVillain:DeFormat(text, pattern) + function SV:DeFormat(text, pattern) if type(text) ~= "string" then error(("Error: DeFormat text argument %s (%s)."):format(type(text), text), 2) elseif type(pattern) ~= "string" then @@ -444,7 +539,7 @@ local Button_OnEnter = function(self, ...) GameTooltip:Show() end -function SuperVillain:CreateButton(frame, label, anchor, x, y, width, height, tooltip) +function SV:CreateButton(frame, label, anchor, x, y, width, height, tooltip) local button = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate") button:SetWidth(width) button:SetHeight(height) diff --git a/Interface/AddOns/SVUI/system/visibility.lua b/Interface/AddOns/SVUI/system/visibility.lua index d011173..02fb146 100644 --- a/Interface/AddOns/SVUI/system/visibility.lua +++ b/Interface/AddOns/SVUI/system/visibility.lua @@ -26,7 +26,7 @@ local pairs = _G.pairs; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(select(2, ...)); +local SV, L = unpack(select(2, ...)); --[[ ########################################################## LOCALS @@ -40,23 +40,23 @@ local SecureFadeFrames = {}; FRAME VISIBILITY MANAGEMENT ########################################################## ]]-- -function SuperVillain:AddToDisplayAudit(frame) +function SV:AddToDisplayAudit(frame) if frame.IsVisible and frame:GetName() then self.DisplayAudit[frame:GetName()] = true end end -function SuperVillain:FlushDisplayAudit() +function SV:FlushDisplayAudit() if InCombatLockdown() then return end for frame,_ in pairs(self.DisplayAudit)do if _G[frame] then - _G[frame]:SetParent(SuperVillain.Cloaked) + _G[frame]:SetParent(SV.Cloaked) end end DisplayEventHandler:RegisterEvent("PLAYER_REGEN_DISABLED") end -function SuperVillain:PushDisplayAudit() +function SV:PushDisplayAudit() if InCombatLockdown() then return end for frame,_ in pairs(self.DisplayAudit)do if _G[frame] then @@ -67,7 +67,7 @@ function SuperVillain:PushDisplayAudit() end local DisplayAudit_OnEvent = function(self, event, arg, ...) - SuperVillain:PushDisplayAudit() + SV:PushDisplayAudit() end DisplayEventHandler:SetScript("OnEvent", DisplayAudit_OnEvent) @@ -161,7 +161,7 @@ local function HandleFading(this, safeFadeState) SecureFadeManager:SetScript("OnUpdate", SecureFade_OnUpdate) end -function SuperVillain:SecureFadeIn(this, duration, startAlpha, endAlpha) +function SV:SecureFadeIn(this, duration, startAlpha, endAlpha) local safeFadeState = {} safeFadeState.mode = "IN" safeFadeState.timeToFade = duration; @@ -175,7 +175,7 @@ function SuperVillain:SecureFadeIn(this, duration, startAlpha, endAlpha) HandleFading(this, safeFadeState) end -function SuperVillain:SecureFadeOut(this, duration, startAlpha, endAlpha, hideOnFinished) +function SV:SecureFadeOut(this, duration, startAlpha, endAlpha, hideOnFinished) local safeFadeState = {} safeFadeState.mode = "OUT" safeFadeState.timeToFade = duration; @@ -189,7 +189,7 @@ function SuperVillain:SecureFadeOut(this, duration, startAlpha, endAlpha, hideOn HandleFading(this, safeFadeState) end -function SuperVillain:SecureFadeRemoval(this) +function SV:SecureFadeRemoval(this) local i = 1; while SecureFadeFrames[i] do if this == SecureFadeFrames[i] then diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua index 48a2531..993c34d 100644 --- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua +++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua @@ -48,11 +48,11 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L = unpack(SVUI); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(SVUI); +local CONFIGS = SV.Configs local NewHook = hooksecurefunc; -PLUGIN = SuperVillain:Prototype(SVUIAddOnName) +PLUGIN = SV:Prototype(SVUIAddOnName) local SCHEMA = PLUGIN.___schema; _G["WhisperVillain"] = PLUGIN; @@ -431,7 +431,7 @@ LOCAL FUNCTIONS ########################################################## ]]-- local function ServiceMessage(msg) - local msgFrom = SuperVillain.db[SCHEMA].prefix == true and "Minion Answering Service" or ""; + local msgFrom = SV.db[SCHEMA].prefix == true and "Minion Answering Service" or ""; print("|cffffcc1a" .. msgFrom .. ":|r", msg) end @@ -722,7 +722,7 @@ function PLUGIN:AddCaller(caller) PhoneLines[caller].InUse = true; btn:SetPanelColor("green"); self.Docklet:SetPanelColor("green"); - self.Docklet.stateColor = SuperVillain.Media.gradient.green + self.Docklet.stateColor = SV.Media.gradient.green state_text = "on the line."; PlaySoundFile("Sound\\interface\\iQuestUpdate.wav") end @@ -753,16 +753,16 @@ function PLUGIN:GetServiceState() if inUse then if onHold then self.Docklet:SetPanelColor("yellow") - self.Docklet.icon:SetGradient(unpack(SuperVillain.Media.gradient.yellow)) - self.Docklet.stateColor = SuperVillain.Media.gradient.yellow + self.Docklet.icon:SetGradient(unpack(SV.Media.gradient.yellow)) + self.Docklet.stateColor = SV.Media.gradient.yellow else self.Docklet:SetPanelColor("green") - self.Docklet.icon:SetGradient(unpack(SuperVillain.Media.gradient.green)) - self.Docklet.stateColor = SuperVillain.Media.gradient.green + self.Docklet.icon:SetGradient(unpack(SV.Media.gradient.green)) + self.Docklet.stateColor = SV.Media.gradient.green end else self.Docklet:SetPanelColor("default") - self.Docklet.stateColor = SuperVillain.Media.gradient.default + self.Docklet.stateColor = SV.Media.gradient.default end return inUse,onHold end @@ -880,9 +880,9 @@ LOAD AND CONSTRUCT ########################################################## ]]-- function PLUGIN:Load() - if(not SuperVillain.db[SCHEMA].enable) then return end + if(not SV.db[SCHEMA].enable) then return end - self.db = SuperVillain.db[SCHEMA] + self.db = SV.db[SCHEMA] self:RegisterEvent("CHAT_MSG_WHISPER") self:RegisterEvent("CHAT_MSG_BN_WHISPER") @@ -891,7 +891,7 @@ function PLUGIN:Load() local buttonsize = SuperDockToolBarLeft.currentSize - local docklet = CreateFrame("Button", nil, SuperVillain.UIParent) + local docklet = CreateFrame("Button", nil, SV.UIParent) docklet:SetParent(SuperDockToolBarLeft) docklet:Point("LEFT", SuperDockToolBarLeft, "LEFT", 3, 0) docklet:Size(buttonsize, buttonsize) @@ -899,17 +899,17 @@ function PLUGIN:Load() docklet.icon = docklet:CreateTexture(nil, "OVERLAY") docklet.icon:FillInner(docklet,2,2) docklet.icon:SetTexture(ICON_FILE) - docklet.stateColor = SuperVillain.Media.gradient.special + docklet.stateColor = SV.Media.gradient.special docklet.TText = L["Show / Hide Phone Lines"] docklet:RegisterForClicks("AnyUp") - SuperVillain.SVDock:ActivateDockletButton(docklet, AnsweringOnClick) + SV.SVDock:ActivateDockletButton(docklet, AnsweringOnClick) SuperDockToolBarLeft:SetWidth(buttonsize + 4) self.Docklet = docklet - local window = CreateFrame("Frame", nil, SuperVillain.UIParent) + local window = CreateFrame("Frame", nil, SV.UIParent) window:SetFrameStrata("MEDIUM") window:SetWidth(128) window:SetHeight(145) @@ -956,19 +956,19 @@ function PLUGIN:Load() local strMsg - if SuperVillain.db[SCHEMA].autoAnswer == true then + if SV.db[SCHEMA].autoAnswer == true then strMsg = "The Henchmen Operators Are Screening Your Calls.." else strMsg = "The Henchmen Operators Are Standing By.." end - SuperVillain:AddonMessage(strMsg) + SV:AddonMessage(strMsg) local option = { order = 2, type = "toggle", name = "Auto Answer", - get = function(a) return SuperVillain.db[SCHEMA].autoAnswer end, - set = function(a,b) SuperVillain.db[SCHEMA].autoAnswer = b end + get = function(a) return SV.db[SCHEMA].autoAnswer end, + set = function(a,b) SV.db[SCHEMA].autoAnswer = b end }; self:AddOption("autoAnswer", option) @@ -976,8 +976,8 @@ function PLUGIN:Load() order = 3, type = "toggle", name = "Prefix Messages", - get = function(a) return SuperVillain.db[SCHEMA].prefix end, - set = function(a,b) SuperVillain.db[SCHEMA].prefix = b end + get = function(a) return SV.db[SCHEMA].prefix end, + set = function(a,b) SV.db[SCHEMA].prefix = b end }; self:AddOption("prefix", option) end @@ -988,4 +988,4 @@ CONFIGS[SCHEMA] = { ["prefix"] = true } -SuperVillain.Registry:NewPlugin(PLUGIN) \ No newline at end of file +Registry:NewPlugin(PLUGIN) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index a9085cc..d57817f 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -47,11 +47,11 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L = unpack(SVUI); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(SVUI); +local CONFIGS = SV.Configs local NewHook = hooksecurefunc; -PLUGIN = SuperVillain:Prototype(SVUIAddOnName) +PLUGIN = SV:Prototype(SVUIAddOnName) local SCHEMA = PLUGIN.___schema; _G["WarVillain"] = PLUGIN; @@ -60,7 +60,7 @@ _G["WarVillain"] = PLUGIN; GLOBAL SLASH FUNCTIONS ########################################################## ]]-- -BINDING_HEADER_SVUIAOW = "SuperVillain UI: Art of War"; +BINDING_HEADER_SVUIAOW = "Supervillain UI: Art of War"; function SVUISayIncoming() local subzoneText = GetSubZoneText() @@ -87,7 +87,7 @@ local EnemyCache, AlertedCache = {},{} local playerGUID = UnitGUID('player') local playerFaction = UnitFactionGroup("player") local classColor = RAID_CLASS_COLORS -local classColors = SVUI_CLASS_COLORS[SuperVillain.class] +local classColors = SVUI_CLASS_COLORS[SV.class] local classR, classG, classB = classColors.r, classColors.g, classColors.b local classA = 0.35 local fallbackColor = {r=1,g=1,b=1} @@ -398,7 +398,7 @@ end function PLUGIN:UpdateZoneStatus() local zoneText = GetRealZoneText() or GetZoneText() if(not zoneText or zoneText == "") then - SuperVillain:ExecuteTimer(PLUGIN.UpdateZoneStatus, 5) + SV:ExecuteTimer(PLUGIN.UpdateZoneStatus, 5) return end if(zoneText ~= ACTIVE_ZONE) then @@ -558,7 +558,7 @@ local function MakeLogWindow() output:SetClampedToScreen(false) output:SetFrameStrata("MEDIUM") output:SetAllPoints(frame) - output:SetFont(SuperVillain.Media.font.system, 11, "OUTLINE") + output:SetFont(SV.Media.font.system, 11, "OUTLINE") output:SetJustifyH("CENTER") output:SetJustifyV("MIDDLE") output:SetShadowColor(0, 0, 0, 0) @@ -597,7 +597,7 @@ local function MakeCommWindow() local fbText = fallback:CreateFontString(nil, "OVERLAY") fbText:SetAllPoints(fallback) - fbText:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + fbText:SetFont(SV.Media.font.roboto, 12, "NONE") fbText:SetText("Nothing To Broadcast Right Now") frame.Unavailable = fallback @@ -651,7 +651,7 @@ local function MakeCommWindow() poi.Help = help poi.Text = poi:CreateFontString(nil,"OVERLAY") - poi.Text:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + poi.Text:SetFont(SV.Media.font.roboto, 12, "NONE") poi.Text:SetPoint("TOPLEFT", poi, "TOPLEFT", 2, 0) poi.Text:SetPoint("BOTTOMRIGHT", help, "BOTTOMLEFT", -2, 0) poi.Text:SetJustifyH("CENTER") @@ -676,7 +676,7 @@ local function MakeUtilityWindow() local fbText = frame:CreateFontString(nil, "OVERLAY") fbText:SetAllPoints(frame) - fbText:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + fbText:SetFont(SV.Media.font.roboto, 12, "NONE") fbText:SetText("Utilities Coming Soon....") PLUGIN.TOOL = frame @@ -701,26 +701,26 @@ local function MakeInfoWindow() leftColumn:Size(DATA_WIDTH, DATA_HEIGHT) leftColumn:Point("LEFT", frame, "LEFT", 0, 0) leftColumn.lockedOpen = true - SuperVillain.SVStats:NewAnchor(leftColumn, 3, "ANCHOR_CURSOR", nil, "Transparent", true) + SV.SVStats:NewAnchor(leftColumn, 3, "ANCHOR_CURSOR", nil, "Transparent", true) leftColumn:SetFrameLevel(0) local rightColumn = CreateFrame("Frame", "SVUI_ArtOfWarInfoRight", frame) rightColumn:Size(DATA_WIDTH, DATA_HEIGHT) rightColumn:Point("LEFT", leftColumn, "RIGHT", 2, 0) rightColumn.lockedOpen = true - SuperVillain.SVStats:NewAnchor(rightColumn, 3, "ANCHOR_CURSOR", nil, "Transparent", true) + SV.SVStats:NewAnchor(rightColumn, 3, "ANCHOR_CURSOR", nil, "Transparent", true) rightColumn:SetFrameLevel(0) PLUGIN.INFO = frame _G["SVUI_ArtOfWarTool4"].Window = PLUGIN.INFO - SuperVillain.SVStats.BGPanels = { + SV.SVStats.BGPanels = { ["SVUI_ArtOfWarInfoLeft"] = {top = "Honor", middle = "Kills", bottom = "Assists"}, ["SVUI_ArtOfWarInfoRight"] = {top = "Damage", middle = "Healing", bottom = "Deaths"} } - SuperVillain.SVStats:Generate() + SV.SVStats:Generate() PLUGIN.INFO:Hide() end @@ -746,7 +746,7 @@ end local ArtOfWarAlert_OnHide = function() if InCombatLockdown() then - SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); + SV:AddonMessage(ERR_NOT_IN_COMBAT); return; end SuperDockAlertRight:Deactivate() @@ -754,22 +754,22 @@ end local ArtOfWarAlert_OnShow = function(self) if InCombatLockdown() then - SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); + SV:AddonMessage(ERR_NOT_IN_COMBAT); self:Hide() return; end - SuperVillain:SecureFadeIn(self, 0.3, 0, 1) + SV:SecureFadeIn(self, 0.3, 0, 1) SuperDockAlertRight:Activate(self) end local ArtOfWarAlert_OnMouseDown = function(self) -- DO STUFF - SuperVillain:SecureFadeOut(self, 0.5, 1, 0, true) + SV:SecureFadeOut(self, 0.5, 1, 0, true) end local ArtOfWarTool_OnEnter = function(self) if InCombatLockdown() then return; end - self.icon:SetGradient(unpack(SuperVillain.Media.gradient.yellow)) + self.icon:SetGradient(unpack(SV.Media.gradient.yellow)) GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) GameTooltip:ClearLines() GameTooltip:AddLine(self.TText, 1, 1, 1) @@ -783,21 +783,21 @@ local ArtOfWarTool_OnLeave = function(self) end local ArtOfWarTool_OnMouseDown = function(self) - SuperVillain:SecureFadeOut(PLUGIN.LOG, 0.5, 1, 0, true) - SuperVillain:SecureFadeOut(PLUGIN.COMM, 0.5, 1, 0, true) - SuperVillain:SecureFadeOut(PLUGIN.TOOL, 0.5, 1, 0, true) - SuperVillain:SecureFadeOut(PLUGIN.INFO, 0.5, 1, 0, true) - SuperVillain:SecureFadeIn(self.Window, 0.3, 0, 1) + SV:SecureFadeOut(PLUGIN.LOG, 0.5, 1, 0, true) + SV:SecureFadeOut(PLUGIN.COMM, 0.5, 1, 0, true) + SV:SecureFadeOut(PLUGIN.TOOL, 0.5, 1, 0, true) + SV:SecureFadeOut(PLUGIN.INFO, 0.5, 1, 0, true) + SV:SecureFadeIn(self.Window, 0.3, 0, 1) PLUGIN.Title:Clear(); PLUGIN.Title:AddMessage(self.TTitle, 1, 1, 0); end local Scanner_OnMouseDown = function(self) - SuperVillain:SecureFadeOut(PLUGIN.LOG, 0.5, 1, 0, true) - SuperVillain:SecureFadeOut(PLUGIN.COMM, 0.5, 1, 0, true) - SuperVillain:SecureFadeOut(PLUGIN.TOOL, 0.5, 1, 0, true) - SuperVillain:SecureFadeOut(PLUGIN.INFO, 0.5, 1, 0, true) - SuperVillain:SecureFadeIn(self.Window, 0.3, 0, 1) + SV:SecureFadeOut(PLUGIN.LOG, 0.5, 1, 0, true) + SV:SecureFadeOut(PLUGIN.COMM, 0.5, 1, 0, true) + SV:SecureFadeOut(PLUGIN.TOOL, 0.5, 1, 0, true) + SV:SecureFadeOut(PLUGIN.INFO, 0.5, 1, 0, true) + SV:SecureFadeIn(self.Window, 0.3, 0, 1) PLUGIN:PopulateScans() end @@ -838,18 +838,53 @@ local Switch_OnClick = function(self, button) end --[[ ########################################################## +MUNGLUNCH's FAVORITE EMOTE GENERATOR +########################################################## +]]-- +local SpecialEmotes = { + "ROFL", + "SPIT", + "SHOO", + "MOCK", + "TAUNT", + "CRACK", + "FLEX", + "GRIN", + "THREATEN", + "PRAY", + "CACKLE", + "GIGGLE" +} + +local LowHealthEmotes = { + "ROFL", + "CACKLE", + "GIGGLE" +} + +function SVUIEmote() + local index = random(1,#SpecialEmotes) + DoEmote(SpecialEmotes[index]) +end + +local function LowHealth_Emote() + local index = random(1,#LowHealthEmotes) + DoEmote(LowHealthEmotes[index]) +end +--[[ +########################################################## BUILD FUNCTION ########################################################## ]]-- function PLUGIN:Load() - if(not SuperVillain.db[SCHEMA].enable) then return end + if(not SV.db[SCHEMA].enable) then return end local ALERT_HEIGHT = 60; local DOCK_WIDTH = SuperDockWindowRight:GetWidth(); local DOCK_HEIGHT = SuperDockWindowRight:GetHeight(); local BUTTON_SIZE = (DOCK_HEIGHT * 0.25) - 4; - self.db = SuperVillain.db[SCHEMA] + self.db = SV.db[SCHEMA] if(not SVAOW_Data) then SVAOW_Data = {} end if(not SVAOW_Cache) then SVAOW_Cache = {} end @@ -933,7 +968,7 @@ function PLUGIN:Load() title:SetFrameStrata("MEDIUM") title:SetPoint("TOPLEFT", toolBar, "TOPRIGHT",0,0) title:SetPoint("BOTTOMRIGHT", holder, "TOPRIGHT",0,-16) - title:SetFontTemplate(SuperVillain.Media.font.names, 16, "OUTLINE", "CENTER", "MIDDLE") + title:SetFontTemplate(SV.Media.font.names, 16, "OUTLINE", "CENTER", "MIDDLE") title:SetMaxLines(1) title:EnableMouseWheel(false) title:SetFading(false) @@ -964,7 +999,7 @@ function PLUGIN:Load() summary:SetFrameStrata("MEDIUM") summary:SetPoint("TOPLEFT", title, "BOTTOMLEFT",0,0) summary:SetPoint("BOTTOMRIGHT", title, "BOTTOMRIGHT",0,-14) - summary:SetFontTemplate(SuperVillain.Media.font.system, 12, "OUTLINE", "CENTER", "MIDDLE") + summary:SetFontTemplate(SV.Media.font.system, 12, "OUTLINE", "CENTER", "MIDDLE") summary:SetMaxLines(1) summary:EnableMouse(false) summary:SetFading(false) @@ -983,7 +1018,7 @@ function PLUGIN:Load() MakeUtilityWindow() MakeInfoWindow() - SuperVillain:RegisterDocklet("SVUI_ArtOfWarDock", "Art of War", ICON_FILE) + SV:RegisterDocklet("SVUI_ArtOfWarDock", "Art of War", ICON_FILE) holder:Hide() @@ -1010,6 +1045,8 @@ function PLUGIN:Load() self:RegisterEvent("PLAYER_ENTERING_WORLD", "UpdateCommunicator") self:RegisterEvent("UPDATE_BATTLEFIELD_SCORE", "UpdateCommunicator") + + SVUI_Player.Health.LowAlertFunc = LowHealth_Emote end -- /tar Sinnisterr @@ -1019,4 +1056,4 @@ CONFIGS[SCHEMA] = { ["enable"] = true } -SuperVillain.Registry:NewPlugin(PLUGIN) \ No newline at end of file +Registry:NewPlugin(PLUGIN) \ 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 f37ad73..a414e73 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua @@ -29,110 +29,110 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local Ace3Config = LibStub("AceConfig-3.0"); local Ace3ConfigDialog = LibStub("AceConfigDialog-3.0"); -Ace3Config:RegisterOptionsTable("SVUI", SuperVillain.Options); +Ace3Config:RegisterOptionsTable("SVUI", SV.Options); Ace3ConfigDialog:SetDefaultSize("SVUI", 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 = SuperVillain.SVGear; -local BAG = SuperVillain.SVBag; -local OVR = SuperVillain.SVOverride; +local GEAR = SV.SVGear; +local BAG = SV.SVBag; +local OVR = SV.SVOverride; local sortingFunction = function(arg1, arg2) return arg1 < arg2 end local function CommonFontSizeUpdate() - local STANDARDFONTSIZE = SuperVillain.db.media.fonts.size; + local STANDARDFONTSIZE = SV.db.media.fonts.size; local smallfont = STANDARDFONTSIZE - 2; local largefont = STANDARDFONTSIZE + 2; - SuperVillain.db.SVAura.fontSize = STANDARDFONTSIZE; - SuperVillain.db.SVStats.fontSize = STANDARDFONTSIZE; - SuperVillain.db.SVUnit.fontSize = STANDARDFONTSIZE; - SuperVillain.db.SVUnit.auraFontSize = smallfont; + SV.db.SVAura.fontSize = STANDARDFONTSIZE; + SV.db.SVStats.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.auraFontSize = smallfont; - SuperVillain.db.SVBar.fontSize = smallfont; - SuperVillain.db.SVPlate.fontSize = smallfont; + SV.db.SVBar.fontSize = smallfont; + SV.db.SVPlate.fontSize = smallfont; - SuperVillain.db.SVLaborer.fontSize = largefont; + SV.db.SVLaborer.fontSize = largefont; - SuperVillain.db.SVUnit.player.health.fontSize = largefont; - SuperVillain.db.SVUnit.player.power.fontSize = largefont; - SuperVillain.db.SVUnit.player.name.fontSize = largefont; - SuperVillain.db.SVUnit.player.aurabar.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.player.health.fontSize = largefont; + SV.db.SVUnit.player.power.fontSize = largefont; + SV.db.SVUnit.player.name.fontSize = largefont; + SV.db.SVUnit.player.aurabar.fontSize = STANDARDFONTSIZE; - SuperVillain.db.SVUnit.target.health.fontSize = largefont; - SuperVillain.db.SVUnit.target.power.fontSize = largefont; - SuperVillain.db.SVUnit.target.name.fontSize = largefont; - SuperVillain.db.SVUnit.target.aurabar.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.target.health.fontSize = largefont; + SV.db.SVUnit.target.power.fontSize = largefont; + SV.db.SVUnit.target.name.fontSize = largefont; + SV.db.SVUnit.target.aurabar.fontSize = STANDARDFONTSIZE; - SuperVillain.db.SVUnit.focus.health.fontSize = largefont; - SuperVillain.db.SVUnit.focus.power.fontSize = largefont; - SuperVillain.db.SVUnit.focus.name.fontSize = largefont; - SuperVillain.db.SVUnit.focus.aurabar.fontSize = STANDARDFONTSIZE; + SV.db.SVUnit.focus.health.fontSize = largefont; + SV.db.SVUnit.focus.power.fontSize = largefont; + SV.db.SVUnit.focus.name.fontSize = largefont; + SV.db.SVUnit.focus.aurabar.fontSize = STANDARDFONTSIZE; - SuperVillain.db.SVUnit.targettarget.health.fontSize = largefont; - SuperVillain.db.SVUnit.targettarget.power.fontSize = largefont; - SuperVillain.db.SVUnit.targettarget.name.fontSize = largefont; + SV.db.SVUnit.targettarget.health.fontSize = largefont; + SV.db.SVUnit.targettarget.power.fontSize = largefont; + SV.db.SVUnit.targettarget.name.fontSize = largefont; - SuperVillain.db.SVUnit.focustarget.health.fontSize = largefont; - SuperVillain.db.SVUnit.focustarget.power.fontSize = largefont; - SuperVillain.db.SVUnit.focustarget.name.fontSize = largefont; + SV.db.SVUnit.focustarget.health.fontSize = largefont; + SV.db.SVUnit.focustarget.power.fontSize = largefont; + SV.db.SVUnit.focustarget.name.fontSize = largefont; - SuperVillain.db.SVUnit.pet.health.fontSize = largefont; - SuperVillain.db.SVUnit.pet.power.fontSize = largefont; - SuperVillain.db.SVUnit.pet.name.fontSize = largefont; + SV.db.SVUnit.pet.health.fontSize = largefont; + SV.db.SVUnit.pet.power.fontSize = largefont; + SV.db.SVUnit.pet.name.fontSize = largefont; - SuperVillain.db.SVUnit.pettarget.health.fontSize = largefont; - SuperVillain.db.SVUnit.pettarget.power.fontSize = largefont; - SuperVillain.db.SVUnit.pettarget.name.fontSize = largefont; + SV.db.SVUnit.pettarget.health.fontSize = largefont; + SV.db.SVUnit.pettarget.power.fontSize = largefont; + SV.db.SVUnit.pettarget.name.fontSize = largefont; - SuperVillain.db.SVUnit.party.health.fontSize = largefont; - SuperVillain.db.SVUnit.party.power.fontSize = largefont; - SuperVillain.db.SVUnit.party.name.fontSize = largefont; + SV.db.SVUnit.party.health.fontSize = largefont; + SV.db.SVUnit.party.power.fontSize = largefont; + SV.db.SVUnit.party.name.fontSize = largefont; - SuperVillain.db.SVUnit.boss.health.fontSize = largefont; - SuperVillain.db.SVUnit.boss.power.fontSize = largefont; - SuperVillain.db.SVUnit.boss.name.fontSize = largefont; + SV.db.SVUnit.boss.health.fontSize = largefont; + SV.db.SVUnit.boss.power.fontSize = largefont; + SV.db.SVUnit.boss.name.fontSize = largefont; - SuperVillain.db.SVUnit.arena.health.fontSize = largefont; - SuperVillain.db.SVUnit.arena.power.fontSize = largefont; - SuperVillain.db.SVUnit.arena.name.fontSize = largefont; + SV.db.SVUnit.arena.health.fontSize = largefont; + SV.db.SVUnit.arena.power.fontSize = largefont; + SV.db.SVUnit.arena.name.fontSize = largefont; - SuperVillain.db.SVUnit.raid10.health.fontSize = largefont; - SuperVillain.db.SVUnit.raid10.power.fontSize = largefont; - SuperVillain.db.SVUnit.raid10.name.fontSize = largefont; + SV.db.SVUnit.raid10.health.fontSize = largefont; + SV.db.SVUnit.raid10.power.fontSize = largefont; + SV.db.SVUnit.raid10.name.fontSize = largefont; - SuperVillain.db.SVUnit.raid25.health.fontSize = largefont; - SuperVillain.db.SVUnit.raid25.power.fontSize = largefont; - SuperVillain.db.SVUnit.raid25.name.fontSize = largefont; + SV.db.SVUnit.raid25.health.fontSize = largefont; + SV.db.SVUnit.raid25.power.fontSize = largefont; + SV.db.SVUnit.raid25.name.fontSize = largefont; - SuperVillain.db.SVUnit.raid40.health.fontSize = largefont; - SuperVillain.db.SVUnit.raid40.power.fontSize = largefont; - SuperVillain.db.SVUnit.raid40.name.fontSize = largefont; + SV.db.SVUnit.raid40.health.fontSize = largefont; + SV.db.SVUnit.raid40.power.fontSize = largefont; + SV.db.SVUnit.raid40.name.fontSize = largefont; - SuperVillain.db.SVUnit.tank.health.fontSize = largefont; - SuperVillain.db.SVUnit.assist.health.fontSize = largefont; + SV.db.SVUnit.tank.health.fontSize = largefont; + SV.db.SVUnit.assist.health.fontSize = largefont; - SuperVillain:RefreshSystemFonts() + SV:RefreshSystemFonts() end --[[ ########################################################## SET PACKAGE OPTIONS ########################################################## ]]-- -SuperVillain.Options.args.SVUI_Header = { +SV.Options.args.SVUI_Header = { order = 1, type = "header", - name = "You are using |cffff9900Super Villain UI|r - "..L["Version"]..format(": |cff99ff33%s|r", SuperVillain.___version), + name = "You are using |cffff9900Super Villain UI|r - "..L["Version"]..format(": |cff99ff33%s|r", SV.___version), width = "full" } -SuperVillain.Options.args.primary = { +SV.Options.args.primary = { type = "group", order = 1, name = L["Main"], - get = function(j)return SuperVillain.db.system[j[#j]]end, - set = function(j, value)SuperVillain.db.system[j[#j]] = value end, + get = function(j)return SV.db.system[j[#j]]end, + set = function(j, value)SV.db.system[j[#j]] = value end, args = { introGroup1 = { order = 1, @@ -161,7 +161,7 @@ SuperVillain.Options.args.primary = { type = "execute", name = L["Install"], desc = L["Run the installation process."], - func = function() SuperVillain:Install()SuperVillain:ToggleConfig() end + func = function() SV:Install()SV:ToggleConfig() end }, ToggleAnchors = { order = 4, @@ -169,7 +169,7 @@ SuperVillain.Options.args.primary = { type = "execute", name = L["Move Frames"], desc = L["Unlock various elements of the UI to be repositioned."], - func = function() SuperVillain:UseMentalo() end + func = function() SV:UseMentalo() end }, ResetAllMovers = { order = 5, @@ -177,7 +177,7 @@ SuperVillain.Options.args.primary = { type = "execute", name = L["Reset Anchors"], desc = L["Reset all frames to their original positions."], - func = function() SuperVillain:ResetUI() end + func = function() SV:ResetUI() end }, toggleKeybind = { order = 6, @@ -185,11 +185,11 @@ SuperVillain.Options.args.primary = { type = "execute", name = L["Keybind Mode"], func = function() - SuperVillain.SVBar:ToggleKeyBindingMode() - SuperVillain:ToggleConfig() + SV.SVBar:ToggleKeyBindingMode() + SV:ToggleConfig() GameTooltip:Hide() end, - disabled = function() return not SuperVillain.db.SVBar.enable end + disabled = function() return not SV.db.SVBar.enable end } }, }, @@ -204,13 +204,13 @@ SuperVillain.Options.args.primary = { } }; -SuperVillain.Options.args.common = { +SV.Options.args.common = { type = "group", order = 2, name = L["General"], childGroups = "tab", - get = function(j)return SuperVillain.db.system[j[#j]]end, - set = function(j, value)SuperVillain.db.system[j[#j]] = value end, + get = function(j)return SV.db.system[j[#j]]end, + set = function(j, value)SV.db.system[j[#j]] = value end, args = { commonGroup = { order = 1, @@ -234,31 +234,31 @@ SuperVillain.Options.args.common = { name = L["Auto Scale"], desc = L["Automatically scale the User Interface based on your screen resolution"], type = "toggle", - get = function(j)return SuperVillain.db.system.autoScale end, - set = function(j,value)SuperVillain.db.system.autoScale = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.system.autoScale end, + set = function(j,value)SV.db.system.autoScale = value;SV:StaticPopup_Show("RL_CLIENT")end }, multiMonitor = { order = 2, name = L["Multi Monitor"], desc = L["Adjust UI dimensions to accomodate for multiple monitor setups"], type = "toggle", - get = function(j)return SuperVillain.db.system.multiMonitor end, - set = function(j,value)SuperVillain.db.system.multiMonitor = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.system.multiMonitor end, + set = function(j,value)SV.db.system.multiMonitor = value;SV:StaticPopup_Show("RL_CLIENT")end }, hideErrorFrame = { order = 3, name = L["Hide Error Text"], desc = L["Hides the red error text at the top of the screen while in combat."], type = "toggle", - get = function(j)return SuperVillain.db.system.hideErrorFrame end, - set = function(j,value)SuperVillain.db.system.hideErrorFrame = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.system.hideErrorFrame end, + set = function(j,value)SV.db.system.hideErrorFrame = value;SV:StaticPopup_Show("RL_CLIENT")end }, LoginMessage = { order = 4, type = 'toggle', name = L['Login Message'], - get = function(j)return SuperVillain.db.system.loginmessage end, - set = function(j,value)SuperVillain.db.system.loginmessage = value end + get = function(j)return SV.db.system.loginmessage end, + set = function(j,value)SV.db.system.loginmessage = value end }, } }, @@ -273,16 +273,16 @@ SuperVillain.Options.args.common = { type = "toggle", name = L['Loot Frame'], desc = L['Enable/Disable the loot frame.'], - get = function()return SuperVillain.db.SVOverride.loot end, - set = function(j,value)SuperVillain.db.SVOverride.loot = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function()return SV.db.SVOverride.loot end, + set = function(j,value)SV.db.SVOverride.loot = value;SV:StaticPopup_Show("RL_CLIENT")end }, lootRoll = { order = 2, type = "toggle", name = L['Loot Roll'], desc = L['Enable/Disable the loot roll frame.'], - get = function()return SuperVillain.db.SVOverride.lootRoll end, - set = function(j,value)SuperVillain.db.SVOverride.lootRoll = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function()return SV.db.SVOverride.lootRoll end, + set = function(j,value)SV.db.SVOverride.lootRoll = value;SV:StaticPopup_Show("RL_CLIENT")end }, lootRollWidth = { order = 3, @@ -292,7 +292,7 @@ SuperVillain.Options.args.common = { min = 100, max = 328, step = 1, - get = function()return SuperVillain.db.SVOverride.lootRollWidth end, + get = function()return SV.db.SVOverride.lootRollWidth end, set = function(a,b)OVR:ChangeDBVar(b,a[#a]); end, }, lootRollHeight = { @@ -303,7 +303,7 @@ SuperVillain.Options.args.common = { min = 14, max = 58, step = 1, - get = function()return SuperVillain.db.SVOverride.lootRollHeight end, + get = function()return SV.db.SVOverride.lootRollHeight end, set = function(a,b)OVR:ChangeDBVar(b,a[#a]); end, }, } @@ -318,56 +318,56 @@ SuperVillain.Options.args.common = { order = 1, type = 'toggle', name = L["Enable Comic Popups"], - get = function(j)return SuperVillain.db.system.comix end, - set = function(j,value)SuperVillain.db.system.comix = value;SuperVillain:ToggleComix()end + get = function(j)return SV.db.system.comix end, + set = function(j,value)SV.db.system.comix = value;SV:ToggleComix()end }, bigComix = { order = 1, type = 'toggle', name = L["Include Large Comics"], - disabled = function() return not SuperVillain.db.system.comix end, - get = function(j) return SuperVillain.db.system.bigComix end, - set = function(j,value) SuperVillain.db.system.bigComix = value end + disabled = function() return not SV.db.system.comix end, + get = function(j) return SV.db.system.bigComix end, + set = function(j,value) SV.db.system.bigComix = value end }, bubbles = { order = 2, type = "toggle", name = L['Chat Bubbles Style'], desc = L['Style the blizzard chat bubbles.'], - get = function(j)return SuperVillain.db.system.bubbles end, - set = function(j,value)SuperVillain.db.system.bubbles = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.system.bubbles end, + set = function(j,value)SV.db.system.bubbles = value;SV:StaticPopup_Show("RL_CLIENT")end }, woot = { order = 3, type = 'toggle', name = L["Say Thanks"], desc = L["Thank someone when they cast specific spells on you. Typically resurrections"], - get = function(j)return SuperVillain.db.system.woot end, - set = function(j,value)SuperVillain.db.system.woot = value;SuperVillain:ToggleReactions()end + get = function(j)return SV.db.system.woot end, + set = function(j,value)SV.db.system.woot = value;SV:ToggleReactions()end }, pvpinterrupt = { order = 4, type = 'toggle', name = L["Report PVP Actions"], desc = L["Announce your interrupts, as well as when you have been sapped!"], - get = function(j)return SuperVillain.db.system.pvpinterrupt end, - set = function(j,value)SuperVillain.db.system.pvpinterrupt = value;SuperVillain:ToggleReactions()end + get = function(j)return SV.db.system.pvpinterrupt end, + set = function(j,value)SV.db.system.pvpinterrupt = value;SV:ToggleReactions()end }, lookwhaticando = { order = 5, type = 'toggle', name = L["Report Spells"], desc = L["Announce various helpful spells cast by players in your party/raid"], - get = function(j)return SuperVillain.db.system.lookwhaticando end, - set = function(j,value)SuperVillain.db.system.lookwhaticando = value;SuperVillain:ToggleReactions()end + get = function(j)return SV.db.system.lookwhaticando end, + set = function(j,value)SV.db.system.lookwhaticando = value;SV:ToggleReactions()end }, sharingiscaring = { order = 6, type = 'toggle', name = L["Report Shareables"], desc = L["Announce when someone in your party/raid has laid a feast or repair bot"], - get = function(j)return SuperVillain.db.system.sharingiscaring end, - set = function(j,value)SuperVillain.db.system.sharingiscaring = value;SuperVillain:ToggleReactions()end + get = function(j)return SV.db.system.sharingiscaring end, + set = function(j,value)SV.db.system.sharingiscaring = value;SV:ToggleReactions()end }, } }, @@ -381,19 +381,19 @@ SuperVillain.Options.args.common = { order = 1, type = "toggle", name = L['Threat Thermometer'], - get = function(j)return SuperVillain.db.system.threatbar end, - set = function(j, value)SuperVillain.db.system.threatbar = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.system.threatbar end, + set = function(j, value)SV.db.system.threatbar = value;SV:StaticPopup_Show("RL_CLIENT")end }, totems = { order = 2, type = "toggle", name = L["Totems"], get = function(j) - return SuperVillain.db.system.totems.enable + return SV.db.system.totems.enable end, set = function(j, value) - SuperVillain.db.system.totems.enable = value; - SuperVillain:StaticPopup_Show("RL_CLIENT") + SV.db.system.totems.enable = value; + SV:StaticPopup_Show("RL_CLIENT") end }, cooldownText = { @@ -401,8 +401,8 @@ SuperVillain.Options.args.common = { order = 3, name = L['Cooldown Text'], desc = L["Display cooldown text on anything with the cooldown spiral."], - get = function(j)return SuperVillain.db.system.cooldown end, - set = function(j,value)SuperVillain.db.system.cooldown = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.system.cooldown end, + set = function(j,value)SV.db.system.cooldown = value;SV:StaticPopup_Show("RL_CLIENT")end }, size = { order = 4, @@ -413,10 +413,10 @@ SuperVillain.Options.args.common = { max = 60, step = 1, get = function(j) - return SuperVillain.db.system.totems[j[#j]] + return SV.db.system.totems[j[#j]] end, set = function(j, value) - SuperVillain.db.system.totems[j[#j]] = value + SV.db.system.totems[j[#j]] = value end }, spacing = { @@ -428,10 +428,10 @@ SuperVillain.Options.args.common = { max = 10, step = 1, get = function(j) - return SuperVillain.db.system.totems[j[#j]] + return SV.db.system.totems[j[#j]] end, set = function(j, value) - SuperVillain.db.system.totems[j[#j]] = value + SV.db.system.totems[j[#j]] = value end }, sortDirection = { @@ -443,10 +443,10 @@ SuperVillain.Options.args.common = { ['DESCENDING'] = L['Descending'] }, get = function(j) - return SuperVillain.db.system.totems[j[#j]] + return SV.db.system.totems[j[#j]] end, set = function(j, value) - SuperVillain.db.system.totems[j[#j]] = value + SV.db.system.totems[j[#j]] = value end }, showBy = { @@ -458,10 +458,10 @@ SuperVillain.Options.args.common = { ['HORIZONTAL'] = L['Horizontal'] }, get = function(j) - return SuperVillain.db.system.totems[j[#j]] + return SV.db.system.totems[j[#j]] end, set = function(j, value) - SuperVillain.db.system.totems[j[#j]] = value + SV.db.system.totems[j[#j]] = value end } } @@ -472,8 +472,8 @@ SuperVillain.Options.args.common = { order = 2, type = "group", name = L["Media"], - get = function(j)return SuperVillain.db.system[j[#j]]end, - set = function(j, value)SuperVillain.db.system[j[#j]] = value end, + get = function(j)return SV.db.system[j[#j]]end, + set = function(j, value)SV.db.system[j[#j]] = value end, args = { texture = { order = 1, @@ -481,11 +481,11 @@ SuperVillain.Options.args.common = { name = L["Textures"], guiInline = true, get = function(key) - return SuperVillain.db.media.textures[key[#key]] + return SV.db.media.textures[key[#key]] end, set = function(key, value) - SuperVillain.db.media.textures[key[#key]] = {"background", value} - SuperVillain:RefreshEverything(true) + SV.db.media.textures[key[#key]] = {"background", value} + SV:RefreshEverything(true) end, args = { pattern = { @@ -519,7 +519,7 @@ SuperVillain.Options.args.common = { min = 6, max = 22, step = 1, - set = function(j,value)SuperVillain.db.media.fonts[j[#j]] = value;CommonFontSizeUpdate()end + set = function(j,value)SV.db.media.fonts[j[#j]] = value;CommonFontSizeUpdate()end }, unicodeSize = { order = 2, @@ -530,7 +530,7 @@ SuperVillain.Options.args.common = { min = 6, max = 22, step = 1, - set = function(j,value)SuperVillain.db.media.fonts[j[#j]] = value;CommonFontSizeUpdate()end + set = function(j,value)SV.db.media.fonts[j[#j]] = value;CommonFontSizeUpdate()end }, fontSpacer1 = { order = 3, @@ -551,8 +551,8 @@ SuperVillain.Options.args.common = { name = L["Default Font"], desc = L["Set/Override the global UI font. |cff00FF00NOTE:|r |cff00FF99This WILL NOT affect configurable fonts.|r"], values = AceGUIWidgetLSMlists.font, - get = function(j)return SuperVillain.db.media.fonts[j[#j]]end, - set = function(j,value)SuperVillain.db.media.fonts[j[#j]] = value;SuperVillain:RefreshSystemFonts()end + get = function(j)return SV.db.media.fonts[j[#j]]end, + set = function(j,value)SV.db.media.fonts[j[#j]] = value;SV:RefreshSystemFonts()end }, name = { type = "select", @@ -561,8 +561,8 @@ SuperVillain.Options.args.common = { name = L["Unit Name Font"], desc = L["Set/Override the global name font. |cff00FF00NOTE:|r |cff00FF99This WILL NOT affect styled nameplates or unitframes.|r"], values = AceGUIWidgetLSMlists.font, - get = function(j)return SuperVillain.db.media.fonts[j[#j]]end, - set = function(j,value)SuperVillain.db.media.fonts[j[#j]] = value;SuperVillain:RefreshSystemFonts()end + get = function(j)return SV.db.media.fonts[j[#j]]end, + set = function(j,value)SV.db.media.fonts[j[#j]] = value;SV:RefreshSystemFonts()end }, combat = { type = "select", @@ -571,8 +571,8 @@ SuperVillain.Options.args.common = { name = L["CombatText Font"], desc = L["Set/Override the font that combat text will use. |cffFF0000NOTE:|r |cffFF9900This requires a game restart or re-log for this change to take effect.|r"], values = AceGUIWidgetLSMlists.font, - get = function(j)return SuperVillain.db.media.fonts[j[#j]]end, - set = function(j,value)SuperVillain.db.media.fonts[j[#j]] = value;SuperVillain:RefreshSystemFonts()SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(j)return SV.db.media.fonts[j[#j]]end, + set = function(j,value)SV.db.media.fonts[j[#j]] = value;SV:RefreshSystemFonts()SV:StaticPopup_Show("RL_CLIENT")end }, number = { type = "select", @@ -581,8 +581,8 @@ SuperVillain.Options.args.common = { name = L["Numbers Font"], desc = L["Set/Override the global font used for numbers. |cff00FF00NOTE:|r |cff00FF99This WILL NOT affect all numbers.|r"], values = AceGUIWidgetLSMlists.font, - get = function(j)return SuperVillain.db.media.fonts[j[#j]]end, - set = function(j,value)SuperVillain.db.media.fonts[j[#j]] = value;SuperVillain:RefreshSystemFonts()end + get = function(j)return SV.db.media.fonts[j[#j]]end, + set = function(j,value)SV.db.media.fonts[j[#j]] = value;SV:RefreshSystemFonts()end }, } }, @@ -599,12 +599,12 @@ SuperVillain.Options.args.common = { desc = L["Main color used by most UI elements. (ex: Backdrop Color)"], hasAlpha = true, get = function(key) - local color = SuperVillain.db.media.colors.default + local color = SV.db.media.colors.default return color[1],color[2],color[3],color[4] end, set = function(key, rValue, gValue, bValue, aValue) - SuperVillain.db.media.colors.default = {rValue, gValue, bValue, aValue} - SuperVillain:MediaUpdate() + SV.db.media.colors.default = {rValue, gValue, bValue, aValue} + SV:MediaUpdate() end, }, special = { @@ -614,12 +614,12 @@ SuperVillain.Options.args.common = { desc = L["Color used in various frame accents. (ex: Dressing Room Backdrop Color)"], hasAlpha = true, get = function(key) - local color = SuperVillain.db.media.colors.special + local color = SV.db.media.colors.special return color[1],color[2],color[3],color[4] end, set = function(key, rValue, gValue, bValue, aValue) - SuperVillain.db.media.colors.special = {rValue, gValue, bValue, aValue} - SuperVillain:MediaUpdate() + SV.db.media.colors.special = {rValue, gValue, bValue, aValue} + SV:MediaUpdate() end, }, resetbutton = { @@ -627,9 +627,9 @@ SuperVillain.Options.args.common = { order = 3, name = L["Restore Defaults"], func = function() - SuperVillain.db.media.colors.default = {0.15, 0.15, 0.15, 1}; - SuperVillain.db.media.colors.special = {0.4, 0.32, 0.2, 1}; - SuperVillain:MediaUpdate() + SV.db.media.colors.default = {0.15, 0.15, 0.15, 1}; + SV.db.media.colors.special = {0.4, 0.32, 0.2, 1}; + SV:MediaUpdate() end } } @@ -640,8 +640,8 @@ SuperVillain.Options.args.common = { order = 3, type = 'group', name = L['Gear Managment'], - get = function(a)return SuperVillain.db.SVGear[a[#a]]end, - set = function(a,b)SuperVillain.db.SVGear[a[#a]]=b;GEAR:ReLoad()end, + get = function(a)return SV.db.SVGear[a[#a]]end, + set = function(a,b)SV.db.SVGear[a[#a]]=b;GEAR:ReLoad()end, args={ intro={ order = 1, @@ -666,15 +666,15 @@ SuperVillain.Options.args.common = { order=1, name=L["Enable"], desc=L['Enable/Disable the specialization switch.'], - get=function(e)return SuperVillain.db.SVGear.specialization.enable end, - set=function(e,value) SuperVillain.db.SVGear.specialization.enable = value end + get=function(e)return SV.db.SVGear.specialization.enable end, + set=function(e,value) SV.db.SVGear.specialization.enable = value end }, primary={ type="select", order=2, name=L["Primary Talent"], desc=L["Choose the equipment set to use for your primary specialization."], - disabled=function()return not SuperVillain.db.SVGear.specialization.enable end, + disabled=function()return not SV.db.SVGear.specialization.enable end, values=function() local h={["none"]=L["No Change"]} for i=1,GetNumEquipmentSets()do @@ -690,7 +690,7 @@ SuperVillain.Options.args.common = { order=3, name=L["Secondary Talent"], desc=L["Choose the equipment set to use for your secondary specialization."], - disabled=function()return not SuperVillain.db.SVGear.specialization.enable end, + disabled=function()return not SV.db.SVGear.specialization.enable end, values=function() local h={["none"]=L["No Change"]} for i=1,GetNumEquipmentSets()do @@ -716,15 +716,15 @@ SuperVillain.Options.args.common = { order = 1, name = L["Enable"], desc = L["Enable/Disable the battleground switch."], - get = function(e)return SuperVillain.db.SVGear.battleground.enable end, - set = function(e,value)SuperVillain.db.SVGear.battleground.enable = value end + get = function(e)return SV.db.SVGear.battleground.enable end, + set = function(e,value)SV.db.SVGear.battleground.enable = value end }, equipmentset = { type = "select", order = 2, name = L["Equipment Set"], desc = L["Choose the equipment set to use when you enter a battleground or arena."], - disabled = function()return not SuperVillain.db.SVGear.battleground.enable end, + disabled = function()return not SV.db.SVGear.battleground.enable end, values = function() local h = {["none"] = L["No Change"]} for i = 1,GetNumEquipmentSets()do @@ -747,8 +747,8 @@ SuperVillain.Options.args.common = { name = DURABILITY, guiInline = true, order = 5, - get = function(e)return SuperVillain.db.SVGear.durability[e[#e]]end, - set = function(e,value)SuperVillain.db.SVGear.durability[e[#e]] = value;GEAR:ReLoad()end, + get = function(e)return SV.db.SVGear.durability[e[#e]]end, + set = function(e,value)SV.db.SVGear.durability[e[#e]] = value;GEAR:ReLoad()end, args = { enable = { type = "toggle", @@ -761,7 +761,7 @@ SuperVillain.Options.args.common = { order = 2, name = L["Damaged Only"], desc = L["Only show durability information for items that are damaged."], - disabled = function()return not SuperVillain.db.SVGear.durability.enable end + disabled = function()return not SV.db.SVGear.durability.enable end } } }, @@ -775,8 +775,8 @@ SuperVillain.Options.args.common = { name = STAT_AVERAGE_ITEM_LEVEL, guiInline = true, order = 7, - get = function(e)return SuperVillain.db.SVGear.itemlevel[e[#e]]end, - set = function(e,value)SuperVillain.db.SVGear.itemlevel[e[#e]] = value;GEAR:ReLoad()end, + get = function(e)return SV.db.SVGear.itemlevel[e[#e]]end, + set = function(e,value)SV.db.SVGear.itemlevel[e[#e]] = value;GEAR:ReLoad()end, args = { enable = { type = "toggle", @@ -791,9 +791,9 @@ SuperVillain.Options.args.common = { name = L["Miscellaneous"], guiInline = true, order = 8, - get = function(e)return SuperVillain.db.SVGear.misc[e[#e]]end, - set = function(e,value)SuperVillain.db.SVGear.misc[e[#e]] = value end, - disabled = function()return not SuperVillain.db.SVBag.enable end, + get = function(e)return SV.db.SVGear.misc[e[#e]]end, + set = function(e,value)SV.db.SVGear.misc[e[#e]] = value end, + disabled = function()return not SV.db.SVBag.enable end, args = { setoverlay = { type = "toggle", @@ -801,7 +801,7 @@ SuperVillain.Options.args.common = { name = L["Equipment Set Overlay"], desc = L["Show the associated equipment sets for the items in your bags (or bank)."], set = function(e,value) - SuperVillain.db.SVGear.misc[e[#e]] = value; + SV.db.SVGear.misc[e[#e]] = value; BAG:ToggleEquipmentOverlay() end } @@ -844,7 +844,7 @@ end local creditsString = credit_header..'\n'..credit_sub..'\n'..credit_sub2..'\n'..special_thanks..'\n\n'..coding..q..'\n\n'..testing..r..'\n\n'..doners..dnt..'\n\n'..music..'\n\n'; -SuperVillain.Options.args.credits = { +SV.Options.args.credits = { type = "group", name = L["Credits"], order = -1, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua b/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua index 11b5564..91a6a22 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua @@ -16,7 +16,7 @@ S U P E R - V I L L A I N - U I By: Munglunch # GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local gameLocale = GetLocale() if gameLocale == "enUS" then L["AURAS_DESC"] = "Configure the aura icons that appear near the minimap." diff --git a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua index 7e5052a..01c1808 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/Libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua @@ -101,7 +101,7 @@ local function UpdateButton(button, treeline, selected, canExpand, isExpanded) button.icon:SetTexture(icon) button.icon:SetPoint("LEFT", 8 * level, (level == 1) and 0 or 1) else - button.icon:SetTexture("") + button.icon:SetTexture(0,0,0,0) end if iconCoords then diff --git a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua index a63260c..f8411b4 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/Libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua @@ -83,7 +83,7 @@ local function Constructor() frame:SetScript("OnMouseDown", Label_OnClick) local highlight = frame:CreateTexture(nil, "HIGHLIGHT") - highlight:SetTexture("") + highlight:SetTexture(0,0,0,0) highlight:SetAllPoints() highlight:SetBlendMode("ADD") diff --git a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/prototypes.lua b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/prototypes.lua index 7347931..6d304c7 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/prototypes.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0-SharedMediaWidgets/prototypes.lua @@ -268,7 +268,7 @@ do frame:ClearAllPoints() frame:Hide() frame:SetBackdrop(frameBackdrop) - frame.bgTex:SetTexture("") + frame.bgTex:SetTexture(0,0,0,0) table.insert(DropDownCache, frame) return nil end diff --git a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua index f54cce4..0e6236d 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/widgets/AceGUIContainer-TreeGroup.lua @@ -101,7 +101,7 @@ local function UpdateButton(button, treeline, selected, canExpand, isExpanded) button.icon:SetTexture(icon) button.icon:SetPoint("LEFT", 8 * level, (level == 1) and 0 or 1) else - button.icon:SetTexture("") + button.icon:SetTexture(0,0,0,0) end if iconCoords then diff --git a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua index a63260c..f8411b4 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/libs/AceGUI-3.0/widgets/AceGUIWidget-InteractiveLabel.lua @@ -83,7 +83,7 @@ local function Constructor() frame:SetScript("OnMouseDown", Label_OnClick) local highlight = frame:CreateTexture(nil, "HIGHLIGHT") - highlight:SetTexture("") + highlight:SetTexture(0,0,0,0) highlight:SetAllPoints() highlight:SetBlendMode("ADD") diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/art.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/art.lua index 43fbae5..903afb3 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/art.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/art.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -SuperVillain.Options.args.SVStyle={ +local SV, L = unpack(SVUI); +SV.Options.args.SVStyle={ type = "group", name = L["UI Styling"], childGroups = "tree", @@ -44,23 +44,23 @@ SuperVillain.Options.args.SVStyle={ order = 2, type = "toggle", name = "Standard UI Styling", - get = function(a)return SuperVillain.db.SVStyle.blizzard.enable end, - set = function(a,b)SuperVillain.db.SVStyle.blizzard.enable = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(a)return SV.db.SVStyle.blizzard.enable end, + set = function(a,b)SV.db.SVStyle.blizzard.enable = b;SV:StaticPopup_Show("RL_CLIENT")end }, addonEnable = { order = 3, type = "toggle", name = "Addon Styling", - get = function(a)return SuperVillain.db.SVStyle.addons.enable end, - set = function(a,b)SuperVillain.db.SVStyle.addons.enable = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(a)return SV.db.SVStyle.addons.enable end, + set = function(a,b)SV.db.SVStyle.addons.enable = b;SV:StaticPopup_Show("RL_CLIENT")end }, blizzard = { order = 300, type = "group", name = "Individual Mods", - get = function(a)return SuperVillain.db.SVStyle.blizzard[a[#a]]end, - set = function(a,b)SuperVillain.db.SVStyle.blizzard[a[#a]] = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end, - disabled = function()return not SuperVillain.db.SVStyle.blizzard.enable end, + get = function(a)return SV.db.SVStyle.blizzard[a[#a]]end, + set = function(a,b)SV.db.SVStyle.blizzard[a[#a]] = b;SV:StaticPopup_Show("RL_CLIENT")end, + disabled = function()return not SV.db.SVStyle.blizzard.enable end, guiInline = true, args = { bmah = { diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua index 58c757c..a201c73 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/aura.lua @@ -29,9 +29,9 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVAura; -local MAP = SuperVillain.SVMap; +local SV, L = unpack(SVUI); +local MOD = SV.SVAura; +local MAP = SV.SVMap; --[[ ########################################################## SET PACKAGE OPTIONS @@ -155,11 +155,11 @@ local auraOptionsTemplate = { }, } -SuperVillain.Options.args.SVAura = { +SV.Options.args.SVAura = { type = "group", name = BUFFOPTIONS_LABEL, childGroups = "tab", - get = function(a)return SuperVillain.db.SVAura[a[#a]]end, + get = function(a)return SV.db.SVAura[a[#a]]end, set = function(a,b) MOD:ChangeDBVar(b,a[#a]); MOD:UpdateAuraHeader(SVUI_PlayerBuffs) @@ -175,15 +175,15 @@ SuperVillain.Options.args.SVAura = { order = 2, type = "toggle", name = L["Enable"], - get = function(a)return SuperVillain.db.SVAura.enable end, - set = function(a,b)SuperVillain.db.SVAura.enable = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + 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 SuperVillain.db.SVAura.disableBlizzard end, - set = function(a,b)SuperVillain.db.SVAura.disableBlizzard = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + 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, @@ -270,7 +270,7 @@ SuperVillain.Options.args.SVAura = { order = 20, type = "group", name = L["Hyper Buffs"], - get = function(b)return SuperVillain.db.SVAura.hyperBuffs[b[#b]]end, + get = function(b)return SV.db.SVAura.hyperBuffs[b[#b]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a],"hyperBuffs");MOD:ToggleConsolidatedBuffs();MAP:ReLoad();MOD:UpdateAuraHeader(SVUI_PlayerBuffs)end, args = { enable = { @@ -278,14 +278,14 @@ SuperVillain.Options.args.SVAura = { type = "toggle", name = L["Enable"], desc = L["Display the consolidated buffs bar."], - disabled = function()return not SuperVillain.db.SVMap.enable end, + 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 SuperVillain.db.SVAura.hyperBuffs.enable end, + disabled = function()return not SV.db.SVAura.hyperBuffs.enable end, } } }, @@ -293,7 +293,7 @@ SuperVillain.Options.args.SVAura = { order = 30, type = "group", name = L["Buffs"], - get = function(b)return SuperVillain.db.SVAura.buffs[b[#b]]end, + 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)end, args = auraOptionsTemplate }, @@ -301,7 +301,7 @@ SuperVillain.Options.args.SVAura = { order = 40, type = "group", name = L["Debuffs"], - get = function(b)return SuperVillain.db.SVAura.debuffs[b[#b]]end, + 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)end, args = auraOptionsTemplate } diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua index 8743824..a40f619 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/bag.lua @@ -29,9 +29,9 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); -local MOD = SuperVillain.SVBag +local MOD = SV.SVBag local pointList = { ["TOPLEFT"] = "TOPLEFT", @@ -40,11 +40,11 @@ local pointList = { ["BOTTOMRIGHT"] = "BOTTOMRIGHT", } -SuperVillain.Options.args.SVBag = { +SV.Options.args.SVBag = { type = 'group', name = L['Bags'], childGroups = "tab", - get = function(a)return SuperVillain.db.SVBag[a[#a]]end, + get = function(a)return SV.db.SVBag[a[#a]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a]) end, args = { intro = { @@ -57,8 +57,8 @@ SuperVillain.Options.args.SVBag = { type = "toggle", name = L["Enable"], desc = L["Enable/Disable the all-in-one bag."], - get = function(a)return SuperVillain.db.SVBag.enable end, - set = function(a,b)SuperVillain.db.SVBag.enable = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + 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, @@ -71,7 +71,7 @@ SuperVillain.Options.args.SVBag = { type = "group", guiInline = true, name = L["General"], - disabled = function()return not SuperVillain.db.SVBag.enable end, + disabled = function()return not SV.db.SVBag.enable end, args = { bagSize = { order = 1, @@ -108,7 +108,7 @@ SuperVillain.Options.args.SVBag = { max = 700, step = 1, set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout()end, - disabled = function()return SuperVillain.db.SVBag.alignToChat end + disabled = function()return SV.db.SVBag.alignToChat end }, bankWidth = { order = 5, @@ -119,7 +119,7 @@ SuperVillain.Options.args.SVBag = { max = 700, step = 1, set = function(a,b)MOD:ChangeDBVar(b,a[#a])MOD:Layout(true)end, - disabled = function()return SuperVillain.db.SVBag.alignToChat end + disabled = function()return SV.db.SVBag.alignToChat end }, currencyFormat = { order = 6, @@ -137,7 +137,7 @@ SuperVillain.Options.args.SVBag = { 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])SuperVillain:StaticPopup_Show("RL_CLIENT")end + set = function(a,b)MOD:ChangeDBVar(b,a[#a])SV:StaticPopup_Show("RL_CLIENT")end }, ignoreItems = { order = 100, @@ -146,7 +146,7 @@ SuperVillain.Options.args.SVBag = { type = "input", width = "full", multiline = true, - set = function(a,b)SuperVillain.db.SVBag[a[#a]] = b end + set = function(a,b)SV.db.SVBag[a[#a]] = b end } } }, @@ -155,7 +155,7 @@ SuperVillain.Options.args.SVBag = { type = "group", guiInline = true, name = L["Bag/Bank Positioning"], - disabled = function()return not SuperVillain.db.SVBag.enable end, + disabled = function()return not SV.db.SVBag.enable end, args = { alignToChat = { order = 1, @@ -169,9 +169,9 @@ SuperVillain.Options.args.SVBag = { type = "group", name = L["Bag Position"], guiInline = true, - get = function(key) return SuperVillain.db.SVBag.bags[key[#key]] end, + 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 SuperVillain.db.SVBag.enable end, + disabled = function() return not SV.db.SVBag.enable end, args = { point = { order = 1, @@ -204,9 +204,9 @@ SuperVillain.Options.args.SVBag = { type = "group", name = L["Bank Position"], guiInline = true, - get = function(key) return SuperVillain.db.SVBag.bank[key[#key]] end, + 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 SuperVillain.db.SVBag.enable end, + disabled = function() return not SV.db.SVBag.enable end, args = { point = { order = 1, @@ -242,16 +242,16 @@ SuperVillain.Options.args.SVBag = { type="group", name=L["Bag-Bar"], guiInline = true, - get=function(a)return SuperVillain.db.SVBag.bagBar[a[#a]]end, - set=function(a,b)SuperVillain.db.SVBag.bagBar[a[#a]]=b;MOD:ModifyBagBar()end, + get=function(a)return SV.db.SVBag.bagBar[a[#a]]end, + set=function(a,b)SV.db.SVBag.bagBar[a[#a]]=b;MOD:ModifyBagBar()end, args={ enable = { order = 1, type = "toggle", name = L["Enable"], desc = L["Enable/Disable the Bag-Bar."], - get = function(a)return SuperVillain.db.SVBag.bagBar end, - set = function(a,b)SuperVillain.db.SVBag.bagBar = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(a)return SV.db.SVBag.bagBar end, + set = function(a,b)SV.db.SVBag.bagBar = b;SV:StaticPopup_Show("RL_CLIENT")end }, mouseover = { order = 2, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua index 375d2e4..9c29dd3 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVBar; +local SV, L = unpack(SVUI); +local MOD = SV.SVBar; --[[ ########################################################## SET PACKAGE OPTIONS @@ -47,9 +47,9 @@ local function BarConfigLoader() type = "group", order = (d + 10), guiInline = false, - disabled = function()return not SuperVillain.db.SVBar.enable end, + disabled = function()return not SV.db.SVBar.enable end, get = function(key) - return SuperVillain.db.SVBar["Bar"..d][key[#key]] + return SV.db.SVBar["Bar"..d][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "Bar"..d); @@ -65,14 +65,14 @@ local function BarConfigLoader() order = 2, name = L["Background"], type = "toggle", - disabled = function()return not SuperVillain.db.SVBar["Bar"..d].enable end, + 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 SuperVillain.db.SVBar["Bar"..d].enable end, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, }, restorePosition = { order = 4, @@ -80,18 +80,18 @@ local function BarConfigLoader() name = L["Restore Bar"], desc = L["Restore the actionbars default settings"], func = function() - SuperVillain.db:SetDefault("SVBar", "Bar"..d) - SuperVillain:ResetMovables("Bar "..d) + SV.db:SetDefault("SVBar", "Bar"..d) + SV:ResetMovables("Bar "..d) MOD:RefreshBar("Bar"..d) end, - disabled = function()return not SuperVillain.db.SVBar["Bar"..d].enable 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 SuperVillain.db.SVBar["Bar"..d].enable end, + disabled = function()return not SV.db.SVBar["Bar"..d].enable end, args = { point = { order = 1, @@ -152,16 +152,16 @@ local function BarConfigLoader() type = "group", order = 6, guiInline = true, - disabled = function()return not SuperVillain.db.SVBar["Bar"..d].enable end, + 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 SuperVillain.db.SVBar["Bar"..d].useCustomPaging end, + get = function()return SV.db.SVBar["Bar"..d].useCustomPaging end, set = function(e, f) - SuperVillain.db.SVBar["Bar"..d].useCustomPaging = f; + SV.db.SVBar["Bar"..d].useCustomPaging = f; MOD.db["Bar"..d].useCustomPaging = f; MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) @@ -173,7 +173,7 @@ local function BarConfigLoader() name = L["Restore Defaults"], desc = L["Restore default paging attributes for this bar"], func = function() - SuperVillain.db:SetDefault("SVBar", "Bar"..d, "customPaging") + SV.db:SetDefault("SVBar", "Bar"..d, "customPaging") MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) end @@ -184,23 +184,23 @@ local function BarConfigLoader() width = "full", name = L["Paging"], desc = L["|cffFF0000ADVANCED:|r Set the paging attributes for this bar"], - get = function(e)return SuperVillain.db.SVBar["Bar"..d].customPaging[SuperVillain.class] end, + get = function(e)return SV.db.SVBar["Bar"..d].customPaging[SV.class] end, set = function(e, f) - SuperVillain.db.SVBar["Bar"..d].customPaging[SuperVillain.class] = f; - MOD.db["Bar"..d].customPaging[SuperVillain.class] = f; + SV.db.SVBar["Bar"..d].customPaging[SV.class] = f; + MOD.db["Bar"..d].customPaging[SV.class] = f; MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) end, - disabled = function()return not SuperVillain.db.SVBar["Bar"..d].useCustomPaging 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 SuperVillain.db.SVBar["Bar"..d].useCustomVisibility end, + get = function()return SV.db.SVBar["Bar"..d].useCustomVisibility end, set = function(e, f) - SuperVillain.db.SVBar["Bar"..d].useCustomVisibility = f; + SV.db.SVBar["Bar"..d].useCustomVisibility = f; MOD.db["Bar"..d].useCustomVisibility = f; MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) @@ -212,7 +212,7 @@ local function BarConfigLoader() name = L["Restore Defaults"], desc = L["Restore default visibility attributes for this bar"], func = function() - SuperVillain.db:SetDefault("SVBar", "Bar"..d, "customVisibility") + SV.db:SetDefault("SVBar", "Bar"..d, "customVisibility") MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) end @@ -223,14 +223,14 @@ local function BarConfigLoader() width = "full", name = L["Visibility"], desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], - get = function(e)return SuperVillain.db.SVBar["Bar"..d].customVisibility end, + get = function(e)return SV.db.SVBar["Bar"..d].customVisibility end, set = function(e, f) - SuperVillain.db.SVBar["Bar"..d].customVisibility = f; + SV.db.SVBar["Bar"..d].customVisibility = f; MOD.db["Bar"..d].customVisibility = f; MOD:UpdateBarPagingDefaults(); MOD:RefreshBar("Bar"..d) end, - disabled = function()return not SuperVillain.db.SVBar["Bar"..d].useCustomVisibility end, + disabled = function()return not SV.db.SVBar["Bar"..d].useCustomVisibility end, }, } @@ -245,9 +245,9 @@ local function BarConfigLoader() type = "group", order = 100, guiInline = false, - disabled = function()return not SuperVillain.db.SVBar.enable end, + disabled = function()return not SV.db.SVBar.enable end, get = function(key) - return SuperVillain.db.SVBar["Micro"][key[#key]] + return SV.db.SVBar["Micro"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], "Micro"); @@ -263,7 +263,7 @@ local function BarConfigLoader() order = 2, name = L["Mouse Over"], desc = L["The frame is not shown unless you mouse over the frame."], - disabled = function()return not SuperVillain.db.SVBar["Micro"].enable end, + disabled = function()return not SV.db.SVBar["Micro"].enable end, type = "toggle" }, buttonsize = { @@ -274,7 +274,7 @@ local function BarConfigLoader() min = 15, max = 60, step = 1, - disabled = function()return not SuperVillain.db.SVBar["Micro"].enable end, + disabled = function()return not SV.db.SVBar["Micro"].enable end, }, buttonspacing = { order = 4, @@ -284,7 +284,7 @@ local function BarConfigLoader() min = 1, max = 10, step = 1, - disabled = function()return not SuperVillain.db.SVBar["Micro"].enable end, + disabled = function()return not SV.db.SVBar["Micro"].enable end, }, } }; @@ -295,8 +295,8 @@ local function BarConfigLoader() type = "group", order = 200, guiInline = false, - disabled = function()return not SuperVillain.db.SVBar.enable end, - get = function(e)return SuperVillain.db.SVBar["Pet"][e[#e]]end, + 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") @@ -311,14 +311,14 @@ local function BarConfigLoader() order = 2, name = L["Background"], type = "toggle", - disabled = function()return not SuperVillain.db.SVBar["Pet"].enable end, + 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 SuperVillain.db.SVBar["Pet"].enable end, + disabled = function()return not SV.db.SVBar["Pet"].enable end, }, restorePosition = { order = 4, @@ -326,18 +326,18 @@ local function BarConfigLoader() name = L["Restore Bar"], desc = L["Restore the actionbars default settings"], func = function() - SuperVillain.db:SetDefault("SVBar", "Pet") - SuperVillain:ResetMovables("Pet Bar") + SV.db:SetDefault("SVBar", "Pet") + SV:ResetMovables("Pet Bar") MOD:RefreshBar("Pet") end, - disabled = function()return not SuperVillain.db.SVBar["Pet"].enable 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 SuperVillain.db.SVBar["Pet"].enable end, + disabled = function()return not SV.db.SVBar["Pet"].enable end, args = { point = { order = 1, @@ -372,7 +372,7 @@ local function BarConfigLoader() min = 15, max = 60, step = 1, - disabled = function()return not SuperVillain.db.SVBar.enable end + disabled = function()return not SV.db.SVBar.enable end }, buttonspacing = { order = 5, @@ -382,7 +382,7 @@ local function BarConfigLoader() min = 1, max = 10, step = 1, - disabled = function()return not SuperVillain.db.SVBar.enable end + disabled = function()return not SV.db.SVBar.enable end }, alpha = { order = 6, @@ -406,9 +406,9 @@ local function BarConfigLoader() type = "toggle", name = L["Enable"], desc = L["Allow the use of custom paging for this bar"], - get = function()return SuperVillain.db.SVBar["Pet"].useCustomVisibility end, + get = function()return SV.db.SVBar["Pet"].useCustomVisibility end, set = function(e,f) - SuperVillain.db.SVBar["Pet"].useCustomVisibility = f; + SV.db.SVBar["Pet"].useCustomVisibility = f; MOD.db["Pet"].useCustomVisibility = f; MOD:RefreshBar("Pet") end @@ -419,7 +419,7 @@ local function BarConfigLoader() name = L["Restore Defaults"], desc = L["Restore default visibility attributes for this bar"], func = function() - SuperVillain.db:SetDefault("SVBar", "Pet", "customVisibility") + SV.db:SetDefault("SVBar", "Pet", "customVisibility") MOD:RefreshBar("Pet") end }, @@ -429,13 +429,13 @@ local function BarConfigLoader() width = "full", name = L["Visibility"], desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], - get = function(e)return SuperVillain.db.SVBar["Pet"].customVisibility end, + get = function(e)return SV.db.SVBar["Pet"].customVisibility end, set = function(e,f) - SuperVillain.db.SVBar["Pet"].customVisibility = f; + SV.db.SVBar["Pet"].customVisibility = f; MOD.db["Pet"].customVisibility = f; MOD:RefreshBar("Pet") end, - disabled = function()return not SuperVillain.db.SVBar["Pet"].useCustomVisibility end, + disabled = function()return not SV.db.SVBar["Pet"].useCustomVisibility end, }, } } @@ -448,8 +448,8 @@ local function BarConfigLoader() type = "group", order = 300, guiInline = false, - disabled = function()return not SuperVillain.db.SVBar.enable end, - get = function(e)return SuperVillain.db.SVBar["Stance"][e[#e]]end, + 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") @@ -464,14 +464,14 @@ local function BarConfigLoader() order = 2, name = L["Background"], type = "toggle", - disabled = function()return not SuperVillain.db.SVBar["Stance"].enable end, + 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 SuperVillain.db.SVBar["Stance"].enable end, + disabled = function()return not SV.db.SVBar["Stance"].enable end, }, restorePosition = { order = 4, @@ -479,18 +479,18 @@ local function BarConfigLoader() name = L["Restore Bar"], desc = L["Restore the actionbars default settings"], func = function() - SuperVillain.db:SetDefault("SVBar","Stance") - SuperVillain:ResetMovables("Stance Bar") + SV.db:SetDefault("SVBar","Stance") + SV:ResetMovables("Stance Bar") MOD:RefreshBar("Stance") end, - disabled = function()return not SuperVillain.db.SVBar["Stance"].enable 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 SuperVillain.db.SVBar["Stance"].enable end, + disabled = function()return not SV.db.SVBar["Stance"].enable end, args = { point = { order = 1, @@ -551,7 +551,7 @@ local function BarConfigLoader() type = "group", order = 6, guiInline = true, - disabled = function()return not SuperVillain.db.SVBar["Stance"].enable end, + disabled = function()return not SV.db.SVBar["Stance"].enable end, args = { style = { order = 1, @@ -578,9 +578,9 @@ local function BarConfigLoader() type = "toggle", name = L["Enable"], desc = L["Allow the use of custom paging for this bar"], - get = function()return SuperVillain.db.SVBar["Stance"].useCustomVisibility end, + get = function()return SV.db.SVBar["Stance"].useCustomVisibility end, set = function(e,f) - SuperVillain.db.SVBar["Stance"].useCustomVisibility = f; + SV.db.SVBar["Stance"].useCustomVisibility = f; MOD.db["Stance"].useCustomVisibility = f; MOD:RefreshBar("Stance") end @@ -591,7 +591,7 @@ local function BarConfigLoader() name = L["Restore Defaults"], desc = L["Restore default visibility attributes for this bar"], func = function() - SuperVillain.db:SetDefault("SVBar", "Stance", "customVisibility") + SV.db:SetDefault("SVBar", "Stance", "customVisibility") MOD:RefreshBar("Stance") end }, @@ -601,13 +601,13 @@ local function BarConfigLoader() width = "full", name = L["Visibility"], desc = L["|cffFF0000ADVANCED:|r Set the visibility attributes for this bar"], - get = function(e)return SuperVillain.db.SVBar["Stance"].customVisibility end, + get = function(e)return SV.db.SVBar["Stance"].customVisibility end, set = function(e,f) - SuperVillain.db.SVBar["Stance"].customVisibility = f; + SV.db.SVBar["Stance"].customVisibility = f; MOD.db["Stance"].customVisibility = f; MOD:RefreshBar("Stance") end, - disabled = function()return not SuperVillain.db.SVBar["Stance"].useCustomVisibility end, + disabled = function()return not SV.db.SVBar["Stance"].useCustomVisibility end, }, } } @@ -615,12 +615,12 @@ local function BarConfigLoader() } end -SuperVillain.Options.args.SVBar = { +SV.Options.args.SVBar = { type = "group", name = L["ActionBars"], childGroups = "tab", get = function(key) - return SuperVillain.db.SVBar[key[#key]] + return SV.db.SVBar[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -631,15 +631,15 @@ SuperVillain.Options.args.SVBar = { order = 1, type = "toggle", name = L["Enable"], - get = function(e)return SuperVillain.db.SVBar[e[#e]]end, - set = function(e, f)SuperVillain.db.SVBar[e[#e]] = f;SuperVillain:StaticPopup_Show("RL_CLIENT")end + 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 SuperVillain.db.SVBar.enable end, + disabled = function()return not SV.db.SVBar.enable end, args = { commonGroup = { order = 1, @@ -689,11 +689,11 @@ SuperVillain.Options.args.SVBar = { desc = L["Color of the actionbutton when out of range."], hasAlpha = true, get = function(key) - local color = SuperVillain.db.SVBar[key[#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) - SuperVillain.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} + SV.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} MOD:RefreshActionBars() end, }, @@ -704,11 +704,11 @@ SuperVillain.Options.args.SVBar = { desc = L["Color of the actionbutton when out of power (Mana, Rage, Focus, Holy Power)."], hasAlpha = true, get = function(key) - local color = SuperVillain.db.SVBar[key[#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) - SuperVillain.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} + SV.db.SVBar[key[#key]] = {rValue, gValue, bValue, aValue} MOD:RefreshActionBars() end, }, @@ -723,7 +723,7 @@ SuperVillain.Options.args.SVBar = { fontGroup = { order = 2, type = "group", - disabled = function()return not SuperVillain.db.SVBar.enable end, + disabled = function()return not SV.db.SVBar.enable end, name = L["Fonts"], args = { font = { @@ -801,5 +801,5 @@ SuperVillain.Options.args.SVBar = { } } } -bar_configs = SuperVillain.Options.args.SVBar.args.barGroup.args +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 index 0e8134f..39d718e 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/chat.lua @@ -29,17 +29,17 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVChat; +local SV, L = unpack(SVUI); +local MOD = SV.SVChat; --[[ ########################################################## SET PACKAGE OPTIONS ########################################################## ]]-- -SuperVillain.Options.args.SVChat={ +SV.Options.args.SVChat={ type = "group", name = L["Chat"], - get = function(a)return SuperVillain.db.SVChat[a[#a]]end, + get = function(a)return SV.db.SVChat[a[#a]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a]); end, args = { intro = { @@ -51,8 +51,8 @@ SuperVillain.Options.args.SVChat={ order = 2, type = "toggle", name = L["Enable"], - get = function(a)return SuperVillain.db.SVChat.enable end, - set = function(a,b)SuperVillain.db.SVChat.enable = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + 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, @@ -90,7 +90,7 @@ SuperVillain.Options.args.SVChat={ order = 5, type = "toggle", name = L["Custom Tab Style"], - set = function(a,b) MOD:ChangeDBVar(b,a[#a]);SuperVillain:StaticPopup_Show("RL_CLIENT") end, + set = function(a,b) MOD:ChangeDBVar(b,a[#a]);SV:StaticPopup_Show("RL_CLIENT") end, }, timeStampFormat = { order = 6, @@ -112,7 +112,7 @@ SuperVillain.Options.args.SVChat={ type = "select", dialogControl = "LSM30_Sound", name = L["Whisper Alert"], - disabled = function()return not SuperVillain.db.SVChat.psst end, + disabled = function()return not SV.db.SVChat.psst end, values = AceGUIWidgetLSMlists.sound, set = function(a,b) MOD:ChangeDBVar(b,a[#a]) end }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua index 7c0dde6..17c7d67 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua @@ -29,24 +29,24 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVDock -local CHAT = SuperVillain.SVChat -local BAG = SuperVillain.SVBag +local SV, L = unpack(SVUI); +local MOD = SV.SVDock +local CHAT = SV.SVChat +local BAG = SV.SVBag -SuperVillain.Options.args.SVDock = { +SV.Options.args.SVDock = { type = "group", name = L["Docks"], args = {} } -SuperVillain.Options.args.SVDock.args["intro"] = { +SV.Options.args.SVDock.args["intro"] = { order = 1, type = "description", name = "Configure the various frame docks around the screen" }; -SuperVillain.Options.args.SVDock.args["common"] = { +SV.Options.args.SVDock.args["common"] = { order = 2, type = "group", name = "General", @@ -57,7 +57,7 @@ SuperVillain.Options.args.SVDock.args["common"] = { type = 'toggle', name = L['Bottom Panel'], desc = L['Display a border across the bottom of the screen.'], - get = function(j)return SuperVillain.db.SVDock.bottomPanel end, + get = function(j)return SV.db.SVDock.bottomPanel end, set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:BottomPanelVisibility()end }, topPanel = { @@ -65,7 +65,7 @@ SuperVillain.Options.args.SVDock.args["common"] = { type = 'toggle', name = L['Top Panel'], desc = L['Display a border across the top of the screen.'], - get = function(j)return SuperVillain.db.SVDock.topPanel end, + get = function(j)return SV.db.SVDock.topPanel end, set = function(key,value)MOD:ChangeDBVar(value,key[#key]);MOD:TopPanelVisibility()end }, leftDockBackdrop = { @@ -73,7 +73,7 @@ SuperVillain.Options.args.SVDock.args["common"] = { type = 'toggle', name = L['Left Dock Backdrop'], desc = L['Display a backdrop behind the left-side dock.'], - get = function(j)return SuperVillain.db.SVDock.leftDockBackdrop end, + get = function(j)return SV.db.SVDock.leftDockBackdrop end, set = function(key,value) MOD:ChangeDBVar(value,key[#key]); MOD:UpdateDockBackdrops() @@ -82,7 +82,7 @@ SuperVillain.Options.args.SVDock.args["common"] = { } }; -SuperVillain.Options.args.SVDock.args["leftDockGroup"] = { +SV.Options.args.SVDock.args["leftDockGroup"] = { order = 3, type = "group", name = L["Left Dock"], @@ -97,7 +97,7 @@ SuperVillain.Options.args.SVDock.args["leftDockGroup"] = { max = 600, step = 1, width = "full", - get = function()return SuperVillain.db.SVDock.dockLeftHeight;end, + get = function()return SV.db.SVDock.dockLeftHeight;end, set = function(key,value) MOD:ChangeDBVar(value,key[#key]); MOD:UpdateSuperDock(true) @@ -113,7 +113,7 @@ SuperVillain.Options.args.SVDock.args["leftDockGroup"] = { max = 700, step = 1, width = "full", - get = function()return SuperVillain.db.SVDock.dockLeftWidth;end, + get = function()return SV.db.SVDock.dockLeftWidth;end, set = function(key,value) MOD:ChangeDBVar(value,key[#key]); MOD:UpdateSuperDock(true) @@ -129,7 +129,7 @@ SuperVillain.Options.args.SVDock.args["leftDockGroup"] = { max = 1200, step = 1, width = "full", - get = function()return SuperVillain.db.SVDock.dockStatWidth end, + get = function()return SV.db.SVDock.dockStatWidth end, set = function(key,value) MOD:ChangeDBVar(value,key[#key]); MOD:UpdateSuperDock(true) @@ -147,7 +147,7 @@ local acceptableDocklets = { }; local function GetLiveDockletsA() - local test = SuperVillain.db.SVDock.docklets.DockletExtra; + 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 @@ -165,7 +165,7 @@ local function GetLiveDockletsA() end local function GetLiveDockletsB() - local test = SuperVillain.db.SVDock.docklets.DockletMain; + 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 @@ -182,7 +182,7 @@ local function GetLiveDockletsB() return t; end -SuperVillain.Options.args.SVDock.args["rightDockGroup"] = { +SV.Options.args.SVDock.args["rightDockGroup"] = { order = 4, type = "group", name = L["Right Dock"], @@ -196,7 +196,7 @@ SuperVillain.Options.args.SVDock.args["rightDockGroup"] = { min = 150, max = 600, step = 1, - get = function()return SuperVillain.db.SVDock.dockRightHeight;end, + get = function()return SV.db.SVDock.dockRightHeight;end, set = function(key,value) MOD:ChangeDBVar(value,key[#key]); MOD:UpdateSuperDock(true) @@ -211,7 +211,7 @@ SuperVillain.Options.args.SVDock.args["rightDockGroup"] = { min = 150, max = 700, step = 1, - get = function()return SuperVillain.db.SVDock.dockRightWidth;end, + get = function()return SV.db.SVDock.dockRightWidth;end, set = function(key,value) MOD:ChangeDBVar(value,key[#key]); MOD:UpdateSuperDock(true) @@ -225,7 +225,7 @@ SuperVillain.Options.args.SVDock.args["rightDockGroup"] = { type = 'toggle', name = L['Right Dock Backdrop'], desc = L['Display a backdrop behind the right-side dock.'], - get = function(j)return SuperVillain.db.SVDock.rightDockBackdrop end, + get = function(j)return SV.db.SVDock.rightDockBackdrop end, set = function(key,value) MOD:ChangeDBVar(value,key[#key]); MOD:UpdateDockBackdrops() @@ -240,8 +240,8 @@ SuperVillain.Options.args.SVDock.args["rightDockGroup"] = { order = 1, type = "toggle", name = L["Enable"], - get = function()return SuperVillain.db.system.questWatch end, - set = function(j, value) SuperVillain.db.system.questWatch = value; SuperVillain:StaticPopup_Show("RL_CLIENT") end + get = function()return SV.db.system.questWatch end, + set = function(j, value) SV.db.system.questWatch = value; SV:StaticPopup_Show("RL_CLIENT") end } } }, @@ -263,33 +263,33 @@ SuperVillain.Options.args.SVDock.args["rightDockGroup"] = { name = "Primary Docklet", desc = "Select an addon to occupy the primary docklet window", values = function()return GetLiveDockletsA()end, - get = function()return SuperVillain.db.SVDock.docklets.DockletMain end, - set = function(a,value)SuperVillain.db.SVDock.docklets.DockletMain = value;SuperVillain:ReloadDocklets()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 SuperVillain.db.SVDock.docklets.DockletCombatFade end, - set = function(a,value)SuperVillain.db.SVDock.docklets.DockletCombatFade = value;end + 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 SuperVillain.db.SVDock.docklets.enableExtra end, - set = function(a,value)SuperVillain.db.SVDock.docklets.enableExtra = value;SuperVillain:ReloadDocklets()end, + 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 SuperVillain.db.SVDock.docklets.enableExtra or SuperVillain.db.SVDock.docklets.DockletMain == "None") end, + 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 SuperVillain.db.SVDock.docklets.DockletExtra end, - set = function(a,value)SuperVillain.db.SVDock.docklets.DockletExtra = value;SuperVillain:ReloadDocklets()end, + get = function()return SV.db.SVDock.docklets.DockletExtra end, + set = function(a,value)SV.db.SVDock.docklets.DockletExtra = value;SV:ReloadDocklets()end, } } } diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua index 4b5ba6f..9de9d75 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua @@ -29,11 +29,11 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local queue = SuperVillain.DynamicOptions; +local SV, L = unpack(SVUI); +local queue = SV.DynamicOptions; do for key,options in pairs(queue) do - SuperVillain.Options.args[key].args[options.key] = options.data + SV.Options.args[key].args[options.key] = options.data end 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 index 5bc38eb..ad1a140 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/filter.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ...; local selectedSpell,filterType,filters; @@ -49,7 +49,7 @@ local nameMapping = { local function generateFilterOptions() if filterType == 'AuraBar Colors' then - SuperVillain.Options.args.filters.args.filterGroup = { + SV.Options.args.filters.args.filterGroup = { type = "group", name = filterType, guiInline = true, @@ -63,8 +63,8 @@ local function generateFilterOptions() guiInline = true, get = function(e)return""end, set = function(e, arg) - if not SuperVillain.db.media.unitframes.spellcolor[arg] then - SuperVillain.db.media.unitframes.spellcolor[arg] = false + if not SV.db.media.unitframes.spellcolor[arg] then + SV.db.media.unitframes.spellcolor[arg] = false end generateFilterOptions() MOD:SetUnitFrame("player") @@ -80,11 +80,11 @@ local function generateFilterOptions() guiInline = true, get = function(e)return""end, set = function(e, arg) - if SuperVillain.db.media.unitframes.spellcolor[arg]then - SuperVillain.db.media.unitframes.spellcolor[arg] = false; - SuperVillain:AddonMessage(L["You may not remove a spell from a default filter that is not customly added. Setting spell to false instead."]) + 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 - SuperVillain.db.media.unitframes.spellcolor[arg] = nil + SV.db.media.unitframes.spellcolor[arg] = nil end selectedSpell = nil; generateFilterOptions() @@ -106,7 +106,7 @@ local function generateFilterOptions() values = function() local filters = {} filters[""] = NONE; - for g in pairs(SuperVillain.db.media.unitframes.spellcolor)do + for g in pairs(SV.db.media.unitframes.spellcolor)do filters[g] = g end return filters @@ -115,12 +115,12 @@ local function generateFilterOptions() } } - if not selectedSpell or SuperVillain.db.media.unitframes.spellcolor[selectedSpell] == nil then - SuperVillain.Options.args.filters.args.spellGroup = nil; + if not selectedSpell or SV.db.media.unitframes.spellcolor[selectedSpell] == nil then + SV.Options.args.filters.args.spellGroup = nil; return end - SuperVillain.Options.args.filters.args.spellGroup = { + SV.Options.args.filters.args.spellGroup = { type = "group", name = selectedSpell, order = 15, @@ -131,7 +131,7 @@ local function generateFilterOptions() type = "color", order = 1, get = function(e) - local abColor = SuperVillain.db.media.unitframes.spellcolor[selectedSpell] + local abColor = SV.db.media.unitframes.spellcolor[selectedSpell] if type(abColor) == "boolean"then return 0, 0, 0, 1 else @@ -139,11 +139,11 @@ local function generateFilterOptions() end end, set = function(e, r, g, b) - if type(SuperVillain.db.media.unitframes.spellcolor[selectedSpell]) ~= "table"then - SuperVillain.db.media.unitframes.spellcolor[selectedSpell] = {} + if type(SV.db.media.unitframes.spellcolor[selectedSpell]) ~= "table"then + SV.db.media.unitframes.spellcolor[selectedSpell] = {} end local abColor = {r, g, b} - SuperVillain.db.media.unitframes.spellcolor[selectedSpell] = abColor + SV.db.media.unitframes.spellcolor[selectedSpell] = abColor MOD:SetUnitFrame("player") MOD:SetUnitFrame("target") MOD:SetUnitFrame("focus") @@ -154,7 +154,7 @@ local function generateFilterOptions() order = 2, name = L["Restore Defaults"], func = function(e, arg) - SuperVillain.db.media.unitframes.spellcolor[selectedSpell] = false; + SV.db.media.unitframes.spellcolor[selectedSpell] = false; MOD:SetUnitFrame("player") MOD:SetUnitFrame("target") MOD:SetUnitFrame("focus") @@ -167,14 +167,14 @@ local function generateFilterOptions() local watchedBuffs = {} - if not SuperVillain.db.filter.PetBuffWatch then - SuperVillain.db.filter.PetBuffWatch = {} + if not SV.db.filter.PetBuffWatch then + SV.db.filter.PetBuffWatch = {} end - for o,f in pairs(SuperVillain.db.filter.PetBuffWatch)do + for o,f in pairs(SV.db.filter.PetBuffWatch)do tinsert(watchedBuffs,f) end - SuperVillain.Options.args.filters.args.filterGroup = { + SV.Options.args.filters.args.filterGroup = { type = "group", name = filterType, guiInline = true, @@ -189,11 +189,11 @@ local function generateFilterOptions() get = function(e)return""end, set = function(e, arg) if not tonumber(arg) then - SuperVillain:AddonMessage(L["Value must be a number"]) + SV:AddonMessage(L["Value must be a number"]) elseif not GetSpellInfo(arg)then - SuperVillain:AddonMessage(L["Not valid spell id"]) + SV:AddonMessage(L["Not valid spell id"]) else - tinsert(SuperVillain.db.filter.PetBuffWatch, {["enable"] = true, ["id"] = tonumber(arg), ["point"] = "TOPRIGHT", ["color"] = {["r"] = 1, ["g"] = 0, ["b"] = 0}, ["anyUnit"] = true}) + 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 @@ -208,23 +208,23 @@ local function generateFilterOptions() get = function(e)return""end, set = function(e, arg) if not tonumber(arg)then - SuperVillain:AddonMessage(L["Value must be a number"]) + SV:AddonMessage(L["Value must be a number"]) elseif not GetSpellInfo(arg)then - SuperVillain:AddonMessage(L["Not valid spell id"]) + SV:AddonMessage(L["Not valid spell id"]) else local p; - for q, r in pairs(SuperVillain.db.filter.PetBuffWatch)do + for q, r in pairs(SV.db.filter.PetBuffWatch)do if r["id"] == tonumber(arg)then p = r; - if SuperVillain.db.filter.PetBuffWatch[q]then - SuperVillain.db.filter.PetBuffWatch[q].enable = false; + if SV.db.filter.PetBuffWatch[q]then + SV.db.filter.PetBuffWatch[q].enable = false; else - SuperVillain.db.filter.PetBuffWatch[q] = nil + SV.db.filter.PetBuffWatch[q] = nil end end end if p == nil then - SuperVillain:AddonMessage(L["Spell not found in list."]) + SV:AddonMessage(L["Spell not found in list."]) else generateFilterOptions() end @@ -241,7 +241,7 @@ local function generateFilterOptions() values = function() local v = {} watchedBuffs = {} - for o, f in pairs(SuperVillain.db.filter.PetBuffWatch)do + for o, f in pairs(SV.db.filter.PetBuffWatch)do tinsert(watchedBuffs, f) end for o, l in pairs(watchedBuffs)do @@ -260,7 +260,7 @@ local function generateFilterOptions() local registeredSpell; - for t,l in pairs(SuperVillain.db.filter.PetBuffWatch)do + for t,l in pairs(SV.db.filter.PetBuffWatch)do if l.id == selectedSpell then registeredSpell = t end @@ -268,12 +268,12 @@ local function generateFilterOptions() if selectedSpell and registeredSpell then local currentSpell = GetSpellInfo(selectedSpell) - SuperVillain.Options.args.filters.args.filterGroup.args[currentSpell] = { + SV.Options.args.filters.args.filterGroup.args[currentSpell] = { name = currentSpell.." ("..selectedSpell..")", type = "group", - get = function(e)return SuperVillain.db.filter.PetBuffWatch[registeredSpell][e[#e]] end, + get = function(e)return SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] end, set = function(e, arg) - SuperVillain.db.filter.PetBuffWatch[registeredSpell][e[#e]] = arg; + SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] = arg; MOD:SetUnitFrame("pet") end, order = -10, @@ -311,11 +311,11 @@ local function generateFilterOptions() type = "color", order = 4, get = function(e) - local abColor = SuperVillain.db.filter.PetBuffWatch[registeredSpell][e[#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 = SuperVillain.db.filter.PetBuffWatch[registeredSpell][e[#e]] + local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] abColor.r, abColor.g, abColor.b = i, j, k; MOD:SetUnitFrame("pet") end @@ -330,7 +330,7 @@ local function generateFilterOptions() type = "color", order = 6, get = function(e) - local abColor = SuperVillain.db.filter.PetBuffWatch[registeredSpell][e[#e]] + local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] if abColor then return abColor.r,abColor.g,abColor.b,abColor.a else @@ -338,7 +338,7 @@ local function generateFilterOptions() end end, set = function(e,i,j,k) - local abColor = SuperVillain.db.filter.PetBuffWatch[registeredSpell][e[#e]] + local abColor = SV.db.filter.PetBuffWatch[registeredSpell][e[#e]] abColor.r,abColor.g,abColor.b = i,j,k; MOD:SetUnitFrame("pet") end @@ -361,7 +361,7 @@ local function generateFilterOptions() name = L["Show When Not Active"], order = 8, type = "toggle", - disabled = function()return SuperVillain.db.filter.PetBuffWatch[registeredSpell].style == "text"end + disabled = function()return SV.db.filter.PetBuffWatch[registeredSpell].style == "text"end } } } @@ -373,14 +373,14 @@ local function generateFilterOptions() local watchedBuffs={} - if not SuperVillain.db.filter.BuffWatch then - SuperVillain.db.filter.BuffWatch = {} + if not SV.db.filter.BuffWatch then + SV.db.filter.BuffWatch = {} end - for o,f in pairs(SuperVillain.db.filter.BuffWatch) do + for o,f in pairs(SV.db.filter.BuffWatch) do tinsert(watchedBuffs,f) end - SuperVillain.Options.args.filters.args.filterGroup = { + SV.Options.args.filters.args.filterGroup = { type = "group", name = filterType, guiInline = true, @@ -395,11 +395,11 @@ local function generateFilterOptions() get = function(e)return""end, set = function(e, arg) if not tonumber(arg)then - SuperVillain:AddonMessage(L["Value must be a number"]) + SV:AddonMessage(L["Value must be a number"]) elseif not GetSpellInfo(arg)then - SuperVillain:AddonMessage(L["Not valid spell id"]) + SV:AddonMessage(L["Not valid spell id"]) else - tinsert(SuperVillain.db.filter.BuffWatch, {["enable"] = true, ["id"] = tonumber(arg), ["point"] = "TOPRIGHT", ["color"] = {["r"] = 1, ["g"] = 0, ["b"] = 0}, ["anyUnit"] = false}) + 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) @@ -418,23 +418,23 @@ local function generateFilterOptions() get = function(e)return""end, set = function(e, arg) if not tonumber(arg)then - SuperVillain:AddonMessage(L["Value must be a number"]) + SV:AddonMessage(L["Value must be a number"]) elseif not GetSpellInfo(arg)then - SuperVillain:AddonMessage(L["Not valid spell id"]) + SV:AddonMessage(L["Not valid spell id"]) else local p; - for q, r in pairs(SuperVillain.db.filter.BuffWatch)do + for q, r in pairs(SV.db.filter.BuffWatch)do if r["id"] == tonumber(arg)then p = r; - if SuperVillain.db.filter.BuffWatch[q]then - SuperVillain.db.filter.BuffWatch[q].enable = false; + if SV.db.filter.BuffWatch[q]then + SV.db.filter.BuffWatch[q].enable = false; else - SuperVillain.db.filter.BuffWatch[q] = nil + SV.db.filter.BuffWatch[q] = nil end end end if p == nil then - SuperVillain:AddonMessage(L["Spell not found in list."]) + SV:AddonMessage(L["Spell not found in list."]) else generateFilterOptions() end @@ -455,7 +455,7 @@ local function generateFilterOptions() values = function() local v = {} watchedBuffs = {} - for o, f in pairs(SuperVillain.db.filter.BuffWatch)do + for o, f in pairs(SV.db.filter.BuffWatch)do tinsert(watchedBuffs, f) end for o, l in pairs(watchedBuffs)do @@ -472,15 +472,15 @@ local function generateFilterOptions() } } local registeredSpell; - for t,l in pairs(SuperVillain.db.filter.BuffWatch)do if l.id==selectedSpell then registeredSpell=t end end + 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) - SuperVillain.Options.args.filters.args.filterGroup.args[currentSpell] = { + SV.Options.args.filters.args.filterGroup.args[currentSpell] = { name = currentSpell.." ("..selectedSpell..")", type = "group", - get = function(e)return SuperVillain.db.filter.BuffWatch[registeredSpell][e[#e]]end, + get = function(e)return SV.db.filter.BuffWatch[registeredSpell][e[#e]]end, set = function(e, arg) - SuperVillain.db.filter.BuffWatch[registeredSpell][e[#e]] = arg; + SV.db.filter.BuffWatch[registeredSpell][e[#e]] = arg; for t = 10, 40, 15 do MOD:UpdateGroupAuraWatch("raid"..t) end @@ -513,11 +513,11 @@ local function generateFilterOptions() type = "color", order = 4, get = function(e) - local abColor = SuperVillain.db.filter.BuffWatch[registeredSpell][e[#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 = SuperVillain.db.filter.BuffWatch[registeredSpell][e[#e]] + 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) @@ -536,7 +536,7 @@ local function generateFilterOptions() type = "color", order = 6, get = function(e) - local abColor = SuperVillain.db.filter.BuffWatch[registeredSpell][e[#e]] + local abColor = SV.db.filter.BuffWatch[registeredSpell][e[#e]] if abColor then return abColor.r, abColor.g, abColor.b, abColor.a else @@ -544,8 +544,8 @@ local function generateFilterOptions() end end, set = function(e, i, j, k) - SuperVillain.db.filter.BuffWatch[registeredSpell][e[#e]] = SuperVillain.db.filter.BuffWatch[registeredSpell][e[#e]] or {} - local abColor = SuperVillain.db.filter.BuffWatch[registeredSpell][e[#e]] + 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) @@ -572,19 +572,19 @@ local function generateFilterOptions() name = L["Show When Not Active"], order = 8, type = "toggle", - disabled = function()return SuperVillain.db.filter.BuffWatch[registeredSpell].style == "text" end + disabled = function()return SV.db.filter.BuffWatch[registeredSpell].style == "text" end } } } end watchedBuffs=nil else - if not filterType or not SuperVillain.db.filter[filterType]then - SuperVillain.Options.args.filters.args.filterGroup = nil; - SuperVillain.Options.args.filters.args.spellGroup = nil; + 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 - SuperVillain.Options.args.filters.args.filterGroup = { + SV.Options.args.filters.args.filterGroup = { type = "group", name = filterType, guiInline = true, @@ -597,8 +597,8 @@ local function generateFilterOptions() type = "input", get = function(e)return""end, set = function(e, arg) - if not SuperVillain.db.filter[filterType][arg]then - SuperVillain.db.filter[filterType][arg] = { + if not SV.db.filter[filterType][arg]then + SV.db.filter[filterType][arg] = { ["enable"] = true, ["priority"] = 0 } @@ -614,15 +614,15 @@ local function generateFilterOptions() type = "input", get = function(e)return""end, set = function(e, arg) - if SuperVillain.db.filter[filterType] then - if SuperVillain.db.filter[filterType][arg] then - SuperVillain.db.filter[filterType][arg].enable = false; - SuperVillain:AddonMessage(L["You may not remove a spell from a default filter that is not customly added. Setting spell to false instead."]) + 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 - SuperVillain.db.filter[filterType][arg] = nil + SV.db.filter[filterType][arg] = nil end else - SuperVillain.db.filter[filterType][arg] = nil + SV.db.filter[filterType][arg] = nil end generateFilterOptions() MOD:RefreshUnitFrames() @@ -640,7 +640,7 @@ local function generateFilterOptions() end, values = function() local filters = {} - local list = SuperVillain.db.filter[filterType] + local list = SV.db.filter[filterType] filters[""] = NONE; for g in pairs(list)do filters[g] = g @@ -651,12 +651,12 @@ local function generateFilterOptions() } } - if not selectedSpell or not SuperVillain.db.filter[filterType][selectedSpell] then - SuperVillain.Options.args.filters.args.spellGroup = nil; + if not selectedSpell or not SV.db.filter[filterType][selectedSpell] then + SV.Options.args.filters.args.spellGroup = nil; return end - SuperVillain.Options.args.filters.args.spellGroup = { + SV.Options.args.filters.args.spellGroup = { type = "group", name = selectedSpell, order = 15, @@ -669,11 +669,11 @@ local function generateFilterOptions() if selectedFolder or not selectedSpell then return false else - return SuperVillain.db.filter[filterType][selectedSpell].enable + return SV.db.filter[filterType][selectedSpell].enable end end, set = function(e, arg) - SuperVillain.db.filter[filterType][selectedSpell].enable = arg; + SV.db.filter[filterType][selectedSpell].enable = arg; generateFilterOptions() MOD:RefreshUnitFrames() end @@ -685,11 +685,11 @@ local function generateFilterOptions() if selectedFolder or not selectedSpell then return 0 else - return SuperVillain.db.filter[filterType][selectedSpell].priority + return SV.db.filter[filterType][selectedSpell].priority end end, set = function(e, arg) - SuperVillain.db.filter[filterType][selectedSpell].priority = arg; + SV.db.filter[filterType][selectedSpell].priority = arg; generateFilterOptions() MOD:RefreshUnitFrames() end, @@ -704,7 +704,7 @@ local function generateFilterOptions() MOD:RefreshUnitFrames() collectgarbage("collect") end -SuperVillain.Options.args.filters = { +SV.Options.args.filters = { type = "group", name = L["Filters"], order = -10, @@ -716,8 +716,8 @@ SuperVillain.Options.args.filters = { type = "input", get = function(e)return""end, set = function(e, arg) - SuperVillain.db.filter[arg] = {} - SuperVillain.db.filter[arg]["spells"] = {} + SV.db.filter[arg] = {} + SV.db.filter[arg]["spells"] = {} end }, deleteFilter = { @@ -727,19 +727,19 @@ SuperVillain.Options.args.filters = { 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 SuperVillain.db.filter[arg] then - SuperVillain:AddonMessage(L["You can't remove a pre-existing filter."]) + if SV.db.filter[arg] then + SV:AddonMessage(L["You can't remove a pre-existing filter."]) else - SuperVillain.db.filter[arg] = nil; + SV.db.filter[arg] = nil; filterType = nil; selectedSpell = nil; - SuperVillain.Options.args.filters.args.filterGroup = nil + SV.Options.args.filters.args.filterGroup = nil end end, values = function() filters = {} filters[""] = NONE; - for g in pairs(SuperVillain.db.filter) do + for g in pairs(SV.db.filter) do filters[g] = nameMapping[g] or g end return filters @@ -762,7 +762,7 @@ SuperVillain.Options.args.filters = { values = function() filters = {} filters[""] = NONE; - for g in pairs(SuperVillain.db.filter) do + for g in pairs(SV.db.filter) do filters[g] = nameMapping[g] or g end filters["AuraBar Colors"] = "AuraBar Colors" diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua index e2e5e16..1615bd8 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/henchmen.lua @@ -29,17 +29,17 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVHenchmen; +local SV, L = unpack(SVUI); +local MOD = SV.SVHenchmen; --[[ ########################################################## SET PACKAGE OPTIONS ########################################################## ]]-- -SuperVillain.Options.args.SVHenchmen={ +SV.Options.args.SVHenchmen={ type = "group", name = L["Henchmen"], - get = function(a)return SuperVillain.db.SVHenchmen[a[#a]]end, + get = function(a)return SV.db.SVHenchmen[a[#a]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a]); end, args = { intro = { @@ -64,57 +64,57 @@ SuperVillain.Options.args.SVHenchmen={ order = 1, type = 'toggle', name = L["Enable Mail Helper"], - get = function(j)return SuperVillain.db.SVHenchmen.mailOpener end, - set = function(j,value)SuperVillain.db.SVHenchmen.mailOpener = value;MOD:ToggleMailMinions()end + 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 SuperVillain.db.SVHenchmen.autoAcceptInvite end, - set = function(j,value)SuperVillain.db.SVHenchmen.autoAcceptInvite = value end + 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 SuperVillain.db.SVHenchmen.vendorGrays end, - set = function(j,value)SuperVillain.db.SVHenchmen.vendorGrays = value end + 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 SuperVillain.db.SVHenchmen.autoRoll end, - set = function(j,value)SuperVillain.db.SVHenchmen.autoRoll = value end, - disabled = function()return not SuperVillain.db.SVOverride.lootRoll end + 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 SuperVillain.db.SVHenchmen.pvpautorelease end, - set = function(j,value)SuperVillain.db.SVHenchmen.pvpautorelease = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + 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 SuperVillain.db.SVHenchmen.autorepchange end, - set = function(j,value)SuperVillain.db.SVHenchmen.autorepchange = value end + 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 SuperVillain.db.SVHenchmen.skipcinematics end, - set = function(j,value)SuperVillain.db.SVHenchmen.skipcinematics = value;SuperVillain:StaticPopup_Show("RL_CLIENT") end + 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, @@ -126,8 +126,8 @@ SuperVillain.Options.args.SVHenchmen={ ['GUILD'] = GUILD, ['PLAYER'] = PLAYER }, - get = function(j)return SuperVillain.db.SVHenchmen.autoRepair end, - set = function(j,value)SuperVillain.db.SVHenchmen.autoRepair = value end + get = function(j)return SV.db.SVHenchmen.autoRepair end, + set = function(j,value)SV.db.SVHenchmen.autoRepair = value end }, } }, @@ -143,39 +143,39 @@ SuperVillain.Options.args.SVHenchmen={ type = "toggle", name = L['Accept Quests'], desc = L['Automatically accepts quests as they are presented to you.'], - get = function(j)return SuperVillain.db.SVHenchmen.autoquestaccept end, - set = function(j,value) SuperVillain.db.SVHenchmen.autoquestaccept = value end + 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 SuperVillain.db.SVHenchmen.autoquestcomplete end, - set = function(j,value)SuperVillain.db.SVHenchmen.autoquestcomplete = value end + 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 SuperVillain.db.SVHenchmen.autoquestreward end, - set = function(j,value)SuperVillain.db.SVHenchmen.autoquestreward = value end + 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 SuperVillain.db.SVHenchmen.autodailyquests end, - set = function(j,value)SuperVillain.db.SVHenchmen.autodailyquests = value end + 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 SuperVillain.db.SVHenchmen.autopvpquests end, - set = function(j,value)SuperVillain.db.SVHenchmen.autopvpquests = value end + get = function(j)return SV.db.SVHenchmen.autopvpquests end, + set = function(j,value)SV.db.SVHenchmen.autopvpquests = value end }, } }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua index 525891d..68238b3 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVMap +local SV, L = unpack(SVUI); +local MOD = SV.SVMap --[[ ########################################################## LOCAL VARS @@ -51,11 +51,11 @@ local colorSelect = { OPTIONS TABLE ########################################################## ]]-- -SuperVillain.Options.args.SVMap = { +SV.Options.args.SVMap = { type = 'group', childGroups = "tree", name = L['Minimap'], - get = function(a)return SuperVillain.db.SVMap[a[#a]]end, + get = function(a)return SV.db.SVMap[a[#a]]end, set = function(a,b)MOD:ChangeDBVar(b,a[#a]);MOD:ReLoad()end, args={ intro={ @@ -68,8 +68,8 @@ SuperVillain.Options.args.SVMap = { order = 2, name = L['Enable'], desc = L['Enable/Disable the Custom Minimap.'], - get = function(a)return SuperVillain.db.SVMap.enable end, - set = function(a,b)SuperVillain.db.SVMap.enable=b; SuperVillain:StaticPopup_Show("RL_CLIENT") end + 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, @@ -77,7 +77,7 @@ SuperVillain.Options.args.SVMap = { name = MINIMAP_LABEL, desc = L['General display settings'], guiInline = true, - disabled = function()return not SuperVillain.db.SVMap.enable end, + disabled = function()return not SV.db.SVMap.enable end, args = { size = { order = 1, @@ -127,7 +127,7 @@ SuperVillain.Options.args.SVMap = { name = "Labels and Info", desc = L['Configure various minimap texts'], guiInline = true, - disabled = function()return not SuperVillain.db.SVMap.enable end, + disabled = function()return not SV.db.SVMap.enable end, args = { locationText = { order = 1, @@ -156,16 +156,16 @@ SuperVillain.Options.args.SVMap = { order = 7, type = "group", name = "Minimap Buttons", - get = function(j)return SuperVillain.db.SVMap.minimapbar[j[#j]]end, + get = function(j)return SV.db.SVMap.minimapbar[j[#j]]end, guiInline = true, - disabled = function()return not SuperVillain.db.SVMap.enable end, + 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")SuperVillain:StaticPopup_Show("RL_CLIENT")end, + set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")SV:StaticPopup_Show("RL_CLIENT")end, }, mouseover = { order = 2, @@ -180,7 +180,7 @@ SuperVillain.Options.args.SVMap = { 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 SuperVillain.db.SVMap.minimapbar.enable end, + disabled = function()return not SV.db.SVMap.minimapbar.enable end, values = { ['NOANCHOR'] = L['No Anchor Bar'], ['HORIZONTAL'] = L['Horizontal Anchor Bar'], @@ -197,7 +197,7 @@ SuperVillain.Options.args.SVMap = { step = 1, width = "full", set = function(a,b)MOD:ChangeDBVar(b,a[#a],"minimapbar")MOD:UpdateMinimapButtonSettings()end, - disabled = function()return not SuperVillain.db.SVMap.minimapbar.enable or SuperVillain.db.SVMap.minimapbar.styleType == 'NOANCHOR'end + disabled = function()return not SV.db.SVMap.minimapbar.enable or SV.db.SVMap.minimapbar.styleType == 'NOANCHOR'end }, } }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/mode.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/mode.lua index cb228c8..4880bb8 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/mode.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/mode.lua @@ -29,12 +29,12 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVLaborer -SuperVillain.Options.args.SVLaborer = { +local SV, L = unpack(SVUI); +local MOD = SV.SVLaborer +SV.Options.args.SVLaborer = { type = 'group', name = L['Laborer'], - get = function(key)return SuperVillain.db.SVLaborer[key[#key]]end, + get = function(key)return SV.db.SVLaborer[key[#key]]end, set = function(key, value)MOD:ChangeDBVar(value, key[#key]) end, args = { intro = { @@ -47,8 +47,8 @@ SuperVillain.Options.args.SVLaborer = { order = 2, name = L['Enable'], desc = L['Enable/Disable the Laborer dock.'], - get = function(key)return SuperVillain.db.SVLaborer[key[#key]]end, - set = function(key, value)SuperVillain.db.SVLaborer.enable = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(key)return SV.db.SVLaborer[key[#key]]end, + set = function(key, value)SV.db.SVLaborer.enable = value;SV:StaticPopup_Show("RL_CLIENT")end }, fontSize = { order = 3, @@ -71,7 +71,7 @@ SuperVillain.Options.args.SVLaborer = { order = 1, name = L['AutoEquip'], desc = L['Enable/Disable automatically equipping fishing gear.'], - get = function(key)return SuperVillain.db.SVLaborer.fishing[key[#key]]end, + get = function(key)return SV.db.SVLaborer.fishing[key[#key]]end, set = function(key, value)MOD:ChangeDBVar(value, key[#key], "fishing")end } } @@ -87,7 +87,7 @@ SuperVillain.Options.args.SVLaborer = { order = 1, name = L['AutoEquip'], desc = L['Enable/Disable automatically equipping cooking gear.'], - get = function(key)return SuperVillain.db.SVLaborer.cooking[key[#key]]end, + get = function(key)return SV.db.SVLaborer.cooking[key[#key]]end, set = function(key, value)MOD:ChangeDBVar(value, key[#key], "cooking")end } } @@ -97,8 +97,8 @@ SuperVillain.Options.args.SVLaborer = { type = "group", name = L["Farming Mode Settings"], guiInline = true, - get = function(key)return SuperVillain.db.SVLaborer.farming[key[#key]]end, - set = function(key, value)SuperVillain.db.SVLaborer.farming[key[#key]] = value end, + get = function(key)return SV.db.SVLaborer.farming[key[#key]]end, + set = function(key, value)SV.db.SVLaborer.farming[key[#key]] = value end, args = { buttonsize = { type = 'range', diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua index a8c51ee..ea753c7 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVPlate; +local SV, L = unpack(SVUI); +local MOD = SV.SVPlate; local _, ns = ...; --[[ ########################################################## @@ -56,18 +56,18 @@ local positionTable = { local activeFilter,filters; local function UpdateFilterGroupOptions() - if not activeFilter or not SuperVillain.db['SVPlate']['filter'][activeFilter] then - SuperVillain.Options.args.SVPlate.args.filters.args.filterGroup=nil; + if not activeFilter or not SV.db['SVPlate']['filter'][activeFilter] then + SV.Options.args.SVPlate.args.filters.args.filterGroup=nil; return end - SuperVillain.Options.args.SVPlate.args.filters.args.filterGroup = { + SV.Options.args.SVPlate.args.filters.args.filterGroup = { type = "group", name = activeFilter, guiInline = true, order = -10, - get = function(d)return SuperVillain.db["SVPlate"]["filter"][activeFilter][d[#d]] end, + get = function(d)return SV.db["SVPlate"]["filter"][activeFilter][d[#d]] end, set = function(d,e) - SuperVillain.db["SVPlate"]["filter"][activeFilter][d[#d]] = e; + SV.db["SVPlate"]["filter"][activeFilter][d[#d]] = e; MOD:PlateIteration("AssertFiltering") MOD:UpdateAllPlates() UpdateFilterGroupOptions() @@ -96,14 +96,14 @@ local function UpdateFilterGroupOptions() order = 4, name = L["Color"], get = function(key) - local color = SuperVillain.db["SVPlate"]["filter"][activeFilter][key[#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) - SuperVillain.db["SVPlate"]["filter"][activeFilter][key[#key]] = {} - local color = SuperVillain.db["SVPlate"]["filter"][activeFilter][key[#key]] + SV.db["SVPlate"]["filter"][activeFilter][key[#key]] = {} + local color = SV.db["SVPlate"]["filter"][activeFilter][key[#key]] if color then color = {r,g,b}; UpdateFilterGroupOptions() @@ -124,7 +124,7 @@ local function UpdateFilterGroupOptions() } end -SuperVillain.Options.args.SVPlate={ +SV.Options.args.SVPlate={ type="group", name=L["NamePlates"], childGroups="tab", @@ -138,16 +138,16 @@ SuperVillain.Options.args.SVPlate={ intro={order=1,type="description",name=L["NAMEPLATE_DESC"]}, enable={ order=2,type="toggle",name=L["Enable"], - get=function(d)return SuperVillain.db.SVPlate[d[#d]]end, - set=function(d,e)SuperVillain.db.SVPlate[d[#d]]=e;SuperVillain:StaticPopup_Show("RL_CLIENT")end, + 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 SuperVillain.db.SVPlate[d[#d]]end, + 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 SuperVillain.db.SVPlate.enable end, + disabled = function()return not SV.db.SVPlate.enable end, args = { combatHide = { type = "toggle", @@ -230,7 +230,7 @@ SuperVillain.Options.args.SVPlate={ name = L["Reaction Coloring"], guiInline = true, get = function(key) - local color = SuperVillain.db.SVPlate.reactions[key[#key]] + local color = SV.db.SVPlate.reactions[key[#key]] if color then return color[1],color[2],color[3],color[4] end @@ -279,8 +279,8 @@ SuperVillain.Options.args.SVPlate={ type = "group", order = 2, name = L["Health Bar"], - disabled = function()return not SuperVillain.db.SVPlate.enable end, - get = function(d)return SuperVillain.db.SVPlate.healthBar[d[#d]]end, + 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 = { @@ -318,7 +318,7 @@ SuperVillain.Options.args.SVPlate={ type = "group", name = L["Fonts"], guiInline = true, - get = function(d)return SuperVillain.db.SVPlate.healthBar.text[d[#d]]end, + 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 = { @@ -379,8 +379,8 @@ SuperVillain.Options.args.SVPlate={ type = "group", order = 3, name = L["Cast Bar"], - disabled = function()return not SuperVillain.db.SVPlate.enable end, - get = function(d)return SuperVillain.db.SVPlate.castBar[d[#d]]end, + 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 = { @@ -398,7 +398,7 @@ SuperVillain.Options.args.SVPlate={ name = L["Colors"], guiInline = true, get = function(key) - local color = SuperVillain.db.SVPlate.castBar[key[#key]] + local color = SV.db.SVPlate.castBar[key[#key]] if color then return color[1],color[2],color[3],color[4] end @@ -429,7 +429,7 @@ SuperVillain.Options.args.SVPlate={ type = "group", order = 4, name = L["Target Indicator"], - get = function(d)return SuperVillain.db.SVPlate.pointer[d[#d]]end, + 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 = { @@ -453,9 +453,9 @@ SuperVillain.Options.args.SVPlate={ type = "color", name = L["Color"], order = 3, - disabled = function()return SuperVillain.db.SVPlate.pointer.colorMatchHealthBar end, + disabled = function()return SV.db.SVPlate.pointer.colorMatchHealthBar end, get = function(key) - local color = SuperVillain.db.SVPlate.pointer[key[#key]] + local color = SV.db.SVPlate.pointer[key[#key]] if color then return color[1],color[2],color[3],color[4] end @@ -472,7 +472,7 @@ SuperVillain.Options.args.SVPlate={ type = "group", order = 5, name = L["Raid Icon"], - get = function(d)return SuperVillain.db.SVPlate.raidHealIcon[d[#d]]end, + 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 = { @@ -512,7 +512,7 @@ SuperVillain.Options.args.SVPlate={ type = "group", order = 4, name = L["Auras"], - get = function(d)return SuperVillain.db.SVPlate.auras[d[#d]]end, + 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 = { @@ -527,14 +527,14 @@ SuperVillain.Options.args.SVPlate={ type = "select", order = 2, name = L["Additional Filter"], - values = function()filters = {}filters[""] = NONE;for j in pairs(SuperVillain.db.filter)do filters[j] = j end return filters end + 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(SuperVillain.db.SVPlate.auras.additionalFilter)end + func = function()ns:SetToFilterConfig(SV.db.SVPlate.auras.additionalFilter)end }, fontGroup = { order = 100, @@ -577,7 +577,7 @@ SuperVillain.Options.args.SVPlate={ type = "group", order = 6, name = L["Threat"], - get = function(d)return SuperVillain.db.SVPlate.threat[d[#d]]end, + 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 = { @@ -617,7 +617,7 @@ SuperVillain.Options.args.SVPlate={ name = L["Colors"], guiInline = true, get = function(key) - local color = SuperVillain.db.SVPlate.threat[key[#key]] + local color = SV.db.SVPlate.threat[key[#key]] if color then return color[1],color[2],color[3],color[4] end @@ -660,7 +660,7 @@ SuperVillain.Options.args.SVPlate={ type = "group", order = 200, name = L["Filters"], - disabled = function()return not SuperVillain.db.SVPlate.enable end, + disabled = function()return not SV.db.SVPlate.enable end, args = { addname = { type = "input", @@ -668,11 +668,11 @@ SuperVillain.Options.args.SVPlate={ name = L["Add Name"], get = function(d)return""end, set = function(d,e) - if SuperVillain.db["SVPlate"]["filter"][e]then - SuperVillain:AddonMessage(L["Filter already exists!"]) + if SV.db["SVPlate"]["filter"][e]then + SV:AddonMessage(L["Filter already exists!"]) return end - SuperVillain.db["SVPlate"]["filter"][e] = { + SV.db["SVPlate"]["filter"][e] = { ["enable"] = true, ["hide"] = false, ["customColor"] = false, @@ -694,11 +694,11 @@ SuperVillain.Options.args.SVPlate={ get = function(d)return""end, set = function(d,e) if G["SVPlate"]["filter"][e]then - SuperVillain.db["SVPlate"]["filter"][e].enable = false; - SuperVillain:AddonMessage(L["You can't remove a default name from the filter,disabling the name."]) + SV.db["SVPlate"]["filter"][e].enable = false; + SV:AddonMessage(L["You can't remove a default name from the filter,disabling the name."]) else - SuperVillain.db["SVPlate"]["filter"][e] = nil; - SuperVillain.Options.args.SVPlate.args.filters.args.filterGroup = nil + SV.db["SVPlate"]["filter"][e] = nil; + SV.Options.args.SVPlate.args.filters.args.filterGroup = nil end UpdateFilterGroupOptions() MOD:UpdateAllPlates() @@ -712,8 +712,8 @@ SuperVillain.Options.args.SVPlate={ set = function(d,e)activeFilter = e;UpdateFilterGroupOptions()end, values = function() filters = {} - if(SuperVillain.db["SVPlate"]["filter"]) then - for j in pairs(SuperVillain.db["SVPlate"]["filter"])do + if(SV.db["SVPlate"]["filter"]) then + for j in pairs(SV.db["SVPlate"]["filter"])do filters[j] = j end end diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua index 402b0fc..2ea9052 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua @@ -29,9 +29,9 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); -SuperVillain.Options.args.profiles = { +SV.Options.args.profiles = { order = 9999, type = "group", name = L["profiles"], @@ -58,8 +58,8 @@ SuperVillain.Options.args.profiles = { order = 4, type = "execute", name = SAVE, - desc = function() return SAVE .. " " .. L["current"] .. " " .. NORMAL_FONT_COLOR_CODE .. SuperVillain.db.profileKey .. FONT_COLOR_CODE_CLOSE end, - func = function() SuperVillain.db:Export(SuperVillain.db.profileKey) end, + desc = function() return SAVE .. " " .. L["current"] .. " " .. NORMAL_FONT_COLOR_CODE .. SV.db.profileKey .. FONT_COLOR_CODE_CLOSE end, + func = function() SV.db:Export(SV.db.profileKey) end, }, export = { name = L["export"], @@ -67,7 +67,7 @@ SuperVillain.Options.args.profiles = { type = "input", order = 5, get = false, - set = function(key, value) SuperVillain.db:Export(value) end, + set = function(key, value) SV.db:Export(value) end, }, import = { name = L["import"], @@ -75,9 +75,9 @@ SuperVillain.Options.args.profiles = { type = "select", order = 6, get = function() return " SELECT ONE" end, - set = function(key, value) SuperVillain.db:Import(value) end, - disabled = function() local t = SuperVillain:CheckProfiles() return (not t) end, - values = SuperVillain:GetProfiles(), + set = function(key, value) SV.db:Import(value) end, + disabled = function() local t = SV:CheckProfiles() return (not t) end, + values = SV:GetProfiles(), }, spacer2 = { order = 7, @@ -96,9 +96,9 @@ SuperVillain.Options.args.profiles = { name = L["delete"], desc = L["delete_sub"], get = function() return " SELECT ONE" end, - set = function(key, value) SuperVillain.db:Remove(value) end, - values = SuperVillain:GetProfiles(), - disabled = function() local t = SuperVillain:CheckProfiles() return (not t) end, + set = function(key, value) SV.db:Remove(value) end, + values = SV:GetProfiles(), + disabled = function() local t = SV:CheckProfiles() return (not t) end, confirm = true, confirmText = L["delete_confirm"], }, @@ -116,9 +116,9 @@ SuperVillain.Options.args.profiles = { reset = { order = 12, type = "execute", - name = function() return L["reset"] .. " " .. NORMAL_FONT_COLOR_CODE .. SuperVillain.db.profileKey .. FONT_COLOR_CODE_CLOSE end, + name = function() return L["reset"] .. " " .. NORMAL_FONT_COLOR_CODE .. SV.db.profileKey .. FONT_COLOR_CODE_CLOSE end, desc = L["reset_sub"], - func = function() SuperVillain:StaticPopup_Show("RESET_PROFILE_PROMPT") end, + func = function() SV:StaticPopup_Show("RESET_PROFILE_PROMPT") end, width = "full", }, spacer4 = { @@ -131,8 +131,8 @@ SuperVillain.Options.args.profiles = { order = 14, type = "toggle", name = "Dual-Spec Switching", - get = function() return SuperVillain.db.protected.dualSpecEnabled end, - set = function(key, value) SuperVillain.db.protected.dualSpecEnabled = value; SuperVillain:ToggleSpecSwap(value) end, + get = function() return SV.db.protected.dualSpecEnabled end, + set = function(key, value) SV.db.protected.dualSpecEnabled = value; SV:ToggleSpecSwap(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 index ca127f9..fa05f8d 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua @@ -28,18 +28,18 @@ local upper = string.upper; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVStats; +local SV, L = unpack(SVUI); +local MOD = SV.SVStats; --[[ ########################################################## SET PACKAGE OPTIONS ########################################################## ]]-- -SuperVillain.Options.args.SVStats = { +SV.Options.args.SVStats = { type = "group", name = L["Statistics"], childGroups = "tab", - get = function(key) return SuperVillain.db.SVStats[key[#key]] end, + get = function(key) return SV.db.SVStats[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); MOD:Generate() end, args = { intro = { @@ -70,7 +70,7 @@ SuperVillain.Options.args.SVStats = { name = "Show Backgrounds", desc = L["Display statistic background textures"], type = "toggle", - set = function(key, value) MOD:ChangeDBVar(value, key[#key]); SuperVillain:StaticPopup_Show("RL_CLIENT") end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key]); SV:StaticPopup_Show("RL_CLIENT") end, }, shortGold = { order = 6, @@ -126,8 +126,8 @@ SuperVillain.Options.args.SVStats = { do local orderIncrement = 0; local statValues = MOD.StatListing - local configTable = SuperVillain.db.SVStats.panels; - local optionTable = SuperVillain.Options.args.SVStats.args.panels.args; + 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; @@ -148,7 +148,7 @@ do type = 'select', name = L[position] or upper(position), values = statValues, - get = function(key) return SuperVillain.db.SVStats.panels[panelName][key[#key]] end, + 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 diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua index 2bd6b2f..9b8c6b1 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/tip.lua @@ -29,20 +29,20 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVTip; +local SV, L = unpack(SVUI); +local MOD = SV.SVTip; local LSM = LibStub("LibSharedMedia-3.0"); --[[ ########################################################## SET PACKAGE OPTIONS ########################################################## ]]-- -SuperVillain.Options.args.SVTip = { +SV.Options.args.SVTip = { type = "group", name = L["Tooltip"], childGroups = "tab", - get = function(a)return SuperVillain.db.SVTip[a[#a]] end, - set = function(a, b)SuperVillain.db.SVTip[a[#a]] = b end, + 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, @@ -59,14 +59,14 @@ SuperVillain.Options.args.SVTip = { order = 2, type = "toggle", name = L["Enable"], - get = function(a)return SuperVillain.db.SVTip[a[#a]]end, - set = function(a, b)SuperVillain.db.SVTip[a[#a]] = b;SuperVillain:StaticPopup_Show("RL_CLIENT") end + 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 SuperVillain.db.SVTip.enable end, + disabled = function() return not SV.db.SVTip.enable end, args = { cursorAnchor = { order = 1, @@ -103,8 +103,8 @@ SuperVillain.Options.args.SVTip = { 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 SuperVillain.db.SVTip.spellID end, - set = function(a, b)SuperVillain.db.SVTip.spellID = b;SuperVillain:StaticPopup_Show("RL_CLIENT") end, + get = function(a)return SV.db.SVTip.spellID end, + set = function(a, b)SV.db.SVTip.spellID = b;SV:StaticPopup_Show("RL_CLIENT") end, } } @@ -113,8 +113,8 @@ SuperVillain.Options.args.SVTip = { order=100, type="group", name=L["Visibility"], - get=function(a)return SuperVillain.db.SVTip.visibility[a[#a]]end, - set=function(a,b)SuperVillain.db.SVTip.visibility[a[#a]]=b end, + 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}} @@ -124,8 +124,8 @@ SuperVillain.Options.args.SVTip = { order=200, type="group", name=L["Health Bar"], - get=function(a)return SuperVillain.db.SVTip.healthBar[a[#a]]end, - set=function(a,b)SuperVillain.db.SVTip.healthBar[a[#a]]=b end, + 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, @@ -135,7 +135,7 @@ SuperVillain.Options.args.SVTip = { max = 15, step = 1, width = "full", - set = function(a,b)SuperVillain.db.SVTip.healthBar.height = b;GameTooltipStatusBar:Height(b)end + set = function(a,b)SV.db.SVTip.healthBar.height = b;GameTooltipStatusBar:Height(b)end }, fontGroup = { order = 2, @@ -147,7 +147,7 @@ SuperVillain.Options.args.SVTip = { order = 1, type = "toggle", name = L["Text"], - set = function(a,b)SuperVillain.db.SVTip.healthBar.text = b;if b then GameTooltipStatusBar.text:Show()else GameTooltipStatusBar.text:Hide()end end + 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", @@ -156,7 +156,7 @@ SuperVillain.Options.args.SVTip = { width = "full", name = L["Font"], values = AceGUIWidgetLSMlists.font, - set = function(a,b)SuperVillain.db.SVTip.healthBar.font = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SuperVillain.db.SVTip.healthBar.font), SuperVillain.db.SVTip.healthBar.fontSize,"OUTLINE")end + 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, @@ -166,7 +166,7 @@ SuperVillain.Options.args.SVTip = { max = 22, step = 1, width = "full", - set = function(a,b)SuperVillain.db.SVTip.healthBar.fontSize = b;GameTooltipStatusBar.text:SetFontTemplate(LSM:Fetch("font",SuperVillain.db.SVTip.healthBar.font),SuperVillain.db.SVTip.healthBar.fontSize,"OUTLINE")end + 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 } } } diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua index 4c908b0..0507060 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua @@ -31,8 +31,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ...; local ACD = LibStub("AceConfigDialog-3.0"); @@ -62,7 +62,7 @@ function ns:SetCastbarConfigGroup(updateFunction, unitName, count) type = "group", name = L["Castbar"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["castbar"][key[#key]] + return SV.db.SVUnit[unitName]["castbar"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "castbar") @@ -152,7 +152,7 @@ function ns:SetCastbarConfigGroup(updateFunction, unitName, count) name = L["Match Frame Width"], desc = "Set the castbar width to match its unitframe.", func = function() - SuperVillain.db.SVUnit[unitName]["castbar"]["width"] = SuperVillain.db.SVUnit[unitName]["width"] + SV.db.SVUnit[unitName]["castbar"]["width"] = SV.db.SVUnit[unitName]["width"] updateFunction(MOD, unitName, count) end }, @@ -192,28 +192,28 @@ function ns:SetCastbarConfigGroup(updateFunction, unitName, count) name = L["Custom Bar Color"], type = "color", get = function(key) - local color = SuperVillain.db.SVUnit[unitName]["castbar"]["castingColor"] + local color = SV.db.SVUnit[unitName]["castbar"]["castingColor"] return color[1], color[2], color[3], color[4] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.SVUnit[unitName]["castbar"]["castingColor"] = {rValue, gValue, bValue} + SV.db.SVUnit[unitName]["castbar"]["castingColor"] = {rValue, gValue, bValue} MOD:RefreshUnitFrames() end, - disabled = function() return not SuperVillain.db.SVUnit[unitName]["castbar"].useCustomColor 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 = SuperVillain.db.SVUnit[unitName]["castbar"]["sparkColor"] + local color = SV.db.SVUnit[unitName]["castbar"]["sparkColor"] return color[1], color[2], color[3], color[4] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.SVUnit[unitName]["castbar"]["sparkColor"] = {rValue, gValue, bValue} + SV.db.SVUnit[unitName]["castbar"]["sparkColor"] = {rValue, gValue, bValue} MOD:RefreshUnitFrames() end, - disabled = function() return not SuperVillain.db.SVUnit[unitName]["castbar"].useCustomColor end + disabled = function() return not SV.db.SVUnit[unitName]["castbar"].useCustomColor end }, } }, @@ -256,7 +256,7 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam type = "group", name = auraType == "buffs" and L["Buffs"] or L["Debuffs"], get = function(key) - return SuperVillain.db.SVUnit[unitName][auraType][key[#key]] + return SV.db.SVUnit[unitName][auraType][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, auraType) @@ -289,7 +289,7 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam 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 = SuperVillain.PointIndexes}, + 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 = {}} @@ -317,7 +317,7 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam values = function() filterList = {} filterList[""] = NONE; - for n in pairs(SuperVillain.db.filter)do + for n in pairs(SV.db.filter)do filterList[n] = n end return filterList @@ -336,9 +336,9 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam 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 SuperVillain.db.SVUnit[unitName][auraType].filterPlayer.friendly end, + get = function(l)return SV.db.SVUnit[unitName][auraType].filterPlayer.friendly end, set = function(l, m) - SuperVillain.db.SVUnit[unitName][auraType].filterPlayer.friendly = m; + SV.db.SVUnit[unitName][auraType].filterPlayer.friendly = m; updateFunction(MOD, unitName, count) end }, @@ -347,9 +347,9 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam 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 SuperVillain.db.SVUnit[unitName][auraType].filterPlayer.enemy end, + get = function(l)return SV.db.SVUnit[unitName][auraType].filterPlayer.enemy end, set = function(l, m) - SuperVillain.db.SVUnit[unitName][auraType].filterPlayer.enemy = m; + SV.db.SVUnit[unitName][auraType].filterPlayer.enemy = m; updateFunction(MOD, unitName, count) end } @@ -366,16 +366,16 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam 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 SuperVillain.db.SVUnit[unitName][auraType].filterBlocked.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterBlocked.friendly = m;updateFunction(MOD, unitName, count)end + 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 SuperVillain.db.SVUnit[unitName][auraType].filterBlocked.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterBlocked.enemy = m;updateFunction(MOD, unitName, count)end + 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 } } } @@ -390,16 +390,16 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam 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 SuperVillain.db.SVUnit[unitName][auraType].filterAllowed.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterAllowed.friendly = m;updateFunction(MOD, unitName, count)end + 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 SuperVillain.db.SVUnit[unitName][auraType].filterAllowed.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterAllowed.enemy = m;updateFunction(MOD, unitName, count)end + 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 } } } @@ -414,16 +414,16 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam 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 SuperVillain.db.SVUnit[unitName][auraType].filterInfinite.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterInfinite.friendly = m;updateFunction(MOD, unitName, count)end + 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 SuperVillain.db.SVUnit[unitName][auraType].filterInfinite.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterInfinite.enemy = m;updateFunction(MOD, unitName, count)end + 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 } } } @@ -438,16 +438,16 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam 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 SuperVillain.db.SVUnit[unitName][auraType].filterDispellable.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterDispellable.friendly = m;updateFunction(MOD, unitName, count)end + 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 SuperVillain.db.SVUnit[unitName][auraType].filterDispellable.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterDispellable.enemy = m;updateFunction(MOD, unitName, count)end + 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 } } } @@ -463,15 +463,15 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam 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 SuperVillain.db.SVUnit[unitName][auraType].filterRaid.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterRaid.friendly = m;updateFunction(MOD, unitName, count)end + 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 SuperVillain.db.SVUnit[unitName][auraType].filterRaid.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName][auraType].filterRaid.enemy = m;updateFunction(MOD, unitName, count)end + 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 } } } @@ -484,7 +484,7 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam values = function() filterList = {} filterList[""] = NONE; - for n in pairs(SuperVillain.db.filter)do + for n in pairs(SV.db.filter)do filterList[n] = n end return filterList @@ -502,11 +502,11 @@ function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); local tag = "" - local pc = SuperVillain.db.SVUnit[unitName]["formatting"].threat and "[threat]" or ""; + local pc = SV.db.SVUnit[unitName]["formatting"].threat and "[threat]" or ""; tag = tag .. pc; - local ap = SuperVillain.db.SVUnit[unitName]["formatting"].absorbs and "[absorbs]" or ""; + local ap = SV.db.SVUnit[unitName]["formatting"].absorbs and "[absorbs]" or ""; tag = tag .. ap; - local cp = SuperVillain.db.SVUnit[unitName]["formatting"].incoming and "[incoming]" or ""; + local cp = SV.db.SVUnit[unitName]["formatting"].incoming and "[incoming]" or ""; tag = tag .. cp; MOD:ChangeDBVar(tag, "tags", unitName, "misc"); @@ -517,19 +517,19 @@ function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) order = 1, name = L["Show Incoming Heals"], type = "toggle", - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].incoming end, + get = function() return SV.db.SVUnit[unitName]["formatting"].incoming end, }, absorbs = { order = 2, name = L["Show Absorbs"], type = "toggle", - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].absorbs end, + get = function() return SV.db.SVUnit[unitName]["formatting"].absorbs end, }, threat = { order = 3, name = L["Show Threat"], type = "toggle", - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].threat end, + get = function() return SV.db.SVUnit[unitName]["formatting"].threat end, }, xOffset = { order = 4, @@ -540,7 +540,7 @@ function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) min = -300, max = 300, step = 1, - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].xOffset end, + get = function() return SV.db.SVUnit[unitName]["formatting"].xOffset end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); end, }, yOffset = { @@ -552,7 +552,7 @@ function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) min = -300, max = 300, step = 1, - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].yOffset end, + get = function() return SV.db.SVUnit[unitName]["formatting"].yOffset end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); end, }, } @@ -566,7 +566,7 @@ function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) type = "group", name = L["Health"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["health"][key[#key]] + return SV.db.SVUnit[unitName]["health"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "health"); @@ -580,7 +580,7 @@ function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) 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 = SuperVillain.PointIndexes}, + 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", @@ -600,10 +600,10 @@ function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); local tag = "" - local pc = SuperVillain.db.SVUnit[unitName]["formatting"].health_colored and "[health:color]" or ""; + local pc = SV.db.SVUnit[unitName]["formatting"].health_colored and "[health:color]" or ""; tag = tag .. pc; - local pt = SuperVillain.db.SVUnit[unitName]["formatting"].health_type; + local pt = SV.db.SVUnit[unitName]["formatting"].health_type; if(pt and pt ~= "none") then tag = tag .. "[health:" .. pt .. "]" end @@ -616,14 +616,14 @@ function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) order = 1, name = L["Colored"], type = "toggle", - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].health_colored end, + 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 SuperVillain.db.SVUnit[unitName]["formatting"].health_type end, + get = function() return SV.db.SVUnit[unitName]["formatting"].health_type end, desc = L["TEXT_FORMAT_DESC"], values = textStringFormats, } @@ -655,7 +655,7 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) type = "group", name = L["Power"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["power"][key[#key]] + return SV.db.SVUnit[unitName]["power"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "power"); @@ -669,7 +669,7 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) 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 = SuperVillain.PointIndexes}, + 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"], @@ -698,14 +698,14 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); local tag = "" - local cp = SuperVillain.db.SVUnit[unitName]["formatting"].power_class and "[classpower]" or ""; + local cp = SV.db.SVUnit[unitName]["formatting"].power_class and "[classpower]" or ""; tag = tag .. cp; - local ap = SuperVillain.db.SVUnit[unitName]["formatting"].power_alt and "[altpower]" or ""; + local ap = SV.db.SVUnit[unitName]["formatting"].power_alt and "[altpower]" or ""; tag = tag .. ap; - local pc = SuperVillain.db.SVUnit[unitName]["formatting"].power_colored and "[power:color]" or ""; + local pc = SV.db.SVUnit[unitName]["formatting"].power_colored and "[power:color]" or ""; tag = tag .. pc; - local pt = SuperVillain.db.SVUnit[unitName]["formatting"].power_type; + local pt = SV.db.SVUnit[unitName]["formatting"].power_type; if(pt and pt ~= "none") then tag = tag .. "[power:" .. pt .. "]" end @@ -718,26 +718,26 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) order = 1, name = L["Colored"], type = "toggle", - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].power_colored end, + 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 SuperVillain.db.SVUnit[unitName]["formatting"].power_class end, + 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 SuperVillain.db.SVUnit[unitName]["formatting"].power_alt end, + get = function() return SV.db.SVUnit[unitName]["formatting"].power_alt end, }, power_type = { order = 3, name = L["Text Format"], type = "select", - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].power_type end, + get = function() return SV.db.SVUnit[unitName]["formatting"].power_type end, desc = L["TEXT_FORMAT_DESC"], values = textStringFormats, } @@ -752,7 +752,7 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) order = 2, name = L["Attach Text to Power"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["power"].attachTextToPower + return SV.db.SVUnit[unitName]["power"].attachTextToPower end, set = function(key, value) MOD:ChangeDBVar(value, "attachTextToPower", unitName, "power"); @@ -770,7 +770,7 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) type = "group", name = L["Name"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["name"][key[#key]] + return SV.db.SVUnit[unitName]["name"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "name"); @@ -788,7 +788,7 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) order = 3, name = L["Text Position"], desc = L["Set the anchor for this units name text"], - values = SuperVillain.PointIndexes + values = SV.PointIndexes }, xOffset = { order = 6, @@ -857,11 +857,11 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "formatting"); local tag = "" - tag = SuperVillain.db.SVUnit[unitName]["formatting"].name_colored and "[name:color]" or ""; + tag = SV.db.SVUnit[unitName]["formatting"].name_colored and "[name:color]" or ""; - local length = SuperVillain.db.SVUnit[unitName]["formatting"].name_length; + local length = SV.db.SVUnit[unitName]["formatting"].name_length; tag = tag .. "[name:" .. length .. "]" - local lvl = SuperVillain.db.SVUnit[unitName]["formatting"].smartlevel and "[smartlevel]" or ""; + local lvl = SV.db.SVUnit[unitName]["formatting"].smartlevel and "[smartlevel]" or ""; tag = tag .. lvl MOD:ChangeDBVar(tag, "tags", unitName, "name"); @@ -872,14 +872,14 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) order = 1, name = L["Colored"], type = "toggle", - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].name_colored end, + 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 SuperVillain.db.SVUnit[unitName]["formatting"].smartlevel end, + get = function() return SV.db.SVUnit[unitName]["formatting"].smartlevel end, desc = L["Display the units level"] }, name_length = { @@ -888,7 +888,7 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) desc = L["TEXT_FORMAT_DESC"], type = "range", width = "full", - get = function() return SuperVillain.db.SVUnit[unitName]["formatting"].name_length end, + get = function() return SV.db.SVUnit[unitName]["formatting"].name_length end, min = 1, max = 30, step = 1 @@ -901,7 +901,7 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) end local function getAvailablePortraitConfig(unit) - local db = SuperVillain.db.SVUnit[unit].portrait; + local db = SV.db.SVUnit[unit].portrait; if db.overlay then return {["3D"] = L["3D"]} else @@ -915,7 +915,7 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) type = "group", name = L["Portrait"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["portrait"][key[#key]] + return SV.db.SVUnit[unitName]["portrait"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "portrait") @@ -945,7 +945,7 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) type = "toggle", name = L["Overlay"], desc = L["Overlay the healthbar"], - disabled = function() return SuperVillain.db.SVUnit[unitName]["portrait"].style == "2D" end + disabled = function() return SV.db.SVUnit[unitName]["portrait"].style == "2D" end }, width = { order = 3, @@ -955,7 +955,7 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) min = 15, max = 150, step = 1, - disabled = function() return SuperVillain.db.SVUnit[unitName]["portrait"].overlay == true end + disabled = function() return SV.db.SVUnit[unitName]["portrait"].overlay == true end } } }, @@ -964,7 +964,7 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) type = "group", guiInline = true, name = L["3D Settings"], - disabled = function() return SuperVillain.db.SVUnit[unitName]["portrait"].style == "2D" end, + disabled = function() return SV.db.SVUnit[unitName]["portrait"].style == "2D" end, args = { rotation = { order = 1, @@ -991,14 +991,14 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) end function ns:SetIconConfigGroup(updateFunction, unitName, count) - local iconGroup = SuperVillain.db.SVUnit[unitName]["icons"] + local iconGroup = SV.db.SVUnit[unitName]["icons"] local grouporder = 1 local k = { order = 5000, type = "group", name = L["Icons"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["icons"][key[#key]] + return SV.db.SVUnit[unitName]["icons"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons") @@ -1014,7 +1014,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Raid Marker"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["icons"]["raidicon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["raidicon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "raidicon") @@ -1022,7 +1022,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SuperVillain.PointIndexes}, + 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} @@ -1038,7 +1038,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Combat"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["icons"]["combatIcon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["combatIcon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "combatIcon") @@ -1046,7 +1046,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SuperVillain.PointIndexes}, + 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} @@ -1062,7 +1062,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Resting"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["icons"]["restIcon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["restIcon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "restIcon") @@ -1070,7 +1070,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SuperVillain.PointIndexes}, + 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} @@ -1086,7 +1086,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Class"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["icons"]["classicon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["classicon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "classicon") @@ -1094,7 +1094,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SuperVillain.PointIndexes}, + 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} @@ -1110,7 +1110,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Elite / Rare"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["icons"]["eliteicon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["eliteicon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "eliteicon") @@ -1118,7 +1118,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SuperVillain.PointIndexes}, + 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} @@ -1134,7 +1134,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Role"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["icons"]["roleIcon"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["roleIcon"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "roleIcon") @@ -1142,7 +1142,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SuperVillain.PointIndexes}, + 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} @@ -1158,7 +1158,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) guiInline = true, name = L["Leader / MasterLooter"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["icons"]["raidRoleIcons"][key[#key]] + return SV.db.SVUnit[unitName]["icons"]["raidRoleIcons"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "icons", "raidRoleIcons") @@ -1166,7 +1166,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) end, args = { enable = {type = "toggle", order = 1, name = L["Enable"]}, - attachTo = {type = "select", order = 2, name = L["Position"], values = SuperVillain.PointIndexes}, + 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} @@ -1184,7 +1184,7 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) type = "group", name = L["Aura Bars"], get = function(key) - return SuperVillain.db.SVUnit[unitName]["aurabar"][key[#key]] + return SV.db.SVUnit[unitName]["aurabar"][key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key], unitName, "aurabar") @@ -1311,7 +1311,7 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) values = function() filterList = {} filterList[""] = NONE; - for n in pairs(SuperVillain.db.filter)do + for n in pairs(SV.db.filter)do filterList[n] = n end return filterList @@ -1327,15 +1327,15 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterPlayer.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterPlayer.friendly = m;updateFunction(MOD, unitName)end + 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterPlayer.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterPlayer.enemy = m;updateFunction(MOD, unitName)end + 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 } } } @@ -1348,15 +1348,15 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterBlocked.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterBlocked.friendly = m;updateFunction(MOD, unitName)end + 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterBlocked.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterBlocked.enemy = m;updateFunction(MOD, unitName)end + 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 } } } @@ -1369,15 +1369,15 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterAllowed.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterAllowed.friendly = m;updateFunction(MOD, unitName)end + 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterAllowed.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterAllowed.enemy = m;updateFunction(MOD, unitName)end + 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 } } } @@ -1390,15 +1390,15 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterInfinite.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterInfinite.friendly = m;updateFunction(MOD, unitName)end + 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterInfinite.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterInfinite.enemy = m;updateFunction(MOD, unitName)end + 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 } } } @@ -1411,13 +1411,13 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterDispellable.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterDispellable.friendly = m;updateFunction(MOD, unitName)end}, enemy = { + 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterDispellable.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterDispellable.enemy = m;updateFunction(MOD, unitName)end} + 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 = { @@ -1429,13 +1429,13 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterRaid.friendly end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterRaid.friendly = m;updateFunction(MOD, unitName)end}, enemy = { + 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 SuperVillain.db.SVUnit[unitName]["aurabar"].filterRaid.enemy end, - set = function(l, m)SuperVillain.db.SVUnit[unitName]["aurabar"].filterRaid.enemy = m;updateFunction(MOD, unitName)end} + 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 = { @@ -1446,7 +1446,7 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) values = function() filterList = {} filterList[""] = NONE; - for n in pairs(SuperVillain.db.filter)do + for n in pairs(SV.db.filter)do filterList[n] = n end return filterList @@ -1456,12 +1456,12 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) return k end -SuperVillain.Options.args.SVUnit = { +SV.Options.args.SVUnit = { type = "group", name = L["UnitFrames"], childGroups = "tree", get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1473,10 +1473,10 @@ SuperVillain.Options.args.SVUnit = { type = "toggle", name = L["Enable"], get = function(l) - return SuperVillain.db.SVUnit.enable end, + return SV.db.SVUnit.enable end, set = function(l, m) - SuperVillain.db.SVUnit.enable = m; - SuperVillain:StaticPopup_Show("RL_CLIENT") + SV.db.SVUnit.enable = m; + SV:StaticPopup_Show("RL_CLIENT") end }, common = { @@ -1485,7 +1485,7 @@ SuperVillain.Options.args.SVUnit = { name = L["General"], guiInline = true, disabled = function() - return not SuperVillain.db.SVUnit.enable + return not SV.db.SVUnit.enable end, args = { commonGroup = { @@ -1500,11 +1500,11 @@ SuperVillain.Options.args.SVUnit = { desc = L["Disables the blizzard party/raid frames."], type = "toggle", get = function(key) - return SuperVillain.db.SVUnit.disableBlizzard + return SV.db.SVUnit.disableBlizzard end, set = function(key, value) MOD:ChangeDBVar(value, "disableBlizzard"); - SuperVillain:StaticPopup_Show("RL_CLIENT") + SV:StaticPopup_Show("RL_CLIENT") end }, fastClickTarget = { @@ -1552,11 +1552,11 @@ SuperVillain.Options.args.SVUnit = { guiInline = true, name = "Unit Backgrounds (3D Portraits Only)", get = function(key) - return SuperVillain.db.media.textures[key[#key]] + return SV.db.media.textures[key[#key]] end, set = function(key, value) - SuperVillain.db.media.textures[key[#key]] = {"background", value} - SuperVillain:RefreshEverything(true) + SV.db.media.textures[key[#key]] = {"background", value} + SV:RefreshEverything(true) end, args = { unitlarge = { @@ -1581,7 +1581,7 @@ SuperVillain.Options.args.SVUnit = { guiInline = true, name = L["Bars"], get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1705,7 +1705,7 @@ SuperVillain.Options.args.SVUnit = { name = L["Class Health"], desc = L["Color health by classcolor or reaction."], get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1718,7 +1718,7 @@ SuperVillain.Options.args.SVUnit = { name = L["Health By Value"], desc = L["Color health by amount remaining."], get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1731,7 +1731,7 @@ SuperVillain.Options.args.SVUnit = { name = L["Class Backdrop"], desc = L["Color the health backdrop by class or reaction."], get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1744,7 +1744,7 @@ SuperVillain.Options.args.SVUnit = { name = L["Overlay Health Color"], desc = L["Force custom health color when using portrait overlays."], get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1757,7 +1757,7 @@ SuperVillain.Options.args.SVUnit = { name = L["Overlay Animations"], desc = L["Toggle health animations on portrait overlays."], get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1769,11 +1769,11 @@ SuperVillain.Options.args.SVUnit = { type = "color", name = L["Health"], get = function(key) - local color = SuperVillain.db.media.unitframes.health + local color = SV.db.media.unitframes.health return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.health = {rValue, gValue, bValue} + SV.db.media.unitframes.health = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -1782,11 +1782,11 @@ SuperVillain.Options.args.SVUnit = { type = "color", name = L["Tapped"], get = function(key) - local color = SuperVillain.db.media.unitframes.tapped + local color = SV.db.media.unitframes.tapped return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.tapped = {rValue, gValue, bValue} + SV.db.media.unitframes.tapped = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -1795,11 +1795,11 @@ SuperVillain.Options.args.SVUnit = { type = "color", name = L["Disconnected"], get = function(key) - local color = SuperVillain.db.media.unitframes.disconnected + local color = SV.db.media.unitframes.disconnected return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.disconnected = {rValue, gValue, bValue} + SV.db.media.unitframes.disconnected = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, } @@ -1817,7 +1817,7 @@ SuperVillain.Options.args.SVUnit = { name = L["Class Power"], desc = L["Color power by classcolor or reaction."], get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1829,11 +1829,11 @@ SuperVillain.Options.args.SVUnit = { name = MANA, type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.power["MANA"] + local color = SV.db.media.unitframes.power["MANA"] return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.power["MANA"] = {rValue, gValue, bValue} + SV.db.media.unitframes.power["MANA"] = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -1842,11 +1842,11 @@ SuperVillain.Options.args.SVUnit = { name = RAGE, type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.power["RAGE"] + local color = SV.db.media.unitframes.power["RAGE"] return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.power["RAGE"] = {rValue, gValue, bValue} + SV.db.media.unitframes.power["RAGE"] = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -1855,11 +1855,11 @@ SuperVillain.Options.args.SVUnit = { name = FOCUS, type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.power["FOCUS"] + local color = SV.db.media.unitframes.power["FOCUS"] return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.power["FOCUS"] = {rValue, gValue, bValue} + SV.db.media.unitframes.power["FOCUS"] = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -1868,11 +1868,11 @@ SuperVillain.Options.args.SVUnit = { name = ENERGY, type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.power["ENERGY"] + local color = SV.db.media.unitframes.power["ENERGY"] return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.power["ENERGY"] = {rValue, gValue, bValue} + SV.db.media.unitframes.power["ENERGY"] = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -1881,11 +1881,11 @@ SuperVillain.Options.args.SVUnit = { name = RUNIC_POWER, type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.power["RUNIC_POWER"] + local color = SV.db.media.unitframes.power["RUNIC_POWER"] return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.power["RUNIC_POWER"] = {rValue, gValue, bValue} + SV.db.media.unitframes.power["RUNIC_POWER"] = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, } @@ -1903,7 +1903,7 @@ SuperVillain.Options.args.SVUnit = { name = L["Class Castbars"], desc = L["Color castbars by the class or reaction type of the unit."], get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1915,11 +1915,11 @@ SuperVillain.Options.args.SVUnit = { name = L["Interruptable"], type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.casting + local color = SV.db.media.unitframes.casting return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.casting = {rValue, gValue, bValue} + SV.db.media.unitframes.casting = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -1928,11 +1928,11 @@ SuperVillain.Options.args.SVUnit = { name = "Spark Color", type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.spark + local color = SV.db.media.unitframes.spark return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.spark = {rValue, gValue, bValue} + SV.db.media.unitframes.spark = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -1941,11 +1941,11 @@ SuperVillain.Options.args.SVUnit = { name = L["Non-Interruptable"], type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.interrupt + local color = SV.db.media.unitframes.interrupt return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.interrupt = {rValue, gValue, bValue} + SV.db.media.unitframes.interrupt = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, } @@ -1963,7 +1963,7 @@ SuperVillain.Options.args.SVUnit = { desc = L["Color aurabar debuffs by type."], type = "toggle", get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1976,7 +1976,7 @@ SuperVillain.Options.args.SVUnit = { desc = L["Color all buffs that reduce incoming damage."], type = "toggle", get = function(key) - return SuperVillain.db.SVUnit[key[#key]] + return SV.db.SVUnit[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key]); @@ -1988,11 +1988,11 @@ SuperVillain.Options.args.SVUnit = { name = L["Buffs"], type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.buff_bars + local color = SV.db.media.unitframes.buff_bars return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.buff_bars = {rValue, gValue, bValue} + SV.db.media.unitframes.buff_bars = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -2001,11 +2001,11 @@ SuperVillain.Options.args.SVUnit = { name = L["Debuffs"], type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.debuff_bars + local color = SV.db.media.unitframes.debuff_bars return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.debuff_bars = {rValue, gValue, bValue} + SV.db.media.unitframes.debuff_bars = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, }, @@ -2014,11 +2014,11 @@ SuperVillain.Options.args.SVUnit = { name = L["Shield Buffs Color"], type = "color", get = function(key) - local color = SuperVillain.db.media.unitframes.shield_bars + local color = SV.db.media.unitframes.shield_bars return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.shield_bars = {rValue, gValue, bValue} + SV.db.media.unitframes.shield_bars = {rValue, gValue, bValue} MOD:RefreshAllUnitMedia() end, } @@ -2035,11 +2035,11 @@ SuperVillain.Options.args.SVUnit = { type = "color", hasAlpha = true, get = function(key) - local color = SuperVillain.db.media.unitframes.predict["personal"] + local color = SV.db.media.unitframes.predict["personal"] return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.predict["personal"] = {rValue, gValue, bValue} + SV.db.media.unitframes.predict["personal"] = {rValue, gValue, bValue} MOD:RefreshUnitFrames() end, }, @@ -2049,11 +2049,11 @@ SuperVillain.Options.args.SVUnit = { type = "color", hasAlpha = true, get = function(key) - local color = SuperVillain.db.media.unitframes.predict["others"] + local color = SV.db.media.unitframes.predict["others"] return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.predict["others"] = {rValue, gValue, bValue} + SV.db.media.unitframes.predict["others"] = {rValue, gValue, bValue} MOD:RefreshUnitFrames() end, }, @@ -2063,11 +2063,11 @@ SuperVillain.Options.args.SVUnit = { type = "color", hasAlpha = true, get = function(key) - local color = SuperVillain.db.media.unitframes.predict["absorbs"] + local color = SV.db.media.unitframes.predict["absorbs"] return color[1],color[2],color[3] end, set = function(key, rValue, gValue, bValue) - SuperVillain.db.media.unitframes.predict["absorbs"] = {rValue, gValue, bValue} + SV.db.media.unitframes.predict["absorbs"] = {rValue, gValue, bValue} MOD:RefreshUnitFrames() end, } diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua index 87836f1..0cdf607 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... --[[ @@ -38,16 +38,16 @@ local _, ns = ... ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.focus = { +SV.Options.args.SVUnit.args.focus = { name = L["Focus Frame"], type = "group", order = 9, childGroups = "tab", - get = function(l)return SuperVillain.db.SVUnit["focus"][l[#l]]end, + 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");SuperVillain:ResetMovables("Focus Frame")end}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("focus");SV:ResetMovables("Focus Frame")end}, tabGroups = { order = 3, type = "group", @@ -95,8 +95,8 @@ SuperVillain.Options.args.SVUnit.args.focus = { 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 SuperVillain.db.SVUnit["focus"]["power"].hideonnpc end, - set = function(l, m)SuperVillain.db.SVUnit["focus"]["power"].hideonnpc = m;MOD:SetUnitFrame("focus")end + 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", @@ -151,16 +151,16 @@ SuperVillain.Options.args.SVUnit.args.focus = { ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.focustarget = { +SV.Options.args.SVUnit.args.focustarget = { name = L["FocusTarget Frame"], type = "group", order = 10, childGroups = "tab", - get = function(l)return SuperVillain.db.SVUnit["focustarget"][l[#l]]end, + 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")SuperVillain:ResetMovables("FocusTarget Frame")end}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("focustarget")SV:ResetMovables("FocusTarget Frame")end}, tabGroups = { order = 3, type = "group", @@ -185,7 +185,7 @@ SuperVillain.Options.args.SVUnit.args.focustarget = { 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 SuperVillain.db.SVUnit["focustarget"]["power"].hideonnpc end, set = function(l, m)SuperVillain.db.SVUnit["focustarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("focustarget")end}, + 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"]} } }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua index 30c636d..0205fcd 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/grid.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... --[[ @@ -38,7 +38,7 @@ local _, ns = ... ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.grid = { +SV.Options.args.SVUnit.args.grid = { name = L["Grid Frames"], type = "group", order = 1200, @@ -56,7 +56,7 @@ SuperVillain.Options.args.SVUnit.args.grid = { guiInline = true, name = L["General Settings"], get = function(key) - return SuperVillain.db.SVUnit.grid[key[#key]] + return SV.db.SVUnit.grid[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key] , "grid"); @@ -75,7 +75,7 @@ SuperVillain.Options.args.SVUnit.args.grid = { desc = L["Grid frames will show name texts."], type = "toggle", set = function(key, value) - if(SuperVillain.db.SVUnit.grid.size < 30) then MOD:ChangeDBVar(30, "size", "grid"); end + if(SV.db.SVUnit.grid.size < 30) then MOD:ChangeDBVar(30, "size", "grid"); end MOD:ChangeDBVar(value, "shownames", "grid"); MOD:RefreshUnitFrames(); end @@ -98,7 +98,7 @@ SuperVillain.Options.args.SVUnit.args.grid = { guiInline = true, name = L["Allowed Frames"], get = function(key) - return SuperVillain.db.SVUnit.grid[key[#key]] + return SV.db.SVUnit.grid[key[#key]] end, set = function(key, value) MOD:ChangeDBVar(value, key[#key] , "grid"); @@ -110,56 +110,56 @@ SuperVillain.Options.args.SVUnit.args.grid = { order = 1, name = L['Party Grid'], desc = L['If grid-mode is enabled, these units will be changed.'], - get = function(key) return SuperVillain.db.SVUnit.party.gridAllowed end, - set = function(key, value) SuperVillain.db.SVUnit.party.gridAllowed = value; MOD:SetGroupFrame("party") end, + 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 SuperVillain.db.SVUnit.party.petsGroup.gridAllowed end, - set = function(key, value) SuperVillain.db.SVUnit.party.petsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, + 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 SuperVillain.db.SVUnit.party.targetsGroup.gridAllowed end, - set = function(key, value) SuperVillain.db.SVUnit.party.targetsGroup.gridAllowed = value; MOD:SetGroupFrame("party") end, + 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 SuperVillain.db.SVUnit.raid10.gridAllowed end, - set = function(key, value) SuperVillain.db.SVUnit.raid10.gridAllowed = value; MOD:SetGroupFrame("raid10") end, + 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 SuperVillain.db.SVUnit.raid25.gridAllowed end, - set = function(key, value) SuperVillain.db.SVUnit.raid25.gridAllowed = value; MOD:SetGroupFrame("raid25") end, + 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 SuperVillain.db.SVUnit.raid40.gridAllowed end, - set = function(key, value) SuperVillain.db.SVUnit.raid40.gridAllowed = value; MOD:SetGroupFrame("raid40") end, + 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 SuperVillain.db.SVUnit.raidpet.gridAllowed end, - set = function(key, value) SuperVillain.db.SVUnit.raidpet.gridAllowed = value; MOD:SetGroupFrame("raidpet") end, + get = function(key) return SV.db.SVUnit.raidpet.gridAllowed end, + set = function(key, value) SV.db.SVUnit.raidpet.gridAllowed = value; MOD:SetGroupFrame("raidpet") end, }, } }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua index 5aaddf9..bfc19d9 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... --[[ @@ -38,17 +38,17 @@ local _, ns = ... ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.boss = { +SV.Options.args.SVUnit.args.boss = { name = L["Boss Frames"], type = "group", order = 1000, childGroups = "tab", - get = function(l)return SuperVillain.db.SVUnit["boss"][l[#l]]end, + 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")SuperVillain:ResetMovables("Boss Frames")end}, + resetSettings = {type = "execute", order = 3, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("boss")SV:ResetMovables("Boss Frames")end}, tabGroups = { order = 3, type = "group", @@ -73,7 +73,7 @@ SuperVillain.Options.args.SVUnit.args.boss = { 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 SuperVillain.db.SVUnit["boss"]["power"].hideonnpc end, set = function(l, m)SuperVillain.db.SVUnit["boss"]["power"].hideonnpc = m;MOD:SetEnemyFrames("boss")end}, + 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"]} } }, @@ -107,17 +107,17 @@ SuperVillain.Options.args.SVUnit.args.boss = { ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.arena = { +SV.Options.args.SVUnit.args.arena = { name = L["Arena Frames"], type = "group", order = 1100, childGroups = "tab", - get = function(l)return SuperVillain.db.SVUnit["arena"][l[#l]]end, + 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")SuperVillain:ResetMovables("Arena Frames")end}, + resetSettings = {type = "execute", order = 3, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("arena")SV:ResetMovables("Arena Frames")end}, tabGroups = { order = 3, type = "group", @@ -143,7 +143,7 @@ SuperVillain.Options.args.SVUnit.args.arena = { }, 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 SuperVillain.db.SVUnit["arena"]["power"].hideonnpc end, set = function(l, m)SuperVillain.db.SVUnit["arena"]["power"].hideonnpc = m;MOD:SetEnemyFrames("arena")end}, + 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"]} } }, @@ -167,7 +167,7 @@ SuperVillain.Options.args.SVUnit.args.arena = { type = "toggle", order = 1, name = L["Enable"], - get = function(l)return SuperVillain.db.SVUnit.arena.pvp.enable end, + 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 = { @@ -175,9 +175,9 @@ SuperVillain.Options.args.SVUnit.args.arena = { guiInline = true, type = "group", name = L["Trinkets"], - get = function(l)return SuperVillain.db.SVUnit.arena.pvp[l[#l]]end, + 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 SuperVillain.db.SVUnit.arena.pvp.enable end, + disabled = function() return not SV.db.SVUnit.arena.pvp.enable end, args = { trinketPosition = { type = "select", @@ -219,9 +219,9 @@ SuperVillain.Options.args.SVUnit.args.arena = { guiInline = true, type = "group", name = L["Enemy Specs"], - get = function(l)return SuperVillain.db.SVUnit.arena.pvp[l[#l]]end, + 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 SuperVillain.db.SVUnit.arena.pvp.enable end, + disabled = function() return not SV.db.SVUnit.arena.pvp.enable end, args = { specPosition = { type = "select", @@ -278,12 +278,12 @@ SuperVillain.Options.args.SVUnit.args.arena = { ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.tank = { +SV.Options.args.SVUnit.args.tank = { name = L["Tank Frames"], type = "group", order = 1200, childGroups = "tab", - get = function(l)return SuperVillain.db.SVUnit["tank"][l[#l]]end, + 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"]}, @@ -308,7 +308,7 @@ SuperVillain.Options.args.SVUnit.args.tank = { type = "group", name = L["Tank Target"], guiInline = true, - get = function(l)return SuperVillain.db.SVUnit["tank"]["targetsGroup"][l[#l]]end, + 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}, @@ -328,12 +328,12 @@ SuperVillain.Options.args.SVUnit.args.tank = { ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.assist = { +SV.Options.args.SVUnit.args.assist = { name = L["Assist Frames"], type = "group", order = 1300, childGroups = "tab", - get = function(l)return SuperVillain.db.SVUnit["assist"][l[#l]]end, + 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"]}, @@ -358,7 +358,7 @@ SuperVillain.Options.args.SVUnit.args.assist = { type = "group", name = L["Assist Target"], guiInline = true, - get = function(l)return SuperVillain.db.SVUnit["assist"]["targetsGroup"][l[#l]]end, + 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}, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua index fbf36ec..9441a00 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua @@ -29,18 +29,18 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... -SuperVillain.Options.args.SVUnit.args.party = { +SV.Options.args.SVUnit.args.party = { name = L['Party Frames'], type = 'group', order = 11, childGroups = "tab", get = function(l)return - SuperVillain.db.SVUnit['party'][l[#l]]end, + SV.db.SVUnit['party'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, args = { enable = { @@ -60,7 +60,7 @@ SuperVillain.Options.args.SVUnit.args.party = { type = 'execute', order = 3, name = L['Restore Defaults'], - func = function(l, m)MOD:ResetUnitOptions('party')SuperVillain:ResetMovables('Party Frames')end, + func = function(l, m)MOD:ResetUnitOptions('party')SV:ResetMovables('Party Frames')end, }, tabGroups= { order=3, @@ -78,8 +78,8 @@ SuperVillain.Options.args.SVUnit.args.party = { 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 SuperVillain.db.SVUnit['party']['power'].hideonnpc end, - set = function(l, m)SuperVillain.db.SVUnit['party']['power'].hideonnpc = m;MOD:SetGroupFrame('party')end, + 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, @@ -283,14 +283,14 @@ SuperVillain.Options.args.SVUnit.args.party = { order = 5, name = L['Invert Grouping Order'], desc = L['Enabling this inverts the sorting order.'], - disabled = function()return not SuperVillain.db.SVUnit['party'].customSorting end, + 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 SuperVillain.db.SVUnit['party'].customSorting end, + disabled = function()return not SV.db.SVUnit['party'].customSorting end, type = 'toggle', }, }, @@ -303,7 +303,7 @@ SuperVillain.Options.args.SVUnit.args.party = { type = 'group', name = L['Aura Watch'], get = function(l)return - SuperVillain.db.SVUnit['party']['auraWatch'][l[#l]]end, + 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 = { @@ -340,7 +340,7 @@ SuperVillain.Options.args.SVUnit.args.party = { order = 800, type = 'group', name = L['Party Pets'], - get = function(l)return SuperVillain.db.SVUnit['party']['petsGroup'][l[#l]]end, + 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 = { @@ -411,7 +411,7 @@ SuperVillain.Options.args.SVUnit.args.party = { type = 'group', name = L['Party Targets'], get = function(l)return - SuperVillain.db.SVUnit['party']['targetsGroup'][l[#l]]end, + 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 = { diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua index ec5505f..36ec8b3 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... --[[ @@ -38,16 +38,16 @@ local _, ns = ... ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.pet = { +SV.Options.args.SVUnit.args.pet = { name = L["Pet Frame"], type = "group", order = 4, childGroups = "tab", - get = function(l)return SuperVillain.db.SVUnit["pet"][l[#l]]end, + 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")SuperVillain:ResetMovables("Pet Frame")end}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("pet")SV:ResetMovables("Pet Frame")end}, tabGroups = { order = 3, type = "group", @@ -88,8 +88,8 @@ SuperVillain.Options.args.SVUnit.args.pet = { 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 SuperVillain.db.SVUnit["pet"]["power"].hideonnpc end, - set = function(l, m)SuperVillain.db.SVUnit["pet"]["power"].hideonnpc = m;MOD:SetUnitFrame("pet")end + 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", @@ -113,7 +113,7 @@ SuperVillain.Options.args.SVUnit.args.pet = { type = "group", guiInline = true, name = L["Aura Watch"], - get = function(l)return SuperVillain.db.SVUnit["pet"]["auraWatch"][l[#l]]end, + 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 = { @@ -150,15 +150,15 @@ SuperVillain.Options.args.SVUnit.args.pet = { ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.pettarget = { +SV.Options.args.SVUnit.args.pettarget = { name = L["PetTarget Frame"], type = "group", order = 5, childGroups = "tab", - get = function(l)return SuperVillain.db.SVUnit["pettarget"][l[#l]]end, + 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")SuperVillain:ResetMovables("PetTarget Frame")end}, + resetSettings = {type = "execute", order = 2, name = L["Restore Defaults"], func = function(l, m)MOD:ResetUnitOptions("pettarget")SV:ResetMovables("PetTarget Frame")end}, tabGroups = { order = 3, type = "group", @@ -184,8 +184,8 @@ SuperVillain.Options.args.SVUnit.args.pettarget = { 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 SuperVillain.db.SVUnit["pettarget"]["power"].hideonnpc end, - set = function(l, m)SuperVillain.db.SVUnit["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end + 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"]} } @@ -218,8 +218,8 @@ SuperVillain.Options.args.SVUnit.args.pettarget = { 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 SuperVillain.db.SVUnit["pettarget"]["power"].hideonnpc end, - set = function(l, m)SuperVillain.db.SVUnit["pettarget"]["power"].hideonnpc = m;MOD:SetUnitFrame("pettarget")end + 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", diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua index ab5b88f..884c2a9 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... --[[ @@ -38,12 +38,12 @@ local _, ns = ... ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.player={ +SV.Options.args.SVUnit.args.player={ name = L['Player Frame'], type = 'group', order = 3, childGroups = "tab", - get = function(l)return SuperVillain.db.SVUnit['player'][l[#l]]end, + 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 = { @@ -57,7 +57,7 @@ SuperVillain.Options.args.SVUnit.args.player={ name = L['Restore Defaults'], func = function(l,m) MOD:ResetUnitOptions('player') - SuperVillain:ResetMovables('Player Frame') + SV:ResetMovables('Player Frame') end }, tabGroups = { @@ -118,8 +118,8 @@ SuperVillain.Options.args.SVUnit.args.player={ 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 SuperVillain.db.SVUnit["player"]["power"].hideonnpc end, - set = function(l, m)SuperVillain.db.SVUnit["player"]["power"].hideonnpc = m;MOD:SetUnitFrame("player")end + 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", @@ -131,14 +131,14 @@ SuperVillain.Options.args.SVUnit.args.player={ name = "Playerframe Experience Bar", desc = "Show player experience on power bar mouseover", type = "toggle", - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player");SuperVillain:StaticPopup_Show("RL_CLIENT")end + 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");SuperVillain:StaticPopup_Show("RL_CLIENT")end + set = function(l, m)MOD:ChangeDBVar(m, l[#l], "player");SV:StaticPopup_Show("RL_CLIENT")end } } }, @@ -157,8 +157,8 @@ SuperVillain.Options.args.SVUnit.args.player={ max = 500, step = 1, set = function(l, m) - if SuperVillain.db.SVUnit["player"].castbar.width == SuperVillain.db.SVUnit["player"][l[#l]] then - SuperVillain.db.SVUnit["player"].castbar.width = 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") @@ -180,7 +180,7 @@ SuperVillain.Options.args.SVUnit.args.player={ type = "group", guiInline = true, name = PVP, - get = function(l)return SuperVillain.db.SVUnit["player"]["pvp"][l[#l]]end, + 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 = { @@ -224,7 +224,7 @@ SuperVillain.Options.args.SVUnit.args.player={ order = 1000, type = "group", name = L["Classbar"], - get = function(l)return SuperVillain.db.SVUnit["player"]["classbar"][l[#l]]end, + 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 = { @@ -252,9 +252,9 @@ SuperVillain.Options.args.SVUnit.args.player={ type = "toggle", order = 3, name = L["Stagger Bar"], - get = function(l)return SuperVillain.db.SVUnit["player"]["stagger"].enable end, + 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 = SuperVillain.class ~= "MONK", + disabled = SV.class ~= "MONK", }, druidMana = { type = "toggle", @@ -262,13 +262,13 @@ SuperVillain.Options.args.SVUnit.args.player={ 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 SuperVillain.db.SVUnit["player"]["power"].druidMana + return SV.db.SVUnit["player"]["power"].druidMana end, set = function(key, value) MOD:ChangeDBVar(value, "druidMana", "player", "power"); MOD:SetUnitFrame("player") end, - disabled = SuperVillain.class ~= "DRUID", + disabled = SV.class ~= "DRUID", } } }, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua index 7fa0f8c..a7f85ca 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua @@ -29,20 +29,20 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... local subOrder = 11; for w=10,40,15 do subOrder = subOrder + 1 - SuperVillain.Options.args.SVUnit.args["raid" .. w] = { + SV.Options.args.SVUnit.args["raid" .. w] = { name = L["Raid-" .. w .. " Frames"], type = "group", order = subOrder, childGroups = "tab", - get = function(l) return SuperVillain.db.SVUnit["raid" .. w][l[#l]] end, + 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 = @@ -61,7 +61,7 @@ for w=10,40,15 do type = "execute", order = 3, name = L["Restore Defaults"], - func = function(l, m)MOD:ResetUnitOptions("raid" .. w)SuperVillain:ResetMovables("Raid 1-" .. w .. " Frames")end, + func = function(l, m)MOD:ResetUnitOptions("raid" .. w)SV:ResetMovables("Raid 1-" .. w .. " Frames")end, }, tabGroups = { order = 3, @@ -80,8 +80,8 @@ for w=10,40,15 do 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 SuperVillain.db.SVUnit["raid" .. w]["power"].hideonnpc end, - set = function(l, m)SuperVillain.db.SVUnit["raid" .. w]["power"].hideonnpc = m;MOD:SetGroupFrame("raid" .. w)end, + 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, @@ -308,7 +308,7 @@ for w=10,40,15 do 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 SuperVillain.db.SVUnit["raid" .. w].customSorting end, + disabled = function()return not SV.db.SVUnit["raid" .. w].customSorting end, type = "toggle", }, startFromCenter = @@ -316,7 +316,7 @@ for w=10,40,15 do order = 6, name = L["Start Near Center"], desc = L["The initial group will start near the center and grow out."], - disabled = function()return not SuperVillain.db.SVUnit["raid" .. w].customSorting end, + disabled = function()return not SV.db.SVUnit["raid" .. w].customSorting end, type = "toggle", }, }, @@ -338,7 +338,7 @@ for w=10,40,15 do type = "toggle", name = L["Enable"], order = 1, - get = function(l)return SuperVillain.db.SVUnit["raid" .. w].auraWatch.enable end, + 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 = { @@ -349,7 +349,7 @@ for w=10,40,15 do min = 4, max = 15, step = 1, - get = function(l)return SuperVillain.db.SVUnit["raid" .. w].auraWatch.size end, + 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 = { @@ -366,7 +366,7 @@ for w=10,40,15 do type = "group", name = L["RaidDebuff Indicator"], get = function(l)return - SuperVillain.db.SVUnit["raid" .. w]["rdebuffs"][l[#l]]end, + 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 = { @@ -422,13 +422,13 @@ for w=10,40,15 do end subOrder = subOrder + 1 -SuperVillain.Options.args.SVUnit.args.raidpet ={ +SV.Options.args.SVUnit.args.raidpet ={ order = subOrder, type = 'group', name = L['Raid Pet Frames'], childGroups = "tab", get = function(l)return - SuperVillain.db.SVUnit['raidpet'][l[#l]]end, + SV.db.SVUnit['raidpet'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raidpet");MOD:SetGroupFrame('raidpet')end, args ={ enable ={ @@ -446,7 +446,7 @@ SuperVillain.Options.args.SVUnit.args.raidpet ={ type = 'execute', order = 3, name = L['Restore Defaults'], - func = function(l, m)MOD:ResetUnitOptions('raidpet')SuperVillain:ResetMovables('Raid Pet Frames')MOD:SetGroupFrame('raidpet', nil, nil, true)end, + func = function(l, m)MOD:ResetUnitOptions('raidpet')SV:ResetMovables('Raid Pet Frames')MOD:SetGroupFrame('raidpet', nil, nil, true)end, }, tabGroups={ order=3, @@ -633,14 +633,14 @@ SuperVillain.Options.args.SVUnit.args.raidpet ={ 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 SuperVillain.db.SVUnit['raidpet'].customSorting end, + 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 SuperVillain.db.SVUnit['raidpet'].customSorting end, + disabled = function()return not SV.db.SVUnit['raidpet'].customSorting end, type = 'toggle', }, }, @@ -661,7 +661,7 @@ SuperVillain.Options.args.SVUnit.args.raidpet ={ type = "toggle", name = L["Enable"], order = 1, - get = function(l)return SuperVillain.db.SVUnit["raid" .. w].auraWatch.enable end, + 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 = { @@ -672,7 +672,7 @@ SuperVillain.Options.args.SVUnit.args.raidpet ={ min = 4, max = 15, step = 1, - get = function(l)return SuperVillain.db.SVUnit["raid" .. w].auraWatch.size end, + 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 ={ @@ -688,7 +688,7 @@ SuperVillain.Options.args.SVUnit.args.raidpet ={ type = 'group', name = L['RaidDebuff Indicator'], get = function(l)return - SuperVillain.db.SVUnit['raidpet']['rdebuffs'][l[#l]]end, + 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 ={ diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua index f311a2b..350ca1f 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua @@ -29,8 +29,8 @@ local tsort = table.sort; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); -local MOD = SuperVillain.SVUnit +local SV, L = unpack(SVUI); +local MOD = SV.SVUnit if(not MOD) then return end local _, ns = ... --[[ @@ -38,16 +38,16 @@ local _, ns = ... ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.target={ +SV.Options.args.SVUnit.args.target={ name = L['Target Frame'], type = 'group', order = 6, childGroups = "tab", - get=function(l)return SuperVillain.db.SVUnit['target'][l[#l]]end, + 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')SuperVillain:ResetMovables('Target Frame')end}, + resetSettings={type='execute',order=2,name=L['Restore Defaults'],func=function(l,m)MOD:ResetUnitOptions('target')SV:ResetMovables('Target Frame')end}, tabGroups={ order=3, type='group', @@ -99,8 +99,8 @@ SuperVillain.Options.args.SVUnit.args.target={ 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 SuperVillain.db.SVUnit["target"]["power"].hideonnpc end, - set = function(l, m)SuperVillain.db.SVUnit["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end + 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", @@ -132,8 +132,8 @@ SuperVillain.Options.args.SVUnit.args.target={ max = 500, step = 1, set = function(l, m) - if SuperVillain.db.SVUnit["target"].castbar.width == SuperVillain.db.SVUnit["target"][l[#l]] then - SuperVillain.db.SVUnit["target"].castbar.width = 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") @@ -156,7 +156,7 @@ SuperVillain.Options.args.SVUnit.args.target={ order = 800, type = "group", name = L["Combobar"], - get = function(l)return SuperVillain.db.SVUnit["target"]["combobar"][l[#l]]end, + 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 = { @@ -203,16 +203,16 @@ SuperVillain.Options.args.SVUnit.args.target={ ################################################################################################## ################################################################################################## ]] -SuperVillain.Options.args.SVUnit.args.targettarget={ +SV.Options.args.SVUnit.args.targettarget={ name=L['TargetTarget Frame'], type='group', order=7, childGroups="tab", - get=function(l)return SuperVillain.db.SVUnit['targettarget'][l[#l]]end, + 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')SuperVillain:ResetMovables('TargetTarget Frame')end}, + resetSettings={type='execute',order=2,name=L['Restore Defaults'],func=function(l,m)MOD:ResetUnitOptions('targettarget')SV:ResetMovables('TargetTarget Frame')end}, tabGroups={ order=3, type='group', @@ -252,8 +252,8 @@ SuperVillain.Options.args.SVUnit.args.targettarget={ 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 SuperVillain.db.SVUnit["target"]["power"].hideonnpc end, - set = function(l, m)SuperVillain.db.SVUnit["target"]["power"].hideonnpc = m;MOD:SetUnitFrame("target")end + 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", diff --git a/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml b/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml new file mode 100644 index 0000000..0aece78 --- /dev/null +++ b/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml @@ -0,0 +1,5 @@ +<Bindings> + <Binding name="Frame Debugger" description="Frame Stack Analyzer" header="SVUIDEBUG" runOnUp="false"> + DebugThisFrame() + </Binding> +</Bindings> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc new file mode 100644 index 0000000..47da00f --- /dev/null +++ b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc @@ -0,0 +1,9 @@ +## Interface: 50400 +## Author: Munglunch, Azilroka, Sortokk +## Version: 1.6 +## Title: |cffFF9900SVUI |r|cffFFEF00Debug O Matic|r +## Notes: Supervillain UI Debugging. +## RequiredDeps: SVUI +## OptionalDeps: Blizzard_DebugTools + +SVUI_DebugOMatic.xml diff --git a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml new file mode 100644 index 0000000..a3f97ba --- /dev/null +++ b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml @@ -0,0 +1,116 @@ +<Ui xmlns="http://www.blizzard.com/wow/ui/"> + <Script file='debug.lua'/> + + <Frame name="SVUI_ScriptError" movable="true" hidden="true" frameStrata="DIALOG"> + <Size x="384" y="260"/> + <Anchors> + <Anchor point="TOPLEFT"/> + </Anchors> + <Layers> + <Layer level="BACKGROUND"> + <Texture name="$parentBG" setAllPoints="true"/> + </Layer> + <Layer level="OVERLAY"> + <Texture name="$parentTitleBG"> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset x="8" y="-8"/> + </Anchor> + <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT"> + <Offset x="-32" y="-24"/> + </Anchor> + </Anchors> + </Texture> + <Texture name="$parentDialogBG"> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset x="8" y="-32"/> + </Anchor> + <Anchor point="BOTTOMRIGHT"> + <Offset x="-32" y="32"/> + </Anchor> + </Anchors> + </Texture> + </Layer> + <Layer level="ARTWORK"> + <FontString parentKey="Title" inherits="GameFontNormal"> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset x="8" y="-8"/> + </Anchor> + <Anchor point="TOPRIGHT"> + <Offset x="-32" y="-24"/> + </Anchor> + </Anchors> + </FontString> + <FontString parentKey="sourceLabel" font="GameFontNormalCenter"> + <Size x="140" y="16"/> + <Anchors> + <Anchor point="BOTTOMLEFT"> + <Offset x="104" y="8"/> + </Anchor> + </Anchors> + </FontString> + </Layer> + </Layers> + <Frames> + <ScrollFrame name="$parentDialog" inherits="MinimalScrollFrameTemplate"> + <Size x="343" y="194"/> + <Anchors> + <Anchor point="TOPLEFT"> + <Offset x="12" y="-30"/> + </Anchor> + </Anchors> + <ScrollChild> + <EditBox parentKey="Input" multiLine="true" letters="4000" autoFocus="false"> + <Size x="343" y="194"/> + <Scripts> + <OnCursorChanged function="ScrollingEdit_OnCursorChanged"/> + <OnUpdate> + ScrollingEdit_OnUpdate(self, elapsed, self:GetParent()); + </OnUpdate> + <OnEditFocusGained> + self:HighlightText(0); + </OnEditFocusGained> + <OnEscapePressed function="EditBox_ClearFocus"/> + </Scripts> + <FontString inherits="GameFontHighlightSmall"/> + </EditBox> + </ScrollChild> + </ScrollFrame> + <Button parentKey="Clear" inherits="UIPanelButtonTemplate" text="RESET"> + <Size x="96" y="24"/> + <Anchors> + <Anchor point="BOTTOMLEFT"> + <Offset x="8" y="4"/> + </Anchor> + </Anchors> + <Scripts> + <OnClick> + local frame = _G["SVUI_ScriptErrorDialog"]; + frame.Input:SetText(""); + </OnClick> + </Scripts> + </Button> + <Button parentKey="Close" inherits="UIPanelCloseButton"> + <Anchors> + <Anchor point="TOPRIGHT"> + <Offset x="-2" y="-2"/> + </Anchor> + </Anchors> + </Button> + </Frames> + <Scripts> + <OnLoad function="SVUI_ScriptError_OnLoad"/> + <OnShow function="SVUI_ScriptError_OnShow"/> + <OnDragStart> + _G["SVUI_ScriptError"].moving = true; + _G["SVUI_ScriptError"]:StartMoving(); + </OnDragStart> + <OnDragStop> + _G["SVUI_ScriptError"].moving = nil; + _G["SVUI_ScriptError"]:StopMovingOrSizing(); + </OnDragStop> + </Scripts> + </Frame> +</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_DebugOMatic/debug.lua b/Interface/AddOns/SVUI_DebugOMatic/debug.lua new file mode 100644 index 0000000..5ad3d23 --- /dev/null +++ b/Interface/AddOns/SVUI_DebugOMatic/debug.lua @@ -0,0 +1,296 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +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 string = _G.string; +local math = _G.math; +local table = _G.table; +--[[ STRING METHODS ]]-- +local format, find, lower, match = string.format, string.find, string.lower, string.match; +--[[ MATH METHODS ]]-- +local floor, abs, min, max = math.floor, math.abs, math.min, math.max; +--[[ TABLE METHODS ]]-- +local tremove, tcopy, twipe, tsort, tconcat, tdump = table.remove, table.copy, table.wipe, table.sort, table.concat, table.dump; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SV, L = unpack(SVUI); +local ErrorStorage = {} +BINDING_HEADER_SVUIDEBUG = "Supervillain UI: Debugger"; +--[[ +########################################################## +CUSTOM MESSAGE WINDOW +########################################################## +]]-- +function SVUI_ScriptError_OnLoad() + SVUI_ScriptError.Source = ""; + SVUI_ScriptError:SetFixedPanelTemplate("Transparent") + SVUI_ScriptErrorDialog:SetFixedPanelTemplate("Transparent") + SVUI_ScriptErrorDialog.Input:SetScript("OnTextChanged", function(self, userInput) + if userInput then return end + local _, max = SVUI_ScriptErrorDialogScrollBar:GetMinMaxValues() + for i = 1, max do + ScrollFrameTemplate_OnMouseWheel(SVUI_ScriptErrorDialog, -1) + end + end) + _G["SVUI_ScriptError"]:RegisterForDrag("LeftButton"); +end + +function SVUI_ScriptError_OnShow() + if SVUI_ScriptError.Source then + local txt = SVUI_ScriptError.Source; + SVUI_ScriptError.Title:SetText(txt); + end +end +--[[ +########################################################## +OTHER SLASH COMMANDS +########################################################## +]]-- +local function GetOriginalContext() + UIParentLoadAddOn("Blizzard_DebugTools") + local orig_DevTools_RunDump = DevTools_RunDump + local originalContext + DevTools_RunDump = function(value, context) + originalContext = context + end + DevTools_Dump("") + DevTools_RunDump = orig_DevTools_RunDump + return originalContext +end + +local function SV_Dump(value) + local context = GetOriginalContext() + local buffer = "" + context.Write = function(self, msg) + buffer = buffer.."\n"..msg + end + + DevTools_RunDump(value, context) + return buffer.."\n"..table.dump(value) +end + +local function DebugDump(any) + if type(any)=="string" then + return any + elseif type(any) == "table" then + return SV_Dump(any) + elseif any==nil or type(any)=="number" then + return tostring(any) + end + return any +end + +local function DebugOutput(msg) + if not SVUI_ScriptError:IsShown() then + SVUI_ScriptError:Show() + end + local outputString = SVUI_ScriptErrorDialog.Input:GetText() + outputString = outputString .. "\n" .. msg + tinsert(ErrorStorage,msg); + SVUI_ScriptErrorDialog.Input:SetText(outputString) +end + +local function ShowDebug(header, ...) + local value = (header and format("Debug %s: ", header)) or "Debug: " + value = format("|cff11ff11 %s|r", value) + for i = 1, select('#', ...), 2 do + local name = select(i, ...) + local var = DebugDump(select(i+1, ...)) + value = format("%s %s = ", value, name)..var + end + SVUI_ScriptError.Source = header; + DebugOutput(value) +end + +function DebugThisFrame(arg) + local outputString = " "; + if arg then + arg = _G[arg] or GetMouseFocus() + else + arg = GetMouseFocus() + end + if arg and (arg.GetName and arg:GetName()) then + local point, relativeTo, relativePoint, xOfs, yOfs = arg:GetPoint() + outputString = outputString.."|cffCC0000----------------------------".."\n" + outputString = outputString.."|cffCC00FF--Mouseover Frame".."|r".."\n" + outputString = outputString.."|cffCC0000----------------------------|r".."\n" + outputString = outputString.."|cff00D1FF".."Name: |cffFFD100"..arg:GetName().."\n" + if arg:GetParent() and arg:GetParent():GetName() then + outputString = outputString.."|cff00D1FF".."Parent: |cffFFD100"..arg:GetParent():GetName().."\n" + end + outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg:GetWidth()).."\n" + outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg:GetHeight()).."\n" + outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..arg:GetFrameStrata().."\n" + outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..arg:GetFrameLevel().."\n" + outputString = outputString.."|cff00D1FF".."IsShown: |cffFFD100"..tostring(arg:IsShown()).."\n" + if xOfs then + outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",xOfs).."\n" + end + if yOfs then + outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",yOfs).."\n" + end + if relativeTo and relativeTo:GetName() then + outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..point.."|r anchored to "..relativeTo:GetName().."'s |cffFFD100"..relativePoint.."\n" + end + local bg = arg:GetBackdrop() + if type(bg) == "table" then + outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" + outputString = outputString..tdump(bg).."\n" + end + if arg._template then + outputString = outputString.."Template Name: |cff00FF55"..arg._template.."\n" + end + if arg.Panel then + local cpt, crt, crp, cxo, cyo = arg.Panel:GetPoint() + outputString = outputString.."|cffFF8800>> backdropFrame --------------------------|r".."\n" + outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg.Panel:GetWidth()).."\n" + outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg.Panel:GetHeight()).."\n" + outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..arg.Panel:GetFrameStrata().."\n" + outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..arg.Panel:GetFrameLevel().."\n" + if cxo then + outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" + end + if cyo then + outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" + end + if crt and crt:GetName() then + outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" + end + bg = arg.Panel:GetBackdrop() + if type(bg) == "table" then + outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" + outputString = outputString..tdump(bg).."\n" + end + if arg._skin then + local cpt, crt, crp, cxo, cyo = arg._skin:GetPoint() + outputString = outputString.."|cffFF7700>> backdropTexture --------------------------|r".."\n" + outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg._skin:GetWidth()).."\n" + outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg._skin:GetHeight()).."\n" + if cxo then + outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" + end + if cyo then + outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" + end + if crt and crt:GetName() then + outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" + end + bg = arg._skin:GetTexture() + if bg then + outputString = outputString.."|cff00D1FF".."Texture: |cffFFD100"..bg.."\n" + end + end + end + local childFrames = { arg:GetChildren() } + if #childFrames > 0 then + outputString = outputString.."|cffCC00FF>>>> Child Frames----------------------------".."|r".."\n".."\n" + for _, child in ipairs(childFrames) do + local cpt, crt, crp, cxo, cyo = child:GetPoint() + if child:GetName() then + outputString = outputString.."\n\n|cff00FF55++"..child:GetName().."|r".."\n" + else + outputString = outputString.."\n\n|cff99FF55+!!+".."Anonymous Frame".."|r".."\n" + end + outputString = outputString.."|cffCC00FF----------------------------|r".."\n" + outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child:GetWidth()).."\n" + outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child:GetHeight()).."\n" + outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..child:GetFrameStrata().."\n" + outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..child:GetFrameLevel().."\n" + if cxo then + outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" + end + if cyo then + outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" + end + if crt and crt:GetName() then + outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" + end + bg = child:GetBackdrop() + if type(bg) == "table" then + outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" + outputString = outputString..tdump(bg).."\n" + end + if child._template then + outputString = outputString.."Template Name: |cff00FF55"..child._template.."\n" + end + if child.Panel then + local cpt, crt, crp, cxo, cyo = child.Panel:GetPoint() + outputString = outputString.."|cffFF8800>> backdropFrame --------------------------|r".."\n" + outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child.Panel:GetWidth()).."\n" + outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child.Panel:GetHeight()).."\n" + outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..child.Panel:GetFrameStrata().."\n" + outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..child.Panel:GetFrameLevel().."\n" + if cxo then + outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" + end + if cyo then + outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" + end + if crt and crt:GetName() then + outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" + end + bg = child.Panel:GetBackdrop() + if type(bg) == "table" then + outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" + outputString = outputString..tdump(bg).."\n" + end + if child._skin then + local cpt, crt, crp, cxo, cyo = child._skin:GetPoint() + outputString = outputString.."|cffFF7700>> backdropTexture --------------------------|r".."\n" + outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child._skin:GetWidth()).."\n" + outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child._skin:GetHeight()).."\n" + if cxo then + outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" + end + if cyo then + outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" + end + if crt and crt:GetName() then + outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" + end + bg = child._skin:GetTexture() + if bg then + outputString = outputString.."|cffFF9900----------------------------|r".."\n" + outputString = outputString..bg.."\n" + end + outputString = outputString.."|cffCC0000----------------------------|r".."\n" + end + end + end + outputString = outputString.."\n\n" + end + elseif arg == nil or arg == "" then + outputString = outputString.."Invalid frame name".."\n" + else + outputString = outputString.."Could not find frame info".."\n" + end + DebugOutput(outputString) +end +SLASH_SVUI_FRAME_DEBUG1 = "/svdf" +SlashCmdList["SVUI_FRAME_DEBUG"] = DebugThisFrame; \ No newline at end of file diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua index aa341ae..e1b343e 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua @@ -33,14 +33,14 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L = unpack(SVUI); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(SVUI); +local CONFIGS = SV.Configs local NewHook = hooksecurefunc; local playerGUID = UnitGUID('player') local classColor = RAID_CLASS_COLORS -PLUGIN = SuperVillain:Prototype(SVUIAddOnName) +PLUGIN = SV:Prototype(SVUIAddOnName) local SCHEMA = PLUGIN.___schema; _G["LaborVillain"] = PLUGIN; @@ -49,25 +49,25 @@ _G["LaborVillain"] = PLUGIN; GLOBAL BINDINGS ########################################################## ]]-- -BINDING_HEADER_SVUILABORER = "SuperVillain UI: Laborer"; +BINDING_HEADER_SVUILABORER = "Supervillain UI: Laborer"; function SVUIFishingMode() - if InCombatLockdown() then SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); return; end + if InCombatLockdown() then SV:AddonMessage(ERR_NOT_IN_COMBAT); return; end if PLUGIN.CurrentMode and PLUGIN.CurrentMode == "Fishing" then PLUGIN:EndJobModes() else PLUGIN:SetJobMode("Fishing") end end function SVUIFarmingMode() - if InCombatLockdown() then SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); return; end - if PLUGIN.CurrentMode and SuperVillain.CurrentMode == "Farming" then PLUGIN:EndJobModes() else PLUGIN:SetJobMode("Farming") end + if InCombatLockdown() then SV:AddonMessage(ERR_NOT_IN_COMBAT); return; end + if PLUGIN.CurrentMode and SV.CurrentMode == "Farming" then PLUGIN:EndJobModes() else PLUGIN:SetJobMode("Farming") end end function SVUIArchaeologyMode() - if InCombatLockdown() then SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); return; end + if InCombatLockdown() then SV:AddonMessage(ERR_NOT_IN_COMBAT); return; end if PLUGIN.CurrentMode and PLUGIN.CurrentMode == "Archaeology" then PLUGIN:EndJobModes() else PLUGIN:SetJobMode("Archaeology") end end function SVUICookingMode() - if InCombatLockdown() then SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); return; end + if InCombatLockdown() then SV:AddonMessage(ERR_NOT_IN_COMBAT); return; end if PLUGIN.CurrentMode and PLUGIN.CurrentMode == "Cooking" then PLUGIN:EndJobModes() else PLUGIN:SetJobMode("Cooking") end end --[[ @@ -87,7 +87,7 @@ LOCAL VARS ]]-- local currentModeKey = false; local ModeLogsFrame = CreateFrame("Frame", "SVUI_ModeLogsFrame", UIParent) -local classColors = SVUI_CLASS_COLORS[SuperVillain.class] +local classColors = SVUI_CLASS_COLORS[SV.class] local classR, classG, classB = classColors.r, classColors.g, classColors.b local classA = 0.35 local lastClickTime; @@ -187,15 +187,15 @@ function PLUGIN:ModeLootLoader(mode, msg, info) end function PLUGIN:CheckForModeLoot(msg) - local item, amt = SuperVillain:DeFormat(msg, LOOT_ITEM_CREATED_SELF) + local item, amt = SV:DeFormat(msg, LOOT_ITEM_CREATED_SELF) if not item then - item = SuperVillain:DeFormat(msg, LOOT_ITEM_SELF_MULTIPLE) + item = SV:DeFormat(msg, LOOT_ITEM_SELF_MULTIPLE) if not item then - item = SuperVillain:DeFormat(msg, LOOT_ITEM_SELF) + item = SV:DeFormat(msg, LOOT_ITEM_SELF) if not item then - item = SuperVillain:DeFormat(msg, LOOT_ITEM_PUSHED_SELF_MULTIPLE) + item = SV:DeFormat(msg, LOOT_ITEM_PUSHED_SELF_MULTIPLE) if not item then - item, amt = SuperVillain:DeFormat(msg, LOOT_ITEM_PUSHED_SELF) + item, amt = SV:DeFormat(msg, LOOT_ITEM_PUSHED_SELF) --print(item) end end @@ -270,7 +270,7 @@ function PLUGIN:ChangeModeGear() end function PLUGIN:UpdateLogWindow() - self.LogWindow:SetFont(SuperVillain.Media.font.system, self.db.fontSize, "OUTLINE") + self.LogWindow:SetFont(SV.Media.font.system, self.db.fontSize, "OUTLINE") end function PLUGIN:MakeLogWindow() @@ -332,7 +332,7 @@ function PLUGIN:MakeLogWindow() self.LogWindow = log self.ListenerEnabled = false; - SuperVillain:RegisterDocklet("SVUI_ModesDockFrame", "Laborer Modes", ICON_FILE, false) + SV:RegisterDocklet("SVUI_ModesDockFrame", "Laborer Modes", ICON_FILE, false) self:LaborerReset() end @@ -367,7 +367,7 @@ end local ModeAlert_OnHide = function() if InCombatLockdown() then - SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); + SV:AddonMessage(ERR_NOT_IN_COMBAT); return; end SuperDockAlertRight:Deactivate() @@ -375,23 +375,23 @@ end local ModeAlert_OnShow = function(self) if InCombatLockdown() then - SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); + SV:AddonMessage(ERR_NOT_IN_COMBAT); self:Hide() return; end - SuperVillain:SecureFadeIn(self, 0.3, 0, 1) + SV:SecureFadeIn(self, 0.3, 0, 1) SuperDockAlertRight:Activate(self) end local ModeAlert_OnMouseDown = function(self) PLUGIN:EndJobModes() - SuperVillain:SecureFadeOut(self, 0.5, 1, 0, true) + SV:SecureFadeOut(self, 0.5, 1, 0, true) end local ModeButton_OnEnter = function(self) if InCombatLockdown() then return; end local name = self.modeName - self.icon:SetGradient(unpack(SuperVillain.Media.gradient.yellow)) + self.icon:SetGradient(unpack(SV.Media.gradient.yellow)) GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) GameTooltip:ClearLines() GameTooltip:AddLine(L[name .. " Mode"], 1, 1, 1) @@ -414,9 +414,9 @@ BUILD FUNCTION ########################################################## ]]-- function PLUGIN:Load() - if(not SuperVillain.db[SCHEMA].enable) then return end + if(not SV.db[SCHEMA].enable) then return end - self.db = SuperVillain.db[SCHEMA] + self.db = SV.db[SCHEMA] lastClickTime = nil; self.WornItems = {}; self.InModeGear = false; @@ -551,7 +551,7 @@ function PLUGIN:Load() order = 1, name = L['AutoEquip'], desc = L['Enable/Disable automatically equipping fishing gear.'], - get = function(key)return SuperVillain.db[SCHEMA].fishing[key[#key]]end, + get = function(key)return SV.db[SCHEMA].fishing[key[#key]]end, set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "fishing")end } } @@ -568,7 +568,7 @@ function PLUGIN:Load() order = 1, name = L['AutoEquip'], desc = L['Enable/Disable automatically equipping cooking gear.'], - get = function(key)return SuperVillain.db[SCHEMA].cooking[key[#key]]end, + get = function(key)return SV.db[SCHEMA].cooking[key[#key]]end, set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "cooking")end } } @@ -579,8 +579,8 @@ function PLUGIN:Load() type = "group", name = L["Farming Mode Settings"], guiInline = true, - get = function(key)return SuperVillain.db[SCHEMA].farming[key[#key]]end, - set = function(key, value)SuperVillain.db[SCHEMA].farming[key[#key]] = value end, + get = function(key)return SV.db[SCHEMA].farming[key[#key]]end, + set = function(key, value)SV.db[SCHEMA].farming[key[#key]] = value end, args = { buttonsize = { type = 'range', @@ -657,4 +657,4 @@ CONFIGS[SCHEMA] = { }, } -SuperVillain.Registry:NewPlugin(PLUGIN) \ No newline at end of file +Registry:NewPlugin(PLUGIN) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_Laborer/modes/archaeology.lua b/Interface/AddOns/SVUI_Laborer/modes/archaeology.lua index 0bb3297..478bc0a 100644 --- a/Interface/AddOns/SVUI_Laborer/modes/archaeology.lua +++ b/Interface/AddOns/SVUI_Laborer/modes/archaeology.lua @@ -33,7 +33,7 @@ local min = math.min GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI) +local SV, L = unpack(SVUI) local MOD = _G.LaborVillain --[[ ########################################################## @@ -105,9 +105,9 @@ local function DisableSolve(button) button:SetAlpha(0) button.text:SetTextColor(0.5, 0.5, 0.5) button.text:SetText("") - button:SetScript("OnEnter", SuperVillain.fubar) - button:SetScript("OnLeave", SuperVillain.fubar) - button:SetScript("OnMouseUp", SuperVillain.fubar) + button:SetScript("OnEnter", SV.fubar) + button:SetScript("OnLeave", SV.fubar) + button:SetScript("OnMouseUp", SV.fubar) end local function UpdateArtifactBars(index) @@ -227,7 +227,7 @@ EVENT HANDLER ########################################################## ]]-- do - local SURVEYCDFONT = SuperVillain.Media.font.numbers + local SURVEYCDFONT = SV.Media.font.numbers local SURVEYRED = {0,0.5,1} local last = 0 local time = 3 @@ -476,12 +476,12 @@ function MOD:LoadArchaeologyMode() end) -- Race Text - race:SetFont(SuperVillain.Media.font.roboto, 12, "OUTLINE") + race:SetFont(SV.Media.font.roboto, 12, "OUTLINE") race:SetText(RACE) race:SetPoint("LEFT", bar, "LEFT", 2, 0) -- Progress Text - progress:SetFont(SuperVillain.Media.font.roboto, 12, "OUTLINE") + progress:SetFont(SV.Media.font.roboto, 12, "OUTLINE") progress:SetText("") progress:SetPoint("RIGHT", bar, "RIGHT", 1, 0) @@ -490,11 +490,11 @@ function MOD:LoadArchaeologyMode() solve.bg = solve:CreateTexture(nil,"BORDER") solve.bg:SetAllPoints(solve) - solve.bg:SetTexture(SuperVillain.Media.bar.default) + solve.bg:SetTexture(SV.Media.bar.default) solve.bg:SetVertexColor(0.1,0.5,0) solve.text = solve:CreateFontString(nil,"OVERLAY") - solve.text:SetFont(SuperVillain.Media.font.roboto, 14, "NONE") + 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) diff --git a/Interface/AddOns/SVUI_Laborer/modes/cooking.lua b/Interface/AddOns/SVUI_Laborer/modes/cooking.lua index 611ce28..ed7e3c0 100644 --- a/Interface/AddOns/SVUI_Laborer/modes/cooking.lua +++ b/Interface/AddOns/SVUI_Laborer/modes/cooking.lua @@ -32,7 +32,7 @@ local floor,ceil = math.floor, math.ceil; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI) +local SV, L = unpack(SVUI) local MOD = _G.LaborVillain --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_Laborer/modes/farming.lua b/Interface/AddOns/SVUI_Laborer/modes/farming.lua index 68211c1..735fd4b 100644 --- a/Interface/AddOns/SVUI_Laborer/modes/farming.lua +++ b/Interface/AddOns/SVUI_Laborer/modes/farming.lua @@ -32,7 +32,7 @@ local floor,ceil = math.floor, math.ceil; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI) +local SV, L = unpack(SVUI) local MOD = _G.LaborVillain --[[ ########################################################## @@ -264,7 +264,7 @@ do button.icon:FillInner(button,2,2) if showCount then button.text = button:CreateFontString(nil, "OVERLAY") - button.text:SetFont(SuperVillain.Media.font.action, 12, "OUTLINE") + 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) @@ -288,7 +288,7 @@ do end if InCombatLockdown() or itemError then MOD.TitleWindow:AddMessage("|cffffff11Loading Farm Tools...|r|cffff1111PLEASE WAIT|r") - SuperVillain:ExecuteTimer(LoadFarmingModeTools, 5) + SV:ExecuteTimer(LoadFarmingModeTools, 5) else local horizontal = MOD.db.farming.toolbardirection == 'HORIZONTAL' @@ -335,7 +335,7 @@ do end MOD.Farming.Loaded = true - SuperVillain:ExecuteTimer(MOD.Farming.Enable, 1.5) + SV:ExecuteTimer(MOD.Farming.Enable, 1.5) end end end @@ -503,7 +503,7 @@ function MOD:PrepareFarmingTools() if not self.db.farming.undocked then local bgTex = [[Interface\BUTTONS\WHITE8X8]] - local bdTex = SuperVillain.Media.bar.glow + local bdTex = SV.Media.bar.glow local farmingDocklet = CreateFrame("ScrollFrame", "FarmModeFrame", ModeLogsFrame); farmingDocklet:SetPoint("TOPLEFT", ModeLogsFrame, 31, -3); farmingDocklet:SetPoint("BOTTOMRIGHT", ModeLogsFrame, -3, 3); @@ -579,8 +579,8 @@ function MOD:PrepareFarmingTools() local BUTTONSIZE = self.db.farming.buttonsize or 35; -- SEEDS - local farmSeedBarAnchor = CreateFrame("Frame", "FarmSeedBarAnchor", SuperVillain.UIParent) - farmSeedBarAnchor:Point("TOPRIGHT", SuperVillain.UIParent, "TOPRIGHT", -40, -300) + 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) @@ -588,26 +588,26 @@ function MOD:PrepareFarmingTools() seedBar:SetPoint("TOPRIGHT", _G["FarmSeedBarAnchor"], "TOPRIGHT", (horizontal and 0 or -((BUTTONSIZE + BUTTONSPACE) * i)), (horizontal and -((BUTTONSIZE + BUTTONSPACE) * i) or 0)) seedBar.ButtonSize = BUTTONSIZE; end - SuperVillain:SetSVMovable(farmSeedBarAnchor, "Farming Seeds") + SV:SetSVMovable(farmSeedBarAnchor, "Farming Seeds") -- FARM TOOLS - local farmToolBarAnchor = CreateFrame("Frame", "FarmToolBarAnchor", SuperVillain.UIParent) + 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; - SuperVillain:SetSVMovable(farmToolBarAnchor, "Farming Tools") + SV:SetSVMovable(farmToolBarAnchor, "Farming Tools") -- PORTALS - local farmPortalBarAnchor = CreateFrame("Frame", "FarmPortalBarAnchor", SuperVillain.UIParent) + 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; - SuperVillain:SetSVMovable(farmPortalBarAnchor, "Farming Portals") + SV:SetSVMovable(farmPortalBarAnchor, "Farming Portals") end end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_Laborer/modes/fishing.lua b/Interface/AddOns/SVUI_Laborer/modes/fishing.lua index e6decc5..cf3eaa5 100644 --- a/Interface/AddOns/SVUI_Laborer/modes/fishing.lua +++ b/Interface/AddOns/SVUI_Laborer/modes/fishing.lua @@ -32,7 +32,7 @@ local floor,ceil = math.floor, math.ceil; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI) +local SV, L = unpack(SVUI) local MOD = _G.LaborVillain --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua index 83233c7..66caa21 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua @@ -38,14 +38,14 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L = unpack(SVUI) +local SV, L, Registry = unpack(SVUI) local NewHook = hooksecurefunc; -PLUGIN = SuperVillain:Prototype(SVUIAddOnName) +PLUGIN = SV:Prototype(SVUIAddOnName) local SCHEMA = PLUGIN.___schema; _G["LogVillain"] = PLUGIN; -local CHAT = SuperVillain.SVChat; +local CHAT = SV.SVChat; --[[ ########################################################## LOCAL VARIABLES @@ -250,18 +250,18 @@ function CHAT:PLAYER_ENTERING_WORLD() end function PLUGIN:AppendBankFunctions() - local BAGS = SuperVillain.SVBag; + local BAGS = SV.SVBag; if(BAGS.BankFrame) then BAGS.BankFrame.RefreshBagsSlots = RefreshLoggedBagsSlots end end function PLUGIN:AppendChatFunctions() - if SuperVillain.db.SVChat.enable and SuperVillain.db[SCHEMA].saveChats then + if SV.db.SVChat.enable and SV.db[SCHEMA].saveChats then for _,event in pairs(LoggingEvents) do - SuperVillain.SVChat:RegisterEvent(event, "LogCurrentChat") + SV.SVChat:RegisterEvent(event, "LogCurrentChat") end - SuperVillain.SVChat:RegisterEvent("PLAYER_ENTERING_WORLD") + SV.SVChat:RegisterEvent("PLAYER_ENTERING_WORLD") end end --[[ @@ -282,9 +282,9 @@ BUILD FUNCTION ########################################################## ]]-- function PLUGIN:Load() - if not SuperVillain.db[SCHEMA].enable then return end + if not SV.db[SCHEMA].enable then return end - self.db = SuperVillain.db[SCHEMA] + self.db = SV.db[SCHEMA] local toonClass = select(2,UnitClass("player")); local r,g,b = RAID_CLASS_COLORS[toonClass].r, RAID_CLASS_COLORS[toonClass].g, RAID_CLASS_COLORS[toonClass].b @@ -305,7 +305,7 @@ function PLUGIN:Load() self.chronicle = SVLOG_Data[realmKey]["quests"][nameKey]; - NewHook(SuperVillain, "ResetAllUI", ResetAllLogs); + NewHook(SV, "ResetAllUI", ResetAllLogs); if not SVLOG_Cache["chat"] then SVLOG_Cache["chat"] = {} end @@ -319,15 +319,15 @@ function PLUGIN:Load() end --[[ OVERRIDE DEFAULT FUNCTIONS ]]-- - if SuperVillain.db.SVBag.enable then - local BAGS = SuperVillain.SVBag; + if SV.db.SVBag.enable then + local BAGS = SV.SVBag; if BAGS.BagFrame then BAGS.BagFrame.RefreshBagsSlots = RefreshLoggedBagsSlots; NewHook(BAGS, "MakeBank", self.AppendBankFunctions); RefreshLoggedBagsSlots(BAGS.BagFrame) end end - if SuperVillain.db.SVTip.enable then + if SV.db.SVTip.enable then GameTooltip:HookScript("OnTooltipSetItem", GameTooltip_LogTooltipSetItem) end @@ -340,15 +340,15 @@ function PLUGIN:Load() type = "toggle", name = L["Save Chats"], desc = L["Retain chat messages even after logging out."], - get = function(a)return SuperVillain.db[SCHEMA].saveChats end, - set = function(a,b) SuperVillain.db[SCHEMA].saveChats = b; SuperVillain:StaticPopup_Show("RL_CLIENT") end + get = function(a)return SV.db[SCHEMA].saveChats end, + set = function(a,b) SV.db[SCHEMA].saveChats = b; SV:StaticPopup_Show("RL_CLIENT") end } self:AddOption("saveChats", saveChats) end -SuperVillain.Configs[SCHEMA] = { +SV.Configs[SCHEMA] = { ["enable"] = true, ["saveChats"] = false } -SuperVillain.Registry:NewPlugin(PLUGIN) \ No newline at end of file +Registry:NewPlugin(PLUGIN) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua index 0e85f02..981718a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua @@ -38,11 +38,11 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L = unpack(SVUI); -local CONFIGS = SuperVillain.Configs +local SV, L, Registry = unpack(SVUI); +local CONFIGS = SV.Configs local NewHook = hooksecurefunc; -PLUGIN = SuperVillain:Prototype(SVUIAddOnName) +PLUGIN = SV:Prototype(SVUIAddOnName) local SCHEMA = PLUGIN.___schema; local VERSION = PLUGIN.___version; @@ -63,9 +63,9 @@ PLUGIN.OptionsCache = { order = 4, type = "group", name = "Addon Styling", - get = function(a)return SuperVillain.db[SCHEMA].addons[a[#a]] end, - set = function(a,b)SuperVillain.db[SCHEMA].addons[a[#a]] = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end, - disabled = function()return not SuperVillain.db[SCHEMA].addons.enable end, + get = function(a)return SV.db[SCHEMA].addons[a[#a]] end, + set = function(a,b)SV.db[SCHEMA].addons[a[#a]] = b;SV:StaticPopup_Show("RL_CLIENT")end, + disabled = function()return not SV.db[SCHEMA].addons.enable end, guiInline = true, args = { ace3 = { @@ -118,7 +118,7 @@ function PLUGIN:Style(style, fn, ...) local verb = charming[math.random(1,#charming)] self:AddonMessage(styleMessage:format(style, verb)) elseif(self.Debugging and error) then - SuperVillain:Debugger(errorMessage:format(VERSION, style, error)) + SV:Debugger(errorMessage:format(VERSION, style, error)) end --self.Debugging = false end @@ -130,7 +130,7 @@ function PLUGIN:IsAddonReady(addon, ...) if not IsAddOnLoaded(a) then return false end end - local config = SuperVillain.db[SCHEMA] or SuperVillain.Configs[SCHEMA] + local config = SV.db[SCHEMA] or SV.Configs[SCHEMA] return config.addons[addon] end @@ -146,8 +146,8 @@ function PLUGIN:SaveAddonStyle(addon, fn, force, passive, ...) self:DefineEventFunction(event, addon) end end - if(SuperVillain.Configs[SCHEMA].addons[addon] == nil) then - SuperVillain.Configs[SCHEMA].addons[addon] = true + if(SV.Configs[SCHEMA].addons[addon] == nil) then + SV.Configs[SCHEMA].addons[addon] = true end if force then @@ -221,7 +221,7 @@ function PLUGIN:AppendAddonOption(addon) name = addon, desc = L["Addon Styling"], get = function(key) return self:IsAddonReady(key[#key]) end, - set = function(key,value) self:ChangeDBVar(value, key[#key]); SuperVillain:StaticPopup_Show("RL_CLIENT") end, + set = function(key,value) self:ChangeDBVar(value, key[#key]); SV:StaticPopup_Show("RL_CLIENT") end, disabled = function() if addon then return not IsAddOnLoaded(addon) @@ -235,10 +235,10 @@ end function PLUGIN:PLAYER_ENTERING_WORLD(event, ...) for name,fn in pairs(self.OnLoadAddons) do - if(SuperVillain.db[SCHEMA].blizzard[name] == nil) then - SuperVillain.db[SCHEMA].blizzard[name] = true + if(SV.db[SCHEMA].blizzard[name] == nil) then + SV.db[SCHEMA].blizzard[name] = true end - if(IsAddOnLoaded(name) and (SuperVillain.db[SCHEMA].blizzard[name] or SuperVillain.db[SCHEMA].addons[name])) then + if(IsAddOnLoaded(name) and (SV.db[SCHEMA].blizzard[name] or SV.db[SCHEMA].addons[name])) then self:Style(name, fn, event, ...) self.OnLoadAddons[name] = nil end @@ -253,8 +253,8 @@ function PLUGIN:PLAYER_ENTERING_WORLD(event, ...) local listener = self.EventListeners[event] for name,fn in pairs(self.AddOnQueue)do self:AppendAddonOption(name) - if(SuperVillain.db[SCHEMA].addons[name] == nil) then - SuperVillain.db[SCHEMA].addons[name] = true + if(SV.db[SCHEMA].addons[name] == nil) then + SV.db[SCHEMA].addons[name] = true end if(listener[name] and self:IsAddonReady(name)) then self:Style(name, fn, event, ...) @@ -290,81 +290,81 @@ OPTIONS CREATION local RegisterAddonDocklets = function() local MAIN = _G["SuperDockletMain"]; local EXTRA = _G["SuperDockletExtra"]; - local main = SuperVillain.db.SVDock.docklets.DockletMain; - local alternate = SuperVillain.db.SVDock.docklets.enableExtra and SuperVillain.db.SVDock.docklets.DockletExtra or ""; + local main = SV.db.SVDock.docklets.DockletMain; + local alternate = SV.db.SVDock.docklets.enableExtra and SV.db.SVDock.docklets.DockletExtra or ""; local tipLeft, tipRight = "", ""; if main == nil or main == "None" then return end if find(main, "Skada") or find(alternate, "Skada") then - if SuperVillain:IsDockletReady("Skada") then + if SV:IsDockletReady("Skada") then PLUGIN:Docklet_Skada() if find(alternate, "Skada") and EXTRA.FrameName ~= "SkadaHolder2" then tipRight = "and Skada"; - SuperVillain:RegisterExtraDocklet("SkadaHolder2") + SV:RegisterExtraDocklet("SkadaHolder2") --PLUGIN.DockedParent["Skada"] = EXTRA end if find(main, "Skada") and MAIN.FrameName ~= "SkadaHolder" then tipLeft = "Skada"; - SuperVillain:RegisterMainDocklet("SkadaHolder") + SV:RegisterMainDocklet("SkadaHolder") --PLUGIN.DockedParent["Skada"] = MAIN end end end if main == "Omen" or alternate == "Omen" then - if SuperVillain:IsDockletReady("Omen") then + if SV:IsDockletReady("Omen") then if alternate == "Omen" and EXTRA.FrameName ~= "OmenAnchor" then tipRight = "and Omen"; - SuperVillain:RegisterExtraDocklet("OmenAnchor") + SV:RegisterExtraDocklet("OmenAnchor") PLUGIN:Docklet_Omen(EXTRA) PLUGIN.DockedParent["Omen"] = EXTRA elseif MAIN.FrameName ~= "OmenAnchor" then tipLeft = "Omen"; - SuperVillain:RegisterMainDocklet("OmenAnchor") + SV:RegisterMainDocklet("OmenAnchor") PLUGIN:Docklet_Omen(MAIN) PLUGIN.DockedParent["Omen"] = MAIN end end end if main == "Recount" or alternate == "Recount" then - if SuperVillain:IsDockletReady("Recount") then + if SV:IsDockletReady("Recount") then if alternate == "Recount" and EXTRA.FrameName ~= "Recount_MainWindow" then tipRight = "and Recount"; - SuperVillain:RegisterExtraDocklet("Recount_MainWindow") + SV:RegisterExtraDocklet("Recount_MainWindow") PLUGIN:Docklet_Recount(EXTRA) PLUGIN.DockedParent["Recount"] = EXTRA elseif MAIN.FrameName ~= "Recount_MainWindow" then tipLeft = "Recount"; - SuperVillain:RegisterMainDocklet("Recount_MainWindow") + SV:RegisterMainDocklet("Recount_MainWindow") PLUGIN:Docklet_Recount(MAIN) PLUGIN.DockedParent["Recount"] = MAIN end end end if main == "TinyDPS" or alternate == "TinyDPS" then - if SuperVillain:IsDockletReady("TinyDPS") then + if SV:IsDockletReady("TinyDPS") then if alternate == "TinyDPS" and EXTRA.FrameName ~= "tdpsFrame" then tipRight = "and TinyDPS"; - SuperVillain:RegisterExtraDocklet("tdpsFrame") + SV:RegisterExtraDocklet("tdpsFrame") PLUGIN:Docklet_TinyDPS(EXTRA) PLUGIN.DockedParent["TinyDPS"] = EXTRA elseif MAIN.FrameName ~= "tdpsFrame" then tipLeft = "TinyDPS"; - SuperVillain:RegisterMainDocklet("tdpsFrame") + SV:RegisterMainDocklet("tdpsFrame") PLUGIN:Docklet_TinyDPS(MAIN) PLUGIN.DockedParent["TinyDPS"] = MAIN end end end if main == "alDamageMeter" or alternate == "alDamageMeter" then - if SuperVillain:IsDockletReady("alDamageMeter") then + if SV:IsDockletReady("alDamageMeter") then if alternate == "alDamageMeter" and EXTRA.FrameName ~= "alDamagerMeterFrame" then tipRight = "and alDamageMeter"; - SuperVillain:RegisterExtraDocklet("alDamagerMeterFrame") + SV:RegisterExtraDocklet("alDamagerMeterFrame") PLUGIN:Docklet_alDamageMeter(EXTRA) PLUGIN.DockedParent["alDamageMeter"] = EXTRA elseif MAIN.FrameName ~= "alDamagerMeterFrame" then tipLeft = "alDamageMeter"; - SuperVillain:RegisterMainDocklet("alDamagerMeterFrame") + SV:RegisterMainDocklet("alDamagerMeterFrame") PLUGIN:Docklet_alDamageMeter(MAIN) PLUGIN.DockedParent["alDamageMeter"] = MAIN end @@ -381,7 +381,7 @@ BUILD FUNCTION ########################################################## ]]-- function PLUGIN:Load() - self.db = SuperVillain.db[SCHEMA] + self.db = SV.db[SCHEMA] local alert = CreateFrame('Frame', nil, UIParent); alert:SetFixedPanelTemplate('Transparent'); @@ -389,13 +389,13 @@ function PLUGIN:Load() alert:SetPoint('CENTER', UIParent, 'CENTER'); alert:SetFrameStrata('DIALOG'); alert.Text = alert:CreateFontString(nil, "OVERLAY"); - alert.Text:SetFont(SuperVillain.Media.font.default, 12); + alert.Text:SetFont(SV.Media.font.default, 12); alert.Text:SetPoint('TOP', alert, 'TOP', 0, -10); alert.Accept = CreateFrame('Button', nil, alert); alert.Accept:SetSize(70, 25); alert.Accept:SetPoint('RIGHT', alert, 'BOTTOM', -10, 20); alert.Accept.Text = alert.Accept:CreateFontString(nil, "OVERLAY"); - alert.Accept.Text:SetFont(SuperVillain.Media.font.default, 10); + alert.Accept.Text:SetFont(SV.Media.font.default, 10); alert.Accept.Text:SetPoint('CENTER'); alert.Accept.Text:SetText(YES); alert.Close = CreateFrame('Button', nil, alert); @@ -403,7 +403,7 @@ function PLUGIN:Load() alert.Close:SetPoint('LEFT', alert, 'BOTTOM', 10, 20); alert.Close:SetScript('OnClick', function(this) this:GetParent():Hide() end); alert.Close.Text = alert.Close:CreateFontString(nil, "OVERLAY"); - alert.Close.Text:SetFont(SuperVillain.Media.font.default, 10); + alert.Close.Text:SetFont(SV.Media.font.default, 10); alert.Close.Text:SetPoint('CENTER'); alert.Close.Text:SetText(NO); alert.Accept:SetButtonTemplate(); @@ -411,33 +411,33 @@ function PLUGIN:Load() alert:Hide(); self.Alert = alert; - NewHook(SuperVillain, "ReloadDocklets", RegisterAddonDocklets); - SuperVillain:ReloadDocklets(); - SuperVillain.DynamicOptions[SCHEMA] = {key = "addons", data = self.OptionsCache}; + NewHook(SV, "ReloadDocklets", RegisterAddonDocklets); + SV:ReloadDocklets(); + SV.DynamicOptions[SCHEMA] = {key = "addons", data = self.OptionsCache}; local option = { order = 2, type = "toggle", name = "Standard UI Styling", - get = function(a)return SuperVillain.db[SCHEMA].blizzard.enable end, - set = function(a,b)SuperVillain.db[SCHEMA].blizzard.enable = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(a)return SV.db[SCHEMA].blizzard.enable end, + set = function(a,b)SV.db[SCHEMA].blizzard.enable = b;SV:StaticPopup_Show("RL_CLIENT")end } self:AddOption("blizzardEnable", option) option = { order = 3, type = "toggle", name = "Addon Styling", - get = function(a)return SuperVillain.db[SCHEMA].addons.enable end, - set = function(a,b)SuperVillain.db[SCHEMA].addons.enable = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + get = function(a)return SV.db[SCHEMA].addons.enable end, + set = function(a,b)SV.db[SCHEMA].addons.enable = b;SV:StaticPopup_Show("RL_CLIENT")end } self:AddOption("addonEnable", option) option = { order = 300, type = "group", name = "Individual Mods", - get = function(a)return SuperVillain.db[SCHEMA].blizzard[a[#a]]end, - set = function(a,b)SuperVillain.db[SCHEMA].blizzard[a[#a]] = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end, - disabled = function()return not SuperVillain.db[SCHEMA].blizzard.enable end, + get = function(a)return SV.db[SCHEMA].blizzard[a[#a]]end, + set = function(a,b)SV.db[SCHEMA].blizzard[a[#a]] = b;SV:StaticPopup_Show("RL_CLIENT")end, + disabled = function()return not SV.db[SCHEMA].blizzard.enable end, guiInline = true, args = { bmah = { @@ -810,4 +810,4 @@ CONFIGS[SCHEMA] = { } } -SuperVillain.Registry:NewPlugin(PLUGIN) \ No newline at end of file +Registry:NewPlugin(PLUGIN) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua index aea98b8..cbe7310 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -77,7 +77,7 @@ local _hook_AchievementsUpdate = function() local globalName = ("AchievementFrameSummaryAchievement%d"):format(i) local summary = _G[globalName] if(summary) then - summary:Formula409() + summary:RemoveTextures() summary:SetButtonTemplate() local highlight = _G[("%sHighlight"):format(globalName)] @@ -87,10 +87,10 @@ local _hook_AchievementsUpdate = function() local iconover = _G[("%sIconOverlay"):format(globalName)] local icontex = _G[("%sIconTexture"):format(globalName)] - if(highlight) then highlight:MUNG() end + if(highlight) then highlight:Die() end if(desc) then desc:SetTextColor(0.6, 0.6, 0.6) end - if(iconbling) then iconbling:MUNG() end - if(iconover) then iconover:MUNG() 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() @@ -115,8 +115,8 @@ local _hook_AchievementsUpdate = function() end local function BarStyleHelper(bar) - bar:Formula409() - bar:SetStatusBarTexture(SuperVillain.Media.bar.default) + 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 @@ -135,14 +135,14 @@ ACHIEVEMENTFRAME STYLER ########################################################## ]]-- local function AchievementStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.achievement ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.achievement ~= true then return end for _, gName in pairs(AchievementFrameList) do local frame = _G[gName] if(frame) then - frame:Formula409(true) + frame:RemoveTextures(true) end end @@ -161,7 +161,7 @@ local function AchievementStyle() STYLE:ApplyWindowHolder(AchievementFrame) - AchievementFrameSummaryAchievements:Formula409(true) + AchievementFrameSummaryAchievements:RemoveTextures(true) AchievementFrameSummaryAchievements:SetBasicPanel() AchievementFrameHeaderTitle:ClearAllPoints() AchievementFrameHeaderTitle:Point("TOPLEFT", AchievementFrame.Panel, "TOPLEFT", -30, -8) @@ -202,8 +202,8 @@ local function AchievementStyle() local i = _G["AchievementFrameSummaryCategoriesCategory"..f.."Button"] local j = _G["AchievementFrameSummaryCategoriesCategory"..f.."ButtonHighlight"] BarStyleHelper(d) - i:Formula409() - j:Formula409() + i:RemoveTextures() + j:RemoveTextures() _G[j:GetName().."Middle"]:SetTexture(1, 1, 1, 0.3) _G[j:GetName().."Middle"]:SetAllPoints(d) end @@ -237,18 +237,18 @@ local function AchievementStyle() local icon = _G[gName.."Icon"] local track = _G[gName.."Tracked"] - if(hl) then hl:MUNG() end + if(hl) then hl:Die() end - button:Formula409(true) + 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(SuperVillain.Media.color.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(SuperVillain.Media.color.default)) + button.bg3:SetTexture(unpack(SV.Media.color.default)) button.bg3:WrapOuter(1) if(desc) then @@ -265,8 +265,8 @@ local function AchievementStyle() local bling = _G[gName.."IconBling"] local over = _G[gName.."IconOverlay"] local tex = _G[gName.."IconTexture"] - if(bling) then bling:MUNG() end - if(over) then over:MUNG() end + 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() @@ -280,7 +280,7 @@ local function AchievementStyle() end if(track) then - track:Formula409() + track:RemoveTextures() track:SetCheckboxTemplate(true) track:ClearAllPoints() track:Point("BOTTOMLEFT", d, "BOTTOMLEFT", -1, -3) @@ -295,8 +295,8 @@ local function AchievementStyle() for c, v in pairs(u) do for f = 1, 9 do local d = "AchievementFrameComparisonContainerButton"..f..v; - _G[d]:Formula409() - _G[d.."Background"]:MUNG() + _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) @@ -304,7 +304,7 @@ local function AchievementStyle() _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(SuperVillain.Media.color.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") @@ -327,8 +327,8 @@ local function AchievementStyle() _G[d.."Shield"]:Point("TOPRIGHT", _G["AchievementFrameComparisonContainerButton"..f.."Friend"], "TOPRIGHT", -20, -3) end - _G[d.."IconBling"]:MUNG() - _G[d.."IconOverlay"]:MUNG() + _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) @@ -342,8 +342,8 @@ local function AchievementStyle() hooksecurefunc("AchievementFrameComparison_DisplayAchievement", function(i) local w = i.player; local x = i.friend - w.titleBar:MUNG() - x.titleBar:MUNG() + w.titleBar:Die() + x.titleBar:Die() if not w.bg3 or not x.bg3 then return end @@ -363,23 +363,23 @@ local function AchievementStyle() for f = 1, 20 do local d = _G["AchievementFrameStatsContainerButton"..f] _G["AchievementFrameStatsContainerButton"..f.."BG"]:SetTexture(1, 1, 1, 0.2) - _G["AchievementFrameStatsContainerButton"..f.."HeaderLeft"]:MUNG() - _G["AchievementFrameStatsContainerButton"..f.."HeaderRight"]:MUNG() - _G["AchievementFrameStatsContainerButton"..f.."HeaderMiddle"]:MUNG() + _G["AchievementFrameStatsContainerButton"..f.."HeaderLeft"]:Die() + _G["AchievementFrameStatsContainerButton"..f.."HeaderRight"]:Die() + _G["AchievementFrameStatsContainerButton"..f.."HeaderMiddle"]:Die() local d = "AchievementFrameComparisonStatsContainerButton"..f; - _G[d]:Formula409() + _G[d]:RemoveTextures() _G[d]:SetPanelTemplate("Default") _G[d.."BG"]:SetTexture(1, 1, 1, 0.2) - _G[d.."HeaderLeft"]:MUNG() - _G[d.."HeaderRight"]:MUNG() - _G[d.."HeaderMiddle"]:MUNG() + _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:Formula409() + d:RemoveTextures() d:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) d:SetStatusBarColor(4/255, 179/255, 30/255) d:SetFrameLevel(d:GetFrameLevel()+3) @@ -387,7 +387,7 @@ local function AchievementStyle() 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(SuperVillain.Media.color.default)) + d.bg1:SetVertexColor(unpack(SV.Media.color.default)) d.bg1:SetAllPoints() d.bg3 = d:CreateTexture(nil, "BACKGROUND") d.bg3:SetDrawLayer("BACKGROUND", 2) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua index 02156ac..07e8370 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -31,7 +31,7 @@ ALERTFRAME STYLER ########################################################## ]]-- local function AlertStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.alertframes ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.alertframes ~= true then return end for i = 1, 4 do local alert = _G["SVUI_SystemAlert"..i]; @@ -39,7 +39,7 @@ local function AlertStyle() for b = 1, 3 do alert.buttons[b]:SetButtonTemplate() end - alert:Formula409() + alert:RemoveTextures() STYLE:ApplyAlertStyle(alert) alert.input:SetEditboxTemplate() alert.input.Panel:Point("TOPLEFT", -2, -4) @@ -61,17 +61,17 @@ local function AlertStyle() 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("") - _G["AchievementAlertFrame"..i.."OldAchievement"]:MUNG() - _G["AchievementAlertFrame"..i.."Glow"]:MUNG() - _G["AchievementAlertFrame"..i.."Shine"]:MUNG() - _G["AchievementAlertFrame"..i.."GuildBanner"]:MUNG() - _G["AchievementAlertFrame"..i.."GuildBorder"]:MUNG() + _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"]:MUNG() + _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 @@ -95,15 +95,15 @@ local function AlertStyle() frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) end - frame.shine:MUNG() - frame.glowFrame:MUNG() - frame.glowFrame.glow:MUNG() - frame.raidArt:MUNG() - frame.dungeonArt1:MUNG() - frame.dungeonArt2:MUNG() - frame.dungeonArt3:MUNG() - frame.dungeonArt4:MUNG() - frame.heroicIcon:MUNG() + 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() @@ -130,11 +130,11 @@ local function AlertStyle() end local j = select(2, frame:GetRegions()) if j:GetObjectType() == "Texture"then - if j:GetTexture() == "Interface\\GuildFrame\\GuildChallenges"then j:MUNG()end + if j:GetTexture() == "Interface\\GuildFrame\\GuildChallenges"then j:Die()end end - GuildChallengeAlertFrameGlow:MUNG() - GuildChallengeAlertFrameShine:MUNG() - GuildChallengeAlertFrameEmblemBorder:MUNG() + GuildChallengeAlertFrameGlow:Die() + GuildChallengeAlertFrameShine:Die() + GuildChallengeAlertFrameEmblemBorder:Die() if not GuildChallengeAlertFrameEmblemIcon.b then GuildChallengeAlertFrameEmblemIcon.b = CreateFrame("Frame", nil, frame) GuildChallengeAlertFrameEmblemIcon.b:SetFixedPanelTemplate("Default") @@ -159,13 +159,13 @@ local function AlertStyle() 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:MUNG() end + if j:GetTexture() == "Interface\\Challenges\\challenges-main" then j:Die() end end end - ChallengeModeAlertFrame1Shine:MUNG() - ChallengeModeAlertFrame1GlowFrame:MUNG() - ChallengeModeAlertFrame1GlowFrame.glow:MUNG() - ChallengeModeAlertFrame1Border:MUNG() + 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) @@ -191,12 +191,12 @@ local function AlertStyle() 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:MUNG() end + if j:GetTexture() == "Interface\\Scenarios\\ScenariosParts" then j:Die() end end end - ScenarioAlertFrame1Shine:MUNG() - ScenarioAlertFrame1GlowFrame:MUNG() - ScenarioAlertFrame1GlowFrame.glow:MUNG() + 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) @@ -222,11 +222,11 @@ local function AlertStyle() end _G["CriteriaAlertFrame"..i.."Unlocked"]:SetTextColor(1, 1, 1) _G["CriteriaAlertFrame"..i.."Name"]:SetTextColor(1, 1, 0) - _G["CriteriaAlertFrame"..i.."Background"]:MUNG() - _G["CriteriaAlertFrame"..i.."Glow"]:MUNG() - _G["CriteriaAlertFrame"..i.."Shine"]:MUNG() - _G["CriteriaAlertFrame"..i.."IconBling"]:MUNG() - _G["CriteriaAlertFrame"..i.."IconOverlay"]:MUNG() + _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") @@ -245,11 +245,11 @@ local function AlertStyle() if frame then frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) - frame.Background:MUNG() + frame.Background:Die() frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.IconBorder:MUNG() - frame.glow:MUNG() - frame.shine:MUNG() + 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") @@ -271,9 +271,9 @@ local function AlertStyle() if frame then frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) - frame.Background:MUNG() + frame.Background:Die() frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.IconBorder:MUNG() + frame.IconBorder:Die() if not frame.Icon.b then frame.Icon.b = CreateFrame("Frame", nil, frame) frame.Icon.b:SetFixedPanelTemplate("Default") @@ -292,9 +292,9 @@ local function AlertStyle() local frame = BonusRollMoneyWonFrame; frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) - frame.Background:MUNG() + frame.Background:Die() frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.IconBorder:MUNG() + frame.IconBorder:Die() frame.Icon.b = CreateFrame("Frame", nil, frame) frame.Icon.b:SetFixedPanelTemplate("Default") frame.Icon.b:WrapOuter(frame.Icon) @@ -306,11 +306,11 @@ local function AlertStyle() local frame = BonusRollLootWonFrame; frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) - frame.Background:MUNG() + frame.Background:Die() frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - frame.IconBorder:MUNG() - frame.glow:MUNG() - frame.shine:MUNG() + 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) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua index 8942c42..de2c73c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -24,13 +24,13 @@ ARCHEOLOGYFRAME STYLER local progressBarHolder = CreateFrame("Frame", "SVUI_ArcheologyProgressBar", nil) progressBarHolder:SetSize(240, 24) progressBarHolder:SetPoint("BOTTOM", CastingBarFrame, "TOP", 0, 10) -SuperVillain:SetSVMovable(progressBarHolder, "Archeology Progress Bar") +SV:SetSVMovable(progressBarHolder, "Archeology Progress Bar") local function ArchaeologyStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.archaeology ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.archaeology ~= true then return end - ArchaeologyFrame:Formula409() - ArchaeologyFrameInset:Formula409() + ArchaeologyFrame:RemoveTextures() + ArchaeologyFrameInset:RemoveTextures() ArchaeologyFrame:SetPanelTemplate("Halftone") ArchaeologyFrame.Panel:SetAllPoints() ArchaeologyFrame.portrait:SetAlpha(0) @@ -43,11 +43,11 @@ local function ArchaeologyStyle() STYLE:ApplyDropdownStyle(ArchaeologyFrameRaceFilter, 125) STYLE:ApplyPaginationStyle(ArchaeologyFrameCompletedPageNextPageButton) STYLE:ApplyPaginationStyle(ArchaeologyFrameCompletedPagePrevPageButton) - ArchaeologyFrameRankBar:Formula409() + ArchaeologyFrameRankBar:RemoveTextures() ArchaeologyFrameRankBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) ArchaeologyFrameRankBar:SetFrameLevel(ArchaeologyFrameRankBar:GetFrameLevel()+2) ArchaeologyFrameRankBar:SetPanelTemplate("Default") - ArchaeologyFrameArtifactPageSolveFrameStatusBar:Formula409() + ArchaeologyFrameArtifactPageSolveFrameStatusBar:RemoveTextures() ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarColor(0.7, 0.2, 0) ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetFrameLevel(ArchaeologyFrameArtifactPageSolveFrameStatusBar:GetFrameLevel()+2) @@ -56,8 +56,8 @@ local function ArchaeologyStyle() for b = 1, ARCHAEOLOGY_MAX_COMPLETED_SHOWN do local c = _G["ArchaeologyFrameCompletedPageArtifact"..b] if c then - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Border"]:MUNG() - _G["ArchaeologyFrameCompletedPageArtifact"..b.."Bg"]:MUNG() + _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") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua index 47c9032..2a79c6f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -80,14 +80,14 @@ AUCTIONFRAME STYLER ]]-- local function AuctionStyle() --STYLE.Debugging = true - if(SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.auctionhouse ~= true) then return end + if(SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.auctionhouse ~= true) then return end STYLE:ApplyWindowHolder(AuctionFrame, false, true) - BrowseFilterScrollFrame:Formula409() - BrowseScrollFrame:Formula409() - AuctionsScrollFrame:Formula409() - BidScrollFrame:Formula409() + BrowseFilterScrollFrame:RemoveTextures() + BrowseScrollFrame:RemoveTextures() + AuctionsScrollFrame:RemoveTextures() + BidScrollFrame:RemoveTextures() STYLE:ApplyCloseButtonStyle(AuctionFrameCloseButton) STYLE:ApplyScrollFrameStyle(AuctionsScrollFrameScrollBar) @@ -102,16 +102,16 @@ local function AuctionStyle() --ExactMatchCheckButton:SetCheckboxTemplate(true) - SideDressUpFrame:Formula409(true) + SideDressUpFrame:RemoveTextures(true) SideDressUpFrame:SetPanelTemplate("Halftone") SideDressUpFrame:Point("TOPLEFT", AuctionFrame, "TOPRIGHT", 7, 0) - SideDressUpModel:Formula409(true) + SideDressUpModel:RemoveTextures(true) SideDressUpModel:SetFixedPanelTemplate("Comic") SideDressUpModel:SetPanelColor("special") SideDressUpModelResetButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(SideDressUpModelCloseButton) - AuctionProgressFrame:Formula409() + AuctionProgressFrame:RemoveTextures() AuctionProgressFrame:SetFixedPanelTemplate("Transparent", true) AuctionProgressFrameCancelButton:SetButtonTemplate() AuctionProgressFrameCancelButton:SetFixedPanelTemplate("Default") @@ -129,9 +129,9 @@ local function AuctionStyle() AuctionProgressBarText:ClearAllPoints() AuctionProgressBarText:SetPoint("CENTER") - AuctionProgressBar:Formula409() + AuctionProgressBar:RemoveTextures() AuctionProgressBar:SetPanelTemplate("Default") - AuctionProgressBar:SetStatusBarTexture(SuperVillain.Media.bar.default) + AuctionProgressBar:SetStatusBarTexture(SV.Media.bar.default) AuctionProgressBar:SetStatusBarColor(1, 1, 0) STYLE:ApplyPaginationStyle(BrowseNextPageButton) @@ -139,7 +139,7 @@ local function AuctionStyle() for _,gName in pairs(AuctionBidButtons) do if(_G[gName]) then - _G[gName]:Formula409() + _G[gName]:RemoveTextures() _G[gName]:SetButtonTemplate() end end @@ -153,7 +153,7 @@ local function AuctionStyle() BrowseBuyoutButton:Point("RIGHT", BrowseCloseButton, "LEFT", -4, 0) BrowseBidButton:Point("RIGHT", BrowseBuyoutButton, "LEFT", -4, 0) - AuctionsItemButton:Formula409() + AuctionsItemButton:RemoveTextures() AuctionsItemButton:SetButtonTemplate() AuctionsItemButton:SetScript("OnUpdate", function() if AuctionsItemButton:GetNormalTexture()then @@ -163,9 +163,9 @@ local function AuctionStyle() end) for _,frame in pairs(AuctionSortLinks)do - _G[frame.."Left"]:MUNG() - _G[frame.."Middle"]:MUNG() - _G[frame.."Right"]:MUNG() + _G[frame.."Left"]:Die() + _G[frame.."Middle"]:Die() + _G[frame.."Right"]:Die() end STYLE:ApplyTabStyle(_G["AuctionFrameTab1"]) @@ -194,7 +194,7 @@ local function AuctionStyle() for i = 1, NUM_FILTERS_TO_DISPLAY do local header = _G[("AuctionFilterButton%d"):format(i)] if(header) then - header:Formula409() + header:RemoveTextures() header:SetButtonTemplate() end end @@ -227,14 +227,14 @@ local function AuctionStyle() buttonTex:FillInner() end - button:Formula409() + button:RemoveTextures() button:SetButtonTemplate() if(buttonItem) then buttonItem:SetButtonTemplate() buttonItem.Panel:SetAllPoints() buttonItem:HookScript("OnUpdate", function() - buttonItem:GetNormalTexture():MUNG() + buttonItem:GetNormalTexture():Die() end) local highLight = button:GetHighlightTexture() @@ -258,14 +258,14 @@ local function AuctionStyle() buttonTex:FillInner() end - button:Formula409() + button:RemoveTextures() button:SetButtonTemplate() if(buttonItem) then buttonItem:SetButtonTemplate() buttonItem.Panel:SetAllPoints() buttonItem:HookScript("OnUpdate", function() - buttonItem:GetNormalTexture():MUNG() + buttonItem:GetNormalTexture():Die() end) local highLight = button:GetHighlightTexture() @@ -289,14 +289,14 @@ local function AuctionStyle() buttonTex:FillInner() end - button:Formula409() + button:RemoveTextures() button:SetButtonTemplate() if(buttonItem) then buttonItem:SetButtonTemplate() buttonItem.Panel:SetAllPoints() buttonItem:HookScript("OnUpdate", function() - buttonItem:GetNormalTexture():MUNG() + buttonItem:GetNormalTexture():Die() end) local highLight = button:GetHighlightTexture() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua index be5d390..557e700 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,11 +21,11 @@ BARBERSHOP STYLER ########################################################## ]]-- local function BarberShopStyle() - if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.barber~=true then return end + if SV.db.SVStyle.blizzard.enable~=true or SV.db.SVStyle.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]]:Formula409() + _G[buttons[b]]:RemoveTextures() _G[buttons[b]]:SetButtonTemplate() end for b = 1, 4 do @@ -37,24 +37,24 @@ local function BarberShopStyle() c:ClearAllPoints()c:Point("TOP", d, "BOTTOM", 0, -3) end if c then - c:Formula409() + c:RemoveTextures() end end BarberShopFrameSelector1:ClearAllPoints() BarberShopFrameSelector1:Point("TOP", 0, -12) BarberShopFrameResetButton:ClearAllPoints() BarberShopFrameResetButton:Point("BOTTOM", 0, 12) - BarberShopFrame:Formula409() + BarberShopFrame:RemoveTextures() BarberShopFrame:SetPanelTemplate("Halftone") BarberShopFrame:Size(BarberShopFrame:GetWidth()-30, BarberShopFrame:GetHeight()-56) - BarberShopFrameMoneyFrame:Formula409() + BarberShopFrameMoneyFrame:RemoveTextures() BarberShopFrameMoneyFrame:SetPanelTemplate() - BarberShopFrameBackground:MUNG() - BarberShopBannerFrameBGTexture:MUNG() - BarberShopBannerFrame:MUNG() - BarberShopAltFormFrameBorder:Formula409() + BarberShopFrameBackground:Die() + BarberShopBannerFrameBGTexture:Die() + BarberShopBannerFrame:Die() + BarberShopAltFormFrameBorder:RemoveTextures() BarberShopAltFormFrame:Point("BOTTOM", BarberShopFrame, "TOP", 0, 5) - BarberShopAltFormFrame:Formula409() + BarberShopAltFormFrame:RemoveTextures() BarberShopAltFormFrame:SetBasicPanel() end --[[ diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua index 9f9e2de..f4ea85a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,14 +21,14 @@ BATTLEFIELD STYLER ########################################################## ]]-- local function BattlefieldStyle() - if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.bgmap~=true then return end + if SV.db.SVStyle.blizzard.enable~=true or SV.db.SVStyle.blizzard.bgmap~=true then return end BattlefieldMinimap:SetClampedToScreen(true) - BattlefieldMinimapCorner:MUNG() - BattlefieldMinimapBackground:MUNG() - BattlefieldMinimapTab:MUNG() - BattlefieldMinimapTabLeft:MUNG() - BattlefieldMinimapTabMiddle:MUNG() - BattlefieldMinimapTabRight:MUNG() + BattlefieldMinimapCorner:Die() + BattlefieldMinimapBackground:Die() + BattlefieldMinimapTab:Die() + BattlefieldMinimapTabLeft:Die() + BattlefieldMinimapTabMiddle:Die() + BattlefieldMinimapTabRight:Die() BattlefieldMinimap:SetFixedPanelTemplate("Transparent") BattlefieldMinimap.Panel:Point("BOTTOMRIGHT", -4, 2) BattlefieldMinimap:SetFrameStrata("LOW") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua index 9515121..9305856 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,7 +21,7 @@ BLACKMARKET STYLER ########################################################## ]]-- local function BlackMarketStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.bmah ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.bmah ~= true then return end @@ -33,9 +33,9 @@ local function BlackMarketStyle() p.Right:SetAlpha(0) end - BlackMarketFrame:Formula409() + BlackMarketFrame:RemoveTextures() BlackMarketFrame:SetPanelTemplate("Halftone") - BlackMarketFrame.Inset:Formula409() + BlackMarketFrame.Inset:RemoveTextures() BlackMarketFrame.Inset:SetFixedPanelTemplate("Inset") STYLE:ApplyCloseButtonStyle(BlackMarketFrame.CloseButton) STYLE:ApplyScrollFrameStyle(BlackMarketScrollFrameScrollBar, 4) @@ -47,7 +47,7 @@ local function BlackMarketStyle() ChangeTab(BlackMarketFrame.ColumnHighBidder) ChangeTab(BlackMarketFrame.ColumnCurrentBid) - BlackMarketFrame.MoneyFrameBorder:Formula409() + BlackMarketFrame.MoneyFrameBorder:RemoveTextures() BlackMarketBidPriceGold:SetEditboxTemplate() BlackMarketBidPriceGold.Panel:Point("TOPLEFT", -2, 0) BlackMarketBidPriceGold.Panel:Point("BOTTOMRIGHT", -2, 0) @@ -61,7 +61,7 @@ local function BlackMarketStyle() local u = buttons[b] local v = s+b; if not u.styled then - u:Formula409() + u:RemoveTextures() u:SetButtonTemplate() STYLE:ApplyItemButtonStyle(u.Item) u.styled = true @@ -74,7 +74,7 @@ local function BlackMarketStyle() end end end) - BlackMarketFrame.HotDeal:Formula409() + BlackMarketFrame.HotDeal:RemoveTextures() STYLE:ApplyItemButtonStyle(BlackMarketFrame.HotDeal.Item) for b = 1, BlackMarketFrame:GetNumRegions()do local y = select(b, BlackMarketFrame:GetRegions()) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua index 09baf54..4f302c7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -32,7 +32,7 @@ CALENDAR STYLER ########################################################## ]]-- local function CalendarStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.calendar ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.calendar ~= true then return end @@ -47,7 +47,7 @@ local function CalendarStyle() local cfframe = _G["CalendarFilterFrame"]; if(cfframe) then - cfframe:Formula409() + cfframe:RemoveTextures() cfframe:Width(155) cfframe:SetPanelTemplate("Default") @@ -86,21 +86,21 @@ local function CalendarStyle() for u = 1, 42 do _G["CalendarDayButton"..u]:SetFrameLevel(_G["CalendarDayButton"..u]:GetFrameLevel()+1) end - CalendarCreateEventFrame:Formula409() + CalendarCreateEventFrame:RemoveTextures() CalendarCreateEventFrame:SetFixedPanelTemplate("Transparent", true) CalendarCreateEventFrame:Point("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarCreateEventTitleFrame:Formula409() + CalendarCreateEventTitleFrame:RemoveTextures() CalendarCreateEventCreateButton:SetButtonTemplate() CalendarCreateEventMassInviteButton:SetButtonTemplate() CalendarCreateEventInviteButton:SetButtonTemplate() CalendarCreateEventInviteButton:Point("TOPLEFT", CalendarCreateEventInviteEdit, "TOPRIGHT", 4, 1) CalendarCreateEventInviteEdit:Width(CalendarCreateEventInviteEdit:GetWidth()-2) - CalendarCreateEventInviteList:Formula409() + CalendarCreateEventInviteList:RemoveTextures() CalendarCreateEventInviteList:SetFixedPanelTemplate("Default") CalendarCreateEventInviteEdit:SetEditboxTemplate() CalendarCreateEventTitleEdit:SetEditboxTemplate() STYLE:ApplyDropdownStyle(CalendarCreateEventTypeDropDown, 120) - CalendarCreateEventDescriptionContainer:Formula409() + CalendarCreateEventDescriptionContainer:RemoveTextures() CalendarCreateEventDescriptionContainer:SetFixedPanelTemplate("Default") STYLE:ApplyCloseButtonStyle(CalendarCreateEventCloseButton) CalendarCreateEventLockEventCheck:SetCheckboxTemplate(true) @@ -115,10 +115,10 @@ local function CalendarStyle() f:SetTexCoord(0.1, 0.9, 0.1, 0.9) end end) - CalendarCreateEventInviteListSection:Formula409() + CalendarCreateEventInviteListSection:RemoveTextures() CalendarClassButtonContainer:HookScript("OnShow", function() for u, D in ipairs(CLASS_SORT_ORDER)do - local e = _G["CalendarClassButton"..u]e:Formula409() + local e = _G["CalendarClassButton"..u]e:RemoveTextures() e:SetPanelTemplate("Default") local E = CLASS_ICON_TCOORDS[D] local F = e:GetNormalTexture() @@ -126,51 +126,51 @@ local function CalendarStyle() F:SetTexCoord(E[1]+0.015, E[2]-0.02, E[3]+0.018, E[4]-0.02) end CalendarClassButton1:Point("TOPLEFT", CalendarClassButtonContainer, "TOPLEFT", 5, 0) - CalendarClassTotalsButton:Formula409() + CalendarClassTotalsButton:RemoveTextures() CalendarClassTotalsButton:SetPanelTemplate("Default") end) - CalendarTexturePickerFrame:Formula409() - CalendarTexturePickerTitleFrame:Formula409() + CalendarTexturePickerFrame:RemoveTextures() + CalendarTexturePickerTitleFrame:RemoveTextures() CalendarTexturePickerFrame:SetFixedPanelTemplate("Transparent", true) STYLE:ApplyScrollFrameStyle(CalendarTexturePickerScrollBar) CalendarTexturePickerAcceptButton:SetButtonTemplate() CalendarTexturePickerCancelButton:SetButtonTemplate() CalendarCreateEventInviteButton:SetButtonTemplate() CalendarCreateEventRaidInviteButton:SetButtonTemplate() - CalendarMassInviteFrame:Formula409() + CalendarMassInviteFrame:RemoveTextures() CalendarMassInviteFrame:SetFixedPanelTemplate("Transparent", true) - CalendarMassInviteTitleFrame:Formula409() + CalendarMassInviteTitleFrame:RemoveTextures() STYLE:ApplyCloseButtonStyle(CalendarMassInviteCloseButton) CalendarMassInviteGuildAcceptButton:SetButtonTemplate() STYLE:ApplyDropdownStyle(CalendarMassInviteGuildRankMenu, 130) CalendarMassInviteGuildMinLevelEdit:SetEditboxTemplate() CalendarMassInviteGuildMaxLevelEdit:SetEditboxTemplate() - CalendarViewRaidFrame:Formula409() + CalendarViewRaidFrame:RemoveTextures() CalendarViewRaidFrame:SetFixedPanelTemplate("Transparent", true) CalendarViewRaidFrame:Point("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarViewRaidTitleFrame:Formula409() + CalendarViewRaidTitleFrame:RemoveTextures() STYLE:ApplyCloseButtonStyle(CalendarViewRaidCloseButton) - CalendarViewHolidayFrame:Formula409(true) + CalendarViewHolidayFrame:RemoveTextures(true) CalendarViewHolidayFrame:SetFixedPanelTemplate("Transparent", true) CalendarViewHolidayFrame:Point("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarViewHolidayTitleFrame:Formula409() + CalendarViewHolidayTitleFrame:RemoveTextures() STYLE:ApplyCloseButtonStyle(CalendarViewHolidayCloseButton) - CalendarViewEventFrame:Formula409() + CalendarViewEventFrame:RemoveTextures() CalendarViewEventFrame:SetFixedPanelTemplate("Transparent", true) CalendarViewEventFrame:Point("TOPLEFT", CalendarFrame, "TOPRIGHT", 3, -24) - CalendarViewEventTitleFrame:Formula409() - CalendarViewEventDescriptionContainer:Formula409() + CalendarViewEventTitleFrame:RemoveTextures() + CalendarViewEventDescriptionContainer:RemoveTextures() CalendarViewEventDescriptionContainer:SetFixedPanelTemplate("Transparent", true) - CalendarViewEventInviteList:Formula409() + CalendarViewEventInviteList:RemoveTextures() CalendarViewEventInviteList:SetFixedPanelTemplate("Transparent", true) - CalendarViewEventInviteListSection:Formula409() + CalendarViewEventInviteListSection:RemoveTextures() STYLE:ApplyCloseButtonStyle(CalendarViewEventCloseButton) STYLE:ApplyScrollFrameStyle(CalendarViewEventInviteListScrollFrameScrollBar) for _,btn in pairs(CalendarButtons)do _G[btn]:SetButtonTemplate() end - CalendarEventPickerFrame:Formula409() - CalendarEventPickerTitleFrame:Formula409() + CalendarEventPickerFrame:RemoveTextures() + CalendarEventPickerTitleFrame:RemoveTextures() CalendarEventPickerFrame:SetFixedPanelTemplate("Transparent", true) STYLE:ApplyScrollFrameStyle(CalendarEventPickerScrollBar) CalendarEventPickerCloseButton:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua index 6181027..ff6b263 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,8 +21,8 @@ CHALLENGES UI STYLER ########################################################## ]]-- local function ChallengesFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfg ~= true then return end - ChallengesFrameInset:Formula409() + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.lfg ~= true then return end + ChallengesFrameInset:RemoveTextures() ChallengesFrameInsetBg:Hide() ChallengesFrameDetails.bg:Hide() ChallengesFrameLeaderboard:SetButtonTemplate() @@ -39,7 +39,7 @@ local function ChallengesFrameStyle() v.selectedTex:SetAlpha(.2) v.selectedTex:SetPoint("TOPLEFT", 1, -1) v.selectedTex:SetPoint("BOTTOMRIGHT", -1, 1) - v.NoMedal:MUNG() + v.NoMedal:Die() end for u = 1, 3 do local F = ChallengesFrame["RewardRow"..u] diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua index 18aff56..db72b3b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -59,8 +59,8 @@ local function SetItemFrame(frame, point) point.backdrop = frame:CreateTexture(nil, "BORDER") point.backdrop:SetDrawLayer("BORDER", -4) point.backdrop:SetAllPoints(point) - point.backdrop:SetTexture(SuperVillain.Media.bar.default) - point.backdrop:SetVertexColor(unpack(SuperVillain.Media.color.default)) + 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) @@ -106,14 +106,14 @@ local function StyleCharacterSlots() end local function EquipmentFlyout_OnShow() - EquipmentFlyoutFrameButtons:Formula409() + 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("") + button:GetNormalTexture():SetTexture(0,0,0,0) texture:FillInner() button:SetFrameLevel(button:GetFrameLevel() + 2) if not button.Panel then @@ -135,7 +135,7 @@ local function PaperDoll_UpdateTabs() 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:MUNG() + tab.TabBg:Die() if i == 1 then for i = 1, tab:GetNumRegions()do local texture = select(i, tab:GetRegions()) @@ -162,13 +162,13 @@ local function Reputation_OnShow() if not bar.Panel then bar:SetPanelTemplate("Inset") end - _G["ReputationBar"..i.."Background"]:SetTexture("") - _G["ReputationBar"..i.."ReputationBarHighlight1"]:SetTexture("") - _G["ReputationBar"..i.."ReputationBarHighlight2"]:SetTexture("") - _G["ReputationBar"..i.."ReputationBarAtWarHighlight1"]:SetTexture("") - _G["ReputationBar"..i.."ReputationBarAtWarHighlight2"]:SetTexture("") - _G["ReputationBar"..i.."ReputationBarLeftTexture"]:SetTexture("") - _G["ReputationBar"..i.."ReputationBarRightTexture"]:SetTexture("") + _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 @@ -178,7 +178,7 @@ CHARACTERFRAME STYLER ########################################################## ]]-- local function CharacterFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.character ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.character ~= true then return end @@ -194,14 +194,14 @@ local function CharacterFrameStyle() local charSlot = _G["Character"..slotName] local iconTex = _G["Character"..slotName.."IconTexture"] local cd = _G["Character"..slotName.."Cooldown"] - charSlot:Formula409() + 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 - SuperVillain:AddCD(cd) + SV:AddCD(cd) end end @@ -244,19 +244,19 @@ local function CharacterFrameStyle() ReputationDetailLFGBonusReputationCheckBox:SetCheckboxTemplate(true) TokenFramePopupInactiveCheckBox:SetCheckboxTemplate(true) TokenFramePopupBackpackCheckBox:SetCheckboxTemplate(true) - EquipmentFlyoutFrameHighlight:MUNG() + EquipmentFlyoutFrameHighlight:Die() EquipmentFlyoutFrame:HookScript("OnShow", EquipmentFlyout_OnShow) hooksecurefunc("EquipmentFlyout_Show", EquipmentFlyout_OnShow) - CharacterFramePortrait:MUNG() + CharacterFramePortrait:Die() STYLE:ApplyScrollFrameStyle(_G["PaperDollTitlesPaneScrollBar"], 5) STYLE:ApplyScrollFrameStyle(_G["PaperDollEquipmentManagerPaneScrollBar"], 5) for _,btn in pairs(CharFrameList)do - _G[btn]:Formula409(true) + _G[btn]:RemoveTextures(true) end - CharacterModelFrameBackgroundTopLeft:SetTexture("") - CharacterModelFrameBackgroundTopRight:SetTexture("") - CharacterModelFrameBackgroundBotLeft:SetTexture("") - CharacterModelFrameBackgroundBotRight:SetTexture("") + 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:SetPanelTemplate("Comic", false, 0) CharacterFrameExpandButton:SetFrameLevel(CharacterModelFrame:GetFrameLevel() + 5) @@ -265,12 +265,12 @@ local function CharacterFrameStyle() PaperDollTitlesPane:HookScript("OnShow", function(f) for _,btn in pairs(PaperDollTitlesPane.buttons)do - btn.BgTop:SetTexture("") - btn.BgBottom:SetTexture("") - btn.BgMiddle:SetTexture("") - btn.Check:SetTexture("") + 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(SuperVillain.Media.font.roboto,10,"NONE","LEFT") + btn.text:SetFont(SV.Media.font.roboto,10,"NONE","LEFT") end end) @@ -281,14 +281,14 @@ local function CharacterFrameStyle() PaperDollEquipmentManagerPaneSaveSet:Width(PaperDollEquipmentManagerPaneSaveSet:GetWidth()-8) PaperDollEquipmentManagerPaneEquipSet:Point("TOPLEFT", PaperDollEquipmentManagerPane, "TOPLEFT", 8, 0) PaperDollEquipmentManagerPaneSaveSet:Point("LEFT", PaperDollEquipmentManagerPaneEquipSet, "RIGHT", 4, 0) - PaperDollEquipmentManagerPaneEquipSet.ButtonBackground:SetTexture("") + PaperDollEquipmentManagerPaneEquipSet.ButtonBackground:SetTexture(0,0,0,0) PaperDollEquipmentManagerPane:HookScript("OnShow", function(f) for _,btn in pairs(PaperDollEquipmentManagerPane.buttons)do - btn.BgTop:SetTexture("") - btn.BgBottom:SetTexture("") - btn.BgMiddle:SetTexture("") + 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("") + 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) hooksecurefunc(btn.icon, "SetPoint", function(f, g, h, i, j, k, X) @@ -305,11 +305,11 @@ local function CharacterFrameStyle() SetItemFrame(btn, btn.icon) end end - GearManagerDialogPopup:Formula409() + GearManagerDialogPopup:RemoveTextures() GearManagerDialogPopup:SetFixedPanelTemplate("Transparent", true) GearManagerDialogPopup:Point("LEFT", PaperDollFrame, "RIGHT", 4, 0) - GearManagerDialogPopupScrollFrame:Formula409() - GearManagerDialogPopupEditBox:Formula409() + GearManagerDialogPopupScrollFrame:RemoveTextures() + GearManagerDialogPopupEditBox:RemoveTextures() GearManagerDialogPopupEditBox:SetBasicPanel() @@ -320,10 +320,10 @@ local function CharacterFrameStyle() local e = _G["GearManagerDialogPopupButton"..i] local texture = e.icon; if e then - e:Formula409() + e:RemoveTextures() e:SetButtonTemplate() texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G["GearManagerDialogPopupButton"..i.."Icon"]:SetTexture("") + _G["GearManagerDialogPopupButton"..i.."Icon"]:SetTexture(0,0,0,0) texture:FillInner() e:SetFrameLevel(e:GetFrameLevel() + 2) if not e.Panel then @@ -343,14 +343,14 @@ local function CharacterFrameStyle() for i = 1, 7 do local category = _G["CharacterStatsPaneCategory"..i] if(category) then - category:Formula409() + category:RemoveTextures() category:SetButtonTemplate() end end - ReputationFrame:Formula409(true) - ReputationListScrollFrame:Formula409() - ReputationDetailFrame:Formula409() + ReputationFrame:RemoveTextures(true) + ReputationListScrollFrame:RemoveTextures() + ReputationDetailFrame:RemoveTextures() ReputationDetailFrame:SetBasicPanel() ReputationDetailFrame:Point("TOPLEFT", ReputationFrame, "TOPRIGHT", 4, -28) ReputationFrame:HookScript("OnShow", Reputation_OnShow) @@ -362,16 +362,16 @@ local function CharacterFrameStyle() for i = 1, GetCurrencyListSize() do local currency = _G["TokenFrameContainerButton"..i] if(currency) then - currency.highlight:MUNG() - currency.categoryMiddle:MUNG() - currency.categoryLeft:MUNG() - currency.categoryRight:MUNG() + 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:Formula409() + TokenFramePopup:RemoveTextures() TokenFramePopup:SetBasicPanel() TokenFramePopup:Point("TOPLEFT", TokenFrame, "TOPRIGHT", 4, -28) end) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua index cdf9735..0a14906 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -139,8 +139,7 @@ local ChatMenu_OnShow = function(self) self:Point("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 30) end -local ChatConfigChannelSettingsLeft_OnEvent = function(self, event) - ChatConfigChannelSettingsLeft:UnregisterEvent("PLAYER_ENTERING_WORLD") +local ChatConfigChannelSettingsLeft_OnEvent = function(self) local checkBoxTable = self.checkBoxTable; local checkBoxNameString = "ChatConfigChannelSettingsLeftCheckBox"; local boxHeight = ChatConfigOtherSettingsCombatCheckBox1:GetHeight() or 20 @@ -150,21 +149,21 @@ local ChatConfigChannelSettingsLeft_OnEvent = function(self, event) local checkbox = _G[gName] if(checkbox) then if(not checkbox.Panel) then - checkbox:Formula409() + 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 and not check.Panel) then + if(check) then check:SetCheckboxTemplate(true) end + local colors = _G[("%sColorClasses"):format(gName)] if(colors) then - if(not colors.Panel) then - colors:SetCheckboxTemplate(true) - end + colors:SetCheckboxTemplate(true) colors:SetHeight(colorsHeight) end end @@ -181,7 +180,7 @@ local ChatConfigBackgroundFrame_OnShow = function(self) checkbox = _G[gName] if(checkbox) then if(not checkbox.Panel) then - checkbox:Formula409() + checkbox:RemoveTextures() checkbox:SetPanelTemplate("Default") end checkbox.Panel:Point("TOPLEFT", 3, -1) @@ -189,14 +188,13 @@ local ChatConfigBackgroundFrame_OnShow = function(self) checkbox:SetHeight(boxHeight) check = _G[("%sCheck"):format(gName)] - if(check and not check.Panel) then + if(check) then check:SetCheckboxTemplate(true) end + colors = _G[("%sColorClasses"):format(gName)] if(colors) then - if(not colors.Panel) then - colors:SetCheckboxTemplate(true) - end + colors:SetCheckboxTemplate(true) colors:SetHeight(colorsHeight) end end @@ -206,14 +204,14 @@ local ChatConfigBackgroundFrame_OnShow = function(self) checkbox = _G[gName] if(checkbox) then if(not checkbox.Panel) then - checkbox:Formula409() + 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 and not check.Panel) then + if(check) then check:SetCheckboxTemplate(true) end end @@ -223,14 +221,14 @@ local ChatConfigBackgroundFrame_OnShow = function(self) checkbox = _G[gName] if(checkbox) then if(not checkbox.Panel) then - checkbox:Formula409() + 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 and not check.Panel) then + if(check) then check:SetCheckboxTemplate(true) end end @@ -240,14 +238,14 @@ local ChatConfigBackgroundFrame_OnShow = function(self) checkbox = _G[gName] if(checkbox) then if(not checkbox.Panel) then - checkbox:Formula409() + 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 and not check.Panel) then + if(check) then check:SetCheckboxTemplate(true) end end @@ -257,14 +255,14 @@ local ChatConfigBackgroundFrame_OnShow = function(self) checkbox = _G[gName] if(checkbox) then if(not checkbox.Panel) then - checkbox:Formula409() + 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 and not check.Panel) then + if(check) then check:SetCheckboxTemplate(true) end end @@ -274,14 +272,14 @@ local ChatConfigBackgroundFrame_OnShow = function(self) checkbox = _G[gName] if(checkbox) then if(not checkbox.Panel) then - checkbox:Formula409() + 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 and not check.Panel) then + if(check) then check:SetCheckboxTemplate(true) end end @@ -291,14 +289,14 @@ local ChatConfigBackgroundFrame_OnShow = function(self) checkbox = _G[gName] if(checkbox) then if(not checkbox.Panel) then - checkbox:Formula409() + 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 and not check.Panel) then + if(check) then check:SetCheckboxTemplate(true) end end @@ -308,7 +306,7 @@ local ChatConfigBackgroundFrame_OnShow = function(self) checkbox = _G[gName] if(checkbox) then if(not checkbox.Panel) then - checkbox:Formula409() + checkbox:RemoveTextures() checkbox:SetPanelTemplate("Default") end checkbox.Panel:Point("TOPLEFT", 3, -1) @@ -346,7 +344,7 @@ CHAT STYLER ########################################################## ]]-- local function ChatStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.chat ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.chat ~= true then return end @@ -366,7 +364,7 @@ local function ChatStyle() local name = ChatFrameList1[i] local this = _G[name] if(this) then - this:Formula409() + this:RemoveTextures() end end @@ -383,11 +381,11 @@ local function ChatStyle() ChatConfigCombatSettingsFiltersAddFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -1, 0) ChatConfigCombatSettingsFiltersCopyFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersAddFilterButton, "LEFT", -1, 0) - if(_G["CombatConfigTab1"]) then _G["CombatConfigTab1"]:Formula409() end - if(_G["CombatConfigTab2"]) then _G["CombatConfigTab2"]:Formula409() end - if(_G["CombatConfigTab3"]) then _G["CombatConfigTab3"]:Formula409() end - if(_G["CombatConfigTab4"]) then _G["CombatConfigTab4"]:Formula409() end - if(_G["CombatConfigTab5"]) then _G["CombatConfigTab5"]:Formula409() end + 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) @@ -395,7 +393,7 @@ local function ChatStyle() for i = 1, #ChatFrameList3 do local frame = _G[ChatFrameList3[i]] if(frame) then - frame:Formula409() + frame:RemoveTextures() frame:SetBasicPanel() end end @@ -412,8 +410,7 @@ local function ChatStyle() end end - ChatConfigChannelSettingsLeft:RegisterEvent("PLAYER_ENTERING_WORLD") - ChatConfigChannelSettingsLeft:SetScript("OnEvent", ChatConfigChannelSettingsLeft_OnEvent) + ChatConfigChannelSettingsLeft:HookScript("OnShow", ChatConfigChannelSettingsLeft_OnEvent) CreateChatChannelList(ChatConfigChannelSettings, GetChannelList()) ChatConfig_CreateCheckboxes(ChatConfigChannelSettingsLeft, CHAT_CONFIG_CHANNEL_LIST, "ChatConfigCheckBoxWithSwatchAndClassColorTemplate", CHANNELS) @@ -468,6 +465,11 @@ local function ChatStyle() 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 --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua index 88ff5fc..a9301fa 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,10 +21,10 @@ DRESSUP STYLER ########################################################## ]]-- local function DressUpStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.dressingroom ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.dressingroom ~= true then return end - DressUpFrame:Formula409(true) + DressUpFrame:RemoveTextures(true) local w = DressUpFrame:GetWidth() - 32 local h = DressUpFrame:GetHeight() - 72 local bg = CreateFrame("Frame",nil,DressUpFrame) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua index 65b91ba..ff0fdd7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -24,7 +24,7 @@ local PVP_LOST = [[Interface\WorldMap\Skull_64Red]] local function Tab_OnEnter(this) this.backdrop:SetPanelColor("highlight") - this.backdrop:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) + this.backdrop:SetBackdropBorderColor(unpack(SV.Media.color.highlight)) end local function Tab_OnLeave(this) @@ -98,28 +98,28 @@ local function Outline(frame, noHighlight) end local function EncounterJournalStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.encounterjournal ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.encounterjournal ~= true then return end - EncounterJournal:Formula409(true) - EncounterJournalInstanceSelect:Formula409(true) - EncounterJournalNavBar:Formula409(true) - EncounterJournalNavBarOverlay:Formula409(true) - EncounterJournalNavBarHomeButton:Formula409(true) - EncounterJournalInset:Formula409(true) - - EncounterJournalEncounterFrame:Formula409(true) - EncounterJournalEncounterFrameInfo:Formula409(true) - EncounterJournalEncounterFrameInfoDifficulty:Formula409(true) - EncounterJournalEncounterFrameInfoLootScrollFrameFilterToggle:Formula409(true) - EncounterJournalEncounterFrameInfoBossesScrollFrame:Formula409(true) - EncounterJournalInstanceSelectDungeonTab:Formula409(true) - EncounterJournalInstanceSelectRaidTab:Formula409(true) + 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:Formula409(true) + EncounterJournalSearchResults:RemoveTextures(true) EncounterJournal:SetPanelTemplate("Action") EncounterJournal:SetPanelColor("dark") @@ -187,8 +187,8 @@ local function EncounterJournalStyle() local usedHeaders = EncounterJournal.encounter.usedHeaders for key,used in pairs(usedHeaders) do if(not used.button.Panel) then - used:Formula409(true) - used.button:Formula409(true) + used:RemoveTextures(true) + used.button:RemoveTextures(true) used.button:SetButtonTemplate() end used.description:SetTextColor(1, 1, 1) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua index 91d03f7..0667b5d 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -89,9 +89,9 @@ local function TabCustomHelper(this) if not this then return end for _,prop in pairs(FrameSuffix) do local frame = _G[this:GetName()..prop] - frame:SetTexture("") + frame:SetTexture(0,0,0,0) end - this:GetHighlightTexture():SetTexture("") + this:GetHighlightTexture():SetTexture(0,0,0,0) this.backdrop = CreateFrame("Frame", nil, this) this.backdrop:SetFixedPanelTemplate("Default") this.backdrop:SetFrameLevel(this:GetFrameLevel()-1) @@ -103,7 +103,7 @@ local function ChannelList_OnUpdate() for i = 1, MAX_DISPLAY_CHANNEL_BUTTONS do local btn = _G["ChannelButton"..i] if btn then - btn:Formula409() + btn:RemoveTextures() btn:SetHighlightTexture("Interface\\PaperDollInfoFrame\\UI-Character-Tab-Highlight") _G["ChannelButton"..i.."Text"]:SetFontTemplate(nil, 12) end @@ -115,7 +115,7 @@ FRIENDSFRAME STYLER ########################################################## ]]--FriendsFrameBattlenetFrameScrollFrame local function FriendsFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.friends ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.friends ~= true then return end @@ -125,17 +125,17 @@ local function FriendsFrameStyle() STYLE:ApplyScrollFrameStyle(WhoListScrollFrameScrollBar, 5) STYLE:ApplyScrollFrameStyle(ChannelRosterScrollFrameScrollBar, 5) STYLE:ApplyScrollFrameStyle(FriendsFriendsScrollFrameScrollBar) - FriendsFrameInset:Formula409() - WhoFrameListInset:Formula409() - WhoFrameEditBoxInset:Formula409() + FriendsFrameInset:RemoveTextures() + WhoFrameListInset:RemoveTextures() + WhoFrameEditBoxInset:RemoveTextures() STYLE:ApplyEditBoxStyle(WhoFrameEditBoxInset) - ChannelFrameRightInset:Formula409() - ChannelFrameLeftInset:Formula409() + ChannelFrameRightInset:RemoveTextures() + ChannelFrameLeftInset:RemoveTextures() ChannelFrameRightInset:SetFixedPanelTemplate("Inset", true) ChannelFrameLeftInset:SetFixedPanelTemplate("Inset", true) - LFRQueueFrameListInset:Formula409() - LFRQueueFrameRoleInset:Formula409() - LFRQueueFrameCommentInset:Formula409() + LFRQueueFrameListInset:RemoveTextures() + LFRQueueFrameRoleInset:RemoveTextures() + LFRQueueFrameCommentInset:RemoveTextures() LFRQueueFrameListInset:SetFixedPanelTemplate("Inset", true) FriendsFrameFriendsScrollFrame:SetBasicPanel() FriendsFrameFriendsScrollFrame.Panel:Point("TOPRIGHT", -4, 0) @@ -146,24 +146,24 @@ local function FriendsFrameStyle() end -- for c, texture in pairs(FriendsFrameList2)do - -- _G[texture]:MUNG() + -- _G[texture]:Die() -- end for c, V in pairs(FriendsFrameList1)do - _G[V]:Formula409() + _G[V]:RemoveTextures() end for u = 1, FriendsFrame:GetNumRegions()do local a1 = select(u, FriendsFrame:GetRegions()) if a1:GetObjectType() == "Texture"then - a1:SetTexture("") + a1:SetTexture(0,0,0,0) a1:SetAlpha(0) end end FriendsFrameStatusDropDown:SetPoint('TOPLEFT', FriendsTabHeader, 'TOPLEFT', 0, -27) STYLE:ApplyDropdownStyle(FriendsFrameStatusDropDown, 70) - FriendsFrameBattlenetFrame:Formula409() + FriendsFrameBattlenetFrame:RemoveTextures() FriendsFrameBattlenetFrame:SetHeight(22) FriendsFrameBattlenetFrame:SetPoint('TOPLEFT', FriendsFrameStatusDropDown, 'TOPRIGHT', 0, -1) FriendsFrameBattlenetFrame:SetFixedPanelTemplate("Inset") @@ -172,7 +172,7 @@ local function FriendsFrameStyle() -- 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:Formula409() + FriendsFrameBattlenetFrame.BroadcastButton:RemoveTextures() FriendsFrameBattlenetFrame.BroadcastButton:SetSize(22,22) FriendsFrameBattlenetFrame.BroadcastButton:SetPoint('TOPLEFT', FriendsFrameBattlenetFrame, 'TOPRIGHT', 8, 0) FriendsFrameBattlenetFrame.BroadcastButton:SetButtonTemplate() @@ -180,9 +180,9 @@ local function FriendsFrameStyle() FriendsFrameBattlenetFrame.BroadcastButton:SetNormalTexture([[Interface\FriendsFrame\UI-Toast-BroadcastIcon]]) FriendsFrameBattlenetFrame.BroadcastButton:SetPushedTexture([[Interface\FriendsFrame\UI-Toast-BroadcastIcon]]) FriendsFrameBattlenetFrame.BroadcastButton:SetScript('OnClick', function() - SuperVillain:StaticPopup_Show("SET_BN_BROADCAST") + SV:StaticPopup_Show("SET_BN_BROADCAST") end) - FriendsFrameBattlenetFrame.Tag:SetFontTemplate(SuperVillain.Media.font.narrator,16,"NONE") + FriendsFrameBattlenetFrame.Tag:SetFontTemplate(SV.Media.font.narrator,16,"NONE") AddFriendNameEditBox:SetEditboxTemplate() AddFriendFrame:SetFixedPanelTemplate("Transparent", true) ScrollOfResurrectionSelectionFrame:SetFixedPanelTemplate('Transparent') @@ -194,19 +194,19 @@ local function FriendsFrameStyle() ChannelFrameDaughterFrameChannelPassword:SetPanelTemplate("Default") ChannelFrame:HookScript("OnShow", function() - ChannelRosterScrollFrame:Formula409() + ChannelRosterScrollFrame:RemoveTextures() end) hooksecurefunc("FriendsFrame_OnEvent", function() - ChannelRosterScrollFrame:Formula409() + ChannelRosterScrollFrame:RemoveTextures() end) WhoFrame:HookScript("OnShow", function() - ChannelRosterScrollFrame:Formula409() + ChannelRosterScrollFrame:RemoveTextures() end) hooksecurefunc("FriendsFrame_OnEvent", function() - WhoListScrollFrame:Formula409() + WhoListScrollFrame:RemoveTextures() end) ChannelFrameDaughterFrame:SetBasicPanel() @@ -225,9 +225,9 @@ local function FriendsFrameStyle() hooksecurefunc("ChannelList_Update", ChannelList_OnUpdate) FriendsFriendsFrame:SetBasicPanel() - _G["FriendsFriendsFrame"]:Formula409() - _G["FriendsFriendsList"]:Formula409() - _G["FriendsFriendsNoteFrame"]:Formula409() + _G["FriendsFriendsFrame"]:RemoveTextures() + _G["FriendsFriendsList"]:RemoveTextures() + _G["FriendsFriendsNoteFrame"]:RemoveTextures() _G["FriendsFriendsSendRequestButton"]:SetButtonTemplate() _G["FriendsFriendsCloseButton"]:SetButtonTemplate() @@ -235,9 +235,9 @@ local function FriendsFrameStyle() FriendsFriendsList:SetEditboxTemplate() FriendsFriendsNoteFrame:SetEditboxTemplate() STYLE:ApplyDropdownStyle(FriendsFriendsFrameDropDown, 150) - BNConversationInviteDialog:Formula409() + BNConversationInviteDialog:RemoveTextures() BNConversationInviteDialog:SetPanelTemplate('Transparent') - BNConversationInviteDialogList:Formula409() + BNConversationInviteDialogList:RemoveTextures() BNConversationInviteDialogList:SetFixedPanelTemplate('Default') BNConversationInviteDialogInviteButton:SetButtonTemplate() BNConversationInviteDialogCancelButton:SetButtonTemplate() @@ -260,15 +260,15 @@ local function FriendsFrameStyle() STYLE:ApplyScrollFrameStyle(FriendsFrameIgnoreScrollFrameScrollBar, 4) FriendsFramePendingScrollFrame:SetFixedPanelTemplate("Inset") STYLE:ApplyScrollFrameStyle(FriendsFramePendingScrollFrameScrollBar, 4) - IgnoreListFrame:Formula409() - PendingListFrame:Formula409() - ScrollOfResurrectionFrame:Formula409() + IgnoreListFrame:RemoveTextures() + PendingListFrame:RemoveTextures() + ScrollOfResurrectionFrame:RemoveTextures() ScrollOfResurrectionFrameAcceptButton:SetButtonTemplate() ScrollOfResurrectionFrameCancelButton:SetButtonTemplate() - ScrollOfResurrectionFrameTargetEditBoxLeft:SetTexture("") - ScrollOfResurrectionFrameTargetEditBoxMiddle:SetTexture("") - ScrollOfResurrectionFrameTargetEditBoxRight:SetTexture("") - ScrollOfResurrectionFrameNoteFrame:Formula409() + 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') diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua index f5f29f0..3a4485f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,9 +21,9 @@ GOSSIP STYLER ########################################################## ]]-- local function GossipStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.gossip ~= true then return end - ItemTextFrame:Formula409(true) - ItemTextScrollFrame:Formula409() + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.gossip ~= true then return end + ItemTextFrame:RemoveTextures(true) + ItemTextScrollFrame:RemoveTextures() STYLE:ApplyCloseButtonStyle(GossipFrameCloseButton) STYLE:ApplyPaginationStyle(ItemTextPrevPageButton) STYLE:ApplyPaginationStyle(ItemTextNextPageButton) @@ -34,13 +34,13 @@ local function GossipStyle() end end) ItemTextFrame:SetPanelTemplate("Pattern") - ItemTextFrameInset:MUNG() + 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]:Formula409() + _G[t]:RemoveTextures() end GossipFrame:SetPanelTemplate("Halftone") GossipGreetingScrollFrame:SetFixedPanelTemplate("Inset", true) @@ -49,11 +49,11 @@ local function GossipStyle() GossipGreetingScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2) GossipGreetingScrollFrame.spellTex:Size(506, 615) GossipGreetingScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) - _G["GossipFramePortrait"]:MUNG() - _G["GossipFrameGreetingGoodbyeButton"]:Formula409() + _G["GossipFramePortrait"]:Die() + _G["GossipFrameGreetingGoodbyeButton"]:RemoveTextures() _G["GossipFrameGreetingGoodbyeButton"]:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(GossipFrameCloseButton, GossipFrame.Panel) - NPCFriendshipStatusBar:Formula409() + NPCFriendshipStatusBar:RemoveTextures() NPCFriendshipStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) NPCFriendshipStatusBar:SetPanelTemplate("Default") end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua index 5fd48bb..f8f0c63 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -96,7 +96,7 @@ local function GCTabHelper(tab) 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(SuperVillain.Media.color.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) @@ -161,14 +161,14 @@ GUILDFRAME STYLERS ########################################################## ]]-- local function GuildBankStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.gbank ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.gbank ~= true then return end STYLE:ApplyWindowHolder(GuildBankFrame) - GuildBankEmblemFrame:Formula409(true) - GuildBankMoneyFrameBackground:MUNG() + GuildBankEmblemFrame:RemoveTextures(true) + GuildBankMoneyFrameBackground:Die() STYLE:ApplyScrollFrameStyle(GuildBankPopupScrollFrameScrollBar) for b = 1, GuildBankFrame:GetNumChildren() do @@ -184,20 +184,20 @@ local function GuildBankStyle() GuildBankFramePurchaseButton:SetButtonTemplate() GuildBankFrameWithdrawButton:Point("RIGHT", GuildBankFrameDepositButton, "LEFT", -2, 0) GuildBankInfoScrollFrame:Point('TOPLEFT', GuildBankInfo, 'TOPLEFT', -10, 12) - GuildBankInfoScrollFrame:Formula409() + GuildBankInfoScrollFrame:RemoveTextures() GuildBankInfoScrollFrame:Width(GuildBankInfoScrollFrame:GetWidth()-8) - GuildBankTransactionsScrollFrame:Formula409() + GuildBankTransactionsScrollFrame:RemoveTextures() for b = 1, NUM_GUILDBANK_COLUMNS do if(_G["GuildBankColumn"..b]) then - _G["GuildBankColumn"..b]:Formula409() + _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("") + texture:SetTexture(0,0,0,0) end e:SetSlotTemplate() icon:FillInner() @@ -210,8 +210,8 @@ local function GuildBankStyle() local e = _G["GuildBankTab"..b.."Button"] if(e) then local texture = _G["GuildBankTab"..b.."ButtonIconTexture"] - _G["GuildBankTab"..b]:Formula409(true) - e:Formula409() + _G["GuildBankTab"..b]:RemoveTextures(true) + e:RemoveTextures() e:SetButtonTemplate() e:SetFixedPanelTemplate("Default") texture:FillInner() @@ -251,17 +251,17 @@ local function GuildBankStyle() end end) - GuildBankPopupFrame:Formula409() - GuildBankPopupScrollFrame:Formula409() + GuildBankPopupFrame:RemoveTextures() + GuildBankPopupScrollFrame:RemoveTextures() GuildBankPopupFrame:SetFixedPanelTemplate("Transparent", true) GuildBankPopupFrame:Point("TOPLEFT", GuildBankFrame, "TOPRIGHT", 1, -30) GuildBankPopupOkayButton:SetButtonTemplate() GuildBankPopupCancelButton:SetButtonTemplate() GuildBankPopupEditBox:SetEditboxTemplate() - GuildBankPopupNameLeft:MUNG() - GuildBankPopupNameRight:MUNG() - GuildBankPopupNameMiddle:MUNG() - GuildItemSearchBox:Formula409() + GuildBankPopupNameLeft:Die() + GuildBankPopupNameRight:Die() + GuildBankPopupNameMiddle:Die() + GuildItemSearchBox:RemoveTextures() GuildItemSearchBox:SetPanelTemplate("Overlay") GuildItemSearchBox.Panel:Point("TOPLEFT", 10, -1) GuildItemSearchBox.Panel:Point("BOTTOMRIGHT", 4, 1) @@ -270,7 +270,7 @@ local function GuildBankStyle() local e = _G["GuildBankPopupButton"..b] if(e) then local icon = _G[e:GetName().."Icon"] - e:Formula409() + e:RemoveTextures() e:SetFixedPanelTemplate("Default") e:SetButtonTemplate() icon:FillInner() @@ -283,12 +283,12 @@ local function GuildBankStyle() end local function GuildFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.guild ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.guild ~= true then return end STYLE:ApplyWindowHolder(GuildFrame) - GuildLevelFrame:MUNG() + GuildLevelFrame:Die() STYLE:ApplyCloseButtonStyle(GuildMemberDetailCloseButton) STYLE:ApplyCloseButtonStyle(GuildFrameCloseButton) @@ -298,14 +298,14 @@ local function GuildFrameStyle() for i = 1, #GuildFrameList do local frame = _G[GuildFrameList[i]] if(frame) then - frame:Formula409() + frame:RemoveTextures() end end for i = 1, #GuildButtonList do local button = _G[GuildButtonList[i]] if(button) then - button:Formula409(true) + button:RemoveTextures(true) button:SetButtonTemplate() end end @@ -337,26 +337,26 @@ local function GuildFrameStyle() GuildXPFrame:ClearAllPoints() GuildXPFrame:Point("TOP", GuildFrame, "TOP", 0, -40) - GuildFactionBar:Formula409() + 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) - GuildXPBar:Formula409() + 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) - GuildLatestPerkButton:Formula409() + 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:Formula409() + GuildNextPerkButton:RemoveTextures() GuildNextPerkButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) GuildNextPerkButtonIconTexture:ClearAllPoints() GuildNextPerkButtonIconTexture:Point("TOPLEFT", 2, -2) @@ -370,7 +370,7 @@ local function GuildFrameStyle() for i = 1, 4 do local btn = _G["GuildRosterColumnButton"..i] if(btn) then - btn:Formula409(true) + btn:RemoveTextures(true) end end @@ -379,7 +379,7 @@ local function GuildFrameStyle() for i = 1, 14 do local btn = _G["GuildRosterContainerButton"..i.."HeaderButton"] if(btn) then - btn:Formula409() + btn:RemoveTextures() btn:SetButtonTemplate() end end @@ -391,19 +391,19 @@ local function GuildFrameStyle() GuildMemberRankDropdown:SetFrameLevel(GuildMemberRankDropdown:GetFrameLevel()+5) STYLE:ApplyDropdownStyle(GuildMemberRankDropdown, 182) GuildMemberRankDropdown.Panel:SetBackdropColor(0,0,0,1) - GuildNewsFrame:Formula409() + 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:MUNG() end - btn:Formula409() + if(btn.header) then btn.header:Die() end + btn:RemoveTextures() btn:SetButtonTemplate() end end - GuildNewsFiltersFrame:Formula409() + GuildNewsFiltersFrame:RemoveTextures() GuildNewsFiltersFrame:SetFixedPanelTemplate("Transparent", true) STYLE:ApplyCloseButtonStyle(GuildNewsFiltersFrameCloseButton) @@ -421,7 +421,7 @@ local function GuildFrameStyle() for i = 1, 3 do local tab = _G["GuildInfoFrameTab"..i] if(tab) then - tab:Formula409() + tab:RemoveTextures() end end @@ -485,7 +485,7 @@ local function GuildFrameStyle() for i = 1, 8 do local button = _G["GuildPerksContainerButton"..i] if button then - button:Formula409() + button:RemoveTextures() if button.icon then STYLE:ApplyItemButtonStyle(button, nil, true) button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -499,7 +499,7 @@ local function GuildFrameStyle() for i = 1, 8 do local button = _G["GuildRewardsContainerButton"..i] if button then - button:Formula409() + button:RemoveTextures() if button.icon then button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) button.icon:ClearAllPoints() @@ -519,19 +519,19 @@ local function GuildFrameStyle() for _,button in next, GuildInfoFrameApplicantsContainer.buttons do counter = counter + 1; buttonIndex = offset + counter; - button.selectedTex:MUNG() - button:GetHighlightTexture():MUNG() + button.selectedTex:Die() + button:GetHighlightTexture():Die() button:SetBackdrop(nil) end end local function GuildControlStyle() - if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.guildcontrol~=true then return end + if SV.db.SVStyle.blizzard.enable~=true or SV.db.SVStyle.blizzard.guildcontrol~=true then return end - GuildControlUI:Formula409() - GuildControlUIHbar:Formula409() - GuildControlUIRankBankFrameInset:Formula409() - GuildControlUIRankBankFrameInsetScrollFrame:Formula409() + GuildControlUI:RemoveTextures() + GuildControlUIHbar:RemoveTextures() + GuildControlUIRankBankFrameInset:RemoveTextures() + GuildControlUIRankBankFrameInsetScrollFrame:RemoveTextures() STYLE:ApplyWindowHolder(GuildControlUI) @@ -540,7 +540,7 @@ local function GuildControlStyle() hooksecurefunc("GuildControlUI_RankOrder_Update",RankOrder_OnUpdate) GuildControlUIRankOrderFrameNewButton:HookScript("OnClick", function() - SuperVillain:ExecuteTimer(1,RankOrder_OnUpdate) + SV:ExecuteTimer(1,RankOrder_OnUpdate) end) STYLE:ApplyDropdownStyle(GuildControlUINavigationDropDown) @@ -557,8 +557,8 @@ local function GuildControlStyle() GuildControlUIRankSettingsFrameGoldBox:SetEditboxTemplate() GuildControlUIRankSettingsFrameGoldBox.Panel:Point("TOPLEFT",-2,-4) GuildControlUIRankSettingsFrameGoldBox.Panel:Point("BOTTOMRIGHT",2,4) - GuildControlUIRankSettingsFrameGoldBox:Formula409() - GuildControlUIRankBankFrame:Formula409() + GuildControlUIRankSettingsFrameGoldBox:RemoveTextures() + GuildControlUIRankBankFrame:RemoveTextures() hooksecurefunc("GuildControlUI_BankTabPermissions_Update",function() local tabs = GetNumGuildBankTabs() @@ -598,15 +598,15 @@ end local function GuildRegistrarStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.guildregistrar ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.guildregistrar ~= true then return end STYLE:ApplyWindowHolder(GuildRegistrarFrame, true, true) - GuildRegistrarFrameInset:MUNG() - GuildRegistrarFrameEditBox:Formula409() - GuildRegistrarGreetingFrame:Formula409() + GuildRegistrarFrameInset:Die() + GuildRegistrarFrameEditBox:RemoveTextures() + GuildRegistrarGreetingFrame:RemoveTextures() GuildRegistrarFrameGoodbyeButton:SetButtonTemplate() GuildRegistrarFrameCancelButton:SetButtonTemplate() @@ -618,7 +618,7 @@ local function GuildRegistrarStyle() 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:MUNG() + a2:Die() end end end @@ -637,7 +637,7 @@ local function GuildRegistrarStyle() end local function LFGuildFrameStyle() - if(SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfguild ~= true) then return end + if(SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.lfguild ~= true) then return end STYLE:ApplyWindowHolder(LookingForGuildFrame, true) @@ -649,9 +649,9 @@ local function LFGuildFrameStyle() LookingForGuildTankButton.checkButton:SetCheckboxTemplate(true) LookingForGuildHealerButton.checkButton:SetCheckboxTemplate(true) LookingForGuildDamagerButton.checkButton:SetCheckboxTemplate(true) - LookingForGuildFrameInset:Formula409(false) - LookingForGuildBrowseButton_LeftSeparator:MUNG() - LookingForGuildRequestButton_RightSeparator:MUNG() + LookingForGuildFrameInset:RemoveTextures(false) + LookingForGuildBrowseButton_LeftSeparator:Die() + LookingForGuildRequestButton_RightSeparator:Die() STYLE:ApplyScrollFrameStyle(LookingForGuildBrowseFrameContainerScrollBar) LookingForGuildBrowseButton:SetButtonTemplate() @@ -659,7 +659,7 @@ local function LFGuildFrameStyle() STYLE:ApplyCloseButtonStyle(LookingForGuildFrameCloseButton) LookingForGuildCommentInputFrame:SetPanelTemplate("Default") - LookingForGuildCommentInputFrame:Formula409(false) + LookingForGuildCommentInputFrame:RemoveTextures(false) for u = 1, 5 do local J = _G["LookingForGuildBrowseFrameContainerButton"..u] @@ -675,11 +675,11 @@ local function LFGuildFrameStyle() tab:SetFrameLevel(99) end - GuildFinderRequestMembershipFrame:Formula409(true) + GuildFinderRequestMembershipFrame:RemoveTextures(true) GuildFinderRequestMembershipFrame:SetFixedPanelTemplate("Transparent", true) GuildFinderRequestMembershipFrameAcceptButton:SetButtonTemplate() GuildFinderRequestMembershipFrameCancelButton:SetButtonTemplate() - GuildFinderRequestMembershipFrameInputFrame:Formula409() + GuildFinderRequestMembershipFrameInputFrame:RemoveTextures() GuildFinderRequestMembershipFrameInputFrame:SetFixedPanelTemplate("Default") end --[[ diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua index dab4f0d..cc98a24 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -62,53 +62,53 @@ HELPFRAME STYLER ########################################################## ]]-- local function HelpFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.help ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.help ~= true then return end tinsert(HelpFrameButtonList, "HelpFrameButton16") tinsert(HelpFrameButtonList, "HelpFrameSubmitSuggestionSubmit") tinsert(HelpFrameButtonList, "HelpFrameReportBugSubmit") for d = 1, #HelpFrameList do - _G[HelpFrameList[d]]:Formula409(true) + _G[HelpFrameList[d]]:RemoveTextures(true) _G[HelpFrameList[d]]:SetPanelTemplate("Default") end HelpFrameHeader:SetFrameLevel(HelpFrameHeader:GetFrameLevel()+2) HelpFrameKnowledgebaseErrorFrame:SetFrameLevel(HelpFrameKnowledgebaseErrorFrame:GetFrameLevel()+2) - HelpFrameReportBugScrollFrame:Formula409() + 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:Formula409() + e:RemoveTextures() end end STYLE:ApplyScrollFrameStyle(HelpFrameReportBugScrollFrameScrollBar) - HelpFrameSubmitSuggestionScrollFrame:Formula409() + 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:Formula409() + e:RemoveTextures() end end STYLE:ApplyScrollFrameStyle(HelpFrameSubmitSuggestionScrollFrameScrollBar) - HelpFrameTicketScrollFrame:Formula409() + 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:Formula409() + e:RemoveTextures() end end STYLE:ApplyScrollFrameStyle(HelpFrameKnowledgebaseScrollFrame2ScrollBar) for d = 1, #HelpFrameButtonList do - _G[HelpFrameButtonList[d]]:Formula409(true) + _G[HelpFrameButtonList[d]]:RemoveTextures(true) _G[HelpFrameButtonList[d]]:SetButtonTemplate() if _G[HelpFrameButtonList[d]].text then _G[HelpFrameButtonList[d]].text:ClearAllPoints() @@ -125,14 +125,14 @@ local function HelpFrameStyle() end for d = 1, HelpFrameKnowledgebaseScrollFrameScrollChild:GetNumChildren()do local f = _G["HelpFrameKnowledgebaseScrollFrameButton"..d] - f:Formula409(true) + f:RemoveTextures(true) f:SetButtonTemplate() end HelpFrameKnowledgebaseSearchBox:ClearAllPoints() HelpFrameKnowledgebaseSearchBox:Point("TOPLEFT", HelpFrameMainInset, "TOPLEFT", 13, -10) - HelpFrameKnowledgebaseNavBarOverlay:MUNG() - HelpFrameKnowledgebaseNavBar:Formula409() - HelpFrame:Formula409(true) + HelpFrameKnowledgebaseNavBarOverlay:Die() + HelpFrameKnowledgebaseNavBar:RemoveTextures() + HelpFrame:RemoveTextures(true) HelpFrame:SetPanelTemplate("Halftone") HelpFrameKnowledgebaseSearchBox:SetEditboxTemplate() STYLE:ApplyScrollFrameStyle(HelpFrameKnowledgebaseScrollFrameScrollBar, 5) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua index 26c53c1..7c03ee4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -46,31 +46,31 @@ INSPECT UI STYLER ########################################################## ]]-- local function InspectStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.inspect ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.inspect ~= true then return end - InspectFrame:Formula409(true) - InspectFrameInset:Formula409(true) + InspectFrame:RemoveTextures(true) + InspectFrameInset:RemoveTextures(true) InspectFrame:SetPanelTemplate('Action') STYLE:ApplyCloseButtonStyle(InspectFrameCloseButton) for d = 1, 4 do STYLE:ApplyTabStyle(_G["InspectFrameTab"..d]) end - InspectModelFrameBorderTopLeft:MUNG() - InspectModelFrameBorderTopRight:MUNG() - InspectModelFrameBorderTop:MUNG() - InspectModelFrameBorderLeft:MUNG() - InspectModelFrameBorderRight:MUNG() - InspectModelFrameBorderBottomLeft:MUNG() - InspectModelFrameBorderBottomRight:MUNG() - InspectModelFrameBorderBottom:MUNG() - InspectModelFrameBorderBottom2:MUNG() - InspectModelFrameBackgroundOverlay:MUNG() + 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:Formula409() + frame:RemoveTextures() frame:SetButtonTemplate() texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) texture:FillInner() @@ -87,8 +87,8 @@ local function InspectStyle() q.Panel:SetBackdropBorderColor(0,0,0,1) end end) - InspectGuildFrameBG:MUNG() - InspectTalentFrame:Formula409() + InspectGuildFrameBG:Die() + InspectTalentFrame:RemoveTextures() end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua index d2fe2a4..54bcc19 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,11 +21,11 @@ ITEMSOCKETING STYLER ########################################################## ]]-- local function ItemSocketStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.socket ~= true then return end - ItemSocketingFrame:Formula409() + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.socket ~= true then return end + ItemSocketingFrame:RemoveTextures() ItemSocketingFrame:SetPanelTemplate("Action") - ItemSocketingFrameInset:MUNG() - ItemSocketingScrollFrame:Formula409() + ItemSocketingFrameInset:Die() + ItemSocketingScrollFrame:RemoveTextures() ItemSocketingScrollFrame:SetPanelTemplate("Inset", true) STYLE:ApplyScrollFrameStyle(ItemSocketingScrollFrameScrollBar, 2) for j = 1, MAX_NUM_SOCKETS do @@ -33,11 +33,11 @@ local function ItemSocketStyle() local C = _G[("ItemSocketingSocket%dBracketFrame"):format(j)]; local D = _G[("ItemSocketingSocket%dBackground"):format(j)]; local E = _G[("ItemSocketingSocket%dIconTexture"):format(j)]; - i:Formula409() + i:RemoveTextures() i:SetButtonTemplate() i:SetFixedPanelTemplate("Button", true) - C:MUNG() - D:MUNG() + C:Die() + D:Die() E:SetTexCoord(0.1, 0.9, 0.1, 0.9) E:FillInner() end @@ -51,7 +51,7 @@ local function ItemSocketStyle() i:SetBackdropBorderColor(color.r, color.g, color.b) end end) - ItemSocketingFramePortrait:MUNG() + ItemSocketingFramePortrait:Die() ItemSocketingSocketButton:ClearAllPoints() ItemSocketingSocketButton:Point("BOTTOMRIGHT", ItemSocketingFrame, "BOTTOMRIGHT", -5, 5) ItemSocketingSocketButton:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua index 3a566a7..756c778 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,16 +21,16 @@ ITEMUPGRADE UI STYLER ########################################################## ]]-- local function ItemUpgradeStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.itemUpgrade ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.itemUpgrade ~= true then return end STYLE:ApplyWindowHolder(ItemUpgradeFrame, true) STYLE:ApplyCloseButtonStyle(ItemUpgradeFrameCloseButton) - ItemUpgradeFrameUpgradeButton:Formula409() + ItemUpgradeFrameUpgradeButton:RemoveTextures() ItemUpgradeFrameUpgradeButton:SetButtonTemplate() - ItemUpgradeFrame.ItemButton:Formula409() + ItemUpgradeFrame.ItemButton:RemoveTextures() ItemUpgradeFrame.ItemButton:SetSlotTemplate(true) ItemUpgradeFrame.ItemButton.IconTexture:FillInner() hooksecurefunc('ItemUpgradeFrame_Update', function() @@ -41,8 +41,8 @@ local function ItemUpgradeStyle() ItemUpgradeFrame.ItemButton.IconTexture:SetAlpha(0) end end) - ItemUpgradeFrameMoneyFrame:Formula409() - ItemUpgradeFrame.FinishedGlow:MUNG() + ItemUpgradeFrameMoneyFrame:RemoveTextures() + ItemUpgradeFrame.FinishedGlow:Die() ItemUpgradeFrame.ButtonFrame:DisableDrawLayer('BORDER') end --[[ diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua index 71eca1c..e664fdb 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -28,12 +28,12 @@ local BindButtons = { } local function BindingStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.binding ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.binding ~= true then return end for _, gName in pairs(BindButtons)do local btn = _G[gName] if(btn) then - btn:Formula409() + btn:RemoveTextures() btn:SetButtonTemplate() end end @@ -41,19 +41,19 @@ local function BindingStyle() for i = 1, KEY_BINDINGS_DISPLAYED do local button1 = _G["KeyBindingFrameBinding"..i.."Key1Button"] if(button1) then - button1:Formula409(true) + button1:RemoveTextures(true) button1:SetEditboxTemplate() end local button2 = _G["KeyBindingFrameBinding"..i.."Key2Button"] if(button2) then - button2:Formula409(true) + button2:RemoveTextures(true) button2:SetEditboxTemplate() end end STYLE:ApplyScrollFrameStyle(KeyBindingFrameScrollFrameScrollBar) - KeyBindingFrame:Formula409() + KeyBindingFrame:RemoveTextures() KeyBindingFrame:SetPanelTemplate("Halftone") end --[[ diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua index 6accee8..24d4d79 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -43,7 +43,7 @@ local Incentive_OnHide = function(button) end local LFDQueueRandom_OnUpdate = function() - LFDQueueFrame:Formula409() + LFDQueueFrame:RemoveTextures() for u = 1, LFD_MAX_REWARDS do local t = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u] local icon = _G["LFDQueueFrameRandomScrollFrameChildFrameItem"..u.."IconTexture"] @@ -76,7 +76,7 @@ local LFDQueueRandom_OnUpdate = function() end local ScenarioQueueRandom_OnUpdate = function() - LFDQueueFrame:Formula409() + LFDQueueFrame:RemoveTextures() for u = 1, LFD_MAX_REWARDS do local t = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u] local icon = _G["ScenarioQueueFrameRandomScrollFrameChildFrameItem"..u.."IconTexture"] @@ -106,12 +106,12 @@ LFD STYLER ########################################################## ]]-- local function LFDFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfg ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.lfg ~= true then return end STYLE:ApplyWindowHolder(PVEFrame, true) - PVEFrameLeftInset:Formula409() - RaidFinderQueueFrame:Formula409(true) + PVEFrameLeftInset:RemoveTextures() + RaidFinderQueueFrame:RemoveTextures(true) PVEFrameBg:Hide() PVEFrameTitleBg:Hide() PVEFramePortrait:Hide() @@ -133,14 +133,14 @@ local function LFDFrameStyle() GroupFinderFrameGroupButton3.icon:SetTexture("Interface\\Icons\\Icon_Scenarios") GroupFinderFrameGroupButton4.icon:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\SVUI-EMBLEM") - LFGDungeonReadyDialogBackground:MUNG() + LFGDungeonReadyDialogBackground:Die() LFGDungeonReadyDialogEnterDungeonButton:SetButtonTemplate() LFGDungeonReadyDialogLeaveQueueButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(LFGDungeonReadyDialogCloseButton) - LFGDungeonReadyDialog:Formula409() + LFGDungeonReadyDialog:RemoveTextures() LFGDungeonReadyDialog:SetPanelTemplate("Pattern", true, 2, 4, 4) - LFGDungeonReadyStatus:Formula409() + LFGDungeonReadyStatus:RemoveTextures() LFGDungeonReadyStatus:SetPanelTemplate("Pattern", true, 2, 4, 4) LFGDungeonReadyDialogRoleIconTexture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS") LFGDungeonReadyDialogRoleIconTexture:SetAlpha(0.5) @@ -167,9 +167,9 @@ local function LFDFrameStyle() LFDQueueFrameRoleButtonTankIncentiveIcon:HookScript("OnHide", Incentive_OnHide) LFDQueueFrameRoleButtonHealerIncentiveIcon:HookScript("OnHide", Incentive_OnHide) LFDQueueFrameRoleButtonDPSIncentiveIcon:HookScript("OnHide", Incentive_OnHide) - LFDQueueFrameRoleButtonTank.shortageBorder:MUNG() - LFDQueueFrameRoleButtonDPS.shortageBorder:MUNG() - LFDQueueFrameRoleButtonHealer.shortageBorder:MUNG() + LFDQueueFrameRoleButtonTank.shortageBorder:Die() + LFDQueueFrameRoleButtonDPS.shortageBorder:Die() + LFDQueueFrameRoleButtonHealer.shortageBorder:Die() LFGDungeonReadyDialog.filigree:SetAlpha(0) LFGDungeonReadyDialog.bottomArt:SetAlpha(0) STYLE:ApplyCloseButtonStyle(LFGDungeonReadyStatusCloseButton) @@ -177,7 +177,7 @@ local function LFDFrameStyle() for _,name in pairs(LFDFrameList) do local frame = _G[name]; if frame then - frame.checkButton:Formula409() + frame.checkButton:RemoveTextures() frame.checkButton:SetCheckboxTemplate(true, -4, -4) frame.checkButton:SetFrameLevel(frame.checkButton:GetFrameLevel() + 50) frame:DisableDrawLayer("BACKGROUND") @@ -222,7 +222,7 @@ local function LFDFrameStyle() local button = GroupFinderFrame["groupButton"..i] if(button) then button.ring:Hide() - button.bg:SetTexture("") + button.bg:SetTexture(0,0,0,0) button.bg:SetAllPoints() button:SetFixedPanelTemplate('Button') button:SetButtonTemplate() @@ -245,10 +245,10 @@ local function LFDFrameStyle() PVEFrameTab1:SetPoint('BOTTOMLEFT', PVEFrame, 'BOTTOMLEFT', 19, -31) STYLE:ApplyCloseButtonStyle(PVEFrameCloseButton) - LFDParentFrame:Formula409() - LFDQueueFrameFindGroupButton:Formula409() - LFDParentFrameInset:Formula409() - LFDQueueFrameSpecificListScrollFrame:Formula409() + LFDParentFrame:RemoveTextures() + LFDQueueFrameFindGroupButton:RemoveTextures() + LFDParentFrameInset:RemoveTextures() + LFDQueueFrameSpecificListScrollFrame:RemoveTextures() LFDQueueFrameFindGroupButton:SetButtonTemplate() hooksecurefunc("LFDQueueFrameRandom_UpdateFrame", LFDQueueRandom_OnUpdate) @@ -256,7 +256,7 @@ local function LFDFrameStyle() for i = 1, NUM_SCENARIO_CHOICE_BUTTONS do local box = _G["ScenarioQueueFrameSpecificButton"..i.."EnableButton"] if(box and (not box.Panel)) then - box:Formula409() + box:RemoveTextures() box:SetCheckboxTemplate(true, -2, -3) end end @@ -264,18 +264,18 @@ local function LFDFrameStyle() STYLE:ApplyDropdownStyle(LFDQueueFrameTypeDropDown) - RaidFinderFrame:Formula409() - RaidFinderFrameBottomInset:Formula409() - RaidFinderFrameRoleInset:Formula409() - LFDQueueFrameRandomScrollFrameScrollBar:Formula409() - ScenarioQueueFrameSpecificScrollFrame:Formula409() + RaidFinderFrame:RemoveTextures() + RaidFinderFrameBottomInset:RemoveTextures() + RaidFinderFrameRoleInset:RemoveTextures() + LFDQueueFrameRandomScrollFrameScrollBar:RemoveTextures() + ScenarioQueueFrameSpecificScrollFrame:RemoveTextures() RaidFinderFrameBottomInsetBg:Hide() RaidFinderFrameBtnCornerRight:Hide() RaidFinderFrameButtonBottomBorder:Hide() STYLE:ApplyDropdownStyle(RaidFinderQueueFrameSelectionDropDown) - RaidFinderFrameFindRaidButton:Formula409() + RaidFinderFrameFindRaidButton:RemoveTextures() RaidFinderFrameFindRaidButton:SetButtonTemplate() - RaidFinderQueueFrame:Formula409() + RaidFinderQueueFrame:RemoveTextures() for u = 1, LFD_MAX_REWARDS do local t = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u] @@ -285,7 +285,7 @@ local function LFDFrameStyle() local x = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."ShortageBorder"] local y = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."Count"] local z = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."NameFrame"] - t:Formula409() + t:RemoveTextures() icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) icon:SetDrawLayer("OVERLAY") y:SetDrawLayer("OVERLAY") @@ -309,7 +309,7 @@ local function LFDFrameStyle() ScenarioQueueFrame.Bg:Hide() ScenarioFinderFrameInset:GetRegions():Hide() hooksecurefunc("ScenarioQueueFrameRandom_UpdateFrame", ScenarioQueueRandom_OnUpdate) - ScenarioQueueFrameFindGroupButton:Formula409() + ScenarioQueueFrameFindGroupButton:RemoveTextures() ScenarioQueueFrameFindGroupButton:SetButtonTemplate() STYLE:ApplyDropdownStyle(ScenarioQueueFrameTypeDropDown) LFRBrowseFrameRoleInset:DisableDrawLayer("BORDER") @@ -334,7 +334,7 @@ local function LFDFrameStyle() RaidBrowserFrame:HookScript('OnShow', function() if not LFRQueueFrameSpecificListScrollFrameScrollBar.styled then STYLE:ApplyScrollFrameStyle(LFRQueueFrameSpecificListScrollFrameScrollBar) - LFRBrowseFrame:Formula409() + LFRBrowseFrame:RemoveTextures() for u = 1, 2 do local C = _G['LFRParentFrameSideTab'..u] C:DisableDrawLayer('BACKGROUND') @@ -346,12 +346,12 @@ local function LFDFrameStyle() C:SetPanelTemplate() hooksecurefunc(C:GetHighlightTexture(), "SetTexture", function(o, D) if D ~= nil then - o:SetTexture("") + o:SetTexture(0,0,0,0) end end) hooksecurefunc(C:GetCheckedTexture(), "SetTexture", function(o, D) if D ~= nil then - o:SetTexture("") + o:SetTexture(0,0,0,0) end end) end @@ -367,7 +367,7 @@ local function LFDFrameStyle() end end) - LFGInvitePopup:Formula409() + LFGInvitePopup:RemoveTextures() LFGInvitePopup:SetPanelTemplate("Pattern", true, 2, 4, 4) LFGInvitePopupAcceptButton:SetButtonTemplate() LFGInvitePopupDeclineButton:SetButtonTemplate() @@ -388,7 +388,7 @@ local function LFDFrameStyle() for u = 1, NUM_LFD_CHOICE_BUTTONS do local box = _G["LFDQueueFrameSpecificListButton"..u.."EnableButton"] if(box and (not box.Panel)) then - box:Formula409() + box:RemoveTextures() box:SetCheckboxTemplate(true, -2, -3) box:SetFrameLevel(box:GetFrameLevel() + 50) end @@ -397,7 +397,7 @@ local function LFDFrameStyle() for u = 1, NUM_LFR_CHOICE_BUTTONS do local box = _G["LFRQueueFrameSpecificListButton"..u.."EnableButton"] if(box and (not box.Panel)) then - box:Formula409() + box:RemoveTextures() box:SetCheckboxTemplate(true, -2, -3) box:SetFrameLevel(box:GetFrameLevel() + 50) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua index fcabe07..cd54324 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -41,7 +41,7 @@ local LootHistoryFrame_OnUpdate = function(o) local M = LootHistoryFrame.itemFrames[u] if not M.isStyled then local Icon = M.Icon:GetTexture() - M:Formula409() + M:RemoveTextures() M.Icon:SetTexture(Icon) M.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) M:SetFixedPanelTemplate("Button") @@ -58,15 +58,15 @@ LOOTHISTORY STYLER ]]-- local function LootHistoryStyle() LootHistoryFrame:SetFrameStrata('HIGH') - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.loot ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.loot ~= true then return end local M = MissingLootFrame; - M:Formula409() + M:RemoveTextures() M:SetPanelTemplate("Pattern") STYLE:ApplyCloseButtonStyle(MissingLootFramePassButton) hooksecurefunc("MissingLootFrame_Show", MissingLootFrame_OnShow) - LootHistoryFrame:Formula409() + LootHistoryFrame:RemoveTextures() STYLE:ApplyCloseButtonStyle(LootHistoryFrame.CloseButton) - LootHistoryFrame:Formula409() + LootHistoryFrame:RemoveTextures() LootHistoryFrame:SetFixedPanelTemplate('Transparent') STYLE:ApplyCloseButtonStyle(LootHistoryFrame.ResizeButton) LootHistoryFrame.ResizeButton:SetFixedPanelTemplate() @@ -77,15 +77,15 @@ local function LootHistoryStyle() LootHistoryFrame.ResizeButton:SetNormalTexture("") local txt = LootHistoryFrame.ResizeButton:CreateFontString(nil,"OVERLAY") - txt:SetFont(SuperVillain.Media.font.roboto, 14, "NONE") + txt:SetFont(SV.Media.font.roboto, 14, "NONE") txt:SetAllPoints(LootHistoryFrame.ResizeButton) txt:SetJustifyH("CENTER") txt:SetText("RESIZE") - LootHistoryFrameScrollFrame:Formula409() + LootHistoryFrameScrollFrame:RemoveTextures() STYLE:ApplyScrollFrameStyle(LootHistoryFrameScrollFrameScrollBar) hooksecurefunc("LootHistoryFrame_FullUpdate", LootHistoryFrame_OnUpdate) - MasterLooterFrame:Formula409() + MasterLooterFrame:RemoveTextures() MasterLooterFrame:SetFixedPanelTemplate() MasterLooterFrame:SetFrameStrata('FULLSCREEN_DIALOG') hooksecurefunc("MasterLooterFrame_Show", function() @@ -94,7 +94,7 @@ local function LootHistoryStyle() local u = J.Icon; local icon = u:GetTexture() local S = ITEM_QUALITY_COLORS[LootFrame.selectedQuality] - J:Formula409() + J:RemoveTextures() u:SetTexture(icon) u:SetTexCoord(0.1, 0.9, 0.1, 0.9) J:SetPanelTemplate("Pattern") @@ -116,10 +116,10 @@ local function LootHistoryStyle() end end end) - BonusRollFrame:Formula409() + BonusRollFrame:RemoveTextures() STYLE:ApplyAlertStyle(BonusRollFrame) BonusRollFrame.PromptFrame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - BonusRollFrame.PromptFrame.Timer.Bar:SetTexture(SuperVillain.Media.bar.default) + BonusRollFrame.PromptFrame.Timer.Bar:SetTexture(SV.Media.bar.default) BonusRollFrame.PromptFrame.Timer.Bar:SetVertexColor(0.1, 1, 0.1) end --[[ diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua index 4446800..17d99f3 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -26,28 +26,28 @@ local _hook_LossOfControl = function(self, ...) self.AbilityName:ClearAllPoints() self.AbilityName:SetPoint("BOTTOM", self, 0, -28) self.AbilityName.scrollTime = nil; - self.AbilityName:SetFont(SuperVillain.Media.font.names, 20, 'OUTLINE') + 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(SuperVillain.Media.font.numbers, 20, 'OUTLINE') + 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(SuperVillain.Media.font.roboto, 20, 'OUTLINE') + self.TimeLeft.SecondsText:SetFont(SV.Media.font.roboto, 20, 'OUTLINE') if self.Anim:IsPlaying() then self.Anim:Stop() end end local function LossOfControlStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.losscontrol ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.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:Formula409() + LossOfControlFrame:RemoveTextures() LossOfControlFrame.AbilityName:ClearAllPoints() LossOfControlFrame:Size(LossOfControlFrame.Icon:GetWidth() + 50) --local bg = CreateFrame("Frame", nil, LossOfControlFrame) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua index 558a541..4c4feb2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -32,14 +32,14 @@ MACRO UI STYLER ########################################################## ]]-- local function MacroUIStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.macro ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.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]]:Formula409() + _G[MacroButtonList[b]]:RemoveTextures() _G[MacroButtonList[b]]:SetButtonTemplate() end for b = 1, #MacroButtonList2 do @@ -52,24 +52,24 @@ local function MacroUIStyle() end MacroFrameTab1:Point("TOPLEFT", MacroFrame, "TOPLEFT", 85, -39) MacroFrameTab2:Point("LEFT", MacroFrameTab1, "RIGHT", 4, 0) - MacroFrame:Formula409() + MacroFrame:RemoveTextures() MacroFrame:SetPanelTemplate("Action") MacroFrame.Panel:SetPoint("BOTTOMRIGHT",MacroFrame,"BOTTOMRIGHT",0,-25) - MacroFrameText:SetFont(SuperVillain.Media.font.roboto, 10, "OUTLINE") - MacroFrameTextBackground:Formula409() + MacroFrameText:SetFont(SV.Media.font.roboto, 10, "OUTLINE") + MacroFrameTextBackground:RemoveTextures() MacroFrameTextBackground:SetBasicPanel() - MacroPopupFrame:Formula409() + MacroPopupFrame:RemoveTextures() MacroPopupFrame:SetBasicPanel() - MacroPopupScrollFrame:Formula409() + MacroPopupScrollFrame:RemoveTextures() MacroPopupScrollFrame:SetPanelTemplate("Pattern") MacroPopupScrollFrame.Panel:Point("TOPLEFT", 51, 2) MacroPopupScrollFrame.Panel:Point("BOTTOMRIGHT", -4, 4) MacroButtonScrollFrame:SetBasicPanel() MacroPopupEditBox:SetEditboxTemplate() - MacroPopupNameLeft:SetTexture("") - MacroPopupNameMiddle:SetTexture("") - MacroPopupNameRight:SetTexture("") - MacroFrameInset:MUNG() + 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) @@ -77,7 +77,7 @@ local function MacroUIStyle() c:ClearAllPoints() c:Point("TOPLEFT", MacroFrame, "TOPRIGHT", 5, -2) end) - MacroFrameSelectedMacroButton:Formula409() + MacroFrameSelectedMacroButton:RemoveTextures() MacroFrameSelectedMacroButton:SetSlotTemplate() MacroFrameSelectedMacroButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) MacroFrameSelectedMacroButtonIcon:FillInner() @@ -89,7 +89,7 @@ local function MacroUIStyle() local f = _G["MacroPopupButton"..b] local g = _G["MacroPopupButton"..b.."Icon"] if d then - d:Formula409() + d:RemoveTextures() d:SetButtonTemplate() local level = d:GetFrameLevel() if(level > 0) then @@ -105,7 +105,7 @@ local function MacroUIStyle() e:SetDrawLayer("OVERLAY") end if f then - f:Formula409() + f:RemoveTextures() f:SetButtonTemplate() f:SetBackdropColor(0, 0, 0, 0) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua index 51094d2..115f516 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -24,7 +24,7 @@ local function MailFrame_OnUpdate() for b = 1, ATTACHMENTS_MAX_SEND do local d = _G["SendMailAttachment"..b] if not d.styled then - d:Formula409()d:SetFixedPanelTemplate("Default") + d:RemoveTextures()d:SetFixedPanelTemplate("Default") d:SetButtonTemplate() d.styled = true end @@ -41,18 +41,18 @@ MAILBOX STYLER ########################################################## ]]-- local function MailBoxStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.mail ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.mail ~= true then return end STYLE:ApplyWindowHolder(MailFrame) for b = 1, INBOXITEMS_TO_DISPLAY do local i = _G["MailItem"..b] - i:Formula409() + i:RemoveTextures() i:SetPanelTemplate("Inset") i.Panel:Point("TOPLEFT", 2, 1) i.Panel:Point("BOTTOMRIGHT", -2, 2) local d = _G["MailItem"..b.."Button"] - d:Formula409() + d:RemoveTextures() d:SetButtonTemplate() local e = _G["MailItem"..b.."ButtonIcon"] e:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -61,11 +61,11 @@ local function MailBoxStyle() STYLE:ApplyCloseButtonStyle(MailFrameCloseButton) STYLE:ApplyPaginationStyle(InboxPrevPageButton) STYLE:ApplyPaginationStyle(InboxNextPageButton) - MailFrameTab1:Formula409() - MailFrameTab2:Formula409() + MailFrameTab1:RemoveTextures() + MailFrameTab2:RemoveTextures() STYLE:ApplyTabStyle(MailFrameTab1) STYLE:ApplyTabStyle(MailFrameTab2) - SendMailScrollFrame:Formula409(true) + SendMailScrollFrame:RemoveTextures(true) SendMailScrollFrame:SetFixedPanelTemplate("Inset") STYLE:ApplyScrollFrameStyle(SendMailScrollFrameScrollBar) SendMailNameEditBox:SetEditboxTemplate() @@ -73,8 +73,8 @@ local function MailBoxStyle() SendMailMoneyGold:SetEditboxTemplate() SendMailMoneySilver:SetEditboxTemplate() SendMailMoneyCopper:SetEditboxTemplate() - SendMailMoneyBg:MUNG() - SendMailMoneyInset:Formula409() + SendMailMoneyBg:Die() + SendMailMoneyInset:RemoveTextures() _G["SendMailMoneySilver"]:SetEditboxTemplate() _G["SendMailMoneySilver"].Panel:Point("TOPLEFT", -2, 1) @@ -88,41 +88,41 @@ local function MailBoxStyle() SendMailNameEditBox.Panel:Point("BOTTOMRIGHT", 2, 4) SendMailSubjectEditBox.Panel:Point("BOTTOMRIGHT", 2, 0) - SendMailFrame:Formula409() + SendMailFrame:RemoveTextures() hooksecurefunc("SendMailFrame_Update", MailFrame_OnUpdate) SendMailMailButton:SetButtonTemplate() SendMailCancelButton:SetButtonTemplate() - OpenMailFrame:Formula409(true) + OpenMailFrame:RemoveTextures(true) OpenMailFrame:SetFixedPanelTemplate("Transparent", true) - OpenMailFrameInset:MUNG() + OpenMailFrameInset:Die() STYLE:ApplyCloseButtonStyle(OpenMailFrameCloseButton) OpenMailReportSpamButton:SetButtonTemplate() OpenMailReplyButton:SetButtonTemplate() OpenMailDeleteButton:SetButtonTemplate() OpenMailCancelButton:SetButtonTemplate() - InboxFrame:Formula409() - MailFrameInset:MUNG() - OpenMailScrollFrame:Formula409(true) + 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:MUNG() - OpenMailLetterButton:Formula409() + OpenMailArithmeticLine:Die() + OpenMailLetterButton:RemoveTextures() OpenMailLetterButton:SetFixedPanelTemplate("Default") OpenMailLetterButton:SetButtonTemplate() OpenMailLetterButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) OpenMailLetterButtonIconTexture:FillInner() - OpenMailMoneyButton:Formula409() + 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:Formula409() + d:RemoveTextures() d:SetButtonTemplate() local e = _G["OpenMailAttachmentButton"..b.."IconTexture"] if e then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua index 7ce42d0..518b12f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,8 +21,8 @@ FRAME STYLER ########################################################## ]]-- local function MerchantStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.merchant ~= true then return end - MerchantFrame:Formula409(true) + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.merchant ~= true then return end + MerchantFrame:RemoveTextures(true) MerchantFrame:SetPanelTemplate("Halftone", false, nil, 2, 4) local level = MerchantFrame:GetFrameLevel() if(level > 0) then @@ -30,16 +30,16 @@ local function MerchantStyle() else MerchantFrame:SetFrameLevel(0) end - MerchantBuyBackItem:Formula409(true) + MerchantBuyBackItem:RemoveTextures(true) MerchantBuyBackItem:SetPanelTemplate("Inset", true, 2, 2, 3) MerchantBuyBackItem.Panel:SetFrameLevel(MerchantBuyBackItem.Panel:GetFrameLevel() + 1) - MerchantBuyBackItemItemButton:Formula409() + MerchantBuyBackItemItemButton:RemoveTextures() MerchantBuyBackItemItemButton:SetButtonTemplate() - MerchantExtraCurrencyInset:Formula409() - MerchantExtraCurrencyBg:Formula409() - MerchantFrameInset:Formula409() - MerchantMoneyBg:Formula409() - MerchantMoneyInset:Formula409() + MerchantExtraCurrencyInset:RemoveTextures() + MerchantExtraCurrencyBg:RemoveTextures() + MerchantFrameInset:RemoveTextures() + MerchantMoneyBg:RemoveTextures() + MerchantMoneyInset:RemoveTextures() MerchantFrameInset:SetPanelTemplate("Inset") MerchantFrameInset.Panel:SetFrameLevel(MerchantFrameInset.Panel:GetFrameLevel() + 1) STYLE:ApplyDropdownStyle(MerchantFrameLootFilter) @@ -49,9 +49,9 @@ local function MerchantStyle() for b = 1, 12 do local d = _G["MerchantItem"..b.."ItemButton"] local e = _G["MerchantItem"..b.."ItemButtonIconTexture"] - local o = _G["MerchantItem"..b]o:Formula409(true) + local o = _G["MerchantItem"..b]o:RemoveTextures(true) o:SetFixedPanelTemplate("Inset") - d:Formula409() + d:RemoveTextures() d:SetButtonTemplate() d:Point("TOPLEFT", o, "TOPLEFT", 4, -4) e:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -59,7 +59,7 @@ local function MerchantStyle() _G["MerchantItem"..b.."MoneyFrame"]:ClearAllPoints() _G["MerchantItem"..b.."MoneyFrame"]:Point("BOTTOMLEFT", d, "BOTTOMRIGHT", 3, 0) end - MerchantBuyBackItemItemButton:Formula409() + MerchantBuyBackItemItemButton:RemoveTextures() MerchantBuyBackItemItemButton:SetButtonTemplate() MerchantBuyBackItemItemButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) MerchantBuyBackItemItemButtonIconTexture:FillInner() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua index 15012ad..18d39cc 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -42,7 +42,7 @@ PETBATTLE STYLER ########################################################## ]]-- local function PetBattleStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.petbattleui ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.petbattleui ~= true then return end @@ -52,7 +52,7 @@ local function PetBattleStyle() local StandardFramesList = { PetBattleFrame.Ally2, PetBattleFrame.Ally3, PetBattleFrame.Enemy2, PetBattleFrame.Enemy3 } STYLE:ApplyCloseButtonStyle(FloatingBattlePetTooltip.CloseButton) - PetBattleFrame:Formula409() + PetBattleFrame:RemoveTextures() for i, frame in pairs(ActiveFramesList) do if(not frame.isStyled) then @@ -63,9 +63,9 @@ local function PetBattleStyle() frame.IconBackdrop:SetFrameLevel(frame:GetFrameLevel()-1) frame.IconBackdrop:WrapOuter(frame.Icon) frame.IconBackdrop:SetFixedPanelTemplate("Slot") - frame.BorderFlash:MUNG() - frame.HealthBarBG:MUNG() - frame.HealthBarFrame:MUNG() + frame.BorderFlash:Die() + frame.HealthBarBG:Die() + frame.HealthBarFrame:Die() frame.HealthBarBackdrop = CreateFrame("Frame", nil, frame) frame.HealthBarBackdrop:SetFrameLevel(frame:GetFrameLevel()-1) frame.HealthBarBackdrop:SetFixedPanelTemplate("Inset") @@ -171,7 +171,7 @@ local function PetBattleStyle() if(SuperDockBottomDataAnchor) then PetBattleActionBar:SetPoint("BOTTOM", SuperDockBottomDataAnchor, "TOP", 0, 4) else - PetBattleActionBar:SetPoint("BOTTOM", SuperVillain.UIParent, "BOTTOM", 0, 4) + PetBattleActionBar:SetPoint("BOTTOM", SV.UIParent, "BOTTOM", 0, 4) end PetBattleFrame.TopVersusText:ClearAllPoints() @@ -182,8 +182,8 @@ local function PetBattleStyle() PetBattleFrame.Enemy2:SetPoint("TOPLEFT", PetBattleFrame.Enemy2.iconPoint, "TOPRIGHT", 6, -2) PetBattleFrame.Enemy3:SetPoint('TOPLEFT', PetBattleFrame.Enemy2, 'TOPRIGHT', 8, 0) - BottomFrame:Formula409() - BottomFrame.TurnTimer:Formula409() + BottomFrame:RemoveTextures() + BottomFrame.TurnTimer:RemoveTextures() BottomFrame.TurnTimer.SkipButton:SetParent(PetBattleActionBar) BottomFrame.TurnTimer.SkipButton:SetButtonTemplate() BottomFrame.TurnTimer.SkipButton:Width(PBAB_WIDTH) @@ -191,19 +191,19 @@ local function PetBattleStyle() BottomFrame.TurnTimer.SkipButton:SetPoint("BOTTOM", PetBattleActionBar, "TOP", 0, -1) BottomFrame.TurnTimer:Size(BottomFrame.TurnTimer.SkipButton:GetWidth(), BottomFrame.TurnTimer.SkipButton:GetHeight()) BottomFrame.TurnTimer:ClearAllPoints() - BottomFrame.TurnTimer:SetPoint("TOP", SuperVillain.UIParent, "TOP", 0, -140) + BottomFrame.TurnTimer:SetPoint("TOP", SV.UIParent, "TOP", 0, -140) BottomFrame.TurnTimer.TimerText:SetPoint("CENTER") - BottomFrame.FlowFrame:Formula409() - BottomFrame.MicroButtonFrame:MUNG() - BottomFrame.Delimiter:Formula409() + BottomFrame.FlowFrame:RemoveTextures() + BottomFrame.MicroButtonFrame:Die() + BottomFrame.Delimiter:RemoveTextures() BottomFrame.xpBar:ClearAllPoints() BottomFrame.xpBar:SetParent(PetBattleActionBar) BottomFrame.xpBar:Width(PBAB_WIDTH - 2) BottomFrame.xpBar:SetPanelTemplate("Inset") BottomFrame.xpBar:SetPoint("BOTTOM", BottomFrame.TurnTimer.SkipButton, "TOP", 0, 1) BottomFrame.xpBar:SetScript("OnShow", function(self) - self:Formula409() - self:SetStatusBarTexture(SuperVillain.Media.bar.default) + self:RemoveTextures() + self:SetStatusBarTexture(SV.Media.bar.default) end) for i = 1, 3 do @@ -221,7 +221,7 @@ local function PetBattleStyle() pet.HealthText:SetAlpha(0) end - PetBattleQueueReadyFrame:Formula409() + PetBattleQueueReadyFrame:RemoveTextures() PetBattleQueueReadyFrame:SetBasicPanel() PetBattleQueueReadyFrame.AcceptButton:SetButtonTemplate() PetBattleQueueReadyFrame.DeclineButton:SetButtonTemplate() @@ -280,7 +280,7 @@ local function PetBattleStyle() else frame:SetBackdropBorderColor(1, 0, 0) end - frame.Duration:SetFont(SuperVillain.Media.font.numbers, 16, "OUTLINE") + 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 @@ -300,7 +300,7 @@ local function PetBattleStyle() self.Label:Hide() self.Duration:SetPoint("CENTER", self, 0, 8) self:ClearAllPoints() - self:SetPoint("TOP", SuperVillain.UIParent, 0, -15) + self:SetPoint("TOP", SV.UIParent, 0, -15) end end) @@ -352,7 +352,7 @@ local function PetBattleStyle() PetBattleButtonHelper(self.BottomFrame.ForfeitButton) end) - SuperVillain.SVTip:ReLoad() + SV.SVTip:ReLoad() end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua index eb1f076..5f58559 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,12 +21,12 @@ PETITIONFRAME STYLER ########################################################## ]]-- local function PetitionFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.petition ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.petition ~= true then return end - PetitionFrame:Formula409(true) + PetitionFrame:RemoveTextures(true) PetitionFrame:SetFixedPanelTemplate("Transparent", true) - PetitionFrameInset:MUNG() + PetitionFrameInset:Die() PetitionFrameSignButton:SetButtonTemplate() PetitionFrameRequestButton:SetButtonTemplate() PetitionFrameRenameButton:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua index 901947b..44fd2b5 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -87,7 +87,7 @@ FRAME STYLER ########################################################## ]]-- local function PetJournalStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.mounts ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.mounts ~= true then return end STYLE:ApplyWindowHolder(PetJournalParent) @@ -95,13 +95,13 @@ local function PetJournalStyle() STYLE:ApplyTabStyle(PetJournalParentTab1) STYLE:ApplyTabStyle(PetJournalParentTab2) STYLE:ApplyCloseButtonStyle(PetJournalParentCloseButton) - MountJournal:Formula409() - MountJournal.LeftInset:Formula409() - MountJournal.RightInset:Formula409() - MountJournal.MountDisplay:Formula409() - MountJournal.MountDisplay.ShadowOverlay:Formula409() - MountJournal.MountCount:Formula409() - MountJournalListScrollFrame:Formula409() + 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) @@ -119,24 +119,24 @@ local function PetJournalStyle() hooksecurefunc("MountJournal_UpdateMountList", PetJournal_UpdateMounts) MountJournalListScrollFrame:HookScript("OnVerticalScroll", PetJournal_UpdateMounts) MountJournalListScrollFrame:HookScript("OnMouseWheel", PetJournal_UpdateMounts) - PetJournalSummonButton:Formula409() - PetJournalFindBattle:Formula409() + PetJournalSummonButton:RemoveTextures() + PetJournalFindBattle:RemoveTextures() PetJournalSummonButton:SetButtonTemplate() PetJournalFindBattle:SetButtonTemplate() - PetJournalRightInset:Formula409() - PetJournalLeftInset:Formula409() + PetJournalRightInset:RemoveTextures() + PetJournalLeftInset:RemoveTextures() for i = 1, 3 do local button = _G["PetJournalLoadoutPet" .. i .. "HelpFrame"] - button:Formula409() + button:RemoveTextures() end - PetJournalTutorialButton:MUNG() - PetJournal.PetCount:Formula409() + PetJournalTutorialButton:Die() + PetJournal.PetCount:RemoveTextures() PetJournalSearchBox:SetEditboxTemplate() - PetJournalFilterButton:Formula409(true) + PetJournalFilterButton:RemoveTextures(true) PetJournalFilterButton:SetButtonTemplate() - PetJournalListScrollFrame:Formula409() + PetJournalListScrollFrame:RemoveTextures() STYLE:ApplyScrollFrameStyle(PetJournalListScrollFrameScrollBar) for i = 1, #PetJournal.listScroll.buttons do @@ -163,22 +163,22 @@ local function PetJournalStyle() PetJournalAchievementStatus:DisableDrawLayer('BACKGROUND') STYLE:ApplyItemButtonStyle(PetJournalHealPetButton, true) PetJournalHealPetButton.texture:SetTexture([[Interface\Icons\spell_magic_polymorphrabbit]]) - PetJournalLoadoutBorder:Formula409() + PetJournalLoadoutBorder:RemoveTextures() for b = 1, 3 do local pjPet = _G['PetJournalLoadoutPet'..b] - pjPet:Formula409() + 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:Formula409() - _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:Formula409() + pjPet.setButton:RemoveTextures() + _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:RemoveTextures() _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:SetPanelTemplate('Default') - _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:SetStatusBarTexture(SuperVillain.Media.bar.default) - _G['PetJournalLoadoutPet'..b..'XPBar']:Formula409() + _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) @@ -192,7 +192,7 @@ local function PetJournalStyle() end end - PetJournalSpellSelect:Formula409() + PetJournalSpellSelect:RemoveTextures() for b = 1, 2 do local Q = _G['PetJournalSpellSelectSpell'..b] @@ -201,9 +201,9 @@ local function PetJournalStyle() _G['PetJournalSpellSelectSpell'..b..'Icon']:SetDrawLayer('BORDER') end - PetJournalPetCard:Formula409() + PetJournalPetCard:RemoveTextures() STYLE:ApplyItemButtonStyle(PetJournalPetCard, nil, nil, true) - PetJournalPetCardInset:Formula409() + PetJournalPetCardInset:RemoveTextures() PetJournalPetCardPetInfo.levelBG:SetAlpha(0) PetJournalPetCardPetInfoIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) STYLE:ApplyItemButtonStyle(PetJournalPetCardPetInfo, nil, true, true) @@ -215,19 +215,19 @@ local function PetJournalStyle() PetJournalPetCardPetInfo.Panel:WrapOuter(PetJournalPetCardPetInfoIcon) PetJournalPetCardPetInfoIcon:SetParent(PetJournalPetCardPetInfo.Panel) PetJournalPetCardPetInfo.level:SetParent(PetJournalPetCardPetInfo.Panel) - local R = PetJournalPrimaryAbilityTooltip;R.Background:SetTexture("") + local R = PetJournalPrimaryAbilityTooltip;R.Background:SetTexture(0,0,0,0) if R.Delimiter1 then - R.Delimiter1:SetTexture("") - R.Delimiter2:SetTexture("") + R.Delimiter1:SetTexture(0,0,0,0) + R.Delimiter2:SetTexture(0,0,0,0) end - R.BorderTop:SetTexture("") - R.BorderTopLeft:SetTexture("") - R.BorderTopRight:SetTexture("") - R.BorderLeft:SetTexture("") - R.BorderRight:SetTexture("") - R.BorderBottom:SetTexture("") - R.BorderBottomRight:SetTexture("") - R.BorderBottomLeft:SetTexture("") + 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] @@ -238,10 +238,10 @@ local function PetJournalStyle() S.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) S.icon:FillInner(S.Panel) end - PetJournalPetCardHealthFrame.healthBar:Formula409() + PetJournalPetCardHealthFrame.healthBar:RemoveTextures() PetJournalPetCardHealthFrame.healthBar:SetPanelTemplate('Default') PetJournalPetCardHealthFrame.healthBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - PetJournalPetCardXPBar:Formula409() + PetJournalPetCardXPBar:RemoveTextures() PetJournalPetCardXPBar:SetPanelTemplate('Default') PetJournalPetCardXPBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua index 323e777..d31a85c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,11 +21,11 @@ PETSTABLE STYLER ########################################################## ]]-- local function PetStableStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.stable ~= true then return end - PetStableFrame:Formula409() - PetStableFrameInset:Formula409() - PetStableLeftInset:Formula409() - PetStableBottomInset:Formula409() + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.stable ~= true then return end + PetStableFrame:RemoveTextures() + PetStableFrameInset:RemoveTextures() + PetStableLeftInset:RemoveTextures() + PetStableBottomInset:RemoveTextures() PetStableFrame:SetPanelTemplate("Halftone") PetStableFrameInset:SetFixedPanelTemplate('Inset') STYLE:ApplyCloseButtonStyle(PetStableFrameCloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua index c212f9f..bbbc016 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -23,13 +23,13 @@ PVP STYLER -- LoadAddOn("Blizzard_PVPUI") local function PVPFrameStyle() - if (SuperVillain.db.SVStyle and (SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.pvp ~= true)) then + if (SV.db.SVStyle and (SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.pvp ~= true)) then return end STYLE:ApplyWindowHolder(PVPUIFrame, true) - PVPUIFrame.Shadows:Formula409() + PVPUIFrame.Shadows:RemoveTextures() STYLE:ApplyCloseButtonStyle(PVPUIFrameCloseButton) @@ -40,8 +40,8 @@ local function PVPFrameStyle() for i = 1, 3 do local btn = _G["PVPQueueFrameCategoryButton"..i] if(btn) then - btn.Background:MUNG() - btn.Ring:MUNG() + btn.Background:Die() + btn.Ring:Die() btn:SetButtonTemplate() btn.Icon:Size(45) btn.Icon:SetTexCoord(.15, .85, .15, .85) @@ -51,28 +51,28 @@ local function PVPFrameStyle() end STYLE:ApplyDropdownStyle(HonorFrameTypeDropDown) - HonorFrame.Inset:Formula409() + HonorFrame.Inset:RemoveTextures() HonorFrame.Inset:SetFixedPanelTemplate("Inset") STYLE:ApplyScrollFrameStyle(HonorFrameSpecificFrameScrollBar) - HonorFrameSoloQueueButton:Formula409() - HonorFrameGroupQueueButton:Formula409() + HonorFrameSoloQueueButton:RemoveTextures() + HonorFrameGroupQueueButton:RemoveTextures() HonorFrameSoloQueueButton:SetButtonTemplate() HonorFrameGroupQueueButton:SetButtonTemplate() - HonorFrame.BonusFrame:Formula409() - HonorFrame.BonusFrame.ShadowOverlay:Formula409() - HonorFrame.BonusFrame.RandomBGButton:Formula409() + 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) - HonorFrame.BonusFrame.CallToArmsButton:Formula409() + 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) HonorFrame.BonusFrame.DiceButton:DisableDrawLayer("ARTWORK") HonorFrame.BonusFrame.DiceButton:SetHighlightTexture("") - HonorFrame.RoleInset:Formula409() + HonorFrame.RoleInset:RemoveTextures() HonorFrame.RoleInset.DPSIcon.checkButton:SetCheckboxTemplate(true) HonorFrame.RoleInset.TankIcon.checkButton:SetCheckboxTemplate(true) HonorFrame.RoleInset.HealerIcon.checkButton:SetCheckboxTemplate(true) @@ -89,41 +89,41 @@ local function PVPFrameStyle() end) for g = 1, 2 do local I = HonorFrame.BonusFrame["WorldPVP"..g.."Button"] - I:Formula409() + I:RemoveTextures() I:SetFixedPanelTemplate("Button", true) I:SetButtonTemplate() I.SelectedTexture:FillInner() I.SelectedTexture:SetTexture(1, 1, 0, 0.1) end - ConquestFrame.Inset:Formula409() - ConquestPointsBarLeft:MUNG() - ConquestPointsBarRight:MUNG() - ConquestPointsBarMiddle:MUNG() - ConquestPointsBarBG:MUNG() - ConquestPointsBarShadow:MUNG() + 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:Formula409() - ConquestFrame.ShadowOverlay:Formula409() - ConquestJoinButton:Formula409() + ConquestFrame:RemoveTextures() + ConquestFrame.ShadowOverlay:RemoveTextures() + ConquestJoinButton:RemoveTextures() ConquestJoinButton:SetButtonTemplate() - ConquestFrame.RatedBG:Formula409() + ConquestFrame.RatedBG:RemoveTextures() ConquestFrame.RatedBG:SetFixedPanelTemplate("Inset") ConquestFrame.RatedBG:SetButtonTemplate() ConquestFrame.RatedBG.SelectedTexture:FillInner() ConquestFrame.RatedBG.SelectedTexture:SetTexture(1, 1, 0, 0.1) - WarGamesFrame:Formula409() - WarGamesFrame.RightInset:Formula409() - WarGamesFrameInfoScrollFrame:Formula409() - WarGamesFrameInfoScrollFrameScrollBar:Formula409() - WarGameStartButton:Formula409() + WarGamesFrame:RemoveTextures() + WarGamesFrame.RightInset:RemoveTextures() + WarGamesFrameInfoScrollFrame:RemoveTextures() + WarGamesFrameInfoScrollFrameScrollBar:RemoveTextures() + WarGameStartButton:RemoveTextures() WarGameStartButton:SetButtonTemplate() STYLE:ApplyScrollFrameStyle(WarGamesFrameScrollFrameScrollBar) STYLE:ApplyScrollFrameStyle(WarGamesFrameInfoScrollFrameScrollBar) - WarGamesFrame.HorizontalBar:Formula409() - PVPUIFrame.LeftInset:Formula409() - PVPReadyDialog:Formula409() + WarGamesFrame.HorizontalBar:RemoveTextures() + PVPUIFrame.LeftInset:RemoveTextures() + PVPReadyDialog:RemoveTextures() PVPReadyDialog:SetPanelTemplate("Pattern") PVPReadyDialogEnterBattleButton:SetButtonTemplate() PVPReadyDialogLeaveQueueButton:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua index 2b77481..c4779e4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua @@ -15,7 +15,7 @@ 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 SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -55,7 +55,7 @@ local function QueuedWatchFrameItems() _G["WatchFrameItem"..i.."NormalTexture"]:SetAlpha(0) _G["WatchFrameItem"..i.."IconTexture"]:FillInner() _G["WatchFrameItem"..i.."IconTexture"]:SetTexCoord(0.1,0.9,0.1,0.9) - SuperVillain:AddCD(_G["WatchFrameItem"..i.."Cooldown"]) + SV:AddCD(_G["WatchFrameItem"..i.."Cooldown"]) button.styled = true end end @@ -104,36 +104,36 @@ QUEST STYLERS ########################################################## ]]-- local function QuestGreetingStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.greeting ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.greeting ~= true then return end QuestFrameGreetingPanel:HookScript("OnShow", function() - QuestFrameGreetingPanel:Formula409() + QuestFrameGreetingPanel:RemoveTextures() QuestFrameGreetingGoodbyeButton:SetButtonTemplate() - QuestGreetingFrameHorizontalBreak:MUNG() + QuestGreetingFrameHorizontalBreak:Die() end) end local function QuestFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.quest ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.quest ~= true then return end STYLE:ApplyWindowHolder(QuestFrame, true, true) --[[ THIS SECTION NOT WORKING IN WOD ]]-- - if(SuperVillain.___interface < 60000) then - QuestLogScrollFrame:Formula409() - QuestLogCount:Formula409() - EmptyQuestLogFrame:Formula409() - QuestProgressScrollFrame:Formula409() - QuestLogFrameShowMapButton:Formula409() - QuestLogFrameCompleteButton:Formula409() + if(SV.___interface < 60000) then + QuestLogScrollFrame:RemoveTextures() + QuestLogCount:RemoveTextures() + EmptyQuestLogFrame:RemoveTextures() + QuestProgressScrollFrame:RemoveTextures() + QuestLogFrameShowMapButton:RemoveTextures() + QuestLogFrameCompleteButton:RemoveTextures() STYLE:ApplyWindowHolder(QuestLogFrame) QuestLogCount:SetFixedPanelTemplate("Default") - QuestLogDetailFrameInset:MUNG() - QuestLogFrameInset:MUNG() + QuestLogDetailFrameInset:Die() + QuestLogFrameInset:Die() QuestLogFrameShowMapButton:SetButtonTemplate() QuestLogFrameShowMapButton.text:ClearAllPoints() @@ -178,14 +178,14 @@ local function QuestFrameStyle() STYLE:ApplyScrollFrameStyle(QuestProgressScrollFrameScrollBar) STYLE:ApplyScrollFrameStyle(QuestRewardScrollFrameScrollBar) - QuestGreetingScrollFrame:Formula409() + 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:Formula409() + item:RemoveTextures() item:Width(item:GetWidth() - 4) item:SetFrameLevel(cLvl) @@ -200,7 +200,7 @@ local function QuestFrameStyle() end end - QuestInfoSkillPointFrame:Formula409() + QuestInfoSkillPointFrame:RemoveTextures() QuestInfoSkillPointFrame:Width(QuestInfoSkillPointFrame:GetWidth() - 4) local curLvl = QuestInfoSkillPointFrame:GetFrameLevel() + 1 @@ -212,7 +212,7 @@ local function QuestFrameStyle() QuestInfoSkillPointFrameIconTexture:Point("TOPLEFT", 2, -2) QuestInfoSkillPointFrameIconTexture:Size(QuestInfoSkillPointFrameIconTexture:GetWidth()-2, QuestInfoSkillPointFrameIconTexture:GetHeight()-2) QuestInfoSkillPointFrameCount:SetDrawLayer("OVERLAY") - QuestInfoItemHighlight:Formula409() + QuestInfoItemHighlight:RemoveTextures() QuestInfoItemHighlight:SetFixedPanelTemplate("Slot") QuestInfoItemHighlight:SetBackdropBorderColor(1, 1, 0) QuestInfoItemHighlight:SetBackdropColor(0, 0, 0, 0) @@ -223,19 +223,19 @@ local function QuestFrameStyle() QuestRewardScrollFrame:HookScript("OnShow", QuestRewardScrollFrame_OnShow) - QuestFrameInset:MUNG() - QuestFrameDetailPanel:Formula409(true) - QuestDetailScrollFrame:Formula409(true) + 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:Formula409(true) - QuestRewardScrollFrame:Formula409(true) - QuestRewardScrollChildFrame:Formula409(true) - QuestFrameProgressPanel:Formula409(true) - QuestFrameRewardPanel:Formula409(true) + QuestDetailScrollChildFrame:RemoveTextures(true) + QuestRewardScrollFrame:RemoveTextures(true) + QuestRewardScrollChildFrame:RemoveTextures(true) + QuestFrameProgressPanel:RemoveTextures(true) + QuestFrameRewardPanel:RemoveTextures(true) QuestFrameAcceptButton:SetButtonTemplate() QuestFrameDeclineButton:SetButtonTemplate() @@ -248,7 +248,7 @@ local function QuestFrameStyle() for j = 1, 6 do local i = _G["QuestProgressItem"..j] local texture = _G["QuestProgressItem"..j.."IconTexture"] - i:Formula409() + i:RemoveTextures() i:SetFixedPanelTemplate("Inset") i:Width(_G["QuestProgressItem"..j]:GetWidth() - 4) texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -258,10 +258,10 @@ local function QuestFrameStyle() _G["QuestProgressItem"..j.."Count"]:SetDrawLayer("OVERLAY") end - QuestNPCModel:Formula409() + QuestNPCModel:RemoveTextures() QuestNPCModel:SetPanelTemplate("Comic") - QuestNPCModelTextFrame:Formula409() + QuestNPCModelTextFrame:RemoveTextures() QuestNPCModelTextFrame:SetPanelTemplate("Default") QuestNPCModelTextFrame.Panel:Point("TOPLEFT", QuestNPCModel.Panel, "BOTTOMLEFT", 0, -2) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua index 31c3347..92964a8 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -45,38 +45,38 @@ RAID STYLERS ]]-- local function RaidUIStyle() if InCombatLockdown() then return end - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.raid ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.raid ~= true then return end for _,group in pairs(RaidGroupList)do if not _G[group] then print(group) end if _G[group] then - _G[group]:Formula409() + _G[group]:RemoveTextures() end end for e = 1, 8 do for f = 1, 5 do - _G["RaidGroup"..e.."Slot"..f]:Formula409() + _G["RaidGroup"..e.."Slot"..f]:RemoveTextures() _G["RaidGroup"..e.."Slot"..f]:SetFixedPanelTemplate("Transparent", true) end end end local function RaidInfoStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.nonraid ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.nonraid ~= true then return end - _G["RaidInfoFrame"]:Formula409() - _G["RaidInfoInstanceLabel"]:Formula409() - _G["RaidInfoIDLabel"]:Formula409() - _G["RaidInfoScrollFrameScrollBarBG"]:MUNG() - _G["RaidInfoScrollFrameScrollBarTop"]:MUNG() - _G["RaidInfoScrollFrameScrollBarBottom"]:MUNG() - _G["RaidInfoScrollFrameScrollBarMiddle"]:MUNG() + _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:Formula409() + RaidInfoScrollFrame:RemoveTextures() RaidInfoFrame:SetBasicPanel() RaidInfoFrame.Panel:Point("TOPLEFT", RaidInfoFrame, "TOPLEFT") RaidInfoFrame.Panel:Point("BOTTOMRIGHT", RaidInfoFrame, "BOTTOMRIGHT") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua index d3307d5..25549e7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,22 +21,22 @@ REFORGING STYLER ########################################################## ]]-- local function ReforgingStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.reforge ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.reforge ~= true then return end STYLE:ApplyWindowHolder(ReforgingFrame, true) - ReforgingFrame.ButtonFrame:Formula409() + ReforgingFrame.ButtonFrame:RemoveTextures() ReforgingFrameReforgeButton:ClearAllPoints() ReforgingFrameReforgeButton:Point("LEFT", ReforgingFrameRestoreButton, "RIGHT", 2, 0) ReforgingFrameReforgeButton:Point("BOTTOMRIGHT", -3, 3) ReforgingFrame.RestoreMessage:SetTextColor(1, 1, 1) - ReforgingFrameRestoreButton:Formula409() - ReforgingFrameReforgeButton:Formula409() + ReforgingFrameRestoreButton:RemoveTextures() + ReforgingFrameReforgeButton:RemoveTextures() ReforgingFrameRestoreButton:SetButtonTemplate() ReforgingFrameReforgeButton:SetButtonTemplate() - ReforgingFrame.ItemButton:Formula409() + ReforgingFrame.ItemButton:RemoveTextures() ReforgingFrame.ItemButton:SetSlotTemplate(true) ReforgingFrame.ItemButton.IconTexture:FillInner() hooksecurefunc("ReforgingFrame_Update", function(k) @@ -44,7 +44,7 @@ local function ReforgingStyle() if x then ReforgingFrame.ItemButton.IconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) else - ReforgingFrame.ItemButton.IconTexture:SetTexture("") + ReforgingFrame.ItemButton.IconTexture:SetTexture(0,0,0,0) end end) STYLE:ApplyCloseButtonStyle(ReforgingFrameCloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua index 7943ba9..7b78d2b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain --[[ ########################################################## @@ -64,8 +64,8 @@ HELPERS ########################################################## ]]-- local function Tab_OnEnter(this) - this.backdrop:SetBackdropColor(unpack(SuperVillain.Media.color.highlight)) - this.backdrop:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) + this.backdrop:SetBackdropColor(unpack(SV.Media.color.highlight)) + this.backdrop:SetBackdropBorderColor(unpack(SV.Media.color.highlight)) end local function Tab_OnLeave(this) @@ -74,7 +74,7 @@ local function Tab_OnLeave(this) end local function ChangeTabHelper(this) - this:Formula409() + this:RemoveTextures() local nTex = this:GetNormalTexture() if(nTex) then nTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -145,7 +145,7 @@ local function AbilityButtonHelper(j) local N = select(j, i:GetRegions()) if N:GetObjectType() == "Texture"then if N:GetTexture() ~= "Interface\\Buttons\\ActionBarFlyoutButton" then - N:SetTexture("") + N:SetTexture(0,0,0,0) end end end @@ -181,7 +181,7 @@ local function ButtonUpdateHelper(k, M) local N = select(j, i:GetRegions()) if N:GetObjectType() == "Texture"then if N ~= i.FlyoutArrow then - N:SetTexture("") + N:SetTexture(0,0,0,0) end end end @@ -212,7 +212,7 @@ SPELLBOOK STYLER ########################################################## ]]-- local function SpellBookStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.spellbook ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.spellbook ~= true then return end STYLE:ApplyWindowHolder(SpellBookFrame) STYLE:ApplyCloseButtonStyle(SpellBookFrameCloseButton) @@ -220,11 +220,11 @@ local function SpellBookStyle() for _, gName in pairs(bookFrames) do local frame = _G[gName] if(frame) then - frame:Formula409() + frame:RemoveTextures() end end - _G["SpellBookFrameTutorialButton"]:MUNG() + _G["SpellBookFrameTutorialButton"]:Die() for i = 1, 2 do local frame = _G[("SpellBookPage%d"):format(i)] @@ -245,7 +245,7 @@ local function SpellBookStyle() local tabName = ("SpellBookSkillLineTab%d"):format(i) local tab = _G[tabName] local tabFlash = _G[("%sFlash"):format(tabName)] - if(tabFlash) then tabFlash:MUNG() end + if(tabFlash) then tabFlash:Die() end if(tab) then ChangeTabHelper(tab) end end @@ -263,7 +263,7 @@ local function SpellBookStyle() local button = _G[gName] local buttonTex = _G[("%sIconTexture"):format(gName)] if(button) then - button:Formula409() + button:RemoveTextures() if(buttonTex) then buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) buttonTex:FillInner() @@ -279,7 +279,7 @@ local function SpellBookStyle() for _, gName in pairs(proBars) do local bar = _G[gName] if(bar) then - bar:Formula409() + bar:RemoveTextures() bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) bar:SetStatusBarColor(0, 220/255, 0) bar:SetPanelTemplate("Default") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua index c7fb48f..7592316 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,7 +21,7 @@ TAXIFRAME STYLER ########################################################## ]]-- local function StoreStyle() - -- if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.store ~= true then + -- if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.store ~= true then -- return -- end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua index ebba7ee..95cf1db 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -40,7 +40,7 @@ local ProxyType = { } local function Widget_OnEnter(b) - b:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) + b:SetBackdropBorderColor(unpack(SV.Media.color.highlight)) end local function Widget_OnLeave(b) @@ -59,7 +59,7 @@ local function Widget_ButtonStyle(frame, strip, bypass) 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:Formula409() 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) @@ -69,7 +69,7 @@ local function Widget_PaginationStyle(...) STYLE:ApplyPaginationStyle(...) end -local NOOP = SuperVillain.fubar +local NOOP = SV.fubar local WidgetButton_OnClick = function(self) local obj = self.obj; @@ -117,8 +117,8 @@ local function StyleAceGUI(event, addon) widget.scrollFrame:SetPoint("BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8) elseif(widgetType == "CheckBox") then - widget.checkbg:MUNG() - widget.highlight:MUNG() + widget.checkbg:Die() + widget.highlight:Die() if not widget.styledCheckBG then widget.styledCheckBG = CreateFrame("Frame", nil, widget.frame) widget.styledCheckBG:FillInner(widget.check) @@ -130,7 +130,7 @@ local function StyleAceGUI(event, addon) local widgetDropdown = widget.dropdown; local widgetButton = widget.button; - widgetDropdown:Formula409() + widgetDropdown:RemoveTextures() widgetButton:ClearAllPoints() widgetButton:Point("RIGHT", widgetDropdown, "RIGHT", -20, 0) widgetButton:SetFrameLevel(widgetButton:GetFrameLevel() + 1) @@ -151,15 +151,15 @@ local function StyleAceGUI(event, addon) local boxName = widgetEditbox:GetName() if(_G[boxName.."Left"]) then - _G[boxName.."Left"]:MUNG() + _G[boxName.."Left"]:Die() end if(_G[boxName.."Middle"]) then - _G[boxName.."Middle"]:MUNG() + _G[boxName.."Middle"]:Die() end if(_G[boxName.."Right"]) then - _G[boxName.."Right"]:MUNG() + _G[boxName.."Right"]:Die() end widgetEditbox:Height(17) @@ -171,7 +171,7 @@ local function StyleAceGUI(event, addon) Widget_ButtonStyle(widgetFrame, nil, true) if(not widgetFrame.Panel) then - widgetFrame:Formula409() + widgetFrame:RemoveTextures() widgetFrame:SetFixedPanelTemplate("Button", true) end widget.text:SetParent(widgetFrame.Panel) @@ -181,7 +181,7 @@ local function StyleAceGUI(event, addon) local widgetEditbox = widget.editbox; if(not widgetSlider.Panel) then - widgetSlider:Formula409() + widgetSlider:RemoveTextures() widgetSlider:SetFixedPanelTemplate("Bar") end @@ -203,7 +203,7 @@ local function StyleAceGUI(event, addon) local widgetFrame = widget.frame; local dropButton = widgetFrame.dropButton; - widgetFrame:Formula409() + widgetFrame:RemoveTextures() Widget_PaginationStyle(dropButton, true) widgetFrame.text:ClearAllPoints() widgetFrame.text:Point("RIGHT", dropButton, "LEFT", -2, 0) @@ -243,13 +243,13 @@ local function StyleAceGUI(event, addon) widgetParent:SetPanelTemplate("Halftone") elseif(ProxyType[widgetType]) then if widgetType == "Frame" then - widgetParent:Formula409() + 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:Formula409() + childFrame:RemoveTextures() end end end @@ -260,7 +260,7 @@ local function StyleAceGUI(event, addon) local oldFunc = widget.CreateButton; widget.CreateButton = function(self) local newButton = oldFunc(self) - newButton.toggle:Formula409() + newButton.toggle:RemoveTextures() newButton.toggle.SetNormalTexture = NOOP; newButton.toggle.SetPushedTexture = NOOP; newButton.toggle:SetButtonTemplate() @@ -284,7 +284,7 @@ local function StyleAceGUI(event, addon) local oldFunc = widget.CreateTab; widget.CreateTab = function(self, arg) local newTab = oldFunc(self, arg) - newTab:Formula409() + newTab:RemoveTextures() return newTab end end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua index 82e4e36..9d9fcca 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; local ceil = math.ceil --[[ @@ -392,14 +392,14 @@ SYSTEM WIDGET STYLERS ########################################################## ]]-- local function SystemPanelQue() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.misc ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.misc ~= true then return end - QueueStatusFrame:Formula409() + QueueStatusFrame:RemoveTextures() for i = 1, #SystemPopList do local this = _G[SystemPopList[i]] if(this) then - this:Formula409() + this:RemoveTextures() STYLE:ApplyAlertStyle(this) this:SetBackdropColor(0.8, 0.2, 0.2) end @@ -407,7 +407,7 @@ local function SystemPanelQue() for i = 1, #SystemDropDownList do local this = _G[SystemDropDownList[i]] if(this) then - this:Formula409() + this:RemoveTextures() this:SetPanelTemplate("FramedTop") end end @@ -418,7 +418,7 @@ local function SystemPanelQue() end end - LFDRoleCheckPopup:Formula409() + LFDRoleCheckPopup:RemoveTextures() LFDRoleCheckPopup:SetFixedPanelTemplate() LFDRoleCheckPopupAcceptButton:SetButtonTemplate() LFDRoleCheckPopupDeclineButton:SetButtonTemplate() @@ -437,8 +437,8 @@ local function SystemPanelQue() _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"]:MUNG() - _G["StaticPopup"..i.."ItemFrame"]:GetNormalTexture():MUNG() + _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 ) @@ -461,9 +461,9 @@ local function SystemPanelQue() hooksecurefunc(GhostFrame, "SetBackdropColor", forceBackdropColor) hooksecurefunc(GhostFrame, "SetBackdropBorderColor", forceBackdropColor) GhostFrame:ClearAllPoints() - GhostFrame:SetPoint("TOP", SuperVillain.UIParent, "TOP", 0, -150) + GhostFrame:SetPoint("TOP", SV.UIParent, "TOP", 0, -150) GhostFrameContentsFrame:SetButtonTemplate() - GhostFrameContentsFrameIcon:SetTexture("") + GhostFrameContentsFrameIcon:SetTexture(0,0,0,0) local x = CreateFrame("Frame", nil, GhostFrame) x:SetFrameStrata("MEDIUM") x:SetFixedPanelTemplate("Default") @@ -476,7 +476,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList5 do local this = _G[SystemFrameList5[i].."Header"] if(this) then - this:SetTexture("") + this:SetTexture(0,0,0,0) this:ClearAllPoints() if this == _G["GameMenuFrameHeader"] then this:SetPoint("TOP", GameMenuFrame, 0, 7) @@ -525,7 +525,7 @@ local function SystemPanelQue() end) if IsMacClient() then MacOptionsFrame:SetFixedPanelTemplate("Default") - MacOptionsFrameHeader:SetTexture("") + MacOptionsFrameHeader:SetTexture(0,0,0,0) MacOptionsFrameHeader:ClearAllPoints() MacOptionsFrameHeader:SetPoint("TOP", MacOptionsFrame, 0, 0) MacOptionsFrameMovieRecording:SetFixedPanelTemplate("Default") @@ -555,7 +555,7 @@ local function SystemPanelQue() MacOptionsFrameDefaults:SetWidth(96) MacOptionsFrameDefaults:SetHeight(22) end - OpacityFrame:Formula409() + OpacityFrame:RemoveTextures() OpacityFrame:SetFixedPanelTemplate("Transparent", true) hooksecurefunc("UIDropDownMenu_InitializeHelper", function(self) @@ -568,9 +568,9 @@ local function SystemPanelQue() end end) - GuildInviteFrame:Formula409() + GuildInviteFrame:RemoveTextures() GuildInviteFrame:SetFixedPanelTemplate('Transparent') - GuildInviteFrameLevel:Formula409() + GuildInviteFrameLevel:RemoveTextures() GuildInviteFrameLevel:ClearAllPoints() GuildInviteFrameLevel:SetPoint('TOP', GuildInviteFrame, 'CENTER', -15, -25) GuildInviteFrameJoinButton:SetButtonTemplate() @@ -580,8 +580,8 @@ local function SystemPanelQue() GuildInviteFrame:Height(225) end) - GuildInviteFrameWarningText:MUNG() - BattleTagInviteFrame:Formula409() + GuildInviteFrameWarningText:Die() + BattleTagInviteFrame:RemoveTextures() BattleTagInviteFrame:SetFixedPanelTemplate('Transparent') --BattleTagInviteFrameScrollFrame:SetEditboxTemplate() @@ -595,7 +595,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList13 do local frame = _G[SystemFrameList13[i]] if(frame) then - frame:Formula409() + frame:RemoveTextures() frame:SetBasicPanel() end end @@ -603,7 +603,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList14 do local this = _G[SystemFrameList14[i]] if(this) then - this:Formula409() + this:RemoveTextures() STYLE:ApplyTabStyle(this) end end @@ -667,18 +667,18 @@ local function SystemPanelQue() end end Graphics_RightQuality:SetBackdrop(nil) - Graphics_RightQuality:MUNG() + Graphics_RightQuality:Die() - MacOptionsFrame:Formula409() + MacOptionsFrame:RemoveTextures() MacOptionsFrame:SetFixedPanelTemplate() MacOptionsButtonCompress:SetButtonTemplate() MacOptionsButtonKeybindings:SetButtonTemplate() MacOptionsFrameDefaults:SetButtonTemplate() MacOptionsFrameOkay:SetButtonTemplate() MacOptionsFrameCancel:SetButtonTemplate() - MacOptionsFrameMovieRecording:Formula409() - MacOptionsITunesRemote:Formula409() - MacOptionsFrameMisc:Formula409() + MacOptionsFrameMovieRecording:RemoveTextures() + MacOptionsITunesRemote:RemoveTextures() + MacOptionsFrameMisc:RemoveTextures() STYLE:ApplyDropdownStyle(MacOptionsFrameResolutionDropDown) STYLE:ApplyDropdownStyle(MacOptionsFrameFramerateDropDown) STYLE:ApplyDropdownStyle(MacOptionsFrameCodecDropDown) @@ -696,20 +696,20 @@ local function SystemPanelQue() MacOptionsFrameCancel:ClearAllPoints() MacOptionsFrameCancel:SetPoint("LEFT", MacOptionsFrameOkay, "RIGHT", 2, 0) MacOptionsFrameCancel:SetWidth(MacOptionsFrameCancel:GetWidth() - 6) - ReportCheatingDialog:Formula409() - ReportCheatingDialogCommentFrame:Formula409() + ReportCheatingDialog:RemoveTextures() + ReportCheatingDialogCommentFrame:RemoveTextures() ReportCheatingDialogReportButton:SetButtonTemplate() ReportCheatingDialogCancelButton:SetButtonTemplate() ReportCheatingDialog:SetFixedPanelTemplate("Transparent", true) ReportCheatingDialogCommentFrameEditBox:SetEditboxTemplate() - ReportPlayerNameDialog:Formula409() - ReportPlayerNameDialogCommentFrame:Formula409() + ReportPlayerNameDialog:RemoveTextures() + ReportPlayerNameDialogCommentFrame:RemoveTextures() ReportPlayerNameDialogCommentFrameEditBox:SetEditboxTemplate() ReportPlayerNameDialog:SetFixedPanelTemplate("Transparent", true) ReportPlayerNameDialogReportButton:SetButtonTemplate() ReportPlayerNameDialogCancelButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(SideDressUpModelCloseButton) - SideDressUpFrame:Formula409() + SideDressUpFrame:RemoveTextures() SideDressUpFrame.BGTopLeft:Hide() SideDressUpFrame.BGBottomLeft:Hide() SideDressUpModelResetButton:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua index 28bcd65..38d0113 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -27,13 +27,13 @@ local function cleanT(a,b) 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:MUNG() + d:Die() elseif d:GetDrawLayer()==b then - d:SetTexture("") + d:SetTexture(0,0,0,0) elseif b and type(b)=='string'and d:GetTexture()~=b then - d:SetTexture("") + d:SetTexture(0,0,0,0) else - d:SetTexture("") + d:SetTexture(0,0,0,0) end end end @@ -44,7 +44,7 @@ TABARDFRAME STYLER ########################################################## ]]-- local function TabardFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.tabard ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.tabard ~= true then return end cleanT(TabardFrame, true) @@ -53,13 +53,13 @@ local function TabardFrameStyle() TabardFrameCancelButton:SetButtonTemplate() TabardFrameAcceptButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(TabardFrameCloseButton) - TabardFrameCostFrame:Formula409() - TabardFrameCustomizationFrame:Formula409() - TabardFrameInset:MUNG() - TabardFrameMoneyInset:MUNG() - TabardFrameMoneyBg:Formula409() + TabardFrameCostFrame:RemoveTextures() + TabardFrameCustomizationFrame:RemoveTextures() + TabardFrameInset:Die() + TabardFrameMoneyInset:Die() + TabardFrameMoneyBg:RemoveTextures() for b = 1, 5 do - local c = "TabardFrameCustomization"..b;_G[c]:Formula409() + local c = "TabardFrameCustomization"..b;_G[c]:RemoveTextures() STYLE:ApplyPaginationStyle(_G[c.."LeftButton"]) STYLE:ApplyPaginationStyle(_G[c.."RightButton"]) if b>1 then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua index 95d6cbf..850478e 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -30,7 +30,7 @@ local SpecButtonList = { local function Tab_OnEnter(this) this.backdrop:SetPanelColor("highlight") - this.backdrop:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) + this.backdrop:SetBackdropBorderColor(unpack(SV.Media.color.highlight)) end local function Tab_OnLeave(this) @@ -39,7 +39,7 @@ local function Tab_OnLeave(this) end local function ChangeTabHelper(this) - this:Formula409() + this:RemoveTextures() local nTex = this:GetNormalTexture() if(nTex) then nTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -76,19 +76,19 @@ local function StyleGlyphHolder(holder, offset) local outer = holder:CreateTexture(nil, "OVERLAY") outer:WrapOuter(holder, offset, offset) outer:SetTexture(borderTex) - outer:SetGradient(unpack(SuperVillain.Media.gradient.class)) + outer:SetGradient(unpack(SV.Media.gradient.class)) local hover = holder:CreateTexture(nil, "HIGHLIGHT") hover:WrapOuter(holder, offset, offset) hover:SetTexture(borderTex) - hover:SetGradient(unpack(SuperVillain.Media.gradient.yellow)) + 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(SuperVillain.Media.gradient.default)) + disabled:SetGradient(unpack(SV.Media.gradient.default)) holder:SetDisabledTexture(disabled) end @@ -105,25 +105,25 @@ TALENTFRAME STYLER ########################################################## ]]-- local function TalentFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.talent ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.talent ~= true then return end STYLE:ApplyWindowHolder(PlayerTalentFrame) - PlayerTalentFrameInset:Formula409() - PlayerTalentFrameTalents:Formula409() - PlayerTalentFrameTalentsClearInfoFrame:Formula409() + PlayerTalentFrameInset:RemoveTextures() + PlayerTalentFrameTalents:RemoveTextures() + PlayerTalentFrameTalentsClearInfoFrame:RemoveTextures() PlayerTalentFrame.Panel:Point("BOTTOMRIGHT", PlayerTalentFrame, "BOTTOMRIGHT", 0, -5) - PlayerTalentFrameSpecializationTutorialButton:MUNG() - PlayerTalentFrameTalentsTutorialButton:MUNG() - PlayerTalentFramePetSpecializationTutorialButton:MUNG() + 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:Formula409() + button:RemoveTextures() button:SetButtonTemplate() local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = button:GetPoint() button:SetPoint(initialAnchor, anchorParent, relativeAnchor, xPosition, -28) @@ -157,7 +157,7 @@ local function TalentFrameStyle() for i = 1, 2 do local v = _G["PlayerSpecTab"..i] - _G["PlayerSpecTab"..i.."Background"]:MUNG() + _G["PlayerSpecTab"..i.."Background"]:Die() ChangeTabHelper(v) end @@ -174,7 +174,7 @@ local function TalentFrameStyle() if(bgFrame) then bgFrame:Hide() end rowFrame:DisableDrawLayer("BORDER") - rowFrame:Formula409() + rowFrame:RemoveTextures() rowFrame.TopLine:Point("TOP", 0, 4) rowFrame.BottomLine:Point("BOTTOM", 0, -4) @@ -278,7 +278,7 @@ local function TalentFrameStyle() for p, M in pairs(btnList)do for b = 1, 4 do - local A = _G[M..b]_G["PlayerTalentFrameSpecializationSpecButton"..b.."Glow"]:MUNG() + local A = _G[M..b]_G["PlayerTalentFrameSpecializationSpecButton"..b.."Glow"]:Die() local N = A:CreateTexture(nil, 'ARTWORK') N:SetTexture(1, 1, 1, 0.1) A:SetHighlightTexture(N) @@ -290,7 +290,7 @@ local function TalentFrameStyle() end end - if SuperVillain.class == "HUNTER" then + if SV.class == "HUNTER" then for b = 1, 6 do select(b, PlayerTalentFramePetSpecialization:GetRegions()):Hide() end @@ -336,12 +336,12 @@ STYLE LOADING STYLE:SaveBlizzardStyle("Blizzard_TalentUI", TalentFrameStyle) local function GlyphStyle() - GlyphFrame:Formula409() + GlyphFrame:RemoveTextures() --GlyphFrame.background:ClearAllPoints() --GlyphFrame.background:SetAllPoints(PlayerTalentFrameInset) GlyphFrame:SetFixedPanelTemplate("Comic", false, 0, 3, 3) - GlyphFrameSideInset:Formula409() - GlyphFrameClearInfoFrame:Formula409() + 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) @@ -354,7 +354,7 @@ local function GlyphStyle() for b = 1, 10 do local e = _G["GlyphFrameScrollFrameButton"..b] local icon = _G["GlyphFrameScrollFrameButton"..b.."Icon"] - e:Formula409() + e:RemoveTextures() STYLE:ApplyItemButtonStyle(e) icon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) end @@ -362,7 +362,7 @@ local function GlyphStyle() for b = 1, 6 do local glyphHolder = _G["GlyphFrameGlyph"..b] if glyphHolder then - glyphHolder:Formula409() + glyphHolder:RemoveTextures() if(b % 2 == 0) then StyleGlyphHolder(glyphHolder, 4) else @@ -371,8 +371,8 @@ local function GlyphStyle() end end - GlyphFrameHeader1:Formula409() - GlyphFrameHeader2:Formula409() + GlyphFrameHeader1:RemoveTextures() + GlyphFrameHeader2:RemoveTextures() GlyphFrameScrollFrame:SetPanelTemplate("Inset", false, 3, 2, 2) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua index 3a0a8e5..afc75ea 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,7 +21,7 @@ TAXIFRAME STYLER ########################################################## ]]-- local function TaxiStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.taxi ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.taxi ~= true then return end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua index e60b8b6..78860fe 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua @@ -26,7 +26,7 @@ local pairs = _G.pairs; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua index 500109e..9d3db07 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -51,7 +51,7 @@ local function StyleAdiBags(event) end if event == 'PLAYER_ENTERING_WORLD' then - SuperVillain:ExecuteTimer(function() + SV:ExecuteTimer(function() if not AdiBagsContainer1 then ToggleBackpack() ToggleBackpack() end if AdiBagsContainer1 then SkinFrame(AdiBagsContainer1) @@ -60,7 +60,7 @@ local function StyleAdiBags(event) end end, 1) elseif event == 'BANKFRAME_OPENED' then - SuperVillain:ExecuteTimer(function() + SV:ExecuteTimer(function() if AdiBagsContainer2 then SkinFrame(AdiBagsContainer2) STYLE:SafeEventRemoval("AdiBags", event) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua index 17fa321..1a47b5a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -50,7 +50,7 @@ local function StyleAltoholic(event, addon) if event == "PLAYER_ENTERING_WORLD" then STYLE:ApplyTooltipStyle(AltoTooltip) - AltoholicFramePortrait:MUNG() + AltoholicFramePortrait:Die() STYLE:ApplyFrameStyle(AltoholicFrame, "Action", false, true) STYLE:ApplyFrameStyle(AltoMsgBox) @@ -80,19 +80,19 @@ local function StyleAltoholic(event, addon) STYLE:ApplyDropdownStyle(AltoholicTabSummary_SelectLocation, 200) if(AltoholicFrameSummaryScrollFrame) then - AltoholicFrameSummaryScrollFrame:Formula409(true) + AltoholicFrameSummaryScrollFrame:RemoveTextures(true) end if(AltoholicFrameBagUsageScrollFrame) then - AltoholicFrameBagUsageScrollFrame:Formula409(true) + AltoholicFrameBagUsageScrollFrame:RemoveTextures(true) end if(AltoholicFrameSkillsScrollFrame) then - AltoholicFrameSkillsScrollFrame:Formula409(true) + AltoholicFrameSkillsScrollFrame:RemoveTextures(true) end if(AltoholicFrameActivityScrollFrame) then - AltoholicFrameActivityScrollFrame:Formula409(true) + AltoholicFrameActivityScrollFrame:RemoveTextures(true) end STYLE:ApplyButtonStyle(AltoholicTabSummary_RequestSharing) @@ -136,9 +136,9 @@ local function StyleAltoholic(event, addon) STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort1) STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort2) STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort3) - AltoholicFrameContainersScrollFrame:Formula409(true) - AltoholicFrameQuestsScrollFrame:Formula409(true) - AltoholicFrameRecipesScrollFrame:Formula409(true) + AltoholicFrameContainersScrollFrame:RemoveTextures(true) + AltoholicFrameQuestsScrollFrame:RemoveTextures(true) + AltoholicFrameRecipesScrollFrame:RemoveTextures(true) local Buttons = { 'AltoholicTabCharacters_Characters', @@ -167,8 +167,8 @@ local function StyleAltoholic(event, addon) if IsAddOnLoaded("Altoholic_Achievements") or addon == "Altoholic_Achievements" then STYLE:ApplyUnderlayStyle(AltoholicFrameAchievements) - AltoholicFrameAchievementsScrollFrame:Formula409(true) - AltoholicAchievementsMenuScrollFrame:Formula409(true) + AltoholicFrameAchievementsScrollFrame:RemoveTextures(true) + AltoholicAchievementsMenuScrollFrame:RemoveTextures(true) STYLE:ApplyScrollBarStyle(AltoholicFrameAchievementsScrollFrameScrollBar) STYLE:ApplyScrollBarStyle(AltoholicAchievementsMenuScrollFrameScrollBar) STYLE:ApplyDropdownStyle(AltoholicTabAchievements_SelectRealm) @@ -202,7 +202,7 @@ local function StyleAltoholic(event, addon) end if IsAddOnLoaded("Altoholic_Grids") or addon == "Altoholic_Grids" then - AltoholicFrameGridsScrollFrame:Formula409(true) + AltoholicFrameGridsScrollFrame:RemoveTextures(true) STYLE:ApplyUnderlayStyle(AltoholicFrameGrids) STYLE:ApplyScrollBarStyle(AltoholicFrameGridsScrollFrameScrollBar) STYLE:ApplyDropdownStyle(AltoholicTabGrids_SelectRealm) @@ -231,7 +231,7 @@ local function StyleAltoholic(event, addon) STYLE:ApplyFrameStyle(AltoholicFrameGuildMembers) STYLE:ApplyFrameStyle(AltoholicFrameGuildBank) STYLE:ApplyScrollBarStyle(AltoholicFrameGuildMembersScrollFrameScrollBar) - AltoholicFrameGuildMembersScrollFrame:Formula409(true) + AltoholicFrameGuildMembersScrollFrame:RemoveTextures(true) for i = 1, 2 do STYLE:ApplyButtonStyle(_G["AltoholicTabGuildMenuItem"..i]) @@ -254,8 +254,8 @@ local function StyleAltoholic(event, addon) if IsAddOnLoaded("Altoholic_Search") or addon == "Altoholic_Search" then STYLE:ApplyUnderlayStyle(AltoholicFrameSearch, true) - AltoholicFrameSearchScrollFrame:Formula409(true) - AltoholicSearchMenuScrollFrame:Formula409(true) + AltoholicFrameSearchScrollFrame:RemoveTextures(true) + AltoholicSearchMenuScrollFrame:RemoveTextures(true) STYLE:ApplyScrollBarStyle(AltoholicFrameSearchScrollFrameScrollBar) STYLE:ApplyScrollBarStyle(AltoholicSearchMenuScrollFrameScrollBar) STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectRarity) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua index a39fcf6..21be45e 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua @@ -26,7 +26,7 @@ local pairs = _G.pairs; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -134,7 +134,7 @@ end local function StyleAtlasLoot(event, addon) assert(AtlasLootPanel, "AddOn Not Loaded") - for _, object in pairs(StripAllTextures) do _G[object]:Formula409()end + 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 @@ -160,7 +160,7 @@ local function StyleAtlasLoot(event, addon) if AtlasLoot_PanelButton_11 then AtlasLoot_PanelButton_11:SetButtonTemplate() end if AtlasLoot_PanelButton_12 then AtlasLoot_PanelButton_12:SetButtonTemplate() end - for i = 1, 15 do local f = _G["AtlasLootCompareFrameMainFilterButton"..i]f:Formula409() end + for i = 1, 15 do local f = _G["AtlasLootCompareFrameMainFilterButton"..i]f:RemoveTextures() end STYLE:ApplyCloseButtonStyle(AtlasLootDefaultFrame_CloseButton) STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua index 65b6df7..8d42a1c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua index e3e0fe1..80cee55 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua @@ -25,7 +25,7 @@ local select = _G.select; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain --[[ ########################################################## @@ -110,9 +110,9 @@ local function applystyle(bar) bar.candyBarBar:ClearAllPoints() bar.candyBarBar:SetAllPoints(bar) bar.candyBarBar.OldSetPoint = bar.candyBarBar.SetPoint - bar.candyBarBar.SetPoint = SuperVillain.fubar + bar.candyBarBar.SetPoint = SV.fubar bar.candyBarIconFrame.OldSetWidth = bar.candyBarIconFrame.SetWidth - bar.candyBarIconFrame.SetWidth = SuperVillain.fubar + bar.candyBarIconFrame.SetWidth = SV.fubar bar.candyBarIconFrame:ClearAllPoints() bar.candyBarIconFrame:Point("BOTTOMRIGHT", bar, "BOTTOMLEFT", -1, 0) bar.candyBarIconFrame:SetSize(20, 20) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua index 0132037..fff381f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -40,7 +40,7 @@ local function StyleBugSack(event, addon) assert(BugSack, "AddOn Not Loaded") hooksecurefunc(BugSack, "OpenSack", function() if BugSackFrame.Panel then return end - BugSackFrame:Formula409() + BugSackFrame:RemoveTextures() BugSackFrame:SetBasicPanel() STYLE:ApplyTabStyle(BugSackTabAll) BugSackTabAll:SetPoint("TOPLEFT", BugSackFrame, "BOTTOMLEFT", 0, 1) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua index 0fe5b66..2ae0959 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -79,7 +79,7 @@ local function StyleClique() "CliqueConfigPage1Column2", } for _, object in pairs(CliqueTabs) do - _G[object]:Formula409(true) + _G[object]:RemoveTextures(true) end CliqueConfigPage1:SetScript("OnShow", function(self) for i = 1, 12 do @@ -97,7 +97,7 @@ local function StyleClique() CliqueRow1:ClearAllPoints() CliqueRow1:SetPoint("TOPLEFT",5,-(CliqueConfigPage1Column1:GetHeight() +3)) end) - CliqueConfigPage1_VSlider:Formula409(true) + CliqueConfigPage1_VSlider:RemoveTextures(true) CliqueDialog:SetSize(CliqueDialog:GetWidth()-1, CliqueDialog:GetHeight()-1) CliqueConfigPage1ButtonSpell:ClearAllPoints() CliqueConfigPage1ButtonOptions:ClearAllPoints() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua index 8a1c7ff..6df4ee9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -44,7 +44,7 @@ local function StyleCoolLine() CoolLine.updatelook() STYLE:ApplyFrameStyle(CoolLine,"Transparent") CoolLine.Panel:SetAllPoints(CoolLine) - SuperVillain:AddToDisplayAudit(CoolLine) + SV:AddToDisplayAudit(CoolLine) if STYLE:IsAddonReady("DockletCoolLine") then if not CoolLineDB.vertical then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua index e08606b..d0cfd47 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -77,7 +77,7 @@ local function StyleBars(self) frame:SetScale(bar.owner.options.Scale) end spark:SetAlpha(0) - spark:SetTexture("") + spark:SetTexture(0,0,0,0) icon1:SetTexCoord(0.1,0.9,0.1,0.9) icon1:ClearAllPoints() icon1:SetAllPoints(icon1.overlay) @@ -98,8 +98,8 @@ local function StyleBars(self) frame:SetHeight(22) name:Point('LEFT', frame, 'LEFT', 4, 0) timer:Point('RIGHT', frame, 'RIGHT', -4, 0) - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + name: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 @@ -121,7 +121,7 @@ local StyleBossTitle = function() if not anchor.styled then local header = {anchor:GetRegions()} if header[1]:IsObjectType('FontString') then - header[1]:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + header[1]:SetFontTemplate(SV.Media.font.default, 12, 'OUTLINE') header[1]:SetTextColor(1, 1, 1) header[1]:SetShadowColor(0, 0, 0, 0) anchor.styled = true @@ -169,8 +169,8 @@ local StyleBoss = function() bar:SetHeight(22) name:Point('LEFT', bar, 'LEFT', 4, 0) timer:Point('RIGHT', bar, 'RIGHT', -4, 0) - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + name:SetFontTemplate(SV.Media.font.default, 12, 'OUTLINE') + timer:SetFontTemplate(SV.Media.font.default, 12, 'OUTLINE') count = count + 1 end end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua index 31f9cc1..475f69c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; local playerName = UnitName("player"); local playerRealm = GetRealmName(); @@ -41,14 +41,14 @@ DXE ]]-- local function StyleDXEBar(bar) bar:SetFixedPanelTemplate("Transparent") - bar.bg:SetTexture("") - bar.border.Show = SuperVillain.fubar + 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 = SuperVillain.fubar + bar.righticon.border.Show = SV.fubar bar.righticon.border:Hide() bar.righticon:ClearAllPoints() bar.righticon:SetPoint("LEFT", bar, "RIGHT", 2, 0) @@ -57,7 +57,7 @@ local function StyleDXEBar(bar) bar.righticon.t:FillInner() bar.righticon.t:SetDrawLayer("ARTWORK") bar.lefticon:SetFixedPanelTemplate("Default") - bar.lefticon.border.Show = SuperVillain.fubar + bar.lefticon.border.Show = SV.fubar bar.lefticon.border:Hide() bar.lefticon:ClearAllPoints() bar.lefticon:SetPoint("RIGHT", bar, "LEFT", -2, 0) @@ -75,7 +75,7 @@ local function RefreshDXEBars(frame) local bar = _G["DXEAlertBar"..i] if not bar.styled then bar:SetScale(1) - bar.SetScale = SuperVillain.fubar + bar.SetScale = SV.fubar StyleDXEBar(bar) bar.styled = true end @@ -95,7 +95,7 @@ local function StyleDXE() for i,hw in ipairs(frame.HW) do if hw:IsShown() then hw:SetFixedPanelTemplate("Transparent") - hw.border.Show = SuperVillain.fubar + hw.border.Show = SV.fubar hw.border:Hide() hw.healthbar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) end @@ -127,7 +127,7 @@ local function StyleDXE() 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"] = SuperVillain.Media.font.default - DXEDB["profiles"][playerKey]["Globals"]["TimerFont"] = SuperVillain.Media.font.default + 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 index a23da07..2a34ea8 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -62,7 +62,7 @@ local function StyleLightHeaded() STYLE:ApplyFrameStyle(LightHeadedFrameSub) STYLE:ApplyFrameStyle(LightHeadedSearchBox) STYLE:ApplyTooltipStyle(LightHeadedTooltip) - LightHeadedScrollFrame:Formula409() + LightHeadedScrollFrame:RemoveTextures() lhframe.close:Hide() STYLE:ApplyCloseButtonStyle(lhframe.close) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua index a1057e8..ec5b95b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -62,7 +62,7 @@ local function StyleMogItPreview() end if _G["MogItPreview"..i] then STYLE:ApplyFrameStyle(_G["MogItPreview"..i]) end if _G["MogItPreview"..i.."CloseButton"] then STYLE:ApplyCloseButtonStyle(_G["MogItPreview"..i.."CloseButton"]) end - if _G["MogItPreview"..i.."Inset"] then _G["MogItPreview"..i.."Inset"]:Formula409(true) end + if _G["MogItPreview"..i.."Inset"] then _G["MogItPreview"..i.."Inset"]:RemoveTextures(true) end if _G["MogItPreview"..i.."Activate"] then _G["MogItPreview"..i.."Activate"]:SetButtonTemplate() end end end @@ -71,15 +71,15 @@ local function StyleMogIt() assert(MogItFrame, "AddOn Not Loaded") STYLE:ApplyFrameStyle(MogItFrame) - MogItFrameInset:Formula409(true) + MogItFrameInset:RemoveTextures(true) STYLE:ApplyFrameStyle(MogItFilters) - MogItFiltersInset:Formula409(true) + MogItFiltersInset:RemoveTextures(true) hooksecurefunc(MogIt, "CreatePreview", StyleMogItPreview) STYLE:ApplyTooltipStyle(MogItTooltip) STYLE:ApplyCloseButtonStyle(MogItFrameCloseButton) STYLE:ApplyCloseButtonStyle(MogItFiltersCloseButton) - MogItFrameFiltersDefaults:Formula409(true) + MogItFrameFiltersDefaults:RemoveTextures(true) MogItFrameFiltersDefaults:SetButtonTemplate() STYLE:ApplyScrollFrameStyle(MogItScroll) STYLE:ApplyScrollFrameStyle(MogItFiltersScrollScrollBar) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua index 27fa86c..30829eb 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -46,9 +46,9 @@ local function StyleOmen() Omen.db.profile.TitleBar.UseSameBG = true hooksecurefunc(Omen, 'UpdateBackdrop', function(self) - if not SuperVillain.CurrentlyDocked["OmenAnchor"] then + if not SV.CurrentlyDocked["OmenAnchor"] then STYLE:ApplyFrameStyle(self.BarList, 'Transparent') - self.Title:Formula409() + self.Title:RemoveTextures() self.Title:SetPanelTemplate("Default") self.Title:SetPanelColor("class") end @@ -57,7 +57,7 @@ local function StyleOmen() hooksecurefunc(Omen, 'Toggle', function(self) if InCombatLockdown() then return end - if not SuperVillain.CurrentlyDocked["OmenAnchor"] then return end + if not SV.CurrentlyDocked["OmenAnchor"] then return end if self.Anchor:IsShown() then SuperDockWindow:Show() else @@ -84,11 +84,11 @@ function STYLE:Docklet_Omen(parent) db.profile.TitleBar.ShowTitleBar=true; db.profile.FrameStrata='2-LOW' Omen:OnProfileChanged(nil,db) - OmenTitle:Formula409() + OmenTitle:RemoveTextures() OmenTitle.Panel = nil OmenTitle:SetPanelTemplate("Default") OmenTitle:SetPanelColor("class") - OmenBarList:Formula409() + OmenBarList:RemoveTextures() OmenBarList.Panel = nil OmenBarList:SetFixedPanelTemplate('Transparent') OmenAnchor:ClearAllPoints() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua index 7bee43f..ab94eb7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -45,7 +45,7 @@ local function StyleOutfitter() OutfitterFrameTab1:Size(60, 25) OutfitterFrameTab2:Size(60, 25) OutfitterFrameTab3:Size(60, 25) - OutfitterMainFrame:Formula409(true) + OutfitterMainFrame:RemoveTextures(true) for i = 0, 13 do if _G["OutfitterItem"..i.."OutfitSelected"] then _G["OutfitterItem"..i.."OutfitSelected"]:SetButtonTemplate() @@ -55,7 +55,7 @@ local function StyleOutfitter() end end end) - OutfitterMainFrameScrollbarTrench:Formula409(true) + OutfitterMainFrameScrollbarTrench:RemoveTextures(true) OutfitterFrameTab1:ClearAllPoints() OutfitterFrameTab2:ClearAllPoints() OutfitterFrameTab3:ClearAllPoints() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua index 62cbed9..045b077 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua index 59a9487..3e13c86 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua index 46456e3..b699629 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -42,8 +42,8 @@ local function NoColor(a) if q:GetObjectType()=='Texture'then q:SetDesaturated(true) if q:GetTexture()=='Interface\\DialogFrame\\UI-DialogBox-Corner'then - q:SetTexture("") - q:MUNG() + q:SetTexture(0,0,0,0) + q:Die() end end end @@ -104,7 +104,7 @@ local function StyleRecount() STYLE:ApplyScrollFrameStyle(Recount_MainWindow_ScrollBarScrollBar) - Recount_MainWindow:HookScript('OnShow', function(self) if InCombatLockdown() then return end if SuperVillain.CurrentlyDocked["Recount_MainWindow"] then SuperDockWindowRight:Show() end end) + 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) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua index 09ed020..b1b6831 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -54,7 +54,7 @@ end local function StyleSexyCooldownBar(bar) SCDStripStyleSettings(bar) STYLE:ApplyFrameStyle(bar) - SuperVillain:AddToDisplayAudit(bar) + SV:AddToDisplayAudit(bar) if STYLE:IsAddonReady("DockletSexyCooldown") then bar:ClearAllPoints() bar:Point('BOTTOMRIGHT', SVUI_ActionBar1, 'TOPRIGHT', 0, 2) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua index 3c7f2b4..9d2c491 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua @@ -30,7 +30,7 @@ local twipe = table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; local activePanels = {}; --[[ @@ -113,7 +113,7 @@ local function StyleSkada() hooksecurefunc(Skada, 'ToggleWindow', function() if InCombatLockdown() then return end - if not SuperVillain.CurrentlyDocked["SkadaHolder"] or not SuperVillain.CurrentlyDocked["SkadaHolder2"] then return end + if not SV.CurrentlyDocked["SkadaHolder"] or not SV.CurrentlyDocked["SkadaHolder2"] then return end for index, window in ipairs(Skada:GetWindows()) do if window:IsShown() then SuperDockWindowRight:Show() @@ -124,19 +124,19 @@ local function StyleSkada() end) hooksecurefunc(Skada, 'CreateWindow', function() - if SuperVillain.CurrentlyDocked["SkadaHolder"] or SuperVillain.CurrentlyDocked["SkadaHolder2"] then + if SV.CurrentlyDocked["SkadaHolder"] or SV.CurrentlyDocked["SkadaHolder2"] then STYLE:Docklet_Skada() end end) hooksecurefunc(Skada, 'DeleteWindow', function() - if SuperVillain.CurrentlyDocked["SkadaHolder"] or SuperVillain.CurrentlyDocked["SkadaHolder2"] then + if SV.CurrentlyDocked["SkadaHolder"] or SV.CurrentlyDocked["SkadaHolder2"] then STYLE:Docklet_Skada() end end) hooksecurefunc(Skada, 'UpdateDisplay', function() - if SuperVillain.CurrentlyDocked["SkadaHolder"] or SuperVillain.CurrentlyDocked["SkadaHolder2"] then + if SV.CurrentlyDocked["SkadaHolder"] or SV.CurrentlyDocked["SkadaHolder2"] then STYLE:Docklet_Skada() end end) @@ -152,9 +152,9 @@ function STYLE:Docklet_Skada() end for index,window in pairs(Skada:GetWindows()) do local key = "Skada"..window.db.name - if(SuperVillain.db.SVDock.docklets.DockletMain == key)then + if(SV.db.SVDock.docklets.DockletMain == key)then skada_panel_loader(SkadaHolder, window, SuperDockletMain) - elseif(SuperVillain.db.SVDock.docklets.enableExtra and SuperVillain.db.SVDock.docklets.DockletExtra == key) then + elseif(SV.db.SVDock.docklets.enableExtra and SV.db.SVDock.docklets.DockletExtra == key) then skada_panel_loader(SkadaHolder2, window, SuperDockletExtra) else window.db.barslocked = false; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua index 50dc259..1ffb15a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -43,7 +43,7 @@ local function StyleTinyDPS() tdpsFrame:HookScript("OnShow", function() if InCombatLockdown() then return end - if SuperVillain.CurrentlyDocked["tdpsFrame"] then + if SV.CurrentlyDocked["tdpsFrame"] then SuperDockWindowRight:Show() end end) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua index 91df25e..48a73e4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua index 777bce6..518e5d9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -40,12 +40,12 @@ local function StyleTradeSkillDW() assert(TradeSkillDW_QueueFrame, "AddOn Not Loaded") TradeSkillFrame:SetPanelTemplate("Action") - TradeSkillListScrollFrame:Formula409(true) - TradeSkillDetailScrollFrame:Formula409(true) - TradeSkillFrameInset:Formula409(true) - TradeSkillExpandButtonFrame:Formula409(true) - TradeSkillDetailScrollChildFrame:Formula409(true) - TradeSkillListScrollFrame:Formula409(true) + 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) @@ -53,7 +53,7 @@ local function StyleTradeSkillDW() TradeSkillFrame:HookScript("OnShow", function() STYLE:ApplyFrameStyle(TradeSkillFrame) - TradeSkillListScrollFrame:Formula409() + TradeSkillListScrollFrame:RemoveTextures() if not TradeSkillDWExpandButton then return end if not TradeSkillDWExpandButton.styled then STYLE:ApplyPaginationStyle(TradeSkillDWExpandButton) @@ -63,7 +63,7 @@ local function StyleTradeSkillDW() TradeSkillFrame:Height(TradeSkillFrame:GetHeight() + 12) TradeSkillRankFrame:SetBasicPanel() - TradeSkillRankFrame:SetStatusBarTexture(SuperVillain.Media.bar.default) + TradeSkillRankFrame:SetStatusBarTexture(SV.Media.bar.default) TradeSkillCreateButton:SetButtonTemplate() TradeSkillCancelButton:SetButtonTemplate() TradeSkillFilterButton:SetButtonTemplate() @@ -71,7 +71,7 @@ local function StyleTradeSkillDW() 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():MUNG() + TradeSkillLinkButton:GetHighlightTexture():Die() STYLE:ApplyFrameStyle(TradeSkillLinkButton,"Transparent") TradeSkillLinkButton:Size(17, 14) TradeSkillLinkButton:Point("LEFT", TradeSkillLinkFrame, "LEFT", 5, -1) @@ -113,7 +113,7 @@ local function StyleTradeSkillDW() button:Point(point, anchoredto, point2, x, y - 3) once = true end - _G["TradeSkillReagent"..i.."NameFrame"]:MUNG() + _G["TradeSkillReagent"..i.."NameFrame"]:Die() end end) @@ -121,22 +121,22 @@ local function StyleTradeSkillDW() STYLE:ApplyCloseButtonStyle(TradeSkillDW_QueueFrameCloseButton) - TradeSkillDW_QueueFrameInset:Formula409() + TradeSkillDW_QueueFrameInset:RemoveTextures() TradeSkillDW_QueueFrameClear:SetButtonTemplate() TradeSkillDW_QueueFrameDown:SetButtonTemplate() TradeSkillDW_QueueFrameUp:SetButtonTemplate() TradeSkillDW_QueueFrameDo:SetButtonTemplate() - TradeSkillDW_QueueFrameDetailScrollFrame:Formula409() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrame:Formula409() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent1:Formula409() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent2:Formula409() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent3:Formula409() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent4:Formula409() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent5:Formula409() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent6:Formula409() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent7:Formula409() - TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent8:Formula409() + 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:Formula409() + 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 index d56667f..725366a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -84,7 +84,7 @@ local function StyleBars(self) end spark:SetAlpha(0) - spark:SetTexture("") + spark:SetTexture(0,0,0,0) icon1:SetTexCoord(0.1,0.9,0.1,0.9) icon1:ClearAllPoints() @@ -112,8 +112,8 @@ local function StyleBars(self) name:Point('LEFT', frame, 'LEFT', 4, 0) timer:Point('RIGHT', frame, 'RIGHT', -4, 0) - name:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + name: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) @@ -138,7 +138,7 @@ local StyleBossTitle = function() if not anchor.styled then local header = {anchor:GetRegions()} if header[1]:IsObjectType('FontString') then - header[1]:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + header[1]:SetFont(SV.Media.font.default, 12, 'OUTLINE') header[1]:SetTextColor(1, 1, 1) header[1]:SetShadowColor(0, 0, 0, 0) anchor.styled = true @@ -188,8 +188,8 @@ local StyleBoss = function() name:Point('LEFT', bar, 'LEFT', 4, 0) timer:Point('RIGHT', bar, 'RIGHT', -4, 0) - name:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + name:SetFont(SV.Media.font.default, 12, 'OUTLINE') + timer:SetFont(SV.Media.font.default, 12, 'OUTLINE') count = count + 1 end end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua index ae338f4..57616d2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -48,9 +48,9 @@ local function Style_WeakAuras(frame) frame.Panel:SetAlpha(...) end end - SuperVillain:AddCD(frame.cooldown) + SV:AddCD(frame.cooldown) frame.icon:SetTexCoord(0.1,0.9,0.1,0.9) - frame.icon.SetTexCoord = SuperVillain.fubar + frame.icon.SetTexCoord = SV.fubar end local function Create_WeakAuras(parent, data) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua index e07d0d1..081e283 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua @@ -29,7 +29,7 @@ local format = string.format; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -39,11 +39,11 @@ ALDAMAGEMETER local function StyleALDamageMeter() assert(_G['alDamagerMeterFrame'], "AddOn Not Loaded") - alDamageMeterFrame.bg:MUNG() + alDamageMeterFrame.bg:Die() STYLE:ApplyFrameStyle(alDamageMeterFrame) alDamageMeterFrame:HookScript('OnShow', function() if InCombatLockdown() then return end - if SuperVillain.CurrentlyDocked["alDamagerMeterFrame"] then + if SV.CurrentlyDocked["alDamagerMeterFrame"] then SuperDockWindow:Show() end end) @@ -58,6 +58,6 @@ function STYLE:Docklet_alDamageMeter(parent) alDamageMeterFrame:ClearAllPoints() alDamageMeterFrame:SetAllPoints(parent) alDamageMeterFrame.backdrop:SetFixedPanelTemplate('Transparent',true) - alDamageMeterFrame.bg:MUNG() + 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 index 1bfbdb3..a7bd6fd 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,14 +21,14 @@ TIMEMANAGER STYLER ########################################################## ]]-- local function TimeManagerStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.timemanager ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.timemanager ~= true then return end STYLE:ApplyWindowHolder(TimeManagerFrame, true) STYLE:ApplyCloseButtonStyle(TimeManagerFrameCloseButton) - TimeManagerFrameInset:MUNG() + TimeManagerFrameInset:Die() STYLE:ApplyDropdownStyle(TimeManagerAlarmHourDropDown, 80) STYLE:ApplyDropdownStyle(TimeManagerAlarmMinuteDropDown, 80) STYLE:ApplyDropdownStyle(TimeManagerAlarmAMPMDropDown, 80) @@ -36,7 +36,7 @@ local function TimeManagerStyle() TimeManagerAlarmEnabledButton:SetCheckboxTemplate(true) TimeManagerMilitaryTimeCheck:SetCheckboxTemplate(true) TimeManagerLocalTimeCheck:SetCheckboxTemplate(true) - TimeManagerStopwatchFrame:Formula409() + TimeManagerStopwatchFrame:RemoveTextures() TimeManagerStopwatchCheck:SetFixedPanelTemplate("Default") TimeManagerStopwatchCheck:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) TimeManagerStopwatchCheck:GetNormalTexture():FillInner() @@ -46,12 +46,12 @@ local function TimeManagerStyle() sWatch:Point("BOTTOMRIGHT", TimeManagerStopwatchCheck, -2, 2) TimeManagerStopwatchCheck:SetHighlightTexture(sWatch) - StopwatchFrame:Formula409() + StopwatchFrame:RemoveTextures() StopwatchFrame:SetBasicPanel() StopwatchFrame.Panel:Point("TOPLEFT", 0, -17) StopwatchFrame.Panel:Point("BOTTOMRIGHT", 0, 2) - StopwatchTabFrame:Formula409() + StopwatchTabFrame:RemoveTextures() STYLE:ApplyCloseButtonStyle(StopwatchCloseButton) STYLE:ApplyPaginationStyle(StopwatchPlayPauseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua index 1882ef1..77fa660 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,26 +21,26 @@ TRADEFRAME STYLER ########################################################## ]]-- local function TradeFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.trade ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.trade ~= true then return end STYLE:ApplyWindowHolder(TradeFrame, true) - TradeFrameInset:MUNG() + TradeFrameInset:Die() TradeFrameTradeButton:SetButtonTemplate() TradeFrameCancelButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(TradeFrameCloseButton, TradeFrame.Panel) TradePlayerInputMoneyFrameGold:SetEditboxTemplate() TradePlayerInputMoneyFrameSilver:SetEditboxTemplate() TradePlayerInputMoneyFrameCopper:SetEditboxTemplate() - TradeRecipientItemsInset:MUNG() - TradePlayerItemsInset:MUNG() - TradePlayerInputMoneyInset:MUNG() - TradePlayerEnchantInset:MUNG() - TradeRecipientEnchantInset:MUNG() - TradeRecipientMoneyInset:MUNG() - TradeRecipientMoneyBg:MUNG() + TradeRecipientItemsInset:Die() + TradePlayerItemsInset:Die() + TradePlayerInputMoneyInset:Die() + TradePlayerEnchantInset:Die() + TradeRecipientEnchantInset:Die() + TradeRecipientMoneyInset:Die() + TradeRecipientMoneyBg:Die() local inputs = { "TradePlayerInputMoneyFrameSilver", "TradePlayerInputMoneyFrameCopper" @@ -59,10 +59,10 @@ local function TradeFrameStyle() local b = _G["TradePlayerItem"..i.."ItemButtonIconTexture"] local z = _G["TradeRecipientItem"..i.."ItemButtonIconTexture"] if Y and Z then - W:Formula409() - X:Formula409() - Y:Formula409() - Z:Formula409() + 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) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua index f8e31a9..c0b2440 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,27 +21,27 @@ TRADESKILL STYLER ########################################################## ]]-- local function TradeSkillStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.tradeskill ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.tradeskill ~= true then return end - TradeSkillListScrollFrame:Formula409() - TradeSkillDetailScrollFrame:Formula409() - TradeSkillFrameInset:Formula409() - TradeSkillExpandButtonFrame:Formula409() - TradeSkillDetailScrollChildFrame:Formula409() - TradeSkillRankFrame:Formula409() - TradeSkillCreateButton:Formula409(true) - TradeSkillCancelButton:Formula409(true) - TradeSkillFilterButton:Formula409(true) - TradeSkillCreateAllButton:Formula409(true) - TradeSkillViewGuildCraftersButton:Formula409(true) + 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:ApplyWindowHolder(TradeSkillFrame, true, true) STYLE:ApplyWindowHolder(TradeSkillGuildFrame) TradeSkillGuildFrame:Point("BOTTOMLEFT", TradeSkillFrame, "BOTTOMRIGHT", 3, 19) - TradeSkillGuildFrameContainer:Formula409() + TradeSkillGuildFrameContainer:RemoveTextures() TradeSkillGuildFrameContainer:SetPanelTemplate("Inset") STYLE:ApplyCloseButtonStyle(TradeSkillGuildFrameCloseButton) @@ -107,7 +107,7 @@ local function TradeSkillStyle() u:Point(d, a3, f, g, h-3) internalTest = true end - _G["TradeSkillReagent"..i.."NameFrame"]:MUNG() + _G["TradeSkillReagent"..i.."NameFrame"]:Die() end end) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua index bc0feae..ec29f2a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -40,13 +40,13 @@ TRAINER STYLER ########################################################## ]]-- local function TrainerStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.trainer ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.trainer ~= true then return end ClassTrainerFrame:SetHeight(ClassTrainerFrame:GetHeight() + 42) STYLE:ApplyWindowHolder(ClassTrainerFrame) for i=1, 8 do - _G["ClassTrainerScrollFrameButton"..i]:Formula409() + _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) @@ -59,14 +59,14 @@ local function TrainerStyle() STYLE:ApplyScrollFrameStyle(ClassTrainerScrollFrameScrollBar, 5) for _,frame in pairs(ClassTrainerFrameList)do - _G[frame]:Formula409() + _G[frame]:RemoveTextures() end for _,texture in pairs(ClassTrainerTextureList)do - _G[texture]:MUNG() + _G[texture]:Die() end - _G["ClassTrainerTrainButton"]:Formula409() + _G["ClassTrainerTrainButton"]:RemoveTextures() _G["ClassTrainerTrainButton"]:SetButtonTemplate() STYLE:ApplyDropdownStyle(ClassTrainerFrameFilterDropDown, 155) ClassTrainerScrollFrame:SetFixedPanelTemplate("Inset") @@ -77,8 +77,8 @@ local function TrainerStyle() --ClassTrainerFrameSkillStepButton.icon:SetParent(ClassTrainerFrameSkillStepButton.Panel) ClassTrainerFrameSkillStepButtonHighlight:SetTexture(1, 1, 1, 0.3) ClassTrainerFrameSkillStepButton.selectedTex:SetTexture(1, 1, 1, 0.3) - ClassTrainerStatusBar:Formula409() - ClassTrainerStatusBar:SetStatusBarTexture(SuperVillain.Media.bar.default) + ClassTrainerStatusBar:RemoveTextures() + ClassTrainerStatusBar:SetStatusBarTexture(SV.Media.bar.default) ClassTrainerStatusBar:SetPanelTemplate("Slot", true, 1, 2, 2) ClassTrainerStatusBar.rankText:ClearAllPoints() ClassTrainerStatusBar.rankText:SetPoint("CENTER", ClassTrainerStatusBar, "CENTER") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua index dcfde43..666bc44 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -48,29 +48,29 @@ TRANSMOG STYLER ########################################################## ]]-- local function TransmogStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.transmogrify ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.transmogrify ~= true then return end STYLE:ApplyWindowHolder(TransmogrifyFrame, true) for p, texture in pairs(TransmogFrameList)do - _G[texture]:MUNG() + _G[texture]:Die() end - select(2, TransmogrifyModelFrame:GetRegions()):MUNG() + select(2, TransmogrifyModelFrame:GetRegions()):Die() TransmogrifyModelFrame:SetFixedPanelTemplate("Comic") - TransmogrifyFrameButtonFrame:GetRegions():MUNG() - TransmogrifyApplyButton:Formula409() + TransmogrifyFrameButtonFrame:GetRegions():Die() + TransmogrifyApplyButton:RemoveTextures() TransmogrifyApplyButton:SetButtonTemplate() TransmogrifyApplyButton:Point("BOTTOMRIGHT", TransmogrifyFrame, "BOTTOMRIGHT", -4, 4) STYLE:ApplyCloseButtonStyle(TransmogrifyArtFrameCloseButton) - TransmogrifyArtFrame:Formula409() + 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:Formula409() + a9:RemoveTextures() a9:SetSlotTemplate(true) a9:SetFrameLevel(a9:GetFrameLevel()+2) @@ -82,7 +82,7 @@ local function TransmogStyle() end TransmogrifyConfirmationPopup:SetParent(UIParent) - TransmogrifyConfirmationPopup:Formula409() + TransmogrifyConfirmationPopup:RemoveTextures() TransmogrifyConfirmationPopup:SetPanelTemplate("Pattern") TransmogrifyConfirmationPopup.Button1:SetButtonTemplate() TransmogrifyConfirmationPopup.Button2:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua index 685151c..061c14d 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -35,22 +35,22 @@ VOIDSTORAGE STYLER ########################################################## ]]-- local function VoidStorageStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.voidstorage ~= true then + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.voidstorage ~= true then return end STYLE:ApplyWindowHolder(VoidStorageFrame, true) for _,frame in pairs(VoidStorageList)do - _G[frame]:Formula409() + _G[frame]:RemoveTextures() end VoidStoragePurchaseFrame:SetFrameStrata('DIALOG') VoidStoragePurchaseFrame:SetFixedPanelTemplate("Button", true) - VoidStorageFrameMarbleBg:MUNG() - VoidStorageFrameLines:MUNG() + VoidStorageFrameMarbleBg:Die() + VoidStorageFrameLines:Die() - select(2, VoidStorageFrame:GetRegions()):MUNG() + select(2, VoidStorageFrame:GetRegions()):Die() VoidStoragePurchaseButton:SetButtonTemplate() VoidStorageHelpBoxButton:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua index b2f1a32..a903bd7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -76,11 +76,11 @@ local function WorldMap_QuestView() end end local function WorldMap_OnShow() - WorldMapFrame:Formula409() - if not SuperVillain.db.SVMap.tinyWorldMap then + WorldMapFrame:RemoveTextures() + if not SV.db.SVMap.tinyWorldMap then BlackoutWorld:SetTexture(0, 0, 0, 1) else - BlackoutWorld:SetTexture("") + BlackoutWorld:SetTexture(0,0,0,0) end if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then WorldMap_FullView() @@ -111,7 +111,7 @@ WORLDMAP STYLER ########################################################## ]]-- local function WorldMapStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.worldmap ~= true then return end + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.worldmap ~= true then return end WorldMapFrame:SetFrameLevel(2) STYLE:ApplyScrollFrameStyle(WorldMapQuestScrollFrameScrollBar) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua index 0fcc566..65f512f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua @@ -13,7 +13,7 @@ _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## --]] -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## @@ -21,9 +21,9 @@ WORLDSTATE STYLER ########################################################## ]]-- local function WorldStateStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.bgscore ~= true then return end - WorldStateScoreScrollFrame:Formula409() - WorldStateScoreFrame:Formula409() + if SV.db.SVStyle.blizzard.enable ~= true or SV.db.SVStyle.blizzard.bgscore ~= true then return end + WorldStateScoreScrollFrame:RemoveTextures() + WorldStateScoreFrame:RemoveTextures() WorldStateScoreFrame:SetPanelTemplate("Halftone") STYLE:ApplyCloseButtonStyle(WorldStateScoreFrameCloseButton) STYLE:ApplyScrollFrameStyle(WorldStateScoreScrollFrameScrollBar) diff --git a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua index 97a030b..9a9b282 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua @@ -35,7 +35,7 @@ local twipe = table.wipe; GET ADDON DATA ########################################################## ]]-- -local SuperVillain, L = unpack(SVUI); +local SV, L = unpack(SVUI); local STYLE = _G.StyleVillain; local NewHook = hooksecurefunc; --[[ @@ -60,14 +60,14 @@ end function STYLE:ApplyFrameStyle(this, template, noStripping, fullStripping) if(not this or (this and this.Panel)) then return end - if not noStripping then this:Formula409(fullStripping) 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:Formula409(fullStripping) end + if not noStripping then this:RemoveTextures(fullStripping) end template = template or "Transparent" this:SetFixedPanelTemplate(template) end @@ -80,7 +80,7 @@ function STYLE:ApplyWindowHolder(this, action, fullStrip) this:SetFrameLevel(1) end - this:Formula409(fullStrip) + this:RemoveTextures(fullStrip) this:SetPanelTemplate(template) -- print(this:GetName() .. ": " .. tostring(baselevel) .. " >> " .. adjustment) @@ -98,11 +98,11 @@ end ########################################################## ]]-- local Button_OnEnter = function(self) - self:SetBackdropColor(unpack(SuperVillain.Media.color.highlight)) + self:SetBackdropColor(unpack(SV.Media.color.highlight)) end local Button_OnLeave = function(self) - self:SetBackdropColor(unpack(SuperVillain.Media.color.default)) + self:SetBackdropColor(unpack(SV.Media.color.default)) end function STYLE:ApplyButtonStyle(this) @@ -112,7 +112,7 @@ end --[[ CLOSE BUTTON ]]-- local CloseButton_OnEnter = function(self) - self:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) + self:SetBackdropBorderColor(unpack(SV.Media.color.highlight)) end local CloseButton_OnLeave = function(self) @@ -138,7 +138,7 @@ function STYLE:ApplyItemButtonStyle(frame, adjust, shrink, noScript) local link = frame:GetName() - frame:Formula409() + frame:RemoveTextures() if(not frame.Panel) then if shrink then @@ -181,7 +181,7 @@ function STYLE:ApplyItemButtonStyle(frame, adjust, shrink, noScript) if(countObject) then countObject:SetParent(frame.Riser) countObject:SetAllPoints(frame.Riser) - countObject:SetFont(SuperVillain.Shared:Fetch("font", SuperVillain.db.media.fonts.number), SuperVillain.db.media.fonts.size, "OUTLINE") + countObject:SetFont(SV.Shared:Fetch("font", SV.db.media.fonts.number), SV.db.media.fonts.size, "OUTLINE") countObject:SetDrawLayer("ARTWORK", 7) end @@ -191,7 +191,7 @@ function STYLE:ApplyItemButtonStyle(frame, adjust, shrink, noScript) if(levelObject) then levelObject:SetParent(frame.Riser) - levelObject:SetFont(SuperVillain.Shared:Fetch("font", SuperVillain.db.media.fonts.number), SuperVillain.db.media.fonts.size, "OUTLINE") + levelObject:SetFont(SV.Shared:Fetch("font", SV.db.media.fonts.number), SV.db.media.fonts.size, "OUTLINE") levelObject:SetDrawLayer("ARTWORK", 7) end @@ -224,25 +224,25 @@ function STYLE:ApplyScrollFrameStyle(this, scale, yOffset) bg = _G[("%sBG"):format(scrollName)] - if(bg) then bg:SetTexture("") end + if(bg) then bg:SetTexture(0,0,0,0) end track = _G[("%sTrack"):format(scrollName)] - if(track) then track:SetTexture("") end + if(track) then track:SetTexture(0,0,0,0) end top = _G[("%sTop"):format(scrollName)] - if(top) then top:SetTexture("") end + if(top) then top:SetTexture(0,0,0,0) end bottom = _G[("%sBottom"):format(scrollName)] - if(bottom) then bottom:SetTexture("") end + if(bottom) then bottom:SetTexture(0,0,0,0) end mid = _G[("%sMiddle"):format(scrollName)] - if(mid) then mid:SetTexture("") end + 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:Formula409() + upButton:RemoveTextures() if(not upButton.icon) then local upW, upH = upButton:GetSize() STYLE:ApplyPaginationStyle(upButton) @@ -256,7 +256,7 @@ function STYLE:ApplyScrollFrameStyle(this, scale, yOffset) end end - downButton:Formula409() + downButton:RemoveTextures() if(not downButton.icon) then local dnW, dnH = downButton:GetSize() STYLE:ApplyPaginationStyle(downButton) @@ -303,7 +303,7 @@ function STYLE:ApplyScrollBarStyle(this) end end - this:Formula409() + this:RemoveTextures() this:SetBackdrop(nil) this:SetFixedPanelTemplate("Component") this.Panel:SetBackdropBorderColor(0.2,0.2,0.2) @@ -325,7 +325,7 @@ end --]] local Tab_OnEnter = function(self) self.backdrop:SetPanelColor("highlight") - self.backdrop:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) + self.backdrop:SetBackdropBorderColor(unpack(SV.Media.color.highlight)) end local Tab_OnLeave = function(self) @@ -338,18 +338,18 @@ function STYLE:ApplyTabStyle(this, addBackground) local tab = this:GetName(); - if _G[tab.."Left"] then _G[tab.."Left"]:SetTexture("") end - if _G[tab.."LeftDisabled"] then _G[tab.."LeftDisabled"]:SetTexture("") end - if _G[tab.."Right"] then _G[tab.."Right"]:SetTexture("") end - if _G[tab.."RightDisabled"] then _G[tab.."RightDisabled"]:SetTexture("") end - if _G[tab.."Middle"] then _G[tab.."Middle"]:SetTexture("") end - if _G[tab.."MiddleDisabled"] then _G[tab.."MiddleDisabled"]:SetTexture("") end + 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("") + this:GetHighlightTexture():SetTexture(0,0,0,0) end - this:Formula409() + this:RemoveTextures() if(addBackground) then local nTex = this:GetNormalTexture() @@ -416,7 +416,7 @@ function STYLE:ApplyPaginationStyle(button, isVertical) local testName = bName:lower() local leftDown = ((bName and testName:find('left')) or testName:find('prev') or testName:find('decrement')) or false - button:Formula409() + button:RemoveTextures() button:SetNormalTexture("") button:SetPushedTexture(0,0,0,0) button:SetHighlightTexture(0,0,0,0) @@ -500,7 +500,7 @@ function STYLE:ApplyDropdownStyle(this, width) if not width then width = 155 end - this:Formula409() + this:RemoveTextures() this:Width(width) if(ddButton) then @@ -627,7 +627,7 @@ end --]] function STYLE:ApplyEditBoxStyle(this, width, height) if not this then return end - this:Formula409(true) + this:RemoveTextures(true) this:SetEditboxTemplate() if width then this:Width(width) end if height then this:Height(height) end diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua index 6988490..eec7e14 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua @@ -48,9 +48,9 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L = unpack(SVUI); +local SV, L, Registry = unpack(SVUI); -PLUGIN = SuperVillain:Prototype(SVUIAddOnName) +PLUGIN = SV:Prototype(SVUIAddOnName) _G["TrackingVillain"] = PLUGIN; --[[ @@ -58,9 +58,9 @@ _G["TrackingVillain"] = PLUGIN; LOCALS AND BINDING ########################################################## ]]-- -BINDING_HEADER_SVUITRACK = "SuperVillain UI: Tracking Device"; +BINDING_HEADER_SVUITRACK = "Supervillain UI: Tracking Device"; -local CONFIGS = SuperVillain.Configs +local CONFIGS = SV.Configs local NewHook = hooksecurefunc; local playerGUID = UnitGUID('player') local classColor = RAID_CLASS_COLORS @@ -76,11 +76,11 @@ BUILD ]]-- function SVUI_TrackingDoodad_OnLoad() local frame = _G["SVUI_TrackingDoodad"] - frame.Border:SetGradient(unpack(SuperVillain.Media.gradient.dark)) + frame.Border:SetGradient(unpack(SV.Media.gradient.dark)) frame.Arrow:SetVertexColor(0.1, 0.8, 0.8) - frame.Range:SetFont(SuperVillain.Media.font.roboto, 14, "OUTLINE") + frame.Range:SetFont(SV.Media.font.roboto, 14, "OUTLINE") frame.Range:SetTextColor(1, 1, 1, 0.75) - SuperVillain.Animate:Orbit(frame.Radar, 8, true) + SV.Animate:Orbit(frame.Radar, 8, true) frame:RegisterForDrag("LeftButton"); frame:Hide() end @@ -514,24 +514,15 @@ do end end -local function Triangulate(unit, noMapLocation) +function Triangulate(unit, noMapLocation) local distance, angle = GetFromPlayer(unit, noMapLocation) return distance, angle -end - -local function _calc(radius) - return 0.5 + cos(radius) / sqrt2, 0.5 + sin(radius) / sqrt2; -end - -local function ArrowSpin(texture, angle) - local LRx, LRy = _calc(angle + 0.785398163); - local LLx, LLy = _calc(angle + 2.35619449); - local ULx, ULy = _calc(angle + 3.92699082); - local URx, URy = _calc(angle - 0.785398163); - - texture:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy); -end - +end +--[[ +########################################################## +MAIN MOVABLE TRACKER +########################################################## +]]-- function PLUGIN:PLAYER_TARGET_CHANGED() if not SVUI_TrackingDoodad then return end if((UnitInParty("target") or UnitInRaid("target")) and not UnitIsUnit("target", "player")) then @@ -542,6 +533,29 @@ function PLUGIN:PLAYER_TARGET_CHANGED() end end +local 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 TargetFrame_OnChange = function() if not SVUI_TrackingDoodad then return end if((UnitInParty("target") or UnitInRaid("target")) and not UnitIsUnit("target", "player")) then @@ -568,7 +582,7 @@ local Tracker_OnUpdate = function(self, elapsed) else self.throttle = 0.02 local out = floor(tonumber(distance)) - ArrowSpin(_ARROW, angle) + self:Spin(angle) if(out > 100) then _ARROW:SetVertexColor(1,0.1,0.1,0.4) _SPINNER:SetVertexColor(0.8,0.1,0.1,0.25) @@ -593,54 +607,89 @@ local Tracker_OnUpdate = function(self, elapsed) self.elapsed = (self.elapsed or 0) + elapsed end 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 = PLUGIN.db + 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 -function SuperVillain.SVUnit:CreateGPS(frame, small) - 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 - if(small) then - gps.onMouseOver = true - gps.OnlyProximity = false - gps:Point("RIGHT", frame, "RIGHT", 0, 0) - else - gps.onMouseOver = false - gps.OnlyProximity = false - gps:Point("BOTTOMLEFT", frame.Health, "BOTTOMLEFT", 0, 0) - gps.Text = gps:CreateFontString(nil, "OVERLAY") - gps.Text:SetAllPoints(frame.InfoPanel) - - gps.Text:SetFont(SuperVillain.Media.font.roboto, 10) - gps.Text:SetJustifyH("CENTER") - gps.Text:SetJustifyV("MIDDLE") - gps.Text:SetTextColor(1, 1, 1, 0.5) - end + gps:Point("RIGHT", frame, "RIGHT", 0, 0) gps.Arrow = gps:CreateTexture(nil, "OVERLAY", nil, 7) - gps.Arrow:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\GPS-ARROW]]) + gps.Arrow:SetTexture([[Interface\AddOns\SVUI_TrackingDevice\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") - return gps + gps.onMouseOver = true + gps.OnlyProximity = false + + gps.Spin = Rotate_Arrow + + frame.GPS = gps + + frame.GPS:Hide() end --[[ ########################################################## CORE ########################################################## ]]-- +function PLUGIN:ReLoad() + if(not SV.db[SCHEMA].enable) then return end + + local frameSize = self.db.size or 70 + local arrowSize = frameSize * 0.5 + local fontSize = self.db.fontSize or 14 + local frame = _G["SVUI_TrackingDoodad"] + + frame:SetSize(frameSize, frameSize) + frame.Arrow:SetSize(arrowSize, arrowSize) + frame.Range:SetFont(SV.Media.font.roboto, fontSize, "OUTLINE") +end + function PLUGIN:Load() - if(not SuperVillain.db[SCHEMA].enable) then print(SCHEMA) return end + if(not SV.db[SCHEMA].enable) then return end local _TRACKER = SVUI_TrackingDoodad local _TARGET = SVUI_Target if(_TRACKER) then - self.db = SuperVillain.db[SCHEMA] + self.db = SV.db[SCHEMA] + _TRACKER.Spin = Rotate_Arrow _TRACKER:SetParent(SVUI_Target) _TRACKER:SetScript("OnUpdate", Tracker_OnUpdate) @@ -651,6 +700,15 @@ function PLUGIN:Load() _TARGET:HookScript("OnShow", TargetFrame_OnChange) end + local BindableFrames = SV.SVUnit.Roster + for frame,key in pairs(BindableFrames) do + if(key:find("raid") or key:find("party")) then + CreateGPS(frame) + end + end + + NewHook(SV.SVUnit, "RefreshUnitLayout", RefreshGPS) + local fontSize = { order = 3, name = L["Font Size"], @@ -659,7 +717,7 @@ function PLUGIN:Load() min = 6, max = 22, step = 1, - set = function(key,value) PLUGIN:ChangeDBVar(value, key[#key]); PLUGIN:UpdateLogWindow()end + set = function(key,value) PLUGIN:ChangeDBVar(value, key[#key]); PLUGIN:UpdateLogWindow() end } self:AddOption("fontSize", fontSize) @@ -669,6 +727,8 @@ CONFIGS[SCHEMA] = { ["enable"] = true, ["size"] = 75, ["fontSize"] = 12, + ["groups"] = false, + ["proximity"] = false, } -SuperVillain.Registry:NewPlugin(PLUGIN) \ No newline at end of file +Registry:NewPlugin(PLUGIN) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc index f90895e..59e0b25 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc @@ -5,7 +5,7 @@ ## Notes: Supervillain UI [|cff9911FFRaid & Party Member Tracking|r]. ## RequiredDeps: SVUI ## LoadOnDemand: 1 -## X-oUF: oUF_SuperVillain +## X-oUF: oUF_Villain ## X-SVUI-Header: Tracking Device ## X-SVUI-Schema: SVTracker diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.xml b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.xml index 086497f..f53512c 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.xml +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.xml @@ -3,7 +3,7 @@ <Script file='libs\oUF_GPS\oUF_GPS.lua'/> <Frame name="SVUI_TrackingDoodad" movable="true" frameStrata="DIALOG"> - <Size x="75" y="75"/> + <Size x="70" y="70"/> <Anchors> <Anchor point="CENTER" relativeTo="UIParent" relativePoint="CENTER"/> </Anchors> @@ -14,19 +14,14 @@ <Layer level="BORDER"> <Texture parentKey="Border" setAllPoints="true" file="Interface\AddOns\SVUI_TrackingDevice\artwork\DOODAD-BORDER"/> <Texture parentKey="Arrow" file="Interface\AddOns\SVUI_TrackingDevice\artwork\DOODAD-ARROW"> - <Size x="40" y="40"/> + <Size x="35" y="35"/> <Anchors> <Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER"/> </Anchors> </Texture> </Layer> <Layer level="OVERLAY"> - <Texture parentKey="Radar" file="Interface\AddOns\SVUI_TrackingDevice\artwork\DOODAD-RADAR"> - <Size x="75" y="75"/> - <Anchors> - <Anchor point="CENTER" relativeTo="$parent" relativePoint="CENTER"/> - </Anchors> - </Texture> + <Texture parentKey="Radar" setAllPoints="true" file="Interface\AddOns\SVUI_TrackingDevice\artwork\DOODAD-RADAR"/> </Layer> <Layer level="ARTWORK"> <FontString parentKey="Range" inherits="GameFontNormal"> diff --git a/Interface/AddOns/SVUI_TrackingDevice/artwork/GPS-ARROW.blp b/Interface/AddOns/SVUI_TrackingDevice/artwork/GPS-ARROW.blp new file mode 100644 index 0000000..9fb0a32 Binary files /dev/null and b/Interface/AddOns/SVUI_TrackingDevice/artwork/GPS-ARROW.blp differ diff --git a/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua b/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua index 5118c48..e204d5d 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua +++ b/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua @@ -1,32 +1,107 @@ -local oUF = oUF_SuperVillain or oUF +local oUF = oUF_Villain or oUF assert(oUF, 'oUF not loaded') -local SuperVillain, L = unpack(SVUI); -local PLUGIN = _G.TrackingVillain; - -local cos, sin, sqrt2, max, atan2, floor = math.cos, math.sin, math.sqrt(2), math.max, math.atan2, math.floor; +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 GPSMonitorFrame; - -local function _calc(radius) - return 0.5 + cos(radius) / sqrt2, 0.5 + sin(radius) / sqrt2; -end - -local function spin(texture, angle) - local LRx, LRy = _calc(angle + 0.785398163); - local LLx, LLy = _calc(angle + 2.35619449); - local ULx, ULy = _calc(angle + 3.92699082); - local URx, URy = _calc(angle - 0.785398163); - - texture:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy); +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 minThrottle = 0.02 -local numArrows, inRange, unit, angle, GPS, distance local Update = function(self, elapsed) if self.elapsed and self.elapsed > (self.throttle or minThrottle) then numArrows = 0 @@ -34,20 +109,16 @@ local Update = function(self, elapsed) for _, object in next, _FRAMES do if(object:IsShown()) then GPS = object.GPS - unit = object.unit + local unit = object.unit if(unit) then if(GPS.PreUpdate) then GPS:PreUpdate(frame) end - if unit and GPS.outOfRange then - inRange = UnitInRange(unit) - end - - local available = (GPS.OnlyProximity == false and GPS.onMouseOver == false) + 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 (GPS.outOfRange and inRange)))) then + 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 - distance, angle = SuperVillain:PositionFromPlayer(unit, available) + elseif(GPS.Triangulate) then + local distance, angle = GPS:Triangulate(unit) if not angle then GPS:Hide() else @@ -71,7 +142,7 @@ local Update = function(self, elapsed) _PROXIMITY[#_PROXIMITY + 1] = {value, GPS} end end - spin(GPS.Arrow, angle) + GPS:Spin(angle) end if GPS.Text then