diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua index f103ae5..5a8af64 100644 --- a/Interface/AddOns/SVUI/SVUI.lua +++ b/Interface/AddOns/SVUI/SVUI.lua @@ -35,7 +35,7 @@ local format, find, match, gsub = string.format, string.find, string.match, stri --[[ MATH METHODS ]]-- local floor = math.floor --[[ TABLE METHODS ]]-- -local tsort, tconcat = table.sort, table.concat; +local twipe, tsort, tconcat = table.wipe, table.sort, table.concat; --[[ ############################################################ /$$ /$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$$$$$ @@ -389,6 +389,15 @@ do 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" @@ -402,11 +411,128 @@ do PLUGIN_LISTING = pluginString end - local function SetFoundAddon() - -- DO STUFF + 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, schema, core) + local function SetInternalModule(obj, core, schema) local addonmeta = {} local oldmeta = getmetatable(obj) if oldmeta then @@ -420,6 +546,7 @@ do obj.___addonName = addonName obj.___schema = schema obj.___core = core + obj.initialized = false obj.CombatLocked = false obj.ChangeDBVar = changeDBVar @@ -431,7 +558,7 @@ do return obj end - local function SetExternalModule(obj, schema, core, addon) + local function SetExternalModule(obj, core, schema, addonName, header, lod) local addonmeta = {} local oldmeta = getmetatable(obj) if oldmeta then @@ -440,11 +567,12 @@ do addonmeta.__tostring = rootstring setmetatable( obj, addonmeta ) - local addonName = ("%s [%s]"):format(addon, schema) - obj.___addonName = addonName obj.___schema = schema + obj.___header = header obj.___core = core + obj.___lod = lod + obj.initialized = false obj.CombatLocked = false obj.ChangeDBVar = changeDBVar @@ -452,6 +580,7 @@ do obj.UnregisterEvent = unregisterEvent obj.RegisterUpdate = registerUpdate obj.UnregisterUpdate = unregisterUpdate + obj.AddOption = add_OptionsIndex return obj end @@ -475,7 +604,7 @@ do ModuleQueue[#ModuleQueue+1] = schema self.Modules[#self.Modules+1] = schema - core[schema] = SetInternalModule(obj, schema, core) + core[schema] = SetInternalModule(obj, core, schema) if(core.AddonLaunched) then if(core[schema].Load) then @@ -490,15 +619,19 @@ do local addonName = obj.___addonName if(addonName and addonName ~= coreName) then - local schema = GetAddOnMetadata(addonName, "X-SVUI"); - if(not schema or (schema and core[schema])) then return end + 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, schema, core, addonName) + core[schema] = SetExternalModule(obj, core, schema, addonName, header, lod) + + SetPluginOptions(core, obj) if(core.AddonLaunched and core[schema].Load) then core[schema]:Load() @@ -508,13 +641,16 @@ do local Registry_FetchAddons = function(self) local addonCount = GetNumAddOns() + local core = self.___core for i = 1, addonCount do - local name = GetAddOnInfo(i) + local addonName, _, _, _, _, reason = GetAddOnInfo(i) local lod = IsAddOnLoadOnDemand(i) - local schema = GetAddOnMetadata(i, "X-SVUI") + local schema = GetAddOnMetadata(i, "X-SVUI-Schema") + if(lod and schema) then - self.Addons[name] = schema; + self.Addons[addonName] = schema; + SetFoundAddon(core, addonName, lod) end end end @@ -559,13 +695,15 @@ do end local Registry_LoadOnDemand = function(self) - local addons = self.Addons 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 and not IsAddOnLoaded(name)) then - LoadAddOn(name) + 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 @@ -581,6 +719,11 @@ do 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 @@ -597,7 +740,7 @@ do end end - ModuleQueue = nil + twipe(ModuleQueue) if not ScriptQueue then return end for i=1, #ScriptQueue do @@ -608,15 +751,13 @@ do end ScriptQueue = nil - - self:LoadAddons() end --[[ GLOBAL NAMESPACE ]]-- function SetAddonCore(obj) local version = GetAddOnMetadata(SVUINameSpace, "Version") - local schema = GetAddOnMetadata(SVUINameSpace, "X-SVUI") + local schema = GetAddOnMetadata(SVUINameSpace, "X-SVUI-Schema") obj = { ___addonName = SVUINameSpace, @@ -686,7 +827,7 @@ do NewPackage = Registry_NewPackage, NewPlugin = Registry_NewPlugin, FindAddons = Registry_FetchAddons, - LoadAddons = Registry_LoadOnDemand, + LoadRegisteredAddons = Registry_LoadOnDemand, RunCallbacks = Registry_RunCallbacks, Update = Registry_Update, UpdateAll = Registry_UpdateAll, @@ -788,7 +929,9 @@ end function SVUI:Prototype(name) local version = GetAddOnMetadata(name, "Version") - local schema = GetAddOnMetadata(name, "X-SVUI") + local schema = GetAddOnMetadata(name, "X-SVUI-Schema") + + self.Configs[schema] = {["enable"] = false} local obj = { ___addonName = name, diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index d3de9e7..ddd855c 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -9,6 +9,7 @@ ## X-oUF: oUF_SuperVillain ## X-Notes: Special thanks to Elv and Tukz for their incredible work. ## X-Email: munglunch@gmail.com -## X-SVUI: SuperVillain +## X-SVUI-Header: Super Villain UI +## X-SVUI-Schema: SuperVillain SVUI.xml diff --git a/Interface/AddOns/SVUI/system/common.lua b/Interface/AddOns/SVUI/system/common.lua index 5d95800..990cc76 100644 --- a/Interface/AddOns/SVUI/system/common.lua +++ b/Interface/AddOns/SVUI/system/common.lua @@ -1187,21 +1187,19 @@ APPENDED BUTTON TEMPLATING METHODS local function SetButtonTemplate(self, invisible, overridePadding, xOffset, yOffset, keepNormal) if(not self) then return end - if(not self.Panel) then - local padding = 1 - if(overridePadding and type(overridePadding) == "number") then - padding = overridePadding - end - xOffset = xOffset or -1 - yOffset = yOffset or -1 + local padding = 1 + if(overridePadding and type(overridePadding) == "number") then + padding = overridePadding + end + xOffset = xOffset or -1 + yOffset = yOffset or -1 - if(invisible) then - CreatePanelTemplate(self, "Transparent", false, true, padding, xOffset, yOffset) - self:SetBackdropColor(0,0,0,0) - self:SetBackdropBorderColor(0,0,0,0) - else - CreatePanelTemplate(self, "Button", false, true, padding, xOffset, yOffset) - end + if(invisible) then + CreatePanelTemplate(self, "Transparent", false, true, padding, xOffset, yOffset) + self:SetBackdropColor(0,0,0,0) + self:SetBackdropBorderColor(0,0,0,0) + else + CreatePanelTemplate(self, "Button", false, true, padding, xOffset, yOffset) end if(self.Left) then diff --git a/Interface/AddOns/SVUI/system/database.lua b/Interface/AddOns/SVUI/system/database.lua index 6fc573e..3609bec 100644 --- a/Interface/AddOns/SVUI/system/database.lua +++ b/Interface/AddOns/SVUI/system/database.lua @@ -185,7 +185,7 @@ DB PROFILE ]]-- CONFIGS["copyKey"] = pkey CONFIGS["profileKey"] = pkey -CONFIGS["framelocations"] = {} +CONFIGS["framelocations"] = {} CONFIGS["system"] = { ["cooldown"] = true, ["autoScale"] = true, @@ -1058,7 +1058,7 @@ local METAPROFILE = function(sv) db.profile = sv.STORED[key] db.protected = sv.SAFEDATA - db.defaults = CONFIGS + db.defaults = SuperVillain.Configs db.Init = initializedata db.Append = insertdata db.Reset = resetprofile @@ -1090,14 +1090,18 @@ function SuperVillain:CheckProfiles() return hasProfile end -function SuperVillain:UpdateDatabase() +function SuperVillain:UpdateDatabase(partial) local sv = _G["SVUI_Profile"] twipe(self.db) self.db = METAPROFILE(sv) self.db:Init() self.db.profileKey = pkey - SuperVillain.Registry:UpdateAll() + + --print("Update db") + if(not partial) then + self.Registry:UpdateAll() + end end function SuperVillain:ToggleSpecSwap(value) @@ -1163,6 +1167,7 @@ function SuperVillain:SetDatabaseObjects(init) twipe(self.db) + --print("Init db") self.db = METAPROFILE(sv) self.db:Init() self.db.profileKey = pkey diff --git a/Interface/AddOns/SVUI/system/installer.lua b/Interface/AddOns/SVUI/system/installer.lua index 6ca8edd..360e907 100644 --- a/Interface/AddOns/SVUI/system/installer.lua +++ b/Interface/AddOns/SVUI/system/installer.lua @@ -525,7 +525,7 @@ local function PlayThemeSong() end local function InstallComplete() - SVUI_Profile.SAFEDATA.install_version = SuperVillain.___ver; + SVUI_Profile.SAFEDATA.install_version = SuperVillain.___version; StopMusic() SetCVar("Sound_MusicVolume",user_music_vol) okToResetMOVE = false; @@ -544,7 +544,7 @@ local function InstallMungsChoice() SuperVillain.db.LAYOUT.barstyle = nil; SuperVillain:SetupBarLayout(); SuperVillain:SetupAuralayout(); - SVUI_Profile.SAFEDATA.install_version = SuperVillain.___ver; + SVUI_Profile.SAFEDATA.install_version = SuperVillain.___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.___ver)) + setupFrame.SubTitle:SetText(format(L["This is Supervillain UI version %s!"], SuperVillain.___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"]) @@ -928,7 +928,7 @@ function SuperVillain:ResetInstallation() SuperVillain:SetupAuralayout() end - SVUI_Profile.SAFEDATA.install_version = SuperVillain.___ver; + SVUI_Profile.SAFEDATA.install_version = SuperVillain.___version; ResetGlobalVariables() ReloadUI() end diff --git a/Interface/AddOns/SVUI/system/system.lua b/Interface/AddOns/SVUI/system/system.lua index 3648ca9..f39ce80 100644 --- a/Interface/AddOns/SVUI/system/system.lua +++ b/Interface/AddOns/SVUI/system/system.lua @@ -770,9 +770,8 @@ function SuperVillain:Load() SVUI_Cache["screenwidth"] = gxWidth end - self.Registry:FindAddons() - self:SetDatabaseObjects(true) + self.Registry:FindAddons() self:UIScale(); self:RefreshSystemFonts(); @@ -783,8 +782,10 @@ function SuperVillain:Load() end function SuperVillain:Launch() - self:SetDatabaseObjects() + self:SetDatabaseObjects(); self:UIScale("PLAYER_LOGIN"); + self.Registry:LoadRegisteredAddons(); + self:UpdateDatabase(true); self.Registry:LoadPackages(); self:DefinePlayerRole(); self:LoadMovables(); diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua index a2ae678..6170d1c 100644 --- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua +++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua @@ -878,40 +878,9 @@ end LOAD AND CONSTRUCT ########################################################## ]]-- -local function LoadOptions() - SuperVillain.Options.args.plugins.args.pluginOptions.args[SCHEMA] = { - type = "group", - name = L["Answering Service"], - childGroups = "tree", - args = { - enable = { - order = 1, - type = "toggle", - name = "Enable", - get = function(a)return SuperVillain.db[SCHEMA].enable end, - set = function(a,b)SuperVillain.db[SCHEMA].enable = b;SuperVillain:StaticPopup_Show("RL_CLIENT")end - }, - autoAnswer = { - 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 - }, - prefix = { - 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 - }, - } - } -end - function PLUGIN:Load() if(not SuperVillain.db[SCHEMA].enable) then return end - + self.db = SuperVillain.db[SCHEMA] self:RegisterEvent("CHAT_MSG_WHISPER") @@ -993,11 +962,27 @@ function PLUGIN:Load() end SuperVillain:AddonMessage(strMsg) - LoadOptions() + 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 + }; + self:AddOption("autoAnswer", option) + + option = { + 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 + }; + self:AddOption("prefix", option) end CONFIGS[SCHEMA] = { - ["enable"] = false, + ["enable"] = true, ["autoAnswer"] = false, ["prefix"] = true } diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc index 454a765..e290529 100644 --- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc +++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc @@ -3,8 +3,9 @@ ## Version: 4.2 ## Title: |cffFF9900SVUI |r|cffFFEF00Answering Service|r ## Notes: Supervillain UI [|cff9911FFAutomatic Whispers|r] -## LoadOnDemand: 1 ## RequiredDeps: SVUI -## X-SVUI: SVAnswer +## LoadOnDemand: 1 +## X-SVUI-Header: Answering Service +## X-SVUI-Schema: SVAnswer SVUI_AnsweringService.lua diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index d2f975e..a9085cc 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -841,23 +841,6 @@ end BUILD FUNCTION ########################################################## ]]-- -local function LoadOptions() - SuperVillain.Options.args.plugins.args.pluginOptions.args[SCHEMA] = { - type = "group", - name = L["Art of War"], - childGroups = "tree", - args = { - enable = { - order = 1, - type = "toggle", - name = "Enable", - get = function(a) return SuperVillain.db[SCHEMA].enable end, - set = function(a,b)SuperVillain.db[SCHEMA].enable = b; SuperVillain:StaticPopup_Show("RL_CLIENT") end - } - } - } -end - function PLUGIN:Load() if(not SuperVillain.db[SCHEMA].enable) then return end @@ -1027,8 +1010,6 @@ function PLUGIN:Load() self:RegisterEvent("PLAYER_ENTERING_WORLD", "UpdateCommunicator") self:RegisterEvent("UPDATE_BATTLEFIELD_SCORE", "UpdateCommunicator") - - LoadOptions() end -- /tar Sinnisterr diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc index a4dddf6..3612f1a 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc @@ -6,6 +6,8 @@ ## SavedVariables: SVAOW_Data ## SavedVariablesPerCharacter: SVAOW_Cache ## RequiredDeps: SVUI -## X-SVUI: SVAOW +## LoadOnDemand: 1 +## X-SVUI-Header: Art of War +## X-SVUI-Schema: SVAOW SVUI_ArtOfWar.lua diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua index 06a7572..aa341ae 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua @@ -312,7 +312,7 @@ function PLUGIN:MakeLogWindow() log:SetFrameStrata("MEDIUM") log:SetPoint("TOPLEFT",title,"BOTTOMLEFT",0,0) log:SetPoint("BOTTOMRIGHT",ModeLogsFrame,"BOTTOMRIGHT",0,0) - log:SetFont(SuperVillain.Media.font.system, self.db.fontSize, "OUTLINE") + log:SetFontTemplate(nil, self.db.fontSize, "OUTLINE") log:SetJustifyH("CENTER") log:SetJustifyV("MIDDLE") log:SetShadowColor(0, 0, 0, 0) @@ -413,134 +413,6 @@ end BUILD FUNCTION ########################################################## ]]-- -local function LoadOptions() - SuperVillain.Options.args.plugins.args.pluginOptions.args[SCHEMA] = { - type = 'group', - name = L['Laborer'], - get = function(key)return SuperVillain.db[SCHEMA][key[#key]]end, - set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key]) end, - args = { - intro = { - order = 1, - type = 'description', - name = L["Options for laborer modes"] - }, - enable = { - type = "toggle", - order = 2, - name = L['Enable'], - desc = L['Enable/Disable the Laborer dock.'], - get = function(key)return SuperVillain.db[SCHEMA][key[#key]]end, - set = function(key, value)SuperVillain.db[SCHEMA].enable = value;SuperVillain:StaticPopup_Show("RL_CLIENT")end - }, - fontSize = { - order = 3, - name = L["Font Size"], - desc = L["Set the font size of the log window."], - type = "range", - min = 6, - max = 22, - step = 1, - set = function(j,value)PLUGIN:ChangeDBVar(value,j[#j]);PLUGIN:UpdateLogWindow()end - }, - fishing = { - order = 4, - type = "group", - name = L["Fishing Mode Settings"], - guiInline = true, - args = { - autoequip = { - type = "toggle", - order = 1, - name = L['AutoEquip'], - desc = L['Enable/Disable automatically equipping fishing gear.'], - get = function(key)return SuperVillain.db[SCHEMA].fishing[key[#key]]end, - set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "fishing")end - } - } - }, - cooking = { - order = 5, - type = "group", - name = L["Cooking Mode Settings"], - guiInline = true, - args = { - autoequip = { - type = "toggle", - order = 1, - name = L['AutoEquip'], - desc = L['Enable/Disable automatically equipping cooking gear.'], - get = function(key)return SuperVillain.db[SCHEMA].cooking[key[#key]]end, - set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "cooking")end - } - } - }, - farming = { - order = 6, - 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, - args = { - buttonsize = { - type = 'range', - name = L['Button Size'], - desc = L['The size of the action buttons.'], - min = 15, - max = 60, - step = 1, - order = 1, - set = function(key, value) - PLUGIN:ChangeDBVar(value, key[#key],"farming"); - PLUGIN:RefreshFarmingTools() - end, - }, - buttonspacing = { - type = 'range', - name = L['Button Spacing'], - desc = L['The spacing between buttons.'], - min = 1, - max = 10, - step = 1, - order = 2, - set = function(key, value) - PLUGIN:ChangeDBVar(value, key[#key],"farming"); - PLUGIN:RefreshFarmingTools() - end, - }, - onlyactive = { - order = 3, - type = 'toggle', - name = L['Only active buttons'], - desc = L['Only show the buttons for the seeds, portals, tools you have in your bags.'], - set = function(key, value) - PLUGIN:ChangeDBVar(value, key[#key],"farming"); - PLUGIN:RefreshFarmingTools() - end, - }, - droptools = { - order = 4, - type = 'toggle', - name = L['Drop '], - desc = L['Automatically drop tools from your bags when leaving the farming area.'], - }, - toolbardirection = { - order = 5, - type = 'select', - name = L['Bar Direction'], - desc = L['The direction of the bar buttons (Horizontal or Vertical).'], - set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key],"farming"); PLUGIN:RefreshFarmingTools() end, - values = { - ['VERTICAL'] = L['Vertical'], ['HORIZONTAL'] = L['Horizontal'] - } - } - } - } - } - } -end - function PLUGIN:Load() if(not SuperVillain.db[SCHEMA].enable) then return end @@ -657,7 +529,114 @@ function PLUGIN:Load() self:PrepareFarmingTools() self:RegisterEvent("SKILL_LINES_CHANGED") - LoadOptions() + local option = { + order = 2, + name = L["Font Size"], + desc = L["Set the font size of the log window."], + type = "range", + min = 6, + max = 22, + step = 1, + set = function(j,value)PLUGIN:ChangeDBVar(value,j[#j]);PLUGIN:UpdateLogWindow()end + } + self:AddOption("fontSize", option) + option = { + order = 3, + type = "group", + name = L["Fishing Mode Settings"], + guiInline = true, + args = { + autoequip = { + type = "toggle", + order = 1, + name = L['AutoEquip'], + desc = L['Enable/Disable automatically equipping fishing gear.'], + get = function(key)return SuperVillain.db[SCHEMA].fishing[key[#key]]end, + set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "fishing")end + } + } + } + self:AddOption("fishing", option) + option = { + order = 4, + type = "group", + name = L["Cooking Mode Settings"], + guiInline = true, + args = { + autoequip = { + type = "toggle", + order = 1, + name = L['AutoEquip'], + desc = L['Enable/Disable automatically equipping cooking gear.'], + get = function(key)return SuperVillain.db[SCHEMA].cooking[key[#key]]end, + set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key], "cooking")end + } + } + } + self:AddOption("cooking", option) + option = { + order = 5, + 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, + args = { + buttonsize = { + type = 'range', + name = L['Button Size'], + desc = L['The size of the action buttons.'], + min = 15, + max = 60, + step = 1, + order = 1, + set = function(key, value) + PLUGIN:ChangeDBVar(value, key[#key],"farming"); + PLUGIN:RefreshFarmingTools() + end, + }, + buttonspacing = { + type = 'range', + name = L['Button Spacing'], + desc = L['The spacing between buttons.'], + min = 1, + max = 10, + step = 1, + order = 2, + set = function(key, value) + PLUGIN:ChangeDBVar(value, key[#key],"farming"); + PLUGIN:RefreshFarmingTools() + end, + }, + onlyactive = { + order = 3, + type = 'toggle', + name = L['Only active buttons'], + desc = L['Only show the buttons for the seeds, portals, tools you have in your bags.'], + set = function(key, value) + PLUGIN:ChangeDBVar(value, key[#key],"farming"); + PLUGIN:RefreshFarmingTools() + end, + }, + droptools = { + order = 4, + type = 'toggle', + name = L['Drop '], + desc = L['Automatically drop tools from your bags when leaving the farming area.'], + }, + toolbardirection = { + order = 5, + type = 'select', + name = L['Bar Direction'], + desc = L['The direction of the bar buttons (Horizontal or Vertical).'], + set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key],"farming"); PLUGIN:RefreshFarmingTools() end, + values = { + ['VERTICAL'] = L['Vertical'], ['HORIZONTAL'] = L['Horizontal'] + } + } + } + } + self:AddOption("farming", option) end CONFIGS[SCHEMA] = { diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc index 0c834ee..96b30f4 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc @@ -6,6 +6,8 @@ ## SavedVariables: LABOR_Data ## SavedVariablesPerCharacter: LABOR_Cache ## RequiredDeps: SVUI -## X-SVUI: SVLaborer +## LoadOnDemand: 1 +## X-SVUI-Header: Laborer +## X-SVUI-Schema: SVLaborer SVUI_Laborer.xml diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua index dc0751b..83233c7 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua @@ -281,31 +281,6 @@ end BUILD FUNCTION ########################################################## ]]-- -local function LoadOptions() - SuperVillain.Options.args.plugins.args.pluginOptions.args[SCHEMA] = { - type = "group", - name = L["Log O Matic"], - childGroups = "tree", - args = { - enable = { - order = 1, - type = "toggle", - name = "Enable", - get = function(a)return SuperVillain.db[SCHEMA].enable end, - set = function(a,b)SuperVillain.db[SCHEMA].enable = b; SuperVillain:StaticPopup_Show("RL_CLIENT") end - }, - saveChats = { - order = 2, - 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 - }, - } - } -end - function PLUGIN:Load() if not SuperVillain.db[SCHEMA].enable then return end @@ -360,7 +335,15 @@ function PLUGIN:Load() self:AppendChatFunctions() NewHook(CHAT, "ReLoad", self.AppendChatFunctions) - LoadOptions() + local saveChats = { + order = 2, + 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 + } + self:AddOption("saveChats", saveChats) end SuperVillain.Configs[SCHEMA] = { diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc index bfbf6b9..eb5a7a5 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc @@ -6,6 +6,8 @@ ## SavedVariables: SVLOG_Data ## SavedVariablesPerCharacter: SVLOG_Cache ## RequiredDeps: SVUI -## X-SVUI: SVLogs +## LoadOnDemand: 1 +## X-SVUI-Header: Log O Matic +## X-SVUI-Schema: SVLogs SVUI_LogOMatic.lua diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua index 4b2f522..0e85f02 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua @@ -75,7 +75,7 @@ PLUGIN.OptionsCache = { }, } } -PLUGIN.Debugging = false +PLUGIN.Debugging = true --[[ ########################################################## CORE FUNCTIONS @@ -112,7 +112,6 @@ function PLUGIN:LoadAlert(MainText, Function) end function PLUGIN:Style(style, fn, ...) - -- self.Debugging = false local pass, error = pcall(fn, ...) if(pass and (not style:find("Blizzard")) and not self.StyledAddons[style]) then self.StyledAddons[style] = true @@ -121,6 +120,7 @@ function PLUGIN:Style(style, fn, ...) elseif(self.Debugging and error) then SuperVillain:Debugger(errorMessage:format(VERSION, style, error)) end + --self.Debugging = false end function PLUGIN:IsAddonReady(addon, ...) @@ -380,322 +380,6 @@ end BUILD FUNCTION ########################################################## ]]-- -local function LoadOptions() - SuperVillain.Options.args.plugins.args.pluginOptions.args[SCHEMA]={ - type = "group", - name = L["Style O Matic"], - childGroups = "tree", - args = { - intro = { - order = 1, - type = "description", - name = L["ART_DESC"] - }, - blizzardEnable = { - 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 - }, - addonEnable = { - 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 - }, - blizzard = { - 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, - guiInline = true, - args = { - bmah = { - type = "toggle", - name = L["Black Market AH"], - desc = L["TOGGLEART_DESC"] - }, - chat = { - type = "toggle", - name = L["Chat Menus"], - desc = L["TOGGLEART_DESC"] - }, - transmogrify = { - type = "toggle", - name = L["Transmogrify Frame"], - desc = L["TOGGLEART_DESC"] - }, - encounterjournal = { - type = "toggle", - name = L["Encounter Journal"], - desc = L["TOGGLEART_DESC"] - }, - reforge = { - type = "toggle", - name = L["Reforge Frame"], - desc = L["TOGGLEART_DESC"] - }, - calendar = { - type = "toggle", - name = L["Calendar Frame"], - desc = L["TOGGLEART_DESC"] - }, - achievement = { - type = "toggle", - name = L["Achievement Frame"], - desc = L["TOGGLEART_DESC"] - }, - lfguild = { - type = "toggle", - name = L["LF Guild Frame"], - desc = L["TOGGLEART_DESC"] - }, - inspect = { - type = "toggle", - name = L["Inspect Frame"], - desc = L["TOGGLEART_DESC"] - }, - binding = { - type = "toggle", - name = L["KeyBinding Frame"], - desc = L["TOGGLEART_DESC"] - }, - gbank = { - type = "toggle", - name = L["Guild Bank"], - desc = L["TOGGLEART_DESC"] - }, - archaeology = { - type = "toggle", - name = L["Archaeology Frame"], - desc = L["TOGGLEART_DESC"] - }, - guildcontrol = { - type = "toggle", - name = L["Guild Control Frame"], - desc = L["TOGGLEART_DESC"] - }, - guild = { - type = "toggle", - name = L["Guild Frame"], - desc = L["TOGGLEART_DESC"] - }, - tradeskill = { - type = "toggle", - name = L["TradeSkill Frame"], - desc = L["TOGGLEART_DESC"] - }, - raid = { - type = "toggle", - name = L["Raid Frame"], - desc = L["TOGGLEART_DESC"] - }, - talent = { - type = "toggle", - name = L["Talent Frame"], - desc = L["TOGGLEART_DESC"] - }, - auctionhouse = { - type = "toggle", - name = L["Auction Frame"], - desc = L["TOGGLEART_DESC"] - }, - timemanager = { - type = "toggle", - name = L["Time Manager"], - desc = L["TOGGLEART_DESC"] - }, - barber = { - type = "toggle", - name = L["Barbershop Frame"], - desc = L["TOGGLEART_DESC"] - }, - macro = { - type = "toggle", - name = L["Macro Frame"], - desc = L["TOGGLEART_DESC"] - }, - debug = { - type = "toggle", - name = L["Debug Tools"], - desc = L["TOGGLEART_DESC"] - }, - trainer = { - type = "toggle", - name = L["Trainer Frame"], - desc = L["TOGGLEART_DESC"] - }, - socket = { - type = "toggle", - name = L["Socket Frame"], - desc = L["TOGGLEART_DESC"] - }, - alertframes = { - type = "toggle", - name = L["Alert Frames"], - desc = L["TOGGLEART_DESC"] - }, - loot = { - type = "toggle", - name = L["Loot Frames"], - desc = L["TOGGLEART_DESC"] - }, - bgscore = { - type = "toggle", - name = L["BG Score"], - desc = L["TOGGLEART_DESC"] - }, - merchant = { - type = "toggle", - name = L["Merchant Frame"], - desc = L["TOGGLEART_DESC"] - }, - mail = { - type = "toggle", - name = L["Mail Frame"], - desc = L["TOGGLEART_DESC"] - }, - help = { - type = "toggle", - name = L["Help Frame"], - desc = L["TOGGLEART_DESC"] - }, - trade = { - type = "toggle", - name = L["Trade Frame"], - desc = L["TOGGLEART_DESC"] - }, - gossip = { - type = "toggle", - name = L["Gossip Frame"], - desc = L["TOGGLEART_DESC"] - }, - greeting = { - type = "toggle", - name = L["Greeting Frame"], - desc = L["TOGGLEART_DESC"] - }, - worldmap = { - type = "toggle", - name = L["World Map"], - desc = L["TOGGLEART_DESC"] - }, - taxi = { - type = "toggle", - name = L["Taxi Frame"], - desc = L["TOGGLEART_DESC"] - }, - lfg = { - type = "toggle", - name = L["LFG Frame"], - desc = L["TOGGLEART_DESC"] - }, - mounts = { - type = "toggle", - name = L["Mounts & Pets"], - desc = L["TOGGLEART_DESC"] - }, - quest = { - type = "toggle", - name = L["Quest Frames"], - desc = L["TOGGLEART_DESC"] - }, - petition = { - type = "toggle", - name = L["Petition Frame"], - desc = L["TOGGLEART_DESC"] - }, - dressingroom = { - type = "toggle", - name = L["Dressing Room"], - desc = L["TOGGLEART_DESC"] - }, - pvp = { - type = "toggle", - name = L["PvP Frames"], - desc = L["TOGGLEART_DESC"] - }, - nonraid = { - type = "toggle", - name = L["Non-Raid Frame"], - desc = L["TOGGLEART_DESC"] - }, - friends = { - type = "toggle", - name = L["Friends"], - desc = L["TOGGLEART_DESC"] - }, - spellbook = { - type = "toggle", - name = L["Spellbook"], - desc = L["TOGGLEART_DESC"] - }, - character = { - type = "toggle", - name = L["Character Frame"], - desc = L["TOGGLEART_DESC"] - }, - misc = { - type = "toggle", - name = L["Misc Frames"], - desc = L["TOGGLEART_DESC"] - }, - tabard = { - type = "toggle", - name = L["Tabard Frame"], - desc = L["TOGGLEART_DESC"] - }, - guildregistrar = { - type = "toggle", - name = L["Guild Registrar"], - desc = L["TOGGLEART_DESC"] - }, - bags = { - type = "toggle", - name = L["Bags"], - desc = L["TOGGLEART_DESC"] - }, - stable = { - type = "toggle", - name = L["Stable"], - desc = L["TOGGLEART_DESC"] - }, - bgmap = { - type = "toggle", - name = L["BG Map"], - desc = L["TOGGLEART_DESC"] - }, - petbattleui = { - type = "toggle", - name = L["Pet Battle"], - desc = L["TOGGLEART_DESC"] - }, - losscontrol = { - type = "toggle", - name = L["Loss Control"], - desc = L["TOGGLEART_DESC"] - }, - voidstorage = { - type = "toggle", - name = L["Void Storage"], - desc = L["TOGGLEART_DESC"] - }, - itemUpgrade = { - type = "toggle", - name = L["Item Upgrade"], - desc = L["TOGGLEART_DESC"] - } - } - }, - addons = PLUGIN.OptionsCache - } - } -end - function PLUGIN:Load() self.db = SuperVillain.db[SCHEMA] @@ -730,7 +414,311 @@ function PLUGIN:Load() NewHook(SuperVillain, "ReloadDocklets", RegisterAddonDocklets); SuperVillain:ReloadDocklets(); SuperVillain.DynamicOptions[SCHEMA] = {key = "addons", data = self.OptionsCache}; - LoadOptions() + + 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 + } + 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 + } + 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, + guiInline = true, + args = { + bmah = { + type = "toggle", + name = L["Black Market AH"], + desc = L["TOGGLEART_DESC"] + }, + chat = { + type = "toggle", + name = L["Chat Menus"], + desc = L["TOGGLEART_DESC"] + }, + transmogrify = { + type = "toggle", + name = L["Transmogrify Frame"], + desc = L["TOGGLEART_DESC"] + }, + encounterjournal = { + type = "toggle", + name = L["Encounter Journal"], + desc = L["TOGGLEART_DESC"] + }, + reforge = { + type = "toggle", + name = L["Reforge Frame"], + desc = L["TOGGLEART_DESC"] + }, + calendar = { + type = "toggle", + name = L["Calendar Frame"], + desc = L["TOGGLEART_DESC"] + }, + achievement = { + type = "toggle", + name = L["Achievement Frame"], + desc = L["TOGGLEART_DESC"] + }, + lfguild = { + type = "toggle", + name = L["LF Guild Frame"], + desc = L["TOGGLEART_DESC"] + }, + inspect = { + type = "toggle", + name = L["Inspect Frame"], + desc = L["TOGGLEART_DESC"] + }, + binding = { + type = "toggle", + name = L["KeyBinding Frame"], + desc = L["TOGGLEART_DESC"] + }, + gbank = { + type = "toggle", + name = L["Guild Bank"], + desc = L["TOGGLEART_DESC"] + }, + archaeology = { + type = "toggle", + name = L["Archaeology Frame"], + desc = L["TOGGLEART_DESC"] + }, + guildcontrol = { + type = "toggle", + name = L["Guild Control Frame"], + desc = L["TOGGLEART_DESC"] + }, + guild = { + type = "toggle", + name = L["Guild Frame"], + desc = L["TOGGLEART_DESC"] + }, + tradeskill = { + type = "toggle", + name = L["TradeSkill Frame"], + desc = L["TOGGLEART_DESC"] + }, + raid = { + type = "toggle", + name = L["Raid Frame"], + desc = L["TOGGLEART_DESC"] + }, + talent = { + type = "toggle", + name = L["Talent Frame"], + desc = L["TOGGLEART_DESC"] + }, + auctionhouse = { + type = "toggle", + name = L["Auction Frame"], + desc = L["TOGGLEART_DESC"] + }, + timemanager = { + type = "toggle", + name = L["Time Manager"], + desc = L["TOGGLEART_DESC"] + }, + barber = { + type = "toggle", + name = L["Barbershop Frame"], + desc = L["TOGGLEART_DESC"] + }, + macro = { + type = "toggle", + name = L["Macro Frame"], + desc = L["TOGGLEART_DESC"] + }, + debug = { + type = "toggle", + name = L["Debug Tools"], + desc = L["TOGGLEART_DESC"] + }, + trainer = { + type = "toggle", + name = L["Trainer Frame"], + desc = L["TOGGLEART_DESC"] + }, + socket = { + type = "toggle", + name = L["Socket Frame"], + desc = L["TOGGLEART_DESC"] + }, + alertframes = { + type = "toggle", + name = L["Alert Frames"], + desc = L["TOGGLEART_DESC"] + }, + loot = { + type = "toggle", + name = L["Loot Frames"], + desc = L["TOGGLEART_DESC"] + }, + bgscore = { + type = "toggle", + name = L["BG Score"], + desc = L["TOGGLEART_DESC"] + }, + merchant = { + type = "toggle", + name = L["Merchant Frame"], + desc = L["TOGGLEART_DESC"] + }, + mail = { + type = "toggle", + name = L["Mail Frame"], + desc = L["TOGGLEART_DESC"] + }, + help = { + type = "toggle", + name = L["Help Frame"], + desc = L["TOGGLEART_DESC"] + }, + trade = { + type = "toggle", + name = L["Trade Frame"], + desc = L["TOGGLEART_DESC"] + }, + gossip = { + type = "toggle", + name = L["Gossip Frame"], + desc = L["TOGGLEART_DESC"] + }, + greeting = { + type = "toggle", + name = L["Greeting Frame"], + desc = L["TOGGLEART_DESC"] + }, + worldmap = { + type = "toggle", + name = L["World Map"], + desc = L["TOGGLEART_DESC"] + }, + taxi = { + type = "toggle", + name = L["Taxi Frame"], + desc = L["TOGGLEART_DESC"] + }, + lfg = { + type = "toggle", + name = L["LFG Frame"], + desc = L["TOGGLEART_DESC"] + }, + mounts = { + type = "toggle", + name = L["Mounts & Pets"], + desc = L["TOGGLEART_DESC"] + }, + quest = { + type = "toggle", + name = L["Quest Frames"], + desc = L["TOGGLEART_DESC"] + }, + petition = { + type = "toggle", + name = L["Petition Frame"], + desc = L["TOGGLEART_DESC"] + }, + dressingroom = { + type = "toggle", + name = L["Dressing Room"], + desc = L["TOGGLEART_DESC"] + }, + pvp = { + type = "toggle", + name = L["PvP Frames"], + desc = L["TOGGLEART_DESC"] + }, + nonraid = { + type = "toggle", + name = L["Non-Raid Frame"], + desc = L["TOGGLEART_DESC"] + }, + friends = { + type = "toggle", + name = L["Friends"], + desc = L["TOGGLEART_DESC"] + }, + spellbook = { + type = "toggle", + name = L["Spellbook"], + desc = L["TOGGLEART_DESC"] + }, + character = { + type = "toggle", + name = L["Character Frame"], + desc = L["TOGGLEART_DESC"] + }, + misc = { + type = "toggle", + name = L["Misc Frames"], + desc = L["TOGGLEART_DESC"] + }, + tabard = { + type = "toggle", + name = L["Tabard Frame"], + desc = L["TOGGLEART_DESC"] + }, + guildregistrar = { + type = "toggle", + name = L["Guild Registrar"], + desc = L["TOGGLEART_DESC"] + }, + bags = { + type = "toggle", + name = L["Bags"], + desc = L["TOGGLEART_DESC"] + }, + stable = { + type = "toggle", + name = L["Stable"], + desc = L["TOGGLEART_DESC"] + }, + bgmap = { + type = "toggle", + name = L["BG Map"], + desc = L["TOGGLEART_DESC"] + }, + petbattleui = { + type = "toggle", + name = L["Pet Battle"], + desc = L["TOGGLEART_DESC"] + }, + losscontrol = { + type = "toggle", + name = L["Loss Control"], + desc = L["TOGGLEART_DESC"] + }, + voidstorage = { + type = "toggle", + name = L["Void Storage"], + desc = L["TOGGLEART_DESC"] + }, + itemUpgrade = { + type = "toggle", + name = L["Item Upgrade"], + desc = L["TOGGLEART_DESC"] + } + } + } + self:AddOption("blizzard", option) + self:AddOption("addons", self.OptionsCache) self:RegisterEvent("PLAYER_ENTERING_WORLD"); self:RegisterEvent("ADDON_LOADED"); diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc index 4119ec7..5e92d6a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc @@ -5,6 +5,7 @@ ## Notes: Supervillain UI [|cff9911FFAddon Skins|r]. ## RequiredDeps: SVUI ## OptionalDeps: Blizzard_DebugTools, Blizzard_PetJournal, SharedMedia -## X-SVUI: SVStyle +## X-SVUI-Header: Style O Matic +## X-SVUI-Schema: SVStyle SVUI_StyleOMatic.xml diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua index 94fd1a6..aea98b8 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua @@ -42,6 +42,78 @@ local AchievementTextureList = { "AchievementFrameComparison" } +local AchievementItemButtons = { + "AchievementFrameAchievementsContainerButton1", + "AchievementFrameAchievementsContainerButton2", + "AchievementFrameAchievementsContainerButton3", + "AchievementFrameAchievementsContainerButton4", + "AchievementFrameAchievementsContainerButton5", + "AchievementFrameAchievementsContainerButton6", + "AchievementFrameAchievementsContainerButton7", +} + +local _hook_DescriptionColor = function(self, r, g, b) + if(r ~= 0.6 or g ~= 0.6 or b ~= 0.6) then + self:SetTextColor(0.6, 0.6, 0.6) + end +end + +local _hook_HiddenDescriptionColor = function(self, r, g, b) + if(r ~= 1 or g ~= 1 or b ~= 1) then + self:SetTextColor(1, 1, 1) + end +end + +local _hook_TrackingPoint = function(self, anchor, parent, relative, x, y) + local actual = self.ListParent + if(anchor ~= "BOTTOMLEFT" or parent ~= actual or relative ~= "BOTTOMLEFT" or x ~= 5 or y ~= 5) then + self:ClearAllPoints() + self:Point("BOTTOMLEFT", actual, "BOTTOMLEFT", 5, 5) + end +end + +local _hook_AchievementsUpdate = function() + for i = 1, ACHIEVEMENTUI_MAX_SUMMARY_ACHIEVEMENTS do + local globalName = ("AchievementFrameSummaryAchievement%d"):format(i) + local summary = _G[globalName] + if(summary) then + summary:Formula409() + summary:SetButtonTemplate() + + local highlight = _G[("%sHighlight"):format(globalName)] + local desc = _G[("%sDescription"):format(globalName)] + local icon = _G[("%sIcon"):format(globalName)] + local iconbling = _G[("%sIconBling"):format(globalName)] + local iconover = _G[("%sIconOverlay"):format(globalName)] + local icontex = _G[("%sIconTexture"):format(globalName)] + + if(highlight) then highlight:MUNG() 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(icontex) then + icontex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + icontex:FillInner() + end + if(icon and not icon.Panel) then + icon:SetFixedPanelTemplate("Slot") + icon:Height(icon:GetHeight() - 14) + icon:Width(icon:GetWidth() - 14) + icon:ClearAllPoints() + icon:Point("LEFT", 6, 0) + end + + if summary.accountWide then + summary:SetBackdropBorderColor(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) + else + summary:SetBackdropBorderColor(0,0,0,1) + end + end + end + + collectgarbage("collect"); +end + local function BarStyleHelper(bar) bar:Formula409() bar:SetStatusBarTexture(SuperVillain.Media.bar.default) @@ -89,6 +161,8 @@ local function AchievementStyle() STYLE:ApplyWindowHolder(AchievementFrame) + AchievementFrameSummaryAchievements:Formula409(true) + AchievementFrameSummaryAchievements:SetBasicPanel() AchievementFrameHeaderTitle:ClearAllPoints() AchievementFrameHeaderTitle:Point("TOPLEFT", AchievementFrame.Panel, "TOPLEFT", -30, -8) AchievementFrameHeaderPoints:ClearAllPoints() @@ -107,9 +181,12 @@ local function AchievementStyle() STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonContainerScrollBar, 5) STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonStatsContainerScrollBar, 5) - for f = 1, 3 do - STYLE:ApplyTabStyle(_G["AchievementFrameTab"..f]) - _G["AchievementFrameTab"..f]:SetFrameLevel(_G["AchievementFrameTab"..f]:GetFrameLevel() + 2) + for i = 1, 3 do + local tab = _G["AchievementFrameTab"..i] + if(tab) then + STYLE:ApplyTabStyle(tab) + tab:SetFrameLevel(tab:GetFrameLevel() + 2) + end end BarStyleHelper(AchievementFrameSummaryCategoriesStatusBar) @@ -131,178 +208,158 @@ local function AchievementStyle() _G[j:GetName().."Middle"]:SetAllPoints(d) end - AchievementFrame:HookScript("OnShow", function(k) - if k.containerStyleed then - return + AchievementFrame:HookScript("OnShow", function(self) + if(self.containerStyled) then return end + for i = 1, 20 do + STYLE:ApplyItemButtonStyle(_G["AchievementFrameCategoriesContainerButton"..i]) end - for f = 1, 20 do - local d = _G["AchievementFrameCategoriesContainerButton"..f] - STYLE:ApplyItemButtonStyle(d) - end - k.containerStyleed = true + self.containerStyled = true end) - hooksecurefunc("AchievementButton_DisplayAchievement", function(d) - if d.accountWide and d.bg3 then - d.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - elseif d.bg3 then - d.bg3:SetTexture(0,0,0,1) + hooksecurefunc("AchievementButton_DisplayAchievement", function(self) + if(self.accountWide and self.bg3) then + self.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) + elseif self.bg3 then + self.bg3:SetTexture(0,0,0,1) end end) - hooksecurefunc("AchievementFrameSummary_UpdateAchievements", function() - - for i = 1, ACHIEVEMENTUI_MAX_SUMMARY_ACHIEVEMENTS do - local globalName = ("AchievementFrameSummaryAchievement%d"):format(i) - local summary = _G[globalName] - if(summary) then - summary:Formula409() - summary:SetButtonTemplate() - - local highlight = _G[("%sHighlight"):format(globalName)] - local desc = _G[("%sDescription"):format(globalName)] - local icon = _G[("%sIcon"):format(globalName)] - local iconbling = _G[("%sIconBling"):format(globalName)] - local iconover = _G[("%sIconOverlay"):format(globalName)] - local icontex = _G[("%sIconTexture"):format(globalName)] - - if(highlight) then highlight:MUNG() 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(icontex) then - icontex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - icontex:FillInner() - end - if(icon and not icon.Panel) then - icon:SetFixedPanelTemplate("Slot") - icon:Height(icon:GetHeight() - 14) - icon:Width(icon:GetWidth() - 14) - icon:ClearAllPoints() - icon:Point("LEFT", 6, 0) - end + hooksecurefunc("AchievementFrameSummary_UpdateAchievements", _hook_AchievementsUpdate) - if summary.accountWide then - summary:SetBackdropBorderColor(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - else - summary:SetBackdropBorderColor(0,0,0,1) + for i = 1, #AchievementItemButtons do + local gName = AchievementItemButtons[i] + local button = _G[gName] + + if(button) then + local hl = _G[gName.."Highlight"] + local desc = _G[gName.."Description"] + local hdesc = _G[gName.."HiddenDescription"] + local icon = _G[gName.."Icon"] + local track = _G[gName.."Tracked"] + + if(hl) then hl:MUNG() end + + button:Formula409(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: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:WrapOuter(1) + + if(desc) then + desc:SetTextColor(0.6, 0.6, 0.6) + hooksecurefunc(desc, "SetTextColor", _hook_DescriptionColor) + end + + if(hdesc) then + hdesc:SetTextColor(1, 1, 1) + hooksecurefunc(hdesc, "SetTextColor", _hook_HiddenDescriptionColor) + end + + if(icon) then + local bling = _G[gName.."IconBling"] + local over = _G[gName.."IconOverlay"] + local tex = _G[gName.."IconTexture"] + if(bling) then bling:MUNG() end + if(over) then over:MUNG() end + if(tex) then + tex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + tex:FillInner() end + + icon:SetFixedPanelTemplate("Default") + icon:Height(icon:GetHeight()-14) + icon:Width(icon:GetWidth()-14) + icon:ClearAllPoints() + icon:Point("LEFT", 6, 0) + end + + if(track) then + track:Formula409() + track:SetCheckboxTemplate(true) + track:ClearAllPoints() + track:Point("BOTTOMLEFT", d, "BOTTOMLEFT", -1, -3) + track.ListParent = button + + hooksecurefunc(track, "SetPoint", _hook_TrackingPoint) end end - - collectgarbage("collect"); - end) + end - --AchievementFrameAchievementsContainerScrollChild:SetFixedPanelTemplate("Button") - for f = 1, 7 do - local d = _G["AchievementFrameAchievementsContainerButton"..f] - _G["AchievementFrameAchievementsContainerButton"..f.."Highlight"]:MUNG() - d:Formula409(true) - d.bg1 = d:CreateTexture(nil, "BACKGROUND", nil, 4) - d.bg1:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - d.bg1:SetVertexColor(unpack(SuperVillain.Media.color.default)) - d.bg1:Point("TOPLEFT", 1, -1) - d.bg1:Point("BOTTOMRIGHT", -1, 1) - d.bg3 = d:CreateTexture(nil, "BACKGROUND", nil, 2) - d.bg3:SetTexture(SuperVillain.Media.color.button) - d.bg3:WrapOuter(1); - _G["AchievementFrameAchievementsContainerButton"..f.."Description"]:SetTextColor(0.6, 0.6, 0.6) - hooksecurefunc(_G["AchievementFrameAchievementsContainerButton"..f.."Description"], "SetTextColor", function(k, m, n, o) - if m ~= 0.6 or n ~= 0.6 or o ~= 0.6 then - k:SetTextColor(0.6, 0.6, 0.6) - end - end) - _G["AchievementFrameAchievementsContainerButton"..f.."HiddenDescription"]:SetTextColor(1, 1, 1) - hooksecurefunc(_G["AchievementFrameAchievementsContainerButton"..f.."HiddenDescription"], "SetTextColor", function(k, m, n, o) - if m ~= 1 or n ~= 1 or o ~= 1 then - k:SetTextColor(1, 1, 1) + local u = {"Player", "Friend"} + for c, v in pairs(u) do + for f = 1, 9 do + local d = "AchievementFrameComparisonContainerButton"..f..v; + _G[d]:Formula409() + _G[d.."Background"]:MUNG() + if _G[d.."Description"]then + _G[d.."Description"]:SetTextColor(0.6, 0.6, 0.6) + hooksecurefunc(_G[d.."Description"], "SetTextColor", _hook_DescriptionColor) end - end) - _G["AchievementFrameAchievementsContainerButton"..f.."IconBling"]:MUNG() - _G["AchievementFrameAchievementsContainerButton"..f.."IconOverlay"]:MUNG() - _G["AchievementFrameAchievementsContainerButton"..f.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G["AchievementFrameAchievementsContainerButton"..f.."IconTexture"]:FillInner() - - _G["AchievementFrameAchievementsContainerButton"..f.."Icon"]:SetFixedPanelTemplate("Default") - _G["AchievementFrameAchievementsContainerButton"..f.."Icon"]:Height(_G["AchievementFrameAchievementsContainerButton"..f.."Icon"]:GetHeight()-14) - _G["AchievementFrameAchievementsContainerButton"..f.."Icon"]:Width(_G["AchievementFrameAchievementsContainerButton"..f.."Icon"]:GetWidth()-14) - _G["AchievementFrameAchievementsContainerButton"..f.."Icon"]:ClearAllPoints() - _G["AchievementFrameAchievementsContainerButton"..f.."Icon"]:Point("LEFT", 6, 0) - - _G["AchievementFrameAchievementsContainerButton"..f.."Tracked"]:Formula409() - _G["AchievementFrameAchievementsContainerButton"..f.."Tracked"]:SetCheckboxTemplate(true) - _G["AchievementFrameAchievementsContainerButton"..f.."Tracked"]:ClearAllPoints() - _G["AchievementFrameAchievementsContainerButton"..f.."Tracked"]:Point("BOTTOMLEFT", d, "BOTTOMLEFT", -1, -3) - hooksecurefunc(_G["AchievementFrameAchievementsContainerButton"..f.."Tracked"], "SetPoint", function(k, p, q, r, s, t) - if p ~= "BOTTOMLEFT" or q ~= d or r ~= "BOTTOMLEFT" or s ~= 5 or t ~= 5 then - k:ClearAllPoints() - k:Point("BOTTOMLEFT", d, "BOTTOMLEFT", 5, 5) + _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:Point("TOPLEFT", 4, -4) + _G[d].bg1:Point("BOTTOMRIGHT", -4, 4) + _G[d].bg2 = _G[d]:CreateTexture(nil, "BACKGROUND") + _G[d].bg2:SetDrawLayer("BACKGROUND", 3) + _G[d].bg2:SetTexture(0, 0, 0) + _G[d].bg2:Point("TOPLEFT", 3, -3) + _G[d].bg2:Point("BOTTOMRIGHT", -3, 3) + _G[d].bg3 = _G[d]:CreateTexture(nil, "BACKGROUND") + _G[d].bg3:SetDrawLayer("BACKGROUND", 2) + _G[d].bg3:SetTexture(0,0,0,1) + _G[d].bg3:Point("TOPLEFT", 2, -2) + _G[d].bg3:Point("BOTTOMRIGHT", -2, 2) + _G[d].bg4 = _G[d]:CreateTexture(nil, "BACKGROUND") + _G[d].bg4:SetDrawLayer("BACKGROUND", 1) + _G[d].bg4:SetTexture(0, 0, 0) + _G[d].bg4:Point("TOPLEFT", 1, -1) + _G[d].bg4:Point("BOTTOMRIGHT", -1, 1) + + if v == "Friend"then + _G[d.."Shield"]:Point("TOPRIGHT", _G["AchievementFrameComparisonContainerButton"..f.."Friend"], "TOPRIGHT", -20, -3) end - end) - end - local u = {"Player", "Friend"} - for c, v in pairs(u)do for f = 1, 9 do local d = "AchievementFrameComparisonContainerButton"..f..v;_G[d]:Formula409() - _G[d.."Background"]:MUNG() - if _G[d.."Description"]then - _G[d.."Description"]:SetTextColor(0.6, 0.6, 0.6) - hooksecurefunc(_G[d.."Description"], "SetTextColor", function(k, m, n, o) - if m ~= 0.6 or n ~= 0.6 or o ~= 0.6 then - k:SetTextColor(0.6, 0.6, 0.6) - end - end) + + _G[d.."IconBling"]:MUNG() + _G[d.."IconOverlay"]:MUNG() + _G[d.."Icon"]:SetFixedPanelTemplate("Default") + _G[d.."Icon"]:Height(_G[d.."Icon"]:GetHeight()-14) + _G[d.."Icon"]:Width(_G[d.."Icon"]:GetWidth()-14) + _G[d.."Icon"]:ClearAllPoints() + _G[d.."Icon"]:Point("LEFT", 6, 0) + _G[d.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) + _G[d.."IconTexture"]:FillInner() end - _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:Point("TOPLEFT", 4, -4) - _G[d].bg1:Point("BOTTOMRIGHT", -4, 4) - _G[d].bg2 = _G[d]:CreateTexture(nil, "BACKGROUND") - _G[d].bg2:SetDrawLayer("BACKGROUND", 3) - _G[d].bg2:SetTexture(0, 0, 0) - _G[d].bg2:Point("TOPLEFT", 3, -3) - _G[d].bg2:Point("BOTTOMRIGHT", -3, 3) - _G[d].bg3 = _G[d]:CreateTexture(nil, "BACKGROUND") - _G[d].bg3:SetDrawLayer("BACKGROUND", 2) - _G[d].bg3:SetTexture(0,0,0,1) - _G[d].bg3:Point("TOPLEFT", 2, -2) - _G[d].bg3:Point("BOTTOMRIGHT", -2, 2) - _G[d].bg4 = _G[d]:CreateTexture(nil, "BACKGROUND") - _G[d].bg4:SetDrawLayer("BACKGROUND", 1) - _G[d].bg4:SetTexture(0, 0, 0) - _G[d].bg4:Point("TOPLEFT", 1, -1) - _G[d].bg4:Point("BOTTOMRIGHT", -1, 1) - if v == "Friend"then - _G[d.."Shield"]:Point("TOPRIGHT", _G["AchievementFrameComparisonContainerButton"..f.."Friend"], "TOPRIGHT", -20, -3) - end - _G[d.."IconBling"]:MUNG() - _G[d.."IconOverlay"]:MUNG() - _G[d.."Icon"]:SetFixedPanelTemplate("Default") - _G[d.."Icon"]:Height(_G[d.."Icon"]:GetHeight()-14) - _G[d.."Icon"]:Width(_G[d.."Icon"]:GetWidth()-14) - _G[d.."Icon"]:ClearAllPoints() - _G[d.."Icon"]:Point("LEFT", 6, 0) - _G[d.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G[d.."IconTexture"]:FillInner() - end - end hooksecurefunc("AchievementFrameComparison_DisplayAchievement", function(i) - local w = i.player;local x = i.friend w.titleBar:MUNG()x.titleBar:MUNG() - if not w.bg3 or not x.bg3 then - return - end + end - if w.accountWide then - w.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - else - w.bg3:SetTexture(0,0,0,1) - end + hooksecurefunc("AchievementFrameComparison_DisplayAchievement", function(i) + local w = i.player; + local x = i.friend + w.titleBar:MUNG() + x.titleBar:MUNG() + if not w.bg3 or not x.bg3 then + return + end + if w.accountWide then + w.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) + else + w.bg3:SetTexture(0,0,0,1) + end - if x.accountWide then - x.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) - else - x.bg3:SetTexture(0,0,0,1) - end + if x.accountWide then + x.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) + else + x.bg3:SetTexture(0,0,0,1) + end end) + for f = 1, 20 do local d = _G["AchievementFrameStatsContainerButton"..f] _G["AchievementFrameStatsContainerButton"..f.."BG"]:SetTexture(1, 1, 1, 0.2) @@ -316,7 +373,8 @@ local function AchievementStyle() _G[d.."HeaderLeft"]:MUNG() _G[d.."HeaderRight"]:MUNG() _G[d.."HeaderMiddle"]:MUNG() - end + end + hooksecurefunc("AchievementButton_GetProgressBar", function(y) local d = _G["AchievementFrameProgressBar"..y] if d then @@ -352,6 +410,7 @@ local function AchievementStyle() end end end) + hooksecurefunc("AchievementObjectives_DisplayCriteria", function(A, B) local C = GetAchievementNumCriteria(B) local D, E = 0, 0; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua index 4bff2f3..8942c42 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua @@ -27,7 +27,9 @@ progressBarHolder:SetPoint("BOTTOM", CastingBarFrame, "TOP", 0, 10) SuperVillain: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 ArchaeologyFrame:Formula409() + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.archaeology ~= true then return end + + ArchaeologyFrame:Formula409() ArchaeologyFrameInset:Formula409() ArchaeologyFrame:SetPanelTemplate("Halftone") ArchaeologyFrame.Panel:SetAllPoints() @@ -49,7 +51,10 @@ local function ArchaeologyStyle() ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetStatusBarColor(0.7, 0.2, 0) ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetFrameLevel(ArchaeologyFrameArtifactPageSolveFrameStatusBar:GetFrameLevel()+2) - ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetPanelTemplate("Default")for b = 1, ARCHAEOLOGY_MAX_COMPLETED_SHOWN do local c = _G["ArchaeologyFrameCompletedPageArtifact"..b] + ArchaeologyFrameArtifactPageSolveFrameStatusBar:SetPanelTemplate("Default") + + 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() @@ -60,7 +65,8 @@ local function ArchaeologyStyle() _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"].backdrop:SetFrameLevel(c:GetFrameLevel()-2) _G["ArchaeologyFrameCompletedPageArtifact"..b.."Icon"]:SetDrawLayer("OVERLAY") end - end + end + ArchaeologyFrameArtifactPageIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) ArchaeologyFrameArtifactPageIcon.backdrop = CreateFrame("Frame", nil, ArchaeologyFrameArtifactPage) ArchaeologyFrameArtifactPageIcon.backdrop:SetFixedPanelTemplate("Default") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua index 1f84431..47c9032 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua @@ -50,7 +50,7 @@ local AuctionBidButtons = { "AuctionsCloseButton", "BrowseResetButton", "AuctionsStackSizeMaxButton", - "AuctionsNumStacksMaxButton" + "AuctionsNumStacksMaxButton", } local AuctionMoneyFields = { "BrowseBidPriceSilver", @@ -79,15 +79,19 @@ 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 - STYLE:ApplyCloseButtonStyle(AuctionFrameCloseButton) - STYLE:ApplyScrollFrameStyle(AuctionsScrollFrameScrollBar) - AuctionFrame:Formula409(true) - AuctionFrame:SetPanelTemplate("Halftone", false, 2) + + STYLE:ApplyWindowHolder(AuctionFrame, false, true) + BrowseFilterScrollFrame:Formula409() BrowseScrollFrame:Formula409() AuctionsScrollFrame:Formula409() BidScrollFrame:Formula409() + + STYLE:ApplyCloseButtonStyle(AuctionFrameCloseButton) + STYLE:ApplyScrollFrameStyle(AuctionsScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(BrowseDropDown) STYLE:ApplyDropdownStyle(PriceDropDown) STYLE:ApplyDropdownStyle(DurationDropDown) @@ -95,7 +99,9 @@ local function AuctionStyle() STYLE:ApplyScrollFrameStyle(BrowseScrollFrameScrollBar) IsUsableCheckButton:SetCheckboxTemplate(true) ShowOnPlayerCheckButton:SetCheckboxTemplate(true) - ExactMatchCheckButton:SetCheckboxTemplate(true) + + --ExactMatchCheckButton:SetCheckboxTemplate(true) + SideDressUpFrame:Formula409(true) SideDressUpFrame:SetPanelTemplate("Halftone") SideDressUpFrame:Point("TOPLEFT", AuctionFrame, "TOPRIGHT", 7, 0) @@ -131,8 +137,11 @@ local function AuctionStyle() STYLE:ApplyPaginationStyle(BrowseNextPageButton) STYLE:ApplyPaginationStyle(BrowsePrevPageButton) - for _,button in pairs(AuctionBidButtons) do - _G[button]:SetButtonTemplate() + for _,gName in pairs(AuctionBidButtons) do + if(_G[gName]) then + _G[gName]:Formula409() + _G[gName]:SetButtonTemplate() + end end AuctionsCloseButton:Point("BOTTOMRIGHT", AuctionFrameAuctions, "BOTTOMRIGHT", 66, 10) @@ -163,9 +172,31 @@ local function AuctionStyle() STYLE:ApplyTabStyle(_G["AuctionFrameTab2"]) STYLE:ApplyTabStyle(_G["AuctionFrameTab3"]) - for h = 1, NUM_FILTERS_TO_DISPLAY do - local i = _G["AuctionFilterButton"..h]i:Formula409() - i:SetButtonTemplate() + AuctionFrameBrowse.bg1 = CreateFrame("Frame", nil, AuctionFrameBrowse) + AuctionFrameBrowse.bg1:Point("TOPLEFT", 20, -103) + AuctionFrameBrowse.bg1:Point("BOTTOMRIGHT", -575, 40) + AuctionFrameBrowse.bg1:SetFixedPanelTemplate("Inset") + + BrowseNoResultsText:SetParent(AuctionFrameBrowse.bg1) + BrowseSearchCountText:SetParent(AuctionFrameBrowse.bg1) + + BrowseResetButton:Point("TOPLEFT", AuctionFrameBrowse, "TOPLEFT", 81, -74) + BrowseSearchButton:Point("TOPRIGHT", AuctionFrameBrowse, "TOPRIGHT", 25, -34) + + AuctionFrameBrowse.bg1:SetFrameLevel(AuctionFrameBrowse.bg1:GetFrameLevel()-1) + BrowseFilterScrollFrame:Height(300) + AuctionFrameBrowse.bg2 = CreateFrame("Frame", nil, AuctionFrameBrowse) + AuctionFrameBrowse.bg2:SetFixedPanelTemplate("Inset") + AuctionFrameBrowse.bg2:Point("TOPLEFT", AuctionFrameBrowse.bg1, "TOPRIGHT", 4, 0) + AuctionFrameBrowse.bg2:Point("BOTTOMRIGHT", AuctionFrame, "BOTTOMRIGHT", -8, 40) + AuctionFrameBrowse.bg2:SetFrameLevel(AuctionFrameBrowse.bg2:GetFrameLevel() - 1) + + for i = 1, NUM_FILTERS_TO_DISPLAY do + local header = _G[("AuctionFilterButton%d"):format(i)] + if(header) then + header:Formula409() + header:SetButtonTemplate() + end end for _,field in pairs(AuctionTextFields)do @@ -196,19 +227,15 @@ local function AuctionStyle() buttonTex:FillInner() end - if(not button.styled) then - button:Formula409() - button:SetButtonTemplate() - end + button:Formula409() + button:SetButtonTemplate() if(buttonItem) then - if(not buttonItem.styled) then - buttonItem:SetButtonTemplate() - buttonItem.Panel:SetAllPoints() - buttonItem:HookScript("OnUpdate", function() - buttonItem:GetNormalTexture():MUNG() - end) - end + buttonItem:SetButtonTemplate() + buttonItem.Panel:SetAllPoints() + buttonItem:HookScript("OnUpdate", function() + buttonItem:GetNormalTexture():MUNG() + end) local highLight = button:GetHighlightTexture() _G["BrowseButton"..h.."Highlight"] = highLight @@ -231,19 +258,15 @@ local function AuctionStyle() buttonTex:FillInner() end - if(not button.styled) then - button:Formula409() - button:SetButtonTemplate() - end + button:Formula409() + button:SetButtonTemplate() if(buttonItem) then - if(not buttonItem.styled) then - buttonItem:SetButtonTemplate() - buttonItem.Panel:SetAllPoints() - buttonItem:HookScript("OnUpdate", function() - buttonItem:GetNormalTexture():MUNG() - end) - end + buttonItem:SetButtonTemplate() + buttonItem.Panel:SetAllPoints() + buttonItem:HookScript("OnUpdate", function() + buttonItem:GetNormalTexture():MUNG() + end) local highLight = button:GetHighlightTexture() _G["AuctionsButton"..h.."Highlight"] = highLight @@ -266,19 +289,15 @@ local function AuctionStyle() buttonTex:FillInner() end - if(not button.styled) then - button:Formula409() - button:SetButtonTemplate() - end + button:Formula409() + button:SetButtonTemplate() if(buttonItem) then - if(not buttonItem.styled) then - buttonItem:SetButtonTemplate() - buttonItem.Panel:SetAllPoints() - buttonItem:HookScript("OnUpdate", function() - buttonItem:GetNormalTexture():MUNG() - end) - end + buttonItem:SetButtonTemplate() + buttonItem.Panel:SetAllPoints() + buttonItem:HookScript("OnUpdate", function() + buttonItem:GetNormalTexture():MUNG() + end) local highLight = button:GetHighlightTexture() _G["BidButton"..h.."Highlight"] = highLight @@ -290,19 +309,6 @@ local function AuctionStyle() end end - AuctionFrameBrowse.bg1 = CreateFrame("Frame", nil, AuctionFrameBrowse) - AuctionFrameBrowse.bg1:SetFixedPanelTemplate("Inset") - AuctionFrameBrowse.bg1:Point("TOPLEFT", 20, -103) - AuctionFrameBrowse.bg1:Point("BOTTOMRIGHT", -575, 40) - BrowseNoResultsText:SetParent(AuctionFrameBrowse.bg1) - BrowseSearchCountText:SetParent(AuctionFrameBrowse.bg1) - AuctionFrameBrowse.bg1:SetFrameLevel(AuctionFrameBrowse.bg1:GetFrameLevel()-1) - BrowseFilterScrollFrame:Height(300) - AuctionFrameBrowse.bg2 = CreateFrame("Frame", nil, AuctionFrameBrowse) - AuctionFrameBrowse.bg2:SetFixedPanelTemplate("Inset") - AuctionFrameBrowse.bg2:Point("TOPLEFT", AuctionFrameBrowse.bg1, "TOPRIGHT", 4, 0) - AuctionFrameBrowse.bg2:Point("BOTTOMRIGHT", AuctionFrame, "BOTTOMRIGHT", -8, 40) - AuctionFrameBrowse.bg2:SetFrameLevel(AuctionFrameBrowse.bg2:GetFrameLevel() - 1) BrowseScrollFrame:Height(300) AuctionFrameBid.bg = CreateFrame("Frame", nil, AuctionFrameBid) AuctionFrameBid.bg:SetFixedPanelTemplate("Inset") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua index 6f34673..5fd48bb 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua @@ -21,6 +21,7 @@ HELPERS ########################################################## ]]-- local format = string.format; +local internalTest = false; local GuildFrameList = { "GuildNewPerksFrame", @@ -63,15 +64,15 @@ local GuildButtonList = { }; local GuildCheckBoxList = { - "Quest", - "Dungeon", - "Raid", - "PvP", - "RP", - "Weekdays", - "Weekends", - "LevelAny", - "LevelMax" + "GuildRecruitmentQuestButton", + "GuildRecruitmentDungeonButton", + "GuildRecruitmentRaidButton", + "GuildRecruitmentPvPButton", + "GuildRecruitmentRPButton", + "GuildRecruitmentWeekdaysButton", + "GuildRecruitmentWeekendsButton", + "GuildRecruitmentLevelAnyButton", + "GuildRecruitmentLevelMaxButton" }; local CalendarIconList = { @@ -190,6 +191,7 @@ local function GuildBankStyle() for b = 1, NUM_GUILDBANK_COLUMNS do if(_G["GuildBankColumn"..b]) then _G["GuildBankColumn"..b]:Formula409() + for d = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do local e = _G["GuildBankColumn"..b.."Button"..d] local icon = _G["GuildBankColumn"..b.."Button"..d.."IconTexture"] @@ -286,69 +288,74 @@ local function GuildFrameStyle() end STYLE:ApplyWindowHolder(GuildFrame) - GuildLevelFrame:MUNG() + STYLE:ApplyCloseButtonStyle(GuildMemberDetailCloseButton) STYLE:ApplyCloseButtonStyle(GuildFrameCloseButton) GuildRewardsFrameVisitText:ClearAllPoints() GuildRewardsFrameVisitText:SetPoint("TOP", GuildRewardsFrame, "TOP", 0, 30) - for _, gName in pairs(GuildFrameList)do - local frame = _G[gName] + for i = 1, #GuildFrameList do + local frame = _G[GuildFrameList[i]] if(frame) then frame:Formula409() end end - GuildNewsBossModel:SetBasicPanel() - GuildNewsBossModelTextFrame:SetPanelTemplate("Default") - GuildNewsBossModelTextFrame.Panel:Point("TOPLEFT", GuildNewsBossModel.Panel, "BOTTOMLEFT", 0, -1) - GuildNewsBossModel:SetPoint("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -43) - - for _, gName in pairs(GuildButtonList)do - local btn = _G[gName] - if(btn) then - btn:Formula409() - btn:SetButtonTemplate() + for i = 1, #GuildButtonList do + local button = _G[GuildButtonList[i]] + if(button) then + button:Formula409(true) + button:SetButtonTemplate() end end - for _, gName in pairs(GuildCheckBoxList)do - if(_G["GuildRecruitment"..gName.."Button"]) then - _G["GuildRecruitment"..gName.."Button"]:SetCheckboxTemplate(true) - end + for i = 1, #GuildCheckBoxList do + local check = _G[GuildCheckBoxList[i]] + if(check) then check:SetCheckboxTemplate(true) end end + for i = 1, 5 do + local tab = _G["GuildFrameTab"..i] + if(tab) then + STYLE:ApplyTabStyle(tab) + if i == 1 then + tab:Point("TOPLEFT", GuildFrame, "BOTTOMLEFT", -10, 3) + end + end + end + + GuildNewsBossModel:SetBasicPanel() + GuildNewsBossModelTextFrame:SetPanelTemplate("Default") + GuildNewsBossModelTextFrame.Panel:Point("TOPLEFT", GuildNewsBossModel.Panel, "BOTTOMLEFT", 0, -1) + GuildNewsBossModel:SetPoint("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -43) + GuildRecruitmentTankButton.checkButton:SetCheckboxTemplate(true) GuildRecruitmentHealerButton.checkButton:SetCheckboxTemplate(true) GuildRecruitmentDamagerButton.checkButton:SetCheckboxTemplate(true) - for b = 1, 5 do - STYLE:ApplyTabStyle(_G["GuildFrameTab"..b]) - if b == 1 then - _G["GuildFrameTab"..b]:Point("TOPLEFT", GuildFrame, "BOTTOMLEFT", -10, 3) - end - end GuildXPFrame:ClearAllPoints() GuildXPFrame:Point("TOP", GuildFrame, "TOP", 0, -40) - STYLE:ApplyScrollFrameStyle(GuildPerksContainerScrollBar, 4) - GuildNewPerksFrame:SetFixedPanelTemplate("FramedTop") + GuildFactionBar:Formula409() 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.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() 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() GuildNextPerkButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) GuildNextPerkButtonIconTexture:ClearAllPoints() @@ -356,8 +363,8 @@ local function GuildFrameStyle() GuildNextPerkButton:SetPanelTemplate("Inset") GuildNextPerkButton.Panel:WrapOuter(GuildNextPerkButtonIconTexture) - GuildRosterContainer:SetFixedPanelTemplate("FramedTop") - STYLE:ApplyScrollFrameStyle(GuildRosterContainerScrollBar, 5) + GuildRosterContainer:SetBasicPanel(-2, 2, -1, -2) + STYLE:ApplyScrollFrameStyle(GuildRosterContainerScrollBar, 4, -4) GuildRosterShowOfflineButton:SetCheckboxTemplate(true) for i = 1, 4 do @@ -368,6 +375,7 @@ local function GuildFrameStyle() end STYLE:ApplyDropdownStyle(GuildRosterViewDropdown, 200) + for i = 1, 14 do local btn = _G["GuildRosterContainerButton"..i.."HeaderButton"] if(btn) then @@ -376,16 +384,6 @@ local function GuildFrameStyle() end end - hooksecurefunc(GuildRoster_Update, function() - for i = 1, 14 do - local btn = _G["GuildRosterContainerButton"..i.."HeaderButton"] - if(btn) then - btn:Formula409() - btn:SetButtonTemplate() - end - end - end) - GuildMemberDetailFrame:SetPanelTemplate("Default", true) GuildMemberNoteBackground:SetBasicPanel() GuildMemberOfficerNoteBackground:SetBasicPanel() @@ -394,12 +392,14 @@ local function GuildFrameStyle() STYLE:ApplyDropdownStyle(GuildMemberRankDropdown, 182) GuildMemberRankDropdown.Panel:SetBackdropColor(0,0,0,1) GuildNewsFrame:Formula409() - GuildNewsContainer:SetFixedPanelTemplate("FramedTop") + GuildNewsContainer:SetBasicPanel(-2, 2, 0, -2) for i = 1, 17 do local btn = _G["GuildNewsContainerButton"..i] - if(btn and btn.header) then - btn.header:MUNG() + if(btn) then + if(btn.header) then btn.header:MUNG() end + btn:Formula409() + btn:SetButtonTemplate() end end @@ -415,8 +415,8 @@ local function GuildFrameStyle() end GuildNewsFiltersFrame:Point("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -20) - STYLE:ApplyScrollFrameStyle(GuildNewsContainerScrollBar, 4) - STYLE:ApplyScrollFrameStyle(GuildInfoDetailsFrameScrollBar, 4) + STYLE:ApplyScrollFrameStyle(GuildNewsContainerScrollBar, 4, 4) + STYLE:ApplyScrollFrameStyle(GuildInfoDetailsFrameScrollBar, 4, 4) for i = 1, 3 do local tab = _G["GuildInfoFrameTab"..i] @@ -442,12 +442,13 @@ local function GuildFrameStyle() GuildRecruitmentCommentInputFrame:SetFixedPanelTemplate("Default") GuildTextEditFrame:SetFixedPanelTemplate("Transparent", true) - STYLE:ApplyScrollFrameStyle(GuildTextEditScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(GuildTextEditScrollFrameScrollBar, 4, 4) GuildTextEditContainer:SetFixedPanelTemplate("Default") local editChildren = GuildTextEditFrame:GetNumChildren() - for b = 1, editChildren do - local child = select(b, GuildTextEditFrame:GetChildren()) + + for i = 1, editChildren do + local child = select(i, GuildTextEditFrame:GetChildren()) if(child:GetName() == "GuildTextEditFrameCloseButton") then if(child:GetWidth() < 33) then STYLE:ApplyCloseButtonStyle(child) @@ -457,12 +458,13 @@ local function GuildFrameStyle() end end - STYLE:ApplyScrollFrameStyle(GuildLogScrollFrameScrollBar, 4) + STYLE:ApplyScrollFrameStyle(GuildLogScrollFrameScrollBar, 4, 4) GuildLogFrame:SetBasicPanel() local logChildren = GuildLogFrame:GetNumChildren() - for b = 1, logChildren do - local child = select(b, GuildLogFrame:GetChildren()) + + for i = 1, logChildren do + local child = select(i, GuildLogFrame:GetChildren()) if child:GetName() == "GuildLogFrameCloseButton" then if(child:GetWidth() < 33) then STYLE:ApplyCloseButtonStyle(child) @@ -472,26 +474,30 @@ local function GuildFrameStyle() end end - GuildRewardsFrame:SetBasicPanel(0,23,3,-3) - STYLE:ApplyScrollFrameStyle(GuildRewardsContainerScrollBar, 5) + GuildRewardsFrame:SetBasicPanel(2, 0, -22, 18) + STYLE:ApplyScrollFrameStyle(GuildRewardsContainerScrollBar, 4, -4) - for b = 1, 8 do - local button = _G["GuildPerksContainerButton"..b] + GuildNewPerksFrame:SetBasicPanel(-1, 0, 1, 0) + GuildPerksContainer:SetBasicPanel(-3, 0, 26, -3) + + STYLE:ApplyScrollFrameStyle(GuildPerksContainerScrollBar, 4, 2) + + for i = 1, 8 do + local button = _G["GuildPerksContainerButton"..i] if button then button:Formula409() if button.icon then + STYLE:ApplyItemButtonStyle(button, nil, true) button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) button.icon:ClearAllPoints() button.icon:Point("TOPLEFT", button, "TOPLEFT", 2, -2) - button:SetFixedPanelTemplate("Button") - button.Panel:WrapOuter(button.icon) button.icon:SetParent(button.Panel) end end end - for b = 1, 8 do - local button = _G["GuildRewardsContainerButton"..b] + for i = 1, 8 do + local button = _G["GuildRewardsContainerButton"..i] if button then button:Formula409() if button.icon then @@ -520,57 +526,73 @@ local function GuildFrameStyle() end local function GuildControlStyle() - if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.guildcontrol~=true then return end + if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.guildcontrol~=true then return end + GuildControlUI:Formula409() GuildControlUIHbar:Formula409() - GuildControlUI:SetFixedPanelTemplate("Halftone") GuildControlUIRankBankFrameInset:Formula409() GuildControlUIRankBankFrameInsetScrollFrame:Formula409() + + STYLE:ApplyWindowHolder(GuildControlUI) + STYLE:ApplyScrollFrameStyle(GuildControlUIRankBankFrameInsetScrollFrameScrollBar) + hooksecurefunc("GuildControlUI_RankOrder_Update",RankOrder_OnUpdate) - GuildControlUIRankOrderFrameNewButton:HookScript("OnClick",function() + + GuildControlUIRankOrderFrameNewButton:HookScript("OnClick", function() SuperVillain:ExecuteTimer(1,RankOrder_OnUpdate) end) + STYLE:ApplyDropdownStyle(GuildControlUINavigationDropDown) STYLE:ApplyDropdownStyle(GuildControlUIRankSettingsFrameRankDropDown,180) GuildControlUINavigationDropDownButton:Width(20) GuildControlUIRankSettingsFrameRankDropDownButton:Width(20) - for b=1,NUM_RANK_FLAGS do - if _G["GuildControlUIRankSettingsFrameCheckbox"..b]then - _G["GuildControlUIRankSettingsFrameCheckbox"..b]:SetCheckboxTemplate(true) - end - end + + for i=1, NUM_RANK_FLAGS do + local check = _G["GuildControlUIRankSettingsFrameCheckbox"..i] + if(check) then check:SetCheckboxTemplate(true) end + end + GuildControlUIRankOrderFrameNewButton:SetButtonTemplate() GuildControlUIRankSettingsFrameGoldBox:SetEditboxTemplate() GuildControlUIRankSettingsFrameGoldBox.Panel:Point("TOPLEFT",-2,-4) GuildControlUIRankSettingsFrameGoldBox.Panel:Point("BOTTOMRIGHT",2,4) GuildControlUIRankSettingsFrameGoldBox:Formula409() GuildControlUIRankBankFrame:Formula409() - local Z=false; + hooksecurefunc("GuildControlUI_BankTabPermissions_Update",function() local tabs = GetNumGuildBankTabs() + if tabs < MAX_BUY_GUILDBANK_TABS then tabs = tabs + 1 + end + + for i=1, tabs do + local tab = _G["GuildControlBankTab"..i.."Owned"] + + if(tab) then + if(tab.tabIcon) then tab.tabIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) end + if(tab.editBox) then tab.editBox:SetEditboxTemplate() end + + if internalTest == false then + _G["GuildControlBankTab"..i.."BuyPurchaseButton"]:SetButtonTemplate() + _G["GuildControlBankTab"..i.."OwnedStackBox"]:SetEditboxTemplate() + _G["GuildControlBankTab"..i.."OwnedViewCheck"]:SetCheckboxTemplate(true) + _G["GuildControlBankTab"..i.."OwnedDepositCheck"]:SetCheckboxTemplate(true) + _G["GuildControlBankTab"..i.."OwnedUpdateInfoCheck"]:SetCheckboxTemplate(true) + + GCTabHelper(_G["GuildControlBankTab"..i.."OwnedStackBox"]) + GCTabHelper(_G["GuildControlBankTab"..i.."OwnedViewCheck"]) + GCTabHelper(_G["GuildControlBankTab"..i.."OwnedDepositCheck"]) + GCTabHelper(_G["GuildControlBankTab"..i.."OwnedUpdateInfoCheck"]) + end + end end - for b=1,tabs do - local f=_G["GuildControlBankTab"..b.."Owned"] - local icon=f.tabIcon; - local a0=f.editBox;icon:SetTexCoord(0.1,0.9,0.1,0.9 ) - if Z==false then - _G["GuildControlBankTab"..b.."BuyPurchaseButton"]:SetButtonTemplate() - _G["GuildControlBankTab"..b.."OwnedStackBox"]:SetEditboxTemplate() - _G["GuildControlBankTab"..b.."OwnedViewCheck"]:SetCheckboxTemplate(true) - _G["GuildControlBankTab"..b.."OwnedDepositCheck"]:SetCheckboxTemplate(true) - _G["GuildControlBankTab"..b.."OwnedUpdateInfoCheck"]:SetCheckboxTemplate(true) - GCTabHelper(_G["GuildControlBankTab"..b.."OwnedStackBox"]) - GCTabHelper(_G["GuildControlBankTab"..b.."OwnedViewCheck"]) - GCTabHelper(_G["GuildControlBankTab"..b.."OwnedDepositCheck"]) - GCTabHelper(_G["GuildControlBankTab"..b.."OwnedUpdateInfoCheck"]) - end - end - Z=true + internalTest = true end) - STYLE:ApplyDropdownStyle(GuildControlUIRankBankFrameRankDropDown,180) + + STYLE:ApplyDropdownStyle(GuildControlUIRankBankFrameRankDropDown, 180) + GuildControlUIRankBankFrameRankDropDownButton:Width(20) end @@ -578,17 +600,20 @@ end local function GuildRegistrarStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.guildregistrar ~= true then return - end - GuildRegistrarFrame:Formula409(true) - GuildRegistrarFrame:SetPanelTemplate("Action") + end + + STYLE:ApplyWindowHolder(GuildRegistrarFrame, true, true) + GuildRegistrarFrameInset:MUNG() GuildRegistrarFrameEditBox:Formula409() GuildRegistrarGreetingFrame:Formula409() + GuildRegistrarFrameGoodbyeButton:SetButtonTemplate() GuildRegistrarFrameCancelButton:SetButtonTemplate() GuildRegistrarFramePurchaseButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(GuildRegistrarFrameCloseButton) GuildRegistrarFrameEditBox:SetEditboxTemplate() + for b = 1, GuildRegistrarFrameEditBox:GetNumRegions()do local a2 = select(b, GuildRegistrarFrameEditBox:GetRegions()) if a2 and a2:GetObjectType() == "Texture"then @@ -596,52 +621,66 @@ local function GuildRegistrarStyle() a2:MUNG() end end - end + end + GuildRegistrarFrameEditBox:Height(20) - for b = 1, 2 do - _G["GuildRegistrarButton"..b]:GetFontString():SetTextColor(1, 1, 1) - end + + if(_G["GuildRegistrarButton1"]) then + _G["GuildRegistrarButton1"]:GetFontString():SetTextColor(1, 1, 1) + end + if(_G["GuildRegistrarButton2"]) then + _G["GuildRegistrarButton2"]:GetFontString():SetTextColor(1, 1, 1) + end + GuildRegistrarPurchaseText:SetTextColor(1, 1, 1) AvailableServicesText:SetTextColor(1, 1, 0) end local function LFGuildFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfguild ~= true then return end - for r, I in pairs(LFGFrameList)do - _G[I]:SetCheckboxTemplate(true) - end - LookingForGuildTankButton.checkButton:SetCheckboxTemplate(true) - LookingForGuildHealerButton.checkButton:SetCheckboxTemplate(true) - LookingForGuildDamagerButton.checkButton:SetCheckboxTemplate(true) - LookingForGuildFrameInset:Formula409(false) - LookingForGuildFrame:Formula409() - LookingForGuildFrame:SetPanelTemplate("Action") - LookingForGuildBrowseButton_LeftSeparator:MUNG() - LookingForGuildRequestButton_RightSeparator:MUNG() - STYLE:ApplyScrollFrameStyle(LookingForGuildBrowseFrameContainerScrollBar) - LookingForGuildBrowseButton:SetButtonTemplate() - LookingForGuildRequestButton:SetButtonTemplate() - STYLE:ApplyCloseButtonStyle(LookingForGuildFrameCloseButton) - LookingForGuildCommentInputFrame:SetPanelTemplate("Default") - LookingForGuildCommentInputFrame:Formula409(false) - for u = 1, 5 do - local J = _G["LookingForGuildBrowseFrameContainerButton"..u] - local K = _G["LookingForGuildAppsFrameContainerButton"..u] - J:SetBackdrop(nil) - K:SetBackdrop(nil) - end - for u = 1, 3 do - local tab = _G["LookingForGuildFrameTab"..u] - STYLE:ApplyTabStyle(tab) - tab:SetFrameStrata("HIGH") - tab:SetFrameLevel(99) - end - GuildFinderRequestMembershipFrame:Formula409(true) - GuildFinderRequestMembershipFrame:SetFixedPanelTemplate("Transparent", true) - GuildFinderRequestMembershipFrameAcceptButton:SetButtonTemplate() - GuildFinderRequestMembershipFrameCancelButton:SetButtonTemplate() - GuildFinderRequestMembershipFrameInputFrame:Formula409() - GuildFinderRequestMembershipFrameInputFrame:SetFixedPanelTemplate("Default") + if(SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfguild ~= true) then return end + + STYLE:ApplyWindowHolder(LookingForGuildFrame, true) + + for i = 1, #LFGFrameList do + local check = _G[LFGFrameList[i]] + if(check) then check:SetCheckboxTemplate(true) end + end + + LookingForGuildTankButton.checkButton:SetCheckboxTemplate(true) + LookingForGuildHealerButton.checkButton:SetCheckboxTemplate(true) + LookingForGuildDamagerButton.checkButton:SetCheckboxTemplate(true) + LookingForGuildFrameInset:Formula409(false) + LookingForGuildBrowseButton_LeftSeparator:MUNG() + LookingForGuildRequestButton_RightSeparator:MUNG() + + STYLE:ApplyScrollFrameStyle(LookingForGuildBrowseFrameContainerScrollBar) + LookingForGuildBrowseButton:SetButtonTemplate() + LookingForGuildRequestButton:SetButtonTemplate() + + STYLE:ApplyCloseButtonStyle(LookingForGuildFrameCloseButton) + LookingForGuildCommentInputFrame:SetPanelTemplate("Default") + LookingForGuildCommentInputFrame:Formula409(false) + + for u = 1, 5 do + local J = _G["LookingForGuildBrowseFrameContainerButton"..u] + local K = _G["LookingForGuildAppsFrameContainerButton"..u] + J:SetBackdrop(nil) + K:SetBackdrop(nil) + end + + for u = 1, 3 do + local tab = _G["LookingForGuildFrameTab"..u] + STYLE:ApplyTabStyle(tab) + tab:SetFrameStrata("HIGH") + tab:SetFrameLevel(99) + end + + GuildFinderRequestMembershipFrame:Formula409(true) + GuildFinderRequestMembershipFrame:SetFixedPanelTemplate("Transparent", true) + GuildFinderRequestMembershipFrameAcceptButton:SetButtonTemplate() + GuildFinderRequestMembershipFrameCancelButton:SetButtonTemplate() + GuildFinderRequestMembershipFrameInputFrame:Formula409() + GuildFinderRequestMembershipFrameInputFrame:SetFixedPanelTemplate("Default") end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua index 87a9bc5..3a566a7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua @@ -24,9 +24,11 @@ local function ItemUpgradeStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.itemUpgrade ~= true then return end - ItemUpgradeFrame:Formula409() - ItemUpgradeFrame:SetPanelTemplate("Action") + + STYLE:ApplyWindowHolder(ItemUpgradeFrame, true) + STYLE:ApplyCloseButtonStyle(ItemUpgradeFrameCloseButton) + ItemUpgradeFrameUpgradeButton:Formula409() ItemUpgradeFrameUpgradeButton:SetButtonTemplate() ItemUpgradeFrame.ItemButton:Formula409() ItemUpgradeFrame.ItemButton:SetSlotTemplate(true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua index 780fe61..2b77481 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua @@ -106,7 +106,8 @@ QUEST STYLERS local function QuestGreetingStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.greeting ~= true then return - end + end + QuestFrameGreetingPanel:HookScript("OnShow", function() QuestFrameGreetingPanel:Formula409() QuestFrameGreetingGoodbyeButton:SetButtonTemplate() @@ -117,6 +118,8 @@ end local function QuestFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.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() @@ -220,8 +223,6 @@ local function QuestFrameStyle() QuestRewardScrollFrame:HookScript("OnShow", QuestRewardScrollFrame_OnShow) - STYLE:ApplyWindowHolder(QuestFrame, true) - QuestFrameInset:MUNG() QuestFrameDetailPanel:Formula409(true) QuestDetailScrollFrame:Formula409(true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua index 6147606..d3307d5 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua @@ -30,8 +30,12 @@ local function ReforgingStyle() ReforgingFrameReforgeButton:Point("LEFT", ReforgingFrameRestoreButton, "RIGHT", 2, 0) ReforgingFrameReforgeButton:Point("BOTTOMRIGHT", -3, 3) ReforgingFrame.RestoreMessage:SetTextColor(1, 1, 1) + + ReforgingFrameRestoreButton:Formula409() + ReforgingFrameReforgeButton:Formula409() ReforgingFrameRestoreButton:SetButtonTemplate() ReforgingFrameReforgeButton:SetButtonTemplate() + ReforgingFrame.ItemButton:Formula409() ReforgingFrame.ItemButton:SetSlotTemplate(true) ReforgingFrame.ItemButton.IconTexture:FillInner() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua index b0f778e..dcfde43 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua @@ -60,6 +60,7 @@ local function TransmogStyle() TransmogrifyModelFrame:SetFixedPanelTemplate("Comic") TransmogrifyFrameButtonFrame:GetRegions():MUNG() + TransmogrifyApplyButton:Formula409() TransmogrifyApplyButton:SetButtonTemplate() TransmogrifyApplyButton:Point("BOTTOMRIGHT", TransmogrifyFrame, "BOTTOMRIGHT", -4, 4) STYLE:ApplyCloseButtonStyle(TransmogrifyArtFrameCloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua index 12725f4..97a030b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua @@ -215,7 +215,7 @@ end \______/ \______/ |__/ |__/ \______/ |________/|________/ ########################################################## --]] -function STYLE:ApplyScrollFrameStyle(this, scale) +function STYLE:ApplyScrollFrameStyle(this, scale, yOffset) if(not this or (this and this.StyleHooked)) then return end scale = scale or 5 @@ -248,6 +248,12 @@ function STYLE:ApplyScrollFrameStyle(this, scale) STYLE:ApplyPaginationStyle(upButton) SquareButton_SetIcon(upButton, "UP") upButton:Size(upW + scale, upH + scale) + if(yOffset) then + local anchor, parent, relative, xBase, yBase = upButton:GetPoint() + local yAdjust = (yOffset or 0) + yBase + upButton:ClearAllPoints() + upButton:SetPoint(anchor, parent, relative, xBase, yAdjust) + end end downButton:Formula409() @@ -256,6 +262,12 @@ function STYLE:ApplyScrollFrameStyle(this, scale) STYLE:ApplyPaginationStyle(downButton) SquareButton_SetIcon(downButton, "DOWN") downButton:Size(dnW + scale, dnH + scale) + if(yOffset) then + local anchor, parent, relative, xBase, yBase = downButton:GetPoint() + local yAdjust = ((yOffset or 0) * -1) + yBase + downButton:ClearAllPoints() + downButton:SetPoint(anchor, parent, relative, xBase, yAdjust) + end end if(not this.ScrollBG) then diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua index 63fa980..6988490 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua @@ -632,40 +632,6 @@ end CORE ########################################################## ]]-- -local function LoadOptions() - SuperVillain.Options.args.plugins.args.pluginOptions.args[SCHEMA] = { - type = 'group', - name = L['Tracking Device'], - get = function(key)return SuperVillain.db[SCHEMA][key[#key]]end, - set = function(key, value)PLUGIN:ChangeDBVar(value, key[#key]) end, - args = { - intro = { - order = 1, - type = 'description', - name = L["Options for the tracking device"] - }, - enable = { - type = "toggle", - order = 2, - name = L['Enable'], - desc = L['Enable/Disable the tracking device'], - get = function(key)return SuperVillain.db[SCHEMA][key[#key]] end, - set = function(key, value) SuperVillain.db[SCHEMA].enable = value; SuperVillain:StaticPopup_Show("RL_CLIENT") end - }, - fontSize = { - order = 3, - name = L["Font Size"], - desc = L["Set the font size of the range text"], - type = "range", - min = 6, - max = 22, - step = 1, - set = function(j,value) PLUGIN:ChangeDBVar(value,j[#j]); PLUGIN:UpdateLogWindow()end - } - } - } -end - function PLUGIN:Load() if(not SuperVillain.db[SCHEMA].enable) then print(SCHEMA) return end @@ -679,15 +645,24 @@ function PLUGIN:Load() _TRACKER:SetScript("OnUpdate", Tracker_OnUpdate) self:RegisterEvent("PLAYER_TARGET_CHANGED") - - LoadOptions() end if(_TARGET) then _TARGET:HookScript("OnShow", TargetFrame_OnChange) end - self:InitializeGPS() + local fontSize = { + order = 3, + name = L["Font Size"], + desc = L["Set the font size of the range text"], + type = "range", + min = 6, + max = 22, + step = 1, + set = function(key,value) PLUGIN:ChangeDBVar(value, key[#key]); PLUGIN:UpdateLogWindow()end + } + + self:AddOption("fontSize", fontSize) end CONFIGS[SCHEMA] = { diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc index 7d0a94a..f90895e 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc @@ -4,7 +4,9 @@ ## Title: |cffFF9900SVUI |r|cffFFEF00Tracking Device|r ## Notes: Supervillain UI [|cff9911FFRaid & Party Member Tracking|r]. ## RequiredDeps: SVUI +## LoadOnDemand: 1 ## X-oUF: oUF_SuperVillain -## X-SVUI: SVTracker +## X-SVUI-Header: Tracking Device +## X-SVUI-Schema: SVTracker SVUI_TrackingDevice.xml 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 8f65607..5118c48 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua +++ b/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua @@ -1,3 +1,6 @@ +local oUF = oUF_SuperVillain or oUF +assert(oUF, 'oUF not loaded') + local SuperVillain, L = unpack(SVUI); local PLUGIN = _G.TrackingVillain; @@ -131,9 +134,4 @@ local Disable = function(self) end end -function PLUGIN:InitializeGPS() - local oUF = oUF_SuperVillain or oUF - assert(oUF, 'oUF not loaded') - - oUF:AddElement('GPS', nil, Enable, Disable) -end \ No newline at end of file +oUF:AddElement('GPS', nil, Enable, Disable) \ No newline at end of file