diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua index 8de74bd..f103ae5 100644 --- a/Interface/AddOns/SVUI/SVUI.lua +++ b/Interface/AddOns/SVUI/SVUI.lua @@ -50,8 +50,8 @@ local tsort, tconcat = table.sort, table.concat; ]]-- local SVUI = {}; local SVUINameSpace, SVUICore = ...; -local version = GetAddOnMetadata(..., "Version"); -local build = select(2, GetBuildInfo()); +local SVUIVersion = GetAddOnMetadata(..., "Version"); +local clientVersion, internalVersion, releaseDate, uiVersion = GetBuildInfo(); local playerName = UnitName("player"); local playerRealm = GetRealmName(); local SetAddonCore; @@ -270,7 +270,7 @@ end ############################################################################### ]]-- do - local PackageQueue, PluginQueue, ScriptQueue = {},{},{}; + local ModuleQueue, ScriptQueue = {},{}; local INFO_BY = "%s |cff0099FFby %s|r"; local INFO_VERSION = "%s%s |cff33FF00Version: %s|r"; @@ -472,7 +472,7 @@ do local core = self.___core if(core[schema]) then return end - PackageQueue[#PackageQueue+1] = schema + ModuleQueue[#ModuleQueue+1] = schema self.Modules[#self.Modules+1] = schema core[schema] = SetInternalModule(obj, schema, core) @@ -493,7 +493,7 @@ do local schema = GetAddOnMetadata(addonName, "X-SVUI"); if(not schema or (schema and core[schema])) then return end - PluginQueue[#PluginQueue+1] = schema + ModuleQueue[#ModuleQueue+1] = schema self.Modules[#self.Modules+1] = schema SetPluginString(addonName) @@ -506,8 +506,17 @@ do end end - local Registry_FetchPlugins = function(self) - -- DO STUFF + local Registry_FetchAddons = function(self) + local addonCount = GetNumAddOns() + + for i = 1, addonCount do + local name = GetAddOnInfo(i) + local lod = IsAddOnLoadOnDemand(i) + local schema = GetAddOnMetadata(i, "X-SVUI") + if(lod and schema) then + self.Addons[name] = schema; + end + end end local Registry_RunCallbacks = function(self) @@ -549,12 +558,24 @@ do end end + local Registry_LoadOnDemand = function(self) + local addons = self.Addons + local core = self.___core + for name,schema in pairs(addons) do + local config = core.db[schema] + + if(config and config.enable and not IsAddOnLoaded(name)) then + LoadAddOn(name) + end + end + end + local Registry_Load = function(self) - if not PackageQueue then return end + if not ModuleQueue then return end local core = self.___core - for i=1,#PackageQueue do - local name = PackageQueue[i] + for i=1,#ModuleQueue do + local name = ModuleQueue[i] local obj = core[name] if obj and not obj.initialized then if core.db[name] then @@ -576,7 +597,7 @@ do end end - PackageQueue = nil + ModuleQueue = nil if not ScriptQueue then return end for i=1, #ScriptQueue do @@ -587,14 +608,21 @@ do end ScriptQueue = nil + + self:LoadAddons() end --[[ GLOBAL NAMESPACE ]]-- - function SetAddonCore(obj,n,v) + function SetAddonCore(obj) + local version = GetAddOnMetadata(SVUINameSpace, "Version") + local schema = GetAddOnMetadata(SVUINameSpace, "X-SVUI") + obj = { - ___addonName = n, - ___version = v, + ___addonName = SVUINameSpace, + ___version = version, + ___schema = schema, + ___interface = tonumber(uiVersion), db = {}, Global = { Accountant = {}, @@ -647,7 +675,7 @@ do }, Registry = { Modules = {}, - Plugins = {}, + Addons = {}, Callbacks = {}, INFO_VERSION = INFO_VERSION, INFO_NEW = INFO_NEW, @@ -657,6 +685,8 @@ do NewScript = Registry_NewScript, NewPackage = Registry_NewPackage, NewPlugin = Registry_NewPlugin, + FindAddons = Registry_FetchAddons, + LoadAddons = Registry_LoadOnDemand, RunCallbacks = Registry_RunCallbacks, Update = Registry_Update, UpdateAll = Registry_UpdateAll, @@ -717,7 +747,7 @@ local metawrite = setmetatable({}, { \______/ \______/ |__/ |__/|________/ ########################################################## ]]-- -SVUI = SetAddonCore(SVUI, SVUINameSpace, version) +SVUI = SetAddonCore(SVUI) SVUI.Localization = setmetatable({}, metaread) @@ -812,4 +842,7 @@ SVUICore[2] = SVUI.Localization --[[ SET MASTER GLOBAL ]]-- -_G[SVUINameSpace] = SVUICore; \ No newline at end of file +_G[SVUINameSpace] = SVUICore; + +-- TESTING INTERFACE METADATA +-- /script print(SVUI[1].___interface) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index 8f02ede..d3de9e7 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.02 +## Version: 4.2 ## Title: |cffFF9900SVUI|r ## Notes: Supervillain UI [|cff9911FFCore Framework|r]. ## SavedVariables: SVUI_Global diff --git a/Interface/AddOns/SVUI/libs/LibBalancePowerTracker-1.1/LibBalancePowerTracker-1.1.lua b/Interface/AddOns/SVUI/libs/LibBalancePowerTracker-1.1/LibBalancePowerTracker-1.1.lua index e6a0d04..a8fd0e2 100644 --- a/Interface/AddOns/SVUI/libs/LibBalancePowerTracker-1.1/LibBalancePowerTracker-1.1.lua +++ b/Interface/AddOns/SVUI/libs/LibBalancePowerTracker-1.1/LibBalancePowerTracker-1.1.lua @@ -150,7 +150,7 @@ v 1.0.0 Release --]] local version = {1,1,5}; -if (LibBalancePowerTracker and LibBalancePowerTracker.CompareVersion and LibBalancePowerTracker:CompareVersion(version)) then return; end; +if (LibBalancePowerTracker and LibBalancePowerTracker.CompareVersion and LibBalancePowerTracker:CompareVersion(version)) then return; end if select(4, GetBuildInfo())<50001 then return end --Initialize Global Lib @@ -370,7 +370,7 @@ end local function checkCelestialAligmentBuff() local tim_end = select(7,UnitBuff('player',data.CA.name)) or 0; vars.celestial_lockout_end = tim_end*1000; - return vars.celestial_lockout_end; + return vars.celestial_lockout_end end local function isBalance() return GetSpecialization() == 1 @@ -396,7 +396,7 @@ do --Loading if vars.isDruid and number_callbacks ~= 0 then LBPT.load() end - end; + end --[[loading: energia ok on login @@ -449,7 +449,7 @@ do --Loading function LBPT.ECLIPSE_DIRECTION_CHANGE() LBPT.Reset(true) timers.delayedUpdate:SetCooldown(GetTime(),.05) - end; + end function LBPT.RegisterCombatEvents(balanceNow) if balanceNow then @@ -764,8 +764,8 @@ do --Calling callbacks functions function LBPT.FireCallbacks() for k,v in pairs(callbacks) do v(vars.energy,vars.direction,vars.vEnergy,vars.vDirection,vars.vEclipse); - end; - end; + end + end end do --Called functions (API) @@ -795,7 +795,7 @@ do --Called functions (API) LBPT.unload(); end end - function LibBalancePowerTracker:GetVersion() return version[1],version[2],version[3]; end; + function LibBalancePowerTracker:GetVersion() return version[1],version[2],version[3]; end -- Only used when AC was cast in CA (Who would want to...?, begins to fail when being hit after CA ends but before a energize event fires, pretty low chance, but taken care of anyway) --[[ time 0 1 2 3 4 @@ -983,8 +983,8 @@ do ----DEBUG--------------------- drawn = true; for k,v in pairs(callbacks) do v(vars.energy,vars.direction,vars.vEnergy,vars.vDirection,vars.vEclipse); - end; - end; + end + end combatFrame:SetScript("OnEvent", function(_, event, ...) drawn = false; LBPT.combat[event](...) insert(event,drawn,...) end); frame:SetScript("OnEvent", function(_, event, ...) drawn = false; LBPT[event](...) insert(event,drawn,...) end); diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/portraits.lua b/Interface/AddOns/SVUI/libs/oUF/elements/portraits.lua index b4e7402..66b810b 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/portraits.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/portraits.lua @@ -44,7 +44,7 @@ local Update = function(self, event, unit) color = self.colors.reaction[UnitReaction(unit,"player")] if(color ~= nil) then r,g,b = color[1], color[2], color[3] - end; + end else local _,unitClass = UnitClass(unit) if unitClass then diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/runebar.lua b/Interface/AddOns/SVUI/libs/oUF/elements/runebar.lua index f7e7f61..45f02cb 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/runebar.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/runebar.lua @@ -126,7 +126,7 @@ local Enable = function(self, unit) self:RegisterEvent("RUNE_TYPE_UPDATE", UpdateType, true) --I have no idea why this won't fire on initial login. self:RegisterEvent("PLAYER_ENTERING_WORLD", UpdateAllRuneTypes) - if not runes.UpdateAllRuneTypes then runes.UpdateAllRuneTypes = UpdateAllRuneTypes end; + if not runes.UpdateAllRuneTypes then runes.UpdateAllRuneTypes = UpdateAllRuneTypes end for i=1, 6 do local rune = runes[runemap[i]] diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.toc b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.toc index 129e085..fae86b7 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.toc @@ -2,7 +2,7 @@ ## Title: oUF ActionPanel ## Notes: Adds a backing to all unit frames that provides many utilities. ## Author: Munglunch -## Version: 5.02 +## Version: 4.2 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Afflicted/oUF_Afflicted.toc b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Afflicted/oUF_Afflicted.toc index ee5034f..a71f0b6 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Afflicted/oUF_Afflicted.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Afflicted/oUF_Afflicted.toc @@ -2,7 +2,7 @@ ## Title: oUF Afflicted ## Notes: Adds Custom Debuff Highlighting to oUF. ## Author: Munglunch -## Version: 5.02 +## Version: 4.2 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc index 021f782..d900274 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc @@ -2,7 +2,7 @@ ## Title: oUF Arcane Charge ## Notes: Adds support for arcane charge indicators to oUF. ## Author: Munglunch -## Version: 5.02 +## Version: 4.2 ## Dependencies: oUF oUF_ArcaneCharge.lua \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.toc b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.toc index 2e2d68f..4341601 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.toc @@ -2,7 +2,7 @@ ## Title: oUF Combatant ## Notes: Adds PvP trinket status and spec icons to oUF frames. ## Author: Munglunch -## Version: 5.020 +## Version: 4.20 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_GPS/oUF_GPS.lua b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_GPS/oUF_GPS.lua deleted file mode 100644 index b39f859..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_GPS/oUF_GPS.lua +++ /dev/null @@ -1,136 +0,0 @@ -local _, ns = ... -local oUF = ns.oUF or oUF -assert(oUF, 'oUF not loaded') - -local cos, sin, sqrt2, max, atan2, floor = math.cos, math.sin, math.sqrt(2), math.max, math.atan2, math.floor; -local tinsert, tremove, tsort, twipe = table.insert, table.remove, table.sort, table.wipe; -local SuperVillain = SVUI[1] -local playerGUID = UnitGUID("player") -local _FRAMES, _PROXIMITY, OnUpdateFrame = {}, {} -local GPSMonitorFrame; - -local function _calc(radius) - return 0.5 + cos(radius) / sqrt2, 0.5 + sin(radius) / sqrt2; -end - -local function spin(texture, angle) - local LRx, LRy = _calc(angle + 0.785398163); - local LLx, LLy = _calc(angle + 2.35619449); - local ULx, ULy = _calc(angle + 3.92699082); - local URx, URy = _calc(angle - 0.785398163); - - texture:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy); -end - -local sortFunc = function(a,b) return a[1] < b[1] end - -local minThrottle = 0.02 -local numArrows, inRange, unit, angle, GPS, distance -local Update = function(self, elapsed) - if self.elapsed and self.elapsed > (self.throttle or minThrottle) then - numArrows = 0 - twipe(_PROXIMITY) - for _, object in next, _FRAMES do - if(object:IsShown()) then - GPS = object.GPS - unit = object.unit - if(unit) then - if(GPS.PreUpdate) then GPS:PreUpdate(frame) end - - if unit and GPS.outOfRange then - inRange = UnitInRange(unit) - end - - local available = (GPS.OnlyProximity == false and GPS.onMouseOver == false) - - if(not unit or not (UnitInParty(unit) or UnitInRaid(unit)) or UnitIsUnit(unit, "player") or not UnitIsConnected(unit) or (not GPS.OnlyProximity and ((GPS.onMouseOver and (GetMouseFocus() ~= object)) or (GPS.outOfRange and inRange)))) then - GPS:Hide() - else - distance, angle = SuperVillain:PositionFromPlayer(unit, available) - if not angle then - GPS:Hide() - else - if(GPS.OnlyProximity == false) then - GPS:Show() - else - GPS:Hide() - end - - if GPS.Arrow then - if(distance > 40) then - GPS.Arrow:SetVertexColor(1,0.1,0.1) - else - if(distance > 30) then - GPS.Arrow:SetVertexColor(0.4,0.8,0.1) - else - GPS.Arrow:SetVertexColor(0.1,1,0.1) - end - if(GPS.OnlyProximity and object.Health.percent and object.Health.percent < 80) then - local value = object.Health.percent + distance - _PROXIMITY[#_PROXIMITY + 1] = {value, GPS} - end - end - spin(GPS.Arrow, angle) - end - - if GPS.Text then - GPS.Text:SetText(floor(distance)) - end - - if(GPS.PostUpdate) then GPS:PostUpdate(frame, distance, angle) end - numArrows = numArrows + 1 - end - end - else - GPS:Hide() - end - end - end - - if(_PROXIMITY[1]) then - tsort(_PROXIMITY, sortFunc) - if(_PROXIMITY[1][2]) then - _PROXIMITY[1][2]:Show() - end - end - - self.elapsed = 0 - self.throttle = max(minThrottle, 0.005 * numArrows) - else - self.elapsed = (self.elapsed or 0) + elapsed - end -end - -local Enable = function(self) - local GPS = self.GPS - if GPS then - tinsert(_FRAMES, self) - - if not OnUpdateFrame then - OnUpdateFrame = CreateFrame("Frame") - OnUpdateFrame:SetScript("OnUpdate", Update) - end - - OnUpdateFrame:Show() - return true - end -end - -local Disable = function(self) - local GPS = self.GPS - if GPS then - for k, frame in next, _FRAMES do - if(frame == self) then - tremove(_FRAMES, k) - GPS:Hide() - break - end - end - - if #_FRAMES == 0 and OnUpdateFrame then - OnUpdateFrame:Hide() - end - end -end - -oUF:AddElement('GPS', nil, Enable, Disable) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_GPS/oUF_GPS.toc b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_GPS/oUF_GPS.toc deleted file mode 100644 index cdca787..0000000 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_GPS/oUF_GPS.toc +++ /dev/null @@ -1,9 +0,0 @@ -## Interface: 50001 -## Title: oUF GPS -## Notes: Adds GPS arrow to frames. -## Author: Omega1970, Munglunch -## Version: 1.00 -## X-Category: oUF -## Dependencies: oUF - -oUF_GPS.lua \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Plugins.xml b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Plugins.xml index c8f4b75..98378e7 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Plugins.xml +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Plugins.xml @@ -9,7 +9,6 @@ <Script file='oUF_Reputation\oUF_Reputation.lua'/> <Script file='oUF_Friendship\oUF_Friendship.lua'/> <Script file="oUF_ArcaneCharge\oUF_ArcaneCharge.lua"/> - <Script file='oUF_GPS\oUF_GPS.lua'/> <Script file='oUF_ActionPanel\oUF_ActionPanel.lua'/> <Script file='oUF_Afflicted\oUF_Afflicted.lua'/> <Script file='oUF_MainTank\oUF_MainTank.lua'/> diff --git a/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua b/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua index 2015717..086f127 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/KeyBind.lua @@ -66,14 +66,14 @@ do for i = 1, count do self:AddDoubleLine(i, Binder.button.bindings[i]) end - end; + end self:Show() self:SetScript("OnHide", nil) end --[[ END OF HANDLERS ]]-- function RefreshBindings(bindTarget, bindType) - if(not Binder.active or InCombatLockdown()) then return end; + if(not Binder.active or InCombatLockdown()) then return end Binder.button = bindTarget; Binder.spellmacro = bindType; Binder:ClearAllPoints() @@ -84,7 +84,7 @@ do Binder:EnableMouse(false) elseif(not Binder:IsMouseEnabled()) then Binder:EnableMouse(true) - end; + end local keyBindID, keyBindName, keyBindString; if bindType == "FLYOUT" then keyBindName = GetSpellInfo(bindTarget.spellID); @@ -108,7 +108,7 @@ do keyBindID = bindTarget:GetID() if(floor(.5 + select(2, MacroFrameTab1Text:GetTextColor()) * 10) / 10 == .8) then keyBindID = keyBindID + 36 - end; + end keyBindName = GetMacroInfo(keyBindID) keyBindString = ("MACRO %s"):format(keyBindName); Binder.button.id = keyBindID @@ -126,18 +126,18 @@ do local lineName = ("%s%d"):format(L["Binding"], i) GameTooltip:AddDoubleLine(lineName, Binder.button.bindings[i], 1, 1, 1) end - end; + end GameTooltip:Show() elseif bindType == "STANCE" or bindType == "PET" then keyBindID = tonumber(bindTarget:GetID()) keyBindName = bindTarget:GetName() - if(not keyBindName) then return end; + if(not keyBindName) then return end if ((not keyBindID) or (keyBindID < 1) or (keyBindID > (bindType == "STANCE" and 10 or 12))) then keyBindString = ("CLICK %s: LeftButton"):format(keyBindName); else local tmpStr = bindType == "STANCE" and "StanceButton" or "BONUSACTIONBUTTON" keyBindString = ("%s%d"):format(tmpStr, keyBindID); - end; + end Binder.button.id = keyBindID Binder.button.name = keyBindName Binder.button.bindstring = keyBindString @@ -147,7 +147,7 @@ do else keyBindID = tonumber(bindTarget.action) keyBindName = bindTarget:GetName() - if(not keyBindName) then return end; + if(not keyBindName) then return end if(not bindTarget.keyBoundTarget and ((not keyBindID) or (keyBindID < 1) or (keyBindID > 132))) then keyBindString = ("CLICK %s: LeftButton"):format(keyBindName); elseif(bindTarget.keyBoundTarget) then @@ -165,7 +165,7 @@ do elseif(keyBindID < 37 and keyBindID > 24) then keyBindString = ("MULTIACTIONBAR3BUTTON%s"):format(slotID); end - end; + end Binder.button.action = keyBindID Binder.button.name = keyBindName Binder.button.bindstring = keyBindString @@ -173,7 +173,7 @@ do GameTooltip:Show() GameTooltip:SetScript("OnHide", GameTooltip_OnHide) end - end; + end end --[[ ########################################################## @@ -192,7 +192,7 @@ function MOD:ToggleKeyBindingMode(deactivate, saveRequested) else LoadBindings(GetCurrentBindingSet()) SuperVillain:AddonMessage(L["Binding Changes Discarded"]) - end; + end Binder.active = false; Binder:ClearAllPoints() Binder:Hide() @@ -201,7 +201,7 @@ function MOD:ToggleKeyBindingMode(deactivate, saveRequested) SuperVillain:StaticPopupSpecial_Hide(SVUI_KeyBindPopup) MOD.bindingsChanged = false end -end; +end blockedButtons = { LSHIFT = true, RSHIFT = true, LCTRL = true, RCTRL = true, LALT = true, RALT = true, UNKNOWN = true, LeftButton = true} @@ -213,29 +213,29 @@ local GameTooltip_OnUpdate = function(self, elapsed) return else tipTimeLapse = 0 - end; + end if(not self.comparing and IsModifiedClick("COMPAREITEMS")) then GameTooltip_ShowCompareItem(self) self.comparing = true elseif(self.comparing and not IsModifiedClick("COMPAREITEMS")) then for _,tip in pairs(self.shoppingTooltips)do tip:Hide() - end; + end self.comparing = false end -end; +end local GameTooltip_OnHide = function(self) for _, tip in pairs(self.shoppingTooltips)do tip:Hide() end -end; +end local GameTooltip_OnHide = function(self) for _, tip in pairs(self.shoppingTooltips)do tip:Hide() end -end; +end local SpellButton_OnEnter = function(self) RefreshBindings(self, "SPELL") @@ -262,7 +262,7 @@ local BinderButton_OnEnter = function(self) if parent and parent._fade then SuperVillain:SecureFadeIn(parent, 0.2, parent:GetAlpha(), parent._alpha) end -end; +end local BinderButton_OnLeave = function(self) local parent = self.button:GetParent() @@ -272,7 +272,7 @@ local BinderButton_OnLeave = function(self) if parent and parent._fade then SuperVillain:SecureFadeOut(parent, 1, parent:GetAlpha(), 0) end -end; +end local Binder_OnBinding = function(self, event) MOD.bindingsChanged = true; @@ -280,24 +280,24 @@ local Binder_OnBinding = function(self, event) local count = #Binder.button.bindings for i=1, count do SetBinding(Binder.button.bindings[i]) - end; + end local prefix = L["All keybindings cleared for |cff00ff00%s|r."] local strMsg = prefix:format(Binder.button.name) SuperVillain:AddonMessage(strMsg) RefreshBindings(Binder.button, Binder.spellmacro) if(Binder.spellmacro ~= "MACRO") then GameTooltip:Hide() - end; + end return - end; + end - if(blockedButtons[event]) then return end; + if(blockedButtons[event]) then return end if(event == "MiddleButton") then event = "BUTTON3" - end; + end if(event:find('Button%d')) then event = event:upper() - end; + end local altText = IsAltKeyDown() and "ALT-" or ""; local ctrlText = IsControlKeyDown() and "CTRL-" or ""; @@ -309,7 +309,7 @@ local Binder_OnBinding = function(self, event) else local strMacro = ("%s %s"):format(Binder.spellmacro, Binder.button.name) SetBinding(strBind, strMacro) - end; + end local glue = L[" |cff00ff00bound to |r"] local addMsg = ("%s%s%s."):format(strBind, glue, Binder.button.name) @@ -319,7 +319,7 @@ local Binder_OnBinding = function(self, event) if Binder.spellmacro ~= "MACRO" then GameTooltip:Hide() end -end; +end local BinderButton_OnMouseWheel = function(self, delta) if delta > 0 then @@ -327,7 +327,7 @@ local BinderButton_OnMouseWheel = function(self, delta) else Binder_OnBinding(self, "MOUSEWHEELDOWN") end -end; +end local SetBindingMacro = function(self, arg) if(arg == "Blizzard_MacroUI") then @@ -337,16 +337,16 @@ local SetBindingMacro = function(self, arg) btn:HookScript("OnEnter", MacroBinding_OnEnter) end end -end; +end local Check_OnShow = function(self) self:SetChecked(GetCurrentBindingSet() == 2) -end; +end local Check_OnEnter = function(self) GameTooltip:SetOwner(self, "ANCHOR_RIGHT") GameTooltip:SetText(CHARACTER_SPECIFIC_KEYBINDING_TOOLTIP, nil, nil, nil, nil, 1) -end; +end local Check_OnClick = function(self) if(MOD.bindingsChanged) then @@ -360,15 +360,15 @@ local Check_OnClick = function(self) SaveBindings(1) end end -end; +end local Save_OnClick = function(self) MOD:ToggleKeyBindingMode(true, true) -end; +end local Discard_OnClick = function(self) MOD:ToggleKeyBindingMode(true, false) -end; +end --[[ END OF HANDLERS ]]-- local function SetBindingButton(button, force) @@ -383,7 +383,7 @@ local function SetBindingButton(button, force) elseif button_OnClick == click2 then button:HookScript("OnEnter", Pet_Proxy) end -end; +end local function RefreshAllFlyouts() local count = GetNumFlyouts() @@ -403,7 +403,7 @@ local function RefreshAllFlyouts() end end end -end; +end function MOD:LoadKeyBinder() self:RefreshActionBars() @@ -433,19 +433,19 @@ function MOD:LoadKeyBinder() SetBindingButton(OBJECT) end OBJECT = EnumerateFrames(OBJECT) - end; + end for OBJECT, _ in pairs(self.ButtonCache)do if(OBJECT.IsProtected and OBJECT:IsProtected() and OBJECT.GetObjectType and OBJECT:GetObjectType() == "CheckButton" and OBJECT.GetScript) then SetBindingButton(OBJECT, true) end - end; + end for i = 1, 12 do local btnName = ("SpellButton%d"):format(i) local spellButton = _G[btnName] spellButton:HookScript("OnEnter", SpellButton_OnEnter) - end; + end if not IsAddOnLoaded("Blizzard_MacroUI")then NewHook("LoadAddOn", SetBindingMacro) @@ -455,7 +455,7 @@ function MOD:LoadKeyBinder() local btn = _G[btnName] btn:HookScript("OnEnter", Macro_Proxy) end - end; + end NewHook("ActionButton_UpdateFlyout", RefreshAllFlyouts) RefreshAllFlyouts() diff --git a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua index 54282bf..83c8647 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua @@ -164,23 +164,23 @@ local SVUIMicroButtonsParent = function(self) end local MicroButton_OnEnter = function(self) - if InCombatLockdown()then return end - self.overlay:SetPanelColor("highlight") - self.overlay.icon:SetGradient("VERTICAL", 0.75, 0.75, 0.75, 1, 1, 1) if(self._fade) then SuperVillain:SecureFadeIn(SVUI_MicroBar,0.2,SVUI_MicroBar:GetAlpha(),1) SuperVillain:SecureFadeOut(SVUI_MicroBar.screenMarker,0.1,SVUI_MicroBar:GetAlpha(),0) end + if InCombatLockdown()then return end + self.overlay:SetPanelColor("highlight") + self.overlay.icon:SetGradient("VERTICAL", 0.75, 0.75, 0.75, 1, 1, 1) end local MicroButton_OnLeave = function(self) - if InCombatLockdown()then return end - self.overlay:SetPanelColor("special") - self.overlay.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) if(self._fade) then SuperVillain:SecureFadeOut(SVUI_MicroBar,1,SVUI_MicroBar:GetAlpha(),0) SuperVillain:SecureFadeIn(SVUI_MicroBar.screenMarker,5,SVUI_MicroBar:GetAlpha(),1) end + if InCombatLockdown()then return end + self.overlay:SetPanelColor("special") + self.overlay.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) end local MicroButton_OnUpdate = function() @@ -990,7 +990,7 @@ CreateActionBars = function(self) for x = 1, 14 do local calc = (x - 1) * buttonMax + k; thisBar.buttons[k]:SetState(x, "action", calc) - end; + end if k == 12 then thisBar.buttons[k]:SetState(12, "custom", { func = function(...) diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua index ce1648c..a1ce2d1 100644 --- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua +++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua @@ -170,10 +170,10 @@ do end local function SetEmoticon(text) - if not text then return end; + if not text then return end if (not MOD.db.smileys or text:find(" / run") or text:find(" / dump") or text:find(" / script")) then return text - end; + end local result = ""; local maxLen = len(text); local count = 1; @@ -181,7 +181,7 @@ do while count <= maxLen do temp = maxLen; local section = find(text, "|H", count, true) - if section ~= nil then temp = section end; + if section ~= nil then temp = section end pattern = sub(text, count, temp); result = result .. GetEmoticon(pattern) count = temp + 1; @@ -193,7 +193,7 @@ do count = temp + 1; end end - end; + end return result end @@ -201,25 +201,25 @@ do if ((event == "CHAT_MSG_WHISPER" or event == "CHAT_MSG_BN_WHISPER") and CHAT_PSST) then if text:sub(1, 3) == "OQ, " then return false, text, ... - end; + end PlaySoundFile(CHAT_PSST, "Master") - end; + end if(not CHAT_ALLOW_URL) then text = SetEmoticon(text) return false, text, ... - end; + end local result, ct = text:gsub("(%a+)://(%S+)%s?", "%1://%2") if ct > 0 then return false, SetEmoticon(result), ... - end; + end result, ct = text:gsub("www%.([_A-Za-z0-9-]+)%.(%S+)%s?", "www.%1.%2") if ct > 0 then return false, SetEmoticon(result), ... - end; + end result, ct = text:gsub("([_A-Za-z0-9-%.]+)@([_A-Za-z0-9-]+)(%.+)([_A-Za-z0-9-%.]+)%s?", "%1@%2%3%4") if ct > 0 then return false, SetEmoticon(result), ... - end; + end text = SetEmoticon(text) return false, text, ... end @@ -246,13 +246,13 @@ do internalTest = false; if text:find("%pTInterface%p+") or text:find("%pTINTERFACE%p+") then internalTest = true - end; - if not internalTest then text = text:gsub("(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?:%d%d?%d?%d?%d?)(%s?)", _parse) end; - if not internalTest then text = text:gsub("(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?)(%s?)", _parse) end; - if not internalTest then text = text:gsub("(%s?)([%w_-]+%.?[%w_-]+%.[%w_-]+:%d%d%d?%d?%d?)(%s?)", _parse) end; - if not internalTest then text = text:gsub("(%s?)(%a+://[%w_/%.%?%%=~&-'%-]+)(%s?)", _parse) end; - if not internalTest then text = text:gsub("(%s?)(www%.[%w_/%.%?%%=~&-'%-]+)(%s?)", _parse) end; - if not internalTest then text = text:gsub("(%s?)([_%w-%.~-]+@[_%w-]+%.[_%w-%.]+)(%s?)", _parse) end; + end + if not internalTest then text = text:gsub("(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?:%d%d?%d?%d?%d?)(%s?)", _parse) end + if not internalTest then text = text:gsub("(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?)(%s?)", _parse) end + if not internalTest then text = text:gsub("(%s?)([%w_-]+%.?[%w_-]+%.[%w_-]+:%d%d%d?%d?%d?)(%s?)", _parse) end + if not internalTest then text = text:gsub("(%s?)(%a+://[%w_/%.%?%%=~&-'%-]+)(%s?)", _parse) end + if not internalTest then text = text:gsub("(%s?)(www%.[%w_/%.%?%%=~&-'%-]+)(%s?)", _parse) end + if not internalTest then text = text:gsub("(%s?)([_%w-%.~-]+@[_%w-]+%.[_%w-%.]+)(%s?)", _parse) end self.TempAddMessage(self, _concatTimeStamp(text), ...) end @@ -292,7 +292,7 @@ do chat.TempAddMessage = chat.AddMessage; chat.AddMessage = AddModifiedMessage end - end; + end ChatFrame_AddMessageEventFilter("CHAT_MSG_CHANNEL", ChatEventFilter) ChatFrame_AddMessageEventFilter("CHAT_MSG_YELL", ChatEventFilter) ChatFrame_AddMessageEventFilter("CHAT_MSG_SAY", ChatEventFilter) @@ -311,7 +311,7 @@ do ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_WHISPER_INFORM", ChatEventFilter) ChatFrame_AddMessageEventFilter("CHAT_MSG_BN_INLINE_TOAST_BROADCAST", ChatEventFilter); end -end; +end --[[ ########################################################## CORE FUNCTIONS @@ -412,7 +412,7 @@ do if LeftSuperDock:IsShown()then LeftSuperDockToggleButton:GetScript("OnLeave")(LeftSuperDockToggleButton) end - end; + end self:Hide() SuperDockAlertLeft:Deactivate() end @@ -428,29 +428,29 @@ do testText = false; break end - end; + end if testText then self:Hide() return end end - end; + end if text:len() < 5 then if text:sub(1, 4) == "/tt " then local name, realm = UnitName("target") if name then name = gsub(name, " ", "") - end; + end if name and not UnitIsSameServer("player", "target") then name = name.."-"..gsub(realm, " ", "") - end; + end ChatFrame_SendTell(name or L["Invalid Target"], ChatFrame1) - end; + end if text:sub(1, 4) == "/gr " then self:SetText(MOD:GetGroupDistribution()..text:sub(5)) ChatEdit_ParseText(self, 0) end - end; + end local result, ct = text:gsub("|Kf(%S+)|k(%S+)%s(%S+)|k", "%2 %3") if ct > 0 then result = result:gsub("|", "") @@ -475,12 +475,12 @@ do lastTab = frame end end - end; + end local function _removeTab(frame,chat) - if(not frame or not frame.chatID) then return end; + if(not frame or not frame.chatID) then return end local name = frame:GetName(); - if(not TabSafety[name]) then return end; + if(not TabSafety[name]) then return end TabSafety[name] = false; local chatID = frame.chatID; if(TabsList[chatID]) then @@ -496,7 +496,7 @@ do local function _addTab(frame,chatID) local name = frame:GetName(); - if(TabSafety[name]) then return end; + if(TabSafety[name]) then return end TabSafety[name] = true; TabsList[chatID] = frame frame.chatID = chatID; @@ -505,7 +505,7 @@ do end local function _customTab(tab, chatID, enabled) - if(tab.IsStyled) then return end; + if(tab.IsStyled) then return end local tabName = tab:GetName(); local tabSize = SuperDockChatTabBar.currentSize; local tabText = tab.text:GetText() or "Chat "..chatID; @@ -599,7 +599,7 @@ do if tab.conversationIcon then tab.conversationIcon:ClearAllPoints() tab.conversationIcon:Point("RIGHT", tab.text, "LEFT", -1, 0) - end; + end if(TAB_SKINS and not tab.IsStyled) then local arg3 = (chat.inUse or chat.isDocked or chat.isTemporary) _customTab(tab, chatID, arg3) @@ -640,7 +640,7 @@ do chat.InitConfig = true end - end; + end local function _modifyTab(tab, floating) if(not floating) then @@ -696,7 +696,7 @@ do chat:Height(CHAT_HEIGHT) chat:Point("BOTTOMRIGHT",SuperDockWindowLeft,"BOTTOMRIGHT",-6,10) FCF_SavePositionAndDimensions(chat) - end; + end chat:SetParent(SuperDockWindowLeft) if(not TAB_SKINS) then tab.owner = chat; @@ -716,10 +716,10 @@ do chat:SetUserPlaced(true) end end - end; + end refreshLocked = true end -end; +end function MOD:PET_BATTLE_CLOSE() for _, frameName in pairs(CHAT_FRAMES) do diff --git a/Interface/AddOns/SVUI/packages/gear/SVGear.lua b/Interface/AddOns/SVUI/packages/gear/SVGear.lua index d9c989d..cacf755 100644 --- a/Interface/AddOns/SVUI/packages/gear/SVGear.lua +++ b/Interface/AddOns/SVUI/packages/gear/SVGear.lua @@ -129,14 +129,14 @@ local function GetActiveGear() end if(count == 0) then return resultSpec,false - end; + end for i=1, count do local setName,_,_,setUsed = GetEquipmentSetInfo(i) if setUsed then resultSet = setName break end - end; + end return resultSpec,resultSet end @@ -149,7 +149,7 @@ local function SetDisplayStats(arg) frame.ItemLevel = frame:CreateFontString(nil, "OVERLAY") frame.ItemLevel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 2, 1) frame.ItemLevel:SetFontTemplate(SuperVillain.Media.font.roboto, 10, "OUTLINE", "RIGHT") - end; + end if(arg == "Character" and flags[2]) then frame.DurabilityInfo = CreateFrame("Frame", nil, frame) @@ -187,23 +187,23 @@ local function SetDisplayStats(arg) frame.DurabilityInfo.bg:SetVertexColor("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) end end -end; +end --[[ ########################################################## CORE FUNCTIONS ########################################################## ]]-- local function RefreshInspectedGear() - if(not MOD.PreBuildComplete) then return end; + if(not MOD.PreBuildComplete) then return end if(InCombatLockdown()) then MOD:RegisterEvent("PLAYER_REGEN_ENABLED", RefreshInspectedGear) return else MOD:UnregisterEvent("PLAYER_REGEN_ENABLED") - end; + end local unit = InspectFrame and InspectFrame.unit or "player"; - if(not unit or (unit and not CanInspect(unit,false))) then return end; + if(not unit or (unit and not CanInspect(unit,false))) then return end if(SHOW_LEVEL) then SuperVillain:ParseGearSlots(unit, true, SetItemLevelDisplay) @@ -213,13 +213,13 @@ local function RefreshInspectedGear() end local function RefreshGear() - if(not MOD.PreBuildComplete) then return end; + if(not MOD.PreBuildComplete) then return end if(InCombatLockdown()) then MOD:RegisterEvent("PLAYER_REGEN_ENABLED", RefreshGear) return else MOD:UnregisterEvent("PLAYER_REGEN_ENABLED") - end; + end MOD:UpdateLocals() if(SHOW_LEVEL) then SuperVillain:ParseGearSlots("player", false, SetItemLevelDisplay, SetItemDurabilityDisplay) @@ -242,7 +242,7 @@ local function GearSwap() if EQUIP_SET ~= "none" and EQUIP_SET ~= gearSet then LIVESET = EQUIP_SET; UseEquipmentSet(EQUIP_SET) - end; + end return end end diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index ff61fb6..82ab54c 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -63,6 +63,7 @@ local MM_WIDTH = MM_SIZE + (MM_BRDR * 2) local MM_HEIGHT = (MM_SIZE - (MM_OFFSET_TOP + MM_OFFSET_BOTTOM) + (MM_BRDR * 2)) local MMBHolder, MMBBar, SetMiniMapCoords; local SVUI_MinimapFrame = CreateFrame("Frame", "SVUI_MinimapFrame", UIParent) +SVUI_MinimapFrame:SetFrameStrata("BACKGROUND") SVUI_MinimapFrame.backdrop = SVUI_MinimapFrame:CreateTexture(nil, "BACKGROUND", nil, -2) local SVUI_MinimapZonetext = CreateFrame("Frame", "SVUI_MinimapZonetext", SVUI_MinimapFrame) local SVUI_MinimapNarrator = CreateFrame("Frame", "SVUI_MinimapNarrator", SVUI_MinimapFrame) @@ -472,11 +473,11 @@ do GameTooltip:AddDoubleLine(L["ShiftClick : "], L["Announce your position in chat"],0.7, 0.7, 1, 0.7, 0.7, 1) GameTooltip:Show() end - end; + end local function Tour_OnLeave(self,...) GameTooltip:Hide() - end; + end local function Tour_OnClick(self, btn) local zoneText = GetRealZoneText() or UNKNOWN; @@ -578,11 +579,11 @@ end local function UpdateMinimapNarration() SVUI_MinimapNarrator.Text:SetText(MOD.narrative) -end; +end local function UpdateMinimapLocation() SVUI_MinimapZonetext.Text:SetText(MOD.locationPrefix .. strsub(GetMinimapZoneText(), 1, 25)) -end; +end local function UpdateMinimapTexts() MOD.narrative = ""; @@ -603,7 +604,7 @@ local function UpdateMinimapTexts() UpdateMinimapLocation() UpdateMinimapNarration() end -end; +end local function UpdateSizing() MM_COLOR = SuperVillain.Media.gradient[MOD.db.bordercolor] @@ -613,7 +614,7 @@ local function UpdateSizing() MM_OFFSET_BOTTOM = (MM_SIZE * 0.11) MM_WIDTH = MM_SIZE + (MM_BRDR * 2) MM_HEIGHT = MOD.db.customshape and (MM_SIZE - (MM_OFFSET_TOP + MM_OFFSET_BOTTOM) + (MM_BRDR * 2)) or MM_WIDTH -end; +end function MOD:RefreshMiniMap() if(not SuperVillain.db.SVMap.enable) then return; end @@ -713,6 +714,7 @@ local function CreateMiniMapElements() Minimap:SetQuestBlobRingAlpha(0) Minimap:SetArchBlobRingAlpha(0) Minimap:SetParent(SVUI_MinimapFrame) + Minimap:SetFrameStrata("LOW") Minimap:SetFrameLevel(Minimap:GetFrameLevel() + 2) ShowUIPanel(SpellBookFrame) HideUIPanel(SpellBookFrame) diff --git a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua index bec98bd..c7e9324 100644 --- a/Interface/AddOns/SVUI/packages/plates/SVPlate.lua +++ b/Interface/AddOns/SVUI/packages/plates/SVPlate.lua @@ -200,7 +200,7 @@ local function TruncateString(value) end local function SetTextStyle(style, min, max) - if max == 0 then max = 1 end; + if max == 0 then max = 1 end local result; local textFormat = formatting[style] if style == "DEFICIT" then @@ -227,7 +227,7 @@ local function SetTextStyle(style, min, max) result = result:gsub(".0%%", "%%") return result end -end; +end local function SetPlateBorder(plate, point) point = point or plate @@ -578,7 +578,7 @@ local function CleanUnitPlateAurass() end function MOD:UpdateAuras(plate) - if plate.setting.tiny then return end; + if plate.setting.tiny then return end local guid = plate.guid local frame = plate.frame if not guid then @@ -1469,7 +1469,7 @@ UPDATE AND BUILD ]]-- function MOD:UpdateLocals() local db = self.db - if not db then return end; + if not db then return end NPClassRole = SuperVillain.ClassRole; NPBaseAlpha = db.nonTargetAlpha; @@ -1562,7 +1562,7 @@ function MOD:ReLoad() return end self:UpdateAllPlates(); -end; +end function MOD:Load() if SuperVillain.db["SVPlate"].enable ~= true then return end diff --git a/Interface/AddOns/SVUI/packages/stats/stats/bags.lua b/Interface/AddOns/SVUI/packages/stats/stats/bags.lua index d171898..4469142 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/bags.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/bags.lua @@ -67,14 +67,14 @@ local function bags_events(this, e, ...) for i = 0, NUM_BAG_SLOTS do f, g = f + GetContainerNumFreeSlots(i), g + GetContainerNumSlots(i) - end; + end h = g - f; this.text:SetFormattedText(bags_text, L["Bags"]..": ", hexColor, h, g) -end; +end local function bags_click() ToggleAllBags() -end; +end local function bags_focus(this) MOD:Tip(this) @@ -83,20 +83,20 @@ local function bags_focus(this) if l and i == 1 then MOD.tooltip:AddLine(CURRENCY) MOD.tooltip:AddLine(" ") - end; + end if l and m then MOD.tooltip:AddDoubleLine(l, m, 1, 1, 1) end - end; + end MOD:ShowTip() -end; +end local BagsColorUpdate = function() hexColor = SuperVillain:HexColor("highlight") if currentObject ~= nil then bags_events(currentObject) end -end; +end SuperVillain.Registry:NewCallback(BagsColorUpdate) MOD:Extend("Bags", StatEvents, bags_events, nil, bags_click, bags_focus); \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/cta.lua b/Interface/AddOns/SVUI/packages/stats/stats/cta.lua index 348baae..2dded9e 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/cta.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/cta.lua @@ -65,15 +65,15 @@ local function formatCTAtext(tanks, heals, dps) local result = "" if tanks then result = result.."|TInterface\\AddOns\\SVUI\\assets\\textures\\default\\tank.tga:14:14|t" - end; + end if heals then result = result.."|TInterface\\AddOns\\SVUI\\assets\\textures\\default\\healer.tga:14:14|t" - end; + end if dps then result = result.."|TInterface\\AddOns\\SVUI\\assets\\textures\\default\\dps.tga:14:14|t" - end; + end return result -end; +end local function CTA_OnEvent(self, ...) local isTank = false; @@ -86,29 +86,29 @@ local function CTA_OnEvent(self, ...) local eligible, forTank, forHealer, forDamage, itemCount = GetLFGRoleShortageRewards(id, i) if eligible then isNormal = false - end; + end if eligible and forTank and itemCount > 0 then isTank = true; - end; + end if eligible and forHealer and itemCount > 0 then isHeal = true; - end; + end if eligible and forDamage and itemCount > 0 then isDPS = true; end end - end; + end if isNormal then self.text:SetText(tooltipString) else self.text:SetText(BATTLEGROUND_HOLIDAY..": "..formatCTAtext(isTank, isHeal, isDPS)) - end; + end currentObject = self -end; +end local function CTA_OnClick() ToggleFrame(LFDParentFrame) -end; +end local function CTA_OnEnter(self) MOD:Tip(self) @@ -123,13 +123,13 @@ local function CTA_OnEnter(self) local eligible, forTank, forHealer, forDamage, itemCount = GetLFGRoleShortageRewards(id, i) if eligible then isNormal = false - end; + end if eligible and forTank and itemCount > 0 then isTank = true; - end; + end if eligible and forHealer and itemCount > 0 then isHeal = true; - end; + end if eligible and forDamage and itemCount > 0 then isDPS = true; end @@ -138,14 +138,14 @@ local function CTA_OnEnter(self) local text = formatCTAtext(isTank,isHeal,isDPS) if text ~= "" then MOD.tooltip:AddDoubleLine(name..":", text, 1, 1, 1) - end; + end if isTank or isHeal or isDPS then counter = counter + 1 end end - end; + end MOD:ShowTip() -end; +end local CTAColorUpdate = function() local hexColor = SuperVillain:HexColor("highlight"); @@ -153,7 +153,7 @@ local CTAColorUpdate = function() if currentObject ~= nil then CTA_OnEvent(currentObject) end -end; +end SuperVillain.Registry:NewCallback(CTAColorUpdate) MOD:Extend('Call to Arms', StatEvents, CTA_OnEvent, nil, CTA_OnClick, CTA_OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/durability.lua b/Interface/AddOns/SVUI/packages/stats/stats/durability.lua index 962a8c5..cc5ee92 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/durability.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/durability.lua @@ -84,7 +84,7 @@ local function Durability_OnEvent(self, ...) self.text:SetJustifyH("CENTER") self.barframe:Hide() self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,SuperVillain.db.SVStats.fontOutline) - end; + end for slot,name in pairs(inventoryMap)do local slotID = GetInventorySlotInfo(slot) min,max = GetInventoryItemDurability(slotID) @@ -94,9 +94,9 @@ local function Durability_OnEvent(self, ...) overall = min / max * 100 end end - end; + end self.text:SetFormattedText(displayString, DURABILITY, hexColor, overall) -end; +end local function DurabilityBar_OnEvent(self, ...) currentObject = nil; @@ -105,7 +105,7 @@ local function DurabilityBar_OnEvent(self, ...) self.barframe:Show() self.barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\STAT-DUR") self.text:SetFontTemplate(SuperVillain.Shared:Fetch("font",SuperVillain.db.SVStats.font),SuperVillain.db.SVStats.fontSize,"NONE") - end; + end for slot,name in pairs(inventoryMap)do local slotID = GetInventorySlotInfo(slot) min,max = GetInventoryItemDurability(slotID) @@ -115,33 +115,33 @@ local function DurabilityBar_OnEvent(self, ...) overall = min / max * 100 end end - end; + end local newRed = (100 - overall) * 0.01; local newGreen = overall * 0.01; self.barframe.bar:SetMinMaxValues(0, 100) self.barframe.bar:SetValue(overall) self.barframe.bar:SetStatusBarColor(newRed, newGreen, 0) self.text:SetText('') -end; +end local function Durability_OnClick() ToggleCharacter("PaperDollFrame") -end; +end local function Durability_OnEnter(self) MOD:Tip(self) for name,amt in pairs(equipment)do MOD.tooltip:AddDoubleLine(name, format("%d%%", amt),1, 1, 1, SuperVillain:ColorGradient(amt * 0.01, 1, 0, 0, 1, 1, 0, 0, 1, 0)) - end; + end MOD:ShowTip() -end; +end local DurColorUpdate = function() hexColor = SuperVillain:HexColor("highlight") if currentObject ~= nil then Durability_OnEvent(currentObject) end -end; +end SuperVillain.Registry:NewCallback(DurColorUpdate) MOD:Extend("Durability", StatEvents, Durability_OnEvent, nil, Durability_OnClick, Durability_OnEnter) diff --git a/Interface/AddOns/SVUI/packages/stats/stats/friends.lua b/Interface/AddOns/SVUI/packages/stats/stats/friends.lua index 96542ce..d4f4725 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/friends.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/friends.lua @@ -377,7 +377,7 @@ local FriendsColorUpdate = function() if lastPanel ~= nil then OnEvent(lastPanel,'SVUI_COLOR_UPDATE') end -end; +end SuperVillain.Registry:NewCallback(FriendsColorUpdate) diff --git a/Interface/AddOns/SVUI/packages/stats/stats/gold.lua b/Interface/AddOns/SVUI/packages/stats/stats/gold.lua index 8c96ea2..16a0c71 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/gold.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/gold.lua @@ -74,7 +74,7 @@ local tiptext = join("","|cffaaaaaa",L["Reset Data: Hold Left Ctrl + Shift then local serverGold = {}; local function FormatCurrency(amount, short) - if not amount then return end; + if not amount then return end local gold, silver, copper = floor(abs(amount/10000)), abs(mod(amount/100,100)), abs(mod(amount,100)) if(short) then if gold ~= 0 then @@ -95,10 +95,10 @@ local function FormatCurrency(amount, short) return copperFormat:format(copper) end end -end; +end local function Gold_OnEvent(self, event,...) - if not IsLoggedIn() then return end; + if not IsLoggedIn() then return end local current = GetMoney() recorded = SVUI_Global["Accountant"][playerRealm]["gold"][playerName] or GetMoney(); local adjusted = current - recorded; @@ -106,10 +106,10 @@ local function Gold_OnEvent(self, event,...) loss = loss - adjusted else gains = gains + adjusted - end; + end self.text:SetText(FormatCurrency(current, MOD.db.shortGold)) SVUI_Global["Accountant"][playerRealm]["gold"][playerName] = GetMoney() -end; +end local function Gold_OnClick(self, button) if IsLeftControlKeyDown() and IsShiftKeyDown() then @@ -120,7 +120,7 @@ local function Gold_OnClick(self, button) else ToggleAllBags() end -end; +end local function Gold_OnEnter(self) MOD:Tip(self) @@ -131,7 +131,7 @@ local function Gold_OnEnter(self) MOD.tooltip:AddDoubleLine(L["Deficit:"],FormatCurrency(gains - loss),1,0,0,1,1,1) elseif (gains - loss) > 0 then MOD.tooltip:AddDoubleLine(L["Profit:"],FormatCurrency(gains - loss),0,1,0,1,1,1) - end; + end MOD.tooltip:AddLine(" ") local cash = SVUI_Global["Accountant"][playerRealm]["gold"][playerName]; MOD.tooltip:AddLine(L[playerName..": "]) @@ -144,14 +144,14 @@ local function Gold_OnEnter(self) cash = cash + amount; MOD.tooltip:AddDoubleLine(name, FormatCurrency(amount), 1,1,1,1,1,1) end - end; + end MOD.tooltip:AddLine(" ") MOD.tooltip:AddLine(L["Server: "]) MOD.tooltip:AddDoubleLine(L["Total: "], FormatCurrency(cash), 1,1,1,1,1,1) MOD.tooltip:AddLine(" ") MOD.tooltip:AddLine(tiptext) MOD:ShowTip() -end; +end MOD:Extend('Gold', StatEvents, Gold_OnEvent, nil, Gold_OnClick, Gold_OnEnter); @@ -162,6 +162,6 @@ function MOD:LoadServerGold() serverGold[name] = amount; totalGold = totalGold + amount end - end; + end serverGold['total'] = totalGold; end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua index 74f3209..07cd838 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua @@ -75,7 +75,7 @@ function MOD:CacheRepData() if factionName ~= active then SetWatchedFactionIndex(factionIndex) end - end; + end tinsert(RepMenuList, {text = factionName, func = fn}) end end @@ -88,7 +88,7 @@ local function Reputation_OnEvent(self, ...) self.barframe:Hide() self.text:SetAlpha(1) self.text:SetShadowOffset(2, -4) - end; + end local ID = 100 local isFriend, friendText local name, reaction, min, max, value = GetWatchedFactionInfo() @@ -109,8 +109,8 @@ local function Reputation_OnEvent(self, ...) end end self.text:SetFormattedText("|cff22EF5F%s|r|cff888888 - [|r%d%%|cff888888]|r", isFriend and friendText or _G["FACTION_STANDING_LABEL"..ID], ((value - min) / (max - min) * 100)) - end; -end; + end +end local function ReputationBar_OnEvent(self, ...) if not self.barframe:IsShown()then @@ -118,7 +118,7 @@ local function ReputationBar_OnEvent(self, ...) self.barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\STAT-REP") self.text:SetAlpha(1) self.text:SetShadowOffset(1, -2) - end; + end local bar = self.barframe.bar; local name, reaction, min, max, value = GetWatchedFactionInfo() local numFactions = GetNumFactions(); @@ -145,8 +145,8 @@ local function ReputationBar_OnEvent(self, ...) bar:SetMinMaxValues(min, max) bar:SetValue(value) self.text:SetText(txt) - end; -end; + end +end local function Reputation_OnEnter(self) MOD:Tip(self) @@ -159,16 +159,16 @@ local function Reputation_OnEnter(self) MOD.tooltip:AddLine(' ') MOD.tooltip:AddDoubleLine(STANDING..':', friendID and friendTextLevel or _G['FACTION_STANDING_LABEL'..reaction], 1, 1, 1) MOD.tooltip:AddDoubleLine(REPUTATION..':', format('%d / %d (%d%%)', value - min, max - min, (value - min) / (max - min) * 100), 1, 1, 1) - end; + end MOD.tooltip:AddLine(" ", 1, 1, 1) MOD.tooltip:AddDoubleLine("[Click]", "Change Watched Faction", 0,1,0, 0.5,1,0.5) MOD:ShowTip(true) -end; +end local function Reputation_OnClick(self, button) MOD:CacheRepData() MOD:SetStatMenu(self, RepMenuList) -end; +end MOD:Extend("Reputation", StatEvents, Reputation_OnEvent, nil, Reputation_OnClick, Reputation_OnEnter) MOD:Extend("Reputation Bar", StatEvents, ReputationBar_OnEvent, nil, Reputation_OnClick, Reputation_OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/stats/stats/time.lua b/Interface/AddOns/SVUI/packages/stats/stats/time.lua index ffde932..ecb0e57 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/time.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/time.lua @@ -229,7 +229,7 @@ local ColorUpdate = function() if lastPanel ~= nil then Update(lastPanel, 20000) end -end; +end SuperVillain.Registry:NewCallback(ColorUpdate) diff --git a/Interface/AddOns/SVUI/packages/stats/stats/tokens.lua b/Interface/AddOns/SVUI/packages/stats/stats/tokens.lua index 3239ff8..4944d9e 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/tokens.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/tokens.lua @@ -78,12 +78,12 @@ local function TokenInquiry(id, weekly, capped) end local function TokensEventHandler(self, event,...) - if not IsLoggedIn() or not self then return end; + if not IsLoggedIn() or not self then return end local id = SVUI_Global["Accountant"][playerRealm]["tokens"][playerName]; local _, current, tex = GetCurrencyInfo(id) local currentText = ("\124T%s:12\124t %s"):format(tex, current); self.text:SetText(currentText) -end; +end local function AddToTokenMenu(id) local name, _, tex, _, _, _, _ = GetCurrencyInfo(id) @@ -91,7 +91,7 @@ local function AddToTokenMenu(id) local fn = function() SVUI_Global["Accountant"][playerRealm]["tokens"][playerName] = id; TokensEventHandler(TokenParent) - end; + end tinsert(TokenMenuList, {text = itemName, func = fn}); end @@ -195,12 +195,12 @@ local function Tokens_OnEnter(self) MOD.tooltip:AddLine(" ") MOD.tooltip:AddDoubleLine("[Shift + Click]", "Change Watched Token", 0,1,0, 0.5,1,0.5) MOD:ShowTip(true) -end; +end local function Tokens_OnClick(self, button) TokenParent = self; MOD:CacheTokenData() MOD:SetStatMenu(self, TokenMenuList) -end; +end MOD:Extend('Tokens', TokenEvents, TokensEventHandler, nil, Tokens_OnClick, Tokens_OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/elements/auras.lua b/Interface/AddOns/SVUI/packages/unit/elements/auras.lua index 9e1baec..0d3f1bf 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/auras.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/auras.lua @@ -42,7 +42,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(select(2, ...)); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH"s FASTER ASSERT FUNCTION ]]-- @@ -284,7 +284,7 @@ do CustomAuraFilter = function(self, unit, icon, name, _, _, _, debuffType, duration, _, caster, isStealable, shouldConsolidate, spellID, canApplyAura, isBossAura) local db = MOD.db[self.db] local auraType = self.type; - if(not auraType) then return true end; + if(not auraType) then return true end if((not db) or (db and not db[auraType]) or (spellID == 65148)) then return false; end diff --git a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua index 2e02985..bb9518e 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua @@ -42,7 +42,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(select(2, ...)); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- diff --git a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua index d1fac21..8d34bbe 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua @@ -30,7 +30,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(select(2, ...)); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -339,7 +339,8 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) bg:SetGradientAlpha("VERTICAL", 0, 0, 0, 0, 0, 0, 0, 0.7) frame.InfoPanel = CreateFrame("Frame", nil, info) - frame.InfoPanel:SetFrameStrata("MEDIUM") + frame.InfoPanel:SetFrameStrata("LOW") + frame.InfoPanel:SetFrameLevel(20) frame.InfoPanel:SetAllPoints(info) if(unit == "target") then @@ -400,10 +401,10 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) else frame.ActionPanel = CreateActionPanel(frame, 2) frame.InfoPanel = CreateFrame("Frame", nil, frame) - frame.InfoPanel:SetFrameStrata("MEDIUM") + frame.InfoPanel:SetFrameStrata("LOW") + frame.InfoPanel:SetFrameLevel(20) frame.InfoPanel:Point("TOPLEFT", frame.ActionPanel, "TOPLEFT", 2, -2) frame.InfoPanel:Point("BOTTOMRIGHT", frame.ActionPanel, "BOTTOMRIGHT", -2, 2) - frame.InfoPanel:SetFrameLevel(frame.InfoPanel:GetFrameLevel() + 30) end frame.InfoPanel.Name = CreateNameText(frame.InfoPanel, unit) @@ -464,7 +465,7 @@ function MOD:SetActionPanel(frame, unit, noHealthText, noPowerText, noMiscText) -- frame.StatusPanel.texture:SetAlpha(0) frame.StatusPanel:SetFrameStrata("LOW") - frame.StatusPanel:SetFrameLevel(20) + frame.StatusPanel:SetFrameLevel(28) end --[[ ########################################################## @@ -556,6 +557,8 @@ function MOD:CreatePowerBar(frame, bg) local power = CreateFrame("StatusBar", nil, frame) power:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) power:SetPanelTemplate("Bar") + power:SetFrameStrata("LOW") + power:SetFrameLevel(6) if bg then power.bg = power:CreateTexture(nil, "BORDER") power.bg:SetAllPoints() @@ -573,7 +576,8 @@ function MOD:CreateAltPowerBar(frame) altPower:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) altPower:SetPanelTemplate("Bar") altPower:GetStatusBarTexture():SetHorizTile(false) - altPower:SetFrameStrata("MEDIUM") + altPower:SetFrameStrata("LOW") + altPower:SetFrameLevel(8) altPower.text = altPower:CreateFontString(nil, "OVERLAY") altPower.text:SetPoint("CENTER") altPower.text:SetJustifyH("CENTER") @@ -620,7 +624,7 @@ function MOD:CreatePortrait(frame,smallUnit,isPlayer) portrait3D:SetPanelTemplate("UnitSmall") else portrait3D:SetPanelTemplate("UnitLarge") - end; + end local overlay = CreateFrame("Frame",nil,portrait3D) overlay:SetAllPoints(portrait3D.Panel) @@ -642,7 +646,7 @@ function MOD:CreatePortrait(frame,smallUnit,isPlayer) portrait2Danchor:SetFixedPanelTemplate("UnitSmall") else portrait2Danchor:SetFixedPanelTemplate("UnitLarge") - end; + end portrait2D.Panel = portrait2Danchor.Panel; local overlay = CreateFrame("Frame",nil,portrait2Danchor) diff --git a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua index 0dbf2a3..d5c456d 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua @@ -15,7 +15,7 @@ S U P E R - V I L L A I N - U I By: Munglunch # --]] local SuperVillain, L = unpack(select(2, ...)); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -264,40 +264,6 @@ function MOD:RaidRoleUpdate() end end end - -function MOD:CreateGPS(frame, small) - if not frame then return end - local size = 32 - local gps = CreateFrame("Frame", nil, frame.InfoPanel) - gps:SetFrameLevel(99) - gps:Size(size, size) - gps.DefaultSize = size - if(small) then - gps.onMouseOver = true - gps.OnlyProximity = false - gps:Point("RIGHT", frame, "RIGHT", 0, 0) - else - gps.onMouseOver = false - gps.OnlyProximity = false - gps:Point("BOTTOMLEFT", frame.Health, "BOTTOMLEFT", 0, 0) - gps.Text = gps:CreateFontString(nil, "OVERLAY") - gps.Text:SetAllPoints(frame.InfoPanel) - - gps.Text:SetFont(SuperVillain.Media.font.roboto, 10) - gps.Text:SetJustifyH("CENTER") - gps.Text:SetJustifyV("MIDDLE") - gps.Text:SetTextColor(1, 1, 1, 0.5) - end - - gps.Arrow = gps:CreateTexture(nil, "OVERLAY", nil, 7) - gps.Arrow:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\GPS-ARROW]]) - gps.Arrow:Size(size, size) - gps.Arrow:SetPoint("CENTER", gps, "CENTER", 0, 0) - gps.Arrow:SetVertexColor(0.1, 0.8, 0.8) - gps.Arrow:SetBlendMode("ADD") - - return gps -end --[[ ########################################################## PLAYER ONLY COMPONENTS @@ -581,4 +547,4 @@ function MOD:CreateHealPrediction(frame, fullSet) end return healPrediction -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua index ff13651..07a689d 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua @@ -441,7 +441,7 @@ oUF_SuperVillain.Tags.Methods["pvptimer"] = function(unit) else return "" end -end; +end --[[ ########################################################## GROUP TAG HANDLER diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua index 02825c6..d34e4c3 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames.lua @@ -432,7 +432,7 @@ CONSTRUCTORS["target"] = function(self, unit) self.HyperCombo = MOD:CreateDruidCombobar(self, isSmall) end - self.GPS = MOD:CreateGPS(self) + --self.GPS = MOD:CreateGPS(self) self.Friendship = MOD:CreateFriendshipBar(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self.XRay = MOD:CreateXRay(self) @@ -1024,7 +1024,7 @@ function MOD:SetUnitFrame(key) oUF_SuperVillain:SetActiveStyle(styleName) frame = oUF_SuperVillain:Spawn(unit, styleName) self.Units[unit] = frame - self.Roster[#self.Roster+1] = styleName + self.Roster[frame] = styleName else frame = self.Units[unit] end @@ -1052,7 +1052,7 @@ function MOD:SetEnemyFrames(key, maxCount) oUF_SuperVillain:SetActiveStyle(styleName) frame = oUF_SuperVillain:Spawn(unit, styleName) self.Units[unit] = frame - self.Roster[#self.Roster+1] = styleName + self.Roster[frame] = styleName else frame = self.Units[unit] end @@ -1352,7 +1352,7 @@ CONSTRUCTORS["raid10"] = function(self, unit) self.Buffs = MOD:CreateBuffs(self, key) self.Debuffs = MOD:CreateDebuffs(self, key) self.AuraWatch = MOD:CreateAuraWatch(self, key) - self.GPS = MOD:CreateGPS(self, true) + --self.GPS = MOD:CreateGPS(self, true) return SetRaidFrame(self) end @@ -1367,7 +1367,7 @@ CONSTRUCTORS["raid25"] = function(self, unit) self.Buffs = MOD:CreateBuffs(self, key) self.Debuffs = MOD:CreateDebuffs(self, key) self.AuraWatch = MOD:CreateAuraWatch(self, key) - self.GPS = MOD:CreateGPS(self, true) + --self.GPS = MOD:CreateGPS(self, true) return SetRaidFrame(self) end @@ -1382,7 +1382,7 @@ CONSTRUCTORS["raid40"] = function(self, unit) self.Buffs = MOD:CreateBuffs(self, key) self.Debuffs = MOD:CreateDebuffs(self, key) self.AuraWatch = MOD:CreateAuraWatch(self, key) - self.GPS = MOD:CreateGPS(self, true) + --self.GPS = MOD:CreateGPS(self, true) return SetRaidFrame(self) end --[[ @@ -1609,7 +1609,7 @@ CONSTRUCTORS["party"] = function(self, unit) self.RaidIcon = MOD:CreateRaidIcon(self) self.ReadyCheck = MOD:CreateReadyCheckIcon(self) self.HealPrediction = MOD:CreateHealPrediction(self) - self.GPS = MOD:CreateGPS(self, true) + --self.GPS = MOD:CreateGPS(self, true) local shadow = CreateFrame("Frame", nil, self) shadow:SetFrameLevel(1) @@ -2054,7 +2054,7 @@ function MOD:SetGroupFrame(key, filter, template1, forceUpdate, template2) if(key == "tank" or key == "assist") then frame = self:ConstructGroupHeader(SVUI_UnitFrameParent, filter, styleName, styleName, template1, key, template2) - self.Roster[#self.Roster+1] = styleName + self.Roster[frame] = true else frame = CreateFrame("Frame", styleName, SVUI_UnitFrameParent, "SecureHandlerStateTemplate") frame.groups = {} @@ -2082,13 +2082,17 @@ function MOD:SetGroupFrame(key, filter, template1, forceUpdate, template2) if(db.customSorting) then if(not frame.groups[1]) then groupName = styleName .. "Group1" - frame.groups[1] = self:ConstructGroupHeader(frame, 1, styleName, groupName, template1, key, template2) + local subunit = self:ConstructGroupHeader(frame, 1, styleName, groupName, template1, key, template2) + frame.groups[1] = subunit + self.Roster[subunit] = styleName end else for i = 1, db.groupCount do if(not frame.groups[i]) then groupName = styleName .. "Group" .. i - frame.groups[i] = self:ConstructGroupHeader(frame, i, styleName, groupName, template1, key, template2) + local subunit = self:ConstructGroupHeader(frame, i, styleName, groupName, template1, key, template2) + frame.groups[i] = subunit + self.Roster[subunit] = styleName end end end diff --git a/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua b/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua index a028210..9204ad2 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/deathknight.lua @@ -36,9 +36,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "DEATHKNIGHT") then return end; +if(SuperVillain.class ~= "DEATHKNIGHT") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -118,7 +118,7 @@ function MOD:CreateClassBar(playerFrame) bar[i].bg:SetTexture(graphic) bar[i].bg:SetAlpha(0.5) bar[i].bg.multiplier = 0.1 - end; + end local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) @@ -130,4 +130,4 @@ function MOD:CreateClassBar(playerFrame) playerFrame.ClassBarRefresh = Reposition; playerFrame.Runes = bar return 'Runes' -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua index 5f744ed..b59de03 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua @@ -36,9 +36,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "DRUID") then return end; +if(SuperVillain.class ~= "DRUID") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- diff --git a/Interface/AddOns/SVUI/packages/unit/resources/hunter.lua b/Interface/AddOns/SVUI/packages/unit/resources/hunter.lua index f655464..7fd4e83 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/hunter.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/hunter.lua @@ -26,9 +26,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "HUNTER") then return end; +if(SuperVillain.class ~= "HUNTER") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- diff --git a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua index 5719dfc..9848034 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/mage.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/mage.lua @@ -36,9 +36,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "MAGE") then return end; +if(SuperVillain.class ~= "MAGE") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -77,7 +77,7 @@ local Reposition = function(self) bar[i]:Point("LEFT", bar[i - 1], "RIGHT", -1, 0) end end -end; +end --[[ ########################################################## MAGE CHARGES @@ -127,17 +127,17 @@ local Update = function(self, event) if i <= arcaneCharges then bar[i]:Show() bar[i]:SetValue(duration) - if not bar[i].sparks:IsShown() then bar[i].sparks:Show()end; - if not bar[i].charge:IsShown() then bar[i].charge:Show()end; - if not bar[i].under.anim:IsPlaying()then bar[i].under.anim:Play()end; - if not bar[i].sparks.anim:IsPlaying()then bar[i].sparks.anim:Play()end; - if not bar[i].charge.anim:IsPlaying()then bar[i].charge.anim:Play()end; + if not bar[i].sparks:IsShown() then bar[i].sparks:Show()end + if not bar[i].charge:IsShown() then bar[i].charge:Show()end + if not bar[i].under.anim:IsPlaying()then bar[i].under.anim:Play()end + if not bar[i].sparks.anim:IsPlaying()then bar[i].sparks.anim:Play()end + if not bar[i].charge.anim:IsPlaying()then bar[i].charge.anim:Play()end bar[i]:SetScript('OnUpdate', UpdateBar) else bar[i]:SetValue(0) - if bar[i].under.anim:IsPlaying()then bar[i].under.anim:Stop()end; - if bar[i].sparks.anim:IsPlaying()then bar[i].sparks.anim:Stop()end; - if bar[i].charge.anim:IsPlaying()then bar[i].charge.anim:Stop()end; + if bar[i].under.anim:IsPlaying()then bar[i].under.anim:Stop()end + if bar[i].sparks.anim:IsPlaying()then bar[i].sparks.anim:Stop()end + if bar[i].charge.anim:IsPlaying()then bar[i].charge.anim:Stop()end bar[i].sparks:Hide() bar[i].charge:Hide() bar[i]:SetScript('OnUpdate', nil) @@ -183,7 +183,7 @@ function MOD:CreateClassBar(playerFrame) SuperVillain.Animate:Orbit(under, 15, false) bar[i].under = under; bar[i].bg = under.bg; - end; + end bar.Override = Update; local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar) @@ -196,4 +196,4 @@ function MOD:CreateClassBar(playerFrame) playerFrame.ClassBarRefresh = Reposition; playerFrame.ArcaneChargeBar = bar return 'ArcaneChargeBar' -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/resources/monk.lua b/Interface/AddOns/SVUI/packages/unit/resources/monk.lua index e1fcb08..698f71c 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/monk.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/monk.lua @@ -36,9 +36,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "MONK") then return end; +if(SuperVillain.class ~= "MONK") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -79,7 +79,7 @@ local Reposition = function(self) bar[i]:Point("LEFT", bar[i - 1], "RIGHT", -2, 0) end end -end; +end local StartFlash = function(self) SuperVillain.Animate:Flash(self.overlay,1,true) end local StopFlash = function(self) SuperVillain.Animate:StopFlash(self.overlay) end @@ -108,7 +108,7 @@ local function CreateDrunkenMasterBar(playerFrame) stagger.icon:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Unitframe\\Class\\MONK-STAGGER-ICON") stagger:Hide() return stagger -end; +end --[[ ########################################################## MONK HARMONY @@ -147,7 +147,7 @@ function MOD:CreateClassBar(playerFrame) bar[i].overlay:SetVertexColor(0, 0, 0) bar[i]:SetScript("OnShow", StartFlash) bar[i]:SetScript("OnHide", StopFlash) - end; + end local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) @@ -161,4 +161,4 @@ function MOD:CreateClassBar(playerFrame) playerFrame.MonkHarmony = bar return 'MonkHarmony' -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua b/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua index 644363c..625ebd8 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/paladin.lua @@ -36,9 +36,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "PALADIN") then return end; +if(SuperVillain.class ~= "PALADIN") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -83,10 +83,10 @@ local Reposition = function(self) bar[i]:Point("LEFT", bar[i - 1], "RIGHT", -1, 0) end end -end; +end local Update = function(self, event, unit, powerType) - if self.unit ~= unit or (powerType and powerType ~= 'HOLY_POWER') then return end; + if self.unit ~= unit or (powerType and powerType ~= 'HOLY_POWER') then return end local bar = self.HolyPower; local baseCount = UnitPower('player',SPELL_POWER_HOLY_POWER) local maxCount = UnitPowerMax('player',SPELL_POWER_HOLY_POWER) @@ -95,7 +95,7 @@ local Update = function(self, event, unit, powerType) bar[i]:SetAlpha(1) else bar[i]:SetAlpha(0) - end; + end if i > maxCount then bar[i]:Hide() else @@ -106,7 +106,7 @@ local Update = function(self, event, unit, powerType) end end self.MaxClassPower = maxCount -end; +end local AlphaHook = function(self,value) self.swirl[3].anim:Finish() @@ -116,7 +116,7 @@ local AlphaHook = function(self,value) else if(not self.swirl[1].anim:IsPlaying()) then self.swirl[1].anim:Play() - end; + end if(not self.swirl[2].anim:IsPlaying()) then self.swirl[2].anim:Play() end @@ -175,7 +175,7 @@ function MOD:CreateClassBar(playerFrame) bar[i].swirl = barAnimation; hooksecurefunc(bar[i], "SetAlpha", AlphaHook) - end; + end bar.Override = Update; local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar) @@ -188,4 +188,4 @@ function MOD:CreateClassBar(playerFrame) playerFrame.ClassBarRefresh = Reposition; playerFrame.HolyPower = bar return 'HolyPower' -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/resources/priest.lua b/Interface/AddOns/SVUI/packages/unit/resources/priest.lua index 9451add..19a959e 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/priest.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/priest.lua @@ -36,9 +36,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "PRIEST") then return end; +if(SuperVillain.class ~= "PRIEST") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -79,7 +79,7 @@ local Reposition = function(self) bar[i]:Point("LEFT", bar[i - 1], "RIGHT", -1, 0) end end -end; +end --[[ ########################################################## PRIEST @@ -97,7 +97,7 @@ local PreUpdate = function(self, spec) self[i].swirl[1]:SetVertexColor(color[1], color[2], color[3]) self[i].swirl[2]:SetVertexColor(color[4], color[5], color[6]) end -end; +end function MOD:CreateClassBar(playerFrame) local max = 5 @@ -136,7 +136,7 @@ function MOD:CreateClassBar(playerFrame) bar[i]:SetScript("OnShow", function(self) if not self.swirl[1].anim:IsPlaying() then self.swirl[1].anim:Play() - end; + end if not self.swirl[2].anim:IsPlaying() then self.swirl[2].anim:Play() end @@ -146,7 +146,7 @@ function MOD:CreateClassBar(playerFrame) self.swirl[2].anim:Finish() end) - end; + end bar.PreUpdate = PreUpdate local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar) @@ -160,4 +160,4 @@ function MOD:CreateClassBar(playerFrame) playerFrame.PriestOrbs = bar return 'PriestOrbs' -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua index 4fc1fc1..1bc7734 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua @@ -36,9 +36,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "ROGUE") then return end; +if(SuperVillain.class ~= "ROGUE") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -95,7 +95,7 @@ local Reposition = function(self) bar[i]:Point("LEFT", bar[i - 1], "RIGHT", -2, 0) end end -end; +end --[[ ########################################################## ROGUE COMBO POINTS @@ -103,22 +103,22 @@ ROGUE COMBO POINTS ]]-- local ShowPoint = function(self) self:SetAlpha(1) -end; +end local HidePoint = function(self) local coords = ICON_COORDS[random(2,4)]; self.Icon:SetTexCoord(coords[1],coords[2],coords[3],coords[4]) self:SetAlpha(0) -end; +end local ShowSmallPoint = function(self) self:SetAlpha(1) -end; +end local HideSmallPoint = function(self) self.Icon:SetVertexColor(unpack(cpointColor[i])) self:SetAlpha(0) -end; +end function MOD:CreateRogueCombobar(targetFrame, isSmall) local max = 5 @@ -156,14 +156,14 @@ function MOD:CreateRogueCombobar(targetFrame, isSmall) cpoint.Icon = icon bar.CPoints[i] = cpoint - end; + end targetFrame.ComboRefresh = Reposition; bar.PointShow = isSmall and ShowSmallPoint or ShowPoint; bar.PointHide = isSmall and HideSmallPoint or HidePoint; return bar -end; +end --[[ ########################################################## ROGUE COMBO TRACKER @@ -214,7 +214,7 @@ local RepositionTracker = function(self) bar.Guile.Text:SetAllPoints(bar.Guile) bar.Guile.Text:SetFont(TRACKER_FONT, size, 'OUTLINE') end -end; +end function MOD:CreateClassBar(playerFrame) local bar = CreateFrame("Frame",nil,playerFrame) @@ -263,4 +263,4 @@ function MOD:CreateClassBar(playerFrame) playerFrame.ClassBarRefresh = RepositionTracker; playerFrame.HyperCombo = bar return 'HyperCombo' -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua index aac7748..268e07f 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua @@ -36,9 +36,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "SHAMAN") then return end; +if(SuperVillain.class ~= "SHAMAN") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -89,7 +89,7 @@ local Reposition = function(self) bar[i]:Point("LEFT", bar[i - 1], "RIGHT", -1, 0) end end -end; +end --[[ ########################################################## SHAMAN @@ -110,7 +110,7 @@ function MOD:CreateClassBar(playerFrame) bar[i].backdrop:SetTexture(iconfile) bar[i].backdrop:SetDesaturated(true) bar[i].backdrop:SetVertexColor(0.2,0.2,0.2,0.7) - end; + end local classBarHolder = CreateFrame("Frame", "Player_ClassBar", classBar) classBarHolder:Point("TOPLEFT", playerFrame, "BOTTOMLEFT", 0, -2) @@ -122,4 +122,4 @@ function MOD:CreateClassBar(playerFrame) playerFrame.ClassBarRefresh = Reposition; playerFrame.TotemBars = bar return 'TotemBars' -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua index ba9d9d2..48707a4 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/warlock.lua @@ -36,9 +36,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "WARLOCK") then return end; +if(SuperVillain.class ~= "WARLOCK") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- @@ -109,7 +109,7 @@ local Reposition = function(self) bar[i]:Point("LEFT", bar[i - 1], "RIGHT", -2, 0) end end -end; +end --[[ ########################################################## CUSTOM HANDLERS @@ -169,7 +169,7 @@ local UpdateTextures = function(bar, spec, max) end bar.CurrentSpec = spec end -end; +end local Update = function(self, event, unit, powerType) local bar = self.WarlockShards; @@ -272,7 +272,7 @@ local Update = function(self, event, unit, powerType) if(bar.PostUpdate) then return bar:PostUpdate(unit, spec) end -end; +end --[[ ########################################################## WARLOCK @@ -311,7 +311,7 @@ function MOD:CreateClassBar(playerFrame) bar[i].backdrop:SetVertexColor(unpack(shardBGColor[1])) bar[i].overlay:SetVertexColor(unpack(shardOverColor[1])) bar[i].underlay:SetVertexColor(unpack(shardUnderColor[1])) - end; + end local demonBar = CreateFrame("StatusBar",nil,bar) demonBar.noupdate = true; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/warrior.lua b/Interface/AddOns/SVUI/packages/unit/resources/warrior.lua index 5e364ef..a61404c 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/warrior.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/warrior.lua @@ -26,9 +26,9 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); -if(SuperVillain.class ~= "WARRIOR") then return end; +if(SuperVillain.class ~= "WARRIOR") then return end local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local oUF_SuperVillain = ns.oUF --[[ MUNGLUNCH's FASTER ASSERT FUNCTION ]]-- diff --git a/Interface/AddOns/SVUI/scripts/comix.lua b/Interface/AddOns/SVUI/scripts/comix.lua index 98cd9f2..c7995bb 100644 --- a/Interface/AddOns/SVUI/scripts/comix.lua +++ b/Interface/AddOns/SVUI/scripts/comix.lua @@ -83,7 +83,7 @@ CORE FUNCTIONS function Comix:ReadyState(state) if(state == nil) then return animReady end animReady = state -end; +end function Comix:LaunchPopup(comicType) local rng = random(1, 16); @@ -106,7 +106,7 @@ function Comix:LaunchPopup(comicType) frame = ComixDeluxePanel end local step1_x = random(-280, 280); - if(step1_x > -30 and step1_x < 30) then step1_x = 150 end; + if(step1_x > -30 and step1_x < 30) then step1_x = 150 end local step2_x = step1_x * 0.5; local step1_y = random(50, 100); local step2_y = step1_y * 0.75; @@ -116,7 +116,7 @@ function Comix:LaunchPopup(comicType) frame.anim[3]:SetOffset(0,0) frame.anim:Play() end -end; +end local Comix_OnEvent = function(self, event, ...) local subEvent = select(2,...) @@ -144,7 +144,7 @@ function SuperVillain:ToggleComix() Comix:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") Comix:SetScript("OnEvent", Comix_OnEvent) end -end; +end function SuperVillain:ToastyKombat() --Comix:LaunchPopup("DELUXE") @@ -152,7 +152,7 @@ function SuperVillain:ToastyKombat() ComixToastyPanelBG.anim[2]:SetOffset(0, 0) ComixToastyPanelBG.anim:Play() PlaySoundFile([[Interface\AddOns\SVUI\assets\sounds\toasty.mp3]]) -end; +end local Comix_OnUpdate = function() Comix:ReadyState(true) end local Toasty_OnUpdate = function(self) Comix:ReadyState(true);self.parent:SetAlpha(0) end diff --git a/Interface/AddOns/SVUI/scripts/mounts.lua b/Interface/AddOns/SVUI/scripts/mounts.lua index f5e625a..0016565 100644 --- a/Interface/AddOns/SVUI/scripts/mounts.lua +++ b/Interface/AddOns/SVUI/scripts/mounts.lua @@ -132,7 +132,7 @@ end local function Update_MountCheckButtons() if(not MountJournal or not MountJournal.cachedMounts) then return end local count = #MountJournal.cachedMounts - if(type(count) ~= "number") then return end; + if(type(count) ~= "number") then return end local scrollFrame = MountJournal.ListScrollFrame; local offset = HybridScrollFrame_GetOffset(scrollFrame); local buttons = scrollFrame.buttons; @@ -247,7 +247,7 @@ local function SetMountCheckButtons() ["SPECIAL"] = "" } } - end; + end UpdateMountCache() local scrollFrame = MountJournal.ListScrollFrame; local scrollBar = _G["MountJournalListScrollFrameScrollBar"] diff --git a/Interface/AddOns/SVUI/scripts/questwatch.lua b/Interface/AddOns/SVUI/scripts/questwatch.lua index e62a98c..5e212c8 100644 --- a/Interface/AddOns/SVUI/scripts/questwatch.lua +++ b/Interface/AddOns/SVUI/scripts/questwatch.lua @@ -70,17 +70,17 @@ PRE VARS/FUNCTIONS ]]-- local IsTrackingCompletedQuests = function() return band(WATCHFRAME_FILTER_TYPE, WATCHFRAME_FILTER_COMPLETED_QUESTS) == WATCHFRAME_FILTER_COMPLETED_QUESTS or false; -end; +end local IsTrackingRemoteQuests = function() return ( band(WATCHFRAME_FILTER_TYPE, WATCHFRAME_FILTER_REMOTE_ZONES) == WATCHFRAME_FILTER_REMOTE_ZONES ) or false; -end; +end local IsTrackingAchievements = function() return ( band(WATCHFRAME_FILTER_TYPE, WATCHFRAME_FILTER_ACHIEVEMENTS) == WATCHFRAME_FILTER_ACHIEVEMENTS ) or false; -end; +end local IsUsingFilters = function() if ( WATCHFRAME_FILTER_COMPLETED_QUESTS == nil ) then return false; end return true; -end; +end --[[ QUEST ITEM MACRO @@ -116,7 +116,7 @@ local function QWQuestItems() end end end -end; +end local function QWCheckTimers() local lstTimers = GetQuestTimers(); @@ -129,7 +129,7 @@ local function QWCheckTimers() numTimers = 0; end return filterOK,numTimers; -end; +end local function QWCheckQuests() local numQuestWatches = GetNumQuestWatches(); @@ -197,7 +197,7 @@ local function QWCheckQuests() filterOK = true; end return filterOK, numQuestWatches or 0; -end; +end local function QWSetAllLevels() local i = 1 @@ -229,7 +229,7 @@ local function QWCheckAchievements() filterOK = true; end return filterOK, numAchievementWatches or 0; -end; +end local function QWSetWatchFrameTitle() local _, numQuests, numAchievements, numTimers @@ -239,20 +239,20 @@ local function QWSetWatchFrameTitle() local numTracked = numQuests + numAchievements + numTimers; if WatchFrameTitle then WatchFrameTitle:SetText(OBJECTIVES_TRACKER_LABEL.." ("..numTracked ..")") - end; -end; + end +end local function QWCheckAutoShow(self) - if not self then return end; + if not self then return end if self:IsShown() then if WatchFrameHeader then WatchFrameHeader:Show() - end; + end WatchFrameTitle:Show() WatchFrameCollapseExpandButton:Show() WatchFrameLines:Show() end -end; +end local function SetQuestDockEvents() WatchFrame:HookScript("OnEvent", QWQuestItems) @@ -261,35 +261,35 @@ local function SetQuestDockEvents() WATCHFRAME_MAXLINEWIDTH = WatchFrame:GetWidth(); if QuestDockletFrameList then WATCHFRAME_MAXLINEWIDTH = QuestDockletFrameList:GetWidth() - 62 - end; - end; + end + end WatchFrame.OnUpdate = function() WATCHFRAME_MAXLINEWIDTH = WatchFrame:GetWidth() if QuestDockletFrameList then WATCHFRAME_MAXLINEWIDTH = QuestDockletFrameList:GetWidth() - 62 - end; + end QWQuestItems(); --QWSetAllLevels() WatchFrame.ScrollListUpdate() - end; + end WatchFrame.OnShow = function() Collapsed = (WatchFrame.collapsed or false); if WatchFrameHeader == nil then WatchFrame.userCollapsed = true - end; + end UserCollapsed = (WatchFrame.userCollapsed or false); if Collapsed then WatchFrame_Collapse(WatchFrame) WatchFrame.userCollapsed=UserCollapsed else WatchFrame_Expand(WatchFrame) - end; + end WatchFrame.OnUpdate(); - end; + end WatchFrame.OnShow() hooksecurefunc("QuestLog_Update", WatchFrame.OnUpdate) -end; +end --[[ ########################################################## CORE FUNCTIONS @@ -303,7 +303,7 @@ local QuestDocklet_OnEvent = function(self, event) end end elseif event == "QUEST_AUTOCOMPLETE" then - if SuperDockWindowRight.FrameName and _G[SuperDockWindowRight.FrameName] and _G[SuperDockWindowRight.FrameName]:IsShown() then return end; + if SuperDockWindowRight.FrameName and _G[SuperDockWindowRight.FrameName] and _G[SuperDockWindowRight.FrameName]:IsShown() then return end local button = _G["QuestDockletFrame_ToolBarButton"] if not QuestDockletFrame:IsShown() then SuperDockWindowRight.FrameName = "QuestDockletFrame" @@ -369,10 +369,10 @@ local function CreateQuestDocklet() local value = (scroll - (20 * delta)); if value < -1 then value = 0 - end; + end if value > 420 then value = 420 - end; + end self:SetVerticalScroll(value) self.slider:SetValue(value) end) @@ -394,7 +394,7 @@ local function CreateQuestDocklet() else WATCHFRAME_MAXLINEWIDTH = (WatchFrame:GetWidth() - 100); WATCHFRAME_EXPANDEDWIDTH = (WatchFrame:GetWidth() - 100); - end; + end WatchFrame:SetWidth(WATCHFRAME_MAXLINEWIDTH) WatchFrameHeader:SetParent(QuestDockletFrame) @@ -440,6 +440,6 @@ local function CreateQuestDocklet() QuestDocklet:RegisterEvent("QUEST_AUTOCOMPLETE") QuestDocklet:SetScript("OnEvent", QuestDocklet_OnEvent) end -end; +end SuperVillain.Registry:NewScript(CreateQuestDocklet) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/spellbind.lua b/Interface/AddOns/SVUI/scripts/spellbind.lua index 5343c4e..cd6d206 100644 --- a/Interface/AddOns/SVUI/scripts/spellbind.lua +++ b/Interface/AddOns/SVUI/scripts/spellbind.lua @@ -264,7 +264,6 @@ local function binder_BuildSpells(self, delete) if frame:CanChangeAttribute() or frame:CanChangeProtectedState() then if frame:GetAttribute(spell.modifier.."type"..spell.button) ~= "menu" then --frame:RegisterForClicks("AnyDown") - if spell.button:find("harmbutton") then frame:SetAttribute(spell.modifier..spell.button, spell.spell) frame:SetAttribute(spell.modifier.."type-"..spell.spell, "spell") @@ -380,9 +379,8 @@ local function enable(frame) end local BindableFrames = SuperVillain.SVUnit.Roster - -for i, v in pairs(BindableFrames) do - if _G[v] then binder.roster[_G[v]] = true end +for unit,name in pairs(BindableFrames) do + binder.roster[unit] = name end binder.BuildSpells = binder_BuildSpells @@ -426,8 +424,9 @@ binder:RegisterEvent("ZONE_CHANGED") binder:SetScript("OnEvent", SpellBind_OnEvent) local function LoadSpellBinder() - for i, v in pairs(SuperVillain.SVUnit.Roster) do - if _G[v] then binder.roster[_G[v]] = true end + local BindableFrames = SuperVillain.SVUnit.Roster + for unit,name in pairs(BindableFrames) do + binder.roster[unit] = name end end diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index 9ef2faa..4a2500a 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -49,22 +49,22 @@ LOCAL VARS ]]-- local BUFFER = {}; local function UpdateActionBarOptions() - if InCombatLockdown() or not SuperVillain.db.SVBar.IsLoaded then return end; + if InCombatLockdown() or not SuperVillain.db.SVBar.IsLoaded then return end if (SuperVillain.db.SVBar.Bar2.enable ~= InterfaceOptionsActionBarsPanelBottomRight:GetChecked()) then InterfaceOptionsActionBarsPanelBottomRight:Click() - end; + end if (SuperVillain.db.SVBar.Bar3.enable ~= InterfaceOptionsActionBarsPanelRightTwo:GetChecked()) then InterfaceOptionsActionBarsPanelRightTwo:Click() - end; + end if (SuperVillain.db.SVBar.Bar4.enable ~= InterfaceOptionsActionBarsPanelRight:GetChecked()) then InterfaceOptionsActionBarsPanelRight:Click() - end; + end if (SuperVillain.db.SVBar.Bar5.enable ~= InterfaceOptionsActionBarsPanelBottomLeft:GetChecked()) then InterfaceOptionsActionBarsPanelBottomLeft:Click() - end; + end SuperVillain.SVBar:RefreshBar("Bar1") SuperVillain.SVBar:RefreshBar("Bar6") -end; +end --[[ ########################################################## DEFINITIONS @@ -839,7 +839,7 @@ local function SetConfigAlertAnim(f) end function SuperVillain:SavedPopup() - if not _G["SVUI_ConfigAlert"] then return end; + if not _G["SVUI_ConfigAlert"] then return end local alert = _G["SVUI_ConfigAlert"] local x,y = rng() if(alert:IsShown()) then @@ -888,7 +888,7 @@ function SuperVillain:LoadSystemAlerts() SetConfigAlertAnim(configAlert.bg, configAlert) SetConfigAlertAnim(configAlert.fg, configAlert) SuperVillain.Animate:Orbit(configAlert.bg, 10, false, true) - end; + end for i = 1, 4 do local alert = CreateFrame("Frame", "SVUI_SystemAlert"..i, SuperVillain.UIParent, "StaticPopupTemplate") alert:SetID(i) @@ -908,11 +908,11 @@ function SuperVillain:LoadSystemAlerts() local button = _G["SVUI_SystemAlert"..i.."Button"..b]; button:SetScript("OnClick", AlertButton_OnClick) alert.buttons[b] = button - end; + end _G["SVUI_SystemAlert"..i.."ItemFrameNameFrame"]:MUNG() _G["SVUI_SystemAlert"..i.."ItemFrame"]:GetNormalTexture():MUNG() _G["SVUI_SystemAlert"..i.."ItemFrame"]:SetButtonTemplate() _G["SVUI_SystemAlert"..i.."ItemFrameIconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) _G["SVUI_SystemAlert"..i.."ItemFrameIconTexture"]:FillInner() end -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/common.lua b/Interface/AddOns/SVUI/system/common.lua index 61f7e2d..5d95800 100644 --- a/Interface/AddOns/SVUI/system/common.lua +++ b/Interface/AddOns/SVUI/system/common.lua @@ -82,7 +82,7 @@ function SuperVillain:UIScale(event) gxHeight = SVUI_Cache.screenheight; gxWidth = SVUI_Cache.screenwidth end - end; + end if self.db.system.autoScale then scale = max(0.64, min(1.15, gxMod)) @@ -158,7 +158,7 @@ function SuperVillain:UIScale(event) self:StaticPopup_Show('FAILED_UISCALE') elseif(event == 'UI_SCALE_CHANGED' and change > 1) then self:StaticPopup_Show('RL_CLIENT') - end; + end self.UIParent:UnregisterEvent('PLAYER_LOGIN') end @@ -724,14 +724,21 @@ local HookCustomBackdrop = function(self) }, } self:SetBackdrop(bd) -end +end + +local HookFrameLevel = function(self, level) + local adjustment = level - 1; + if(adjustment < 0) then adjustment = 0 end + self.Panel:SetFrameLevel(adjustment) +end --[[ ########################################################## TEMPLATE HELPERS ########################################################## ]]-- local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padding, xOffset, yOffset) - if(not templateName or not _templates[templateName]) then templateName = 'Default' end + if(not templateName or not _templates[templateName]) then templateName = frame._template or 'Default' end + local settings = _templates[templateName] local colorName = settings.color local gradientName = settings.gradient @@ -742,6 +749,7 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd local bgColor = SuperVillain.Media.color[colorName] or {0.18,0.18,0.18,1} local borderColor = {0,0,0,1} local initLevel = 0; + local needsHooks = false; padding = padding or settings.padding or 1 @@ -754,45 +762,66 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd frame._texture = false; frame._noupdate = bypass; - local panel; - if(not frame.Panel) then panel = NewFrame('Frame', nil, frame) else panel = frame.Panel end - panel:Point('TOPLEFT', frame, 'TOPLEFT', (xOffset * -1), yOffset) - panel:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', xOffset, (yOffset * -1)) - - if(padding > 0 and type(t) == 'table') then - panel[1] = panel:CreateTexture(nil,"BORDER") - panel[1]:SetTexture(0,0,0) - panel[1]:SetPoint("TOPLEFT") - panel[1]:SetPoint("BOTTOMLEFT") - panel[1]:SetWidth(padding) - panel[2] = panel:CreateTexture(nil,"BORDER") - panel[2]:SetTexture(0,0,0) - panel[2]:SetPoint("TOPRIGHT") - panel[2]:SetPoint("BOTTOMRIGHT") - panel[2]:SetWidth(padding) - panel[3] = panel:CreateTexture(nil,"BORDER") - panel[3]:SetTexture(0,0,0) - panel[3]:SetPoint("TOPLEFT") - panel[3]:SetPoint("TOPRIGHT") - panel[3]:SetHeight(padding) - panel[4] = panel:CreateTexture(nil,"BORDER") - panel[4]:SetTexture(0,0,0) - panel[4]:SetPoint("BOTTOMLEFT") - panel[4]:SetPoint("BOTTOMRIGHT") - panel[4]:SetHeight(padding) + if(not frame.Panel) then + needsHooks = true + + local panel = NewFrame('Frame', nil, frame) + panel:Point('TOPLEFT', frame, 'TOPLEFT', (xOffset * -1), yOffset) + panel:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', xOffset, (yOffset * -1)) + + if(padding > 0 and type(t) == 'table') then + panel[1] = panel:CreateTexture(nil,"BORDER") + panel[1]:SetTexture(0,0,0) + panel[1]:SetPoint("TOPLEFT") + panel[1]:SetPoint("BOTTOMLEFT") + panel[1]:SetWidth(padding) + panel[2] = panel:CreateTexture(nil,"BORDER") + panel[2]:SetTexture(0,0,0) + panel[2]:SetPoint("TOPRIGHT") + panel[2]:SetPoint("BOTTOMRIGHT") + panel[2]:SetWidth(padding) + panel[3] = panel:CreateTexture(nil,"BORDER") + panel[3]:SetTexture(0,0,0) + panel[3]:SetPoint("TOPLEFT") + panel[3]:SetPoint("TOPRIGHT") + panel[3]:SetHeight(padding) + panel[4] = panel:CreateTexture(nil,"BORDER") + panel[4]:SetTexture(0,0,0) + panel[4]:SetPoint("BOTTOMLEFT") + panel[4]:SetPoint("BOTTOMRIGHT") + panel[4]:SetHeight(padding) + end + + local level = frame:GetFrameLevel() + if(level == 0 and not InCombatLockdown()) then + frame:SetFrameLevel(1) + level = 1 + end + + local adjustment = level - 1; + if(adjustment < 0) then adjustment = 0 end + + panel:SetFrameLevel(adjustment) + + NewHook(frame, "SetFrameLevel", HookFrameLevel) + + frame.Panel = panel end if(hasShadow) then - if(underlay) then - panel[5] = NewFrame('Frame', nil, panel) - panel[5]:Point('TOPLEFT', panel, 'TOPLEFT', -3, 3) - panel[5]:Point('BOTTOMRIGHT', panel, 'BOTTOMRIGHT', 3, -3) - else - panel[5] = NewFrame('Frame', nil, frame) - panel[5]:Point('TOPLEFT', frame, 'TOPLEFT', -3, 3) - panel[5]:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', 3, -3) + if(not frame.Panel[5]) then + if(underlay) then + frame.Panel[5] = NewFrame('Frame', nil, frame.Panel) + frame.Panel[5]:Point('TOPLEFT', frame.Panel, 'TOPLEFT', -3, 3) + frame.Panel[5]:Point('BOTTOMRIGHT', frame.Panel, 'BOTTOMRIGHT', 3, -3) + else + frame.Panel[5] = NewFrame('Frame', nil, frame) + frame.Panel[5]:Point('TOPLEFT', frame, 'TOPLEFT', -3, 3) + frame.Panel[5]:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', 3, -3) + end end - panel[5]:SetBackdrop({ + + frame.Panel[5]:SetBackdrop({ edgeFile = [[Interface\AddOns\SVUI\assets\artwork\Template\GLOW]], edgeSize = 3, insets = { @@ -802,16 +831,18 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd bottom = 0 } }); - panel[5]:SetBackdropBorderColor(0,0,0,0.5) - local level = panel[5]:GetFrameLevel() - 1 + + frame.Panel[5]:SetBackdropBorderColor(0,0,0,0.5) + + local level = frame.Panel[5]:GetFrameLevel() - 1 + if(level >= 0) then - panel[5]:SetFrameLevel(level) + frame.Panel[5]:SetFrameLevel(level) else - panel[5]:SetFrameLevel(0) + frame.Panel[5]:SetFrameLevel(0) end end - frame.Panel = panel if(bd) then initLevel = 1; @@ -824,7 +855,8 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd frame:SetBackdropColor(bgColor[1],bgColor[2],bgColor[3],bgColor[4] or 1) frame:SetBackdropBorderColor(0,0,0,1) end - if(templateName ~= 'Transparent') then + + if(needsHooks and templateName ~= 'Transparent') then NewHook(frame.Panel, "SetBackdropBorderColor", HookPanelBorderColor) NewHook(frame, "SetBackdropBorderColor", HookBackdropBorderColor) if(underlay) then @@ -841,22 +873,26 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd if(texFile) then local xyOffset = padding + 1; - if(underlay) then - frame._skin = frame.Panel:CreateTexture(nil,"BACKGROUND",nil,initLevel) - frame._skin:Point('TOPLEFT', frame.Panel, 'TOPLEFT', xyOffset, (xyOffset * -1)) - frame._skin:Point('BOTTOMRIGHT', frame.Panel, 'BOTTOMRIGHT', (xyOffset * -1), xyOffset) - else - frame._skin = frame:CreateTexture(nil,"BACKGROUND",nil,initLevel) - frame._skin:Point('TOPLEFT', frame, 'TOPLEFT', xyOffset, (xyOffset * -1)) - frame._skin:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', (xyOffset * -1), xyOffset) + if(not frame._skin) then + if(underlay) then + frame._skin = frame.Panel:CreateTexture(nil,"BACKGROUND",nil,initLevel) + frame._skin:Point('TOPLEFT', frame.Panel, 'TOPLEFT', xyOffset, (xyOffset * -1)) + frame._skin:Point('BOTTOMRIGHT', frame.Panel, 'BOTTOMRIGHT', (xyOffset * -1), xyOffset) + else + frame._skin = frame:CreateTexture(nil,"BACKGROUND",nil,initLevel) + frame._skin:Point('TOPLEFT', frame, 'TOPLEFT', xyOffset, (xyOffset * -1)) + frame._skin:Point('BOTTOMRIGHT', frame, 'BOTTOMRIGHT', (xyOffset * -1), xyOffset) + end end frame._skin:SetTexture(texFile) + if(gradientName and SuperVillain.Media.gradient[gradientName]) then frame._skin:SetGradient(unpack(SuperVillain.Media.gradient[gradientName])) else frame._skin:SetVertexColor(bgColor[1], bgColor[2], bgColor[3], bgColor[4] or 1) end + frame._skin:SetNonBlocking(true) if((not bypass) and settings.texupdate) then @@ -875,45 +911,48 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd if(not underlay) then initLevel = 0 end + local name = settings.extended - local topLeft = frame.Panel:CreateTexture(nil, "BACKGROUND", nil, initLevel) - topLeft:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Extended\]] .. name .. [[_TOPLEFT]]) - topLeft:SetPoint("TOPLEFT", frame.Panel, "TOPLEFT", 0, 0) - topLeft:SetPoint("TOPRIGHT", frame.Panel, "TOP", 0, 0) - topLeft:SetPoint("BOTTOMLEFT", frame.Panel, "LEFT", 0, 0) - topLeft:SetVertexColor(0.05, 0.05, 0.05, 0.5) - topLeft:SetNonBlocking(true) - - local topRight = frame.Panel:CreateTexture(nil, "BACKGROUND", nil, initLevel) - topRight:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Extended\]] .. name .. [[_TOPRIGHT]]) - topRight:SetPoint("TOPRIGHT", frame.Panel, "TOPRIGHT", 0, 0) - topRight:SetPoint("TOPLEFT", frame.Panel, "TOP", 0, 0) - topRight:SetPoint("BOTTOMRIGHT", frame.Panel, "RIGHT", 0, 0) - topRight:SetVertexColor(0.05, 0.05, 0.05, 0.5) - topRight:SetNonBlocking(true) - - local bottomRight = frame.Panel:CreateTexture(nil, "BACKGROUND", nil, initLevel) - bottomRight:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Extended\]] .. name .. [[_BOTTOMRIGHT]]) - bottomRight:SetPoint("BOTTOMRIGHT", frame.Panel, "BOTTOMRIGHT", 0, 0) - bottomRight:SetPoint("BOTTOMLEFT", frame.Panel, "BOTTOM", 0, 0) - bottomRight:SetPoint("TOPRIGHT", frame.Panel, "RIGHT", 0, 0) - bottomRight:SetVertexColor(0.1, 0.1, 0.1, 0.5) - bottomRight:SetNonBlocking(true) - - local bottomLeft = frame.Panel:CreateTexture(nil, "BACKGROUND", nil, initLevel) - bottomLeft:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Extended\]] .. name .. [[_BOTTOMLEFT]]) - bottomLeft:SetPoint("BOTTOMLEFT", frame.Panel, "BOTTOMLEFT", 0, 0) - bottomLeft:SetPoint("BOTTOMRIGHT", frame.Panel, "BOTTOM", 0, 0) - bottomLeft:SetPoint("TOPLEFT", frame.Panel, "LEFT", 0, 0) - bottomLeft:SetVertexColor(0.1, 0.1, 0.1, 0.5) - bottomLeft:SetNonBlocking(true) - end - local level = frame:GetFrameLevel() - if(level > 0) then level = level - 1 end - frame.Panel:SetFrameLevel(level) - if(level == 0 and not InCombatLockdown()) then - frame:SetFrameLevel(1) + if(not frame._extended) then + frame._extended = {} + + frame._extended[1] = frame.Panel:CreateTexture(nil, "BACKGROUND", nil, initLevel) + frame._extended[1]:SetPoint("TOPLEFT", frame.Panel, "TOPLEFT", 0, 0) + frame._extended[1]:SetPoint("TOPRIGHT", frame.Panel, "TOP", 0, 0) + frame._extended[1]:SetPoint("BOTTOMLEFT", frame.Panel, "LEFT", 0, 0) + + frame._extended[2] = frame.Panel:CreateTexture(nil, "BACKGROUND", nil, initLevel) + frame._extended[2]:SetPoint("TOPRIGHT", frame.Panel, "TOPRIGHT", 0, 0) + frame._extended[2]:SetPoint("TOPLEFT", frame.Panel, "TOP", 0, 0) + frame._extended[2]:SetPoint("BOTTOMRIGHT", frame.Panel, "RIGHT", 0, 0) + + frame._extended[3] = frame.Panel:CreateTexture(nil, "BACKGROUND", nil, initLevel) + frame._extended[3]:SetPoint("BOTTOMRIGHT", frame.Panel, "BOTTOMRIGHT", 0, 0) + frame._extended[3]:SetPoint("BOTTOMLEFT", frame.Panel, "BOTTOM", 0, 0) + frame._extended[3]:SetPoint("TOPRIGHT", frame.Panel, "RIGHT", 0, 0) + + frame._extended[4] = frame.Panel:CreateTexture(nil, "BACKGROUND", nil, initLevel) + frame._extended[4]:SetPoint("BOTTOMLEFT", frame.Panel, "BOTTOMLEFT", 0, 0) + frame._extended[4]:SetPoint("BOTTOMRIGHT", frame.Panel, "BOTTOM", 0, 0) + frame._extended[4]:SetPoint("TOPLEFT", frame.Panel, "LEFT", 0, 0) + end + + frame._extended[1]:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Extended\]] .. name .. [[_TOPLEFT]]) + frame._extended[1]:SetVertexColor(0.05, 0.05, 0.05, 0.5) + frame._extended[1]:SetNonBlocking(true) + + frame._extended[2]:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Extended\]] .. name .. [[_TOPRIGHT]]) + frame._extended[2]:SetVertexColor(0.05, 0.05, 0.05, 0.5) + frame._extended[2]:SetNonBlocking(true) + + frame._extended[3]:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Extended\]] .. name .. [[_BOTTOMRIGHT]]) + frame._extended[3]:SetVertexColor(0.1, 0.1, 0.1, 0.5) + frame._extended[3]:SetNonBlocking(true) + + frame._extended[4]:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\Extended\]] .. name .. [[_BOTTOMLEFT]]) + frame._extended[4]:SetVertexColor(0.1, 0.1, 0.1, 0.5) + frame._extended[4]:SetNonBlocking(true) end end @@ -923,7 +962,6 @@ local function HasCooldown(n) end local function CreateButtonPanel(frame, noChecked, brightChecked) - if(frame.hasPanel) then return end if(frame.Left) then frame.Left:SetAlpha(0) @@ -949,44 +987,50 @@ local function CreateButtonPanel(frame, noChecked, brightChecked) frame:SetCheckedTexture("") end - if(frame.SetHighlightTexture and not frame.hover) then - local hover = frame:CreateTexture(nil, "OVERLAY") + if(frame.SetHighlightTexture) then + if(not frame.hover) then + local hover = frame:CreateTexture(nil, "OVERLAY") + hover:FillInner(frame.Panel) + frame.hover = hover; + end local color = SuperVillain.Media.color.highlight - hover:SetTexture(color[1], color[2], color[3], 0.5) - hover:FillInner(frame.Panel) - frame.hover = hover; - frame:SetHighlightTexture(hover) + frame.hover:SetTexture(color[1], color[2], color[3], 0.5) + frame:SetHighlightTexture(frame.hover) end - if(frame.SetPushedTexture and not frame.pushed) then - local pushed = frame:CreateTexture(nil, "OVERLAY") - pushed:SetTexture(0.1, 0.8, 0.1, 0.3) - pushed:FillInner(frame.Panel) - frame.pushed = pushed; - frame:SetPushedTexture(pushed) + if(frame.SetPushedTexture) then + if(not frame.pushed) then + local pushed = frame:CreateTexture(nil, "OVERLAY") + pushed:FillInner(frame.Panel) + frame.pushed = pushed; + end + frame.pushed:SetTexture(0.1, 0.8, 0.1, 0.3) + frame:SetPushedTexture(frame.pushed) end - if(not noChecked and frame.SetCheckedTexture) then - local checked = frame:CreateTexture(nil, "OVERLAY") + if(not noChecked and frame.SetCheckedTexture) then + if(not frame.checked) then + local checked = frame:CreateTexture(nil, "OVERLAY") + checked:FillInner(frame.Panel) + frame.checked = checked + end + if(not brightChecked) then - checked:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - checked:SetVertexColor(0, 0.5, 0, 0.2) + frame.checked:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + frame.checked:SetVertexColor(0, 0.5, 0, 0.2) else - checked:SetTexture(SuperVillain.Media.bar.gloss) - checked:SetVertexColor(0, 1, 0, 1) + frame.checked:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\GLOSS]]) + frame.checked:SetVertexColor(0, 1, 0, 1) end - checked:FillInner(frame.Panel) - frame.checked = checked; - frame:SetCheckedTexture(checked) - end + + frame:SetCheckedTexture(frame.checked) + end local cd = HasCooldown(frame:GetName()) if cd then cd:ClearAllPoints() cd:SetAllPoints() - end - - frame.hasPanel = true + end end --[[ ########################################################## @@ -994,21 +1038,16 @@ TEMPLATE API ########################################################## ]]-- local function SetBasicPanel(self, topX, topY, bottomX, bottomY, hasShadow) - if(not self or (self and self.Panel)) then return end - - local frame = self - - local currentLevel = self:GetFrameLevel() - if(currentLevel == 0) then - currentLevel = 1 - end - - if(not self.Panel) then self.Panel = CreateFrame("Frame", nil, frame) end + local needsHooks = false; if(hasShadow) then - self.Panel:SetPoint("TOPLEFT", frame, "TOPLEFT", -2, 2) - self.Panel:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", 2, -2) - self.Panel:SetFrameLevel(currentLevel - 1) + if(not self.Panel) then + needsHooks = true + + self.Panel = CreateFrame("Frame", nil, self) + self.Panel:SetPoint("TOPLEFT", self, "TOPLEFT", -2, 2) + self.Panel:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", 2, -2) + end self.Panel:SetBackdrop({ bgFile = [[Interface\BUTTONS\WHITE8X8]], @@ -1027,9 +1066,13 @@ local function SetBasicPanel(self, topX, topY, bottomX, bottomY, hasShadow) self.Panel:SetBackdropColor(0,0,0,0) self.Panel:SetBackdropBorderColor(0,0,0) else - self.Panel:SetPoint("TOPLEFT", frame, "TOPLEFT", topX, topY) - self.Panel:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", bottomX, bottomY) - self.Panel:SetFrameLevel(currentLevel - 1) + if(not self.Panel) then + needsHooks = true + + self.Panel = CreateFrame("Frame", nil, self) + self.Panel:SetPoint("TOPLEFT", self, "TOPLEFT", topX, topY) + self.Panel:SetPoint("BOTTOMRIGHT", self, "BOTTOMRIGHT", bottomX, bottomY) + end self.Panel:SetBackdrop({ bgFile = [[Interface\BUTTONS\WHITE8X8]], @@ -1049,14 +1092,26 @@ local function SetBasicPanel(self, topX, topY, bottomX, bottomY, hasShadow) self.Panel:SetBackdropBorderColor(0,0,0) end - NewHook(frame, "SetBackdrop", HookBackdrop) - NewHook(frame, "SetBackdropColor", HookBackdropColor) - NewHook(frame, "SetBackdropBorderColor", HookBackdropBorderColor) + if(needsHooks) then + local level = self:GetFrameLevel() + if(level == 0 and not InCombatLockdown()) then + self:SetFrameLevel(1) + level = 1 + end + + local adjustment = level - 1; + if(adjustment < 0) then adjustment = 0 end + + self.Panel:SetFrameLevel(adjustment) + + NewHook(self, "SetFrameLevel", HookFrameLevel) + NewHook(self, "SetBackdrop", HookBackdrop) + NewHook(self, "SetBackdropColor", HookBackdropColor) + NewHook(self, "SetBackdropBorderColor", HookBackdropBorderColor) + end end local function SetPanelTemplate(self, templateName, noupdate, overridePadding, xOffset, yOffset) - if(not templateName or not _templates[templateName]) then templateName = 'Default' end - local padding = false if(overridePadding and type(overridePadding) == "number") then padding = overridePadding @@ -1064,14 +1119,13 @@ local function SetPanelTemplate(self, templateName, noupdate, overridePadding, x CreatePanelTemplate(self, templateName, true, noupdate, padding, xOffset, yOffset) - if(not self._noupdate) then + if(not self._noupdate and not self.__registered) then TemplateUpdateFrames[self] = true + self.__registered = true end end local function SetFixedPanelTemplate(self, templateName, noupdate, overridePadding, xOffset, yOffset) - if(not templateName or not _templates[templateName]) then templateName = 'Default' end - local padding = false if(overridePadding and type(overridePadding) == "number") then padding = overridePadding @@ -1079,8 +1133,9 @@ local function SetFixedPanelTemplate(self, templateName, noupdate, overridePaddi CreatePanelTemplate(self, templateName, false, noupdate, padding, xOffset, yOffset) - if(not self._noupdate) then + if(not self._noupdate and not self.__registered) then TemplateUpdateFrames[self] = true + self.__registered = true end end @@ -1092,13 +1147,13 @@ local function SetPanelColor(self, ...) if(arg1 == "VERTICAL" or arg1 == "HORIZONTAL") then self._skin:SetGradient(...) elseif(SuperVillain.Media.gradient[arg1]) then - if self.BorderPanel then + if self.__border then local d,r,g,b,r2,g2,b2 = unpack(SuperVillain.Media.gradient[arg1]) --self._skin:SetGradient(d,r,g,b,r2,g2,b2) - self.BorderPanel[1]:SetTexture(r2,g2,b2) - self.BorderPanel[2]:SetTexture(r2,g2,b2) - self.BorderPanel[3]:SetTexture(r2,g2,b2) - self.BorderPanel[4]:SetTexture(r2,g2,b2) + self.__border[1]:SetTexture(r2,g2,b2) + self.__border[2]:SetTexture(r2,g2,b2) + self.__border[3]:SetTexture(r2,g2,b2) + self.__border[4]:SetTexture(r2,g2,b2) else self._skin:SetGradient(unpack(SuperVillain.Media.gradient[arg1])) if(SuperVillain.Media.color[arg1]) then @@ -1112,11 +1167,11 @@ local function SetPanelColor(self, ...) elseif(type(arg1) == "string" and SuperVillain.Media.color[arg1]) then local t = SuperVillain.Media.color[arg1] local r,g,b,a = t[1], t[2], t[3], t[4] or 1; - if self.BorderPanel then - self.BorderPanel[1]:SetTexture(r,g,b) - self.BorderPanel[2]:SetTexture(r,g,b) - self.BorderPanel[3]:SetTexture(r,g,b) - self.BorderPanel[4]:SetTexture(r,g,b) + if self.__border then + self.__border[1]:SetTexture(r,g,b) + self.__border[2]:SetTexture(r,g,b) + self.__border[3]:SetTexture(r,g,b) + self.__border[4]:SetTexture(r,g,b) else self:SetBackdropColor(r,g,b) end @@ -1129,15 +1184,24 @@ end APPENDED BUTTON TEMPLATING METHODS ########################################################## ]]-- -local function SetButtonTemplate(self, invisible) - if self.styled then return end +local function SetButtonTemplate(self, invisible, overridePadding, xOffset, yOffset, keepNormal) + if(not self) then return end - if(invisible) then - CreatePanelTemplate(self, "Transparent", false, true, 1) - self:SetBackdropColor(0,0,0,0) - self:SetBackdropBorderColor(0,0,0,0) - else - CreatePanelTemplate(self, "Button", false, true, 1) + 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 + + 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 end if(self.Left) then @@ -1152,7 +1216,7 @@ local function SetButtonTemplate(self, invisible) self.Right:SetAlpha(0) end - if(self.SetNormalTexture) then + if(self.SetNormalTexture and not keepNormal) then self:SetNormalTexture("") end @@ -1160,49 +1224,67 @@ local function SetButtonTemplate(self, invisible) self:SetDisabledTexture("") end - if(self.SetHighlightTexture and not self.hover) then - local hover = self:CreateTexture(nil, "HIGHLIGHT") + if(self.SetHighlightTexture) then + if(not self.hover) then + local hover = self:CreateTexture(nil, "HIGHLIGHT") + FillInner(hover, self.Panel) + self.hover = hover; + end + local color = SuperVillain.Media.color.highlight - hover:SetTexture(color[1], color[2], color[3], 0.5) - FillInner(hover, self.Panel) - self.hover = hover; - self:SetHighlightTexture(hover) + self.hover:SetTexture(color[1], color[2], color[3], 0.5) + + self:SetHighlightTexture(self.hover) end - if(self.SetPushedTexture and not self.pushed) then - local pushed = self:CreateTexture(nil, "OVERLAY") - pushed:SetTexture(0.1, 0.8, 0.1, 0.3) - FillInner(pushed, self.Panel) - self.pushed = pushed; - self:SetPushedTexture(pushed) + if(self.SetPushedTexture) then + if(not self.pushed) then + local pushed = self:CreateTexture(nil, "OVERLAY") + FillInner(pushed, self.Panel) + self.pushed = pushed; + end + + self.pushed:SetTexture(0.1, 0.8, 0.1, 0.3) + + self:SetPushedTexture(self.pushed) end - if(self.SetCheckedTexture and not self.checked) then - local checked = self:CreateTexture(nil, "OVERLAY") - checked:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - checked:SetVertexColor(0, 0.5, 0, 0.2) - FillInner(checked, self.Panel) - self.checked = checked; - self:SetCheckedTexture(checked) + if(self.SetCheckedTexture) then + if(not self.checked) then + local checked = self:CreateTexture(nil, "OVERLAY") + FillInner(checked, self.Panel) + self.checked = checked; + end + + self.checked:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + self.checked:SetVertexColor(0, 0.5, 0, 0.2) + + self:SetCheckedTexture(self.checked) end - self.styled = true + local cd = HasCooldown(self:GetName()) + if cd then + cd:ClearAllPoints() + cd:SetAllPoints() + end end local function SetSlotTemplate(self, underlay, padding, x, y, noChecked) - if self.styled then return end + if(not self or (self and self.Panel)) then return end + padding = padding or 1 CreatePanelTemplate(self, "Slot", underlay, true, padding, x, y) - --CreateButtonPanel(self, noChecked) - self.styled = true + CreateButtonPanel(self, true) end local function SetCheckboxTemplate(self, underlay, x, y) - if self.styled then return end + if(not self or (self and self.__hooked)) then return end + if(underlay) then x = x or -7 y = y or -7 end + CreatePanelTemplate(self, "Slot", underlay, true, 1, x, y) CreateButtonPanel(self, false, true) @@ -1213,13 +1295,12 @@ local function SetCheckboxTemplate(self, underlay, x, y) end self:SetBackdropBorderColor(r,g,b) end) - - self.styled = true + self.__hooked = true end local function SetEditboxTemplate(self, x, y) - if self.styled then return end - + if(not self or (self and self.Panel)) then return end + if self.TopLeftTex then MUNG(self.TopLeftTex) end if self.TopRightTex then MUNG(self.TopRightTex) end if self.TopTex then MUNG(self.TopTex) end @@ -1242,13 +1323,16 @@ local function SetEditboxTemplate(self, x, y) self.Panel:SetPoint("BOTTOMRIGHT", -12, -2) end end - self.styled = true end -local function SetFramedButtonTemplate(self, template) - if self.styled then return end - template = template or "FramedBottom" - CreatePanelTemplate(self, template, false, false, 1) +local function SetFramedButtonTemplate(self, template, borderSize) + if(not self or (self and self.Panel)) then return end + + borderSize = borderSize or 2 + + template = template or self._template or "FramedBottom" + + CreatePanelTemplate(self, template, false, false, 0, -borderSize, -borderSize) if(self.Left) then self.Left:SetAlpha(0) @@ -1270,61 +1354,78 @@ local function SetFramedButtonTemplate(self, template) self:SetDisabledTexture("") end - local border = NewFrame('Frame',nil,self) - border:Point('TOPLEFT', self, 'TOPLEFT', -2, 2) - border:Point('BOTTOMRIGHT', self, 'BOTTOMRIGHT', 2, -2) - local t = SuperVillain.Media.color.default - local r,g,b = t[1], t[2], t[3] - border[1] = border:CreateTexture(nil,"BORDER") - border[1]:SetTexture(r,g,b) - border[1]:SetPoint("TOPLEFT") - border[1]:SetPoint("BOTTOMLEFT") - border[1]:SetWidth(3) - border[2] = border:CreateTexture(nil,"BORDER") - border[2]:SetTexture(r,g,b) - border[2]:SetPoint("TOPRIGHT") - border[2]:SetPoint("BOTTOMRIGHT") - border[2]:SetWidth(3) - border[3] = border:CreateTexture(nil,"BORDER") - border[3]:SetTexture(r,g,b) - border[3]:SetPoint("TOPLEFT") - border[3]:SetPoint("TOPRIGHT") - border[3]:SetHeight(3) - border[4] = border:CreateTexture(nil,"BORDER") - border[4]:SetTexture(r,g,b) - border[4]:SetPoint("BOTTOMLEFT") - border[4]:SetPoint("BOTTOMRIGHT") - border[4]:SetHeight(3) - - border[5] = NewFrame('Frame',nil,border) - border[5]:Point('TOPLEFT',border,'TOPLEFT',-2,2) - border[5]:Point('BOTTOMRIGHT',border,'BOTTOMRIGHT',2,-2) - border[5]:SetBackdrop({ - edgeFile = [[Interface\AddOns\SVUI\assets\artwork\Template\GLOW]], - edgeSize = 3, - insets = { - left = 2, - right = 2, - top = 2, - bottom = 2 - } - }) - border[5]:SetBackdropBorderColor(0,0,0,0.6) + if(not self.__border) then + local t = SuperVillain.Media.color.default + local r,g,b = t[1], t[2], t[3] + + local border = {} + + border[1] = self:CreateTexture(nil,"BORDER") + border[1]:SetTexture(r,g,b) + border[1]:SetPoint("TOPLEFT", -1, 1) + border[1]:SetPoint("BOTTOMLEFT", -1, -1) + border[1]:SetWidth(borderSize) + + local leftoutline = self:CreateTexture(nil,"BORDER") + leftoutline:SetTexture(0,0,0) + leftoutline:SetPoint("TOPLEFT", -2, 2) + leftoutline:SetPoint("BOTTOMLEFT", -2, -2) + leftoutline:SetWidth(1) + + border[2] = self:CreateTexture(nil,"BORDER") + border[2]:SetTexture(r,g,b) + border[2]:SetPoint("TOPRIGHT", 1, 1) + border[2]:SetPoint("BOTTOMRIGHT", 1, -1) + border[2]:SetWidth(borderSize) + + local rightoutline = self:CreateTexture(nil,"BORDER") + rightoutline:SetTexture(0,0,0) + rightoutline:SetPoint("TOPRIGHT", 2, 2) + rightoutline:SetPoint("BOTTOMRIGHT", 2, -2) + rightoutline:SetWidth(1) + + border[3] = self:CreateTexture(nil,"BORDER") + border[3]:SetTexture(r,g,b) + border[3]:SetPoint("TOPLEFT", -1, 1) + border[3]:SetPoint("TOPRIGHT", 1, 1) + border[3]:SetHeight(borderSize) + + local topoutline = self:CreateTexture(nil,"BORDER") + topoutline:SetTexture(0,0,0) + topoutline:SetPoint("TOPLEFT", -2, 2) + topoutline:SetPoint("TOPRIGHT", 2, 2) + topoutline:SetHeight(1) + + border[4] = self:CreateTexture(nil,"BORDER") + border[4]:SetTexture(r,g,b) + border[4]:SetPoint("BOTTOMLEFT", -1, -1) + border[4]:SetPoint("BOTTOMRIGHT", 1, -1) + border[4]:SetHeight(borderSize) + + local bottomoutline = self:CreateTexture(nil,"BORDER") + bottomoutline:SetTexture(0,0,0) + bottomoutline:SetPoint("BOTTOMLEFT", -2, -2) + bottomoutline:SetPoint("BOTTOMRIGHT", 2, -2) + bottomoutline:SetHeight(1) + + self.__border = border + end if(not self.hover) then - local hover = border:CreateTexture(nil, "HIGHLIGHT") - local color = SuperVillain.Media.color.highlight - hover:SetTexture(color[1], color[2], color[3], 0.5) - hover:SetAllPoints(border) - self.hover = hover; - if(self.SetHighlightTexture) then - self:SetHighlightTexture(hover) - end - end + self.hover = self:CreateTexture(nil, "HIGHLIGHT") + end + + local color = SuperVillain.Media.color.highlight + self.hover:SetTexture(color[1], color[2], color[3], 0.5) + self.hover:SetAllPoints() + if(self.SetHighlightTexture) then + self:SetHighlightTexture(self.hover) + end - self.BorderPanel = border - self.styled = true - TemplateUpdateFrames[self] = true + if(not self.__registered) then + TemplateUpdateFrames[self] = true + self.__registered = true + end end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/system/system.lua b/Interface/AddOns/SVUI/system/system.lua index c6599f1..3648ca9 100644 --- a/Interface/AddOns/SVUI/system/system.lua +++ b/Interface/AddOns/SVUI/system/system.lua @@ -770,6 +770,8 @@ function SuperVillain:Load() SVUI_Cache["screenwidth"] = gxWidth end + self.Registry:FindAddons() + self:SetDatabaseObjects(true) self:UIScale(); @@ -816,7 +818,7 @@ function SuperVillain:Launch() _G["SVUI_MentaloPrecision"]:SetPanelTemplate("Transparent") if self.db.system.loginmessage then - local logMsg = (L["LOGIN_MSG"]):format("|cffFFFF1A", "|cffAA78FF", self.___ver) + local logMsg = (L["LOGIN_MSG"]):format("|cffFFFF1A", "|cffAA78FF", self.___version) self:AddonMessage(logMsg); end diff --git a/Interface/AddOns/SVUI/system/updates.lua b/Interface/AddOns/SVUI/system/updates.lua index 5430c99..c608be4 100644 --- a/Interface/AddOns/SVUI/system/updates.lua +++ b/Interface/AddOns/SVUI/system/updates.lua @@ -54,21 +54,21 @@ PRE VARS/FUNCTIONS ########################################################## ]]-- local function SetFont(fontObject, font, fontSize, fontOutline, fontAlpha, color, shadowColor, offsetX, offsetY) - if not font then return end; + if not font then return end fontObject:SetFont(font,fontSize,fontOutline); if fontAlpha then fontObject:SetAlpha(fontAlpha) - end; + end if color and type(color) == "table" then fontObject:SetTextColor(unpack(color)) - end; + end if shadowColor and type(shadowColor) == "table" then fontObject:SetShadowColor(unpack(shadowColor)) - end; + end if offsetX and offsetY then fontObject:SetShadowOffset(offsetX,offsetY) - end; -end; + end +end --[[ ########################################################## CORE FUNCTIONS @@ -163,7 +163,7 @@ function SuperVillain:RefreshSystemFonts() SetFont(SystemFont_Tiny, UNICODE_FONT, unicodesize) self:UpdateFontTemplates() -end; +end function SuperVillain:RefreshAllSystemMedia() local fontsize = self.db.media.fonts.size diff --git a/Interface/AddOns/SVUI/system/utilities.lua b/Interface/AddOns/SVUI/system/utilities.lua index 3570031..99c2177 100644 --- a/Interface/AddOns/SVUI/system/utilities.lua +++ b/Interface/AddOns/SVUI/system/utilities.lua @@ -53,7 +53,7 @@ function SuperVillain:ColorGradient(perc, ...) local segment, relperc = modf(perc*(num-1)) local r1, g1, b1, r2, g2, b2 = select((segment*3)+1, ...) return r1 + (r2-r1)*relperc, g1 + (g2-g1)*relperc, b1 + (b2-b1)*relperc -end; +end --[[ ########################################################## POSITIONING UTILITY FUNCTIONS @@ -143,7 +143,7 @@ do --[[ auto-set specific properties to save on logic ]]-- frame.initialAnchor = anchor; end -end; +end --[[ ########################################################## ITEM UTILITY FUNCTIONS @@ -201,7 +201,7 @@ do local function _getHeirloomLevel(unit, itemID) if(not itemID) then return; end local baseLevel = UnitLevel(unit) - if baseLevel > 85 then baseLevel = 85 end; + if baseLevel > 85 then baseLevel = 85 end if baseLevel > 80 then for i=1, #_heirlooms do if(_heirlooms[i] == itemID) then @@ -288,13 +288,13 @@ do secondCallback(globalName, slotId) end end - end; + end if(averageLevel < 1 or totalSlots < 15) then return - end; + end return floor(averageLevel / totalSlots) end -end; +end --[[ ########################################################## CHAT LOG PARSING FUNCTIONS (from LibDeformat by:ckknight) diff --git a/Interface/AddOns/SVUI/system/visibility.lua b/Interface/AddOns/SVUI/system/visibility.lua index 1ee44d0..d011173 100644 --- a/Interface/AddOns/SVUI/system/visibility.lua +++ b/Interface/AddOns/SVUI/system/visibility.lua @@ -44,27 +44,27 @@ function SuperVillain:AddToDisplayAudit(frame) if frame.IsVisible and frame:GetName() then self.DisplayAudit[frame:GetName()] = true end -end; +end function SuperVillain:FlushDisplayAudit() - if InCombatLockdown() then return end; + if InCombatLockdown() then return end for frame,_ in pairs(self.DisplayAudit)do if _G[frame] then _G[frame]:SetParent(SuperVillain.Cloaked) end - end; + end DisplayEventHandler:RegisterEvent("PLAYER_REGEN_DISABLED") -end; +end function SuperVillain:PushDisplayAudit() - if InCombatLockdown() then return end; + if InCombatLockdown() then return end for frame,_ in pairs(self.DisplayAudit)do if _G[frame] then _G[frame]:SetParent(UIParent) end - end; + end DisplayEventHandler:UnregisterEvent("PLAYER_REGEN_DISABLED") -end; +end local DisplayAudit_OnEvent = function(self, event, arg, ...) SuperVillain:PushDisplayAudit() @@ -87,26 +87,32 @@ local function SecureFadeRemoveFrame(frame) SafeFrameRemoval(SecureFadeFrames, frame); end -function SuperVillain:SecureFade_OnUpdate(value) +local SecureFade_OnUpdate = function(self, elasped) local i = 1; local this, safeFadeState; - while SecureFadeFrames[i] do + + while SecureFadeFrames[i] do this = SecureFadeFrames[i] + safeFadeState = this._secureFade; - safeFadeState.fadeTimer = (safeFadeState.fadeTimer or 0) + value; - safeFadeState.fadeTimer = safeFadeState.fadeTimer + value; + safeFadeState.fadeTimer = (safeFadeState.fadeTimer or 0) + elasped; + safeFadeState.fadeTimer = safeFadeState.fadeTimer + elasped; if safeFadeState.fadeTimer < safeFadeState.timeToFade then - if safeFadeState.mode == "IN" then - this:SetAlpha(safeFadeState.fadeTimer / safeFadeState.timeToFade * safeFadeState.endAlpha - safeFadeState.startAlpha + safeFadeState.startAlpha) - elseif safeFadeState.mode == "OUT" then - this:SetAlpha((safeFadeState.timeToFade - safeFadeState.fadeTimer) / safeFadeState.timeToFade * safeFadeState.startAlpha - safeFadeState.endAlpha + safeFadeState.endAlpha) + + if(safeFadeState.mode == "IN") then + this:SetAlpha((safeFadeState.fadeTimer / safeFadeState.timeToFade) * (safeFadeState.endAlpha - safeFadeState.startAlpha) + safeFadeState.startAlpha) + elseif(safeFadeState.mode == "OUT") then + this:SetAlpha(((safeFadeState.timeToFade - safeFadeState.fadeTimer) / safeFadeState.timeToFade) * (safeFadeState.startAlpha - safeFadeState.endAlpha) + safeFadeState.endAlpha) end + else this:SetAlpha(safeFadeState.endAlpha) SecureFadeRemoveFrame(this) + if not this:IsProtected() and safeFadeState.hideOnFinished and this:IsShown() then this:Hide() end + if (safeFadeState.finishedFunc) then safeFadeState.finishedFunc(safeFadeState.finishedArg1, safeFadeState.finishedArg2, safeFadeState.finishedArg3, safeFadeState.finishedArg4) safeFadeState.finishedFunc = nil @@ -117,14 +123,13 @@ function SuperVillain:SecureFade_OnUpdate(value) if #SecureFadeFrames == 0 then SecureFadeManager:SetScript("OnUpdate", nil) end -end; +end -function SuperVillain:SecureFade(this, safeFadeState) - if not this then return end; - local safeFadeState = this._secureFade +local function HandleFading(this, safeFadeState) + if not this then return end if not safeFadeState.mode then safeFadeState.mode = "IN" - end; + end if safeFadeState.mode == "IN" then if not this:IsProtected() and not this:IsShown() then this:Show() end @@ -141,46 +146,48 @@ function SuperVillain:SecureFade(this, safeFadeState) if not safeFadeState.endAlpha then safeFadeState.endAlpha = 0 end - end; + end this:SetAlpha(safeFadeState.startAlpha) - + this._secureFade = safeFadeState local i=1; while SecureFadeFrames[i] do - if SecureFadeFrames[i]==this then + if SecureFadeFrames[i] == this then return - end; + end i = i + 1; - end; + end SecureFadeFrames[#SecureFadeFrames + 1] = this; - SecureFadeManager:SetScript("OnUpdate", SuperVillain.SecureFade_OnUpdate) -end; + SecureFadeManager:SetScript("OnUpdate", SecureFade_OnUpdate) +end function SuperVillain:SecureFadeIn(this, duration, startAlpha, endAlpha) - if(not this._secureFade) then - this._secureFade = {} - end - this._secureFade.mode = "IN" - this._secureFade.timeToFade = duration; - this._secureFade.startAlpha = startAlpha or 0; - this._secureFade.endAlpha = endAlpha or 1; - this._secureFade.hideOnFinished = false; - this._secureFade.finishedFunc = nil - SuperVillain:SecureFade(this) -end; + local safeFadeState = {} + safeFadeState.mode = "IN" + safeFadeState.timeToFade = duration; + safeFadeState.startAlpha = startAlpha or 0; + safeFadeState.endAlpha = endAlpha or 1; + safeFadeState.hideOnFinished = false; + safeFadeState.finishedFunc = nil + + this._secureFade = safeFadeState + + HandleFading(this, safeFadeState) +end function SuperVillain:SecureFadeOut(this, duration, startAlpha, endAlpha, hideOnFinished) - if(not this._secureFade) then - this._secureFade = {} - end - this._secureFade.mode = "OUT" - this._secureFade.timeToFade = duration; - this._secureFade.startAlpha = startAlpha or 1; - this._secureFade.endAlpha = endAlpha or 0; - this._secureFade.hideOnFinished = hideOnFinished; - this._secureFade.finishedFunc = nil - SuperVillain:SecureFade(this) -end; + local safeFadeState = {} + safeFadeState.mode = "OUT" + safeFadeState.timeToFade = duration; + safeFadeState.startAlpha = startAlpha or 1; + safeFadeState.endAlpha = endAlpha or 0; + safeFadeState.hideOnFinished = hideOnFinished; + safeFadeState.finishedFunc = nil + + this._secureFade = safeFadeState + + HandleFading(this, safeFadeState) +end function SuperVillain:SecureFadeRemoval(this) local i = 1; @@ -192,4 +199,4 @@ function SuperVillain:SecureFadeRemoval(this) i = i + 1; end end -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc index 874927d..454a765 100644 --- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc +++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.02 +## Version: 4.2 ## Title: |cffFF9900SVUI |r|cffFFEF00Answering Service|r ## Notes: Supervillain UI [|cff9911FFAutomatic Whispers|r] ## LoadOnDemand: 1 diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index 7a77a7a..d2f975e 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -468,7 +468,7 @@ local function GetSourceType(guid) return srcType end -function PLUGIN:COMBAT_LOG_EVENT_UNFILTERED(timestamp, event, _, srcGUID, srcName, srcFlags, sourceRaidFlags, dstGUID, dstName, dstFlags, destRaidFlags, _, spellName) +function PLUGIN:COMBAT_LOG_EVENT_UNFILTERED(event, timestamp, event, _, srcGUID, srcName, srcFlags, sourceRaidFlags, dstGUID, dstName, dstFlags, destRaidFlags, _, spellName) if not srcFlags then return end local flagParse = band(srcFlags, COMBATLOG_OBJECT_REACTION_HOSTILE) local flagged = flagParse == COMBATLOG_OBJECT_REACTION_HOSTILE @@ -740,7 +740,7 @@ end local ArtOfWarAlert_OnLeave = function(self) GameTooltip:Hide() - if InCombatLockdown() then return end; + if InCombatLockdown() then return end self:SetBackdropColor(0.25, 0.52, 0.1) end diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc index 1ac9e65..a4dddf6 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.02 +## Version: 4.2 ## Title: |cffFF9900SVUI |r|cffFFEF00Art of War|r ## Notes: Supervillain UI [|cff9911FFPvP Tools|r]. ## SavedVariables: SVAOW_Data diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua index 489450d..f37ad73 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.lua @@ -39,7 +39,7 @@ local posOpts = {TOPLEFT='TOPLEFT',LEFT='LEFT',BOTTOMLEFT='BOTTOMLEFT',RIGHT='RI local GEAR = SuperVillain.SVGear; local BAG = SuperVillain.SVBag; local OVR = SuperVillain.SVOverride; -local sortingFunction = function(arg1, arg2) return arg1 < arg2 end; +local sortingFunction = function(arg1, arg2) return arg1 < arg2 end local function CommonFontSizeUpdate() local STANDARDFONTSIZE = SuperVillain.db.media.fonts.size; @@ -114,7 +114,7 @@ local function CommonFontSizeUpdate() SuperVillain.db.SVUnit.assist.health.fontSize = largefont; SuperVillain:RefreshSystemFonts() -end; +end --[[ ########################################################## SET PACKAGE OPTIONS @@ -123,7 +123,7 @@ SET PACKAGE OPTIONS SuperVillain.Options.args.SVUI_Header = { order = 1, type = "header", - name = "You are using |cffff9900Super Villain UI|r - "..L["Version"]..format(": |cff99ff33%s|r", SuperVillain.___ver), + name = "You are using |cffff9900Super Villain UI|r - "..L["Version"]..format(": |cff99ff33%s|r", SuperVillain.___version), width = "full" } @@ -680,7 +680,7 @@ SuperVillain.Options.args.common = { for i=1,GetNumEquipmentSets()do local name=GetEquipmentSetInfo(i) if name then h[name]=name end - end; + end tsort(h,sortingFunction) return h end @@ -696,7 +696,7 @@ SuperVillain.Options.args.common = { for i=1,GetNumEquipmentSets()do local name,l,l,l,l,l,l,l,l=GetEquipmentSetInfo(i) if name then h[name]=name end - end; + end tsort(h,sortingFunction) return h end @@ -730,7 +730,7 @@ SuperVillain.Options.args.common = { for i = 1,GetNumEquipmentSets()do local name = GetEquipmentSetInfo(i) if name then h[name] = name end - end; + end tsort(h,sortingFunction) return h end @@ -832,15 +832,15 @@ local music = format("|cff00ccff%s|r", 'Theme Song By: Fingathing [taken from th tsort(t, function(o,n) return o < n end) for _, x in pairs(t) do q = q..s..x -end; +end tsort(u, function(o,n) return o < n end) for _, y in pairs(u) do r = r..s..y -end; +end tsort(u, function(o,n) return o < n end) for _, z in pairs(v) do dnt = dnt..s..z -end; +end local creditsString = credit_header..'\n'..credit_sub..'\n'..credit_sub2..'\n'..special_thanks..'\n\n'..coding..q..'\n\n'..testing..r..'\n\n'..doners..dnt..'\n\n'..music..'\n\n'; diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc index b75cd33..693202e 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.02 +## Version: 4.2 ## Title: |cffFF9900SVUI |r|cffFFEF00Config O Matic|r ## Notes: Supervillain UI [|cff9911FFConfig Options|r] ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua index d52fb62..375d2e4 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/bar.lua @@ -237,7 +237,7 @@ local function BarConfigLoader() } } } - end; + end bar_configs["Micro"] = { order = d, @@ -613,7 +613,7 @@ local function BarConfigLoader() } } } -end; +end SuperVillain.Options.args.SVBar = { type = "group", diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua index b994f81..7c0dde6 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua @@ -155,7 +155,7 @@ local function GetLiveDockletsA() for index,window in pairs(Skada:GetWindows()) do local key = window.db.name t["Skada"..key] = (key=="Skada") and "Skada - Main" or "Skada - "..key; - end; + end elseif (test ~= n and test ~= l) then t[n] = l; end @@ -173,7 +173,7 @@ local function GetLiveDockletsB() for index,window in pairs(Skada:GetWindows()) do local key = window.db.name t["Skada"..key] = (key=="Skada") and "Skada - Main" or "Skada - "..key; - end; + end elseif (test ~= n and test ~= l) then t[n] = l; end diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua index 8356e06..4b5ba6f 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/dynamic.lua @@ -36,4 +36,4 @@ do for key,options in pairs(queue) do SuperVillain.Options.args[key].args[options.key] = options.data end -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua index 0c1cc23..a8c51ee 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/plate.lua @@ -59,7 +59,7 @@ local function UpdateFilterGroupOptions() if not activeFilter or not SuperVillain.db['SVPlate']['filter'][activeFilter] then SuperVillain.Options.args.SVPlate.args.filters.args.filterGroup=nil; return - end; + end SuperVillain.Options.args.SVPlate.args.filters.args.filterGroup = { type = "group", name = activeFilter, @@ -122,7 +122,7 @@ local function UpdateFilterGroupOptions() } } } -end; +end SuperVillain.Options.args.SVPlate={ type="group", @@ -527,7 +527,7 @@ SuperVillain.Options.args.SVPlate={ type = "select", order = 2, name = L["Additional Filter"], - values = function()filters = {}filters[""] = NONE;for j in pairs(SuperVillain.db.filter)do filters[j] = j end;return filters end + values = function()filters = {}filters[""] = NONE;for j in pairs(SuperVillain.db.filter)do filters[j] = j end return filters end }, configureButton = { order = 4, @@ -671,7 +671,7 @@ SuperVillain.Options.args.SVPlate={ if SuperVillain.db["SVPlate"]["filter"][e]then SuperVillain:AddonMessage(L["Filter already exists!"]) return - end; + end SuperVillain.db["SVPlate"]["filter"][e] = { ["enable"] = true, ["hide"] = false, @@ -699,7 +699,7 @@ SuperVillain.Options.args.SVPlate={ else SuperVillain.db["SVPlate"]["filter"][e] = nil; SuperVillain.Options.args.SVPlate.args.filters.args.filterGroup = nil - end; + end UpdateFilterGroupOptions() MOD:UpdateAllPlates() end @@ -715,7 +715,7 @@ SuperVillain.Options.args.SVPlate={ if(SuperVillain.db["SVPlate"]["filter"]) then for j in pairs(SuperVillain.db["SVPlate"]["filter"])do filters[j] = j - end; + end end return filters end diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua index 1d4bef2..5acdbc1 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua @@ -33,7 +33,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(SVUI); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ...; local ACD = LibStub("AceConfigDialog-3.0"); --[[ @@ -246,9 +246,9 @@ function ns:SetCastbarConfigGroup(updateFunction, unitName, count) name = L["Display Target"], desc = L["Display the target of your current cast."] } - end; + end return configTable -end; +end function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitName, count) local configTable = { @@ -299,7 +299,7 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam configTable.args.positionGroup.args.attachTo = {type = "select", order = 7, name = L["Attach To"], desc = L["What to attach the buff anchor frame to."], values = {["FRAME"] = L["Frame"], ["DEBUFFS"] = L["Debuffs"]}} else configTable.args.positionGroup.args.attachTo = {type = "select", order = 7, name = L["Attach To"], desc = L["What to attach the buff anchor frame to."], values = {["FRAME"] = L["Frame"], ["BUFFS"] = L["Buffs"]}} - end; + end if custom then configTable.args.filters.args.filterPlayer = {order = 10, type = "toggle", name = L["Only Show Your Auras"], desc = L["Don't display auras that are not yours."]} configTable.args.filters.args.filterBlocked = {order = 11, type = "toggle", name = L["Force Blocked List"], desc = L["Don't display any auras found on the Blocked filter."]} @@ -308,7 +308,7 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam configTable.args.filters.args.filterDispellable = {order = 13, type = "toggle", name = L["Block Non-Dispellable Auras"], desc = L["Don't display auras that cannot be purged or dispelled by your class."]} if auraType == "buffs"then configTable.args.filters.args.filterRaid = {order = 14, type = "toggle", name = L["Block Raid Buffs"], desc = L["Don't display raid buffs."]} - end; + end configTable.args.filters.args.useFilter = { order = 15, name = L["Additional Filter"], @@ -319,7 +319,7 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam filterList[""] = NONE; for n in pairs(SuperVillain.db.filter)do filterList[n] = n - end; + end return filterList end } @@ -475,7 +475,7 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam } } } - end; + end configTable.args.filters.args.useFilter = { order = 15, name = L["Additional Filter"], @@ -486,13 +486,13 @@ function ns:SetAuraConfigGroup(custom, auraType, unused, updateFunction, unitNam filterList[""] = NONE; for n in pairs(SuperVillain.db.filter)do filterList[n] = n - end; + end return filterList end } - end; + end return configTable -end; +end function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) local miscGroup = { @@ -558,7 +558,7 @@ function ns:SetMiscConfigGroup(partyRaid, updateFunction, unitName, count) } } return miscGroup -end; +end function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) local healthOptions = { @@ -645,9 +645,9 @@ function ns:SetHealthConfigGroup(partyRaid, updateFunction, unitName, count) desc = L["Direction the health bar moves when gaining/losing health."], values = {["HORIZONTAL"] = L["Horizontal"], ["VERTICAL"] = L["Vertical"]} } - end; + end return healthOptions -end; +end function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) local powerOptions = { @@ -762,7 +762,7 @@ function ns:SetPowerConfigGroup(playerTarget, updateFunction, unitName, count) end return powerOptions -end; +end function ns:SetNameConfigGroup(updateFunction, unitName, count) local k = { @@ -898,7 +898,7 @@ function ns:SetNameConfigGroup(updateFunction, unitName, count) } } return k -end; +end local function getAvailablePortraitConfig(unit) local db = SuperVillain.db.SVUnit[unit].portrait; @@ -988,7 +988,7 @@ function ns:SetPortraitConfigGroup(updateFunction, unitName, count) } } return k -end; +end function ns:SetIconConfigGroup(updateFunction, unitName, count) local iconGroup = SuperVillain.db.SVUnit[unitName]["icons"] @@ -1176,7 +1176,7 @@ function ns:SetIconConfigGroup(updateFunction, unitName, count) end return k -end; +end function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) local k = { @@ -1313,7 +1313,7 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) filterList[""] = NONE; for n in pairs(SuperVillain.db.filter)do filterList[n] = n - end; + end return filterList end } @@ -1448,13 +1448,13 @@ function ns:SetAurabarConfigGroup(custom, updateFunction, unitName) filterList[""] = NONE; for n in pairs(SuperVillain.db.filter)do filterList[n] = n - end; + end return filterList end } - end; + end return k -end; +end SuperVillain.Options.args.SVUnit = { type = "group", diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua index 6a19e6c..87836f1 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/focus.lua @@ -31,7 +31,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(SVUI); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... --[[ ################################################################################################## @@ -69,7 +69,7 @@ SuperVillain.Options.args.SVUnit.args.focus = { order = 1, type = "execute", name = L["Show Auras"], - func = function()local U = SVUI_Focus;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end;MOD:SetUnitFrame("focus")end + func = function()local U = SVUI_Focus;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("focus")end }, smartAuraDisplay = { type = "select", @@ -178,7 +178,7 @@ SuperVillain.Options.args.SVUnit.args.focustarget = { guiInline = true, name = L["Base Settings"], args = { - showAuras = {order = 1, type = "execute", name = L["Show Auras"], func = function()local U = SVUI_FocusTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end;MOD:SetUnitFrame("focustarget")end}, + showAuras = {order = 1, type = "execute", name = L["Show Auras"], func = function()local U = SVUI_FocusTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("focustarget")end}, spacer1 = { order = 2, type = "description", diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua index a96f670..5aaddf9 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/other.lua @@ -31,7 +31,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(SVUI); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... --[[ ################################################################################################## diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua index d57be1e..e3e5bdd 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua @@ -31,7 +31,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(SVUI); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... SuperVillain.Options.args.SVUnit.args.party = { diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua index c9a2f95..ec5505f 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/pet.lua @@ -31,7 +31,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(SVUI); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... --[[ ################################################################################################## @@ -63,7 +63,7 @@ SuperVillain.Options.args.SVUnit.args.pet = { order = 1, type = "execute", name = L["Show Auras"], - func = function()local U = SVUI_Pet;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end;MOD:SetUnitFrame("pet")end + func = function()local U = SVUI_Pet;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("pet")end }, miscGroup = { order = 2, @@ -174,7 +174,7 @@ SuperVillain.Options.args.SVUnit.args.pettarget = { order = 3, type = "execute", name = L["Show Auras"], - func = function()local U = SVUI_PetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end;MOD:SetUnitFrame("pettarget")end + func = function()local U = SVUI_PetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("pettarget")end }, width = {order = 4, name = L["Width"], type = "range", min = 50, max = 500, step = 1}, height = {order = 5, name = L["Height"], type = "range", min = 10, max = 250, step = 1}, @@ -199,7 +199,7 @@ SuperVillain.Options.args.SVUnit.args.pettarget = { order = 1, type = "execute", name = L["Show Auras"], - func = function()local U = SVUI_PetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end;MOD:SetUnitFrame("pettarget")end + func = function()local U = SVUI_PetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("pettarget")end }, miscGroup = { order = 2, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua index aec9694..ab5b88f 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/player.lua @@ -31,7 +31,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(SVUI); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... --[[ ################################################################################################## @@ -81,7 +81,7 @@ SuperVillain.Options.args.SVUnit.args.player={ order = 1, type = "execute", name = L["Show Auras"], - func = function()local U = SVUI_Player;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end;MOD:SetUnitFrame("player")end + func = function()local U = SVUI_Player;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("player")end }, lowmana = { order = 2, @@ -159,7 +159,7 @@ SuperVillain.Options.args.SVUnit.args.player={ set = function(l, m) if SuperVillain.db.SVUnit["player"].castbar.width == SuperVillain.db.SVUnit["player"][l[#l]] then SuperVillain.db.SVUnit["player"].castbar.width = m - end; + end MOD:ChangeDBVar(m, l[#l], "player"); MOD:SetUnitFrame("player") end diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua index 0909417..8b2ba25 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua @@ -31,7 +31,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(SVUI); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... local subOrder = 11; diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua index 417d94e..afdc215 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua @@ -31,7 +31,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(SVUI); local MOD = SuperVillain.SVUnit -if(not MOD) then return end; +if(not MOD) then return end local _, ns = ... --[[ ################################################################################################## @@ -69,7 +69,7 @@ SuperVillain.Options.args.SVUnit.args.target={ order = 1, type = "execute", name = L["Show Auras"], - func = function()local U = SVUI_Target;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end;MOD:SetUnitFrame("target")end + func = function()local U = SVUI_Target;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("target")end }, smartAuraDisplay = { type = "select", @@ -134,7 +134,7 @@ SuperVillain.Options.args.SVUnit.args.target={ set = function(l, m) if SuperVillain.db.SVUnit["target"].castbar.width == SuperVillain.db.SVUnit["target"][l[#l]] then SuperVillain.db.SVUnit["target"].castbar.width = m - end; + end MOD:ChangeDBVar(m, l[#l], "target"); MOD:SetUnitFrame("target") end @@ -234,7 +234,7 @@ SuperVillain.Options.args.SVUnit.args.targettarget={ order = 1, type = "execute", name = L["Show Auras"], - func = function()local U = SVUI_TargetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end;MOD:SetUnitFrame("targettarget")end + func = function()local U = SVUI_TargetTarget;if U.forceShowAuras then U.forceShowAuras = nil else U.forceShowAuras = true end MOD:SetUnitFrame("targettarget")end }, spacer1 = { order = 2, diff --git a/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml b/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml deleted file mode 100644 index 0aece78..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/Bindings.xml +++ /dev/null @@ -1,5 +0,0 @@ -<Bindings> - <Binding name="Frame Debugger" description="Frame Stack Analyzer" header="SVUIDEBUG" runOnUp="false"> - DebugThisFrame() - </Binding> -</Bindings> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc deleted file mode 100644 index 47da00f..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.toc +++ /dev/null @@ -1,9 +0,0 @@ -## Interface: 50400 -## Author: Munglunch, Azilroka, Sortokk -## Version: 1.6 -## Title: |cffFF9900SVUI |r|cffFFEF00Debug O Matic|r -## Notes: Supervillain UI Debugging. -## RequiredDeps: SVUI -## OptionalDeps: Blizzard_DebugTools - -SVUI_DebugOMatic.xml diff --git a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml b/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml deleted file mode 100644 index a3f97ba..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/SVUI_DebugOMatic.xml +++ /dev/null @@ -1,116 +0,0 @@ -<Ui xmlns="http://www.blizzard.com/wow/ui/"> - <Script file='debug.lua'/> - - <Frame name="SVUI_ScriptError" movable="true" hidden="true" frameStrata="DIALOG"> - <Size x="384" y="260"/> - <Anchors> - <Anchor point="TOPLEFT"/> - </Anchors> - <Layers> - <Layer level="BACKGROUND"> - <Texture name="$parentBG" setAllPoints="true"/> - </Layer> - <Layer level="OVERLAY"> - <Texture name="$parentTitleBG"> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="8" y="-8"/> - </Anchor> - <Anchor point="BOTTOMRIGHT" relativePoint="TOPRIGHT"> - <Offset x="-32" y="-24"/> - </Anchor> - </Anchors> - </Texture> - <Texture name="$parentDialogBG"> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="8" y="-32"/> - </Anchor> - <Anchor point="BOTTOMRIGHT"> - <Offset x="-32" y="32"/> - </Anchor> - </Anchors> - </Texture> - </Layer> - <Layer level="ARTWORK"> - <FontString parentKey="Title" inherits="GameFontNormal"> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="8" y="-8"/> - </Anchor> - <Anchor point="TOPRIGHT"> - <Offset x="-32" y="-24"/> - </Anchor> - </Anchors> - </FontString> - <FontString parentKey="sourceLabel" font="GameFontNormalCenter"> - <Size x="140" y="16"/> - <Anchors> - <Anchor point="BOTTOMLEFT"> - <Offset x="104" y="8"/> - </Anchor> - </Anchors> - </FontString> - </Layer> - </Layers> - <Frames> - <ScrollFrame name="$parentDialog" inherits="MinimalScrollFrameTemplate"> - <Size x="343" y="194"/> - <Anchors> - <Anchor point="TOPLEFT"> - <Offset x="12" y="-30"/> - </Anchor> - </Anchors> - <ScrollChild> - <EditBox parentKey="Input" multiLine="true" letters="4000" autoFocus="false"> - <Size x="343" y="194"/> - <Scripts> - <OnCursorChanged function="ScrollingEdit_OnCursorChanged"/> - <OnUpdate> - ScrollingEdit_OnUpdate(self, elapsed, self:GetParent()); - </OnUpdate> - <OnEditFocusGained> - self:HighlightText(0); - </OnEditFocusGained> - <OnEscapePressed function="EditBox_ClearFocus"/> - </Scripts> - <FontString inherits="GameFontHighlightSmall"/> - </EditBox> - </ScrollChild> - </ScrollFrame> - <Button parentKey="Clear" inherits="UIPanelButtonTemplate" text="RESET"> - <Size x="96" y="24"/> - <Anchors> - <Anchor point="BOTTOMLEFT"> - <Offset x="8" y="4"/> - </Anchor> - </Anchors> - <Scripts> - <OnClick> - local frame = _G["SVUI_ScriptErrorDialog"]; - frame.Input:SetText(""); - </OnClick> - </Scripts> - </Button> - <Button parentKey="Close" inherits="UIPanelCloseButton"> - <Anchors> - <Anchor point="TOPRIGHT"> - <Offset x="-2" y="-2"/> - </Anchor> - </Anchors> - </Button> - </Frames> - <Scripts> - <OnLoad function="SVUI_ScriptError_OnLoad"/> - <OnShow function="SVUI_ScriptError_OnShow"/> - <OnDragStart> - _G["SVUI_ScriptError"].moving = true; - _G["SVUI_ScriptError"]:StartMoving(); - </OnDragStart> - <OnDragStop> - _G["SVUI_ScriptError"].moving = nil; - _G["SVUI_ScriptError"]:StopMovingOrSizing(); - </OnDragStop> - </Scripts> - </Frame> -</Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_DebugOMatic/debug.lua b/Interface/AddOns/SVUI_DebugOMatic/debug.lua deleted file mode 100644 index 03fadba..0000000 --- a/Interface/AddOns/SVUI_DebugOMatic/debug.lua +++ /dev/null @@ -1,296 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local type = _G.type; -local tostring = _G.tostring; -local tonumber = _G.tonumber; -local tinsert = _G.tinsert; -local string = _G.string; -local math = _G.math; -local table = _G.table; ---[[ STRING METHODS ]]-- -local format, find, lower, match = string.format, string.find, string.lower, string.match; ---[[ MATH METHODS ]]-- -local floor, abs, min, max = math.floor, math.abs, math.min, math.max; ---[[ TABLE METHODS ]]-- -local tremove, tcopy, twipe, tsort, tconcat, tdump = table.remove, table.copy, table.wipe, table.sort, table.concat, table.dump; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SuperVillain, L = unpack(SVUI); -local ErrorStorage = {} -BINDING_HEADER_SVUIDEBUG = "SuperVillain UI: Debugger"; ---[[ -########################################################## -CUSTOM MESSAGE WINDOW -########################################################## -]]-- -function SVUI_ScriptError_OnLoad() - SVUI_ScriptError.Source = ""; - SVUI_ScriptError:SetFixedPanelTemplate("Transparent") - SVUI_ScriptErrorDialog:SetFixedPanelTemplate("Transparent") - SVUI_ScriptErrorDialog.Input:SetScript("OnTextChanged", function(self, userInput) - if userInput then return end; - local _, max = SVUI_ScriptErrorDialogScrollBar:GetMinMaxValues() - for i = 1, max do - ScrollFrameTemplate_OnMouseWheel(SVUI_ScriptErrorDialog, -1) - end - end) - _G["SVUI_ScriptError"]:RegisterForDrag("LeftButton"); -end; - -function SVUI_ScriptError_OnShow() - if SVUI_ScriptError.Source then - local txt = SVUI_ScriptError.Source; - SVUI_ScriptError.Title:SetText(txt); - end -end; ---[[ -########################################################## -OTHER SLASH COMMANDS -########################################################## -]]-- -local function GetOriginalContext() - UIParentLoadAddOn("Blizzard_DebugTools") - local orig_DevTools_RunDump = DevTools_RunDump - local originalContext - DevTools_RunDump = function(value, context) - originalContext = context - end - DevTools_Dump("") - DevTools_RunDump = orig_DevTools_RunDump - return originalContext -end - -local function SuperVillain_Dump(value) - local context = GetOriginalContext() - local buffer = "" - context.Write = function(self, msg) - buffer = buffer.."\n"..msg - end - - DevTools_RunDump(value, context) - return buffer.."\n"..table.dump(value) -end - -local function DebugDump(any) - if type(any)=="string" then - return any - elseif type(any) == "table" then - return SuperVillain_Dump(any) - elseif any==nil or type(any)=="number" then - return tostring(any) - end - return any -end - -local function DebugOutput(msg) - if not SVUI_ScriptError:IsShown() then - SVUI_ScriptError:Show() - end - local outputString = SVUI_ScriptErrorDialog.Input:GetText() - outputString = outputString .. "\n" .. msg - tinsert(ErrorStorage,msg); - SVUI_ScriptErrorDialog.Input:SetText(outputString) -end; - -local function ShowDebug(header, ...) - local value = (header and format("Debug %s: ", header)) or "Debug: " - value = format("|cff11ff11 %s|r", value) - for i = 1, select('#', ...), 2 do - local name = select(i, ...) - local var = DebugDump(select(i+1, ...)) - value = format("%s %s = ", value, name)..var - end - SVUI_ScriptError.Source = header; - DebugOutput(value) -end - -function DebugThisFrame(arg) - local outputString = " "; - if arg then - arg = _G[arg] or GetMouseFocus() - else - arg = GetMouseFocus() - end - if arg and (arg.GetName and arg:GetName()) then - local point, relativeTo, relativePoint, xOfs, yOfs = arg:GetPoint() - outputString = outputString.."|cffCC0000----------------------------".."\n" - outputString = outputString.."|cffCC00FF--Mouseover Frame".."|r".."\n" - outputString = outputString.."|cffCC0000----------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Name: |cffFFD100"..arg:GetName().."\n" - if arg:GetParent() and arg:GetParent():GetName() then - outputString = outputString.."|cff00D1FF".."Parent: |cffFFD100"..arg:GetParent():GetName().."\n" - end - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..arg:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..arg:GetFrameLevel().."\n" - outputString = outputString.."|cff00D1FF".."IsShown: |cffFFD100"..tostring(arg:IsShown()).."\n" - if xOfs then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",xOfs).."\n" - end - if yOfs then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",yOfs).."\n" - end - if relativeTo and relativeTo:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..point.."|r anchored to "..relativeTo:GetName().."'s |cffFFD100"..relativePoint.."\n" - end - local bg = arg:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if arg._template then - outputString = outputString.."Template Name: |cff00FF55"..arg._template.."\n" - end - if arg.Panel then - local cpt, crt, crp, cxo, cyo = arg.Panel:GetPoint() - outputString = outputString.."|cffFF8800>> backdropFrame --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg.Panel:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg.Panel:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..arg.Panel:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..arg.Panel:GetFrameLevel().."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = arg.Panel:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if arg._skin then - local cpt, crt, crp, cxo, cyo = arg._skin:GetPoint() - outputString = outputString.."|cffFF7700>> backdropTexture --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",arg._skin:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",arg._skin:GetHeight()).."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = arg._skin:GetTexture() - if bg then - outputString = outputString.."|cff00D1FF".."Texture: |cffFFD100"..bg.."\n" - end - end - end - local childFrames = { arg:GetChildren() } - if #childFrames > 0 then - outputString = outputString.."|cffCC00FF>>>> Child Frames----------------------------".."|r".."\n".."\n" - for _, child in ipairs(childFrames) do - local cpt, crt, crp, cxo, cyo = child:GetPoint() - if child:GetName() then - outputString = outputString.."|cff00FF55++"..child:GetName().."|r".."\n" - else - outputString = outputString.."|cff99FF55+!!+".."Anonymous Frame".."|r".."\n" - end - outputString = outputString.."|cffCC00FF----------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..child:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..child:GetFrameLevel().."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = child:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if child._template then - outputString = outputString.."Template Name: |cff00FF55"..child._template.."\n" - end - if child.Panel then - local cpt, crt, crp, cxo, cyo = child.Panel:GetPoint() - outputString = outputString.."|cffFF8800>> backdropFrame --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child.Panel:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child.Panel:GetHeight()).."\n" - outputString = outputString.."|cff00D1FF".."Strata: |cffFFD100"..child.Panel:GetFrameStrata().."\n" - outputString = outputString.."|cff00D1FF".."Level: |cffFFD100"..child.Panel:GetFrameLevel().."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = child.Panel:GetBackdrop() - if type(bg) == "table" then - outputString = outputString.."|cffFF9900>> BACKDROP --------------------------|r".."\n" - outputString = outputString..tdump(bg).."\n" - end - if child._skin then - local cpt, crt, crp, cxo, cyo = child._skin:GetPoint() - outputString = outputString.."|cffFF7700>> backdropTexture --------------------------|r".."\n" - outputString = outputString.."|cff00D1FF".."Width: |cffFFD100"..format("%.2f",child._skin:GetWidth()).."\n" - outputString = outputString.."|cff00D1FF".."Height: |cffFFD100"..format("%.2f",child._skin:GetHeight()).."\n" - if cxo then - outputString = outputString.."|cff00D1FF".."X: |cffFFD100"..format("%.2f",cxo).."\n" - end - if cyo then - outputString = outputString.."|cff00D1FF".."Y: |cffFFD100"..format("%.2f",cyo).."\n" - end - if crt and crt:GetName() then - outputString = outputString.."|cff00D1FF".."Point: |cffFFD100"..cpt.."|r anchored to "..crt:GetName().."'s |cffFFD100"..crp.."\n" - end - bg = child._skin:GetTexture() - if bg then - outputString = outputString.."|cffFF9900----------------------------|r".."\n" - outputString = outputString..bg.."\n" - end - outputString = outputString.."|cffCC0000----------------------------|r".."\n" - end - end - end - outputString = outputString.."\n\n" - end - elseif arg == nil or arg == "" then - outputString = outputString.."Invalid frame name".."\n" - else - outputString = outputString.."Could not find frame info".."\n" - end - DebugOutput(outputString) -end; -SLASH_SVUI_FRAME_DEBUG1 = "/svdf" -SlashCmdList["SVUI_FRAME_DEBUG"] = DebugThisFrame; \ No newline at end of file diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua index e25cb26..06a7572 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua @@ -102,9 +102,9 @@ LOCAL FUNCTIONS ########################################################## ]]-- local function SendModeMessage(...) - if not CombatText_AddMessage then return end; + if not CombatText_AddMessage then return end CombatText_AddMessage(...) -end; +end local function onMouseWheel(self, delta) if (delta > 0) then @@ -112,7 +112,7 @@ local function onMouseWheel(self, delta) elseif (delta < 0) then self:ScrollDown() end -end; +end local function CheckForDoubleClick() if lastClickTime then @@ -173,7 +173,7 @@ function PLUGIN:ModeLootLoader(mode, msg, info) self.LogWindow:AddMessage("|cff55FF55"..data.amount.." x|r |T".. data.texture ..":16:16:0:0:64:64:4:60:4:60|t".." "..name, 0.8, 0.8, 0.8); previous = true end - end; + end if(previous) then self.LogWindow:AddMessage("----------------", 0, 0, 0); self.LogWindow:AddMessage(" ", 0, 0, 0); @@ -183,7 +183,7 @@ function PLUGIN:ModeLootLoader(mode, msg, info) end else self:LaborerReset() - end; + end end function PLUGIN:CheckForModeLoot(msg) @@ -208,14 +208,14 @@ function PLUGIN:CheckForModeLoot(msg) end return item, amt end -end; +end function PLUGIN:SetJobMode(category) if InCombatLockdown() then return end if(not category) then self:EndJobModes() return; - end; + end self:ChangeModeGear() if(currentModeKey and self[currentModeKey] and self[currentModeKey].Disable) then self[currentModeKey].Disable() @@ -361,7 +361,7 @@ end local ModeAlert_OnLeave = function(self) GameTooltip:Hide() - if InCombatLockdown() then return end; + if InCombatLockdown() then return end self:SetBackdropColor(0.25, 0.52, 0.1) end diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc index f333f07..0c834ee 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.02 +## Version: 4.2 ## Title: |cffFF9900SVUI |r|cffFFEF00Laborer|r ## Notes: Supervillain UI [|cff9911FFProfession Tools|r]. ## SavedVariables: LABOR_Data diff --git a/Interface/AddOns/SVUI_Laborer/modes/archaeology.lua b/Interface/AddOns/SVUI_Laborer/modes/archaeology.lua index ad90bef..0bb3297 100644 --- a/Interface/AddOns/SVUI_Laborer/modes/archaeology.lua +++ b/Interface/AddOns/SVUI_Laborer/modes/archaeology.lua @@ -213,14 +213,14 @@ local function GetTitleAndSkill() skillRank = skillRank + skillModifier; end msg = msg .. " (|cff00ddff" .. skillRank .. "|r)"; - end; + end return msg end local function SendModeMessage(...) - if not CombatText_AddMessage then return end; + if not CombatText_AddMessage then return end CombatText_AddMessage(...) -end; +end --[[ ########################################################## EVENT HANDLER @@ -286,7 +286,7 @@ do UpdateArtifactCache() end end - end; + end local Survey_OnUpdate = function(self, elapsed) last = last + elapsed @@ -301,7 +301,7 @@ do self.text:SetTextColor(SURVEYRED[time],1,0.12,0.8) last = 0 end - end; + end local Survey_OnEvent = function(self, event, unit, _, _, _, spellid) if not unit == "player" then return end @@ -309,7 +309,7 @@ do self.text:SetText("3") self:SetScript("OnUpdate", Survey_OnUpdate) end - end; + end function EnableListener() UpdateArtifactCache() diff --git a/Interface/AddOns/SVUI_Laborer/modes/cooking.lua b/Interface/AddOns/SVUI_Laborer/modes/cooking.lua index 51ec82f..611ce28 100644 --- a/Interface/AddOns/SVUI_Laborer/modes/cooking.lua +++ b/Interface/AddOns/SVUI_Laborer/modes/cooking.lua @@ -67,7 +67,7 @@ local function UpdateChefWear() EquipItemByName(86558) MOD.InModeGear = true end -end; +end local function GetTitleAndSkill() local msg = "|cff22ff11Cooking Mode|r" @@ -76,14 +76,14 @@ local function GetTitleAndSkill() skillRank = skillRank + skillModifier; end msg = msg .. " (|cff00ddff" .. skillRank .. "|r)"; - end; + end return msg -end; +end local function SendModeMessage(...) - if not CombatText_AddMessage then return end; + if not CombatText_AddMessage then return end CombatText_AddMessage(...) -end; +end --[[ ########################################################## CORE NAMESPACE @@ -109,7 +109,7 @@ do proxyTest = true; end end - end; + end local Cook_OnEvent = function(self, event, ...) if(InCombatLockdown()) then return end @@ -123,16 +123,16 @@ do local name, lnk, rarity, lvl, mlvl, itype, stype, cnt, ieq, tex, price = GetItemInfo(item); if proxyTest == false then LootProxy(lnk, name) - end; - if proxyTest == false then return end; + end + if proxyTest == false then return end if not MOD.Cooking.Log[name] then MOD.Cooking.Log[name] = {amount = 0, texture = ""}; - end; + end local r, g, b, hex = GetItemQualityColor(rarity); local stored = MOD.Cooking.Log local mod = stored[name]; local newAmt = mod.amount + 1; - if amt >= 2 then newAmt = mod.amount + amt end; + if amt >= 2 then newAmt = mod.amount + amt end MOD.Cooking.Log[name].amount = newAmt; MOD.Cooking.Log[name].texture = tex; MOD.LogWindow:Clear(); @@ -140,14 +140,14 @@ do if type(data) == "table" and data.amount and data.texture then MOD.LogWindow:AddMessage("|cff55FF55"..data.amount.." x|r |T".. data.texture ..":16:16:0:0:64:64:4:60:4:60|t".." "..name, r, g, b); end - end; + end MOD.LogWindow:AddMessage("----------------", 0, 0, 0); MOD.LogWindow:AddMessage("Cooked So Far...", 0, 1, 1); MOD.LogWindow:AddMessage(" ", 0, 0, 0); proxyTest = false; end end - end; + end function EnableListener() CookEventHandler:RegisterEvent("ZONE_CHANGED") @@ -216,7 +216,7 @@ function MOD.Cooking:Update() local _,_,_,_,cook,_ = GetProfessions(); if cook ~= nil then cookingSpell, _, skillRank, _, _, _, _, skillModifier = GetProfessionInfo(cook) - end; + end end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_Laborer/modes/farming.lua b/Interface/AddOns/SVUI_Laborer/modes/farming.lua index 4e4eeed..68211c1 100644 --- a/Interface/AddOns/SVUI_Laborer/modes/farming.lua +++ b/Interface/AddOns/SVUI_Laborer/modes/farming.lua @@ -60,10 +60,10 @@ local Scroll_OnMouseWheel = function(self, delta) local value = (scroll - (20 * delta)); if value < -1 then value = 0 - end; + end if value > 420 then value = 420 - end; + end self:SetVerticalScroll(value) self.slider:SetValue(value) end @@ -108,7 +108,7 @@ do MOD.TitleWindow:AddMessage("|cffff2211Must be in Sunsong Ranch|r") end return false - end; + end end local UpdateFarmtoolCooldown = function() @@ -157,7 +157,7 @@ do elseif(event == "BAG_UPDATE_COOLDOWN") then UpdateFarmtoolCooldown() end - end; + end InventoryUpdate = function() if InCombatLockdown() then @@ -197,7 +197,7 @@ LOADING HANDLER ########################################################## ]]-- do - local seedsort = function(a, b) return a.sortname < b.sortname end; + local seedsort = function(a, b) return a.sortname < b.sortname end local SeedToSoil = function(group, itemId) if(UnitName("target") ~= L["Tilled Soil"]) then return false; end @@ -205,7 +205,7 @@ do if i == itemId then return true end end return false - end; + end local Button_OnEnter = function(self) GameTooltip:SetOwner(self, 'ANCHOR_TOPLEFT', 2, 4) @@ -215,11 +215,11 @@ do GameTooltip:AddLine(L['Right-click to drop the item.']) end GameTooltip:Show() - end; + end local Button_OnLeave = function() GameTooltip:Hide() - end; + end local Button_OnMouseDown = function(self, mousebutton) if InCombatLockdown() then return end @@ -244,7 +244,7 @@ do DeleteCursorItem() end end - end; + end local function CreateFarmingButton(index, owner, buttonName, buttonType, name, texture, allowDrop, showCount) local BUTTONSIZE = owner.ButtonSize; diff --git a/Interface/AddOns/SVUI_Laborer/modes/fishing.lua b/Interface/AddOns/SVUI_Laborer/modes/fishing.lua index e22c264..e6decc5 100644 --- a/Interface/AddOns/SVUI_Laborer/modes/fishing.lua +++ b/Interface/AddOns/SVUI_Laborer/modes/fishing.lua @@ -91,9 +91,9 @@ LOCAL FUNCTIONS ########################################################## ]]-- local function SendModeMessage(...) - if not CombatText_AddMessage then return end; + if not CombatText_AddMessage then return end CombatText_AddMessage(...) -end; +end local function GetFishingSkill() local fishing = select(4, GetProfessions()) @@ -102,7 +102,7 @@ local function GetFishingSkill() return rank end return 0, 0, 0 -end; +end local function FishingPoleIsEquipped() local itemId = GetInventoryItemID("player", 16) @@ -205,7 +205,7 @@ local function LootProxy(item, name) proxyTest = true; end end -end; +end local function GetTitleAndSkill() local skillRank, skillModifier; @@ -217,7 +217,7 @@ local function GetTitleAndSkill() skillRank = skillRank + skillModifier; end msg = msg .. " (|cff00ddff" .. skillRank .. "|r)"; - end; + end return msg end --[[ @@ -245,7 +245,7 @@ do proxyTest = true; end end - end; + end local Fish_OnEvent = function(self, event, ...) if(InCombatLockdown()) then return end @@ -265,16 +265,16 @@ do local name, lnk, rarity, lvl, mlvl, itype, stype, cnt, ieq, tex, price = GetItemInfo(item); if proxyTest == false then LootProxy(lnk, name) - end; - if proxyTest == false then return end; + end + if proxyTest == false then return end if not MOD.Fishing.Log[name] then MOD.Fishing.Log[name] = {amount = 0, texture = ""}; - end; + end local r, g, b, hex = GetItemQualityColor(rarity); local stored = MOD.Fishing.Log local mod = stored[name]; local newAmt = mod.amount + 1; - if amt >= 2 then newAmt = mod.amount + amt end; + if amt >= 2 then newAmt = mod.amount + amt end MOD.Fishing.Log[name].amount = newAmt; MOD.Fishing.Log[name].texture = tex; MOD.LogWindow:Clear(); @@ -283,14 +283,14 @@ do if type(data) == "table" and data.amount and data.texture then MOD.LogWindow:AddMessage("|cff55FF55"..data.amount.." x|r |T".. data.texture ..":16:16:0:0:64:64:4:60:4:60|t".." "..name, r, g, b); end - end; + end MOD.LogWindow:AddMessage("----------------", 0, 0, 0); MOD.LogWindow:AddMessage("Caught So Far...", 0, 1, 1); MOD.LogWindow:AddMessage(" ", 0, 0, 0); proxyTest = false; end end - end; + end function EnableListener() FishEventHandler:RegisterEvent("LOOT_OPENED") diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc index 3e350e0..bfbf6b9 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 5.02 +## Version: 4.2 ## Title: |cffFF9900SVUI |r|cffFFEF00Log O Matic|r ## Notes: Supervillain UI [|cff9911FFData Logging|r]. ## SavedVariables: SVLOG_Data diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua index 2cce5cb..4b2f522 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua @@ -265,6 +265,7 @@ function PLUGIN:PLAYER_ENTERING_WORLD(event, ...) end function PLUGIN:ADDON_LOADED(event, addon) + -- print(addon) for name, fn in pairs(self.OnLoadAddons) do if(addon:find(name)) then self:Style(name, fn, event, addon) @@ -731,7 +732,7 @@ function PLUGIN:Load() SuperVillain.DynamicOptions[SCHEMA] = {key = "addons", data = self.OptionsCache}; LoadOptions() - self:StyleInit(); + self:RegisterEvent("PLAYER_ENTERING_WORLD"); self:RegisterEvent("ADDON_LOADED"); end diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc index 813eb1a..4119ec7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch, Azilroka, Sortokk -## Version: 5.02 +## Version: 4.2 ## Title: |cffFF9900SVUI |r|cffFFEF00Style O Matic|r ## Notes: Supervillain UI [|cff9911FFAddon Skins|r]. ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml b/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml index 969f53a..a250be8 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml @@ -47,6 +47,7 @@ <Script file='voidstorage.lua'/> <Script file='worldmap.lua'/> <Script file='worldstate.lua'/> + <Script file='store.lua'/> <Script file='system.lua'/> <Include file='thirdparty\_load.xml'/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua index 8a5fb1d..94fd1a6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua @@ -20,6 +20,28 @@ local STYLE = _G.StyleVillain; HELPERS ########################################################## ]]-- +local AchievementFrameList = { + "AchievementFrame", + "AchievementFrameCategories", + "AchievementFrameSummary", + "AchievementFrameHeader", + "AchievementFrameSummaryCategoriesHeader", + "AchievementFrameSummaryAchievementsHeader", + "AchievementFrameStatsBG", + "AchievementFrameAchievements", + "AchievementFrameComparison", + "AchievementFrameComparisonHeader", + "AchievementFrameComparisonSummaryPlayer", + "AchievementFrameComparisonSummaryFriend" +} + +local AchievementTextureList = { + "AchievementFrameStats", + "AchievementFrameSummary", + "AchievementFrameAchievements", + "AchievementFrameComparison" +} + local function BarStyleHelper(bar) bar:Formula409() bar:SetStatusBarTexture(SuperVillain.Media.bar.default) @@ -27,14 +49,14 @@ local function BarStyleHelper(bar) bar:SetPanelTemplate("Default") if _G[bar:GetName().."Title"]then _G[bar:GetName().."Title"]:SetPoint("LEFT", 4, 0) - end; + end if _G[bar:GetName().."Label"]then _G[bar:GetName().."Label"]:SetPoint("LEFT", 4, 0) - end; + end if _G[bar:GetName().."Text"]then _G[bar:GetName().."Text"]:SetPoint("RIGHT", -4, 0) end -end; +end --[[ ########################################################## ACHIEVEMENTFRAME STYLER @@ -43,22 +65,30 @@ ACHIEVEMENTFRAME STYLER local function AchievementStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.achievement ~= true then return - end; - local b = {"AchievementFrame", "AchievementFrameCategories", "AchievementFrameSummary", "AchievementFrameHeader", "AchievementFrameSummaryCategoriesHeader", "AchievementFrameSummaryAchievementsHeader", "AchievementFrameStatsBG", "AchievementFrameAchievements", "AchievementFrameComparison", "AchievementFrameComparisonHeader", "AchievementFrameComparisonSummaryPlayer", "AchievementFrameComparisonSummaryFriend"} - for c, d in pairs(b)do - _G[d]:Formula409(true) - end; - local e = {"AchievementFrameStats", "AchievementFrameSummary", "AchievementFrameAchievements", "AchievementFrameComparison"} - for c, d in pairs(e)do - for f = 1, _G[d]:GetNumChildren()do - local g = select(f, _G[d]:GetChildren()) - if g and not g:GetName()then - g:SetBackdrop(nil) - end - end - end; + end + + for _, gName in pairs(AchievementFrameList) do + local frame = _G[gName] + if(frame) then + frame:Formula409(true) + end + end + + for _, gName in pairs(AchievementTextureList) do + local frame = _G[gName] + if(frame) then + local count = frame:GetNumChildren() + for i = 1, count do + local childFrame = select(i, frame:GetChildren()) + if(childFrame and not childFrame:GetName()) then + childFrame:SetBackdrop(nil) + end + end + end + end + + STYLE:ApplyWindowHolder(AchievementFrame) - AchievementFrame:SetPanelTemplate("Halftone",false,2,2,4) AchievementFrameHeaderTitle:ClearAllPoints() AchievementFrameHeaderTitle:Point("TOPLEFT", AchievementFrame.Panel, "TOPLEFT", -30, -8) AchievementFrameHeaderPoints:ClearAllPoints() @@ -70,21 +100,26 @@ local function AchievementStyle() STYLE:ApplyCloseButtonStyle(AchievementFrameCloseButton, AchievementFrame.Panel) STYLE:ApplyDropdownStyle(AchievementFrameFilterDropDown) AchievementFrameFilterDropDown:Point("TOPRIGHT", AchievementFrame, "TOPRIGHT", -44, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameCategoriesContainerScrollBar, 5) STYLE:ApplyScrollFrameStyle(AchievementFrameAchievementsContainerScrollBar, 5) STYLE:ApplyScrollFrameStyle(AchievementFrameStatsContainerScrollBar, 5) STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonContainerScrollBar, 5) STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonStatsContainerScrollBar, 5) + for f = 1, 3 do STYLE:ApplyTabStyle(_G["AchievementFrameTab"..f]) - _G["AchievementFrameTab"..f]:SetFrameLevel(_G["AchievementFrameTab"..f]:GetFrameLevel()+2) - end; + _G["AchievementFrameTab"..f]:SetFrameLevel(_G["AchievementFrameTab"..f]:GetFrameLevel() + 2) + end + BarStyleHelper(AchievementFrameSummaryCategoriesStatusBar) BarStyleHelper(AchievementFrameComparisonSummaryPlayerStatusBar) BarStyleHelper(AchievementFrameComparisonSummaryFriendStatusBar) + AchievementFrameComparisonSummaryFriendStatusBar.text:ClearAllPoints() AchievementFrameComparisonSummaryFriendStatusBar.text:SetPoint("CENTER") AchievementFrameComparisonHeader:Point("BOTTOMRIGHT", AchievementFrameComparison, "TOPRIGHT", 45, -20) + for f = 1, 10 do local d = _G["AchievementFrameSummaryCategoriesCategory"..f] local i = _G["AchievementFrameSummaryCategoriesCategory"..f.."Button"] @@ -94,17 +129,19 @@ local function AchievementStyle() j:Formula409() _G[j:GetName().."Middle"]:SetTexture(1, 1, 1, 0.3) _G[j:GetName().."Middle"]:SetAllPoints(d) - end; + end + AchievementFrame:HookScript("OnShow", function(k) if k.containerStyleed then return - end; + end for f = 1, 20 do local d = _G["AchievementFrameCategoriesContainerButton"..f] STYLE:ApplyItemButtonStyle(d) - end; + end k.containerStyleed = 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) @@ -112,29 +149,50 @@ local function AchievementStyle() d.bg3:SetTexture(0,0,0,1) end end) + hooksecurefunc("AchievementFrameSummary_UpdateAchievements", function() - for f = 1, ACHIEVEMENTUI_MAX_SUMMARY_ACHIEVEMENTS do - local d = _G["AchievementFrameSummaryAchievement"..f] - _G["AchievementFrameSummaryAchievement"..f.."Highlight"]:MUNG() - _G["AchievementFrameSummaryAchievement"..f.."Description"]:SetTextColor(0.6, 0.6, 0.6) - if not d.Panel then - d:Formula409() - d:SetFixedPanelTemplate("Inset") - _G["AchievementFrameSummaryAchievement"..f.."IconBling"]:MUNG() - _G["AchievementFrameSummaryAchievement"..f.."IconOverlay"]:MUNG() - _G["AchievementFrameSummaryAchievement"..f.."Icon"]:SetFixedPanelTemplate("Default") - _G["AchievementFrameSummaryAchievement"..f.."Icon"]:Height(_G["AchievementFrameSummaryAchievement"..f.."Icon"]:GetHeight()-14) - _G["AchievementFrameSummaryAchievement"..f.."Icon"]:Width(_G["AchievementFrameSummaryAchievement"..f.."Icon"]:GetWidth()-14) - _G["AchievementFrameSummaryAchievement"..f.."Icon"]:ClearAllPoints() - _G["AchievementFrameSummaryAchievement"..f.."Icon"]:Point("LEFT", 6, 0) - _G["AchievementFrameSummaryAchievement"..f.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G["AchievementFrameSummaryAchievement"..f.."IconTexture"]:FillInner() - end; - if d.accountWide then - d:SetBackdropBorderColor(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B)else d:SetBackdropBorderColor(0,0,0,1) - end - end + + 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) + --AchievementFrameAchievementsContainerScrollChild:SetFixedPanelTemplate("Button") for f = 1, 7 do local d = _G["AchievementFrameAchievementsContainerButton"..f] @@ -181,7 +239,7 @@ local function AchievementStyle() k:Point("BOTTOMLEFT", d, "BOTTOMLEFT", 5, 5) end 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() @@ -192,7 +250,7 @@ local function AchievementStyle() k:SetTextColor(0.6, 0.6, 0.6) end end) - end; + 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]]) @@ -216,7 +274,7 @@ local function AchievementStyle() _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 _G[d.."IconBling"]:MUNG() _G[d.."IconOverlay"]:MUNG() _G[d.."Icon"]:SetFixedPanelTemplate("Default") @@ -227,17 +285,17 @@ local function AchievementStyle() _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() + 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; + end if x.accountWide then x.bg3:SetTexture(ACHIEVEMENTUI_BLUEBORDER_R, ACHIEVEMENTUI_BLUEBORDER_G, ACHIEVEMENTUI_BLUEBORDER_B) @@ -258,7 +316,7 @@ 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 @@ -289,7 +347,7 @@ local function AchievementStyle() k:ClearAllPoints()k:SetPoint("TOP", _G["AchievementFrameProgressBar"..y-1], "BOTTOM", 0, -5, true) end end) - end; + end d.styled = true end end @@ -328,7 +386,7 @@ local function AchievementStyle() end end end) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua index 87c46e5..1f84431 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua @@ -79,7 +79,7 @@ AUCTIONFRAME STYLER ########################################################## ]]-- local function AuctionStyle() - if(SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.auctionhouse ~= true) then return end; + 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) @@ -133,7 +133,7 @@ local function AuctionStyle() for _,button in pairs(AuctionBidButtons) do _G[button]:SetButtonTemplate() - end; + end AuctionsCloseButton:Point("BOTTOMRIGHT", AuctionFrameAuctions, "BOTTOMRIGHT", 66, 10) AuctionsCancelAuctionButton:Point("RIGHT", AuctionsCloseButton, "LEFT", -4, 0) @@ -157,7 +157,7 @@ local function AuctionStyle() _G[frame.."Left"]:MUNG() _G[frame.."Middle"]:MUNG() _G[frame.."Right"]:MUNG() - end; + end STYLE:ApplyTabStyle(_G["AuctionFrameTab1"]) STYLE:ApplyTabStyle(_G["AuctionFrameTab2"]) @@ -166,12 +166,12 @@ local function AuctionStyle() for h = 1, NUM_FILTERS_TO_DISPLAY do local i = _G["AuctionFilterButton"..h]i:Formula409() i:SetButtonTemplate() - end; + end for _,field in pairs(AuctionTextFields)do _G[field]:SetEditboxTemplate() _G[field]:SetTextInsets(-1, -1, -2, -2) - end; + end for _,field in pairs(AuctionMoneyFields)do local frame = _G[field] @@ -179,7 +179,7 @@ local function AuctionStyle() frame.Panel:Point("TOPLEFT", -2, 1) frame.Panel:Point("BOTTOMRIGHT", -12, -1) frame:SetTextInsets(-1, -1, -2, -2) - end; + end BrowseMaxLevel:Point("LEFT", BrowseMinLevel, "RIGHT", 8, 0) AuctionsStackSizeEntry.Panel:SetAllPoints() @@ -194,7 +194,7 @@ local function AuctionStyle() if(buttonTex) then buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) buttonTex:FillInner() - end; + end if(not button.styled) then button:Formula409() @@ -208,7 +208,7 @@ local function AuctionStyle() buttonItem:HookScript("OnUpdate", function() buttonItem:GetNormalTexture():MUNG() end) - end; + end local highLight = button:GetHighlightTexture() _G["BrowseButton"..h.."Highlight"] = highLight @@ -216,9 +216,9 @@ local function AuctionStyle() highLight:Point("TOPLEFT", buttonItem, "TOPRIGHT", 2, 0) highLight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) button:GetPushedTexture():SetAllPoints(highLight) - end; + end end - end; + end for h = 1, NUM_AUCTIONS_TO_DISPLAY do local button = _G["AuctionsButton"..h]; @@ -229,7 +229,7 @@ local function AuctionStyle() if(buttonTex) then buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) buttonTex:FillInner() - end; + end if(not button.styled) then button:Formula409() @@ -243,7 +243,7 @@ local function AuctionStyle() buttonItem:HookScript("OnUpdate", function() buttonItem:GetNormalTexture():MUNG() end) - end; + end local highLight = button:GetHighlightTexture() _G["AuctionsButton"..h.."Highlight"] = highLight @@ -251,9 +251,9 @@ local function AuctionStyle() highLight:Point("TOPLEFT", buttonItem, "TOPRIGHT", 2, 0) highLight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) button:GetPushedTexture():SetAllPoints(highLight) - end; + end end - end; + end for h = 1, NUM_BIDS_TO_DISPLAY do local button = _G["BidButton"..h]; @@ -264,7 +264,7 @@ local function AuctionStyle() if(buttonTex) then buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) buttonTex:FillInner() - end; + end if(not button.styled) then button:Formula409() @@ -278,7 +278,7 @@ local function AuctionStyle() buttonItem:HookScript("OnUpdate", function() buttonItem:GetNormalTexture():MUNG() end) - end; + end local highLight = button:GetHighlightTexture() _G["BidButton"..h.."Highlight"] = highLight @@ -286,9 +286,9 @@ local function AuctionStyle() highLight:Point("TOPLEFT", buttonItem, "TOPRIGHT", 2, 0) highLight:SetPoint("BOTTOMRIGHT", button, "BOTTOMRIGHT", -2, 5) button:GetPushedTexture():SetAllPoints(highLight) - end; + end end - end; + end AuctionFrameBrowse.bg1 = CreateFrame("Frame", nil, AuctionFrameBrowse) AuctionFrameBrowse.bg1:SetFixedPanelTemplate("Inset") @@ -321,7 +321,7 @@ local function AuctionStyle() AuctionFrameAuctions.bg2:Point("TOPLEFT", AuctionFrameAuctions.bg1, "TOPRIGHT", 3, 0) AuctionFrameAuctions.bg2:Point("BOTTOMRIGHT", AuctionFrame, -8, 35) AuctionFrameAuctions.bg2:SetFrameLevel(AuctionFrameAuctions.bg2:GetFrameLevel() - 2) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua index f1cba95..be5d390 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua @@ -21,13 +21,13 @@ BARBERSHOP STYLER ########################################################## ]]-- local function BarberShopStyle() - if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.barber~=true then return end; + if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.barber~=true then return end local buttons = {"BarberShopFrameOkayButton", "BarberShopFrameCancelButton", "BarberShopFrameResetButton"} BarberShopFrameOkayButton:Point("RIGHT", BarberShopFrameSelector4, "BOTTOM", 2, -50) for b = 1, #buttons do _G[buttons[b]]:Formula409() _G[buttons[b]]:SetButtonTemplate() - end; + end for b = 1, 4 do local c = _G["BarberShopFrameSelector"..b] local d = _G["BarberShopFrameSelector"..b-1] @@ -35,11 +35,11 @@ local function BarberShopStyle() STYLE:ApplyPaginationStyle(_G["BarberShopFrameSelector"..b.."Next"]) if b ~= 1 then c:ClearAllPoints()c:Point("TOP", d, "BOTTOM", 0, -3) - end; + end if c then c:Formula409() end - end; + end BarberShopFrameSelector1:ClearAllPoints() BarberShopFrameSelector1:Point("TOP", 0, -12) BarberShopFrameResetButton:ClearAllPoints() @@ -56,7 +56,7 @@ local function BarberShopStyle() BarberShopAltFormFrame:Point("BOTTOM", BarberShopFrame, "TOP", 0, 5) BarberShopAltFormFrame:Formula409() BarberShopAltFormFrame:SetBasicPanel() -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua index 3e71a7b..9f9e2de 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/battlefield.lua @@ -21,7 +21,7 @@ BATTLEFIELD STYLER ########################################################## ]]-- local function BattlefieldStyle() - if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.bgmap~=true then return end; + if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.bgmap~=true then return end BattlefieldMinimap:SetClampedToScreen(true) BattlefieldMinimapCorner:MUNG() BattlefieldMinimapBackground:MUNG() @@ -83,7 +83,7 @@ local function BattlefieldStyle() BattlefieldMinimap_UpdateOpacity(i)i = nil end end) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua index ccdf5c6..9515121 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua @@ -23,15 +23,15 @@ BLACKMARKET STYLER local function BlackMarketStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.bmah ~= true then return - end; + end local ChangeTab = function(p) p.Left:SetAlpha(0) if p.Middle then p.Middle:SetAlpha(0) - end; + end p.Right:SetAlpha(0) - end; + end BlackMarketFrame:Formula409() BlackMarketFrame:SetPanelTemplate("Halftone") @@ -65,7 +65,7 @@ local function BlackMarketStyle() u:SetButtonTemplate() STYLE:ApplyItemButtonStyle(u.Item) u.styled = true - end; + end if v <= t then local w, x = C_BlackMarket.GetItemInfoByIndex(v) if w then @@ -82,7 +82,7 @@ local function BlackMarketStyle() y:ClearAllPoints()y:SetPoint("TOP", BlackMarketFrame, "TOP", 0, -4) end end -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua index 7e14675..09baf54 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua @@ -34,9 +34,10 @@ CALENDAR STYLER local function CalendarStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.calendar ~= true then return - end - _G["CalendarFrame"]:Formula409() - CalendarFrame:SetPanelTemplate("Halftone") + end + + STYLE:ApplyWindowHolder(CalendarFrame) + STYLE:ApplyCloseButtonStyle(CalendarCloseButton) CalendarCloseButton:Point("TOPRIGHT", CalendarFrame, "TOPRIGHT", -4, -4) STYLE:ApplyPaginationStyle(CalendarPrevMonthButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua index 910e142..6181027 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/challenges.lua @@ -21,7 +21,7 @@ CHALLENGES UI STYLER ########################################################## ]]-- local function ChallengesFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfg ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfg ~= true then return end ChallengesFrameInset:Formula409() ChallengesFrameInsetBg:Hide() ChallengesFrameDetails.bg:Hide() @@ -40,7 +40,7 @@ local function ChallengesFrameStyle() v.selectedTex:SetPoint("TOPLEFT", 1, -1) v.selectedTex:SetPoint("BOTTOMRIGHT", -1, 1) v.NoMedal:MUNG() - end; + end for u = 1, 3 do local F = ChallengesFrame["RewardRow"..u] for A = 1, 2 do @@ -49,7 +49,7 @@ local function ChallengesFrameStyle() v.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) end end -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua index c2a8b34..18aff56 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua @@ -103,7 +103,7 @@ local function StyleCharacterSlots() charSlot:SetBackdropBorderColor(0,0,0,1) end end -end; +end local function EquipmentFlyout_OnShow() EquipmentFlyoutFrameButtons:Formula409() @@ -119,11 +119,11 @@ local function EquipmentFlyout_OnShow() if not button.Panel then button:SetPanelTemplate("Default") button.Panel:SetAllPoints() - end; + end counter = counter + 1; button = _G["EquipmentFlyoutFrameButton"..counter] end -end; +end local function PaperDoll_UpdateTabs() for i = 1, #PAPERDOLL_SIDEBARS do @@ -146,13 +146,13 @@ local function PaperDoll_UpdateTabs() end end) end - end; + end tab:SetPanelTemplate("Default", true, 2) tab.Panel:Point("TOPLEFT", 2, -3) tab.Panel:Point("BOTTOMRIGHT", 0, -2) end end -end; +end local function Reputation_OnShow() for i = 1, GetNumFactions()do @@ -161,7 +161,7 @@ local function Reputation_OnShow() bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) if not bar.Panel then bar:SetPanelTemplate("Inset") - end; + end _G["ReputationBar"..i.."Background"]:SetTexture("") _G["ReputationBar"..i.."ReputationBarHighlight1"]:SetTexture("") _G["ReputationBar"..i.."ReputationBarHighlight2"]:SetTexture("") @@ -171,7 +171,7 @@ local function Reputation_OnShow() _G["ReputationBar"..i.."ReputationBarRightTexture"]:SetTexture("") end end -end; +end --[[ ########################################################## CHARACTERFRAME STYLER @@ -180,7 +180,10 @@ CHARACTERFRAME STYLER local function CharacterFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.character ~= true then return - end; + end + + STYLE:ApplyWindowHolder(CharacterFrame, true) + STYLE:ApplyCloseButtonStyle(CharacterFrameCloseButton) STYLE:ApplyScrollFrameStyle(CharacterStatsPaneScrollBar) STYLE:ApplyScrollFrameStyle(ReputationListScrollFrameScrollBar) @@ -200,7 +203,7 @@ local function CharacterFrameStyle() if cd then SuperVillain:AddCD(cd) end - end; + end local eqSlotListener = CreateFrame("Frame") eqSlotListener:RegisterEvent("PLAYER_EQUIPMENT_CHANGED") @@ -231,7 +234,7 @@ local function CharacterFrameStyle() SquareButton_SetIcon(CharacterFrameExpandButton, 'RIGHT') else SquareButton_SetIcon(CharacterFrameExpandButton, 'LEFT') - end; + end STYLE:ApplyCloseButtonStyle(ReputationDetailCloseButton) STYLE:ApplyCloseButtonStyle(TokenFramePopupCloseButton) @@ -249,12 +252,12 @@ local function CharacterFrameStyle() STYLE:ApplyScrollFrameStyle(_G["PaperDollEquipmentManagerPaneScrollBar"], 5) for _,btn in pairs(CharFrameList)do _G[btn]:Formula409(true) - end; + end CharacterModelFrameBackgroundTopLeft:SetTexture("") CharacterModelFrameBackgroundTopRight:SetTexture("") CharacterModelFrameBackgroundBotLeft:SetTexture("") CharacterModelFrameBackgroundBotRight:SetTexture("") - CharacterFrame:SetPanelTemplate("Action") + CharacterModelFrame:SetPanelTemplate("Comic", false, 0) CharacterFrameExpandButton:SetFrameLevel(CharacterModelFrame:GetFrameLevel() + 5) @@ -301,7 +304,7 @@ local function CharacterFrameStyle() if not btn.icon.bordertop then SetItemFrame(btn, btn.icon) end - end; + end GearManagerDialogPopup:Formula409() GearManagerDialogPopup:SetFixedPanelTemplate("Transparent", true) GearManagerDialogPopup:Point("LEFT", PaperDollFrame, "RIGHT", 4, 0) @@ -367,7 +370,7 @@ local function CharacterFrameStyle() currency.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) end end - end; + end TokenFramePopup:Formula409() TokenFramePopup:SetBasicPanel() TokenFramePopup:Point("TOPLEFT", TokenFrame, "TOPRIGHT", 4, -28) @@ -378,7 +381,7 @@ local function CharacterFrameStyle() PetPaperDollPetInfo:SetPanelTemplate("Slot") PetPaperDollPetInfo.Panel:SetFrameLevel(0) PetPaperDollPetInfo:Size(24, 24) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua index f843cbc..cdf9735 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua @@ -468,7 +468,7 @@ local function ChatStyle() ChatConfigFrame:Size(680,596) ChatConfigFrameHeader:ClearAllPoints() ChatConfigFrameHeader:SetPoint("TOP", ChatConfigFrame, "TOP", 0, -5) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua index d9b066f..88ff5fc 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/dressup.lua @@ -23,7 +23,7 @@ DRESSUP STYLER local function DressUpStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.dressingroom ~= true then return - end; + end DressUpFrame:Formula409(true) local w = DressUpFrame:GetWidth() - 32 local h = DressUpFrame:GetHeight() - 72 @@ -42,7 +42,7 @@ local function DressUpStyle() DressUpFrameCancelButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(DressUpFrameCloseButton, bg.Panel) DressUpFrameResetButton:Point("RIGHT", DressUpFrameCancelButton, "LEFT", -2, 0) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua index 3213aaf..65b91ba 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua @@ -100,7 +100,7 @@ end local function EncounterJournalStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.encounterjournal ~= true then return - end; + end EncounterJournal:Formula409(true) EncounterJournalInstanceSelect:Formula409(true) @@ -218,7 +218,7 @@ local function EncounterJournalStyle() end end end) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua index 5d72e1b..91d03f7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua @@ -119,17 +119,7 @@ local function FriendsFrameStyle() return end - FriendsFrame.Panel = CreateFrame('Frame', nil, FriendsFrame) - FriendsFrame.Panel:WrapOuter(FriendsFrame) - - local panelLevel = FriendsFrame:GetFrameLevel() - - if((panelLevel - 1) >= 0) then - FriendsFrame.Panel:SetFrameLevel(panelLevel - 1) - else - FriendsFrame.Panel:SetFrameLevel(0) - end - FriendsFrame.Panel:SetPanelTemplate("Halftone") + STYLE:ApplyWindowHolder(FriendsFrame) STYLE:ApplyScrollFrameStyle(FriendsFrameFriendsScrollFrameScrollBar, 5) STYLE:ApplyScrollFrameStyle(WhoListScrollFrameScrollBar, 5) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua index 01cc7d6..f5f29f0 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua @@ -21,7 +21,7 @@ GOSSIP STYLER ########################################################## ]]-- local function GossipStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.gossip ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.gossip ~= true then return end ItemTextFrame:Formula409(true) ItemTextScrollFrame:Formula409() STYLE:ApplyCloseButtonStyle(GossipFrameCloseButton) @@ -41,7 +41,7 @@ local function GossipStyle() STYLE:ApplyScrollFrameStyle(GossipGreetingScrollFrameScrollBar, 5) for s, t in pairs(r)do _G[t]:Formula409() - end; + end GossipFrame:SetPanelTemplate("Halftone") GossipGreetingScrollFrame:SetFixedPanelTemplate("Inset", true) GossipGreetingScrollFrame.spellTex = GossipGreetingScrollFrame:CreateTexture(nil, "ARTWORK") @@ -56,7 +56,7 @@ local function GossipStyle() NPCFriendshipStatusBar:Formula409() NPCFriendshipStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) NPCFriendshipStatusBar:SetPanelTemplate("Default") -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua index 91a85b0..6f34673 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua @@ -162,9 +162,10 @@ GUILDFRAME STYLERS local function GuildBankStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.gbank ~= true then return - end - GuildBankFrame:Formula409() - GuildBankFrame:SetPanelTemplate("Halftone") + end + + STYLE:ApplyWindowHolder(GuildBankFrame) + GuildBankEmblemFrame:Formula409(true) GuildBankMoneyFrameBackground:MUNG() STYLE:ApplyScrollFrameStyle(GuildBankPopupScrollFrameScrollBar) @@ -282,9 +283,10 @@ end local function GuildFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.guild ~= true then return - end - GuildFrame:Formula409(true) - GuildFrame:SetPanelTemplate("Halftone") + end + + STYLE:ApplyWindowHolder(GuildFrame) + GuildLevelFrame:MUNG() STYLE:ApplyCloseButtonStyle(GuildMemberDetailCloseButton) STYLE:ApplyCloseButtonStyle(GuildFrameCloseButton) @@ -369,9 +371,20 @@ local function GuildFrameStyle() for i = 1, 14 do local btn = _G["GuildRosterContainerButton"..i.."HeaderButton"] if(btn) then + btn:Formula409() btn:SetButtonTemplate() end - 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() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua index 58da4cb..26c53c1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/inspect.lua @@ -48,14 +48,14 @@ INSPECT UI STYLER local function InspectStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.inspect ~= true then return - end; + end InspectFrame:Formula409(true) InspectFrameInset:Formula409(true) InspectFrame:SetPanelTemplate('Action') STYLE:ApplyCloseButtonStyle(InspectFrameCloseButton) for d = 1, 4 do STYLE:ApplyTabStyle(_G["InspectFrameTab"..d]) - end; + end InspectModelFrameBorderTopLeft:MUNG() InspectModelFrameBorderTopRight:MUNG() InspectModelFrameBorderTop:MUNG() @@ -76,7 +76,7 @@ local function InspectStyle() texture:FillInner() frame:SetFrameLevel(frame:GetFrameLevel() + 1) frame:SetFixedPanelTemplate() - end; + end hooksecurefunc('InspectPaperDollItemSlotButton_Update', function(q) local unit = InspectFrame.unit; local r = GetInventoryItemQuality(unit, q:GetID()) @@ -89,7 +89,7 @@ local function InspectStyle() end) InspectGuildFrameBG:MUNG() InspectTalentFrame:Formula409() -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua index ff3268f..d2fe2a4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua @@ -21,7 +21,7 @@ ITEMSOCKETING STYLER ########################################################## ]]-- local function ItemSocketStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.socket ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.socket ~= true then return end ItemSocketingFrame:Formula409() ItemSocketingFrame:SetPanelTemplate("Action") ItemSocketingFrameInset:MUNG() @@ -40,7 +40,7 @@ local function ItemSocketStyle() D:MUNG() E:SetTexCoord(0.1, 0.9, 0.1, 0.9) E:FillInner() - end; + end hooksecurefunc("ItemSocketingFrame_Update", function() local max = GetNumSockets() for j=1, max do @@ -56,7 +56,7 @@ local function ItemSocketStyle() ItemSocketingSocketButton:Point("BOTTOMRIGHT", ItemSocketingFrame, "BOTTOMRIGHT", -5, 5) ItemSocketingSocketButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(ItemSocketingFrameCloseButton) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua index 250dd27..87a9bc5 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/itemupgrade.lua @@ -23,7 +23,7 @@ ITEMUPGRADE UI STYLER local function ItemUpgradeStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.itemUpgrade ~= true then return - end; + end ItemUpgradeFrame:Formula409() ItemUpgradeFrame:SetPanelTemplate("Action") STYLE:ApplyCloseButtonStyle(ItemUpgradeFrameCloseButton) @@ -42,7 +42,7 @@ local function ItemUpgradeStyle() ItemUpgradeFrameMoneyFrame:Formula409() ItemUpgradeFrame.FinishedGlow:MUNG() ItemUpgradeFrame.ButtonFrame:DisableDrawLayer('BORDER') -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua index 011f6db..6accee8 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua @@ -108,8 +108,8 @@ LFD STYLER local function LFDFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfg ~= true then return end - PVEFrame:Formula409() - PVEFrame:SetPanelTemplate("Action") + STYLE:ApplyWindowHolder(PVEFrame, true) + PVEFrameLeftInset:Formula409() RaidFinderQueueFrame:Formula409(true) PVEFrameBg:Hide() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua index 8664c68..fcabe07 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua @@ -30,10 +30,10 @@ local MissingLootFrame_OnShow = function() local color = GetItemQualityColor(P) or 0,0,0,1 icon:SetTexture(g) M:SetBackdropBorderColor(color) - end; + end local Q = ceil(N/2) MissingLootFrame:SetHeight(Q * 43 + 38 + MissingLootFrameLabel:GetHeight()) -end; +end local LootHistoryFrame_OnUpdate = function(o) local N = C_LootHistory.GetNumItems() @@ -50,7 +50,7 @@ local LootHistoryFrame_OnUpdate = function(o) M.isStyled = true end end -end; +end --[[ ########################################################## LOOTHISTORY STYLER @@ -58,7 +58,7 @@ LOOTHISTORY STYLER ]]-- local function LootHistoryStyle() LootHistoryFrame:SetFrameStrata('HIGH') - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.loot ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.loot ~= true then return end local M = MissingLootFrame; M:Formula409() M:SetPanelTemplate("Pattern") @@ -100,7 +100,7 @@ local function LootHistoryStyle() J:SetPanelTemplate("Pattern") J.Panel:WrapOuter(u) J.Panel:SetBackdropBorderColor(S.r, S.g, S.b) - end; + end for u = 1, MasterLooterFrame:GetNumChildren()do local T = select(u, MasterLooterFrame:GetChildren()) if T and not T.isStyled and not T:GetName() then @@ -110,7 +110,7 @@ local function LootHistoryStyle() else T:SetFixedPanelTemplate() T:SetButtonTemplate() - end; + end T.isStyled = true end end @@ -121,7 +121,7 @@ local function LootHistoryStyle() BonusRollFrame.PromptFrame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) BonusRollFrame.PromptFrame.Timer.Bar:SetTexture(SuperVillain.Media.bar.default) BonusRollFrame.PromptFrame.Timer.Bar:SetVertexColor(0.1, 1, 0.1) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua index 880b3ad..4446800 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/lossofcontrol.lua @@ -41,7 +41,7 @@ local _hook_LossOfControl = function(self, ...) end local function LossOfControlStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.losscontrol ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.losscontrol ~= true then return end local IconBackdrop = CreateFrame("Frame", nil, LossOfControlFrame) IconBackdrop:WrapOuter(LossOfControlFrame.Icon) IconBackdrop:SetFrameLevel(LossOfControlFrame:GetFrameLevel()-1) @@ -52,7 +52,7 @@ local function LossOfControlStyle() LossOfControlFrame:Size(LossOfControlFrame.Icon:GetWidth() + 50) --local bg = CreateFrame("Frame", nil, LossOfControlFrame) hooksecurefunc("LossOfControlFrame_SetUpDisplay", _hook_LossOfControl) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua index 5ef3578..558a541 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua @@ -32,7 +32,7 @@ MACRO UI STYLER ########################################################## ]]-- local function MacroUIStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.macro ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.macro ~= true then return end STYLE:ApplyCloseButtonStyle(MacroFrameCloseButton) STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrameScrollBar) STYLE:ApplyScrollFrameStyle(MacroFrameScrollFrameScrollBar) @@ -41,15 +41,15 @@ local function MacroUIStyle() for b = 1, #MacroButtonList do _G[MacroButtonList[b]]:Formula409() _G[MacroButtonList[b]]:SetButtonTemplate() - end; + end for b = 1, #MacroButtonList2 do local a1,p,a2,x,y = _G[MacroButtonList2[b]]:GetPoint() _G[MacroButtonList2[b]]:SetPoint(a1,p,a2,x,-25) - end; + end for b = 1, 2 do tab = _G[format("MacroFrameTab%s", b)] tab:Height(22) - end; + end MacroFrameTab1:Point("TOPLEFT", MacroFrame, "TOPLEFT", 85, -39) MacroFrameTab2:Point("LEFT", MacroFrameTab1, "RIGHT", 4, 0) MacroFrame:Formula409() @@ -98,23 +98,23 @@ local function MacroUIStyle() d.Panel:SetFrameLevel(0) end d:SetBackdropColor(0, 0, 0, 0) - end; + end if e then e:SetTexCoord(0.1, 0.9, 0.1, 0.9) e:FillInner() e:SetDrawLayer("OVERLAY") - end; + end if f then f:Formula409() f:SetButtonTemplate() f:SetBackdropColor(0, 0, 0, 0) - end; + end if g then g:SetTexCoord(0.1, 0.9, 0.1, 0.9) g:FillInner() end end -end; +end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua index 23a6456..51094d2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua @@ -27,23 +27,24 @@ local function MailFrame_OnUpdate() d:Formula409()d:SetFixedPanelTemplate("Default") d:SetButtonTemplate() d.styled = true - end; + end local e = d:GetNormalTexture() if e then e:SetTexCoord(0.1, 0.9, 0.1, 0.9) e:FillInner() end end -end; +end --[[ ########################################################## MAILBOX STYLER ########################################################## ]]-- local function MailBoxStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.mail ~= true then return end; - MailFrame:Formula409(true) - MailFrame:SetPanelTemplate("Halftone") + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.mail ~= true then return end + + STYLE:ApplyWindowHolder(MailFrame) + for b = 1, INBOXITEMS_TO_DISPLAY do local i = _G["MailItem"..b] i:Formula409() @@ -56,7 +57,7 @@ local function MailBoxStyle() local e = _G["MailItem"..b.."ButtonIcon"] e:SetTexCoord(0.1, 0.9, 0.1, 0.9) e:FillInner() - end; + end STYLE:ApplyCloseButtonStyle(MailFrameCloseButton) STYLE:ApplyPaginationStyle(InboxPrevPageButton) STYLE:ApplyPaginationStyle(InboxNextPageButton) @@ -128,11 +129,11 @@ local function MailBoxStyle() e:SetTexCoord(0.1, 0.9, 0.1, 0.9) e:FillInner() end - end; + end OpenMailReplyButton:Point("RIGHT", OpenMailDeleteButton, "LEFT", -2, 0) OpenMailDeleteButton:Point("RIGHT", OpenMailCancelButton, "LEFT", -2, 0) SendMailMailButton:Point("RIGHT", SendMailCancelButton, "LEFT", -2, 0) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua index cb83a27..7ce42d0 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/merchant.lua @@ -21,7 +21,7 @@ FRAME STYLER ########################################################## ]]-- local function MerchantStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.merchant ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.merchant ~= true then return end MerchantFrame:Formula409(true) MerchantFrame:SetPanelTemplate("Halftone", false, nil, 2, 4) local level = MerchantFrame:GetFrameLevel() @@ -45,7 +45,7 @@ local function MerchantStyle() STYLE:ApplyDropdownStyle(MerchantFrameLootFilter) for b = 1, 2 do STYLE:ApplyTabStyle(_G["MerchantFrameTab"..b]) - end; + end for b = 1, 12 do local d = _G["MerchantItem"..b.."ItemButton"] local e = _G["MerchantItem"..b.."ItemButtonIconTexture"] @@ -58,7 +58,7 @@ local function MerchantStyle() e:FillInner() _G["MerchantItem"..b.."MoneyFrame"]:ClearAllPoints() _G["MerchantItem"..b.."MoneyFrame"]:Point("BOTTOMLEFT", d, "BOTTOMRIGHT", 3, 0) - end; + end MerchantBuyBackItemItemButton:Formula409() MerchantBuyBackItemItemButton:SetButtonTemplate() MerchantBuyBackItemItemButtonIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -70,7 +70,7 @@ local function MerchantStyle() p:SetTexCoord(0.04, 0.24, 0.06, 0.5) p:FillInner() end - end;MerchantGuildBankRepairButton:SetButtonTemplate() + end MerchantGuildBankRepairButton:SetButtonTemplate() MerchantGuildBankRepairButtonIcon:SetTexCoord(0.61, 0.82, 0.1, 0.52) MerchantGuildBankRepairButtonIcon:FillInner() MerchantRepairAllButton:SetButtonTemplate() @@ -80,7 +80,7 @@ local function MerchantStyle() STYLE:ApplyCloseButtonStyle(MerchantFrameCloseButton, MerchantFrame.Panel) STYLE:ApplyPaginationStyle(MerchantNextPageButton) STYLE:ApplyPaginationStyle(MerchantPrevPageButton) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua index d4a3a33..8155c19 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua @@ -44,7 +44,8 @@ PETBATTLE STYLER local function PetBattleStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.petbattleui ~= true then return - end + end + local PetBattleFrame = _G["PetBattleFrame"]; local BottomFrame = PetBattleFrame.BottomFrame; local ActiveFramesList = { PetBattleFrame.ActiveAlly, PetBattleFrame.ActiveEnemy } @@ -52,6 +53,7 @@ local function PetBattleStyle() STYLE:ApplyCloseButtonStyle(FloatingBattlePetTooltip.CloseButton) PetBattleFrame:Formula409() + for i, frame in pairs(ActiveFramesList) do if(not frame.isStyled) then frame.Border:SetAlpha(0) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua index 4897c43..eb1f076 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petition.lua @@ -23,7 +23,7 @@ PETITIONFRAME STYLER local function PetitionFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.petition ~= true then return - end; + end PetitionFrame:Formula409(true) PetitionFrame:SetFixedPanelTemplate("Transparent", true) PetitionFrameInset:MUNG() @@ -39,11 +39,11 @@ local function PetitionFrameStyle() PetitionFrameMemberTitle:SetTextColor(1, 1, 0) for g = 1, 9 do _G["PetitionFrameMemberName"..g]:SetTextColor(1, 1, 1) - end; + end PetitionFrameInstructions:SetTextColor(1, 1, 1) PetitionFrameRenameButton:Point("LEFT", PetitionFrameRequestButton, "RIGHT", 3, 0) PetitionFrameRenameButton:Point("RIGHT", PetitionFrameCancelButton, "LEFT", -3, 0) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua index 17af6e7..ae7cda6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua @@ -20,62 +20,6 @@ local STYLE = _G.StyleVillain; HELPERS ########################################################## ]]-- -local function Button_OnEnter(this) - this:SetBackdropColor(unpack(SuperVillain.Media.color.highlight)) -end - -local function Button_OnLeave(this) - this:SetBackdropColor(unpack(SuperVillain.Media.color.default)) -end - -local function StyleListButton(this, adjust, shrink) - if(not this or (this and this.StyleHooked)) then return end - - local link = this:GetName() - local barName = this.MountBar - local bar = _G[barName] - - this:SetPanelTemplate("Button", true, 1, -2, -2) - - if link then - if _G[link.."Name"] then - _G[link.."Name"]:SetParent(this.Panel) - end - local icon = this.icon or this.IconTexture; - if _G[link.."IconTexture"] then - icon = _G[link.."IconTexture"] - elseif _G[link.."Icon"]then - icon = _G[link.."Icon"] - end - if icon then - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - local bg = CreateFrame("Frame", nil, this) - bg:WrapOuter(icon) - bg:SetFixedPanelTemplate("Transparent") - icon:SetParent(bg) - this.IconShadow = bg - end - if(_G[link.."Count"]) then - local fg = CreateFrame("Frame", nil, this) - fg:SetSize(120, 22) - fg:SetPoint("BOTTOMLEFT", this, "BOTTOMLEFT", 0, -11) - fg:SetFrameLevel(this:GetFrameLevel() + 30) - _G[link.."Count"]:SetParent(fg) - _G[link.."Count"]:SetAllPoints(fg) - _G[link.."Count"]:SetFont(SuperVillain.Media.font.numbers, 12, "OUTLINE") - _G[link.."Count"]:SetDrawLayer("ARTWORK",7) - end - - if bar then - bar:SetParent(this.Panel) - end - end - this:HookScript("OnEnter", Button_OnEnter) - this:HookScript("OnLeave", Button_OnLeave) - - this.StyleHooked = true -end - local function PetJournal_UpdateMounts() for b = 1, #MountJournal.ListScrollFrame.buttons do local d = _G["MountJournalListScrollFrameButton"..b] @@ -144,8 +88,9 @@ FRAME STYLER ]]-- local function PetJournalStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.mounts ~= true then return end - PetJournalParent:Formula409() - PetJournalParent:SetPanelTemplate("Halftone") + + STYLE:ApplyWindowHolder(PetJournalParent) + PetJournalParentPortrait:Hide() STYLE:ApplyTabStyle(PetJournalParentTab1) STYLE:ApplyTabStyle(PetJournalParentTab2) @@ -165,7 +110,7 @@ local function PetJournalStyle() local button = _G["MountJournalListScrollFrameButton"..i] if(button) then - StyleListButton(button) + STYLE:ApplyItemButtonStyle(button, nil, true, true) end end hooksecurefunc("MountJournal_UpdateMountList", PetJournal_UpdateMounts) @@ -220,19 +165,12 @@ local function PetJournalStyle() for b = 1, 3 do local pjPet = _G['PetJournalLoadoutPet'..b] pjPet:Formula409() - pjPet:SetPanelTemplate("Inset") - local level = pjPet:GetFrameLevel() - if(level > 0) then - pjPet.Panel:SetFrameLevel(level - 1) - else - pjPet.Panel:SetFrameLevel(0) - end pjPet.petTypeIcon:SetPoint('BOTTOMLEFT', 2, 2) pjPet.dragButton:WrapOuter(_G['PetJournalLoadoutPet'..b..'Icon']) pjPet.hover = true; pjPet.pushed = true; pjPet.checked = true; - STYLE:ApplyItemButtonStyle(pjPet) + STYLE:ApplyItemButtonStyle(pjPet, nil, nil, true) pjPet.setButton:Formula409() _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:Formula409() _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:SetPanelTemplate('Default') @@ -261,17 +199,11 @@ local function PetJournalStyle() end PetJournalPetCard:Formula409() - PetJournalPetCard:SetPanelTemplate("Inset") - local level = PetJournalPetCard:GetFrameLevel() - if(level > 0) then - PetJournalPetCard.Panel:SetFrameLevel(level - 1) - else - PetJournalPetCard.Panel:SetFrameLevel(0) - end + STYLE:ApplyItemButtonStyle(PetJournalPetCard, nil, nil, true) PetJournalPetCardInset:Formula409() PetJournalPetCardPetInfo.levelBG:SetAlpha(0) PetJournalPetCardPetInfoIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - PetJournalPetCardPetInfo:SetPanelTemplate('Transparent') + STYLE:ApplyItemButtonStyle(PetJournalPetCardPetInfo, nil, true, true) local fg = CreateFrame("Frame", nil, PetJournalPetCardPetInfo) fg:SetSize(40,40) fg:SetPoint("TOPLEFT", PetJournalPetCardPetInfo, "TOPLEFT", -1, 1) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua index d4a632e..323e777 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua @@ -21,7 +21,7 @@ PETSTABLE STYLER ########################################################## ]]-- local function PetStableStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.stable ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.stable ~= true then return end PetStableFrame:Formula409() PetStableFrameInset:Formula409() PetStableLeftInset:Formula409() @@ -35,12 +35,12 @@ local function PetStableStyle() STYLE:ApplyPaginationStyle(PetStableNextPageButton) for j = 1, NUM_PET_ACTIVE_SLOTS do STYLE:ApplyItemButtonStyle(_G['PetStableActivePet'..j], true) - end; + end for j = 1, NUM_PET_STABLE_SLOTS do STYLE:ApplyItemButtonStyle(_G['PetStableStabledPet'..j], true) - end; + end PetStableSelectedPetIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua index 6844de3..c212f9f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua @@ -27,9 +27,10 @@ local function PVPFrameStyle() return end - PVPUIFrame:Formula409() - PVPUIFrame:SetPanelTemplate("Action") + STYLE:ApplyWindowHolder(PVPUIFrame, true) + PVPUIFrame.Shadows:Formula409() + STYLE:ApplyCloseButtonStyle(PVPUIFrameCloseButton) for g = 1, 2 do diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua index 28ffe30..780fe61 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua @@ -61,20 +61,6 @@ local function QueuedWatchFrameItems() end end --- local QuestLogScrollFrame_OnShow = function() --- if not QuestLogScrollFrame.spellTex then --- QuestLogScrollFrame:SetFixedPanelTemplate("Default") --- QuestLogScrollFrame.spellTex = QuestLogScrollFrame:CreateTexture(nil, 'ARTWORK') --- QuestLogScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBookBG]]) --- QuestLogScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2) --- QuestLogScrollFrame.spellTex:Size(514, 616) --- QuestLogScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) --- QuestLogScrollFrame.spellTex2 = QuestLogScrollFrame:CreateTexture(nil, 'BORDER') --- QuestLogScrollFrame.spellTex2:SetTexture([[Interface\FrameGeneral\UI-Background-Rock]]) --- QuestLogScrollFrame.spellTex2:FillInner() --- end --- end - local QuestRewardScrollFrame_OnShow = function(self) if(not self.Panel) then self:SetPanelTemplate("Default") @@ -129,19 +115,68 @@ local function QuestGreetingStyle() end local function QuestFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.quest ~= true then return end + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.quest ~= true then return end + + --[[ THIS SECTION NOT WORKING IN WOD ]]-- + if(SuperVillain.___interface < 60000) then + QuestLogScrollFrame:Formula409() + QuestLogCount:Formula409() + EmptyQuestLogFrame:Formula409() + QuestProgressScrollFrame:Formula409() + QuestLogFrameShowMapButton:Formula409() + QuestLogFrameCompleteButton:Formula409() + + STYLE:ApplyWindowHolder(QuestLogFrame) + QuestLogCount:SetFixedPanelTemplate("Default") + + QuestLogDetailFrameInset:MUNG() + QuestLogFrameInset:MUNG() + + QuestLogFrameShowMapButton:SetButtonTemplate() + QuestLogFrameShowMapButton.text:ClearAllPoints() + QuestLogFrameShowMapButton.text:SetPoint("CENTER") + + for _,i in pairs(QuestFrameList)do + _G[i]:SetButtonTemplate() + _G[i]:SetFrameLevel(_G[i]:GetFrameLevel() + 2) + end + + QuestLogFramePushQuestButton:Point("LEFT", QuestLogFrameAbandonButton, "RIGHT", 2, 0) + QuestLogFramePushQuestButton:Point("RIGHT", QuestLogFrameTrackButton, "LEFT", -2, 0) + + QuestLogDetailScrollFrame:HookScript('OnShow', function(k) + if not QuestLogDetailScrollFrame.Panel then + QuestLogDetailScrollFrame:SetPanelTemplate("Default") + QuestScrollHelper(QuestLogDetailScrollFrame, 509, 630, false) + QuestLogDetailScrollFrame:Height(k:GetHeight() - 2) + end + QuestLogDetailScrollFrame.spellTex:Height(k:GetHeight() + 217) + end) + + QuestLogFrame:HookScript("OnShow", function() + if not QuestLogScrollFrame.spellTex then + QuestLogScrollFrame:SetFixedPanelTemplate("Default") + QuestLogScrollFrame.spellTex = QuestLogScrollFrame:CreateTexture(nil, 'ARTWORK') + QuestLogScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBookBG]]) + QuestLogScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2) + QuestLogScrollFrame.spellTex:Size(514, 616) + QuestLogScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) + QuestLogScrollFrame.spellTex2 = QuestLogScrollFrame:CreateTexture(nil, 'BORDER') + QuestLogScrollFrame.spellTex2:SetTexture([[Interface\FrameGeneral\UI-Background-Rock]]) + QuestLogScrollFrame.spellTex2:FillInner() + end + end) + end + --[[ ############################### ]]-- + STYLE:ApplyCloseButtonStyle(QuestLogFrameCloseButton) STYLE:ApplyScrollFrameStyle(QuestLogDetailScrollFrameScrollBar) STYLE:ApplyScrollFrameStyle(QuestLogScrollFrameScrollBar, 5) STYLE:ApplyScrollFrameStyle(QuestProgressScrollFrameScrollBar) STYLE:ApplyScrollFrameStyle(QuestRewardScrollFrameScrollBar) - - --[[MISC STYLINGS REMOVED HERE]]-- QuestGreetingScrollFrame:Formula409() STYLE:ApplyScrollFrameStyle(QuestGreetingScrollFrameScrollBar) - - --[[MISC STYLINGS REMOVED HERE]]-- for i = 1, MAX_NUM_ITEMS do local item = _G["QuestInfoItem"..i] @@ -181,13 +216,12 @@ local function QuestFrameStyle() QuestInfoItemHighlight:Size(142, 40) hooksecurefunc("QuestInfoItem_OnClick", Hook_QuestInfoItem_OnClick) - - --QuestLogFrame:HookScript("OnShow", QuestLogScrollFrame_OnShow) + hooksecurefunc("QuestInfo_Display", Hook_QuestInfo_Display) QuestRewardScrollFrame:HookScript("OnShow", QuestRewardScrollFrame_OnShow) - hooksecurefunc("QuestInfo_Display", Hook_QuestInfo_Display) - QuestFrame:Formula409(true) + STYLE:ApplyWindowHolder(QuestFrame, true) + QuestFrameInset:MUNG() QuestFrameDetailPanel:Formula409(true) QuestDetailScrollFrame:Formula409(true) @@ -201,12 +235,13 @@ local function QuestFrameStyle() QuestRewardScrollChildFrame:Formula409(true) QuestFrameProgressPanel:Formula409(true) QuestFrameRewardPanel:Formula409(true) - QuestFrame:SetPanelTemplate("Action") + QuestFrameAcceptButton:SetButtonTemplate() QuestFrameDeclineButton:SetButtonTemplate() QuestFrameCompleteButton:SetButtonTemplate() QuestFrameGoodbyeButton:SetButtonTemplate() QuestFrameCompleteQuestButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(QuestFrameCloseButton, QuestFrame.Panel) for j = 1, 6 do diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua index e839fd6..31c3347 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua @@ -44,26 +44,26 @@ RAID STYLERS ########################################################## ]]-- local function RaidUIStyle() - if InCombatLockdown() then return end; - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.raid ~= true then return end; + if InCombatLockdown() then return end + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.raid ~= true then return end for _,group in pairs(RaidGroupList)do - if not _G[group] then print(group) end; + if not _G[group] then print(group) end if _G[group] then _G[group]:Formula409() end - end; + end for e = 1, 8 do for f = 1, 5 do _G["RaidGroup"..e.."Slot"..f]:Formula409() _G["RaidGroup"..e.."Slot"..f]:SetFixedPanelTemplate("Transparent", true) end end -end; +end local function RaidInfoStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.nonraid ~= true then return - end; + end _G["RaidInfoFrame"]:Formula409() _G["RaidInfoInstanceLabel"]:Formula409() _G["RaidInfoIDLabel"]:Formula409() @@ -75,7 +75,7 @@ local function RaidInfoStyle() if _G[RaidInfoFrameList[g]] then _G[RaidInfoFrameList[g]]:SetButtonTemplate() end - end; + end RaidInfoScrollFrame:Formula409() RaidInfoFrame:SetBasicPanel() RaidInfoFrame.Panel:Point("TOPLEFT", RaidInfoFrame, "TOPLEFT") @@ -84,7 +84,7 @@ local function RaidInfoStyle() STYLE:ApplyScrollFrameStyle(RaidInfoScrollFrameScrollBar) RaidFrameRaidBrowserButton:SetButtonTemplate() RaidFrameAllAssistCheckButton:SetCheckboxTemplate(true) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua index 56599f0..6147606 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua @@ -21,9 +21,10 @@ REFORGING STYLER ########################################################## ]]-- local function ReforgingStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.reforge ~= true then return end; - ReforgingFrame:Formula409() - ReforgingFrame:SetPanelTemplate("Action") + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.reforge ~= true then return end + + STYLE:ApplyWindowHolder(ReforgingFrame, true) + ReforgingFrame.ButtonFrame:Formula409() ReforgingFrameReforgeButton:ClearAllPoints() ReforgingFrameReforgeButton:Point("LEFT", ReforgingFrameRestoreButton, "RIGHT", 2, 0) @@ -43,7 +44,7 @@ local function ReforgingStyle() end end) STYLE:ApplyCloseButtonStyle(ReforgingFrameCloseButton) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua index 9485111..7943ba9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua @@ -214,7 +214,7 @@ SPELLBOOK STYLER local function SpellBookStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.spellbook ~= true then return end - SpellBookFrame:SetPanelTemplate("Pattern") + STYLE:ApplyWindowHolder(SpellBookFrame) STYLE:ApplyCloseButtonStyle(SpellBookFrameCloseButton) for _, gName in pairs(bookFrames) do diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua new file mode 100644 index 0000000..c7fb48f --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/store.lua @@ -0,0 +1,36 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +--]] +local SuperVillain, L = unpack(SVUI); +local STYLE = _G.StyleVillain; +--[[ +########################################################## +TAXIFRAME STYLER +########################################################## +]]-- +local function StoreStyle() + -- if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.store ~= true then + -- return + -- end + + --STYLE:ApplyWindowHolder(StoreFrame) + STYLE:ApplyTooltipStyle(StoreTooltip) +end +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveBlizzardStyle("Blizzard_StoreUI", StoreStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua index 4880f9a..82e4e36 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua @@ -40,8 +40,6 @@ local SystemFrameList1 = { "ReadyCheckFrame", "StackSplitFrame", "QueueStatusFrame", -}; -local SystemFrameList2 = { "InterfaceOptionsFrame", "VideoOptionsFrame", "AudioOptionsFrame", @@ -290,6 +288,7 @@ local SystemFrameList17 = { "AudioOptionsSoundPanelPetBattleMusic", "NetworkOptionsPanelOptimizeSpeed", "NetworkOptionsPanelUseIPv6", + "NetworkOptionsPanelAdvancedCombatLogging" }; local SystemFrameList18 = { "Graphics_DisplayModeDropDown", @@ -394,7 +393,9 @@ SYSTEM WIDGET STYLERS ]]-- local function SystemPanelQue() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.misc ~= true then return end + QueueStatusFrame:Formula409() + for i = 1, #SystemPopList do local this = _G[SystemPopList[i]] if(this) then @@ -413,15 +414,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList1 do local this = _G[SystemFrameList1[i]] if(this) then - this:Formula409() - this:SetPanelTemplate("Pattern") - end - end - for i = 1, #SystemFrameList2 do - local this = _G[SystemFrameList2[i]] - if(this) then - this:Formula409() - this:SetPanelTemplate("Halftone") + STYLE:ApplyWindowHolder(this) end end @@ -658,20 +651,24 @@ local function SystemPanelQue() AudioOptionsVoicePanelChatMode1KeyBindingButton:Point("CENTER", AudioOptionsVoicePanelBinding, "CENTER", 0, -10) CompactUnitFrameProfilesRaidStylePartyFrames:SetCheckboxTemplate(true) CompactUnitFrameProfilesGeneralOptionsFrameResetPositionButton:SetButtonTemplate() + for i = 1, #SystemFrameList20 do local this = _G["CompactUnitFrameProfilesGeneralOptionsFrame"..SystemFrameList20[i]] if(this) then this:SetCheckboxTemplate(true) this:SetFrameLevel(40) end - end - Graphics_RightQuality:MUNG() + end + for i = 1, #SystemFrameList21 do local this = _G[SystemFrameList21[i]] if(this) then STYLE:ApplyScrollBarStyle(this) end end + Graphics_RightQuality:SetBackdrop(nil) + Graphics_RightQuality:MUNG() + MacOptionsFrame:Formula409() MacOptionsFrame:SetFixedPanelTemplate() MacOptionsButtonCompress:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua index 0a747a2..28bcd65 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua @@ -25,7 +25,7 @@ local function cleanT(a,b) local d=select(c,a:GetRegions()) if d and d:GetObjectType()=="Texture"then local n=d:GetName(); - if n=='TabardFrameEmblemTopRight' or n=='TabardFrameEmblemTopLeft' or n=='TabardFrameEmblemBottomRight' or n=='TabardFrameEmblemBottomLeft' then return end; + if n=='TabardFrameEmblemTopRight' or n=='TabardFrameEmblemTopLeft' or n=='TabardFrameEmblemBottomRight' or n=='TabardFrameEmblemBottomLeft' then return end if b and type(b)=='boolean'then d:MUNG() elseif d:GetDrawLayer()==b then @@ -46,7 +46,7 @@ TABARDFRAME STYLER local function TabardFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.tabard ~= true then return - end; + end cleanT(TabardFrame, true) TabardFrame:SetPanelTemplate("Action", false) TabardModel:SetFixedPanelTemplate("Transparent") @@ -69,7 +69,7 @@ local function TabardFrameStyle() local d, e, f, g, h = _G[c]:GetPoint() _G[c]:Point(d, e, f, g, h+4) end - end; + end TabardCharacterModelRotateLeftButton:Point("BOTTOMLEFT", 4, 4) TabardCharacterModelRotateRightButton:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) hooksecurefunc(TabardCharacterModelRotateLeftButton, "SetPoint", function(i, d, j, k, l, m) @@ -82,7 +82,7 @@ local function TabardFrameStyle() i:Point("TOPLEFT", TabardCharacterModelRotateLeftButton, "TOPRIGHT", 4, 0) end end) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua index 83248b8..95d6cbf 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua @@ -107,15 +107,11 @@ TALENTFRAME STYLER local function TalentFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.talent ~= true then return end - PlayerTalentFrame:Formula409() + STYLE:ApplyWindowHolder(PlayerTalentFrame) + PlayerTalentFrameInset:Formula409() PlayerTalentFrameTalents:Formula409() - - PlayerTalentFrame.Panel = CreateFrame('Frame', nil, PlayerTalentFrame) - PlayerTalentFrame.Panel:WrapOuter(PlayerTalentFrame) - - PlayerTalentFrame.Panel:SetFrameLevel(0) - PlayerTalentFrame.Panel:SetPanelTemplate("Halftone") + PlayerTalentFrameTalentsClearInfoFrame:Formula409() PlayerTalentFrame.Panel:Point("BOTTOMRIGHT", PlayerTalentFrame, "BOTTOMRIGHT", 0, -5) PlayerTalentFrameSpecializationTutorialButton:MUNG() @@ -134,8 +130,7 @@ local function TalentFrameStyle() end end - PlayerTalentFrameTalents:SetFixedPanelTemplate('FramedTop') - PlayerTalentFrameTalentsClearInfoFrame:SetFixedPanelTemplate('Transparent') + PlayerTalentFrameTalents:SetFixedPanelTemplate("Inset") PlayerTalentFrameTalentsClearInfoFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) PlayerTalentFrameTalentsClearInfoFrame:Width(PlayerTalentFrameTalentsClearInfoFrame:GetWidth()-2) PlayerTalentFrameTalentsClearInfoFrame:Height(PlayerTalentFrameTalentsClearInfoFrame:GetHeight()-2) @@ -171,49 +166,43 @@ local function TalentFrameStyle() PlayerSpecTab1:Point(d, x, f, -1, h) end) - for i = 1, MAX_NUM_TALENT_TIERS do - local y = _G["PlayerTalentFrameTalentsTalentRow"..i] - _G["PlayerTalentFrameTalentsTalentRow"..i.."Bg"]:Hide() - y:DisableDrawLayer("BORDER") - y:Formula409() - y.TopLine:Point("TOP", 0, 4) - y.BottomLine:Point("BOTTOM", 0, -4) - for z = 1, NUM_TALENT_COLUMNS do - local A = _G["PlayerTalentFrameTalentsTalentRow"..i.."Talent"..z] - local B = _G["PlayerTalentFrameTalentsTalentRow"..i.."Talent"..z.."IconTexture"] - if(A and B) then - A:Formula409() - A:SetFrameLevel(A:GetFrameLevel()+5) - A:SetBasicPanel() - A.Panel:WrapOuter(B) - B:SetDrawLayer("OVERLAY") - B:SetTexCoord(0.1, 0.9, 0.1, 0.9) - A.bg = CreateFrame("Frame", nil, A) - A.bg:SetFrameLevel(A:GetFrameLevel()-2) - A.bg:Point("TOPLEFT", 15, -1) - A.bg:Point("BOTTOMRIGHT", -10, 1) - A.bg:SetFixedPanelTemplate("Default") - A.bg.SelectedTexture = A.bg:CreateTexture(nil, "ARTWORK") - A.bg.SelectedTexture:Point("TOPLEFT", A, "TOPLEFT", 15, -1) - A.bg.SelectedTexture:Point("BOTTOMRIGHT", A, "BOTTOMRIGHT", -10, 1) + for i = 1, MAX_NUM_TALENT_TIERS do + local gName = ("PlayerTalentFrameTalentsTalentRow%d"):format(i) + local rowFrame = _G[gName] + if(rowFrame) then + local bgFrame = _G[("%sBg"):format(gName)] + if(bgFrame) then bgFrame:Hide() end + + rowFrame:DisableDrawLayer("BORDER") + rowFrame:Formula409() + rowFrame.TopLine:Point("TOP", 0, 4) + rowFrame.BottomLine:Point("BOTTOM", 0, -4) + + for z = 1, NUM_TALENT_COLUMNS do + local talentItem = _G[("%sTalent%d"):format(gName, z)] + if(talentItem) then + STYLE:ApplyItemButtonStyle(talentItem, false, true) + end end - end + end end hooksecurefunc("TalentFrame_Update", function() - for b = 1, MAX_NUM_TALENT_TIERS do - for z = 1, NUM_TALENT_COLUMNS do - local A = _G["PlayerTalentFrameTalentsTalentRow"..b.."Talent"..z] - if A.knownSelection:IsShown() then - A.bg.SelectedTexture:Show() - A.bg.SelectedTexture:SetTexture(0, 1, 0, 0.1) - else - A.bg.SelectedTexture:Hide() - end - if A.learnSelection:IsShown() then - A.bg.SelectedTexture:Show() - A.bg.SelectedTexture:SetTexture(1, 1, 0, 0.1) - end + for i = 1, MAX_NUM_TALENT_TIERS do + local gName = ("PlayerTalentFrameTalentsTalentRow%d"):format(i) + + for z = 1, NUM_TALENT_COLUMNS do + local talentItem = _G[("%sTalent%d"):format(gName, z)] + if(talentItem) then + if talentItem.knownSelection:IsShown() then + talentItem:SetBackdropBorderColor(0, 1, 0) + else + talentItem:SetBackdropBorderColor(0, 0, 0) + end + if talentItem.learnSelection:IsShown() then + talentItem:SetBackdropBorderColor(1, 1, 0) + end + end end end end) @@ -348,11 +337,11 @@ STYLE:SaveBlizzardStyle("Blizzard_TalentUI", TalentFrameStyle) local function GlyphStyle() GlyphFrame:Formula409() - GlyphFrame.background:ClearAllPoints() - GlyphFrame.background:SetAllPoints(PlayerTalentFrameInset) - GlyphFrame:SetPanelTemplate("Comic", false, 0, 3, 3) + --GlyphFrame.background:ClearAllPoints() + --GlyphFrame.background:SetAllPoints(PlayerTalentFrameInset) + GlyphFrame:SetFixedPanelTemplate("Comic", false, 0, 3, 3) GlyphFrameSideInset:Formula409() - GlyphFrameClearInfoFrame:SetFixedPanelTemplate("Comic") + GlyphFrameClearInfoFrame:Formula409() GlyphFrameClearInfoFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) GlyphFrameClearInfoFrame:Width(GlyphFrameClearInfoFrame:GetWidth()-2) GlyphFrameClearInfoFrame:Height(GlyphFrameClearInfoFrame:GetHeight()-2) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua index 5a5c6ed..3a0a8e5 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua @@ -23,15 +23,15 @@ TAXIFRAME STYLER local function TaxiStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.taxi ~= true then return - end; - TaxiFrame:Formula409() - TaxiFrame:SetPanelTemplate("Default") + end - TaxiRouteMap:SetBasicPanel() + STYLE:ApplyWindowHolder(TaxiFrame) + + TaxiRouteMap:SetPanelTemplate("Default") TaxiRouteMap.Panel:WrapOuter(TaxiRouteMap, 4, 4) STYLE:ApplyCloseButtonStyle(TaxiFrame.CloseButton) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua index a225e8b..e60b8b6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua @@ -55,7 +55,7 @@ local function cbResize(self,elapsed) d:SetWidth(20) d:SetHeight(20) end - end; + end if f:IsShown()then d:SetPoint("LEFT",5,0) d:SetWidth(26) @@ -70,15 +70,15 @@ local function StyleACP() STYLE:ApplyFrameStyle(ACP_AddonList) STYLE:ApplyFrameStyle(ACP_AddonList_ScrollFrame) local h={"ACP_AddonListSetButton","ACP_AddonListDisableAll","ACP_AddonListEnableAll","ACP_AddonList_ReloadUI","ACP_AddonListBottomClose"} - for i,j in pairs(h)do _G[j]:SetButtonTemplate()end; - for c=1,20 do _G["ACP_AddonListEntry"..c.."LoadNow"]:SetButtonTemplate()end; + for i,j in pairs(h)do _G[j]:SetButtonTemplate()end + for c=1,20 do _G["ACP_AddonListEntry"..c.."LoadNow"]:SetButtonTemplate()end STYLE:ApplyCloseButtonStyle(ACP_AddonListCloseButton) for c=1,20,1 do local k=_G["ACP_AddonList"] k.timeLapse = 0 k:SetScript("OnUpdate",cbResize) - end; - for c=1,20 do _G["ACP_AddonListEntry"..c.."Enabled"]:SetCheckboxTemplate(true)end; + end + for c=1,20 do _G["ACP_AddonListEntry"..c.."Enabled"]:SetCheckboxTemplate(true)end ACP_AddonList_NoRecurse:SetCheckboxTemplate(true) STYLE:ApplyScrollFrameStyle(ACP_AddonList_ScrollFrameScrollBar) STYLE:ApplyDropdownStyle(ACP_AddonListSortDropDown) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua index cd01913..a39fcf6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua @@ -78,7 +78,7 @@ local function AL_OnShow(self, event, ...) AtlasLootDefaultFrame_CloseButton:SetPoint("TOPRIGHT", AtlasLootDefaultFrame, "TOPRIGHT", -5 -2) AtlasLootDefaultFrame:SetFrameLevel(0) AtlasLootItemsFrame:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - for i = 1, 30 do if _G["AtlasLootDefaultFrame_ScrollLine"..i] then _G["AtlasLootDefaultFrame_ScrollLine"..i]:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1)end end; + for i = 1, 30 do if _G["AtlasLootDefaultFrame_ScrollLine"..i] then _G["AtlasLootDefaultFrame_ScrollLine"..i]:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1)end end if(AtlasLootDefaultFrame_PackageSelect) then AtlasLootDefaultFrame_PackageSelect:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) @@ -97,20 +97,20 @@ local function Nine_IsThere(self, elapsed) else self.timeLapse = 0 end - for i = 1, 9 do local f = _G["AtlasLootCompareFrameSortButton_"..i]f:SetWidth(44.44)end; - for _, object in pairs(nineisthere) do STYLE:ApplyFrameStyle(_G[object]) end; + for i = 1, 9 do local f = _G["AtlasLootCompareFrameSortButton_"..i]f:SetWidth(44.44)end + for _, object in pairs(nineisthere) do STYLE:ApplyFrameStyle(_G[object]) end AtlasLootCompareFrameSortButton_7:Point("LEFT", AtlasLootCompareFrameSortButton_6, "RIGHT", 1, 0) AtlasLootCompareFrameSortButton_8:Point("LEFT", AtlasLootCompareFrameSortButton_7, "RIGHT", 1, 0) AtlasLootCompareFrameSortButton_9:Point("LEFT", AtlasLootCompareFrameSortButton_8, "RIGHT", 1, 0) end local function Compare_OnShow(self, event, ...) - for i = 1, 6 do _G["AtlasLootCompareFrameSortButton_"..i]:SetWidth(40)end; + for i = 1, 6 do _G["AtlasLootCompareFrameSortButton_"..i]:SetWidth(40)end local Nine = AtlasLootCompareFrameSortButton_9 if Nine ~= nil then Nine.timeLapse = 0 Nine:SetScript("OnUpdate", Nine_IsThere) - end; + end end local _hook_ALPanel = function(self,_,parent,_,_,_,breaker) @@ -134,9 +134,9 @@ end local function StyleAtlasLoot(event, addon) assert(AtlasLootPanel, "AddOn Not Loaded") - for _, object in pairs(StripAllTextures) do _G[object]:Formula409()end; - for _, object in pairs(SetTemplateDefault) do STYLE:ApplyFrameStyle(_G[object], "Default")end; - for _, button in pairs(buttons) do _G[button]:SetButtonTemplate()end; + for _, object in pairs(StripAllTextures) do _G[object]:Formula409()end + for _, object in pairs(SetTemplateDefault) do STYLE:ApplyFrameStyle(_G[object], "Default")end + for _, button in pairs(buttons) do _G[button]:SetButtonTemplate()end -- Manipulate the main frames STYLE:ApplyFrameStyle(_G["AtlasLootDefaultFrame"], "Action"); @@ -160,7 +160,7 @@ local function StyleAtlasLoot(event, addon) if AtlasLoot_PanelButton_11 then AtlasLoot_PanelButton_11:SetButtonTemplate() end if AtlasLoot_PanelButton_12 then AtlasLoot_PanelButton_12:SetButtonTemplate() end - for i = 1, 15 do local f = _G["AtlasLootCompareFrameMainFilterButton"..i]f:Formula409() end; + for i = 1, 15 do local f = _G["AtlasLootCompareFrameMainFilterButton"..i]f:Formula409() end STYLE:ApplyCloseButtonStyle(AtlasLootDefaultFrame_CloseButton) STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua index e8af2eb..27fa86c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua @@ -56,7 +56,7 @@ local function StyleOmen() end) hooksecurefunc(Omen, 'Toggle', function(self) - if InCombatLockdown() then return end; + if InCombatLockdown() then return end if not SuperVillain.CurrentlyDocked["OmenAnchor"] then return end if self.Anchor:IsShown() then SuperDockWindow:Show() @@ -72,7 +72,7 @@ end STYLE:SaveAddonStyle("Omen", StyleOmen) function STYLE:Docklet_Omen(parent) - if not Omen then return end; + if not Omen then return end local db=Omen.db; db.profile.Scale=1; db.profile.Bar.Spacing=1; @@ -93,4 +93,4 @@ function STYLE:Docklet_Omen(parent) OmenBarList:SetFixedPanelTemplate('Transparent') OmenAnchor:ClearAllPoints() OmenAnchor:SetAllPoints(parent) -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua index 5e7aece..46456e3 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua @@ -46,8 +46,8 @@ local function NoColor(a) q:MUNG() end end - end; -end; + end +end local function StyleRecount() assert(Recount, "AddOn Not Loaded") @@ -104,7 +104,7 @@ local function StyleRecount() STYLE:ApplyScrollFrameStyle(Recount_MainWindow_ScrollBarScrollBar) - Recount_MainWindow:HookScript('OnShow', function(self) if InCombatLockdown() then return end;if SuperVillain.CurrentlyDocked["Recount_MainWindow"] then SuperDockWindowRight:Show() end end) + Recount_MainWindow:HookScript('OnShow', function(self) if InCombatLockdown() then return end if SuperVillain.CurrentlyDocked["Recount_MainWindow"] then SuperDockWindowRight:Show() end end) Recount.MainWindow.FileButton:HookScript('OnClick', function(self) if LibDropdownFrame0 then STYLE:ApplyFrameStyle(LibDropdownFrame0) end end) hooksecurefunc(Recount, 'ShowScrollbarElements', function(self, name) Recount_MainWindow_ScrollBarScrollBar:Show() end) @@ -123,12 +123,12 @@ end STYLE:SaveAddonStyle("Recount", StyleRecount) function STYLE:Docklet_Recount(parent) - if not Recount then return end; + if not Recount then return end local n=Recount.MainWindow.Panel; if n and not n.Panel then n:Show() n:SetFixedPanelTemplate('Transparent',true) - end; + end Recount.db.profile.Locked=true; Recount.db.profile.Scaling=1; Recount.db.profile.ClampToScreen=true; @@ -139,4 +139,4 @@ function STYLE:Docklet_Recount(parent) Recount:LockWindows(true) Recount:ResizeMainWindow() Recount_MainWindow_ScrollBar:Hide() -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua index ae4d0d1..3c7f2b4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua @@ -43,7 +43,7 @@ local function Skada_ShowPopup(self) end local function skada_panel_loader(holder, window, parent) - if not window then return end; + if not window then return end local bars = Skada.displays['bar'] @@ -66,7 +66,7 @@ local function skada_panel_loader(holder, window, parent) if bgroup and not bgroup.Panel then bgroup:Show() bgroup:SetFixedPanelTemplate('Transparent',true) - end; + end bars.ApplySettings(bars, window) end @@ -112,7 +112,7 @@ local function StyleSkada() end) hooksecurefunc(Skada, 'ToggleWindow', function() - if InCombatLockdown() then return end; + if InCombatLockdown() then return end if not SuperVillain.CurrentlyDocked["SkadaHolder"] or not SuperVillain.CurrentlyDocked["SkadaHolder2"] then return end for index, window in ipairs(Skada:GetWindows()) do if window:IsShown() then @@ -143,7 +143,7 @@ local function StyleSkada() end function STYLE:Docklet_Skada() - if not Skada then return end; + if not Skada then return end if(not SkadaHolder) then local SkadaHolder = CreateFrame("Frame", "SkadaHolder", UIParent) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua index 493fa90..50dc259 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua @@ -42,7 +42,7 @@ local function StyleTinyDPS() STYLE:ApplyFrameStyle(tdpsFrame) tdpsFrame:HookScript("OnShow", function() - if InCombatLockdown() then return end; + if InCombatLockdown() then return end if SuperVillain.CurrentlyDocked["tdpsFrame"] then SuperDockWindowRight:Show() end @@ -59,7 +59,7 @@ end STYLE:SaveAddonStyle("TinyDPS", StyleTinyDPS) function STYLE:Docklet_TinyDPS(parent) - if not tdpsFrame then return end; + if not tdpsFrame then return end tdpsFrame:SetFixedPanelTemplate("Transparent", true) tdpsFrame:SetFrameStrata("LOW") tdps.hideOOC = false; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua index cfad321..ae338f4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua @@ -36,8 +36,8 @@ local STYLE = _G.StyleVillain; WEAKAURAS ########################################################## ]]-- -local ProxyCreateFunc = function() return end; -local ProxyModifyFunc = function() return end; +local ProxyCreateFunc = function() return end +local ProxyModifyFunc = function() return end local function Style_WeakAuras(frame) if not frame.Panel then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua index 0f07d92..e07d0d1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua @@ -42,7 +42,7 @@ local function StyleALDamageMeter() alDamageMeterFrame.bg:MUNG() STYLE:ApplyFrameStyle(alDamageMeterFrame) alDamageMeterFrame:HookScript('OnShow', function() - if InCombatLockdown() then return end; + if InCombatLockdown() then return end if SuperVillain.CurrentlyDocked["alDamagerMeterFrame"] then SuperDockWindow:Show() end @@ -51,7 +51,7 @@ end STYLE:SaveAddonStyle("alDamageMeter", StyleALDamageMeter) function STYLE:Docklet_alDamageMeter(parent) - if not _G['alDamagerMeterFrame'] then return end; + if not _G['alDamagerMeterFrame'] then return end local parentFrame=_G['alDamagerMeterFrame']:GetParent(); dmconf.barheight=floor(parentFrame:GetHeight()/dmconf.maxbars-dmconf.spacing) dmconf.width=parentFrame:GetWidth() @@ -60,4 +60,4 @@ function STYLE:Docklet_alDamageMeter(parent) alDamageMeterFrame.backdrop:SetFixedPanelTemplate('Transparent',true) alDamageMeterFrame.bg:MUNG() alDamageMeterFrame:SetFrameStrata('LOW') -end; \ No newline at end of file +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua index f3d6d58..1bfbdb3 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua @@ -21,11 +21,12 @@ TIMEMANAGER STYLER ########################################################## ]]-- local function TimeManagerStyle() - -- if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.timemanager ~= true then - -- return - -- end; - TimeManagerFrame:Formula409() - TimeManagerFrame:SetPanelTemplate("Action", false) + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.timemanager ~= true then + return + end + + STYLE:ApplyWindowHolder(TimeManagerFrame, true) + STYLE:ApplyCloseButtonStyle(TimeManagerFrameCloseButton) TimeManagerFrameInset:MUNG() STYLE:ApplyDropdownStyle(TimeManagerAlarmHourDropDown, 80) @@ -57,7 +58,7 @@ local function TimeManagerStyle() STYLE:ApplyPaginationStyle(StopwatchResetButton) StopwatchPlayPauseButton:Point("RIGHT", StopwatchResetButton, "LEFT", -4, 0) StopwatchResetButton:Point("BOTTOMRIGHT", StopwatchFrame, "BOTTOMRIGHT", -4, 6) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua index 0acff18..1882ef1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/trade.lua @@ -23,10 +23,10 @@ TRADEFRAME STYLER local function TradeFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.trade ~= true then return - end; - TradeFrame:Formula409(true) - TradeFrame:SetPanelTemplate("Action", false) - TradeFrame.Panel:SetAllPoints() + end + + STYLE:ApplyWindowHolder(TradeFrame, true) + TradeFrameInset:MUNG() TradeFrameTradeButton:SetButtonTemplate() TradeFrameCancelButton:SetButtonTemplate() @@ -50,7 +50,7 @@ local function TradeFrameStyle() _G[frame].Panel:Point("TOPLEFT", -2, 1) _G[frame].Panel:Point("BOTTOMRIGHT", -12, -1) _G[frame]:SetTextInsets(-1, -1, -2, -2) - end; + end for i = 1, 7 do local W = _G["TradePlayerItem"..i] local X = _G["TradeRecipientItem"..i] @@ -84,7 +84,7 @@ local function TradeFrameStyle() Z.bg:SetFrameLevel(Z:GetFrameLevel()-3) Z:SetFrameLevel(Z:GetFrameLevel()-1) end - end; + end TradeHighlightPlayerTop:SetTexture(0, 1, 0, 0.2) TradeHighlightPlayerBottom:SetTexture(0, 1, 0, 0.2) TradeHighlightPlayerMiddle:SetTexture(0, 1, 0, 0.2) @@ -101,7 +101,7 @@ local function TradeFrameStyle() TradeHighlightRecipientEnchantBottom:SetTexture(0, 1, 0, 0.2) TradeHighlightRecipientEnchantMiddle:SetTexture(0, 1, 0, 0.2) TradeHighlightRecipientEnchant:SetFrameStrata("HIGH") -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua index 85ab9dd..f8e31a9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua @@ -23,49 +23,64 @@ TRADESKILL STYLER local function TradeSkillStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.tradeskill ~= true then return - end; - TradeSkillFrame:Formula409(true) + end + TradeSkillListScrollFrame:Formula409() TradeSkillDetailScrollFrame:Formula409() TradeSkillFrameInset:Formula409() TradeSkillExpandButtonFrame:Formula409() TradeSkillDetailScrollChildFrame:Formula409() - TradeSkillFrame:SetPanelTemplate("Action") TradeSkillRankFrame:Formula409() - TradeSkillRankFrame:SetPanelTemplate("Slot", true, 1, 2, 2) - TradeSkillRankFrame:SetStatusBarTexture(SuperVillain.Media.bar.default) + TradeSkillCreateButton:Formula409(true) + TradeSkillCancelButton:Formula409(true) + TradeSkillFilterButton:Formula409(true) + TradeSkillCreateAllButton:Formula409(true) + TradeSkillViewGuildCraftersButton:Formula409(true) + + STYLE:ApplyWindowHolder(TradeSkillFrame, true, true) + STYLE:ApplyWindowHolder(TradeSkillGuildFrame) + + TradeSkillGuildFrame:Point("BOTTOMLEFT", TradeSkillFrame, "BOTTOMRIGHT", 3, 19) + TradeSkillGuildFrameContainer:Formula409() + TradeSkillGuildFrameContainer:SetPanelTemplate("Inset") + STYLE:ApplyCloseButtonStyle(TradeSkillGuildFrameCloseButton) + + TradeSkillRankFrame:SetPanelTemplate("Bar", true) + TradeSkillRankFrame:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Bars\DEFAULT]]) TradeSkillListScrollFrame:SetPanelTemplate("Inset") TradeSkillDetailScrollFrame:SetPanelTemplate("Inset") - TradeSkillFilterButton:Formula409(true) + TradeSkillCreateButton:SetButtonTemplate() TradeSkillCancelButton:SetButtonTemplate() - TradeSkillFilterButton:SetPanelTemplate("Button", true) - TradeSkillFilterButton.Panel:SetAllPoints() + TradeSkillFilterButton:SetButtonTemplate() TradeSkillCreateAllButton:SetButtonTemplate() TradeSkillViewGuildCraftersButton:SetButtonTemplate() + STYLE:ApplyScrollFrameStyle(TradeSkillListScrollFrameScrollBar) STYLE:ApplyScrollFrameStyle(TradeSkillDetailScrollFrameScrollBar) - TradeSkillLinkButton:GetNormalTexture():SetTexCoord(0.25, 0.7, 0.37, 0.75) - TradeSkillLinkButton:GetPushedTexture():SetTexCoord(0.25, 0.7, 0.45, 0.8) - TradeSkillLinkButton:GetHighlightTexture():MUNG() - TradeSkillLinkButton:SetPanelTemplate("Button", true) + TradeSkillLinkButton:Size(17, 14) TradeSkillLinkButton:Point("LEFT", TradeSkillLinkFrame, "LEFT", 5, -1) + TradeSkillLinkButton:SetButtonTemplate(nil, nil, nil, nil, true) + TradeSkillLinkButton:GetNormalTexture():SetTexCoord(0.25, 0.7, 0.45, 0.8) + TradeSkillFrameSearchBox:SetEditboxTemplate() TradeSkillInputBox:SetEditboxTemplate() + STYLE:ApplyPaginationStyle(TradeSkillDecrementButton) STYLE:ApplyPaginationStyle(TradeSkillIncrementButton) + TradeSkillIncrementButton:Point("RIGHT", TradeSkillCreateButton, "LEFT", -13, 0) STYLE:ApplyCloseButtonStyle(TradeSkillFrameCloseButton) + local internalTest = false; + hooksecurefunc("TradeSkillFrame_SetSelection", function(_) if TradeSkillSkillIcon:GetNormalTexture() then TradeSkillSkillIcon:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) TradeSkillSkillIcon:GetNormalTexture():FillInner() - if not TradeSkillSkillIcon.Panel then - TradeSkillSkillIcon:SetPanelTemplate("Slot") - end - end; + TradeSkillSkillIcon:SetSlotTemplate() + end for i=1, MAX_TRADE_SKILL_REAGENTS do local u = _G["TradeSkillReagent"..i] local icon = _G["TradeSkillReagent"..i.."IconTexture"] @@ -78,12 +93,12 @@ local function TradeSkillStyle() a2:SetFrameLevel(u:GetFrameLevel()-1) else a2:SetFrameLevel(0) - end; + end a2:WrapOuter(icon) a2:SetFixedPanelTemplate("Slot") icon:SetParent(a2) icon.backdrop = a2 - end; + end a1:SetParent(icon.backdrop) a1:SetDrawLayer("OVERLAY") if i > 2 and internalTest == false then @@ -91,17 +106,11 @@ local function TradeSkillStyle() u:ClearAllPoints() u:Point(d, a3, f, g, h-3) internalTest = true - end; + end _G["TradeSkillReagent"..i.."NameFrame"]:MUNG() end end) - TradeSkillGuildFrame:Formula409() - TradeSkillGuildFrame:SetPanelTemplate("Halftone") - TradeSkillGuildFrame:Point("BOTTOMLEFT", TradeSkillFrame, "BOTTOMRIGHT", 3, 19) - TradeSkillGuildFrameContainer:Formula409() - TradeSkillGuildFrameContainer:SetPanelTemplate("Inset") - STYLE:ApplyCloseButtonStyle(TradeSkillGuildFrameCloseButton) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua index 3d237c2..bc0feae 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua @@ -40,7 +40,11 @@ TRAINER STYLER ########################################################## ]]-- local function TrainerStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.trainer ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.trainer ~= true then return end + + ClassTrainerFrame:SetHeight(ClassTrainerFrame:GetHeight() + 42) + STYLE:ApplyWindowHolder(ClassTrainerFrame) + for i=1, 8 do _G["ClassTrainerScrollFrameButton"..i]:Formula409() _G["ClassTrainerScrollFrameButton"..i]:SetFixedPanelTemplate() @@ -50,19 +54,21 @@ local function TrainerStyle() _G["ClassTrainerScrollFrameButton"..i.."Icon"]:SetParent(_G["ClassTrainerScrollFrameButton"..i].Panel) _G["ClassTrainerScrollFrameButton"..i].selectedTex:SetTexture(1, 1, 1, 0.3) _G["ClassTrainerScrollFrameButton"..i].selectedTex:FillInner() - end; + end + STYLE:ApplyScrollFrameStyle(ClassTrainerScrollFrameScrollBar, 5) + for _,frame in pairs(ClassTrainerFrameList)do _G[frame]:Formula409() - end; + end + for _,texture in pairs(ClassTrainerTextureList)do _G[texture]:MUNG() - end; + end + _G["ClassTrainerTrainButton"]:Formula409() _G["ClassTrainerTrainButton"]:SetButtonTemplate() STYLE:ApplyDropdownStyle(ClassTrainerFrameFilterDropDown, 155) - ClassTrainerFrame:SetHeight(ClassTrainerFrame:GetHeight()+42) - ClassTrainerFrame:SetPanelTemplate("Halftone") ClassTrainerScrollFrame:SetFixedPanelTemplate("Inset") STYLE:ApplyCloseButtonStyle(ClassTrainerFrameCloseButton, ClassTrainerFrame) ClassTrainerFrameSkillStepButton.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -76,7 +82,7 @@ local function TrainerStyle() ClassTrainerStatusBar:SetPanelTemplate("Slot", true, 1, 2, 2) ClassTrainerStatusBar.rankText:ClearAllPoints() ClassTrainerStatusBar.rankText:SetPoint("CENTER", ClassTrainerStatusBar, "CENTER") -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua index f07a2f2..b0f778e 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua @@ -48,20 +48,23 @@ TRANSMOG STYLER ########################################################## ]]-- local function TransmogStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.transmogrify ~= true then return end; - TransmogrifyFrame:Formula409() - TransmogrifyFrame:SetPanelTemplate("Action") - TransmogrifyModelFrame:SetFrameLevel(TransmogrifyFrame:GetFrameLevel()+2) + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.transmogrify ~= true then return end + + STYLE:ApplyWindowHolder(TransmogrifyFrame, true) + for p, texture in pairs(TransmogFrameList)do _G[texture]:MUNG() - end; + end + select(2, TransmogrifyModelFrame:GetRegions()):MUNG() + TransmogrifyModelFrame:SetFixedPanelTemplate("Comic") TransmogrifyFrameButtonFrame:GetRegions():MUNG() TransmogrifyApplyButton:SetButtonTemplate() TransmogrifyApplyButton:Point("BOTTOMRIGHT", TransmogrifyFrame, "BOTTOMRIGHT", -4, 4) STYLE:ApplyCloseButtonStyle(TransmogrifyArtFrameCloseButton) TransmogrifyArtFrame:Formula409() + for p, a9 in pairs(TransmogSlotList)do local icon = _G["TransmogrifyFrame"..a9 .."SlotIconTexture"] local a9 = _G["TransmogrifyFrame"..a9 .."Slot"] @@ -75,7 +78,8 @@ local function TransmogStyle() icon:ClearAllPoints() icon:FillInner() end - end; + end + TransmogrifyConfirmationPopup:SetParent(UIParent) TransmogrifyConfirmationPopup:Formula409() TransmogrifyConfirmationPopup:SetPanelTemplate("Pattern") @@ -83,7 +87,7 @@ local function TransmogStyle() TransmogrifyConfirmationPopup.Button2:SetButtonTemplate() STYLE:ApplyItemButtonStyle(TransmogrifyConfirmationPopupItemFrame1, true) STYLE:ApplyItemButtonStyle(TransmogrifyConfirmationPopupItemFrame2, true) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua index 54b7cef..685151c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua @@ -37,16 +37,21 @@ VOIDSTORAGE STYLER local function VoidStorageStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.voidstorage ~= true then return - end; + end + + STYLE:ApplyWindowHolder(VoidStorageFrame, true) + for _,frame in pairs(VoidStorageList)do _G[frame]:Formula409() - end; + end + VoidStoragePurchaseFrame:SetFrameStrata('DIALOG') - VoidStorageFrame:SetPanelTemplate("Halftone") VoidStoragePurchaseFrame:SetFixedPanelTemplate("Button", true) VoidStorageFrameMarbleBg:MUNG() VoidStorageFrameLines:MUNG() + select(2, VoidStorageFrame:GetRegions()):MUNG() + VoidStoragePurchaseButton:SetButtonTemplate() VoidStorageHelpBoxButton:SetButtonTemplate() VoidStorageTransferButton:SetButtonTemplate() @@ -54,6 +59,7 @@ local function VoidStorageStyle() VoidItemSearchBox:SetPanelTemplate("Inset") VoidItemSearchBox.Panel:Point("TOPLEFT", 10, -1) VoidItemSearchBox.Panel:Point("BOTTOMRIGHT", 4, 1) + for e = 1, 9 do local f = _G["VoidStorageDepositButton"..e] local g = _G["VoidStorageWithdrawButton"..e] @@ -67,7 +73,8 @@ local function VoidStorageStyle() h:FillInner() i:SetTexCoord(0.1, 0.9, 0.1, 0.9) i:FillInner() - end; + end + for e = 1, 80 do local j = _G["VoidStorageStorageButton"..e] local k = _G["VoidStorageStorageButton"..e.."IconTexture"] @@ -76,7 +83,7 @@ local function VoidStorageStyle() k:SetTexCoord(0.1, 0.9, 0.1, 0.9) k:FillInner() end -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua index 89573dd..0fcc566 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua @@ -21,7 +21,7 @@ WORLDSTATE STYLER ########################################################## ]]-- local function WorldStateStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.bgscore ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.bgscore ~= true then return end WorldStateScoreScrollFrame:Formula409() WorldStateScoreFrame:Formula409() WorldStateScoreFrame:SetPanelTemplate("Halftone") @@ -32,7 +32,7 @@ local function WorldStateStyle() for b = 1, 3 do STYLE:ApplyTabStyle(_G["WorldStateScoreFrameTab"..b]) end -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua index 0646e07..12725f4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua @@ -37,6 +37,7 @@ GET ADDON DATA ]]-- local SuperVillain, L = unpack(SVUI); local STYLE = _G.StyleVillain; +local NewHook = hooksecurefunc; --[[ ########################################################## /$$$$$$$$/$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$$$ @@ -49,6 +50,14 @@ local STYLE = _G.StyleVillain; |__/ |__/ |__/|__/ |__/|__/ |__/|________/ ########################################################## ]]-- +local levelDiff = 2 + +local _hook_WindowLevel = function(self, level) + local adjustment = level - levelDiff; + if(adjustment < 0) then adjustment = 0 end + self.Panel:SetFrameLevel(adjustment) +end + function STYLE:ApplyFrameStyle(this, template, noStripping, fullStripping) if(not this or (this and this.Panel)) then return end if not noStripping then this:Formula409(fullStripping) end @@ -62,6 +71,20 @@ function STYLE:ApplyUnderlayStyle(this, template, noStripping, fullStripping) template = template or "Transparent" this:SetFixedPanelTemplate(template) end + +function STYLE:ApplyWindowHolder(this, action, fullStrip) + if(not this or (this and this.Panel)) then return end + local template = action and "Action" or "Halftone" + local baselevel = this:GetFrameLevel() + if(baselevel < 1) then + this:SetFrameLevel(1) + end + + this:Formula409(fullStrip) + this:SetPanelTemplate(template) + + -- print(this:GetName() .. ": " .. tostring(baselevel) .. " >> " .. adjustment) +end --[[ ########################################################## /$$$$$$$ /$$ /$$ /$$$$$$$$/$$$$$$$$/$$$$$$ /$$ /$$ @@ -110,7 +133,7 @@ end --[[ ITEM BUTTON ]]-- -function STYLE:ApplyItemButtonStyle(frame, adjust, shrink) +function STYLE:ApplyItemButtonStyle(frame, adjust, shrink, noScript) if(not frame or (frame and frame.StyleHooked)) then return end local link = frame:GetName() @@ -127,11 +150,12 @@ function STYLE:ApplyItemButtonStyle(frame, adjust, shrink) if(link) then local nameObject = _G[("%sName"):format(link)] + local subNameObject = _G[("%sSubName"):format(link)] + local arrowObject = _G[("%sFlyoutArrow"):format(link)] + local levelObject = _G[("%sLevel"):format(link)] local iconObject = _G[("%sIcon"):format(link)] or _G[("%sIconTexture"):format(link)] local countObject = _G[("%sCount"):format(link)] - if(nameObject) then nameObject:SetParent(frame.Panel) end - if(iconObject and not frame.IconShadow) then iconObject:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -143,25 +167,39 @@ function STYLE:ApplyItemButtonStyle(frame, adjust, shrink) frame.IconShadow:WrapOuter(iconObject) frame.IconShadow:SetBasicPanel(0,0,0,0,true) - iconObject:SetParent(frame.IconShadow) + --iconObject:SetParent(frame.IconShadow) end - if(countObject and not frame.CountRaised) then + if(not frame.Riser) then local fg = CreateFrame("Frame", nil, frame) fg:SetSize(120, 22) fg:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", 0, -11) - fg:SetFrameLevel(frame:GetFrameLevel() + 30) + fg:SetFrameLevel(frame:GetFrameLevel() + 1) + frame.Riser = fg + end - countObject:SetParent(fg) - countObject:SetAllPoints(fg) + if(countObject) then + countObject:SetParent(frame.Riser) + countObject:SetAllPoints(frame.Riser) countObject:SetFont(SuperVillain.Shared:Fetch("font", SuperVillain.db.media.fonts.number), SuperVillain.db.media.fonts.size, "OUTLINE") countObject:SetDrawLayer("ARTWORK", 7) + end - frame.CountRaised = true - end + if(nameObject) then nameObject:SetParent(frame.Riser) end + if(subNameObject) then subNameObject:SetParent(frame.Riser) end + if(arrowObject) then arrowObject:SetParent(frame.Riser) end + + if(levelObject) then + levelObject:SetParent(frame.Riser) + levelObject:SetFont(SuperVillain.Shared:Fetch("font", SuperVillain.db.media.fonts.number), SuperVillain.db.media.fonts.size, "OUTLINE") + levelObject:SetDrawLayer("ARTWORK", 7) + end + + if(not noScript) then + frame:HookScript("OnEnter", Button_OnEnter) + frame:HookScript("OnLeave", Button_OnLeave) + end end - frame:HookScript("OnEnter", Button_OnEnter) - frame:HookScript("OnLeave", Button_OnLeave) frame.StyleHooked = true end @@ -180,6 +218,7 @@ end function STYLE:ApplyScrollFrameStyle(this, scale) if(not this or (this and this.StyleHooked)) then return end + scale = scale or 5 local scrollName = this:GetName() local bg, track, top, bottom, mid, upButton, downButton @@ -235,28 +274,28 @@ function STYLE:ApplyScrollFrameStyle(this, scale) end function STYLE:ApplyScrollBarStyle(this) - if(not this or (this and this.StyleHooked) or (this and not this.GetOrientation)) then return end - - this:Formula409() - this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") + if(not this or (this and not this.GetOrientation)) then return end if(this:GetOrientation() == "VERTICAL") then - this:Width(12) + this:SetWidth(12) else - this:Height(12) + this:SetHeight(12) for i=1, this:GetNumRegions() do local child = select(i, this:GetRegions()) if(child and child:GetObjectType() == "FontString") then local anchor, parent, relative, x, y = child:GetPoint() if relative:find("BOTTOM") then - child:Point(anchor, parent, relative, x, y - 4) + child:SetPoint(anchor, parent, relative, x, y - 4) end end end end - this:SetBasicPanel() + this:Formula409() + this:SetBackdrop(nil) + this:SetFixedPanelTemplate("Component") this.Panel:SetBackdropBorderColor(0.2,0.2,0.2) + this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") this.StyleHooked = true end @@ -434,7 +473,7 @@ end |_______/ \______/ |__/ \__/|__/ \__/ ########################################################## --]] -local DropDownButton_SetPoint = function(self, _, _, _, _, _, breaker) +local _hook_DropDownButton_SetPoint = function(self, _, _, _, _, _, breaker) if not breaker then self:Point("RIGHT", self.AnchorParent, "RIGHT", -10, 3, true) end @@ -461,7 +500,7 @@ function STYLE:ApplyDropdownStyle(this, width) ddButton:Point("RIGHT", this, "RIGHT", -10, 3) ddButton.AnchorParent = this - hooksecurefunc(ddButton, "SetPoint", DropDownButton_SetPoint) + NewHook(ddButton, "SetPoint", _hook_DropDownButton_SetPoint) STYLE:ApplyPaginationStyle(ddButton, true) diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua index cf69147..63fa980 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.lua @@ -82,6 +82,7 @@ function SVUI_TrackingDoodad_OnLoad() frame.Range:SetTextColor(1, 1, 1, 0.75) SuperVillain.Animate:Orbit(frame.Radar, 8, true) frame:RegisterForDrag("LeftButton"); + frame:Hide() end do @@ -559,23 +560,27 @@ local Tracker_OnUpdate = function(self, elapsed) local _SPINNER = self.Radar local _TEXT = self.Range local _BG = self.BG - if not angle then + if not angle then + self.throttle = 4 _ARROW:SetAlpha(0) + _SPINNER:SetVertexColor(0.8,0.1,0.1,0.15) + _BG:SetVertexColor(1,0,0,0.15) else + self.throttle = 0.02 local out = floor(tonumber(distance)) ArrowSpin(_ARROW, angle) if(out > 100) then - _ARROW:SetVertexColor(1,0.1,0.1) - _SPINNER:SetVertexColor(0.8,0.1,0.1,0.5) - _BG:SetVertexColor(0.8,0.4,0.1,0.5) + _ARROW:SetVertexColor(1,0.1,0.1,0.4) + _SPINNER:SetVertexColor(0.8,0.1,0.1,0.25) + _BG:SetVertexColor(0.8,0.4,0.1,0.25) elseif(out > 40) then - _ARROW:SetVertexColor(1,0.8,0.1) + _ARROW:SetVertexColor(1,0.8,0.1,0.6) _SPINNER:SetVertexColor(0.8,0.8,0.1,0.5) _BG:SetVertexColor(0.4,0.8,0.1,0.5) elseif(out > 5) then - _ARROW:SetVertexColor(0.1,1,0.8) - _SPINNER:SetVertexColor(0.1,0.8,0.8,0.5) - _BG:SetVertexColor(0.1,0.8,0.1,0.5) + _ARROW:SetVertexColor(0.1,1,0.8,0.9) + _SPINNER:SetVertexColor(0.1,0.8,0.8,0.75) + _BG:SetVertexColor(0.1,0.8,0.1,0.75) end _ARROW:SetAlpha(1) _TEXT:SetText(out) @@ -584,11 +589,44 @@ local Tracker_OnUpdate = function(self, elapsed) self:Hide() end self.elapsed = 0 - self.throttle = 0.02 else self.elapsed = (self.elapsed or 0) + elapsed end end + +function SuperVillain.SVUnit:CreateGPS(frame, small) + if not frame then return end + local size = 32 + local gps = CreateFrame("Frame", nil, frame.InfoPanel) + gps:SetFrameLevel(99) + gps:Size(size, size) + gps.DefaultSize = size + if(small) then + gps.onMouseOver = true + gps.OnlyProximity = false + gps:Point("RIGHT", frame, "RIGHT", 0, 0) + else + gps.onMouseOver = false + gps.OnlyProximity = false + gps:Point("BOTTOMLEFT", frame.Health, "BOTTOMLEFT", 0, 0) + gps.Text = gps:CreateFontString(nil, "OVERLAY") + gps.Text:SetAllPoints(frame.InfoPanel) + + gps.Text:SetFont(SuperVillain.Media.font.roboto, 10) + gps.Text:SetJustifyH("CENTER") + gps.Text:SetJustifyV("MIDDLE") + gps.Text:SetTextColor(1, 1, 1, 0.5) + end + + gps.Arrow = gps:CreateTexture(nil, "OVERLAY", nil, 7) + gps.Arrow:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\GPS-ARROW]]) + gps.Arrow:Size(size, size) + gps.Arrow:SetPoint("CENTER", gps, "CENTER", 0, 0) + gps.Arrow:SetVertexColor(0.1, 0.8, 0.8) + gps.Arrow:SetBlendMode("ADD") + + return gps +end --[[ ########################################################## CORE @@ -629,26 +667,27 @@ local function LoadOptions() end function PLUGIN:Load() - if(not SuperVillain.db[SCHEMA].enable) then return end + if(not SuperVillain.db[SCHEMA].enable) then print(SCHEMA) return end - local _TRACKER = _G.SVUI_TrackingDoodad - local _TARGET = _G.SVUI_Target + local _TRACKER = SVUI_TrackingDoodad + local _TARGET = SVUI_Target - if(_TRACKER and _TARGET) then + if(_TRACKER) then self.db = SuperVillain.db[SCHEMA] - _TRACKER.Unit = SVUI_Target.unit _TRACKER:SetParent(SVUI_Target) _TRACKER:SetScript("OnUpdate", Tracker_OnUpdate) self:RegisterEvent("PLAYER_TARGET_CHANGED") - _TRACKER:Hide() + LoadOptions() + end + if(_TARGET) then _TARGET:HookScript("OnShow", TargetFrame_OnChange) - - LoadOptions() end + + self:InitializeGPS() end CONFIGS[SCHEMA] = { diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc index 8055941..7d0a94a 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.toc @@ -4,6 +4,7 @@ ## Title: |cffFF9900SVUI |r|cffFFEF00Tracking Device|r ## Notes: Supervillain UI [|cff9911FFRaid & Party Member Tracking|r]. ## RequiredDeps: SVUI +## X-oUF: oUF_SuperVillain ## X-SVUI: SVTracker SVUI_TrackingDevice.xml diff --git a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.xml b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.xml index b25cf77..086497f 100644 --- a/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.xml +++ b/Interface/AddOns/SVUI_TrackingDevice/SVUI_TrackingDevice.xml @@ -1,5 +1,6 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Script file='SVUI_TrackingDevice.lua'/> + <Script file='libs\oUF_GPS\oUF_GPS.lua'/> <Frame name="SVUI_TrackingDoodad" movable="true" frameStrata="DIALOG"> <Size x="75" y="75"/> diff --git a/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua b/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua new file mode 100644 index 0000000..8f65607 --- /dev/null +++ b/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.lua @@ -0,0 +1,139 @@ +local SuperVillain, L = unpack(SVUI); +local PLUGIN = _G.TrackingVillain; + +local cos, sin, sqrt2, max, atan2, floor = math.cos, math.sin, math.sqrt(2), math.max, math.atan2, math.floor; +local tinsert, tremove, tsort, twipe = table.insert, table.remove, table.sort, table.wipe; +local playerGUID = UnitGUID("player") +local _FRAMES, _PROXIMITY, OnUpdateFrame = {}, {} +local GPSMonitorFrame; + +local function _calc(radius) + return 0.5 + cos(radius) / sqrt2, 0.5 + sin(radius) / sqrt2; +end + +local function spin(texture, angle) + local LRx, LRy = _calc(angle + 0.785398163); + local LLx, LLy = _calc(angle + 2.35619449); + local ULx, ULy = _calc(angle + 3.92699082); + local URx, URy = _calc(angle - 0.785398163); + + texture:SetTexCoord(ULx, ULy, LLx, LLy, URx, URy, LRx, LRy); +end + +local sortFunc = function(a,b) return a[1] < b[1] end + +local minThrottle = 0.02 +local numArrows, inRange, unit, angle, GPS, distance +local Update = function(self, elapsed) + if self.elapsed and self.elapsed > (self.throttle or minThrottle) then + numArrows = 0 + twipe(_PROXIMITY) + for _, object in next, _FRAMES do + if(object:IsShown()) then + GPS = object.GPS + unit = object.unit + if(unit) then + if(GPS.PreUpdate) then GPS:PreUpdate(frame) end + + if unit and GPS.outOfRange then + inRange = UnitInRange(unit) + end + + local available = (GPS.OnlyProximity == false and GPS.onMouseOver == false) + + if(not unit or not (UnitInParty(unit) or UnitInRaid(unit)) or UnitIsUnit(unit, "player") or not UnitIsConnected(unit) or (not GPS.OnlyProximity and ((GPS.onMouseOver and (GetMouseFocus() ~= object)) or (GPS.outOfRange and inRange)))) then + GPS:Hide() + else + distance, angle = SuperVillain:PositionFromPlayer(unit, available) + if not angle then + GPS:Hide() + else + if(GPS.OnlyProximity == false) then + GPS:Show() + else + GPS:Hide() + end + + if GPS.Arrow then + if(distance > 40) then + GPS.Arrow:SetVertexColor(1,0.1,0.1) + else + if(distance > 30) then + GPS.Arrow:SetVertexColor(0.4,0.8,0.1) + else + GPS.Arrow:SetVertexColor(0.1,1,0.1) + end + if(GPS.OnlyProximity and object.Health.percent and object.Health.percent < 80) then + local value = object.Health.percent + distance + _PROXIMITY[#_PROXIMITY + 1] = {value, GPS} + end + end + spin(GPS.Arrow, angle) + end + + if GPS.Text then + GPS.Text:SetText(floor(distance)) + end + + if(GPS.PostUpdate) then GPS:PostUpdate(frame, distance, angle) end + numArrows = numArrows + 1 + end + end + else + GPS:Hide() + end + end + end + + if(_PROXIMITY[1]) then + tsort(_PROXIMITY, sortFunc) + if(_PROXIMITY[1][2]) then + _PROXIMITY[1][2]:Show() + end + end + + self.elapsed = 0 + self.throttle = max(minThrottle, 0.005 * numArrows) + else + self.elapsed = (self.elapsed or 0) + elapsed + end +end + +local Enable = function(self) + local GPS = self.GPS + if GPS then + tinsert(_FRAMES, self) + + if not OnUpdateFrame then + OnUpdateFrame = CreateFrame("Frame") + OnUpdateFrame:SetScript("OnUpdate", Update) + end + + OnUpdateFrame:Show() + return true + end +end + +local Disable = function(self) + local GPS = self.GPS + if GPS then + for k, frame in next, _FRAMES do + if(frame == self) then + tremove(_FRAMES, k) + GPS:Hide() + break + end + end + + if #_FRAMES == 0 and OnUpdateFrame then + OnUpdateFrame:Hide() + end + end +end + +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 diff --git a/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.toc b/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.toc new file mode 100644 index 0000000..cdca787 --- /dev/null +++ b/Interface/AddOns/SVUI_TrackingDevice/libs/oUF_GPS/oUF_GPS.toc @@ -0,0 +1,9 @@ +## Interface: 50001 +## Title: oUF GPS +## Notes: Adds GPS arrow to frames. +## Author: Omega1970, Munglunch +## Version: 1.00 +## X-Category: oUF +## Dependencies: oUF + +oUF_GPS.lua \ No newline at end of file