diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua index 8dd3b48..d00ca9e 100644 --- a/Interface/AddOns/SVUI/SVUI.lua +++ b/Interface/AddOns/SVUI/SVUI.lua @@ -430,22 +430,6 @@ do end end - local Registry_PreLoad = function(self) - if not PackageQueue then return end - for i=1,#PackageQueue do - local name = PackageQueue[i] - local obj = self.__owner[name] - if(obj and obj.PriorityLoad and (not obj.initialized)) then - if self.__owner.db[name] then - obj.db = self.__owner.db[name] - end - obj:PriorityLoad() - obj.PriorityLoad = nil - obj.initialized = true; - end - end - end - local Registry_Load = function(self) if not PackageQueue then return end for i=1,#PackageQueue do @@ -456,8 +440,16 @@ do obj.db = self.__owner.db[name] end if obj.Load then - obj:Load() - obj.Load = nil + local halt = false + if(obj.db.incompatible) then + for addon,_ in pairs(obj.db.incompatible) do + if IsAddOnLoaded(addon) then halt = true end + end + end + if(not halt) then + obj:Load() + obj.Load = nil + end end obj.initialized = true; end @@ -549,7 +541,6 @@ do RunCallbacks = Registry_RunCallbacks, Update = Registry_Update, UpdateAll = Registry_UpdateAll, - PreLoadPackages = Registry_PreLoad, LoadPackages = Registry_Load, } } diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index 8a1a701..6956c4f 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 50400 ## Author: Munglunch -## Version: 4.081 +## Version: 4.082 ## Title: |cffFF9900SVUI|r ## Notes: Supervillain UI [|cff9911FFCore Framework|r]. ## SavedVariables: SVUI_Global diff --git a/Interface/AddOns/SVUI/SVUI.xml b/Interface/AddOns/SVUI/SVUI.xml index 49f90af..a162118 100644 --- a/Interface/AddOns/SVUI/SVUI.xml +++ b/Interface/AddOns/SVUI/SVUI.xml @@ -149,7 +149,7 @@ <Script file="scripts\misc.lua"/> <Script file="scripts\mounts.lua"/> <Script file="scripts\comix.lua"/> - <!-- <Script file="scripts\questwatch.lua"/> --> + <Script file="scripts\questwatch.lua"/> <Script file="scripts\raid.lua"/> <Script file="scripts\reactions.lua"/> <Script file="scripts\spellbind.lua"/> diff --git a/Interface/AddOns/SVUI/assets/artwork/Doodads/GENERIC-ARROW.blp b/Interface/AddOns/SVUI/assets/artwork/Doodads/GENERIC-ARROW.blp new file mode 100644 index 0000000..327b5a3 Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Doodads/GENERIC-ARROW.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ARROW.blp b/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ARROW.blp index 327b5a3..9fb0a32 100644 Binary files a/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ARROW.blp and b/Interface/AddOns/SVUI/assets/artwork/Doodads/GPS-ARROW.blp differ diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua b/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua index fec95e5..99d819b 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua @@ -1,11 +1,11 @@ ---[[ - Original codebase: - oUF_Castbar by starlon. - http://svn.wowace.com/wowace/trunk/oUF_Castbar/ ---]] +--[[ Element: Cast Bar + + THIS FILE HEAVILY MODIFIED FOR USE WITH SUPERVILLAIN UI + +]] local parent, ns = ... local oUF = ns.oUF - +local SuperVillain = SVUI[1] local updateSafeZone = function(self) local sz = self.SafeZone local width = self:GetWidth() @@ -32,7 +32,7 @@ local UNIT_SPELLCAST_START = function(self, event, unit, spell) if(self.unit ~= unit) or not unit then return end local castbar = self.Castbar - local name, _, text, texture, startTime, endTime, _, castid, interrupt = UnitCastingInfo(unit) + local name, _, text, texture, startTime, endTime, tradeskill, castid, interrupt = UnitCastingInfo(unit) if(not name) then castbar:Hide() return @@ -40,10 +40,32 @@ local UNIT_SPELLCAST_START = function(self, event, unit, spell) endTime = endTime / 1e3 startTime = startTime / 1e3 - local max = endTime - startTime + local repeatCount = GetTradeskillRepeatCount() or 1 + local start = GetTime() - startTime + + if(tradeskill) then + if(castbar.previous ~= name) then + castbar.recipecount = 1 + castbar.maxrecipe = GetTradeskillRepeatCount() + castbar.duration = start + else + castbar.recipecount = castbar.recipecount or 1 + castbar.maxrecipe = castbar.maxrecipe or repeatCount + castbar.duration = castbar.duration or start + end + else + castbar.recipecount = nil + castbar.maxrecipe = 1 + castbar.duration = start + end + + castbar.previous = name + castbar.tradeskill = tradeskill castbar.castid = castid - castbar.duration = GetTime() - startTime + + local max = (endTime - startTime) * castbar.maxrecipe + castbar.max = max castbar.delay = 0 castbar.casting = true @@ -76,7 +98,8 @@ local UNIT_SPELLCAST_START = function(self, event, unit, spell) castbar:PostCastStart(unit, name, castid) end - castbar:Show() + --castbar:Show() + SuperVillain:SecureFadeIn(castbar, 0.5, 0.5, 1) end local UNIT_SPELLCAST_FAILED = function(self, event, unit, spellname, _, castid) @@ -85,7 +108,11 @@ local UNIT_SPELLCAST_FAILED = function(self, event, unit, spellname, _, castid) local castbar = self.Castbar if (castbar.castid ~= castid) then return end + castbar.previous = nil castbar.casting = nil + castbar.tradeskill = nil + castbar.recipecount = nil + castbar.maxrecipe = nil castbar.interrupt = nil castbar:SetValue(0) castbar:Hide() @@ -101,7 +128,11 @@ local UNIT_SPELLCAST_INTERRUPTED = function(self, event, unit, spellname, _, cas local castbar = self.Castbar if (castbar.castid ~= castid) then return end + castbar.previous = nil castbar.casting = nil + castbar.tradeskill = nil + castbar.recipecount = nil + castbar.maxrecipe = nil castbar.channeling = nil castbar:SetValue(0) @@ -149,7 +180,7 @@ local UNIT_SPELLCAST_DELAYED = function(self, event, unit, spellname, _, castid) local duration = GetTime() - (startTime / 1000) if(duration < 0) then duration = 0 end - + castbar.previous = name castbar.delay = castbar.delay + castbar.duration - duration castbar.duration = duration @@ -162,14 +193,22 @@ end local UNIT_SPELLCAST_STOP = function(self, event, unit, spellname, _, castid) if (self.unit ~= unit) or not unit then return end - local castbar = self.Castbar if (castbar.castid ~= castid) then return end - castbar.casting = nil - castbar.interrupt = nil - castbar:SetValue(0) - castbar:Hide() + if(castbar.tradeskill and castbar.recipecount and castbar.recipecount >= 0) then + castbar.recipecount = castbar.recipecount + 1 + else + castbar.previous = nil + castbar.casting = nil + castbar.interrupt = nil + castbar.tradeskill = nil + castbar.recipecount = nil + castbar.maxrecipe = nil + castbar:SetValue(0) + end + + SuperVillain:SecureFadeOut(castbar, 4, 1, 0, true) if(castbar.PostCastStop) then return castbar:PostCastStop(unit, spellname, castid) @@ -188,6 +227,7 @@ local UNIT_SPELLCAST_CHANNEL_START = function(self, event, unit, spellname) local max = (endTime - startTime) local duration = endTime - GetTime() + castbar.previous = name castbar.duration = duration castbar.max = max castbar.delay = 0 @@ -201,6 +241,9 @@ local UNIT_SPELLCAST_CHANNEL_START = function(self, event, unit, spellname) -- executed or be fully completed by the OnUpdate handler before CHANNEL_START -- is called. castbar.casting = nil + castbar.tradeskill = nil + castbar.recipecount = nil + castbar.maxrecipe = nil castbar.castid = nil castbar:SetMinMaxValues(0, max) @@ -227,7 +270,8 @@ local UNIT_SPELLCAST_CHANNEL_START = function(self, event, unit, spellname) end if(castbar.PostChannelStart) then castbar:PostChannelStart(unit, name) end - castbar:Show() + --castbar:Show() + SuperVillain:SecureFadeIn(castbar, 0.2, 0, 1) end local UNIT_SPELLCAST_CHANNEL_UPDATE = function(self, event, unit, spellname) @@ -239,6 +283,7 @@ local UNIT_SPELLCAST_CHANNEL_UPDATE = function(self, event, unit, spellname) return end + castbar.previous = name local duration = (endTime / 1000) - GetTime() local startDelay = castbar.startTime - startTime / 1000 castbar.startTime = startTime / 1000 @@ -281,6 +326,8 @@ local UpdateCastingTimeInfo = function(self, duration) else self.Time:SetFormattedText("%.1f|cffff0000-%.1f|r", duration, self.delay) end + elseif(self.recipecount and self.recipecount > 0) then + self.Time:SetText(self.recipecount .. "/" .. self.maxrecipe) else if(self.CustomTimeText) then self:CustomTimeText(duration) @@ -299,7 +346,11 @@ local onUpdate = function(self, elapsed) if not (self.casting or self.channeling) then self.unitName = nil + self.previous = nil self.casting = nil + self.tradeskill = nil + self.recipecount = nil + self.maxrecipe = nil self.castid = nil self.channeling = nil @@ -310,9 +361,12 @@ local onUpdate = function(self, elapsed) if(self.casting) then local duration = self.duration + self.lastUpdate - if(duration >= self.max) then + self.previous = nil self.casting = nil + self.tradeskill = nil + self.recipecount = nil + self.maxrecipe = nil self:Hide() if(self.PostCastStop) then self:PostCastStop(self.__owner.unit) end @@ -371,6 +425,7 @@ local Enable = function(object, unit) object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_START", UNIT_SPELLCAST_CHANNEL_START) object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE", UNIT_SPELLCAST_CHANNEL_UPDATE) object:RegisterEvent("UNIT_SPELLCAST_CHANNEL_STOP", UNIT_SPELLCAST_CHANNEL_STOP) + --object:RegisterEvent("UPDATE_TRADESKILL_RECAST", UPDATE_TRADESKILL_RECAST) end castbar:SetScript("OnUpdate", castbar.OnUpdate or onUpdate) @@ -425,6 +480,7 @@ local Disable = function(object, unit) object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_START", UNIT_SPELLCAST_CHANNEL_START) object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_UPDATE", UNIT_SPELLCAST_CHANNEL_UPDATE) object:UnregisterEvent("UNIT_SPELLCAST_CHANNEL_STOP", UNIT_SPELLCAST_CHANNEL_STOP) + --object:UnregisterEvent("UPDATE_TRADESKILL_RECAST", UPDATE_TRADESKILL_RECAST) castbar:SetScript("OnUpdate", nil) end diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua index b885e78..ecec3b5 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua @@ -16,6 +16,8 @@ local Update = function(self, event, unit) local min, max = UnitHealth(unit), UnitHealthMax(unit) local disconnected = not UnitIsConnected(unit) + local invisible = ((min == max) or UnitIsDeadOrGhost(unit) or disconnected) + if health.fillInverted then health:SetReverseFill(true) end @@ -24,10 +26,14 @@ local Update = function(self, event, unit) if(disconnected) then health:SetValue(max) + health.percent = 100 else health:SetValue(min) + health.percent = (min / max) * 100 end + health.percent = invisible and 100 or ((min / max) * 100) + health.disconnected = disconnected if health.frequentUpdates ~= health.__frequentUpdates then @@ -91,6 +97,10 @@ local Update = function(self, event, unit) if(db and db.gridMode) then health:SetOrientation("VERTICAL") end + + if(health.PostUpdate) then + return health.PostUpdate(self, health.percent) + end end local CustomUpdate = function(self, event, unit) @@ -108,6 +118,8 @@ local CustomUpdate = function(self, event, unit) health:SetMinMaxValues(-max, 0) health:SetValue(-min) + + health.percent = invisible and 100 or ((min / max) * 100) health.disconnected = disconnected @@ -161,6 +173,10 @@ local CustomUpdate = function(self, event, unit) local current = random(1,max) health:SetValue(-current) end + + if(health.PostUpdate) then + return health.PostUpdate(self, health.percent) + end end local Path = function(self, ...) diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Friendship/oUF_Friendship.lua b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Friendship/oUF_Friendship.lua index dcd571f..f37e03f 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Friendship/oUF_Friendship.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Friendship/oUF_Friendship.lua @@ -24,7 +24,7 @@ local friendships = { [GetFactionInfoByID(1281)] = 1281, [GetFactionInfoByID(1282)] = 1282, [GetFactionInfoByID(1283)] = 1283, - --[GetFactionInfoByID(1357)] = 1357, + [GetFactionInfoByID(1357)] = 1357, [GetFactionInfoByID(1358)] = 1358, } 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 index 4ae34f1..32a46e5 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_GPS/oUF_GPS.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_GPS/oUF_GPS.lua @@ -3,115 +3,130 @@ 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 = table.insert, table.remove; -local _FRAME, _GPS, _TRACKER, _SWITCH, _ARROW, _SPINNER, _TEXT, _HANDLER; -local spin, unit; -local SuperVillain; - -do - local function _calc(radius) - return 0.5 + cos(radius) / sqrt2, 0.5 + sin(radius) / sqrt2; - end +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; - 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 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 0.02) then - unit = _FRAME.unit - if((UnitInParty(unit) or UnitInRaid(unit)) and not UnitIsUnit(unit, "player")) then - _SWITCH.Trackable = true - else - _SWITCH.Trackable = false - end - if(_SWITCH.Trackable) then - if(_TRACKER:IsShown()) then - _SWITCH:Hide() - if(not SuperVillain) then SuperVillain = SVUI[1] end - local distance, angle = SuperVillain:Triangulate("player", unit, true) - if((not distance) or (not angle)) then - _TRACKER:Hide() - _SWITCH:Show() - else - local out = floor(tonumber(distance)) - spin(_ARROW, angle) - if(out > 100) then - _ARROW:SetVertexColor(1,0.1,0.1) - _SPINNER:SetVertexColor(0.8,0.1,0.1,0.5) - elseif(out > 40) then - _ARROW:SetVertexColor(1,0.8,0.1) - _SPINNER:SetVertexColor(0.8,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) - else - _TRACKER:Hide() - _SWITCH:Show() + 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 - _TEXT:SetText(out) + + 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) + elseif(distance > 30) then + GPS.Arrow:SetVertexColor(0.4,0.8,0.1) + else + GPS.Arrow:SetVertexColor(0.1,1,0.1) + end + spin(GPS.Arrow, angle) + end + + if GPS.Text then + GPS.Text:SetText(floor(distance)) + 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 + + if(GPS.PostUpdate) then GPS:PostUpdate(frame, distance, angle) end + numArrows = numArrows + 1 + end + end + else + GPS:Hide() end - end - else - _TRACKER:Hide() - _SWITCH:Show() + end end + + tsort(_PROXIMITY, sortFunc) + if(_PROXIMITY[1] and _PROXIMITY[1][2]) then + _PROXIMITY[1][2]:Show() + end + self.elapsed = 0 - self.throttle = 0.02 + self.throttle = max(minThrottle, 0.005 * numArrows) else self.elapsed = (self.elapsed or 0) + elapsed end end -local function Path(self, ...) - return (self.GPS.Override or Update) (self, ...) -end - -local function ForceUpdate(element) - return Path(element.__owner, 'ForceUpdate') -end - local Enable = function(self) - if(self.GPS) then - _FRAME = self - _GPS = self.GPS - _TRACKER = self.GPS.Tracker - _SWITCH = self.GPS.Switch - _ARROW = self.GPS.Tracker.Arrow - _SPINNER = self.GPS.Tracker.Spinner - _TEXT = self.GPS.Tracker.Text - _GPS.__owner = self - _GPS.ForceUpdate = ForceUpdate - - --self:RegisterEvent('PLAYER_TARGET_CHANGED', Path) - - if not _HANDLER then - _HANDLER = CreateFrame("Frame") - _HANDLER:SetScript("OnUpdate", Update) + local GPS = self.GPS + if GPS then + tinsert(_FRAMES, self) + + if not OnUpdateFrame then + OnUpdateFrame = CreateFrame("Frame") + OnUpdateFrame:SetScript("OnUpdate", Update) end - _GPS:Show() + + OnUpdateFrame:Show() return true end end local Disable = function(self) - if self.GPS then - self.GPS.LoopEnabled = nil - self.GPS:Hide() - --self:UnregisterEvent('PLAYER_TARGET_CHANGED', Path) - _FRAME = nil - _GPS = nil - _TRACKER = nil - _SWITCH = nil - _ARROW = nil - _SPINNER = nil - _TEXT = nil + 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 diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_HyperCombo/oUF_HyperCombo.lua b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_HyperCombo/oUF_HyperCombo.lua index f7a0bb8..696ed53 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_HyperCombo/oUF_HyperCombo.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_HyperCombo/oUF_HyperCombo.lua @@ -10,7 +10,7 @@ local GUILE1 = GetSpellInfo(84745) local GUILE2 = GetSpellInfo(84746) local GUILE3 = GetSpellInfo(84747) local ANTICIPATION = GetSpellInfo(115189) - +local ALERTED = false local TextColors = { [1]={1,0.1,0.1}, [2]={1,0.5,0.1}, @@ -32,6 +32,16 @@ local function UpdateGuile() end end +local function FivePointsAlarm(frame, points) + if not CombatText_AddMessage then return end + if(points == 5 and not frame.ALERTED) then + CombatText_AddMessage("5 Points", CombatText_StandardScroll, 0.1, 0.5, 1, "crit") + frame.ALERTED = true + elseif(frame.ALERTED and points < 5) then + frame.ALERTED = false + end +end + local Update = function(self, event, unit) if(unit == 'pet') then return end local bar = self.HyperCombo; @@ -70,6 +80,7 @@ local Update = function(self, event, unit) if(current > 0) then tracker.Text:SetText(current) tracker.Text:SetTextColor(unpack(TextColors[current])) + FivePointsAlarm(tracker, current) elseif(bar.LAST_COMBO_POINTS > 0) then tracker.Text:SetText(bar.LAST_COMBO_POINTS) tracker.Text:SetTextColor(0.5,0.5,1) @@ -105,6 +116,7 @@ local Update = function(self, event, unit) if(current > 0) then tracker.Text:SetText(current) tracker.Text:SetTextColor(unpack(TextColors[current])) + FivePointsAlarm(tracker, current) elseif(bar.LAST_COMBO_POINTS > 0) then tracker.Text:SetText(bar.LAST_COMBO_POINTS) tracker.Text:SetTextColor(0.5,0.5,1) diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_TotemBars/oUF_TotemBars.lua b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_TotemBars/oUF_TotemBars.lua index 948541b..ccf7d29 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_TotemBars/oUF_TotemBars.lua +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_TotemBars/oUF_TotemBars.lua @@ -11,55 +11,52 @@ oUF.colors.totems = { [AIR_TOTEM_SLOT] = { 132/255, 056/255, 231/255 } } -local total = 0 -local delay = 0.01 -local GetTotemInfo, SetValue, GetTime = GetTotemInfo, SetValue, GetTime -local haveTotem, name, startTime, duration, totemIcon +local GetTotemInfo, GetTime = GetTotemInfo, GetTime local priorities = SHAMAN_TOTEM_PRIORITIES or STANDARD_TOTEM_PRIORITIES + +local Totem_OnEnter = function(self) + if(not self:IsVisible()) then return end + GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMRIGHT') + GameTooltip:SetTotem(self:GetID()) +end + +local Totem_OnLeave = function() + GameTooltip:Hide() +end local Totem_OnUpdate = function(self, elapsed) - total = total + elapsed - if total >= delay then - total = 0 - haveTotem, name, startTime, duration, totemIcon = GetTotemInfo(self.ID) - if ((GetTime() - startTime) == 0) or (duration == 0) then - self:SetValue(0) + if not self.expirationTime then return end + self.elapsed = (self.elapsed or 0) + elapsed + if self.elapsed >= 0.5 then + local timeLeft = self.expirationTime - GetTime() + if timeLeft > 0 then + self:SetValue(timeLeft) else - self:SetValue(1 - ((GetTime() - startTime) / duration)) + self:SetScript("OnUpdate", nil) end end end -local UpdateTotem = function(self, slot) - local totems = self.TotemBars - if(slot > MAX_TOTEMS or not priorities[slot]) then return end - local totem = totems[priorities[slot]] - if not totem then return end - - haveTotem, name, startTime, duration, totemIcon = GetTotemInfo(slot) - totem:SetValue(0) - totem.ID = slot - - if(haveTotem) then - if(duration > 0) then - totem:SetValue(1 - ((GetTime() - startTime) / duration)) - totem:SetScript("OnUpdate", Totem_OnUpdate) - else - totem:SetScript("OnUpdate",nil) - totem:SetValue(0) - end - else - totem:SetValue(0) - end -end - local Update = function(self, event) local totems = self.TotemBars - if(totems.PreUpdate) then totems:PreUpdate() end - + local haveTotem, name, start, duration, icon, timeLeft for i = 1, MAX_TOTEMS do - UpdateTotem(self, i) + local totem = totems[priorities[i]] + if(totem) then + haveTotem, name, start, duration, icon = GetTotemInfo(i) + timeLeft = (start + duration) - GetTime() + totem:SetMinMaxValues(0,duration) + + if(timeLeft > 0) then + totem.expirationTime = (start + duration) + totem:SetValue(timeLeft) + totem:SetScript('OnUpdate', UpdateBar) + else + totem:SetValue(0) + totem:SetScript('OnUpdate', nil) + end + end end if(totems.PostUpdate) then @@ -79,8 +76,6 @@ local Enable = function(self) local totems = self.TotemBars if(totems) then - self:RegisterEvent('PLAYER_TOTEM_UPDATE', Path, true) - totems.__owner = self totems.__map = { unpack(priorities) } totems.ForceUpdate = ForceUpdate @@ -88,8 +83,15 @@ local Enable = function(self) for i = 1, MAX_TOTEMS do local totem = totems[i] totem:SetID(priorities[i]) + + if(totem:IsMouseEnabled()) then + totem:SetScript('OnEnter', Totem_OnEnter) + totem:SetScript('OnLeave', Totem_OnLeave) + end end + self:RegisterEvent('PLAYER_TOTEM_UPDATE', Path, true) + TotemFrame.Show = TotemFrame.Hide TotemFrame:Hide() diff --git a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua index 0a79b11..e4ddda8 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua @@ -109,18 +109,16 @@ local function RefreshMicrobar() for i=1,13 do local data = ICON_DATA[i] local button = _G[data[1]] - if(button) then - button:ClearAllPoints() - button:Size(buttonSize, buttonSize + 28) - button._fade = MOD.db.Micro.mouseover - if lastParent == SVUI_MicroBar then - button:SetPoint("BOTTOMLEFT",lastParent,"BOTTOMLEFT",1,1) - else - button:SetPoint('LEFT',lastParent,'RIGHT',spacing,0) - end - lastParent = button; - button:Show() - end + button:ClearAllPoints() + button:Size(buttonSize, buttonSize + 28) + button._fade = MOD.db.Micro.mouseover + if lastParent == SVUI_MicroBar then + button:SetPoint("BOTTOMLEFT",lastParent,"BOTTOMLEFT",1,1) + else + button:SetPoint('LEFT',lastParent,'RIGHT',spacing,0) + end + lastParent = button; + button:Show() end end @@ -155,9 +153,8 @@ local SVUIMicroButtonsParent = function(self) self = SVUI_MicroBar end for i=1,13 do - local data = ICON_DATA[i] - local mButton = _G[data[1]] - if(mButton) then _G[data[1]]:SetParent(SVUI_MicroBar) end + local data = ICON_DATA[i] + _G[data[1]]:SetParent(SVUI_MicroBar) end end @@ -767,7 +764,7 @@ do local barVisibility = db.customVisibility; local totalButtons = db.buttons; local max = (isStance and GetNumShapeshiftForms()) or (isPet and 10) or NUM_ACTIONBAR_BUTTONS; - local rows = ceil(max / cols); + local rows = ceil(totalButtons / cols); if max < cols then cols = max end if rows < 1 then rows = 1 end @@ -1317,40 +1314,38 @@ CreateMicroBar = function(self) for i=1,13 do local data = ICON_DATA[i] local button = _G[data[1]] - if(button) then - button:SetParent(SVUI_MicroBar) - button:Size(buttonSize, buttonSize + 28) - button.Flash:SetTexture(0,0,0,0) - if button.SetPushedTexture then - button:SetPushedTexture("") - end - if button.SetNormalTexture then - button:SetNormalTexture("") - end - if button.SetDisabledTexture then - button:SetDisabledTexture("") - end - if button.SetHighlightTexture then - button:SetHighlightTexture("") - end - button:Formula409() - - local buttonMask = NewFrame("Frame",nil,button) - buttonMask:SetPoint("TOPLEFT",button,"TOPLEFT",0,-28) - buttonMask:SetPoint("BOTTOMRIGHT",button,"BOTTOMRIGHT",0,0) - buttonMask:SetFramedButtonTemplate() - buttonMask:SetPanelColor() - buttonMask.icon = buttonMask:CreateTexture(nil,"OVERLAY",nil,2) - buttonMask.icon:FillInner(buttonMask,2,2) - buttonMask.icon:SetTexture(ICON_FILE) - buttonMask.icon:SetTexCoord(data[2],data[3],data[4],data[5]) - buttonMask.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) - button.overlay = buttonMask; - button._fade = self.db.Micro.mouseover - button:HookScript('OnEnter', MicroButton_OnEnter) - button:HookScript('OnLeave', MicroButton_OnLeave) - button:Show() - end + button:SetParent(SVUI_MicroBar) + button:Size(buttonSize, buttonSize + 28) + button.Flash:SetTexture(0,0,0,0) + if button.SetPushedTexture then + button:SetPushedTexture("") + end + if button.SetNormalTexture then + button:SetNormalTexture("") + end + if button.SetDisabledTexture then + button:SetDisabledTexture("") + end + if button.SetHighlightTexture then + button:SetHighlightTexture("") + end + button:Formula409() + + local buttonMask = NewFrame("Frame",nil,button) + buttonMask:SetPoint("TOPLEFT",button,"TOPLEFT",0,-28) + buttonMask:SetPoint("BOTTOMRIGHT",button,"BOTTOMRIGHT",0,0) + buttonMask:SetFramedButtonTemplate() + buttonMask:SetPanelColor() + buttonMask.icon = buttonMask:CreateTexture(nil,"OVERLAY",nil,2) + buttonMask.icon:FillInner(buttonMask,2,2) + buttonMask.icon:SetTexture(ICON_FILE) + buttonMask.icon:SetTexCoord(data[2],data[3],data[4],data[5]) + buttonMask.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + button.overlay = buttonMask; + button._fade = self.db.Micro.mouseover + button:HookScript('OnEnter', MicroButton_OnEnter) + button:HookScript('OnLeave', MicroButton_OnLeave) + button:Show() end MicroButtonPortrait:ClearAllPoints() diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index 3db7676..f722b2b 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -238,7 +238,7 @@ function MOD:RefreshSlot(bag, slotID) local itemLink = GetContainerItemLink(bag, slotID); local key; slot:Show() - -- slot.questIcon:Hide() + slot.questIcon:Hide() slot.name, slot.rarity = nil, nil; local start, duration, enable = GetContainerItemCooldown(bag, slotID) CooldownFrame_SetTimer(slot.cooldown, start, duration, enable) @@ -258,7 +258,7 @@ function MOD:RefreshSlot(bag, slotID) local z, A, C = GetContainerItemQuestInfo(bag, slotID) if A and not isActive then slot:SetBackdropBorderColor(1.0, 0.3, 0.3) - -- slot.questIcon:Show() + slot.questIcon:Show() elseif A or z then slot:SetBackdropBorderColor(1.0, 0.3, 0.3) elseif slot.rarity and slot.rarity>1 then @@ -439,13 +439,13 @@ function MOD:Layout(isBank) if(_G[f.Bags[bagID][slotID]:GetName().."NewItemTexture"]) then _G[f.Bags[bagID][slotID]:GetName().."NewItemTexture"]:Hide() end - --f.Bags[bagID][slotID].count:ClearAllPoints(); - --f.Bags[bagID][slotID].count:Point("BOTTOMRIGHT", 0, 2); - -- f.Bags[bagID][slotID].questIcon = _G[f.Bags[bagID][slotID]:GetName().."IconQuestTexture"]; - -- f.Bags[bagID][slotID].questIcon:SetTexture(TEXTURE_ITEM_QUEST_BANG); - -- f.Bags[bagID][slotID].questIcon:FillInner(f.Bags[bagID][slotID]); - -- f.Bags[bagID][slotID].questIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ); - -- f.Bags[bagID][slotID].questIcon:Hide(); + f.Bags[bagID][slotID].count:ClearAllPoints(); + f.Bags[bagID][slotID].count:Point("BOTTOMRIGHT", 0, 2); + f.Bags[bagID][slotID].questIcon = _G[f.Bags[bagID][slotID]:GetName().."IconQuestTexture"]; + f.Bags[bagID][slotID].questIcon:SetTexture(TEXTURE_ITEM_QUEST_BANG); + f.Bags[bagID][slotID].questIcon:FillInner(f.Bags[bagID][slotID]); + f.Bags[bagID][slotID].questIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ); + f.Bags[bagID][slotID].questIcon:Hide(); f.Bags[bagID][slotID].iconTexture = _G[f.Bags[bagID][slotID]:GetName().."IconTexture"]; f.Bags[bagID][slotID].iconTexture:FillInner(f.Bags[bagID][slotID]); f.Bags[bagID][slotID].iconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9 ); @@ -1307,6 +1307,7 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:ReLoad() + if not SuperVillain.db.SVBag.enable then return end self:Layout(); self:Layout(true); self:ModifyBags(); @@ -1314,7 +1315,10 @@ function MOD:ReLoad() end function MOD:Load() - if not SuperVillain.db.SVBag.enable then return end + if IsAddOnLoaded("AdiBags") then + return + end + if not SuperVillain.db.SVBag.enable then return end self:ModifyBagBar() SuperVillain.bags = self; self.BagFrames = {} @@ -1339,6 +1343,11 @@ DEFINE CONFIG AND REGISTER ########################################################## ]]-- CONFIGS["SVBag"] = { + ["incompatible"] = { + ["AdiBags"] = true, + ["ArkInventory"] = true, + ["Bagnon"] = true, + }, ["enable"] = true, ["sortInverted"] = false, ["bags"] = { diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua index 5605359..972a295 100644 --- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua +++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua @@ -918,6 +918,7 @@ function MOD:UpdateLocals() end function MOD:ReLoad() + if(not SuperVillain.db.SVChat.enable) then return end self:RefreshChatFrames(true) end diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index 33132bc..26a53d4 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -406,8 +406,8 @@ local function UpdateWorldMapConfig() if(not MOD.WorldMapHooked) then NewHook("WorldMap_ToggleSizeUp", AdjustMapSize) NewHook("WorldMap_ToggleSizeDown", SetSmallWorldMap) - -- NewHook("WorldMapFrame_SetFullMapView", SetLargeWorldMap) - -- NewHook("WorldMapFrame_SetQuestMapView", SetQuestWorldMap) + NewHook("WorldMapFrame_SetFullMapView", SetLargeWorldMap) + NewHook("WorldMapFrame_SetQuestMapView", SetQuestWorldMap) MOD.WorldMapHooked = true end @@ -568,6 +568,7 @@ local function UpdateSizing() end; function MOD:RefreshMiniMap() + if(not SuperVillain.db.SVMap.enable) then return; end if(InCombatLockdown()) then self.CombatLocked = true return @@ -758,10 +759,10 @@ end local function LoadWorldMap() setfenv(WorldMapFrame_OnShow, setmetatable({ UpdateMicroButtons = SuperVillain.fubar }, { __index = _G })) - -- WorldMapShowDropDown:Point('BOTTOMRIGHT',WorldMapPositioningGuide,'BOTTOMRIGHT',-2,-4) - -- WorldMapZoomOutButton:Point("LEFT",WorldMapZoneDropDown,"RIGHT",0,4) - -- WorldMapLevelUpButton:Point("TOPLEFT",WorldMapLevelDropDown,"TOPRIGHT",-2,8) - -- WorldMapLevelDownButton:Point("BOTTOMLEFT",WorldMapLevelDropDown,"BOTTOMRIGHT",-2,2) + WorldMapShowDropDown:Point('BOTTOMRIGHT',WorldMapPositioningGuide,'BOTTOMRIGHT',-2,-4) + WorldMapZoomOutButton:Point("LEFT",WorldMapZoneDropDown,"RIGHT",0,4) + WorldMapLevelUpButton:Point("TOPLEFT",WorldMapLevelDropDown,"TOPRIGHT",-2,8) + WorldMapLevelDownButton:Point("BOTTOMLEFT",WorldMapLevelDropDown,"BOTTOMRIGHT",-2,2) WorldMapFrame:SetParent(SuperVillain.UIParent) WorldMapFrame:SetFrameLevel(4) @@ -770,7 +771,7 @@ local function LoadWorldMap() WorldMapFrame:HookScript('OnShow', WorldMapFrameOnShow_Hook) WorldMapFrame:HookScript('OnHide', WorldMapFrameOnHide_Hook) - -- WorldMapZoneDropDownButton:HookScript('OnClick', ResetDropDownList_Hook) + WorldMapZoneDropDownButton:HookScript('OnClick', ResetDropDownList_Hook) local CoordsHolder = CreateFrame('Frame', 'SVUI_WorldMapCoords', WorldMapFrame) CoordsHolder:SetFrameLevel(WorldMapDetailFrame:GetFrameLevel()+1) @@ -830,12 +831,12 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:ReLoad() - if(not self.db.enable) then return; end + if(not SuperVillain.db.SVMap.enable) then return; end self:RefreshMiniMap() end -function MOD:PriorityLoad() - if(not self.db.enable) then +function MOD:Load() + if(not SuperVillain.db.SVMap.enable) then Minimap:SetMaskTexture('Textures\\MinimapMask') return end @@ -875,6 +876,11 @@ DEFINE CONFIG AND REGISTER ########################################################## ]]-- CONFIGS["SVMap"] = { + ["incompatible"] = { + ["SexyMap"] = true, + ["SquareMap"] = true, + ["PocketPlot"] = true, + }, ["enable"] = true, ["mapAlpha"] = 1, ["tinyWorldMap"] = true, diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index 865e563..788b177 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -794,9 +794,13 @@ local LootSimpleEventsHandler = function(_, event, slot) end local OpenedLootHandler = function(_, event, autoLoot) - SVUI_LootFrame:Show() - if not SVUI_LootFrame:IsShown() then CloseLoot(autoLoot == 0) end local drops = GetNumLootItems() + if drops > 0 then + SVUI_LootFrame:Show() + else + CloseLoot(autoLoot == 0) + end + if IsFishingLoot() then SVUI_LootFrame.title:SetText(L["Fishy Loot"]) elseif not UnitIsFriend("player", "target") and UnitIsDead"target" then @@ -988,6 +992,14 @@ local GroupLootDropDown_GiveLoot = function(self) CloseDropDownMenus() SuperVillain.SystemAlert["CONFIRM_LOOT_DISTRIBUTION"].OnAccept = function(self,index) GiveMasterLoot(lastID,index) end end + +local BailOut_OnEvent = function(self, event, ...) + if (CanExitVehicle()) then + SuperVillain:SecureFadeIn(self, 0.25, 0, 1) + else + SuperVillain:SecureFadeOut(self, 0.25, 1, 0, true) + end +end --[[ ########################################################## LOAD / UPDATE @@ -1078,7 +1090,12 @@ function MOD:Load() exit:SetFixedPanelTemplate("Transparent") exit:RegisterForClicks("AnyUp") exit:SetScript("OnClick", VehicleExit) - RegisterStateDriver(exit, "visibility", "[vehicleui] show;hide") + + exit:RegisterEvent("UNIT_ENTERED_VEHICLE") + exit:RegisterEvent("UNIT_EXITED_VEHICLE") + exit:RegisterEvent("VEHICLE_UPDATE") + exit:SetScript("OnEvent", BailOut_OnEvent) + exit:Hide() SuperVillain:SetSVMovable(exit, L["Bail Out"]) diff --git a/Interface/AddOns/SVUI/packages/stats/SVStats.lua b/Interface/AddOns/SVUI/packages/stats/SVStats.lua index 8bdca1e..4727f5d 100644 --- a/Interface/AddOns/SVUI/packages/stats/SVStats.lua +++ b/Interface/AddOns/SVUI/packages/stats/SVStats.lua @@ -247,14 +247,9 @@ end do local dataLayout, dataStrings = {}, {"None",KILLING_BLOWS,HONORABLE_KILLS,DEATHS,HONOR,"None","None","None","None",DAMAGE,SHOW_COMBAT_HEALING}; - dataLayout["TopLeftDataPanel"] = {true,true,true}; - dataLayout["TopLeftDataPanel"]['left'] = 10; - dataLayout["TopLeftDataPanel"]['middle'] = 5; - dataLayout["TopLeftDataPanel"]['right'] = 2; - dataLayout["TopRightDataPanel"] = {true,true,true}; - dataLayout["TopRightDataPanel"]['left'] = 4; - dataLayout["TopRightDataPanel"]['middle'] = 3; - dataLayout["TopRightDataPanel"]['right'] = 11; + dataLayout["TopLeftDataPanel"] = {['left'] = 10, ['middle'] = 5, ['right'] = 2}; + dataLayout["TopRightDataPanel"] = {['left'] = 4, ['middle'] = 3, ['right'] = 11}; + local Stat_OnLeave = function() MOD.tooltip:Hide() end diff --git a/Interface/AddOns/SVUI/packages/stats/stats/dps.lua b/Interface/AddOns/SVUI/packages/stats/stats/dps.lua index 4a2c430..780e31c 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/dps.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/dps.lua @@ -40,15 +40,17 @@ CALL TO ARMS STATS ]]-- local StatEvents = {'PLAYER_ENTERING_WORLD', 'COMBAT_LOG_EVENT_UNFILTERED', "PLAYER_LEAVE_COMBAT", 'PLAYER_REGEN_DISABLED', 'UNIT_PET'}; -local PlayerEvents = {SWING_DAMAGE = true, RANGE_DAMAGE = true, SPELL_DAMAGE = true, SPELL_PERIODIC_DAMAGE = true, DAMAGE_SHIELD = true, DAMAGE_SPLIT = true, SPELL_EXTRA_ATTACKS = true} -local playerID, petID +local PlayerEvents = {["SWING_DAMAGE"] = true, ["RANGE_DAMAGE"] = true, ["SPELL_DAMAGE"] = true, ["SPELL_PERIODIC_DAMAGE"] = true, ["DAMAGE_SHIELD"] = true, ["DAMAGE_SPLIT"] = true, ["SPELL_EXTRA_ATTACKS"] = true} +local playerID = UnitGUID('player') +local petID local DMGTotal, lastDMGAmount = 0, 0 local combatTime = 0 local timeStamp = 0 local lastSegment = 0 local lastPanel local hexColor = "FFFFFF" -local displayString = "%s: |cff%s%.1f|r"; +local displayString = "|cff%s%.1f|r"; +local dpsString = "%s |cff00CCFF%s|r"; local function Reset() timeStamp = 0 @@ -58,13 +60,16 @@ local function Reset() end local function GetDPS(self) - local DPS if DMGTotal == 0 or combatTime == 0 then - DPS = "0.0" + self.text:SetText(dpsString:format(L["DPS"], "..PAUSED")) + self.TText = "No Damage Done" + self.TText2 = "Go smack something so \nthat I can do the maths!" else - DPS = (DMGTotal) / (combatTime) + local DPS = (DMGTotal) / (combatTime) + self.text:SetFormattedText(displayString, hexColor, DPS) + self.TText = "DPS:" + self.TText2 = DPS end - self.text:SetFormattedText(displayString, L["DPS"], hexColor, DPS) end local function DPS_OnClick(self) @@ -75,12 +80,15 @@ end local function DPS_OnEnter(self) MOD:Tip(self) MOD.tooltip:AddDoubleLine("Damage Total:", DMGTotal, 1, 1, 1) - MOD:ShowTip() + MOD.tooltip:AddLine(" ", 1, 1, 1) + MOD.tooltip:AddDoubleLine(self.TText, self.TText2, 1, 1, 1) + MOD.tooltip:AddLine(" ", 1, 1, 1) + MOD.tooltip:AddDoubleLine("[Click]", "Clear DPS", 0,1,0, 0.5,1,0.5) + MOD:ShowTip(true) end local function DPS_OnEvent(self, event, ...) lastPanel = self - if event == "PLAYER_ENTERING_WORLD" then playerID = UnitGUID('player') elseif event == 'PLAYER_REGEN_DISABLED' or event == "PLAYER_LEAVE_COMBAT" then @@ -90,15 +98,13 @@ local function DPS_OnEvent(self, event, ...) end lastSegment = now elseif event == 'COMBAT_LOG_EVENT_UNFILTERED' then - if not PlayerEvents[select(2, ...)] then return end - local id = select(4, ...) - if id == playerID or id == petID then - if timeStamp == 0 then timeStamp = select(1, ...) end + local newTime, event, _, srcGUID, srcName, srcFlags, sourceRaidFlags, dstGUID, dstName, dstFlags, destRaidFlags, lastDMGAmount, spellName = ... + if not PlayerEvents[event] then return end + if(srcGUID == playerID or srcGUID == petID) then + if timeStamp == 0 then timeStamp = newTime end lastSegment = timeStamp - combatTime = select(1, ...) - timeStamp - if select(2, ...) == "SWING_DAMAGE" then - lastDMGAmount = select(12, ...) - else + combatTime = newTime - timeStamp + if event ~= "SWING_DAMAGE" then lastDMGAmount = select(15, ...) end DMGTotal = DMGTotal + lastDMGAmount diff --git a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua index 7431f70..e7d2370 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua @@ -49,7 +49,6 @@ local playerRealm = GetRealmName(); local StatEvents = {"PLAYER_ENTERING_WORLD","GUILD_ROSTER_UPDATE","GUILD_XP_UPDATE","PLAYER_GUILD_UPDATE","GUILD_MOTD"}; local updatedString = ""; -local updatedString2 = ""; local patternColor = SuperVillain:HexColor(0.75,0.9,1); local pattern1 = ("|cff%s%s"):format(patternColor, GUILD_EXPERIENCE_CURRENT); local pattern2 = ("|cff%s%s"):format(patternColor, GUILD_EXPERIENCE_DAILY); @@ -198,7 +197,7 @@ local function Guild_OnEvent(self, event, ...) GuildStatEventHandler[event](self, select(1, ...)) self.text:SetFormattedText(updatedString, #GuildStatMembers) else - self.text:SetFormattedText(updatedString2) + self.text:SetText(L['No Guild']) end end; @@ -325,7 +324,6 @@ end; local GuildColorUpdate = function() local hexColor = SuperVillain:HexColor("highlight"); updatedString = join("", GUILD, ": |cff", hexColor, "%d|r") - updatedString2 = L['No Guild'] if currentObject ~= nil then Guild_OnEvent(currentObject, 'SVUI_COLOR_UPDATE') end diff --git a/Interface/AddOns/SVUI/packages/stats/stats/hps.lua b/Interface/AddOns/SVUI/packages/stats/stats/hps.lua index b119cc5..46ba6d0 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/hps.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/hps.lua @@ -23,27 +23,10 @@ LOCALIZED LUA FUNCTIONS local _G = _G; local unpack = _G.unpack; local select = _G.select; -local pairs = _G.pairs; -local ipairs = _G.ipairs; -local type = _G.type; -local error = _G.error; -local pcall = _G.pcall; -local assert = _G.assert; -local tostring = _G.tostring; -local tonumber = _G.tonumber; -local tinsert = _G.tinsert; local string = _G.string; -local math = _G.math; -local table = _G.table; --[[ STRING METHODS ]]-- -local lower, upper = string.lower, string.upper; -local find, format, len, split = string.find, string.format, string.len, string.split; local match, sub, join = string.match, string.sub, string.join; -local gmatch, gsub = string.gmatch, string.gsub; ---[[ MATH METHODS ]]-- -local abs, ceil, floor, round = math.abs, math.ceil, math.floor, math.round; -- Basic ---[[ TABLE METHODS ]]-- -local twipe, tsort = table.wipe, table.sort; +local max = math.max; --[[ ########################################################## GET ADDON DATA @@ -58,15 +41,17 @@ CALL TO ARMS STATS ]]-- local StatEvents = {'PLAYER_ENTERING_WORLD', 'COMBAT_LOG_EVENT_UNFILTERED', "PLAYER_LEAVE_COMBAT", 'PLAYER_REGEN_DISABLED', 'UNIT_PET'}; -local PlayerEvents = {SPELL_HEAL = true, SPELL_PERIODIC_HEAL = true} -local playerID, petID -local healTotal, lastHealAmount = 0, 0 +local PlayerEvents = {["SPELL_HEAL"] = true, ["SPELL_PERIODIC_HEAL"] = true} +local playerID = UnitGUID('player') +local petID +local healTotal, totalHeal, totalOverHeal, lastHealAmount = 0, 0, 0, 0 local combatTime = 0 local timeStamp = 0 local lastSegment = 0 local lastPanel local hexColor = "FFFFFF"; -local displayString = "%s: |cff%s%.1f|r"; +local displayString = "|cff%s%.1f|r"; +local dpsString = "%s |cff00CCFF%s|r"; local join = string.join local max = math.max @@ -75,17 +60,22 @@ local function Reset() timeStamp = 0 combatTime = 0 healTotal = 0 + totalHeal = 0 + totalOverHeal = 0 lastHealAmount = 0 -end +end local function GetHPS(self) - local HPS if healTotal == 0 or combatTime == 0 then - HPS = "0.0" + self.text:SetText(dpsString:format(L["HPS"], "..PAUSED")) + self.TText = "No Healing Done" + self.TText2 = "Surely there is someone \nwith an ouchie somewhere!" else - HPS = (healTotal) / (combatTime) + local HPS = (healTotal) / (combatTime) + self.text:SetFormattedText(displayString, hexColor, HPS) + self.TText = "HPS:" + self.TText2 = HPS end - self.text:SetFormattedText(displayString, L["HPS"], hexColor, HPS) end local function HPS_OnClick(self) @@ -95,8 +85,13 @@ end local function HPS_OnEnter(self) MOD:Tip(self) - MOD.tooltip:AddDoubleLine("Damage Total:", healTotal, 1, 1, 1) - MOD:ShowTip() + MOD.tooltip:AddDoubleLine("Healing Total:", totalHeal, 1, 1, 1) + MOD.tooltip:AddDoubleLine("OverHealing Total:", totalOverHeal, 1, 1, 1) + MOD.tooltip:AddLine(" ", 1, 1, 1) + MOD.tooltip:AddDoubleLine(self.TText, self.TText2, 1, 1, 1) + MOD.tooltip:AddLine(" ", 1, 1, 1) + MOD.tooltip:AddDoubleLine("[Click]", "Clear HPS", 0,1,0, 0.5,1,0.5) + MOD:ShowTip(true) end local function HPS_OnEvent(self, event, ...) @@ -111,15 +106,15 @@ local function HPS_OnEvent(self, event, ...) end lastSegment = now elseif event == 'COMBAT_LOG_EVENT_UNFILTERED' then - if not PlayerEvents[select(2, ...)] then return end - local id = select(4, ...) - if id == playerID or id == petID then - if timeStamp == 0 then timeStamp = select(1, ...) end - local overHeal = select(16, ...) + local newTime, event, _, srcGUID, _, _, _, _, _, _, _, _, _, test, lastHealAmount, overHeal = ... + if not PlayerEvents[event] then return end + if(srcGUID == playerID or srcGUID == petID) then + if timeStamp == 0 then timeStamp = newTime end lastSegment = timeStamp - combatTime = select(1, ...) - timeStamp - lastHealAmount = select(15, ...) - healTotal = healTotal + max(0, lastHealAmount - overHeal) + combatTime = newTime - timeStamp + healTotal = healTotal + (lastHealAmount - overHeal) + totalHeal = totalHeal + lastHealAmount + totalOverHeal = totalOverHeal + overHeal end elseif event == UNIT_PET then petID = UnitGUID("pet") diff --git a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua index b0a2241..74f3209 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/reputation.lua @@ -51,7 +51,7 @@ local standingName = { [6] = "Honored", [7] = "Revered", [8] = "Exalted" -}; +} local function TruncateString(value) if value >= 1e9 then @@ -93,9 +93,8 @@ local function Reputation_OnEvent(self, ...) local isFriend, friendText local name, reaction, min, max, value = GetWatchedFactionInfo() local numFactions = GetNumFactions(); - local txt = "" if not name then - name = "No watched factions" + self.text:SetText("No watched factions") else for i=1, numFactions do local factionName, description, standingID, barMin, barMax, barValue, _, _, _, _, hasRep, isWatched, isChild = GetFactionInfo(i); @@ -109,9 +108,8 @@ local function Reputation_OnEvent(self, ...) end end end - txt = format("%s: %s - %d%% [%s]", name, TruncateString(value - min), ((value - min) / (max - min) * 100), isFriend and friendText or _G["FACTION_STANDING_LABEL"..ID]) + 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; - self.text:SetText(txt) end; local function ReputationBar_OnEvent(self, ...) @@ -162,7 +160,9 @@ local function Reputation_OnEnter(self) 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; - MOD:ShowTip() + 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; local function Reputation_OnClick(self, button) diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index 34fc177..93b156c 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -322,8 +322,8 @@ local function ShowInspectInfo(this,unit,unitLevel,r,g,b,iteration) this:AddDoubleLine(L["Talent Specialization:"],GetTalentSpec(unit,true),nil,nil,nil,r,g,b) this:AddDoubleLine(L["Item Level:"],floor(select(2,GetAverageItemLevel())),nil,nil,nil,1,1,1) elseif inspectCache[guid] then - local talent=inspectCache[guid].talent; - local itemLevel=inspectCache[guid].itemLevel; + local talent = inspectCache[guid].talent; + local itemLevel = inspectCache[guid].itemLevel; if GetTime() - inspectCache[guid].time > 900 or not talent or not itemLevel then inspectCache[guid] = nil; return ShowInspectInfo(this,unit,unitLevel,r,g,b,iteration+1) @@ -331,7 +331,7 @@ local function ShowInspectInfo(this,unit,unitLevel,r,g,b,iteration) this:AddDoubleLine(L["Talent Specialization:"],talent,nil,nil,nil,r,g,b) this:AddDoubleLine(L["Item Level:"],itemLevel,nil,nil,nil,1,1,1) else - if not inspectable or InspectFrame and InspectFrame:IsShown() then + if(not inspectable or (InspectFrame and InspectFrame:IsShown())) then return end MOD.lastGUID = guid; @@ -442,7 +442,7 @@ local _hook_GameTooltip_OnTooltipSetUnit = function(self) lvlLine:SetFormattedText("|cff%02x%02x%02x%s|r %s |c%s%s|r", qColor.r * 255, qColor.g * 255, qColor.b * 255, unitLevel > 0 and unitLevel or SKULL_ICON, race or "", colors.colorStr, className) end - if MOD.db.inspectInfo or isShiftKeyDown then + if(not IsAddOnLoaded("HealBot") and (MOD.db.inspectInfo or isShiftKeyDown)) then ShowInspectInfo(self, unit, unitLevel, colors.r, colors.g, colors.b, 0) end else @@ -799,8 +799,6 @@ function MOD:Load() alpha = 0.5 end - tooltip:SetFrameLevel(tooltip:GetFrameLevel() + 1) - local mask = CreateFrame("Frame", nil, tooltip) mask:SetPoint("TOPLEFT", tooltip, "TOPLEFT", 0, 0) mask:SetPoint("BOTTOMRIGHT", tooltip, "BOTTOMRIGHT", 0, barOffset) diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index 78660c6..c5c2005 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -156,6 +156,7 @@ do end function oUF_SuperVillain:DisableBlizzard(unit) + if(not SuperVillain.db.SVUnit.enable) then return end if (not unit) or InCombatLockdown() then return end if (unit == "player") then @@ -1062,7 +1063,23 @@ function MOD:RefreshUnitLayout(frame, template) frame:DisableElement('Range') end end - end + end + + if(frame.GPS) then + if(template ~= "target") then + frame.GPS.OnlyProximity = self.db.gpsLowHealth + end + if(db.gps) then + local actualSz = min(frame.GPS.DefaultSize, (UNIT_HEIGHT - 2)) + if(not frame:IsElementEnabled("GPS")) then + frame:EnableElement("GPS") + end + else + if(frame:IsElementEnabled("GPS")) then + frame:DisableElement("GPS") + end + end + end end --[[ ########################################################## @@ -1314,10 +1331,12 @@ BUILD FUNCTION / UPDATE ########################################################## ]]-- function MOD:ReLoad() + if(not SuperVillain.db.SVUnit.enable) then return end self:RefreshUnitFrames() end -function MOD:PriorityLoad() +function MOD:Load() + if(not SuperVillain.db.SVUnit.enable) then return end self:RefreshUnitColors() local SVUI_UnitFrameParent = CreateFrame("Frame", "SVUI_UnitFrameParent", SuperVillain.UIParent, "SecureHandlerStateTemplate") @@ -1327,7 +1346,7 @@ function MOD:PriorityLoad() self:RegisterEvent("PLAYER_ENTERING_WORLD") self:RegisterEvent("PLAYER_REGEN_DISABLED") - if(self.db.disableBlizzard) then + if(SuperVillain.db.SVUnit.disableBlizzard) then self:KillBlizzardRaidFrames() NewHook("CompactUnitFrame_RegisterEvents", CompactUnitFrame_UnregisterEvents) NewHook("UnitFrameThreatIndicator_Initialize", UnitFrameThreatIndicator_Hook) diff --git a/Interface/AddOns/SVUI/packages/unit/config.lua b/Interface/AddOns/SVUI/packages/unit/config.lua index 3224079..91888ee 100644 --- a/Interface/AddOns/SVUI/packages/unit/config.lua +++ b/Interface/AddOns/SVUI/packages/unit/config.lua @@ -68,7 +68,8 @@ CONFIGS["SVUnit"] = { ["auraBarByType"] = true, ["auraBarShield"] = true, ["castClassColor"] = false, - ["xrayFocus"] = true, + ["xrayFocus"] = true, + ["gpsLowHealth"] = false, ["player"] = { ["enable"] = true, ["width"] = 215, @@ -268,7 +269,8 @@ CONFIGS["SVUnit"] = { ["rangeCheck"] = true, ["predict"] = false, ["smartAuraDisplay"] = "DISABLED", - ["middleClickFocus"] = true, + ["middleClickFocus"] = true, + ["gps"] = true, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -1586,7 +1588,8 @@ CONFIGS["SVUnit"] = { ["colorOverride"] = "USE_DEFAULT", ["gridMode"] = false, ["width"] = 70, - ["height"] = 70, + ["height"] = 70, + ["gps"] = true, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -1761,7 +1764,8 @@ CONFIGS["SVUnit"] = { ["colorOverride"] = "USE_DEFAULT", ["gridMode"] = false, ["width"] = 75, - ["height"] = 34, + ["height"] = 34, + ["gps"] = false, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -1911,7 +1915,8 @@ CONFIGS["SVUnit"] = { ["colorOverride"] = "USE_DEFAULT", ["gridMode"] = false, ["width"] = 50, - ["height"] = 30, + ["height"] = 30, + ["gps"] = false, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -2060,7 +2065,8 @@ CONFIGS["SVUnit"] = { ["colorOverride"] = "USE_DEFAULT", ["gridMode"] = false, ["width"] = 50, - ["height"] = 30, + ["height"] = 30, + ["gps"] = false, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", diff --git a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua index d9b78a1..f5ab9a0 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua @@ -280,6 +280,9 @@ local CustomTimeText = function(self, value) end local CustomCastTimeUpdate = function(self, duration) + if(self.recipecount and self.maxrecipe and self.maxrecipe > 0) then + self.Text:SetText(self.recipecount .. "/" .. self.maxrecipe .. ": " .. self.previous) + end if(self.Time) then if(self.delay ~= 0) then if(self.CustomDelayText) then @@ -315,10 +318,13 @@ local CustomCastBarUpdate = function(self, elapsed) if not (self.casting or self.channeling) then self.unitName = nil + self.previous = nil self.casting = nil self.castid = nil self.channeling = nil - + self.tradeskill = nil + self.recipecount = nil + self.maxrecipe = nil self:SetValue(1) self:Hide() return @@ -343,7 +349,11 @@ local CustomCastBarUpdate = function(self, elapsed) local duration = self.duration + self.lastUpdate if(duration >= self.max) then + self.previous = nil self.casting = nil + self.tradeskill = nil + self.recipecount = nil + self.maxrecipe = nil self:Hide() if(self.PostCastStop) then self:PostCastStop(self.__owner.unit) end @@ -370,6 +380,11 @@ local CustomCastBarUpdate = function(self, elapsed) if(duration <= 0) then self.channeling = nil + self.previous = nil + self.casting = nil + self.tradeskill = nil + self.recipecount = nil + self.maxrecipe = nil self:Hide() if(self.PostChannelStop) then self:PostChannelStop(self.__owner.unit) end @@ -486,6 +501,7 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) local iconHolder = CreateFrame("Frame", nil, castbar) iconHolder:SetFixedPanelTemplate("Inset", false) + iconHolder:SetFrameStrata("HIGH") local buttonIcon = iconHolder:CreateTexture(nil, "BORDER") buttonIcon:FillInner() buttonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -498,7 +514,10 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) castbar.Shield = shieldIcon; castbar.Time = iconHolder:CreateFontString(nil, "OVERLAY") - castbar.Text = castbar:CreateFontString(nil, "OVERLAY") + castbar.Time:SetDrawLayer("OVERLAY", 7) + castbar.Text = iconHolder:CreateFontString(nil, "OVERLAY") + castbar.Text:SetDrawLayer("OVERLAY", 7) + local bgFrame = CreateFrame("Frame", nil, castbar) local hadouken = CreateFrame("Frame", nil, castbar) @@ -506,8 +525,8 @@ function MOD:CreateCastbar(frame, reversed, moverName, ryu, useFader, isBoss) if ryu then castbar.Time:SetFont(SuperVillain.Media.font.numbers, 12, "OUTLINE") castbar.Time:SetShadowOffset(1, -1) - castbar.Time:SetTextColor(1, 1, 1, 0.9) - castbar.Text:SetFont(SuperVillain.Media.font.alert, 13) + castbar.Time:SetTextColor(1, 1, 1) + castbar.Text:SetFont(SuperVillain.Media.font.alert, 13, "OUTLINE") castbar.Text:SetShadowOffset(1, -1) castbar.Text:SetTextColor(1, 1, 1) diff --git a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua index d99e8ef..0dbf2a3 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/misc.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/misc.lua @@ -264,6 +264,40 @@ 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 @@ -362,105 +396,6 @@ end TARGET ONLY COMPONENTS ########################################################## ]]-- -local function GPS_OnEnter(self) - self:SetAlpha(1) - GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) - if(not self.Trackable) then - self.Icon:SetVertexColor(1, 0.5, 0) - GameTooltip:ClearLines() - GameTooltip:AddLine("Can not track this unit", 1, 1, 1) - else - self.Icon:SetVertexColor(0.1, 1, 0.5) - GameTooltip:ClearLines() - GameTooltip:AddLine("Start tracking your target", 1, 1, 1) - end - GameTooltip:Show() -end - -local function GPS_OnLeave(self) - self:SetAlpha(0.25) - self.Icon:SetVertexColor(0.1, 0.1, 0.1) - GameTooltip:Hide() -end - -local function GPS_OnMouseDown(self) - if(not self.Trackable) then - self.Icon:SetVertexColor(1, 0, 0) - end -end - -local function GPS_OnMouseUp(self) - if(not self.Trackable) then - self.Icon:SetVertexColor(1, 0.5, 0) - else - self.Icon:SetVertexColor(0.1, 1, 0.5) - self:GetParent().Tracker:Show() - end -end - -function MOD:CreateGPS(frame) - if not frame then return end - - local gps = CreateFrame("Frame", nil, frame) - gps:Size(50, 50) - gps:Point("BOTTOMLEFT", frame, "BOTTOMRIGHT", 6, 0) - gps:EnableMouse(false) - - local tracker = CreateFrame("Frame", nil, gps) - tracker:SetAllPoints(gps) - tracker:SetFrameLevel(gps:GetFrameLevel() + 2) - - local border = tracker:CreateTexture(nil, "BORDER") - border:SetAllPoints(tracker) - border:SetTexture([[Interface\Addons\SVUI\assets\artwork\Doodads\GPS-BORDER]]) - border:SetGradient(unpack(SuperVillain.Media.gradient.dark)) - - tracker.Arrow = tracker:CreateTexture(nil, "OVERLAY", nil, -2) - tracker.Arrow:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\GPS-ARROW]]) - tracker.Arrow:Size(50, 50) - tracker.Arrow:SetPoint("CENTER", tracker, "CENTER", 0, 0) - tracker.Arrow:SetVertexColor(0.1, 0.8, 0.8) - - tracker.Text = tracker:CreateFontString(nil, "OVERLAY") - tracker.Text:SetAllPoints(tracker) - tracker.Text:SetFont(SuperVillain.Media.font.roboto, 14, "OUTLINE") - tracker.Text:SetTextColor(1, 1, 1, 0.75) - - tracker.Spinner = tracker:CreateTexture(nil, "ARTWORK", nil, 2) - tracker.Spinner:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\GPS-ANIMATION]]) - tracker.Spinner:Size(50, 50) - tracker.Spinner:SetPoint("CENTER", tracker, "CENTER", 0, 0) - - SuperVillain.Animate:Orbit(tracker.Spinner, 8, true) - - local switch = CreateFrame("Frame", nil, gps) - switch:SetAllPoints(gps) - switch:EnableMouse(true) - - switch.Icon = switch:CreateTexture(nil, "BACKGROUND") - switch.Icon:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Doodads\GPS-OPEN]]) - switch.Icon:Size(32, 32) - switch.Icon:SetPoint("BOTTOMLEFT", switch, "BOTTOMLEFT", 0, 0) - switch.Icon:SetVertexColor(0.1, 0.1, 0.1) - - switch.Trackable = false; - - switch:SetScript("OnEnter", GPS_OnEnter) - switch:SetScript("OnLeave", GPS_OnLeave) - switch:SetScript("OnMouseDown", GPS_OnMouseDown) - switch:SetScript("OnMouseUp", GPS_OnMouseUp) - - switch:SetAlpha(0.25) - - gps.Tracker = tracker - gps.Switch = switch - - gps.Tracker:Hide() - gps:Hide() - - return gps -end - function MOD:CreateXRay(frame) local xray=CreateFrame("BUTTON","XRayFocus",frame,"SecureActionButtonTemplate") xray:EnableMouse(true) @@ -493,7 +428,7 @@ function MOD:CreateXRay_Closer(frame) close:RegisterForClicks("AnyUp") close:SetAttribute("type","macro") close:SetAttribute("macrotext","/clearfocus") - close:Size(64,64) + close:Size(50,50) close:SetFrameStrata("DIALOG") close.icon=close:CreateTexture(nil,"ARTWORK") close.icon:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Unitframe\\UNIT-XRAY-CLOSE") @@ -591,7 +526,7 @@ local OverrideUpdate = function(self, event, unit) end if(hp.absorbBar) then - hp.absorbBar:SetMinMaxValues(barMin, barMax * 0.5) + hp.absorbBar:SetMinMaxValues(barMin, barMax) hp.absorbBar:SetValue(totalAbsorb) hp.absorbBar:SetAllPoints(hbar) hp.absorbBar:SetReverseFill(not reversed) diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua index 39cbbc1..6720fb0 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames.lua @@ -391,12 +391,6 @@ local UpdateTargetFrame = function(self) end end - do - local gps = self.GPS; - if not self:IsElementEnabled("GPS") then - self:EnableElement("GPS") - end - end self:UpdateAllElements() end UPDATERS["target"] = UpdateTargetFrame @@ -647,7 +641,7 @@ CONSTRUCTORS["focus"] = function(self, unit) self.RaidIcon = MOD:CreateRaidIcon(self) self.Range = { insideAlpha = 1, outsideAlpha = 1 } self.XRay = MOD:CreateXRay_Closer(self) - self.XRay:SetPoint("BOTTOMRIGHT", 20, -10) + self.XRay:SetPoint("RIGHT", 20, 0) self:Point("BOTTOMRIGHT", SVUI_Target, "TOPRIGHT", 0, 220) SuperVillain:SetSVMovable(self, L["Focus Frame"], nil, nil, nil, "ALL, SOLO") @@ -949,7 +943,7 @@ local ArenaPrepHandler = CreateFrame("Frame") local ArenaPrepHandler_OnEvent = function(self, event) local prepframe local _, instanceType = IsInInstance() - if(not MOD.db.arena.enable or instanceType ~= "arena") then return end + if(not SuperVillain.db.SVUnit.arena.enable or instanceType ~= "arena") then return end if event == "PLAYER_LOGIN" then for i = 1, 5 do prepframe = _G["SVUI_Arena"..i.."PrepFrame"] @@ -1197,7 +1191,7 @@ local UpdateRaidSubUnit = function(self, key, db) if not self:IsElementEnabled('RaidDebuffs')then self:EnableElement("RaidDebuffs") end - local actualSz = numMin(db.rdebuffs.size, (db.height - 4)) + local actualSz = numMin(db.rdebuffs.size, (db.height - 8)) rdBuffs:Size(actualSz) rdBuffs:Point("CENTER", self, "CENTER", db.rdebuffs.xOffset, db.rdebuffs.yOffset) rdBuffs:Show() @@ -1355,6 +1349,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) return SetRaidFrame(self) end @@ -1369,6 +1364,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) return SetRaidFrame(self) end @@ -1383,6 +1379,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) return SetRaidFrame(self) end --[[ @@ -1607,6 +1604,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) local shadow = CreateFrame("Frame", nil, self) shadow:SetFrameLevel(1) diff --git a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua index a4f850a..aac7748 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/shaman.lua @@ -49,11 +49,13 @@ assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") LOCALS ########################################################## ]]-- +local totemMax = MAX_TOTEMS +local totemPriorities = SHAMAN_TOTEM_PRIORITIES or {1, 2, 3, 4}; local totemTextures = { - [1] = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\SHAMAN-EARTH]], - [2] = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\SHAMAN-FIRE]], - [3] = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\SHAMAN-WATER]], - [4] = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\SHAMAN-AIR]], + [EARTH_TOTEM_SLOT] = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\SHAMAN-EARTH]], + [FIRE_TOTEM_SLOT] = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\SHAMAN-FIRE]], + [WATER_TOTEM_SLOT] = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\SHAMAN-WATER]], + [AIR_TOTEM_SLOT] = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\SHAMAN-AIR]], }; --[[ ########################################################## @@ -62,10 +64,9 @@ POSITIONING ]]-- local Reposition = function(self) local db = MOD.db.player - local bar = self.TotemBars; - local max = self.MaxClassPower; + local bar = self.TotemBars local size = db.classbar.height - local width = size * max; + local width = size * totemMax bar.Holder:Size(width, size) if(not db.classbar.detachFromFrame) then SuperVillain:ResetMovables(L["Classbar"]) @@ -77,7 +78,7 @@ local Reposition = function(self) bar:ClearAllPoints() bar:SetAllPoints(bar.Holder) - for i = 1, max do + for i = 1, totemMax do bar[i]:ClearAllPoints() bar[i]:SetHeight(size) bar[i]:SetWidth(size) @@ -95,18 +96,18 @@ SHAMAN ########################################################## ]]-- function MOD:CreateClassBar(playerFrame) - local max = 4 local bar = CreateFrame("Frame",nil,playerFrame) bar:SetFrameLevel(playerFrame.InfoPanel:GetFrameLevel() + 30) - for i=1, max do + for i=1, totemMax do + local iconfile = totemTextures[totemPriorities[i]] bar[i] = CreateFrame("StatusBar",nil,bar) - bar[i]:SetStatusBarTexture(totemTextures[i]) + bar[i]:SetStatusBarTexture(iconfile) bar[i]:GetStatusBarTexture():SetHorizTile(false) bar[i]:SetOrientation("VERTICAL") bar[i].noupdate=true; bar[i].backdrop = bar[i]:CreateTexture(nil,"BACKGROUND") bar[i].backdrop:SetAllPoints(bar[i]) - bar[i].backdrop:SetTexture(totemTextures[i]) + bar[i].backdrop:SetTexture(iconfile) bar[i].backdrop:SetDesaturated(true) bar[i].backdrop:SetVertexColor(0.2,0.2,0.2,0.7) end; @@ -117,7 +118,7 @@ function MOD:CreateClassBar(playerFrame) bar.Holder = classBarHolder SuperVillain:SetSVMovable(bar.Holder, L["Classbar"], nil, nil, nil, "ALL, SOLO") - playerFrame.MaxClassPower = max; + playerFrame.MaxClassPower = totemMax; playerFrame.ClassBarRefresh = Reposition; playerFrame.TotemBars = bar return 'TotemBars' diff --git a/Interface/AddOns/SVUI/scripts/misc.lua b/Interface/AddOns/SVUI/scripts/misc.lua index eacb8af..1b60ba9 100644 --- a/Interface/AddOns/SVUI/scripts/misc.lua +++ b/Interface/AddOns/SVUI/scripts/misc.lua @@ -32,6 +32,7 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(select(2, ...)); +local toonclass = select(2, UnitClass('player')) --[[ ########################################################## MERCHANT MAX STACK @@ -382,35 +383,36 @@ TOTEMS ]]-- local Totems = CreateFrame("Frame"); local TotemBar; +local priorities = STANDARD_TOTEM_PRIORITIES +if(toonclass == "SHAMAN") then + priorities = SHAMAN_TOTEM_PRIORITIES +end local Totems_OnEvent = function(self, event) if not TotemBar then return end local displayedTotems = 0; - for i=1,MAX_TOTEMS do + for i = 1, MAX_TOTEMS do if TotemBar[i] then local haveTotem, name, start, duration, icon = GetTotemInfo(i) - if haveTotem and icon and icon ~= '' then + if(haveTotem and icon and icon ~= "") then TotemBar[i]:Show() TotemBar[i].Icon:SetTexture(icon) displayedTotems = displayedTotems + 1; CooldownFrame_SetTimer(TotemBar[i].CD, start, duration, 1) - for i=1,MAX_TOTEMS do - if _G['TotemFrameTotem'..i..'IconTexture']:GetTexture()==icon then - _G['TotemFrameTotem'..i]:ClearAllPoints() - _G['TotemFrameTotem'..i]:SetParent(TotemBar[i].Anchor) - _G['TotemFrameTotem'..i]:SetAllPoints(TotemBar[i].Anchor) - end + + local id = TotemBar[i]:GetID() + local blizztotem = _G["TotemFrameTotem"..id] + if(blizztotem) then + blizztotem:ClearAllPoints() + blizztotem:SetParent(TotemBar[i].Anchor) + blizztotem:SetAllPoints(TotemBar[i].Anchor) end else TotemBar[i]:Hide() end end end -end - --- local Totem_OnClick = function(self) --- _G["TotemFrameTotem"..self:GetID()]:Click("RightButton") --- end +end function SuperVillain:UpdateTotems() local totemSize = self.db.system.totems.size; @@ -455,49 +457,67 @@ function SuperVillain:UpdateTotems() local tH = (totemGrowth == "HORIZONTAL" and tS2 or tS1); TotemBar:Size(tW, tH); Totems_OnEvent() -end +end + +local Totem_OnEnter = function(self) + if(not self:IsVisible()) then return end + GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMRIGHT') + GameTooltip:SetTotem(self:GetID()) +end + +local Totem_OnLeave = function() + GameTooltip:Hide() +end local function CreateTotemBar() if(not SuperVillain.db.system.totems.enable) then return; end local xOffset = SuperVillain.db.SVDock.dockLeftWidth + 12 TotemBar = CreateFrame("Frame", "SVUI_TotemBar", SuperVillain.UIParent) TotemBar:SetPoint("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOMLEFT", xOffset, 40) - for i = 1, MAX_TOTEMS do - local totem = CreateFrame("Button", "TotemBarTotem"..i, TotemBar) - totem:SetID(i) + for i = 1, MAX_TOTEMS do + local id = priorities[i] + local totem = CreateFrame("Button", "TotemBarTotem"..id, TotemBar) + totem:SetID(id) totem:SetButtonTemplate() totem:Hide() - totem.Anchor = CreateFrame("Frame", nil, totem) - totem.Anchor:SetAlpha(0) - totem.Anchor:SetAllPoints() + totem.Icon = totem:CreateTexture(nil, "ARTWORK") totem.Icon:FillInner() totem.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - totem.CD = CreateFrame("Cooldown", "TotemBarTotem"..i.."Cooldown", totem, "CooldownFrameTemplate") + totem.CD = CreateFrame("Cooldown", "TotemBarTotem"..id.."Cooldown", totem, "CooldownFrameTemplate") totem.CD:SetReverse(true) totem.CD:FillInner() SuperVillain:AddCD(totem.CD) - totem:EnableMouse(true) - local t = _G['TotemFrameTotem'..i] - t:ClearAllPoints() - t:SetParent(totem) - t:SetAllPoints(totem) - t:SetFrameLevel(totem:GetFrameLevel() + 1) - t:SetFrameStrata(totem:GetFrameStrata()) - t:SetAlpha(0) + totem.Anchor = CreateFrame("Frame", nil, totem) + totem.Anchor:SetAllPoints() + + totem:EnableMouse(true) + totem:SetScript('OnEnter', Totem_OnEnter) + totem:SetScript('OnLeave', Totem_OnLeave) + + local blizztotem = _G["TotemFrameTotem"..id] + if(blizztotem) then + blizztotem:ClearAllPoints() + blizztotem:SetParent(totem.Anchor) + blizztotem:SetAllPoints(totem.Anchor) + blizztotem:SetFrameLevel(totem.Anchor:GetFrameLevel() + 1) + blizztotem:SetFrameStrata(totem.Anchor:GetFrameStrata()) + blizztotem:SetAlpha(0) + end TotemBar[i] = totem end hooksecurefunc("TotemFrame_Update", function() for i=1, MAX_TOTEMS do - local t = _G['TotemFrameTotem'..i] - local slot = t.slot + local id = priorities[i] + local blizztotem = _G["TotemFrameTotem"..id] + local slot = blizztotem.slot if slot and slot > 0 then - t:ClearAllPoints() - t:SetAllPoints(_G['TotemBarTotem'..i]) + blizztotem:ClearAllPoints() + blizztotem:SetAllPoints(_G["TotemBarTotem"..id]) end end end) @@ -509,9 +529,9 @@ local function CreateTotemBar() Totems_OnEvent() SuperVillain:UpdateTotems() local frame_name; - if SuperVillain.class == "DEATHKNIGHT" then + if toonclass == "DEATHKNIGHT" then frame_name = L["Ghoul Bar"] - elseif SuperVillain.class == "DRUID" then + elseif toonclass == "DRUID" then frame_name = L["Mushroom Bar"] else frame_name = L["Totem Bar"] diff --git a/Interface/AddOns/SVUI/scripts/reactions.lua b/Interface/AddOns/SVUI/scripts/reactions.lua index 8761627..30d91e6 100644 --- a/Interface/AddOns/SVUI/scripts/reactions.lua +++ b/Interface/AddOns/SVUI/scripts/reactions.lua @@ -141,8 +141,7 @@ local ChatLogHandler_OnEvent = function(self, event, ...) if(SuperVillain.db.system.pvpinterrupt) then if ((spellID == 6770) and (destName == toon) and (subEvent == "SPELL_AURA_APPLIED" or subEvent == "SPELL_AURA_REFRESH")) then local msg = SAPPED_MESSAGE[rng()] - local cahnnel = IsInGroup() and "PARTY" or "SAY" - SendChatMessage(msg, cahnnel) + SendChatMessage(msg, "SAY") DEFAULT_CHAT_FRAME:AddMessage("Sapped by: "..(sourceName or "(unknown)")) elseif(subEvent == "SPELL_INTERRUPT" and sourceGUID == UnitGUID("player") and IsInGroup()) then SendChatMessage(INTERRUPTED.." "..destName..": "..GetSpellLink(otherSpellID), MsgTest()) diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index a463291..9ef2faa 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -91,6 +91,15 @@ SuperVillain.SystemAlert["FAILED_UISCALE"] = { whileDead = 1, hideOnEscape = false, } +SuperVillain.SystemAlert["TAINT_RL"] = { + text = L["SVUI has lost it's damned mind! I need to reload your UI to fix it."], + button1 = ACCEPT, + button2 = CANCEL, + OnAccept = function()ReloadUI()end, + timeout = 0, + whileDead = 1, + hideOnEscape = true +}; SuperVillain.SystemAlert["RL_CLIENT"] = { text = L["A setting you have changed requires that you reload your User Interface."], button1 = ACCEPT, diff --git a/Interface/AddOns/SVUI/system/cartography.lua b/Interface/AddOns/SVUI/system/cartography.lua index 773f8c3..49f0573 100644 --- a/Interface/AddOns/SVUI/system/cartography.lua +++ b/Interface/AddOns/SVUI/system/cartography.lua @@ -44,8 +44,8 @@ local SuperVillain, L = unpack(select(2, ...)) MEASURING UTILITY FUNCTIONS (from Astrolabe by: Esamynn) ########################################################## ]]-- -local radian90 = (3.141592653589793 / 2) -local GetDistance, GetTarget +local radian90 = (3.141592653589793 / 2) * -1; +local GetDistance, GetTarget, GetFromPlayer do local WORLDMAPAREA_DEFAULT_DUNGEON_FLOOR_IS_TERRAIN = 0x00000004 @@ -150,18 +150,16 @@ do do local continents = { GetMapContinents() }; - for continent in pairs(continents) do - local zones = { GetMapZones(continent) }; - continents[continent] = zones; - if(continent >= 1 and continent <= 5) then - SetMapZoom(continent, 0); - zones[0] = GetCurrentMapAreaID(); + for C in pairs(continents) do + local zones = { GetMapZones(C) }; + continents[C] = zones; + SetMapZoom(C, 0); + zones[0] = GetCurrentMapAreaID(); + _getmapdata(_cache); + for Z in ipairs(zones) do + SetMapZoom(C, Z); + zones[Z] = GetCurrentMapAreaID(); _getmapdata(_cache); - for Z in ipairs(zones) do - SetMapZoom(continent, Z); - zones[Z] = GetCurrentMapAreaID(); - _getmapdata(_cache); - end end end @@ -288,10 +286,10 @@ do end function GetDistance(map1, floor1, x1, y1, map2, floor2, x2, y2) - if not (map1 and map2) then return end; + if not (map1 and map2) then return end floor1 = floor1 or min(#_mapdata[map1], 1); floor2 = floor2 or min(#_mapdata[map2], 1); - local dist, xDelta, yDelta; + local dist, xDelta, yDelta, angle; if(map1 == map2 and floor1 == floor2) then local chunk = _mapdata[map1]; local tmp = chunk @@ -312,8 +310,8 @@ do w = chunk.width h = chunk.height end - xDelta = (x2 - x1) * w; - yDelta = (y2 - y1) * h; + xDelta = (x2 - x1) * (w or 1); + yDelta = (y2 - y1) * (h or 1); else local map1 = _mapdata[map1]; local map2 = _mapdata[map2]; @@ -343,18 +341,22 @@ do end end end + if(xDelta and yDelta) then - dist = sqrt(xDelta*xDelta + yDelta*yDelta); + local playerAngle = GetPlayerFacing() + dist = sqrt(xDelta * xDelta + yDelta * yDelta); + angle = (radian90 - playerAngle) - atan2(yDelta, xDelta) end - return dist, xDelta, yDelta; + + return dist, angle; end end do - local function _findunit(unit, noMapChange) + local function _findunit(unit, doNotCheckMap) local x, y = GetPlayerMapPosition(unit); if(x <= 0 and y <= 0) then - if(noMapChange) then return; end + if(doNotCheckMap) then return; end local lastMapID, lastFloor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(); SetMapToCurrentZone(); x, y = GetPlayerMapPosition(unit); @@ -402,30 +404,86 @@ do return GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(), x, y; end - function GetTarget(unit, checkMap) + function GetTarget(unit, doNotCheckMap) local plot1, plot2, plot3, plot4; if unit == "player" or UnitIsUnit("player", unit) then plot1, plot2, plot3, plot4 = _findplayer() else - plot1, plot2, plot3, plot4 = _findunit(unit, checkMap or WorldMapFrame:IsVisible()) - end; + plot1, plot2, plot3, plot4 = _findunit(unit, doNotCheckMap or WorldMapFrame:IsVisible()) + end if not (plot1 and plot4) then return false else return true, plot1, plot2, plot3, plot4 end end -end; -function SuperVillain:Triangulate(unit1, unit2, checkMap) - local allowed, plot1, plot2, plot3, plot4 = GetTarget(unit1, checkMap) - if not allowed then return end; - local allowed, plot5, plot6, plot7, plot8 = GetTarget(unit2, checkMap) - if not allowed then return end; - local distance, deltaX, deltaY = GetDistance(plot1, plot2, plot3, plot4, plot5, plot6, plot7, plot8) - if distance and deltaX and deltaY then - return distance, -radian90 - GetPlayerFacing() - atan2(deltaY, deltaX) - elseif distance then - return distance + function GetFromPlayer(unit, noMapLocation) + if(WorldMap and WorldMap:IsShown()) then return end + local plot3, plot4 = GetPlayerMapPosition("player"); + if(plot3 <= 0 and plot4 <= 0) then + SetMapToCurrentZone(); + plot3, plot4 = GetPlayerMapPosition("player"); + if(plot3 <= 0 and plot4 <= 0) then + if(ZoomOut()) then + elseif(GetCurrentMapZone() ~= WORLDMAP_WORLD_ID) then + SetMapZoom(GetCurrentMapContinent()); + else + SetMapZoom(WORLDMAP_WORLD_ID); + end + plot3, plot4 = GetPlayerMapPosition("player"); + if(plot3 <= 0 and plot4 <= 0) then + return; + end + end + end + + local plot1 = GetCurrentMapAreaID() + local plot2 = GetCurrentMapDungeonLevel() + + local plot5, plot6; + local plot7, plot8 = GetPlayerMapPosition(unit); + + if(noMapLocation and (plot7 <= 0 and plot8 <= 0)) then + local lastMapID, lastFloor = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(); + SetMapToCurrentZone(); + plot7, plot8 = GetPlayerMapPosition(unit); + if(plot7 <= 0 and plot8 <= 0) then + if(ZoomOut()) then + elseif(GetCurrentMapZone() ~= WORLDMAP_WORLD_ID) then + SetMapZoom(GetCurrentMapContinent()); + else + SetMapZoom(WORLDMAP_WORLD_ID); + end + plot7, plot8 = GetPlayerMapPosition(unit); + if(plot7 <= 0 and plot8 <= 0) then + return; + end + end + plot5, plot6 = GetCurrentMapAreaID(), GetCurrentMapDungeonLevel(); + if(plot5 ~= lastMapID or plot6 ~= lastFloor) then + SetMapByID(lastMapID); + SetDungeonMapLevel(lastFloor); + end + local distance, angle = GetDistance(plot1, plot2, plot3, plot4, plot5, plot6, plot7, plot8) + return distance, angle + end + + local distance, angle = GetDistance(plot1, plot2, plot3, plot4, plot1, plot2, plot7, plot8) + return distance, angle end -end; \ No newline at end of file +end + +function SuperVillain:PositionFromPlayer(unit, noMapLocation) + local distance, angle = GetFromPlayer(unit, noMapLocation) + return distance, angle +end + +function SuperVillain:Triangulate(unit1, unit2, doNotCheckMap) + local allowed, plot1, plot2, plot3, plot4 = GetTarget(unit1, doNotCheckMap) + if not allowed then return end + local allowed, plot5, plot6, plot7, plot8 = GetTarget(unit2, doNotCheckMap) + if not allowed then return end + local distance, angle = GetDistance(plot1, plot2, plot3, plot4, plot5, plot6, plot7, plot8) + return distance, angle +end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/database.lua b/Interface/AddOns/SVUI/system/database.lua index 969de96..6383a4e 100644 --- a/Interface/AddOns/SVUI/system/database.lua +++ b/Interface/AddOns/SVUI/system/database.lua @@ -39,7 +39,7 @@ SuperVillain.Shared = LibStub("LibSharedMedia-3.0") local realm = GetRealmName() local name = UnitName("player") local pkey = ("%s - %s"):format(name, realm) -local logoutListener = CreateFrame("Frame", nil) +local databaseListener = CreateFrame("Frame", nil) local CONFIGS = SuperVillain.Configs --[[ ########################################################## @@ -872,14 +872,12 @@ local function tablecopy(d, s) if type(s) ~= "table" then return end if type(d) == "table" then for k, v in pairs(s) do - if(k ~= "SAFEDATA") then - if type(v) == "table" then - if not rawget(d, k) then rawset(d, k, {}) end - tablecopy(d[k], v) - else - if rawget(d, k) == nil then - rawset(d, k, v) - end + if type(v) == "table" then + if not rawget(d, k) then rawset(d, k, {}) end + tablecopy(d[k], v) + else + if rawget(d, k) == nil then + rawset(d, k, v) end end end @@ -890,12 +888,10 @@ local function importdata(s, d) if type(d) ~= "table" then d = {} end if type(s) == "table" then for k,v in pairs(s) do - if(k ~= "SAFEDATA") then - if type(v) == "table" then - v = importdata(v, d[k]) - end - d[k] = v + if type(v) == "table" then + v = importdata(v, d[k]) end + d[k] = v end end return d @@ -933,16 +929,14 @@ local function removedefaults(db, src, nometa) setmetatable(db, nil) end for k,v in pairs(src) do - if(k ~= "SAFEDATA") then - if type(v) == "table" and type(db[k]) == "table" then - removedefaults(db[k], v, nometa) - if next(db[k]) == nil then - db[k] = nil - end - else - if db[k] == v then - db[k] = nil - end + if type(v) == "table" and type(db[k]) == "table" then + removedefaults(db[k], v, nometa) + if next(db[k]) == nil then + db[k] = nil + end + else + if db[k] == v then + db[k] = nil end end end @@ -952,9 +946,7 @@ local function resetprofile(t) local sv = rawget(t, "profile") local src = rawget(t, "defaults") for k,v in pairs(sv) do - if(k ~= "SAFEDATA") then - sv[k] = nil - end + sv[k] = nil end end @@ -965,9 +957,7 @@ local function importprofile(t, key) local src = globals.profiles[key] if(not src) then return end for k,v in pairs(sv) do - if(k ~= "SAFEDATA") then - sv[k] = nil - end + sv[k] = nil end tablecopy(sv, src) sv.copyKey = key @@ -1026,15 +1016,17 @@ local function SanitizeDatabase() local db = SuperVillain.db local src = SuperVillain.Configs for k,v in pairs(db) do - if(k ~= "SAFEDATA" and src[k]) then + if(src[k]) then removedefaults(db[k], src[k]) end end end -local LogOut_OnEvent = function(self, event) +local DataBase_OnEvent = function(self, event) if event == "PLAYER_LOGOUT" then SanitizeDatabase() + elseif(event == "ACTIVE_TALENT_GROUP_CHANGED") then + SuperVillain:UpdateDatabase() end end @@ -1054,15 +1046,24 @@ local metadatabase = { } local METAPROFILE = function(sv) + local key = 1 + if(sv.SAFEDATA.dualSpecEnabled) then + key = GetSpecialization() or 1 + databaseListener:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") + end + local db = setmetatable({}, metadatabase) - db.profile = sv + db.profile = sv.STORED[key] + db.protected = sv.SAFEDATA db.defaults = CONFIGS db.Init = initializedata db.Append = insertdata db.Reset = resetprofile db.SetDefault = setdefaults db.GetDefault = getdefaults + db.TalentSwap = changespec + db.ToggleSpec = togglespec db.Import = importprompt db.Export = exportprofile db.Remove = removeprofile @@ -1087,6 +1088,25 @@ function SuperVillain:CheckProfiles() return hasProfile end +function SuperVillain:UpdateDatabase() + local sv = _G["SVUI_Profile"] + twipe(self.db) + + self.db = METAPROFILE(sv) + self.db:Init() + self.db.profileKey = pkey + SuperVillain.Registry:UpdateAll() +end + +function SuperVillain:ToggleSpecSwap(value) + if(value) then + databaseListener:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED") + self:UpdateDatabase() + else + databaseListener:UnregisterEvent("ACTIVE_TALENT_GROUP_CHANGED") + end +end + function SuperVillain:HexColor(arg1,arg2,arg3) local r,g,b; if arg1 and type(arg1) == "string" then @@ -1145,7 +1165,7 @@ function SuperVillain:SetDatabaseObjects(init) self.db:Init() self.db.profileKey = pkey - logoutListener:RegisterEvent("PLAYER_LOGOUT") - logoutListener:SetScript("OnEvent", LogOut_OnEvent) + databaseListener:RegisterEvent("PLAYER_LOGOUT") + databaseListener:SetScript("OnEvent", DataBase_OnEvent) end end \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/installer.lua b/Interface/AddOns/SVUI/system/installer.lua index 8cc9918..772dceb 100644 --- a/Interface/AddOns/SVUI/system/installer.lua +++ b/Interface/AddOns/SVUI/system/installer.lua @@ -261,6 +261,7 @@ local function initChat(mungs) ChatFrame_AddMessageGroup(ChatFrame1, "COMBAT_XP_GAIN") ChatFrame_AddMessageGroup(ChatFrame1, "COMBAT_HONOR_GAIN") ChatFrame_AddMessageGroup(ChatFrame1, "COMBAT_GUILD_XP_GAIN") + ChatFrame_RemoveAllMessageGroups(ChatFrame3) ChatFrame_AddMessageGroup(ChatFrame3, "COMBAT_FACTION_CHANGE") ChatFrame_AddMessageGroup(ChatFrame3, "SKILL") @@ -269,7 +270,9 @@ local function initChat(mungs) ChatFrame_AddMessageGroup(ChatFrame3, "COMBAT_XP_GAIN") ChatFrame_AddMessageGroup(ChatFrame3, "COMBAT_HONOR_GAIN") ChatFrame_AddMessageGroup(ChatFrame3, "COMBAT_GUILD_XP_GAIN") + ChatFrame_AddChannel(ChatFrame1, GENERAL) + ToggleChatColorNamesByClassGroup(true, "SAY") ToggleChatColorNamesByClassGroup(true, "EMOTE") ToggleChatColorNamesByClassGroup(true, "YELL") @@ -298,9 +301,11 @@ local function initChat(mungs) ToggleChatColorNamesByClassGroup(true, "CHANNEL9") ToggleChatColorNamesByClassGroup(true, "CHANNEL10") ToggleChatColorNamesByClassGroup(true, "CHANNEL11") + ChangeChatColor("CHANNEL1", 195 / 255, 230 / 255, 232 / 255) ChangeChatColor("CHANNEL2", 232 / 255, 158 / 255, 121 / 255) ChangeChatColor("CHANNEL3", 232 / 255, 228 / 255, 121 / 255) + if not mungs then if SuperVillain.Chat then SuperVillain.Chat:ReLoad(true) @@ -390,7 +395,7 @@ function SuperVillain:SetColorTheme(style, preserve) end local presets = self:LoadPresetData("media", style) - self.db.SAFEDATA.mediastyle = style; + self.db.LAYOUT.mediastyle = style; if(style == "default") then self.db.SVUnit.healthclass = true; @@ -423,15 +428,15 @@ function SuperVillain:SetUnitframeLayout(style, preserve) end local presets = self:LoadPresetData("units", style) - self.db.SAFEDATA.unitstyle = style + self.db.LAYOUT.unitstyle = style - if(self.db.SAFEDATA.mediastyle == "default") then + if(self.db.LAYOUT.mediastyle == "default") then self.db.SVUnit.healthclass = true; end if(not mungs) then if(not preserve) then - if self.db.SAFEDATA.barstyle and (self.db.SAFEDATA.barstyle == "twosmall" or self.db.SAFEDATA.barstyle == "twobig") then + if self.db.LAYOUT.barstyle and (self.db.LAYOUT.barstyle == "twosmall" or self.db.LAYOUT.barstyle == "twobig") then UFMoveBottomQuadrant("shift") else UFMoveBottomQuadrant() @@ -450,7 +455,7 @@ function SuperVillain:SetGroupframeLayout(style, preserve) style = style or "default"; local presets = self:LoadPresetData("layouts", style) - self.db.SAFEDATA.groupstyle = style + self.db.LAYOUT.groupstyle = style if(not mungs) then self.Registry:Update('SVUnit') @@ -473,7 +478,7 @@ function SuperVillain:SetupBarLayout(style, preserve) end local presets = self:LoadPresetData("bars", style) - self.db.SAFEDATA.barstyle = style; + self.db.LAYOUT.barstyle = style; if(not mungs) then if(not preserve) then @@ -498,7 +503,7 @@ end function SuperVillain:SetupAuralayout(style, preserve) style = style or "default"; local presets = self:LoadPresetData("auras", style) - self.db.SAFEDATA.aurastyle = style; + self.db.LAYOUT.aurastyle = style; if(not mungs) then self.Registry:Update('SVStats') @@ -534,10 +539,10 @@ local function InstallMungsChoice() initChat(true); SuperVillain:SetUserScreen('high'); SuperVillain:SetColorTheme(); - SuperVillain.db.SAFEDATA.unitstyle = nil; + SuperVillain.db.LAYOUT.unitstyle = nil; SuperVillain:SetUnitframeLayout(); - SuperVillain.db.SAFEDATA.groupstyle = nil; - SuperVillain.db.SAFEDATA.barstyle = nil; + SuperVillain.db.LAYOUT.groupstyle = nil; + SuperVillain.db.LAYOUT.barstyle = nil; SuperVillain:SetupBarLayout(); SuperVillain:SetupAuralayout(); SVUI_Profile.SAFEDATA.install_version = SuperVillain.___ver; @@ -711,7 +716,7 @@ local function SetPage(newPage) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.unitstyle = nil; + SuperVillain.db.LAYOUT.unitstyle = nil; SuperVillain:SetUnitframeLayout("super") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFLets Do This|r"]) SVUI_SetupHolder.Desc2:SetText(L["This layout is anything but minimal! Using this is like being at a rock concert"]..CONTINUED) @@ -720,7 +725,7 @@ local function SetPage(newPage) SVUI_InstallOption1Button:SetText(L["Super"]) SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.unitstyle = nil; + SuperVillain.db.LAYOUT.unitstyle = nil; SuperVillain:SetUnitframeLayout("simple") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFSimply Simple|r"]) SVUI_SetupHolder.Desc2:SetText(L["This layout is for the villain who just wants to get things done!"]..CONTINUED) @@ -729,7 +734,7 @@ local function SetPage(newPage) SVUI_InstallOption2Button:SetText(L["Simple"]) SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.unitstyle = nil; + SuperVillain.db.LAYOUT.unitstyle = nil; SuperVillain:SetUnitframeLayout("compact") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFEl Compacto|r"]) SVUI_SetupHolder.Desc2:SetText(L["Just the necessities so you can see more of the world around you"]..CONTINUED) @@ -745,7 +750,7 @@ local function SetPage(newPage) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.groupstyle = "default"; + SuperVillain.db.LAYOUT.groupstyle = "default"; SuperVillain:SetGroupframeLayout("default") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFStandard|r"]) SVUI_SetupHolder.Desc2:SetText(L["You are good to go with the default layout"]..CONTINUED) @@ -754,7 +759,7 @@ local function SetPage(newPage) SVUI_InstallOption1Button:SetText(L["Standard"]) SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.groupstyle = nil; + SuperVillain.db.LAYOUT.groupstyle = nil; SuperVillain:SetGroupframeLayout("healer") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFMEDIC!!|r"]) SVUI_SetupHolder.Desc2:SetText(L["You are pretty helpful.. for a VILLAIN!"]..CONTINUED) @@ -763,7 +768,7 @@ local function SetPage(newPage) SVUI_InstallOption2Button:SetText(L["Healer"]) SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.groupstyle = nil; + SuperVillain.db.LAYOUT.groupstyle = nil; SuperVillain:SetGroupframeLayout("dps") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFDeath Dealer|r"]) SVUI_SetupHolder.Desc2:SetText(L["You are the kings of our craft. Handing out pain like its halloween candy."]..CONTINUED) @@ -778,7 +783,7 @@ local function SetPage(newPage) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.barstyle = nil; + SuperVillain.db.LAYOUT.barstyle = nil; SuperVillain:SetupBarLayout("onesmall") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFLean And Clean|r"]) SVUI_SetupHolder.Desc2:SetText(L["Lets keep it slim and deadly, not unlike a ninja sword."]) @@ -787,7 +792,7 @@ local function SetPage(newPage) SVUI_InstallOption1Button:SetText(L["Small" .. "\n" .. "Row"]) SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.barstyle = nil; + SuperVillain.db.LAYOUT.barstyle = nil; SuperVillain:SetupBarLayout("twosmall") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFMore For Less|r"]) SVUI_SetupHolder.Desc2:SetText(L["Granted, you dont REALLY need the buttons due to your hotkey-leetness, you just like watching cooldowns!"]) @@ -796,7 +801,7 @@ local function SetPage(newPage) SVUI_InstallOption2Button:SetText(L["2 Small" .. "\n" .. "Rows"]) SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.barstyle = nil; + SuperVillain.db.LAYOUT.barstyle = nil; SuperVillain:SetupBarLayout("default") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFWhat Big Buttons You Have|r"]) SVUI_SetupHolder.Desc2:SetText(L["The better to PEW-PEW you with my dear!"]) @@ -805,7 +810,7 @@ local function SetPage(newPage) SVUI_InstallOption3Button:SetText(L["Big" .. "\n" .. "Row"]) SVUI_InstallOption4Button:Show() SVUI_InstallOption4Button:SetScript("OnClick", function() - SuperVillain.db.SAFEDATA.barstyle = nil; + SuperVillain.db.LAYOUT.barstyle = nil; SuperVillain:SetupBarLayout("twobig") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFThe Double Down|r"]) SVUI_SetupHolder.Desc2:SetText(L["Lets be honest for a moment. Who doesnt like a huge pair in their face?"]) @@ -883,31 +888,31 @@ function SuperVillain:ResetInstallation() SuperVillain.db:Reset() SuperVillain:SetUserScreen(); - if SuperVillain.db.SAFEDATA.mediastyle then - SuperVillain:SetColorTheme(SuperVillain.db.SAFEDATA.mediastyle) + if SuperVillain.db.LAYOUT.mediastyle then + SuperVillain:SetColorTheme(SuperVillain.db.LAYOUT.mediastyle) else - SuperVillain.db.SAFEDATA.mediastyle = nil; + SuperVillain.db.LAYOUT.mediastyle = nil; SuperVillain:SetColorTheme() end - if SuperVillain.db.SAFEDATA.unitstyle then - SuperVillain:SetUnitframeLayout(SuperVillain.db.SAFEDATA.unitstyle) + if SuperVillain.db.LAYOUT.unitstyle then + SuperVillain:SetUnitframeLayout(SuperVillain.db.LAYOUT.unitstyle) else - SuperVillain.db.SAFEDATA.unitstyle = nil; + SuperVillain.db.LAYOUT.unitstyle = nil; SuperVillain:SetUnitframeLayout() end - if SuperVillain.db.SAFEDATA.barstyle then - SuperVillain:SetupBarLayout(SuperVillain.db.SAFEDATA.barstyle) + if SuperVillain.db.LAYOUT.barstyle then + SuperVillain:SetupBarLayout(SuperVillain.db.LAYOUT.barstyle) else - SuperVillain.db.SAFEDATA.barstyle = nil; + SuperVillain.db.LAYOUT.barstyle = nil; SuperVillain:SetupBarLayout() end - if SuperVillain.db.SAFEDATA.aurastyle then - SuperVillain:SetupAuralayout(SuperVillain.db.SAFEDATA.aurastyle) + if SuperVillain.db.LAYOUT.aurastyle then + SuperVillain:SetupAuralayout(SuperVillain.db.LAYOUT.aurastyle) else - SuperVillain.db.SAFEDATA.aurastyle = nil; + SuperVillain.db.LAYOUT.aurastyle = nil; SuperVillain:SetupAuralayout() end diff --git a/Interface/AddOns/SVUI/system/system.lua b/Interface/AddOns/SVUI/system/system.lua index b6179d4..877b253 100644 --- a/Interface/AddOns/SVUI/system/system.lua +++ b/Interface/AddOns/SVUI/system/system.lua @@ -177,12 +177,12 @@ local function SendAddonMessage(msg, prefix) end function SuperVillain:AddonMessage(msg) - local outbound = ("|cffffcc1a%s:|r"):format("SVUI") + local outbound = ("|cffFF2F00%s:|r"):format("SVUI") SendAddonMessage(msg, outbound) end function SuperVillain:ToonMessage(msg) - local outbound = ("|cffffcc1a%s:|r"):format(playerName) + local outbound = ("|cff00FF00%s:|r"):format(playerName) SendAddonMessage(msg, outbound) end @@ -241,9 +241,12 @@ function SuperVillain:ToggleConfig() GameTooltip:Hide() end +--/script SVUI[1]:TaintHandler("SVUI", "Script", "Function") function SuperVillain:TaintHandler(taint, sourceName, sourceFunc) - if GetCVarBool('scriptErrors') ~= 1 then return end - ScriptErrorsFrame_OnError(L["%s: %s has lost it's damn mind and is destroying '%s'."]:format(taint, sourceName or "elements", sourceFunc or "functions"),false) + if GetCVarBool('scriptErrors') ~= 1 then return end + local errorString = ("Error Captured: %s->%s->{%s}"):format(taint, sourceName or "Unknown", sourceFunc or "Unknown") + SuperVillain:AddonMessage(errorString) + SuperVillain:StaticPopup_Show("TAINT_RL") end --[[ ########################################################## @@ -716,16 +719,56 @@ end SVUI LOAD PROCESS ########################################################## ]]-- +local function PrepareStorage() + if(not SVUI_Profile) then return end + SVUI_Profile.STORED = {} + local old = SVUI_Profile.SAFEDATA + local media = old.mediastyle or "" + local bars = old.barstyle or "" + local units = old.unitstyle or "" + local groups = old.groupstyle or "" + local auras = old.aurastyle or "" + local spec = GetSpecialization() or 1 + SVUI_Profile.STORED[1] = tcopy(SVUI_Profile, true) + SVUI_Profile.STORED[1].LAYOUT = { + mediastyle = media, + barstyle = bars, + unitstyle = units, + groupstyle = groups, + aurastyle = auras + } + SVUI_Profile.SAFEDATA.mediastyle = nil + SVUI_Profile.SAFEDATA.barstyle = nil + SVUI_Profile.SAFEDATA.unitstyle = nil + SVUI_Profile.SAFEDATA.groupstyle = nil + SVUI_Profile.SAFEDATA.aurastyle = nil + SVUI_Profile.SAFEDATA.dualSpecEnabled = false +end + function SuperVillain:Load() self:ClearAllTimers() + if not SVUI_Global then SVUI_Global = {} end if not SVUI_Global["profiles"] then SVUI_Global["profiles"] = {} end - if SVUI_Global["gold"] then SVUI_Global["gold"] = nil end if SVUI_Global["profileKeys"] then SVUI_Global["profileKeys"] = nil end - if not SVUI_Profile then SVUI_Profile = {} end - if not SVUI_Profile.SAFEDATA then SVUI_Profile.SAFEDATA = {} end + if not SVUI_Profile then SVUI_Profile = {} end + if not SVUI_Profile.SAFEDATA then SVUI_Profile.SAFEDATA = {dualSpecEnabled = false} end + if not SVUI_Profile.STORED then PrepareStorage() end + if not SVUI_Profile.STORED[2] then + SVUI_Profile.STORED[2] = {} + SVUI_Profile.STORED[2].LAYOUT = SVUI_Profile.STORED[1].LAYOUT + end + if not SVUI_Profile.STORED[3] then + SVUI_Profile.STORED[3] = {} + SVUI_Profile.STORED[3].LAYOUT = SVUI_Profile.STORED[1].LAYOUT + end + for k,v in pairs(SVUI_Profile) do + if(k ~= "STORED" and k ~= "SAFEDATA") then + SVUI_Profile[k] = nil + end + end if not SVUI_Cache then SVUI_Cache = {} end if not SVUI_Cache["Dock"] then SVUI_Cache["Dock"] = {} end @@ -743,7 +786,6 @@ function SuperVillain:Load() self:UIScale(); self:RefreshSystemFonts(); self:LoadSystemAlerts(); - self.Registry:PreLoadPackages(); self.UIParent:RegisterEvent('PLAYER_REGEN_DISABLED'); self.AddonLoaded = true @@ -785,7 +827,7 @@ function SuperVillain:Launch() _G["SVUI_MentaloPrecision"]:SetPanelTemplate("Transparent") if self.db.system.loginmessage then - local logMsg = (L["LOGIN_MSG"]):format("|cffffcc1a", "|cffff801a", self.___ver) + local logMsg = (L["LOGIN_MSG"]):format("|cffFFFF1A", "|cffAA78FF", self.___ver) self:AddonMessage(logMsg); end diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc index 5cb47fb..6f20a66 100644 --- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc +++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc @@ -1,4 +1,4 @@ -## Interface: 60100 +## Interface: 50400 ## Author: Munglunch ## Version: 1.081 ## Title: |cffFF9900SVUI |r|cffFFEF00Answering Service|r diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index f3692af..f519e1f 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -168,10 +168,8 @@ local function AddEnemyScan(guid, timestamp) if(EnemyCache[guid]) then return EnemyCache[guid] end - local class, key, _, race, sex, name, realm = GetPlayerInfoByGUID(guid) - -- local key = class:upper() - -- key = key:gsub("%s+", "") - local colors = classColor[key] or fallbackColor + local class, classToken, race, raceToken, sex, name, realm = GetPlayerInfoByGUID(guid) + local colors = classColor[classToken] or fallbackColor EnemyCache[guid] = { ["name"] = name, ["realm"] = realm, @@ -179,7 +177,7 @@ local function AddEnemyScan(guid, timestamp) ["race"] = race, ["sex"] = sex, ["colors"] = colors, - ["time"] = timestampa + ["time"] = timestamp } PLUGIN:ScannerLog(EnemyCache[guid]) return EnemyCache[guid]; @@ -224,13 +222,14 @@ local function ClearSavedScans() end local function EnemyAlarm(name, class, colors, kos) + if not name then return end local inInstance, instanceType = IsInInstance() if(instanceType ~= "pvp" and not AlertedCache[name]) then local msg if(kos) then msg = ("Mortal Enemy Detected!: %s"):format(name); HeadsUpAlarm(msg, CombatText_StandardScroll, 1, 0, 0) - else + elseif(class and colors) then msg = ("%s Detected"):format(class); HeadsUpAlarm(msg, CombatText_StandardScroll, colors.r, colors.g, colors.b) end @@ -261,6 +260,7 @@ function PLUGIN:ResetLogs() self.SummaryWindow:Clear(); self.LogWindow:Clear(); self.TitleWindow:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); + SVUI_AoWLogsClear:Show() local stored = SVAOW_Cache; local amount = 0 for _,data in pairs(stored) do @@ -272,7 +272,49 @@ function PLUGIN:ResetLogs() collectgarbage("collect") end +function PLUGIN:SwitchToLogs() + if(not AoWLogs:IsShown()) then AoWLogs:Show() end + self.TitleWindow:Clear(); + self.SummaryWindow:Clear(); + self.LogWindow:Clear(); + self.TitleWindow:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); + SVUI_AoWLogsClear:Show() + local stored = SVAOW_Cache; + local amount = 0 + for _,data in pairs(stored) do + if type(data) == "table" and data.name and data.class then + amount = amount + 1; + end + end + self.SummaryWindow:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8); + for _,data in pairs(EnemyCache) do + if type(data) == "table" and data.name and data.class and data.race then + local hex = ("%s - %s %s"):format(data.name, data.race, data.class) + self.LogWindow:AddMessage(hex, data.colors.r, data.colors.g, data.colors.b); + end + end +end + +function PLUGIN:SwitchToBG() + if(self.InPVP) then + if(AoWLogs:IsShown()) then AoWLogs:Hide() end + else + if(not AoWLogs:IsShown()) then AoWLogs:Show() end + self.TitleWindow:Clear(); + self.SummaryWindow:Clear(); + self.LogWindow:Clear(); + self.TitleWindow:AddMessage("Scanning Paused", 1, 0.1, 0); + self.SummaryWindow:AddMessage(ACTIVE_ZONE, 1, 0.75, 0); + SVUI_AoWLogsClear:Hide() + self.LogWindow:AddMessage(" ", 1, 1, 1); + self.LogWindow:AddMessage(" ", 1, 1, 1); + self.LogWindow:AddMessage("The Enenmy Scanner Will Resume", 0.8, 0.8, 0.8); + self.LogWindow:AddMessage("When You Leave This BattleGround", 0.8, 0.8, 0.8); + end +end + function PLUGIN:ScannerLog(enemy) + if(not enemy.name or not enemy.race or not enemy.class) then return end local hex = ("%s - %s %s"):format(enemy.name, enemy.race, enemy.class) self.LogWindow:AddMessage(hex, enemy.colors.r, enemy.colors.g, enemy.colors.b); EnemyAlarm(enemy.name, enemy.class, enemy.colors) @@ -308,7 +350,6 @@ function PLUGIN:UpdateCommunicator() self.DockButton:SaveColors("yellow", "yellow", true) self.DockButton.icon:SetTexture(ICON_FILE) self.DockButton.Scanner:Hide() - AoWLogs:Hide() self.Scanning = false end end @@ -328,8 +369,9 @@ function PLUGIN:UpdateCommunicator() self.DockButton:SaveColors("special", "icon", false) self.DockButton.icon:SetTexture(0,0,0,0) self.DockButton.Scanner:Show() - AoWLogs:Show() self.Scanning = true + + self:SwitchToLogs() end end @@ -348,18 +390,19 @@ function PLUGIN:UpdateZoneStatus() local zonePvP = GetZonePVPInfo() if(zonePvP == "sanctuary" or zoneText == "") then PLUGIN.Scanning = false - PLUGIN.VS = false else PLUGIN.Scanning = true local inInstance, instanceType = IsInInstance() if(inInstance and ((instanceType == "party") or (instanceType == "raid"))) then PLUGIN.Scanning = false - PLUGIN.VS = false elseif (not zonePvP or (zonePvP == "friendly") or (not UnitIsPVP("player"))) then PLUGIN.Scanning = false - PLUGIN.VS = false - elseif(instanceType == "pvp" and not PLUGIN.InPVP and PLUGIN.Scanning == true) then - PLUGIN:UpdateCommunicator() + elseif(instanceType == "pvp") then + PLUGIN:SwitchToBG() + PLUGIN.Scanning = false + if(not PLUGIN.InPVP) then + PLUGIN:UpdateCommunicator() + end end end end @@ -393,10 +436,6 @@ local function ParseIncomingLog(timestamp, event, eGuid, eName, pGuid) HeadsUpAlarm(incoming, CombatText_StandardScroll, 1, 0.05, 0, "crit") end end - - if(pGuid == playerGUID and event == "UNIT_DIED") then - SaveEnemyScan(eGuid, timestamp) - end end local function GetSourceType(guid) @@ -417,13 +456,14 @@ function PLUGIN:CombatLogScanner(timestamp, event, _, srcGUID, srcName, srcFlags local isHostile = CombatLog_Object_IsA(srcFlags, COMBATLOG_FILTER_HOSTILE_PLAYERS) local srcType = GetSourceType(srcGUID) if((srcType == 0 or srcType == 8) and isHostile) then - if(event == "SPELL_AURA_APPLIED") then - if(spellName == L["Stealth"] or spellName == L["Prowl"]) then - StealthAlarm(spellName) - end + if(event == "SPELL_AURA_APPLIED" and (spellName == L["Stealth"] or spellName == L["Prowl"])) then + StealthAlarm(spellName) + end + if(dstGUID == playerGUID) then + PLUGIN.HitBy = srcGUID end if(not PLUGIN.Scanning) then return end - ParseIncomingLog(timestamp, event, srcGUID, srcName, dstGUID, srcType) + ParseIncomingLog(timestamp, event, srcGUID, srcName, dstGUID) end end @@ -431,7 +471,7 @@ function PLUGIN:CombatLogScanner(timestamp, event, _, srcGUID, srcName, srcFlags local isHostile = CombatLog_Object_IsA(dstFlags, COMBATLOG_FILTER_HOSTILE_PLAYERS) local srcType = GetSourceType(dstGUID) if((srcType == 0 or srcType == 8) and isHostile) then - ParseIncomingLog(timestamp, event, dstGUID, dstName, srcGUID, srcType) + ParseIncomingLog(timestamp, event, dstGUID, dstName, srcGUID) end end end @@ -456,23 +496,38 @@ function PLUGIN:TargetChanged() end end -SVUIAddonEventHandler:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") -SVUIAddonEventHandler:RegisterEvent("ZONE_CHANGED") -SVUIAddonEventHandler:RegisterEvent("ZONE_CHANGED_NEW_AREA") -SVUIAddonEventHandler:RegisterEvent("PLAYER_ENTERING_WORLD") -SVUIAddonEventHandler:RegisterEvent("PLAYER_TARGET_CHANGED") -SVUIAddonEventHandler:RegisterEvent("UNIT_FACTION") -SVUIAddonEventHandler:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") +function PLUGIN:TheyGotMe() + local guid = PLUGIN.HitBy + if(guid and guid ~= "") then + local stamp = time() + SaveEnemyScan(guid, stamp) + end +end local Registry_OnEvent = function(self, event, ...) - if(event == "PLAYER_TARGET_CHANGED") then - PLUGIN:TargetChanged() + if(event == "PLAYER_REGEN_ENABLED") then + PLUGIN.HitBy = false; elseif(event == "COMBAT_LOG_EVENT_UNFILTERED") then PLUGIN:CombatLogScanner(...) - elseif(event == "PLAYER_ENTERING_WORLD" or event == "UPDATE_BATTLEFIELD_SCORE") then - PLUGIN:UpdateCommunicator() else - PLUGIN:UpdateZoneStatus() + local inInstance, instanceType = IsInInstance() + if(instanceType == "pvp") then + PLUGIN.Scanning = false + end + + if(event == "PLAYER_ENTERING_WORLD" or event == "UPDATE_BATTLEFIELD_SCORE") then + PLUGIN:UpdateCommunicator() + elseif(event == "PLAYER_TARGET_CHANGED") then + if(instanceType ~= "pvp") then + PLUGIN:TargetChanged() + end + elseif(event == "PLAYER_DEAD") then + if(instanceType ~= "pvp") then + PLUGIN:TheyGotMe() + end + else + PLUGIN:UpdateZoneStatus() + end end end @@ -530,7 +585,7 @@ local function MakeLogWindow() title.divider:SetPoint("BOTTOMRIGHT") title.divider:SetHeight(1) - local clearcount = CreateFrame("Button", nil, AoWLogs) + local clearcount = CreateFrame("Button", "SVUI_AoWLogsClear", AoWLogs) clearcount:SetPoint("TOPLEFT", title, "BOTTOMLEFT",0,0) clearcount:SetPoint("BOTTOMRIGHT", title, "BOTTOMRIGHT",0,-20) clearcount:SetButtonTemplate(true) @@ -538,11 +593,12 @@ local function MakeLogWindow() clearcount:SetScript("OnLeave", LogClear_OnLeave) clearcount:SetScript("OnClick", LogClear_OnClick) - local summary = CreateFrame("ScrollingMessageFrame", nil, clearcount) + local summary = CreateFrame("ScrollingMessageFrame", nil, AoWLogs) summary:SetSpacing(4) summary:SetClampedToScreen(false) summary:SetFrameStrata("MEDIUM") - summary:SetAllPoints(clearcount) + summary:SetPoint("TOPLEFT", title, "BOTTOMLEFT",0,0) + summary:SetPoint("BOTTOMRIGHT", title, "BOTTOMRIGHT",0,-20) summary:SetFontTemplate(SuperVillain.Media.font.system, 16, "OUTLINE", "CENTER", "MIDDLE") summary:SetMaxLines(1) summary:EnableMouse(false) @@ -575,6 +631,16 @@ local function MakeLogWindow() PLUGIN.TitleWindow = title PLUGIN.SummaryWindow = summary PLUGIN.LogWindow = log + + SVUIAddonEventHandler:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") + SVUIAddonEventHandler:RegisterEvent("ZONE_CHANGED") + SVUIAddonEventHandler:RegisterEvent("ZONE_CHANGED_NEW_AREA") + SVUIAddonEventHandler:RegisterEvent("PLAYER_ENTERING_WORLD") + SVUIAddonEventHandler:RegisterEvent("PLAYER_TARGET_CHANGED") + SVUIAddonEventHandler:RegisterEvent("PLAYER_REGEN_ENABLED") + SVUIAddonEventHandler:RegisterEvent("PLAYER_DEAD") + SVUIAddonEventHandler:RegisterEvent("UNIT_FACTION") + SVUIAddonEventHandler:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") end --[[ ########################################################## @@ -599,12 +665,13 @@ local function LoadOptions() end local function LoadWarVillain() + if(not SuperVillain.db.SVAOW.enable) then return end PLUGIN.db = SuperVillain.db.SVAOW if(not SVAOW_Data) then SVAOW_Data = {} end if(not SVAOW_Cache) then SVAOW_Cache = {} end - PLUGIN.VS = false; + PLUGIN.HitBy = false; PLUGIN.Scanning = false; PLUGIN.InPVP = false @@ -697,8 +764,6 @@ local function LoadWarVillain() holder:Hide() PLUGIN:ResetLogs() - - end CONFIGS["SVAOW"] = { diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc index 3650182..2f2e7c8 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc @@ -1,4 +1,4 @@ -## Interface: 60100 +## Interface: 50400 ## Author: Munglunch ## Version: 1.081 ## Title: |cffFF9900SVUI |r|cffFFEF00Art of War|r diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc index 991ba92..c09a1e2 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 50400 ## Author: Munglunch, Elv -## Version: 4.081 +## Version: 4.082 ## Title: |cffFF9900SVUI |r|cffFFEF00Config O Matic|r ## Notes: Supervillain UI [|cff9911FFConfig Options|r] ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua index e26a53f..d9fda7e 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua @@ -129,7 +129,7 @@ SuperVillain.Options.args.SVDock.args["leftDockGroup"] = { max = 1200, step = 1, width = "full", - get = function()return SuperVillain.db.SVDock.dockStatWidth;end, + get = function()return SuperVillain.db.SVDock.dockStatWidth end, set = function(key,value) MOD:ChangeDBVar(value,key[#key]); MOD:UpdateSuperDock(true) diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua index 835158e..525891d 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/map.lua @@ -69,7 +69,7 @@ SuperVillain.Options.args.SVMap = { name = L['Enable'], desc = L['Enable/Disable the Custom Minimap.'], get = function(a)return SuperVillain.db.SVMap.enable end, - set = function(a,b)SuperVillain.db.SVMap.enable=b;SuperVillain:StaticPopup_Show("RL_CLIENT")end + set = function(a,b)SuperVillain.db.SVMap.enable=b; SuperVillain:StaticPopup_Show("RL_CLIENT") end }, common = { order = 3, diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua index c2edb85..402b0fc 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/profiles.lua @@ -121,5 +121,18 @@ SuperVillain.Options.args.profiles = { func = function() SuperVillain:StaticPopup_Show("RESET_PROFILE_PROMPT") end, width = "full", }, + spacer4 = { + order = 13, + type = "description", + name = "", + width = "full", + }, + dualSpecEnabled = { + order = 14, + type = "toggle", + name = "Dual-Spec Switching", + get = function() return SuperVillain.db.protected.dualSpecEnabled end, + set = function(key, value) SuperVillain.db.protected.dualSpecEnabled = value; SuperVillain:ToggleSpecSwap(value) end, + }, } } \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua index ad339bf..35272a3 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua @@ -1524,8 +1524,14 @@ SuperVillain.Options.args.SVUnit = { desc = L["Use handy graphics to focus the current target, or clear the current focus"], type = "toggle" }, - OORAlpha = { + gpsLowHealth = { order = 7, + name = "GPS Proximity", + desc = "When using GPS tracking with raid/party frames, only show the tracker for the closest injured player. Useful for healers!", + type = "toggle" + }, + OORAlpha = { + order = 8, name = L["Range Fading"], desc = L["The transparency of units that are out of range."], type = "range", @@ -1536,7 +1542,7 @@ SuperVillain.Options.args.SVUnit = { set = function(key, value) MOD:ChangeDBVar(value, key[#key]); end - } + }, } }, backgroundGroup = { diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua index 43851eb..cd209c7 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua @@ -87,19 +87,25 @@ SuperVillain.Options.args.SVUnit.args.party ={ desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle", }, + gps = { + order = 4, + name = "GPS Tracking", + desc = "Show an arrow giving the direction and distance to the frames unit.", + type = "toggle", + }, predict ={ - order = 4, + order = 5, name = L['Heal Prediction'], desc = L['Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals.'], type = 'toggle', }, threatEnabled ={ type = 'toggle', - order = 5, + order = 6, name = L['Show Threat'], }, colorOverride ={ - order = 6, + order = 7, name = L['Class Color Override'], desc = L['Override the default class color setting.'], type = 'select', diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua index f323337..c8fb17b 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua @@ -82,26 +82,32 @@ for w=10,40,15 do desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SuperVillain.db.SVUnit["raid" .. w]["power"].hideonnpc end, set = function(l, m)SuperVillain.db.SVUnit["raid" .. w]["power"].hideonnpc = m;MOD:SetGroupFrame("raid" .. w)end, - }, + }, rangeCheck = { order = 3, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], type = "toggle", + }, + gps = { + order = 4, + name = "GPS Tracking", + desc = "Show an arrow giving the direction and distance to the frames unit.", + type = "toggle", }, predict = { - order = 4, + order = 5, name = L["Heal Prediction"], desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], type = "toggle", }, threatEnabled = { type = "toggle", - order = 5, + order = 6, name = L["Show Threat"], }, colorOverride = { - order = 6, + order = 7, name = L["Class Color Override"], desc = L["Override the default class color setting."], type = "select", diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua index aacacb4..417d94e 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/target.lua @@ -82,15 +82,21 @@ SuperVillain.Options.args.SVUnit.args.target={ ["SHOW_BUFFS_ON_FRIENDLIES"] = L["Friendlies: Show Buffs"] } }, + gps = { + order = 3, + name = "GPS Tracking", + desc = "Show an arrow giving the direction and distance to the frames unit.", + type = "toggle", + }, predict = { - order = 3, + order = 4, name = L["Heal Prediction"], desc = L["Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals."], type = "toggle" }, hideonnpc = { type = "toggle", - order = 4, + order = 5, name = L["Text Toggle On NPC"], desc = L["Power text will be hidden on NPC targets, in addition the name text will be repositioned to the power texts anchor point."], get = function(l)return SuperVillain.db.SVUnit["target"]["power"].hideonnpc end, @@ -98,11 +104,11 @@ SuperVillain.Options.args.SVUnit.args.target={ }, threatEnabled = { type = "toggle", - order = 5, + order = 6, name = L["Show Threat"] }, middleClickFocus = { - order = 6, + order = 7, name = L["Middle Click - Set Focus"], desc = L["Middle clicking the unit frame will cause your focus to match the unit."], type = "toggle", diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua index a89f812..836e296 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua @@ -545,6 +545,7 @@ local function LoadOptions() end function LoadLaborVillain() + if(not SuperVillain.db.SVLaborer.enable) then return end PLUGIN.db = SuperVillain.db.SVLaborer lastClickTime = nil; PLUGIN.WornItems = {}; diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc index 97a015f..15c2a3b 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc @@ -1,4 +1,4 @@ -## Interface: 60100 +## Interface: 50400 ## Author: Munglunch ## Version: 1.081 ## Title: |cffFF9900SVUI |r|cffFFEF00Laborer|r diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua index cca7241..92a5aa8 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.lua @@ -38,8 +38,7 @@ GET ADDON DATA ########################################################## ]]-- local SVUIAddOnName, PLUGIN = ...; -local SuperVillain, L = unpack(SVUI); -local CONFIGS = SuperVillain.Configs +local SuperVillain, L = unpack(SVUI) local NewHook = hooksecurefunc; local SVUILogEventHandler = CreateFrame("Frame", nil) local version = GetAddOnMetadata(..., "Version"); @@ -99,7 +98,7 @@ local RefreshLoggedSlot = function(self, bag, slotID, save) local itemLink = GetContainerItemLink(bag, slotID); local key; slot:Show() - --slot.questIcon:Hide() + slot.questIcon:Hide() slot.name, slot.rarity = nil, nil; local start, duration, enable = GetContainerItemCooldown(bag, slotID) CooldownFrame_SetTimer(slot.cooldown, start, duration, enable) @@ -119,7 +118,7 @@ local RefreshLoggedSlot = function(self, bag, slotID, save) local z, A, C = GetContainerItemQuestInfo(bag, slotID) if A and not isActive then slot:SetBackdropBorderColor(1.0, 0.3, 0.3) - --slot.questIcon:Show() + slot.questIcon:Show() elseif A or z then slot:SetBackdropBorderColor(1.0, 0.3, 0.3) elseif slot.rarity and slot.rarity>1 then @@ -365,7 +364,7 @@ local function LoadLogOMatic() NewHook(CHAT, "ReLoad", PLUGIN.AppendChatFunctions); end -CONFIGS["SVLogs"] = { +SuperVillain.Configs["SVLogs"] = { ["enable"] = true, ["saveChats"] = false } diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc index 70c5f26..a0a9371 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc @@ -1,4 +1,4 @@ -## Interface: 60100 +## Interface: 50400 ## Author: Munglunch ## Version: 1.081 ## Title: |cffFF9900SVUI |r|cffFFEF00Log O Matic|r diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua index e2d3851..c0e741c 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua @@ -55,10 +55,10 @@ CORE DATA PLUGIN.DockedParent = {} PLUGIN.AddOnQueue = {}; PLUGIN.AddOnEvents = {}; -PLUGIN.BlizzardQueue = {}; PLUGIN.CustomQueue = {}; PLUGIN.EventListeners = {}; -PLUGIN.PassiveAddons = {}; +PLUGIN.OnLoadAddons = {}; +PLUGIN.StyledAddons = {}; PLUGIN.OptionsCache = { order = 4, type = "group", @@ -75,90 +75,128 @@ PLUGIN.OptionsCache = { }, } }; +PLUGIN.Debugging = false --[[ ########################################################## CORE FUNCTIONS ########################################################## ]]-- +local charming = {"Spiffy", "Pimped Out", "Fancy", "Awesome", "Bad Ass", "Sparkly", "Gorgeous", "Handsome", "Shiny"} +local styleMessage = '|cff00FF77%s|r Is Now %s!' + +local function SendAddonMessage(msg, prefix) + if(type(msg) == "table") then + msg = tostring(msg) + end + + if(not msg) then return end + + if(prefix) then + local outbound = ("%s %s"):format(prefix, msg); + print(outbound) + else + print(msg) + end +end + +function PLUGIN:AddonMessage(msg) + local outbound = ("|cffFF2F00%s:|r"):format("Style-O-Matic") + SendAddonMessage(msg, outbound) +end + function PLUGIN:LoadAlert(MainText, Function) self.Alert.Text:SetText(MainText) self.Alert.Accept:SetScript('OnClick', Function) self.Alert:Show() end -function PLUGIN:IsAddonReady(this, ...) +function PLUGIN:Style(style, fn, ...) + -- self.Debugging = false + local pass, error = pcall(fn, ...) + if(pass and (not style:find("Blizzard")) and not self.StyledAddons[style]) then + self.StyledAddons[style] = true + local verb = charming[math.random(1,#charming)] + self:AddonMessage(styleMessage:format(style, verb)) + else + if self.Debugging then + local message = '%s: |cffff0000There was an error in the|r |cff0affff%s|r |cffff0000skin|r.' + SuperVillain:AddonMessage(message:format(version, style)) + local errormessage = '%s Error: %s' + SuperVillain:AddonMessage(errormessage:format(style, error)) + end + end +end + +function PLUGIN:IsAddonReady(addon, ...) for i = 1, select('#', ...) do local a = select(i, ...) if not a then break end if not IsAddOnLoaded(a) then return false end end - return SuperVillain.db.SVStyle.addons[this] + + local config = SuperVillain.db.SVStyle or SuperVillain.Configs.SVStyle + + return config.addons[addon] end function PLUGIN:SaveAddonStyle(addon, fn, force, passive, ...) - local args,hasEvent = {},false; + self:DefineEventFunction("PLAYER_ENTERING_WORLD", addon) + if(passive) then + self:DefineEventFunction("ADDON_LOADED", addon) + end for i=1, select("#",...) do local event = select(i,...) - if event then - args[event] = true - hasEvent = true; - end; - end; - if passive then self.PassiveAddons[addon] = true end; - if not self.AddOnEvents[addon] then - self.AddOnEvents[addon] = {}; - self.AddOnEvents[addon]["complete"] = false; - if hasEvent then - self.AddOnEvents[addon]["events"] = args; - end + if(event) then + self:DefineEventFunction(event, addon) + end end - if force then + if(SuperVillain.Configs.SVStyle.addons[addon] == nil) then + SuperVillain.Configs.SVStyle.addons[addon] = true + end + + if force then fn() - self.AddOnQueue[addon] = nil - else - self.AddOnQueue[addon] = fn + else + self.AddOnQueue[addon] = fn end -end; +end -function PLUGIN:SaveBlizzardStyle(addon, fn, force, passive, preload) - if passive then self.PassiveAddons[addon] = true end; +function PLUGIN:SaveBlizzardStyle(addon, fn, force) if force then - if(preload and not IsAddOnLoaded(addon)) then + if(not IsAddOnLoaded(addon)) then LoadAddOn(addon) end fn() - self.BlizzardQueue[addon] = nil - else - self.BlizzardQueue[addon] = fn + else + self.OnLoadAddons[addon] = fn end -end; +end function PLUGIN:SaveCustomStyle(fn) tinsert(PLUGIN.CustomQueue, fn) -end; +end function PLUGIN:DefineEventFunction(addonEvent, addon) + if(not addon) then return end if(not self.EventListeners[addonEvent]) then self.EventListeners[addonEvent] = {} end - if(addon) then - self.EventListeners[addonEvent][addon] = true - end + self.EventListeners[addonEvent][addon] = true if(not self[addonEvent]) then self[addonEvent] = function(self, event, ...) - for addon,fn in pairs(self.AddOnQueue)do - if self:IsAddonReady(addon) and self.EventListeners[event] and self.EventListeners[event][addon] then - local _,error = pcall(fn, event, ...) + for name,fn in pairs(self.AddOnQueue)do + if self:IsAddonReady(name) and self.EventListeners[event] and self.EventListeners[event][name] then + self:Style(name, fn, event, ...) end end - end; + end SVUIAddonEventHandler:RegisterEvent(addonEvent); end end function PLUGIN:SafeEventRemoval(addon, event) - if not self.EventListeners[event] then return end; - if not self.EventListeners[event][addon] then return end; + if not self.EventListeners[event] then return end + if not self.EventListeners[event][addon] then return end self.EventListeners[event][addon] = nil; local defined = false; for name,_ in pairs(self.EventListeners[event]) do @@ -166,57 +204,57 @@ function PLUGIN:SafeEventRemoval(addon, event) defined = true; break end - end; + end if not defined then SVUIAddonEventHandler:UnregisterEvent(event) end -end; +end function PLUGIN:RefreshAddonStyles() for addon,fn in pairs(self.AddOnQueue) do - if(SuperVillain.db.SVStyle.addons[addon] == true) then - if IsAddOnLoaded(addon) then - local _,error = pcall(fn, "PLAYER_ENTERING_WORLD") - end + if(self:IsAddonReady(addon)) then + self:Style(addon, fn) end end end -function PLUGIN:LoadStyles() - for addon,fn in pairs(self.BlizzardQueue) do - if IsAddOnLoaded(addon) then - fn() - self.BlizzardQueue[addon]=nil +function PLUGIN:ToggleStyle(addon, value) + SuperVillain.db.SVStyle.addons[addon] = value +end + +function PLUGIN:StyleInit(event, ...) + for addon,fn in pairs(self.AddOnQueue)do + self:AppendAddonOption(addon) + if(SuperVillain.db.SVStyle.addons[addon] == nil) then + SuperVillain.db.SVStyle.addons[addon] = true + end + end + + for addon,fn in pairs(self.OnLoadAddons) do + if(SuperVillain.db.SVStyle.blizzard[addon] == nil) then + SuperVillain.db.SVStyle.blizzard[addon] = true + end + if(IsAddOnLoaded(addon) and (SuperVillain.db.SVStyle.blizzard[addon] or SuperVillain.db.SVStyle.addons[addon])) then + self:Style(addon, fn, event, ...) + self.OnLoadAddons[addon] = nil end - end; + end + for _,fn in pairs(self.CustomQueue)do - fn() - end; + fn(event) + end + twipe(self.CustomQueue) - for addon,fn in pairs(self.AddOnQueue)do - PLUGIN:AppendAddonOption(addon) - if IsAddOnLoaded(addon) then - if(SuperVillain.db.SVStyle.addons[addon] == nil) then - SuperVillain.db.SVStyle.addons[addon] = true - end - if(SuperVillain.db.SVStyle.addons[addon] == true) then - if(not self.AddOnEvents[addon]["complete"]) then - if self.AddOnEvents[addon]["events"] then - for event,_ in pairs(self.AddOnEvents[addon]["events"]) do - self:DefineEventFunction(event, addon) - end - end - self.AddOnEvents[addon]["complete"] = true - end - end - end - end; - self:RefreshAddonStyles() + collectgarbage("collect") end -function PLUGIN:ToggleStyle(addon, value) - SuperVillain.db.SVStyle.addons[addon] = value -end; +function PLUGIN:StyleOnDemand(event, addon) + for name, fn in pairs(self.OnLoadAddons) do + if(addon:find(name)) then + self:Style(name, fn, event, addon) + end + end +end --[[ ########################################################## OPTIONS CREATION @@ -237,7 +275,7 @@ function PLUGIN:AppendAddonOption(addon) end end } -end; +end local RegisterAddonDocklets = function() local MAIN = _G["SuperDockletMain"]; @@ -245,7 +283,7 @@ local RegisterAddonDocklets = function() local main = SuperVillain.db.SVDock.docklets.DockletMain; local alternate = SuperVillain.db.SVDock.docklets.enableExtra and SuperVillain.db.SVDock.docklets.DockletExtra or ""; local tipLeft, tipRight = "", ""; - if main == nil or main == "None" then return end; + if main == nil or main == "None" then return end if find(main, "Skada") or find(alternate, "Skada") then if SuperVillain:IsDockletReady("Skada") then @@ -260,8 +298,8 @@ local RegisterAddonDocklets = function() SuperVillain:RegisterMainDocklet("SkadaHolder") --PLUGIN.DockedParent["Skada"] = MAIN end - end; - end; + end + end if main == "Omen" or alternate == "Omen" then if SuperVillain:IsDockletReady("Omen") then if alternate == "Omen" and EXTRA.FrameName ~= "OmenAnchor" then @@ -275,8 +313,8 @@ local RegisterAddonDocklets = function() PLUGIN:Docklet_Omen(MAIN) PLUGIN.DockedParent["Omen"] = MAIN end - end; - end; + end + end if main == "Recount" or alternate == "Recount" then if SuperVillain:IsDockletReady("Recount") then if alternate == "Recount" and EXTRA.FrameName ~= "Recount_MainWindow" then @@ -290,8 +328,8 @@ local RegisterAddonDocklets = function() PLUGIN:Docklet_Recount(MAIN) PLUGIN.DockedParent["Recount"] = MAIN end - end; - end; + end + end if main == "TinyDPS" or alternate == "TinyDPS" then if SuperVillain:IsDockletReady("TinyDPS") then if alternate == "TinyDPS" and EXTRA.FrameName ~= "tdpsFrame" then @@ -305,8 +343,8 @@ local RegisterAddonDocklets = function() PLUGIN:Docklet_TinyDPS(MAIN) PLUGIN.DockedParent["TinyDPS"] = MAIN end - end; - end; + end + end if main == "alDamageMeter" or alternate == "alDamageMeter" then if SuperVillain:IsDockletReady("alDamageMeter") then if alternate == "alDamageMeter" and EXTRA.FrameName ~= "alDamagerMeterFrame" then @@ -320,30 +358,25 @@ local RegisterAddonDocklets = function() PLUGIN:Docklet_alDamageMeter(MAIN) PLUGIN.DockedParent["alDamageMeter"] = MAIN end - end; - end; + end + end if(_G["SVUI_AddonDocklet"]) then _G["SVUI_AddonDocklet"].TText = ("%s%s"):format(tipLeft, tipRight) end -end; +end --[[ ########################################################## BUILD FUNCTION ########################################################## ]]-- local Registry_OnEvent = function(self, event, ...) - if(event == "ADDON_LOADED") then - local addon = select(1, ...) - if PLUGIN.PassiveAddons[addon] then - PLUGIN.BlizzardQueue[addon]() - PLUGIN.BlizzardQueue[addon] = nil; - return - end; - if not SuperVillain.AddonLaunched or not PLUGIN.BlizzardQueue[addon] then return end; - PLUGIN.BlizzardQueue[addon]() - PLUGIN.BlizzardQueue[addon] = nil - elseif(PLUGIN[event]) then + if(event == "PLAYER_ENTERING_WORLD") then + PLUGIN:StyleInit(event, ...) + elseif(event == "ADDON_LOADED") then + PLUGIN:StyleOnDemand(event, ...) + end + if(PLUGIN[event]) then PLUGIN[event](PLUGIN, event, ...) end end @@ -690,13 +723,12 @@ local function LoadStyleOMatic() alert:Hide(); PLUGIN.Alert = alert; - PLUGIN:LoadStyles(); - NewHook(SuperVillain, "ReloadDocklets", RegisterAddonDocklets); SuperVillain:ReloadDocklets(); SuperVillain.DynamicOptions["SVStyle"] = {key = "addons", data = PLUGIN.OptionsCache}; - SVUIAddonEventHandler:RegisterEvent('ADDON_LOADED'); + SVUIAddonEventHandler:RegisterEvent("ADDON_LOADED", "StyleOnDemand"); + SVUIAddonEventHandler:RegisterEvent("PLAYER_ENTERING_WORLD", "StyleInit"); end CONFIGS["SVStyle"] = { @@ -774,7 +806,9 @@ CONFIGS["SVStyle"] = { ["Clique"] = true, ["CoolLine"] = true, ["ACP"] = true, - ["DXE"] = true, + ["DXE"] = true, + ["DBM-Core"] = true, + ["VEM"] = true, ["MogIt"] = true, ["alDamageMeter"] = true, ["Omen"] = true, diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc index 6ee4d2d..5705bc8 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc @@ -1,6 +1,6 @@ -## Interface: 60100 +## Interface: 50400 ## Author: Munglunch, Azilroka, Sortokk -## Version: 4.081 +## Version: 4.082 ## Title: |cffFF9900SVUI |r|cffFFEF00Style O Matic|r ## Notes: Supervillain UI [|cff9911FFAddon Skins|r]. ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua index 99ecfd1..ce87424 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua @@ -61,7 +61,7 @@ local function AlertStyle() frame.Panel:Point("TOPLEFT", _G[frame:GetName().."Background"], "TOPLEFT", -2, -6) frame.Panel:Point("BOTTOMRIGHT", _G[frame:GetName().."Background"], "BOTTOMRIGHT", -2, 6) end; - _G["AchievementAlertFrame"..i.."Background"]:SetTexture(nil) + _G["AchievementAlertFrame"..i.."Background"]:SetTexture(0,0,0,0) _G["AchievementAlertFrame"..i.."OldAchievement"]:MUNG() _G["AchievementAlertFrame"..i.."Glow"]:MUNG() _G["AchievementAlertFrame"..i.."Shine"]:MUNG() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua index d5b6b81..329d689 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua @@ -95,7 +95,6 @@ local function AuctionStyle() STYLE:ApplyScrollStyle(BrowseScrollFrameScrollBar) IsUsableCheckButton:SetCheckboxTemplate(true) ShowOnPlayerCheckButton:SetCheckboxTemplate(true) - ExactMatchCheckButton:SetCheckboxTemplate(true) SideDressUpFrame:Formula409(true) SideDressUpFrame:SetPanelTemplate("Halftone") SideDressUpFrame:Point("TOPLEFT", AuctionFrame, "TOPRIGHT", 7, 0) @@ -143,8 +142,8 @@ local function AuctionStyle() BrowseBuyoutButton:Point("RIGHT", BrowseCloseButton, "LEFT", -4, 0) BrowseBidButton:Point("RIGHT", BrowseBuyoutButton, "LEFT", -4, 0) - --BrowseResetButton:Point("TOPLEFT", AuctionFrameBrowse, "TOPLEFT", 81, -74) - --BrowseSearchButton:Point("RIGHT", BrowseResetButton, "LEFT", 25, -34) + BrowseResetButton:Point("TOPLEFT", AuctionFrameBrowse, "TOPLEFT", 81, -74) + BrowseSearchButton:Point("TOPRIGHT", AuctionFrameBrowse, "TOPRIGHT", 25, -34) AuctionsItemButton:Formula409() AuctionsItemButton:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua index aab4126..63e305d 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua @@ -113,7 +113,7 @@ local function EquipmentFlyout_OnShow() local texture = _G["EquipmentFlyoutFrameButton"..counter.."IconTexture"] button:SetButtonTemplate() texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - button:GetNormalTexture():SetTexture(nil) + button:GetNormalTexture():SetTexture(0,0,0,0) texture:FillInner() button:SetFrameLevel(button:GetFrameLevel() + 2) if not button.Panel then @@ -162,13 +162,13 @@ local function Reputation_OnShow() if not bar.Panel then bar:SetPanelTemplate("Inset") end; - _G["ReputationBar"..i.."Background"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarHighlight1"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarHighlight2"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarAtWarHighlight1"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarAtWarHighlight2"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarLeftTexture"]:SetTexture(nil) - _G["ReputationBar"..i.."ReputationBarRightTexture"]:SetTexture(nil) + _G["ReputationBar"..i.."Background"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarHighlight1"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarHighlight2"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarAtWarHighlight1"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarAtWarHighlight2"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarLeftTexture"]:SetTexture(0,0,0,0) + _G["ReputationBar"..i.."ReputationBarRightTexture"]:SetTexture(0,0,0,0) end end end; @@ -250,10 +250,10 @@ local function CharacterFrameStyle() for _,btn in pairs(CharFrameList)do _G[btn]:Formula409(true) end; - CharacterModelFrameBackgroundTopLeft:SetTexture(nil) - CharacterModelFrameBackgroundTopRight:SetTexture(nil) - CharacterModelFrameBackgroundBotLeft:SetTexture(nil) - CharacterModelFrameBackgroundBotRight:SetTexture(nil) + CharacterModelFrameBackgroundTopLeft:SetTexture(0,0,0,0) + CharacterModelFrameBackgroundTopRight:SetTexture(0,0,0,0) + CharacterModelFrameBackgroundBotLeft:SetTexture(0,0,0,0) + CharacterModelFrameBackgroundBotRight:SetTexture(0,0,0,0) CharacterFrame:SetPanelTemplate("Action") CharacterModelFrame:SetPanelTemplate("Comic", false, 0) CharacterFrameExpandButton:SetFrameLevel(CharacterModelFrame:GetFrameLevel() + 5) @@ -261,10 +261,10 @@ local function CharacterFrameStyle() PaperDollTitlesPane:SetFixedPanelTemplate("Inset") PaperDollTitlesPane:HookScript("OnShow", function(f) for _,btn in pairs(PaperDollTitlesPane.buttons)do - btn.BgTop:SetTexture(nil) - btn.BgBottom:SetTexture(nil) - btn.BgMiddle:SetTexture(nil) - btn.Check:SetTexture(nil) + btn.BgTop:SetTexture(0,0,0,0) + btn.BgBottom:SetTexture(0,0,0,0) + btn.BgMiddle:SetTexture(0,0,0,0) + btn.Check:SetTexture(0,0,0,0) btn.text:FillInner(btn) btn.text:SetFontTemplate(SuperVillain.Media.font.roboto,10,"NONE","LEFT") end @@ -276,14 +276,14 @@ local function CharacterFrameStyle() PaperDollEquipmentManagerPaneSaveSet:Width(PaperDollEquipmentManagerPaneSaveSet:GetWidth()-8) PaperDollEquipmentManagerPaneEquipSet:Point("TOPLEFT", PaperDollEquipmentManagerPane, "TOPLEFT", 8, 0) PaperDollEquipmentManagerPaneSaveSet:Point("LEFT", PaperDollEquipmentManagerPaneEquipSet, "RIGHT", 4, 0) - PaperDollEquipmentManagerPaneEquipSet.ButtonBackground:SetTexture(nil) + PaperDollEquipmentManagerPaneEquipSet.ButtonBackground:SetTexture(0,0,0,0) PaperDollEquipmentManagerPane:HookScript("OnShow", function(f) for _,btn in pairs(PaperDollEquipmentManagerPane.buttons)do - btn.BgTop:SetTexture(nil) - btn.BgBottom:SetTexture(nil) - btn.BgMiddle:SetTexture(nil) + btn.BgTop:SetTexture(0,0,0,0) + btn.BgBottom:SetTexture(0,0,0,0) + btn.BgMiddle:SetTexture(0,0,0,0) btn.icon:Size(36, 36) - btn.Check:SetTexture(nil) + btn.Check:SetTexture(0,0,0,0) btn.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) btn.icon:SetPoint("LEFT", btn, "LEFT", 4, 0) hooksecurefunc(btn.icon, "SetPoint", function(f, g, h, i, j, k, X) @@ -315,7 +315,7 @@ local function CharacterFrameStyle() e:Formula409() e:SetButtonTemplate() texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G["GearManagerDialogPopupButton"..i.."Icon"]:SetTexture(nil) + _G["GearManagerDialogPopupButton"..i.."Icon"]:SetTexture(0,0,0,0) texture:FillInner() e:SetFrameLevel(e:GetFrameLevel() + 2) if not e.Panel then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua index 6e89c25..265edb6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua @@ -89,9 +89,9 @@ local function TabCustomHelper(this) if not this then return end; for _,prop in pairs(FrameSuffix) do local frame = _G[this:GetName()..prop] - frame:SetTexture(nil) + frame:SetTexture(0,0,0,0) end; - this:GetHighlightTexture():SetTexture(nil) + this:GetHighlightTexture():SetTexture(0,0,0,0) this.backdrop = CreateFrame("Frame", nil, this) this.backdrop:SetFixedPanelTemplate("Default") this.backdrop:SetFrameLevel(this:GetFrameLevel()-1) @@ -140,16 +140,16 @@ local function FriendsFrameStyle() for c, e in pairs(FriendsFrameButtons)do _G[e]:SetButtonTemplate() end; - -- for c, texture in pairs(FriendsFrameList2)do - -- _G[texture]:MUNG() - -- end; + for c, texture in pairs(FriendsFrameList2)do + _G[texture]:MUNG() + end; for c, V in pairs(FriendsFrameList1)do _G[V]:Formula409() end; for u = 1, FriendsFrame:GetNumRegions()do local a1 = select(u, FriendsFrame:GetRegions()) if a1:GetObjectType() == "Texture"then - a1:SetTexture(nil) + a1:SetTexture(0,0,0,0) a1:SetAlpha(0) end end; @@ -237,6 +237,7 @@ local function FriendsFrameStyle() FriendsTabHeaderRecruitAFriendButtonIcon:SetDrawLayer('OVERLAY') FriendsTabHeaderRecruitAFriendButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) FriendsTabHeaderRecruitAFriendButtonIcon:FillInner() + FriendsTabHeaderRecruitAFriendButton:Point('TOPRIGHT', FriendsTabHeaderSoRButton, 'TOPLEFT', -4, 0) FriendsFrameIgnoreScrollFrame:SetFixedPanelTemplate("Inset") STYLE:ApplyScrollStyle(FriendsFrameIgnoreScrollFrameScrollBar, 4) FriendsFramePendingScrollFrame:SetFixedPanelTemplate("Inset") @@ -246,9 +247,9 @@ local function FriendsFrameStyle() ScrollOfResurrectionFrame:Formula409() ScrollOfResurrectionFrameAcceptButton:SetButtonTemplate() ScrollOfResurrectionFrameCancelButton:SetButtonTemplate() - ScrollOfResurrectionFrameTargetEditBoxLeft:SetTexture(nil) - ScrollOfResurrectionFrameTargetEditBoxMiddle:SetTexture(nil) - ScrollOfResurrectionFrameTargetEditBoxRight:SetTexture(nil) + ScrollOfResurrectionFrameTargetEditBoxLeft:SetTexture(0,0,0,0) + ScrollOfResurrectionFrameTargetEditBoxMiddle:SetTexture(0,0,0,0) + ScrollOfResurrectionFrameTargetEditBoxRight:SetTexture(0,0,0,0) ScrollOfResurrectionFrameNoteFrame:Formula409() ScrollOfResurrectionFrameNoteFrame:SetFixedPanelTemplate() ScrollOfResurrectionFrameTargetEditBox:SetFixedPanelTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua index e61a90b..2320753 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua @@ -191,7 +191,7 @@ local function GuildBankStyle() local icon = _G["GuildBankColumn"..b.."Button"..d.."IconTexture"] local texture = _G["GuildBankColumn"..b.."Button"..d.."NormalTexture"] if texture then - texture:SetTexture(nil) + texture:SetTexture(0,0,0,0) end; e:SetSlotTemplate() icon:FillInner() @@ -328,18 +328,7 @@ local function GuildFrameStyle() GuildNextPerkButtonIconTexture:Point("TOPLEFT", 2, -2) GuildNextPerkButton:SetPanelTemplate("Inset") GuildNextPerkButton.Panel:WrapOuter(GuildNextPerkButtonIconTexture) - for b = 1, 8 do - local e = _G["GuildPerksContainerButton"..b] - e:Formula409() - if e.icon then - e.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - e.icon:ClearAllPoints() - e.icon:Point("TOPLEFT", 2, -2) - e:SetFixedPanelTemplate("Button") - e.Panel:WrapOuter(e.icon) - e.icon:SetParent(e.Panel) - end - end; + GuildRosterContainer:SetFixedPanelTemplate("Pattern") STYLE:ApplyScrollStyle(GuildRosterContainerScrollBar, 5) GuildRosterShowOfflineButton:SetCheckboxTemplate(true) @@ -414,16 +403,32 @@ local function GuildFrameStyle() GuildRewardsFrame:SetFixedPanelTemplate("Pattern") STYLE:ApplyScrollStyle(GuildRewardsContainerScrollBar, 5) for b = 1, 8 do + local button = _G["GuildPerksContainerButton"..b] + if button then + button:Formula409() + if button.icon then + button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button.icon:ClearAllPoints() + button.icon:Point("TOPLEFT", button, "TOPLEFT", 2, -2) + button:SetFixedPanelTemplate("Button") + button.Panel:WrapOuter(button.icon) + button.icon:SetParent(button.Panel) + end + end + end; + for b = 1, 8 do local button = _G["GuildRewardsContainerButton"..b] - button:Formula409() - if button.icon then - button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - button.icon:ClearAllPoints() - button.icon:Point("TOPLEFT", 2, -2) - button:SetFixedPanelTemplate("Button") - button.Panel:WrapOuter(button.icon) - button.icon:SetParent(button.Panel) - end + if button then + button:Formula409() + if button.icon then + button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button.icon:ClearAllPoints() + button.icon:Point("TOPLEFT", button, "TOPLEFT", 2, -2) + button:SetFixedPanelTemplate("Button") + button.Panel:WrapOuter(button.icon) + button.icon:SetParent(button.Panel) + end + end end; local maxCalendarEvents = CalendarGetNumGuildEvents(); local scrollFrame = GuildInfoFrameApplicantsContainer; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua index d73de09..0fe3c18 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua @@ -44,7 +44,7 @@ local function NavBarHelper(button) local i = button.navList[d] local j = button.navList[d-1] if i and j then - i:SetFrameLevel(0) + i:SetFrameLevel(j:GetFrameLevel()-2) end end end; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua index d7ce787..85fafa8 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua @@ -23,31 +23,26 @@ KEYBINDING STYLER local function BindingStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.binding ~= true then return end; local buttons = {"KeyBindingFrameDefaultButton", "KeyBindingFrameUnbindButton", "KeyBindingFrameOkayButton", "KeyBindingFrameCancelButton"} - for l, m in pairs(buttons)do - local btn = _G[m] - if(btn) then - btn:Formula409() - btn:SetFixedPanelTemplate("Default") - end + for l, m in pairs(buttons)do + _G[m]:Formula409()_G[m]:SetFixedPanelTemplate("Default") end; STYLE:ApplyScrollStyle(KeyBindingFrameScrollFrameScrollBar) - --KeyBindingFrameCharacterButton:SetCheckboxTemplate(true) - --KeyBindingFrameHeaderText:ClearAllPoints() - --KeyBindingFrameHeaderText:Point("TOP", KeyBindingFrame, "TOP", 0, -4) + KeyBindingFrameCharacterButton:SetCheckboxTemplate(true) + KeyBindingFrameHeaderText:ClearAllPoints() + KeyBindingFrameHeaderText:Point("TOP", KeyBindingFrame, "TOP", 0, -4) KeyBindingFrame:Formula409() KeyBindingFrame:SetPanelTemplate("Halftone") - -- for b = 1, KEY_BINDINGS_DISPLAYED do - -- local n = _G["KeyBindingFrameBinding"..b.."Key1Button"] - -- local o = _G["KeyBindingFrameBinding"..b.."Key2Button"] - -- n:Formula409(true) - -- n:SetButtonTemplate() - -- n:SetFixedPanelTemplate("Default") - -- o:Formula409(true) - -- o:SetButtonTemplate() - -- o:SetFixedPanelTemplate("Default") - -- end; - -- KeyBindingFrameUnbindButton:Point("RIGHT", KeyBindingFrameOkayButton, "LEFT", -3, 0) - -- KeyBindingFrameOkayButton:Point("RIGHT", KeyBindingFrameCancelButton, "LEFT", -3, 0) + for b = 1, KEY_BINDINGS_DISPLAYED do + local n = _G["KeyBindingFrameBinding"..b.."Key1Button"] + local o = _G["KeyBindingFrameBinding"..b.."Key2Button"] + n:Formula409(true) + n:SetButtonTemplate() + n:SetFixedPanelTemplate("Default") + o:Formula409(true) + o:SetButtonTemplate() + o:SetFixedPanelTemplate("Default") + end; + KeyBindingFrameUnbindButton:Point("RIGHT", KeyBindingFrameOkayButton, "LEFT", -3, 0)KeyBindingFrameOkayButton:Point("RIGHT", KeyBindingFrameCancelButton, "LEFT", -3, 0) end; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua index b906ff0..37f4541 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua @@ -207,7 +207,7 @@ local function LFDFrameStyle() for u = 1, 4 do local v = GroupFinderFrame["groupButton"..u] v.ring:Hide() - v.bg:SetTexture("") + v.bg:SetTexture(0,0,0,0) v.bg:SetAllPoints() v:SetFixedPanelTemplate('Button') v:SetButtonTemplate() @@ -244,13 +244,13 @@ local function LFDFrameStyle() end) STYLE:ApplyDropdownStyle(LFDQueueFrameTypeDropDown) - --FlexRaidFrameScrollFrame:Formula409() - --FlexRaidFrameBottomInset:Formula409() - -- hooksecurefunc("FlexRaidFrame_Update", function() - -- FlexRaidFrame.ScrollFrame.Background:SetTexture(nil) - -- end) - -- STYLE:ApplyDropdownStyle(FlexRaidFrameSelectionDropDown) - -- FlexRaidFrameStartRaidButton:SetButtonTemplate() + FlexRaidFrameScrollFrame:Formula409() + FlexRaidFrameBottomInset:Formula409() + hooksecurefunc("FlexRaidFrame_Update", function() + FlexRaidFrame.ScrollFrame.Background:SetTexture(0,0,0,0) + end) + STYLE:ApplyDropdownStyle(FlexRaidFrameSelectionDropDown) + FlexRaidFrameStartRaidButton:SetButtonTemplate() RaidFinderFrame:Formula409() RaidFinderFrameBottomInset:Formula409() RaidFinderFrameRoleInset:Formula409() @@ -328,12 +328,12 @@ local function LFDFrameStyle() C:SetPanelTemplate() hooksecurefunc(C:GetHighlightTexture(), "SetTexture", function(o, D) if D ~= nil then - o:SetTexture(nil) + o:SetTexture(0,0,0,0) end end) hooksecurefunc(C:GetCheckedTexture(), "SetTexture", function(o, D) if D ~= nil then - o:SetTexture(nil) + o:SetTexture(0,0,0,0) end end) end; @@ -364,7 +364,7 @@ local function LFDFrameStyle() LFDQueueFrameRandomScrollFrame:SetFixedPanelTemplate("Inset") ScenarioQueueFrameRandomScrollFrame:SetFixedPanelTemplate("Inset") RaidFinderQueueFrameScrollFrame:SetFixedPanelTemplate("Inset") - --FlexRaidFrameScrollFrame:SetFixedPanelTemplate("Inset") + FlexRaidFrameScrollFrame:SetFixedPanelTemplate("Inset") for u = 1, NUM_LFD_CHOICE_BUTTONS do local box = _G["LFDQueueFrameSpecificListButton"..u.."EnableButton"] if(box and (not box.Panel)) then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua index c6989a5..7d6bae0 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua @@ -67,9 +67,9 @@ local function MacroUIStyle() MacroPopupScrollFrame.Panel:Point("TOPLEFT", 51, 2) MacroPopupScrollFrame.Panel:Point("BOTTOMRIGHT", -4, 4) MacroPopupEditBox:SetEditboxTemplate() - MacroPopupNameLeft:SetTexture(nil) - MacroPopupNameMiddle:SetTexture(nil) - MacroPopupNameRight:SetTexture(nil) + MacroPopupNameLeft:SetTexture(0,0,0,0) + MacroPopupNameMiddle:SetTexture(0,0,0,0) + MacroPopupNameRight:SetTexture(0,0,0,0) MacroFrameInset:MUNG() MacroEditButton:ClearAllPoints() MacroEditButton:Point("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 10, 0) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua index 73c8ebf..4218e8a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua @@ -25,19 +25,19 @@ local PBAB_HEIGHT = 72; local PetBattleActionBar = CreateFrame("Frame", "SVUI_PetBattleActionBar", UIParent) local function PetBattleSetTooltip(frame) - frame.Background:SetTexture(nil) + frame.Background:SetTexture(0,0,0,0) if frame.Delimiter1 then - frame.Delimiter1:SetTexture(nil) - frame.Delimiter2:SetTexture(nil) + frame.Delimiter1:SetTexture(0,0,0,0) + frame.Delimiter2:SetTexture(0,0,0,0) end; - frame.BorderTop:SetTexture(nil) - frame.BorderTopLeft:SetTexture(nil) - frame.BorderTopRight:SetTexture(nil) - frame.BorderLeft:SetTexture(nil) - frame.BorderRight:SetTexture(nil) - frame.BorderBottom:SetTexture(nil) - frame.BorderBottomRight:SetTexture(nil) - frame.BorderBottomLeft:SetTexture(nil) + frame.BorderTop:SetTexture(0,0,0,0) + frame.BorderTopLeft:SetTexture(0,0,0,0) + frame.BorderTopRight:SetTexture(0,0,0,0) + frame.BorderLeft:SetTexture(0,0,0,0) + frame.BorderRight:SetTexture(0,0,0,0) + frame.BorderBottom:SetTexture(0,0,0,0) + frame.BorderBottomRight:SetTexture(0,0,0,0) + frame.BorderBottomLeft:SetTexture(0,0,0,0) frame:SetFixedPanelTemplate("Transparent", true) end; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua index 8e0a297..7442216 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua @@ -280,19 +280,19 @@ local function PetJournalStyle() PetJournalPetCardPetInfo.Panel:WrapOuter(PetJournalPetCardPetInfoIcon) PetJournalPetCardPetInfoIcon:SetParent(PetJournalPetCardPetInfo.Panel) PetJournalPetCardPetInfo.level:SetParent(PetJournalPetCardPetInfo.Panel) - local R = PetJournalPrimaryAbilityTooltip;R.Background:SetTexture(nil) + local R = PetJournalPrimaryAbilityTooltip;R.Background:SetTexture(0,0,0,0) if R.Delimiter1 then - R.Delimiter1:SetTexture(nil) - R.Delimiter2:SetTexture(nil) + R.Delimiter1:SetTexture(0,0,0,0) + R.Delimiter2:SetTexture(0,0,0,0) end - R.BorderTop:SetTexture(nil) - R.BorderTopLeft:SetTexture(nil) - R.BorderTopRight:SetTexture(nil) - R.BorderLeft:SetTexture(nil) - R.BorderRight:SetTexture(nil) - R.BorderBottom:SetTexture(nil) - R.BorderBottomRight:SetTexture(nil) - R.BorderBottomLeft:SetTexture(nil) + R.BorderTop:SetTexture(0,0,0,0) + R.BorderTopLeft:SetTexture(0,0,0,0) + R.BorderTopRight:SetTexture(0,0,0,0) + R.BorderLeft:SetTexture(0,0,0,0) + R.BorderRight:SetTexture(0,0,0,0) + R.BorderBottom:SetTexture(0,0,0,0) + R.BorderBottomRight:SetTexture(0,0,0,0) + R.BorderBottomLeft:SetTexture(0,0,0,0) R:SetFixedPanelTemplate("Transparent", true) for b = 1, 6 do local S = _G['PetJournalPetCardSpell'..b] diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua index 8ad3024..3156060 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua @@ -28,6 +28,7 @@ local function PVPFrameStyle() end; PVPUIFrame:Formula409() PVPUIFrame:SetPanelTemplate("Action") + PVPUIFrame.Shadows:Formula409() STYLE:ApplyCloseButtonStyle(PVPUIFrameCloseButton) for g = 1, 2 do STYLE:ApplyTabStyle(_G["PVPUIFrameTab"..g]) @@ -58,11 +59,11 @@ local function PVPFrameStyle() HonorFrame.BonusFrame.RandomBGButton:SetButtonTemplate() HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:FillInner() HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) - -- HonorFrame.BonusFrame.CallToArmsButton:Formula409() - -- HonorFrame.BonusFrame.CallToArmsButton:SetFixedPanelTemplate("Button") - -- HonorFrame.BonusFrame.CallToArmsButton:SetButtonTemplate() - -- HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:FillInner() - -- HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) + HonorFrame.BonusFrame.CallToArmsButton:Formula409() + HonorFrame.BonusFrame.CallToArmsButton:SetFixedPanelTemplate("Button") + HonorFrame.BonusFrame.CallToArmsButton:SetButtonTemplate() + HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:FillInner() + HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) HonorFrame.BonusFrame.DiceButton:DisableDrawLayer("ARTWORK") HonorFrame.BonusFrame.DiceButton:SetHighlightTexture("") HonorFrame.RoleInset:Formula409() @@ -80,14 +81,14 @@ local function PVPFrameStyle() n.bg:SetDesaturated(true) end end) - -- for g = 1, 2 do - -- local I = HonorFrame.BonusFrame["WorldPVP"..g.."Button"] - -- I:Formula409() - -- I:SetFixedPanelTemplate("Button", true) - -- I:SetButtonTemplate() - -- I.SelectedTexture:FillInner() - -- I.SelectedTexture:SetTexture(1, 1, 0, 0.1) - -- end; + for g = 1, 2 do + local I = HonorFrame.BonusFrame["WorldPVP"..g.."Button"] + I:Formula409() + I:SetFixedPanelTemplate("Button", true) + I:SetButtonTemplate() + I.SelectedTexture:FillInner() + I.SelectedTexture:SetTexture(1, 1, 0, 0.1) + end; ConquestFrame.Inset:Formula409() ConquestPointsBarLeft:MUNG() ConquestPointsBarRight:MUNG() @@ -115,7 +116,7 @@ local function PVPFrameStyle() STYLE:ApplyScrollStyle(WarGamesFrameScrollFrameScrollBar) STYLE:ApplyScrollStyle(WarGamesFrameInfoScrollFrameScrollBar) WarGamesFrame.HorizontalBar:Formula409() - --PVPUIFrame.LeftInset:Formula409() + PVPUIFrame.LeftInset:Formula409() PVPReadyDialog:Formula409() PVPReadyDialog:SetPanelTemplate("Pattern") PVPReadyDialogEnterBattleButton:SetButtonTemplate() @@ -145,6 +146,6 @@ end; STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle('Blizzard_PVPUI', PVPFrameStyle, true, nil, true) +STYLE:SaveBlizzardStyle('Blizzard_PVPUI', PVPFrameStyle, true) -- /script StaticPopupSpecial_Show(PVPReadyDialog) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua index 8ab9af6..0fa3b3b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua @@ -83,30 +83,30 @@ local function QuestFrameStyle() STYLE:ApplyScrollStyle(QuestLogScrollFrameScrollBar, 5) STYLE:ApplyScrollStyle(QuestProgressScrollFrameScrollBar) STYLE:ApplyScrollStyle(QuestRewardScrollFrameScrollBar) - --QuestLogScrollFrame:Formula409() - -- QuestLogFrame:Formula409() - -- QuestLogFrame:SetPanelTemplate("Halftone") - -- QuestLogCount:Formula409() - -- QuestLogCount:SetFixedPanelTemplate("Default") - -- EmptyQuestLogFrame:Formula409() - -- QuestLogDetailFrameInset:MUNG() - -- STYLE:ApplyScrollStyle(QuestDetailScrollFrameScrollBar) - -- QuestProgressScrollFrame:Formula409() - -- QuestLogFrameShowMapButton:Formula409() - -- QuestLogFrameShowMapButton:SetButtonTemplate() - -- QuestLogFrameShowMapButton.text:ClearAllPoints() - -- QuestLogFrameShowMapButton.text:SetPoint("CENTER") - -- QuestLogFrameShowMapButton:Size(QuestLogFrameShowMapButton:GetWidth()-30, QuestLogFrameShowMapButton:GetHeight(), -40) + QuestLogScrollFrame:Formula409() + QuestLogFrame:Formula409() + QuestLogFrame:SetPanelTemplate("Halftone") + QuestLogCount:Formula409() + QuestLogCount:SetFixedPanelTemplate("Default") + EmptyQuestLogFrame:Formula409() + QuestLogDetailFrameInset:MUNG() + STYLE:ApplyScrollStyle(QuestDetailScrollFrameScrollBar) + QuestProgressScrollFrame:Formula409() + QuestLogFrameShowMapButton:Formula409() + QuestLogFrameShowMapButton:SetButtonTemplate() + QuestLogFrameShowMapButton.text:ClearAllPoints() + QuestLogFrameShowMapButton.text:SetPoint("CENTER") + QuestLogFrameShowMapButton:Size(QuestLogFrameShowMapButton:GetWidth()-30, QuestLogFrameShowMapButton:GetHeight(), -40) QuestGreetingScrollFrame:Formula409() STYLE:ApplyScrollStyle(QuestGreetingScrollFrameScrollBar) - -- QuestLogFrameInset:MUNG() - -- QuestLogFrameCompleteButton:Formula409() - -- 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) + QuestLogFrameInset:MUNG() + QuestLogFrameCompleteButton:Formula409() + 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) for j = 1, MAX_NUM_ITEMS do local cLvl = _G["QuestInfoItem"..j]:GetFrameLevel() + 1 _G["QuestInfoItem"..j]:Formula409() @@ -141,27 +141,27 @@ local function QuestFrameStyle() QuestInfoItemHighlight:ClearAllPoints() QuestInfoItemHighlight:SetAllPoints(k) 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) - -- 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) + 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) QuestRewardScrollFrame:HookScript('OnShow', function(k) if not k.Panel then k:SetPanelTemplate("Default") @@ -244,5 +244,5 @@ end; STYLE LOADING ########################################################## ]]-- ---STYLE:SaveCustomStyle(QuestFrameStyle) +STYLE:SaveCustomStyle(QuestFrameStyle) STYLE:SaveCustomStyle(QuestGreetingStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua index 990e6fe..4f437f2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/reforging.lua @@ -39,7 +39,7 @@ local function ReforgingStyle() if x then ReforgingFrame.ItemButton.IconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) else - ReforgingFrame.ItemButton.IconTexture:SetTexture(nil) + ReforgingFrame.ItemButton.IconTexture:SetTexture(0,0,0,0) end end) STYLE:ApplyCloseButtonStyle(ReforgingFrameCloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua index c6249b4..90ad3bc 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/spellbook.lua @@ -14,62 +14,110 @@ 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; +local STYLE = _G.StyleVillain +--[[ +########################################################## +FRAME LISTS +########################################################## +]]-- +local bookFrames = { + "SpellBookFrame", + "SpellBookFrameInset", + "SpellBookSpellIconsFrame", + "SpellBookSideTabsFrame", + "SpellBookPageNavigationFrame" +} +local proButtons = { + "PrimaryProfession1SpellButtonTop", + "PrimaryProfession1SpellButtonBottom", + "PrimaryProfession2SpellButtonTop", + "PrimaryProfession2SpellButtonBottom", + "SecondaryProfession1SpellButtonLeft", + "SecondaryProfession1SpellButtonRight", + "SecondaryProfession2SpellButtonLeft", + "SecondaryProfession2SpellButtonRight", + "SecondaryProfession3SpellButtonLeft", + "SecondaryProfession3SpellButtonRight", + "SecondaryProfession4SpellButtonLeft", + "SecondaryProfession4SpellButtonRight" +} + +local proFrames = { + "PrimaryProfession1", + "PrimaryProfession2", + "SecondaryProfession1", + "SecondaryProfession2", + "SecondaryProfession3", + "SecondaryProfession4" +} +local proBars = { + "PrimaryProfession1StatusBar", + "PrimaryProfession2StatusBar", + "SecondaryProfession1StatusBar", + "SecondaryProfession2StatusBar", + "SecondaryProfession3StatusBar", + "SecondaryProfession4StatusBar" +} --[[ ########################################################## HELPERS ########################################################## ]]-- local function Tab_OnEnter(this) - this.backdrop:SetPanelColor("highlight") + this.backdrop:SetBackdropColor(unpack(SuperVillain.Media.color.highlight)) this.backdrop:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) end local function Tab_OnLeave(this) - this.backdrop:SetPanelColor("dark") + this.backdrop:SetBackdropColor(0,0,0,1) this.backdrop:SetBackdropBorderColor(0,0,0,1) end local function ChangeTabHelper(this) this:Formula409() - this:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - this:GetNormalTexture():FillInner() + local nTex = this:GetNormalTexture() + if(nTex) then + nTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + nTex:FillInner() + end + this.pushed = true; + this.backdrop = CreateFrame("Frame", nil, this) this.backdrop:WrapOuter(this,1,1) - local level = this:GetFrameLevel() - if(level > 0) then - this.backdrop:SetFrameLevel(level - 1) - else - this.backdrop:SetFrameLevel(0) - end - this.backdrop:SetFixedPanelTemplate("Component", true) - this.backdrop:SetPanelColor("dark") - this:HookScript("OnEnter",Tab_OnEnter) - this:HookScript("OnLeave",Tab_OnLeave) - hooksecurefunc(this:GetHighlightTexture(), "SetTexture", function(i, w) - if w ~= nil then - i:SetTexture(nil) - end - end) - hooksecurefunc(this:GetCheckedTexture(), "SetTexture", function(i, w) - if w ~= nil then - i:SetTexture(nil) - end - end) + this.backdrop:SetFrameLevel(0) + this.backdrop:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeFile = [[Interface\AddOns\SVUI\assets\artwork\Template\GLOW]], + edgeSize = 3, + insets = { + left = 0, + right = 0, + top = 0, + bottom = 0 + } + }); + this.backdrop:SetBackdropColor(0,0,0,1) + this.backdrop:SetBackdropBorderColor(0,0,0,1) + this:SetScript("OnEnter", Tab_OnEnter) + this:SetScript("OnLeave", Tab_OnLeave) + local a,b,c,d,e = this:GetPoint() this:Point(a,b,c,1,e) -end; - -local function GetSpecTabHelper(tab) - local i = SpellBookCoreAbilitiesFrame.SpecTabs[tab] - ChangeTabHelper(i) - if tab > 1 then - local o, Y, Z, h, s = i:GetPoint() - i:ClearAllPoints() - i:SetPoint(o, Y, Z, 0, s) +end + +local function GetSpecTabHelper(index) + local tab = SpellBookCoreAbilitiesFrame.SpecTabs[index] + if(not tab) then return end + ChangeTabHelper(tab) + if index > 1 then + local o, Y, Z, h, s = tab:GetPoint() + tab:ClearAllPoints() + tab:SetPoint(o, Y, Z, 0, s) end -end; +end local function SkillTabUpdateHelper() for j = 1, MAX_SKILLLINE_TABS do @@ -80,36 +128,36 @@ local function SkillTabUpdateHelper() S:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) end end -end; +end local function AbilityButtonHelper(j) local i = SpellBookCoreAbilitiesFrame.Abilities[j] - if i.styled then return end; + if i.styled then return end local x = i.iconTexture; if not InCombatLockdown() then if not i.properFrameLevel then i.properFrameLevel = i:GetFrameLevel() + 1 - end; + end i:SetFrameLevel(i.properFrameLevel) - end; + end if not i.styled then for j = 1, i:GetNumRegions()do local N = select(j, i:GetRegions()) if N:GetObjectType() == "Texture"then if N:GetTexture() ~= "Interface\\Buttons\\ActionBarFlyoutButton" then - N:SetTexture(nil) + N:SetTexture(0,0,0,0) end end - end; + end if i.highlightTexture then hooksecurefunc(i.highlightTexture, "SetTexture", function(k, P, Q, R) if P == [[Interface\Buttons\ButtonHilight-Square]] then i.highlightTexture:SetTexture(1, 1, 1, 0.3) end end) - end; + end i.styled = true - end; + end if x then x:SetTexCoord(0.1, 0.9, 0.1, 0.9) x:ClearAllPoints() @@ -117,9 +165,9 @@ local function AbilityButtonHelper(j) if not i.Panel then i:SetPanelTemplate("Inset", false, 3, 3, 3) end - end; + end i.styled = true -end; +end local function ButtonUpdateHelper(k, M) for j=1, SPELLS_PER_PAGE do @@ -127,27 +175,27 @@ local function ButtonUpdateHelper(k, M) local x = _G["SpellButton"..j.."IconTexture"] if not InCombatLockdown() then i:SetFrameLevel(SpellBookFrame:GetFrameLevel() + 5) - end; + end if M then for j = 1, i:GetNumRegions()do local N = select(j, i:GetRegions()) if N:GetObjectType() == "Texture"then if N ~= i.FlyoutArrow then - N:SetTexture(nil) + N:SetTexture(0,0,0,0) end end end - end; + end if _G["SpellButton"..j.."Highlight"]then _G["SpellButton"..j.."Highlight"]:SetTexture(1, 1, 1, 0.3) _G["SpellButton"..j.."Highlight"]:ClearAllPoints() _G["SpellButton"..j.."Highlight"]:SetAllPoints(x) - end; + end if i.shine then i.shine:ClearAllPoints() i.shine:SetPoint('TOPLEFT', i, 'TOPLEFT', -3, 3) i.shine:SetPoint('BOTTOMRIGHT', i, 'BOTTOMRIGHT', 3, -3) - end; + end if x then x:SetTexCoord(0.1, 0.9, 0.1, 0.9) x:ClearAllPoints() @@ -157,83 +205,99 @@ local function ButtonUpdateHelper(k, M) end end end -end; +end --[[ ########################################################## SPELLBOOK STYLER ########################################################## ]]-- local function SpellBookStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.spellbook ~= true then return end; - STYLE:ApplyCloseButtonStyle(SpellBookFrameCloseButton) - local J = { - "SpellBookFrame", "SpellBookFrameInset", "SpellBookSpellIconsFrame", "SpellBookSideTabsFrame", "SpellBookPageNavigationFrame" - } - local Kill = { - "SpellBookFrameTutorialButton" - } - for h, K in pairs(J)do - _G[K]:Formula409() - end; - for h, K in pairs(Kill)do - _G[K]:MUNG() - end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.spellbook ~= true then return end + SpellBookFrame:SetPanelTemplate("Pattern") - for j = 1, 2 do - _G['SpellBookPage'..j]:SetDrawLayer('BORDER', 3) - end; + STYLE:ApplyCloseButtonStyle(SpellBookFrameCloseButton) + + for _, gName in pairs(bookFrames) do + local frame = _G[gName] + if(frame) then + frame:Formula409() + end + end + + _G["SpellBookFrameTutorialButton"]:MUNG() + + for i = 1, 2 do + local frame = _G[("SpellBookPage%d"):format(i)] + if(frame) then + frame:SetDrawLayer('BORDER', 3) + end + end + STYLE:ApplyPaginationStyle(SpellBookPrevPageButton) STYLE:ApplyPaginationStyle(SpellBookNextPageButton) + ButtonUpdateHelper(nil, true) + hooksecurefunc("SpellButton_UpdateButton", ButtonUpdateHelper) hooksecurefunc("SpellBook_GetCoreAbilityButton", AbilityButtonHelper) - for j = 1, MAX_SKILLLINE_TABS do - local S = _G["SpellBookSkillLineTab"..j] - _G["SpellBookSkillLineTab"..j.."Flash"]:MUNG() - ChangeTabHelper(S) - end; + + for i = 1, MAX_SKILLLINE_TABS do + local tabName = ("SpellBookSkillLineTab%d"):format(i) + local tab = _G[tabName] + local tabFlash = _G[("%sFlash"):format(tabName)] + if(tabFlash) then tabFlash:MUNG() end + if(tab) then ChangeTabHelper(tab) end + end + hooksecurefunc('SpellBook_GetCoreAbilitySpecTab', GetSpecTabHelper) hooksecurefunc("SpellBookFrame_UpdateSkillLineTabs", SkillTabUpdateHelper) - local a1 = { - "PrimaryProfession1SpellButtonTop", "PrimaryProfession1SpellButtonBottom", "PrimaryProfession2SpellButtonTop", "PrimaryProfession2SpellButtonBottom", "SecondaryProfession1SpellButtonLeft", "SecondaryProfession1SpellButtonRight", "SecondaryProfession2SpellButtonLeft", "SecondaryProfession2SpellButtonRight", "SecondaryProfession3SpellButtonLeft", "SecondaryProfession3SpellButtonRight", "SecondaryProfession4SpellButtonLeft", "SecondaryProfession4SpellButtonRight" - } - local a2 = { - "PrimaryProfession1", "PrimaryProfession2", "SecondaryProfession1", "SecondaryProfession2", "SecondaryProfession3", "SecondaryProfession4" - } - for h, a3 in pairs(a2)do - _G[a3 .."Missing"]:SetTextColor(1, 1, 0) - _G[a3].missingText:SetTextColor(0, 0, 0) - end; - for h, i in pairs(a1)do - local x = _G[i.."IconTexture"] - local i = _G[i]i:Formula409() - if x then - x:SetTexCoord(0.1, 0.9, 0.1, 0.9) - x:FillInner() - i:SetFrameLevel(i:GetFrameLevel()+2) - if not i.Panel then - i:SetPanelTemplate("Inset", false, 3, 3, 3) - i.Panel:SetAllPoints() - end - end - end; - local a4 = { - "PrimaryProfession1StatusBar", "PrimaryProfession2StatusBar", "SecondaryProfession1StatusBar", "SecondaryProfession2StatusBar", "SecondaryProfession3StatusBar", "SecondaryProfession4StatusBar" - } - for h, a5 in pairs(a4)do - local a5 = _G[a5]a5:Formula409() - a5:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - a5:SetStatusBarColor(0, 220/255, 0) - a5:SetPanelTemplate("Default") - a5.rankText:ClearAllPoints() - a5.rankText:SetPoint("CENTER") - end; - for j = 1, 5 do - STYLE:ApplyTabStyle(_G["SpellBookFrameTabButton"..j]) - end; + + for _, gName in pairs(proFrames)do + local frame = _G[gName] + local frameMissing = _G[("%sMissing"):format(gName)] + if(frame and frame.missingText) then frame.missingText:SetTextColor(0, 0, 0) end + if(frameMissing) then frameMissing:SetTextColor(1, 1, 0) end + end + + for _, gName in pairs(proButtons)do + local button = _G[gName] + local buttonTex = _G[("%sIconTexture"):format(gName)] + if(button) then + button:Formula409() + if(buttonTex) then + buttonTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + buttonTex:FillInner() + button:SetFrameLevel(button:GetFrameLevel() + 2) + if not button.Panel then + button:SetPanelTemplate("Inset", false, 3, 3, 3) + button.Panel:SetAllPoints() + end + end + end + end + + for _, gName in pairs(proBars) do + local bar = _G[gName] + if(bar) then + bar:Formula409() + bar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + bar:SetStatusBarColor(0, 220/255, 0) + bar:SetPanelTemplate("Default") + bar.rankText:ClearAllPoints() + bar.rankText:SetPoint("CENTER") + end + end + + for i = 1, 5 do + local frame = _G[("SpellBookFrameTabButton%d"):format(i)] + if(frame) then + STYLE:ApplyTabStyle(frame) + end + end + SpellBookFrameTabButton1:ClearAllPoints() SpellBookFrameTabButton1:SetPoint('TOPLEFT', SpellBookFrame, 'BOTTOMLEFT', 0, 2) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua index a0e5e9c..d1a75cf 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua @@ -28,15 +28,15 @@ local function Widget_OnLeave(b) end; local function Widget_ScrollStyle(e, f) if _G[e:GetName().."BG"]then - _G[e:GetName().."BG"]:SetTexture(nil) + _G[e:GetName().."BG"]:SetTexture(0,0,0,0) end; if _G[e:GetName().."Track"]then - _G[e:GetName().."Track"]:SetTexture(nil) + _G[e:GetName().."Track"]:SetTexture(0,0,0,0) end; if _G[e:GetName().."Top"]then - _G[e:GetName().."Top"]:SetTexture(nil) - _G[e:GetName().."Bottom"]:SetTexture(nil) - _G[e:GetName().."Middle"]:SetTexture(nil) + _G[e:GetName().."Top"]:SetTexture(0,0,0,0) + _G[e:GetName().."Bottom"]:SetTexture(0,0,0,0) + _G[e:GetName().."Middle"]:SetTexture(0,0,0,0) end; if _G[e:GetName().."ScrollUpButton"] and _G[e:GetName().."ScrollDownButton"] then _G[e:GetName().."ScrollUpButton"]:Formula409() @@ -83,37 +83,27 @@ local function Widget_PaginationStyle(...) STYLE:ApplyPaginationStyle(...) end -local function SVUICoreStyle(postLoad) - if(not postLoad) then - for i = 1, 4 do - local alert = _G["SVUI_SystemAlert"..i]; - if(alert) then - for b = 1, 3 do - alert.buttons[b]:SetButtonTemplate() - end; - alert:Formula409() - STYLE:ApplyAlertStyle(alert) - alert.input:SetEditboxTemplate() - alert.input.Panel:Point("TOPLEFT", -2, -4) - alert.input.Panel:Point("BOTTOMRIGHT", 2, 4) - alert.gold:SetEditboxTemplate() - alert.silver:SetEditboxTemplate() - alert.copper:SetEditboxTemplate() - end - end - end +local NOOP = SuperVillain.fubar - local AceGUI = LibStub("AceGUI-3.0", true) - if not AceGUI then - local h = CreateFrame("Frame") - h:RegisterEvent("ADDON_LOADED") - h:SetScript("OnEvent", function(b, M, N) - if LibStub("AceGUI-3.0", true) then - SVUICoreStyle(true) - b:UnregisterEvent("ADDON_LOADED") - end - end) - return +local function StyleAceGUI(event, addon) + assert((LibStub("AceGUI-3.0") and (addon == "SVUI_ConfigOMatic")), "Addon Not Loaded") + local AceGUI = LibStub("AceGUI-3.0") + + for i = 1, 4 do + local alert = _G["SVUI_SystemAlert"..i]; + if(alert) then + for b = 1, 3 do + alert.buttons[b]:SetButtonTemplate() + end; + alert:Formula409() + STYLE:ApplyAlertStyle(alert) + alert.input:SetEditboxTemplate() + alert.input.Panel:Point("TOPLEFT", -2, -4) + alert.input.Panel:Point("BOTTOMRIGHT", 2, 4) + alert.gold:SetEditboxTemplate() + alert.silver:SetEditboxTemplate() + alert.copper:SetEditboxTemplate() + end end local regWidget = AceGUI.RegisterAsWidget; @@ -129,7 +119,7 @@ local function SVUICoreStyle(postLoad) end Widget_ButtonStyle(widget.button) Widget_ScrollStyle(widget.scrollBar) - widget.scrollBar:SetPoint("RIGHT", e, "RIGHT", 0-4) + widget.scrollBar:SetPoint("RIGHT", e, "RIGHT", -4) widget.scrollBG:SetPoint("TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19) widget.scrollBG:SetPoint("BOTTOMLEFT", widget.button, "TOPLEFT") widget.scrollFrame:SetPoint("BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8) @@ -303,29 +293,13 @@ local function SVUICoreStyle(postLoad) o.toggle:Formula409() o.toggle.SetNormalTexture = NOOP; o.toggle.SetPushedTexture = NOOP; + o.toggle:SetButtonTemplate() o.toggleText = o.toggle:CreateFontString(nil, "OVERLAY") - o.toggleText:SetFontTemplate(nil, 19) + o.toggleText:SetFont([[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]], 19) o.toggleText:SetPoint("CENTER") - o.toggleText:SetText("+") + o.toggleText:SetText("*") return o end - local C = widget.RefreshTree; - widget.RefreshTree = function(self, D) - C(self, D) - if not self.tree then return end - local E = self.status or self.localstatus; - local F = E.groups; - local G = self.lines; - local H = self.buttons; - for z, I in pairs(G)do - local o = H[z] - if F[I.uniquevalue]and o then - o.toggleText:SetText("-") - elseif o then - o.toggleText:SetText("+") - end - end - end end if n == "TabGroup" then local createTab = widget.CreateTab; @@ -345,4 +319,4 @@ end STYLE LOADING ########################################################## ]]-- -STYLE:SaveCustomStyle(SVUICoreStyle) \ No newline at end of file +STYLE:SaveAddonStyle("ConfigOMatic", StyleAceGUI, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua index da6acb3..1a1f7f2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua @@ -65,9 +65,7 @@ local SystemFrameList4 = { "Quit", "Continue", "MacOptions", - "Help", - "WhatsNew", - "Addons" + "Help" }; local SystemFrameList5 = { "GameMenuFrame", @@ -582,7 +580,7 @@ local function SystemPanelQue() GhostFrame:ClearAllPoints() GhostFrame:SetPoint("TOP", SuperVillain.UIParent, "TOP", 0, -150) GhostFrameContentsFrame:SetButtonTemplate() - GhostFrameContentsFrameIcon:SetTexture(nil) + GhostFrameContentsFrameIcon:SetTexture(0,0,0,0) local x = CreateFrame("Frame", nil, GhostFrame) x:SetFrameStrata("MEDIUM") x:SetFixedPanelTemplate("Default") @@ -595,7 +593,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList5 do local this = _G[SystemFrameList5[i].."Header"] if(this) then - this:SetTexture("") + this:SetTexture(0,0,0,0) this:ClearAllPoints() if this == _G["GameMenuFrameHeader"] then this:SetPoint("TOP", GameMenuFrame, 0, 7) @@ -644,7 +642,7 @@ local function SystemPanelQue() end) if IsMacClient() then MacOptionsFrame:SetFixedPanelTemplate("Default") - MacOptionsFrameHeader:SetTexture("") + MacOptionsFrameHeader:SetTexture(0,0,0,0) MacOptionsFrameHeader:ClearAllPoints() MacOptionsFrameHeader:SetPoint("TOP", MacOptionsFrame, 0, 0) MacOptionsFrameMovieRecording:SetFixedPanelTemplate("Default") @@ -857,9 +855,9 @@ local function SystemPanelQue() end) GuildInviteFrame:Formula409() GuildInviteFrame:SetFixedPanelTemplate('Transparent') - -- GuildInviteFrameLevel:Formula409() - -- GuildInviteFrameLevel:ClearAllPoints() - -- GuildInviteFrameLevel:Point('TOP', GuildInviteFrame, 'CENTER', -15, -25) + GuildInviteFrameLevel:Formula409() + GuildInviteFrameLevel:ClearAllPoints() + GuildInviteFrameLevel:Point('TOP', GuildInviteFrame, 'CENTER', -15, -25) GuildInviteFrameJoinButton:SetButtonTemplate() GuildInviteFrameDeclineButton:SetButtonTemplate() GuildInviteFrame:Height(225) @@ -869,7 +867,7 @@ local function SystemPanelQue() GuildInviteFrameWarningText:MUNG() BattleTagInviteFrame:Formula409() BattleTagInviteFrame:SetFixedPanelTemplate('Transparent') - -- BattleTagInviteFrameScrollFrame:SetEditboxTemplate() + BattleTagInviteFrameScrollFrame:SetEditboxTemplate() for i=1, BattleTagInviteFrame:GetNumChildren() do local child = select(i, BattleTagInviteFrame:GetChildren()) if child:GetObjectType() == 'Button' then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua index ea094ec..6b9730d 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/tabard.lua @@ -29,11 +29,11 @@ local function cleanT(a,b) if b and type(b)=='boolean'then d:MUNG() elseif d:GetDrawLayer()==b then - d:SetTexture(nil) + d:SetTexture(0,0,0,0) elseif b and type(b)=='string'and d:GetTexture()~=b then - d:SetTexture(nil) + d:SetTexture(0,0,0,0) else - d:SetTexture(nil) + d:SetTexture(0,0,0,0) end end end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua index 1b100d7..8a7e64f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua @@ -38,28 +38,40 @@ local function Tab_OnLeave(this) this.backdrop:SetBackdropBorderColor(0,0,0,1) end -local function PseudoTabStyle(this) - if not this then return end; +local function ChangeTabHelper(this) this:Formula409() - this:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - this:GetNormalTexture():FillInner() + local nTex = this:GetNormalTexture() + if(nTex) then + nTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + nTex:FillInner() + end + this.pushed = true; + this.backdrop = CreateFrame("Frame", nil, this) this.backdrop:WrapOuter(this,1,1) - local level = this:GetFrameLevel() - if(level > 0) then - this.backdrop:SetFrameLevel(level - 1) - else - this.backdrop:SetFrameLevel(0) - end - this.backdrop:SetFixedPanelTemplate("Component", true) - this.backdrop:SetPanelColor("dark") - this:HookScript("OnEnter",Tab_OnEnter) - this:HookScript("OnLeave",Tab_OnLeave) -end; + this.backdrop:SetFrameLevel(0) + this.backdrop:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeFile = [[Interface\AddOns\SVUI\assets\artwork\Template\GLOW]], + edgeSize = 3, + insets = { + left = 0, + right = 0, + top = 0, + bottom = 0 + } + }); + this.backdrop:SetBackdropColor(0,0,0,1) + this.backdrop:SetBackdropBorderColor(0,0,0,1) + this:SetScript("OnEnter", Tab_OnEnter) + this:SetScript("OnLeave", Tab_OnLeave) +end local function StyleGlyphHolder(holder, offset) - if holder.styled then return end; + if holder.styled then return end local outer = holder:CreateTexture(nil, "OVERLAY") outer:WrapOuter(holder, offset, offset) @@ -78,33 +90,38 @@ local function StyleGlyphHolder(holder, offset) disabled:SetTexture(borderTex) disabled:SetGradient(unpack(SuperVillain.Media.gradient.default)) holder:SetDisabledTexture(disabled) - end; + end local cd = holder:GetName() and _G[holder:GetName().."Cooldown"] if cd then cd:ClearAllPoints() cd:FillInner() - end; + end holder.styled = true -end; +end --[[ ########################################################## TALENTFRAME STYLER ########################################################## ]]-- local function TalentFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.talent ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.talent ~= true then return end + PlayerTalentFrame:Formula409() PlayerTalentFrameInset:Formula409() PlayerTalentFrameTalents:Formula409() + local r = CreateFrame('Frame', nil, PlayerTalentFrame) r:WrapOuter(PlayerTalentFrame) + local s = PlayerTalentFrame:GetFrameLevel() + if((s - 1) >= 0) then r:SetFrameLevel(s - 1) else r:SetFrameLevel(0) - end; + end + PlayerTalentFrame:SetPanelTemplate("Halftone") PlayerTalentFrame.Panel:Point("BOTTOMRIGHT", PlayerTalentFrame, "BOTTOMRIGHT", 0, -5) PlayerTalentFrameSpecializationTutorialButton:MUNG() @@ -112,13 +129,17 @@ local function TalentFrameStyle() PlayerTalentFramePetSpecializationTutorialButton:MUNG() STYLE:ApplyCloseButtonStyle(PlayerTalentFrameCloseButton) PlayerTalentFrameActivateButton:SetButtonTemplate() + for _,name in pairs(SpecButtonList)do local button = _G[name]; - button:Formula409() - button:SetButtonTemplate() - local d, e, k, g = button:GetPoint() - button:Point(d, e, k, g, -28) - end; + if(button) then + button:Formula409() + button:SetButtonTemplate() + local d, e, k, g = button:GetPoint() + button:Point(d, e, k, g, -28) + end + end + PlayerTalentFrameTalents:SetFixedPanelTemplate('Transparent') PlayerTalentFrameTalentsClearInfoFrame:SetFixedPanelTemplate('Transparent') PlayerTalentFrameTalentsClearInfoFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -126,41 +147,37 @@ local function TalentFrameStyle() PlayerTalentFrameTalentsClearInfoFrame:Height(PlayerTalentFrameTalentsClearInfoFrame:GetHeight()-2) PlayerTalentFrameTalentsClearInfoFrame.icon:Size(PlayerTalentFrameTalentsClearInfoFrame:GetSize()) PlayerTalentFrameTalentsClearInfoFrame:Point('TOPLEFT', PlayerTalentFrameTalents, 'BOTTOMLEFT', 8, -8) + for b = 1, 4 do STYLE:ApplyTabStyle(_G['PlayerTalentFrameTab'..b]) if b == 1 then local d, e, k, g = _G['PlayerTalentFrameTab'..b]:GetPoint() _G['PlayerTalentFrameTab'..b]:Point(d, e, k, g, -4) end - end; + end + hooksecurefunc('PlayerTalentFrame_UpdateTabs', function() for b = 1, 4 do local d, e, k, g = _G['PlayerTalentFrameTab'..b]:GetPoint() _G['PlayerTalentFrameTab'..b]:Point(d, e, k, g, -4) end end) + PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetTexture(1, 1, 1) PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetAlpha(0.2) + for b = 1, 2 do local v = _G['PlayerSpecTab'..b] _G['PlayerSpecTab'..b..'Background']:MUNG() - PseudoTabStyle(v) - hooksecurefunc(v:GetHighlightTexture(), "SetTexture", function(i, w) - if w ~= nil then - i:SetTexture(nil) - end - end) - hooksecurefunc(v:GetCheckedTexture(), "SetTexture", function(i, w) - if w ~= nil then - i:SetTexture(nil) - end - end) - end; + ChangeTabHelper(v) + end + hooksecurefunc('PlayerTalentFrame_UpdateSpecs', function() local d, x, f, g, h = PlayerSpecTab1:GetPoint() PlayerSpecTab1:Point(d, x, f, -1, h) end) - for b = 1, 7 do + + for b = 1, MAX_NUM_TALENT_TIERS do local y = _G["PlayerTalentFrameTalentsTalentRow"..b] _G["PlayerTalentFrameTalentsTalentRow"..b.."Bg"]:Hide() y:DisableDrawLayer("BORDER") @@ -184,9 +201,10 @@ local function TalentFrameStyle() A.bg.SelectedTexture:Point("TOPLEFT", A, "TOPLEFT", 15, -1) A.bg.SelectedTexture:Point("BOTTOMRIGHT", A, "BOTTOMRIGHT", -10, 1) end - end; + end + hooksecurefunc("TalentFrame_Update", function() - for b = 1, 7 do + 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 @@ -194,7 +212,7 @@ local function TalentFrameStyle() A.bg.SelectedTexture:SetTexture(0, 1, 0, 0.1) else A.bg.SelectedTexture:Hide() - end; + end if A.learnSelection:IsShown() then A.bg.SelectedTexture:Show() A.bg.SelectedTexture:SetTexture(1, 1, 0, 0.1) @@ -202,19 +220,23 @@ local function TalentFrameStyle() end end end) + for b = 1, 5 do select(b, PlayerTalentFrameSpecializationSpellScrollFrameScrollChild:GetRegions()):Hide() - end; + end + local C = _G["PlayerTalentFrameSpecializationSpellScrollFrameScrollChild"] C.ring:Hide() C:SetFixedPanelTemplate("Transparent") C.Panel:WrapOuter(C.specIcon) C.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + local D = _G["PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild"] D.ring:Hide() D:SetFixedPanelTemplate("Transparent") D.Panel:WrapOuter(D.specIcon) D.specIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + hooksecurefunc("PlayerTalentFrame_UpdateSpecFrame", function(i, E) local F = GetSpecialization(nil, i.isPet, PlayerSpecTab2:GetChecked() and 2 or 1) local G = E or F or 1; @@ -226,7 +248,7 @@ local function TalentFrameStyle() K = { GetSpecializationSpells(G, nil, i.isPet) } else K = SPEC_SPELLS_DISPLAY[H] - end; + end for b = 1, #K, 2 do local L = I["abilityButton"..J] local p, icon = GetSpellTexture(K[b]) @@ -237,9 +259,9 @@ local function TalentFrameStyle() L:SetFixedPanelTemplate("Transparent") L.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) L.icon:FillInner() - end; + end J = J+1 - end; + end for b = 1, GetNumSpecializations(nil, i.isPet)do local A = i["specButton"..b]A.SelectedTexture:FillInner(A.Panel) if A.selected then @@ -249,6 +271,7 @@ local function TalentFrameStyle() end end end) + for b = 1, GetNumSpecializations(false, nil)do local A = PlayerTalentFrameSpecialization["specButton"..b] local p, p, p, icon = GetSpecializationInfo(b, false, nil) @@ -259,10 +282,12 @@ local function TalentFrameStyle() A.specIcon:Point("LEFT", A, "LEFT", 15, 0) A.SelectedTexture = A:CreateTexture(nil, 'ARTWORK') A.SelectedTexture:SetTexture(1, 1, 0, 0.1) - end; + end + local btnList = { "PlayerTalentFrameSpecializationSpecButton", "PlayerTalentFramePetSpecializationSpecButton" } + for p, M in pairs(btnList)do for b = 1, 4 do local A = _G[M..b]_G["PlayerTalentFrameSpecializationSpecButton"..b.."Glow"]:MUNG() @@ -275,20 +300,21 @@ local function TalentFrameStyle() A:SetFixedPanelTemplate("Button") A:GetHighlightTexture():FillInner(A.Panel) end - end; + end + if SuperVillain.class == "HUNTER" then for b = 1, 6 do select(b, PlayerTalentFramePetSpecialization:GetRegions()):Hide() - end; + end for b = 1, PlayerTalentFramePetSpecialization:GetNumChildren()do local O = select(b, PlayerTalentFramePetSpecialization:GetChildren()) if O and not O:GetName() then O:DisableDrawLayer("OVERLAY") end - end; + end for b = 1, 5 do select(b, PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild:GetRegions()):Hide() - end; + end for b = 1, GetNumSpecializations(false, true)do local A = PlayerTalentFramePetSpecialization["specButton"..b] local p, p, p, icon = GetSpecializationInfo(b, false, true) @@ -299,25 +325,27 @@ local function TalentFrameStyle() A.specIcon:Point("LEFT", A, "LEFT", 15, 0) A.SelectedTexture = A:CreateTexture(nil, 'ARTWORK') A.SelectedTexture:SetTexture(1, 1, 0, 0.1) - end; + end PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild.Seperator:SetTexture(1, 1, 1) PlayerTalentFramePetSpecializationSpellScrollFrameScrollChild.Seperator:SetAlpha(0.2) - end; + end + PlayerTalentFrameSpecialization:DisableDrawLayer('ARTWORK') PlayerTalentFrameSpecialization:DisableDrawLayer('BORDER') + for b = 1, PlayerTalentFrameSpecialization:GetNumChildren()do local O = select(b, PlayerTalentFrameSpecialization:GetChildren()) if O and not O:GetName() then O:DisableDrawLayer("OVERLAY") end end -end; +end --[[ ########################################################## STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle("Blizzard_TalentUI",TalentFrameStyle) +STYLE:SaveBlizzardStyle("Blizzard_TalentUI", TalentFrameStyle) local function GlyphStyle() GlyphFrame.background:ClearAllPoints() @@ -340,7 +368,7 @@ local function GlyphStyle() e:Formula409() STYLE:ApplyLinkButtonStyle(e) icon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) - end; + end for b = 1, 6 do local glyphHolder = _G["GlyphFrameGlyph"..b] @@ -352,11 +380,11 @@ local function GlyphStyle() StyleGlyphHolder(glyphHolder, 1) end end - end; + end GlyphFrameHeader1:Formula409() GlyphFrameHeader2:Formula409() GlyphFrameScrollFrame:SetPanelTemplate("Inset", false, 3, 2, 2) -end; +end -STYLE:SaveBlizzardStyle("Blizzard_GlyphUI",GlyphStyle) \ No newline at end of file +STYLE:SaveBlizzardStyle("Blizzard_GlyphUI", GlyphStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua index d4a3c0a..2b4e388 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua @@ -33,37 +33,40 @@ local STYLE = _G.StyleVillain; ACP ########################################################## ]]-- -local function StyleACP() - local function cbResize(self,elapsed) - self.timeLapse = self.timeLapse + elapsed - if(self.timeLapse < 2) then - return - else - self.timeLapse = 0 - end - for i=1,20,1 do - local d=_G["ACP_AddonListEntry"..i.."Enabled"] - local e=_G["ACP_AddonListEntry"..i.."Collapse"] - local f=_G["ACP_AddonListEntry"..i.."Security"] - local g="" - if g=="" then - d:SetPoint("LEFT",5,0) - if e:IsShown()then - d:SetWidth(26) - d:SetHeight(26) - else - d:SetPoint("LEFT",15,0) - d:SetWidth(20) - d:SetHeight(20) - end - end; - if f:IsShown()then - d:SetPoint("LEFT",5,0) +local function cbResize(self,elapsed) + self.timeLapse = self.timeLapse + elapsed + if(self.timeLapse < 2) then + return + else + self.timeLapse = 0 + end + for i=1,20,1 do + local d=_G["ACP_AddonListEntry"..i.."Enabled"] + local e=_G["ACP_AddonListEntry"..i.."Collapse"] + local f=_G["ACP_AddonListEntry"..i.."Security"] + local g="" + if g=="" then + d:SetPoint("LEFT",5,0) + if e:IsShown()then d:SetWidth(26) d:SetHeight(26) + else + d:SetPoint("LEFT",15,0) + d:SetWidth(20) + d:SetHeight(20) end + end; + if f:IsShown()then + d:SetPoint("LEFT",5,0) + d:SetWidth(26) + d:SetHeight(26) end - end; + end +end + +local function StyleACP() + assert(ACP_AddonList, "AddOn Not Loaded") + STYLE:ApplyFrameStyle(ACP_AddonList) STYLE:ApplyFrameStyle(ACP_AddonList_ScrollFrame) local h={"ACP_AddonListSetButton","ACP_AddonListDisableAll","ACP_AddonListEnableAll","ACP_AddonList_ReloadUI","ACP_AddonListBottomClose"} @@ -96,4 +99,5 @@ local function StyleACP() ACP_AddonListBottomClose:Point("BOTTOMRIGHT",ACP_AddonList,"BOTTOMRIGHT",-50,8) ACP_AddonListBottomClose:SetHeight(25)ACP_AddonList:SetParent(UIParent) end + STYLE:SaveAddonStyle("ACP", StyleACP) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua new file mode 100644 index 0000000..15c3572 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua @@ -0,0 +1,72 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SuperVillain, L = unpack(SVUI); +local STYLE = _G.StyleVillain; +--[[ +########################################################## +ADIBAGS +########################################################## +]]-- +local function StyleAdiBags(event) + local AdiBags = LibStub('AceAddon-3.0'):GetAddon('AdiBags') + assert(AdiBags, "AddOn Not Loaded") + --hooksecurefunc(AdiBags, 'HookBagFrameCreation', function(self) print(self) end) + + local function SkinFrame(frame) + local region = frame.HeaderRightRegion + frame:SetPanelTemplate("Transparent") + _G[frame:GetName()..'Bags']:SetPanelTemplate("Default") + for i = 1, 3 do + region.widgets[i].widget:SetButtonTemplate() + end + end + + if event == 'PLAYER_ENTERING_WORLD' then + SuperVillain:ExecuteTimer(function() + if not AdiBagsContainer1 then ToggleBackpack() ToggleBackpack() end + if AdiBagsContainer1 then + SkinFrame(AdiBagsContainer1) + AdiBagsContainer1SearchBox:SetEditboxTemplate() + AdiBagsContainer1SearchBox:Point('TOPRIGHT', AdiBagsSimpleLayeredRegion2, 'TOPRIGHT', -75, -1) + end + end, 1) + elseif event == 'BANKFRAME_OPENED' then + SuperVillain:ExecuteTimer(function() + if AdiBagsContainer2 then + SkinFrame(AdiBagsContainer2) + STYLE:SafeEventRemoval("AdiBags", event) + end + end, 1) + end +end + +STYLE:SaveAddonStyle("AdiBags", StyleAdiBags, nil, nil, 'BANKFRAME_OPENED') \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua new file mode 100644 index 0000000..a673cf8 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua @@ -0,0 +1,280 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SuperVillain, L = unpack(SVUI); +local STYLE = _G.StyleVillain; +--[[ +########################################################## +ALTOHOLIC +########################################################## +]]-- +local function ColorAltoBorder(self) + if self.border then + local r, g, b = self.border:GetVertexColor() + local Backdrop = self.backdrop or self.Backdrop + Backdrop:SetBackdropBorderColor(r, g, b, 1) + end +end + +local function StyleAltoholic(event, addon) + assert(AltoholicFrame, "AddOn Not Loaded") + + if event == "PLAYER_ENTERING_WORLD" then + STYLE:ApplyTooltipStyle(AltoTooltip) + + AltoholicFramePortrait:MUNG() + + STYLE:ApplyFrameStyle(AltoholicFrame, "Action", false, true) + STYLE:ApplyFrameStyle(AltoMsgBox) + STYLE:ApplyButtonStyle(AltoMsgBoxYesButton) + STYLE:ApplyButtonStyle(AltoMsgBoxNoButton) + STYLE:ApplyCloseButtonStyle(AltoholicFrameCloseButton) + STYLE:ApplyEditBoxStyle(AltoholicFrame_SearchEditBox, 175, 15) + STYLE:ApplyButtonStyle(AltoholicFrame_ResetButton) + STYLE:ApplyButtonStyle(AltoholicFrame_SearchButton) + + AltoholicFrameTab1:Point("TOPLEFT", AltoholicFrame, "BOTTOMLEFT", -5, 2) + AltoholicFrame_ResetButton:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 25, -77) + AltoholicFrame_SearchEditBox:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 37, -56) + AltoholicFrame_ResetButton:Size(85, 24) + AltoholicFrame_SearchButton:Size(85, 24) + end + + if addon == "Altoholic_Summary" then + STYLE:ApplyFrameStyle(AltoholicFrameSummary) + STYLE:ApplyFrameStyle(AltoholicFrameBagUsage) + STYLE:ApplyFrameStyle(AltoholicFrameSkills) + STYLE:ApplyFrameStyle(AltoholicFrameActivity) + STYLE:ApplyScrollbarStyle(AltoholicFrameSummaryScrollFrameScrollBar) + STYLE:ApplyScrollbarStyle(AltoholicFrameBagUsageScrollFrameScrollBar) + STYLE:ApplyScrollbarStyle(AltoholicFrameSkillsScrollFrameScrollBar) + STYLE:ApplyScrollbarStyle(AltoholicFrameActivityScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicTabSummary_SelectLocation, 200) + + if(AltoholicFrameSummaryScrollFrame) then + AltoholicFrameSummaryScrollFrame:Formula409(true) + end + + if(AltoholicFrameBagUsageScrollFrame) then + AltoholicFrameBagUsageScrollFrame:Formula409(true) + end + + if(AltoholicFrameSkillsScrollFrame) then + AltoholicFrameSkillsScrollFrame:Formula409(true) + end + + if(AltoholicFrameActivityScrollFrame) then + AltoholicFrameActivityScrollFrame:Formula409(true) + end + + STYLE:ApplyButtonStyle(AltoholicTabSummary_RequestSharing) + STYLE:ApplyTextureStyle(AltoholicTabSummary_RequestSharingIconTexture) + STYLE:ApplyButtonStyle(AltoholicTabSummary_Options) + STYLE:ApplyTextureStyle(AltoholicTabSummary_OptionsIconTexture) + STYLE:ApplyButtonStyle(AltoholicTabSummary_OptionsDataStore) + STYLE:ApplyTextureStyle(AltoholicTabSummary_OptionsDataStoreIconTexture) + + for i = 1, 5 do + STYLE:ApplyButtonStyle(_G["AltoholicTabSummaryMenuItem"..i], true) + end + for i = 1, 8 do + STYLE:ApplyButtonStyle(_G["AltoholicTabSummary_Sort"..i], true) + end + for i = 1, 7 do + STYLE:ApplyTabStyle(_G["AltoholicFrameTab"..i], true) + end + end + + if IsAddOnLoaded("Altoholic_Characters") or addon == "Altoholic_Characters" then + STYLE:ApplyFrameStyle(AltoholicFrameContainers) + STYLE:ApplyFrameStyle(AltoholicFrameRecipes) + STYLE:ApplyFrameStyle(AltoholicFrameQuests) + STYLE:ApplyFrameStyle(AltoholicFrameGlyphs) + STYLE:ApplyFrameStyle(AltoholicFrameMail) + STYLE:ApplyFrameStyle(AltoholicFrameSpellbook) + STYLE:ApplyFrameStyle(AltoholicFramePets) + STYLE:ApplyFrameStyle(AltoholicFrameAuctions) + STYLE:ApplyScrollbarStyle(AltoholicFrameContainersScrollFrameScrollBar) + STYLE:ApplyScrollbarStyle(AltoholicFrameQuestsScrollFrameScrollBar) + STYLE:ApplyScrollbarStyle(AltoholicFrameRecipesScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicFrameTalents_SelectMember) + STYLE:ApplyDropdownStyle(AltoholicTabCharacters_SelectRealm) + STYLE:ApplyPaginationStyle(AltoholicFrameSpellbookPrevPage) + STYLE:ApplyPaginationStyle(AltoholicFrameSpellbookNextPage) + STYLE:ApplyPaginationStyle(AltoholicFramePetsNormalPrevPage) + STYLE:ApplyPaginationStyle(AltoholicFramePetsNormalNextPage) + STYLE:ApplyRotateStyle(AltoholicFramePetsNormal_ModelFrameRotateLeftButton) + STYLE:ApplyRotateStyle(AltoholicFramePetsNormal_ModelFrameRotateRightButton) + STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort1) + STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort2) + STYLE:ApplyButtonStyle(AltoholicTabCharacters_Sort3) + AltoholicFrameContainersScrollFrame:Formula409(true) + AltoholicFrameQuestsScrollFrame:Formula409(true) + AltoholicFrameRecipesScrollFrame:Formula409(true) + + local Buttons = { + 'AltoholicTabCharacters_Characters', + 'AltoholicTabCharacters_CharactersIcon', + 'AltoholicTabCharacters_BagsIcon', + 'AltoholicTabCharacters_QuestsIcon', + 'AltoholicTabCharacters_TalentsIcon', + 'AltoholicTabCharacters_AuctionIcon', + 'AltoholicTabCharacters_MailIcon', + 'AltoholicTabCharacters_SpellbookIcon', + 'AltoholicTabCharacters_ProfessionsIcon', + } + + for _, object in pairs(Buttons) do + STYLE:ApplyTextureStyle(_G[object..'IconTexture']) + STYLE:ApplyTextureStyle(_G[object]) + end + + for i = 1, 7 do + for j = 1, 14 do + STYLE:ApplyLinkButtonStyle(_G["AltoholicFrameContainersEntry"..i.."Item"..j]) + _G["AltoholicFrameContainersEntry"..i.."Item"..j]:HookScript('OnShow', ColorAltoBorder) + end + end + end + + if IsAddOnLoaded("Altoholic_Achievements") or addon == "Altoholic_Achievements" then + STYLE:ApplyUnderlayStyle(AltoholicFrameAchievements) + AltoholicFrameAchievementsScrollFrame:Formula409(true) + AltoholicAchievementsMenuScrollFrame:Formula409(true) + STYLE:ApplyScrollbarStyle(AltoholicFrameAchievementsScrollFrameScrollBar) + STYLE:ApplyScrollbarStyle(AltoholicAchievementsMenuScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicTabAchievements_SelectRealm) + AltoholicTabAchievements_SelectRealm:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 205, -57) + + for i = 1, 15 do + STYLE:ApplyButtonStyle(_G["AltoholicTabAchievementsMenuItem"..i], true) + end + + for i = 1, 8 do + for j = 1, 10 do + STYLE:ApplyUnderlayStyle(_G["AltoholicFrameAchievementsEntry"..i.."Item"..j]) + local Backdrop = _G["AltoholicFrameAchievementsEntry"..i.."Item"..j].backdrop or _G["AltoholicFrameAchievementsEntry"..i.."Item"..j].Backdrop + STYLE:ApplyTextureStyle(_G["AltoholicFrameAchievementsEntry"..i.."Item"..j..'_Background']) + _G["AltoholicFrameAchievementsEntry"..i.."Item"..j..'_Background']:SetInside(Backdrop) + end + end + end + + if IsAddOnLoaded("Altoholic_Agenda") or addon == "Altoholic_Agenda" then + STYLE:ApplyFrameStyle(AltoholicFrameCalendarScrollFrame) + STYLE:ApplyFrameStyle(AltoholicTabAgendaMenuItem1) + STYLE:ApplyScrollbarStyle(AltoholicFrameCalendarScrollFrameScrollBar) + STYLE:ApplyPaginationStyle(AltoholicFrameCalendar_NextMonth) + STYLE:ApplyPaginationStyle(AltoholicFrameCalendar_PrevMonth) + STYLE:ApplyButtonStyle(AltoholicTabAgendaMenuItem1, true) + + for i = 1, 14 do + STYLE:ApplyFrameStyle(_G["AltoholicFrameCalendarEntry"..i]) + end + end + + if IsAddOnLoaded("Altoholic_Grids") or addon == "Altoholic_Grids" then + AltoholicFrameGridsScrollFrame:Formula409(true) + STYLE:ApplyUnderlayStyle(AltoholicFrameGrids) + STYLE:ApplyScrollbarStyle(AltoholicFrameGridsScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicTabGrids_SelectRealm) + STYLE:ApplyDropdownStyle(AltoholicTabGrids_SelectView) + + for i = 1, 8 do + for j = 1, 10 do + STYLE:ApplyUnderlayStyle(_G["AltoholicFrameGridsEntry"..i.."Item"..j], nil, nil, nil, true) + _G["AltoholicFrameGridsEntry"..i.."Item"..j]:HookScript('OnShow', ColorAltoBorder) + end + end + + AltoholicFrameGrids:HookScript('OnUpdate', function() + for i = 1, 10 do + for j = 1, 10 do + if _G["AltoholicFrameGridsEntry"..i.."Item"..j.."_Background"] then + _G["AltoholicFrameGridsEntry"..i.."Item"..j.."_Background"]:SetTexCoord(.08, .92, .08, .82) + end + end + end + end) + + end + + if IsAddOnLoaded("Altoholic_Guild") or addon == "Altoholic_Guild" then + STYLE:ApplyFrameStyle(AltoholicFrameGuildMembers) + STYLE:ApplyFrameStyle(AltoholicFrameGuildBank) + STYLE:ApplyScrollbarStyle(AltoholicFrameGuildMembersScrollFrameScrollBar) + AltoholicFrameGuildMembersScrollFrame:Formula409(true) + + for i = 1, 2 do + STYLE:ApplyButtonStyle(_G["AltoholicTabGuildMenuItem"..i]) + end + + for i = 1, 7 do + for j = 1, 14 do + STYLE:ApplyLinkButtonStyle(_G["AltoholicFrameGuildBankEntry"..i.."Item"..j]) + end + end + + for i = 1, 19 do + STYLE:ApplyLinkButtonStyle(_G["AltoholicFrameGuildMembersItem"..i]) + end + + for i = 1, 5 do + STYLE:ApplyButtonStyle(_G["AltoholicTabGuild_Sort"..i]) + end + end + + if IsAddOnLoaded("Altoholic_Search") or addon == "Altoholic_Search" then + STYLE:ApplyUnderlayStyle(AltoholicFrameSearch, true) + AltoholicFrameSearchScrollFrame:Formula409(true) + AltoholicSearchMenuScrollFrame:Formula409(true) + STYLE:ApplyScrollbarStyle(AltoholicFrameSearchScrollFrameScrollBar) + STYLE:ApplyScrollbarStyle(AltoholicSearchMenuScrollFrameScrollBar) + STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectRarity) + STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectSlot) + STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectLocation) + AltoholicTabSearch_SelectRarity:Size(125, 32) + AltoholicTabSearch_SelectSlot:Size(125, 32) + AltoholicTabSearch_SelectLocation:Size(175, 32) + STYLE:ApplyEditBoxStyle(_G["AltoholicTabSearch_MinLevel"]) + STYLE:ApplyEditBoxStyle(_G["AltoholicTabSearch_MaxLevel"]) + + for i = 1, 15 do + STYLE:ApplyButtonStyle(_G["AltoholicTabSearchMenuItem"..i]) + end + + for i = 1, 8 do + STYLE:ApplyButtonStyle(_G["AltoholicTabSearch_Sort"..i]) + end + end +end + +STYLE:SaveAddonStyle("Altoholic", StyleAltoholic, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua index bcc38f9..004c1b0 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua @@ -33,92 +33,117 @@ local STYLE = _G.StyleVillain; ATLASLOOT ########################################################## ]]-- -LoadAddOn("AtlasLoot") -local function StyleAtlasLoot() - local function AL_OnShow(self, event, ...) - AtlasLootPanel:Point("TOP", AtlasLootDefaultFrame, "BOTTOM", 0, -1) - AtlasLootQuickLooksButton:Point("BOTTOM", AtlasLootItemsFrame, "BOTTOM", 53, 33) - AtlasLootPanelSearch_Box:ClearAllPoints() - AtlasLootPanelSearch_Box:Point("TOP", AtlasLoot_PanelButton_7, "BOTTOM", 80, -10) - AtlasLootPanelSearch_SearchButton:Point("LEFT", AtlasLootPanelSearch_Box, "RIGHT", 5, 0) - AtlasLootPanelSearch_SelectModuel:Point("LEFT", AtlasLootPanelSearch_SearchButton, "RIGHT", 5, 0) - AtlasLootPanelSearch_ClearButton:Point("LEFT", AtlasLootPanelSearch_SelectModuel, "RIGHT", 5, 0) - AtlasLootPanelSearch_LastResultButton:Point("LEFT", AtlasLootPanelSearch_ClearButton, "RIGHT", 5, 0) - AtlasLoot10Man25ManSwitch:Point("BOTTOM", AtlasLootItemsFrame, "BOTTOM", -130, 4) - if AtlasLoot_PanelButton_2 then AtlasLoot_PanelButton_2:Point("LEFT", AtlasLoot_PanelButton_1, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_3 then AtlasLoot_PanelButton_3:Point("LEFT", AtlasLoot_PanelButton_2, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_4 then AtlasLoot_PanelButton_4:Point("LEFT", AtlasLoot_PanelButton_3, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_5 then AtlasLoot_PanelButton_5:Point("LEFT", AtlasLoot_PanelButton_4, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_6 then AtlasLoot_PanelButton_6:Point("LEFT", AtlasLoot_PanelButton_5, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_8 then AtlasLoot_PanelButton_8:Point("LEFT", AtlasLoot_PanelButton_7, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_9 then AtlasLoot_PanelButton_9:Point("LEFT", AtlasLoot_PanelButton_8, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_10 then AtlasLoot_PanelButton_10:Point("LEFT", AtlasLoot_PanelButton_9, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_11 then AtlasLoot_PanelButton_11:Point("LEFT", AtlasLoot_PanelButton_10, "RIGHT", 1, 0) end - if AtlasLoot_PanelButton_12 then AtlasLoot_PanelButton_12:Point("LEFT", AtlasLoot_PanelButton_11, "RIGHT", 1, 0) end - AtlasLootCompareFrameSortButton_Rarity:Point("LEFT", AtlasLootCompareFrameSortButton_Name, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_Rarity:Width(80) - AtlasLootCompareFrameSortButton_Name:Width(80) - AtlasLootCompareFrameSortButton_1:Point("LEFT", AtlasLootCompareFrameSortButton_Rarity, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_2:Point("LEFT", AtlasLootCompareFrameSortButton_1, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_3:Point("LEFT", AtlasLootCompareFrameSortButton_2, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_4:Point("LEFT", AtlasLootCompareFrameSortButton_3, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_5:Point("LEFT", AtlasLootCompareFrameSortButton_4, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_6:Point("LEFT", AtlasLootCompareFrameSortButton_5, "RIGHT", 1, 0) - AtlasLootCompareFrame_CloseButton2:Point("BOTTOMRIGHT", AtlasLootCompareFrame, "BOTTOMRIGHT", -7, 10) - AtlasLootCompareFrame_WishlistButton:Point("RIGHT", AtlasLootCompareFrame_CloseButton2, "LEFT", -1, 0) - AtlasLootCompareFrameSearch_SearchButton:Point("LEFT", AtlasLootCompareFrameSearch_Box, "RIGHT", 5, 0) - AtlasLootCompareFrameSearch_SelectModuel:Point("LEFT", AtlasLootCompareFrameSearch_SearchButton, "RIGHT", 5, 0) - AtlasLootDefaultFrame_CloseButton:ClearAllPoints() - AtlasLootDefaultFrame_CloseButton:SetPoint("TOPRIGHT", AtlasLootDefaultFrame, "TOPRIGHT", -5 -2) - AtlasLootDefaultFrame:SetFrameLevel(0) - AtlasLootItemsFrame:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - for i = 1, 30 do if _G["AtlasLootDefaultFrame_ScrollLine"..i] then _G["AtlasLootDefaultFrame_ScrollLine"..i]:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1)end end; +local timeLapse = 0; +local nineisthere = {"AtlasLootCompareFrameSortButton_7","AtlasLootCompareFrameSortButton_8","AtlasLootCompareFrameSortButton_9"} +local StripAllTextures = {"AtlasLootDefaultFrame","AtlasLootDefaultFrame_ScrollFrame","AtlasLootItemsFrame","AtlasLootPanel","AtlasLootCompareFrame","AtlasLootCompareFrame_ScrollFrameMainFilterScrollChildFrame","AtlasLootCompareFrame_ScrollFrameItemFrame","AtlasLootCompareFrame_ScrollFrameMainFilter","AtlasLootCompareFrameSortButton_Name","AtlasLootCompareFrameSortButton_Rarity","AtlasLootCompareFrameSortButton_1","AtlasLootCompareFrameSortButton_2","AtlasLootCompareFrameSortButton_3","AtlasLootCompareFrameSortButton_4","AtlasLootCompareFrameSortButton_5","AtlasLootCompareFrameSortButton_6"} + +local SetTemplateDefault = {"AtlasLootCompareFrameSortButton_Name","AtlasLootCompareFrameSortButton_Rarity","AtlasLootCompareFrameSortButton_1","AtlasLootCompareFrameSortButton_2","AtlasLootCompareFrameSortButton_3","AtlasLootCompareFrameSortButton_4","AtlasLootCompareFrameSortButton_5","AtlasLootCompareFrameSortButton_6"} + +local buttons = {"AtlasLoot_AtlasInfoFrame_ToggleALButton","AtlasLootPanelSearch_SearchButton","AtlasLootDefaultFrame_CompareFrame","AtlasLootPanelSearch_ClearButton","AtlasLootPanelSearch_LastResultButton","AtlasLoot10Man25ManSwitch","AtlasLootItemsFrame_BACK","AtlasLootCompareFrameSearch_ClearButton","AtlasLootCompareFrameSearch_SearchButton","AtlasLootCompareFrame_WishlistButton","AtlasLootCompareFrame_CloseButton2"} + +local function AL_OnShow(self, event, ...) + AtlasLootPanel:Point("TOP", AtlasLootDefaultFrame, "BOTTOM", 0, -1) + AtlasLootQuickLooksButton:Point("BOTTOM", AtlasLootItemsFrame, "BOTTOM", 53, 33) + AtlasLootPanelSearch_Box:ClearAllPoints() + AtlasLootPanelSearch_Box:Point("TOP", AtlasLoot_PanelButton_7, "BOTTOM", 80, -10) + AtlasLootPanelSearch_SearchButton:Point("LEFT", AtlasLootPanelSearch_Box, "RIGHT", 5, 0) + AtlasLootPanelSearch_SelectModuel:Point("LEFT", AtlasLootPanelSearch_SearchButton, "RIGHT", 5, 0) + AtlasLootPanelSearch_ClearButton:Point("LEFT", AtlasLootPanelSearch_SelectModuel, "RIGHT", 5, 0) + AtlasLootPanelSearch_LastResultButton:Point("LEFT", AtlasLootPanelSearch_ClearButton, "RIGHT", 5, 0) + AtlasLoot10Man25ManSwitch:Point("BOTTOM", AtlasLootItemsFrame, "BOTTOM", -130, 4) + if AtlasLoot_PanelButton_2 then AtlasLoot_PanelButton_2:Point("LEFT", AtlasLoot_PanelButton_1, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_3 then AtlasLoot_PanelButton_3:Point("LEFT", AtlasLoot_PanelButton_2, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_4 then AtlasLoot_PanelButton_4:Point("LEFT", AtlasLoot_PanelButton_3, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_5 then AtlasLoot_PanelButton_5:Point("LEFT", AtlasLoot_PanelButton_4, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_6 then AtlasLoot_PanelButton_6:Point("LEFT", AtlasLoot_PanelButton_5, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_8 then AtlasLoot_PanelButton_8:Point("LEFT", AtlasLoot_PanelButton_7, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_9 then AtlasLoot_PanelButton_9:Point("LEFT", AtlasLoot_PanelButton_8, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_10 then AtlasLoot_PanelButton_10:Point("LEFT", AtlasLoot_PanelButton_9, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_11 then AtlasLoot_PanelButton_11:Point("LEFT", AtlasLoot_PanelButton_10, "RIGHT", 1, 0) end + if AtlasLoot_PanelButton_12 then AtlasLoot_PanelButton_12:Point("LEFT", AtlasLoot_PanelButton_11, "RIGHT", 1, 0) end + AtlasLootCompareFrameSortButton_Rarity:Point("LEFT", AtlasLootCompareFrameSortButton_Name, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_Rarity:Width(80) + AtlasLootCompareFrameSortButton_Name:Width(80) + AtlasLootCompareFrameSortButton_1:Point("LEFT", AtlasLootCompareFrameSortButton_Rarity, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_2:Point("LEFT", AtlasLootCompareFrameSortButton_1, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_3:Point("LEFT", AtlasLootCompareFrameSortButton_2, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_4:Point("LEFT", AtlasLootCompareFrameSortButton_3, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_5:Point("LEFT", AtlasLootCompareFrameSortButton_4, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_6:Point("LEFT", AtlasLootCompareFrameSortButton_5, "RIGHT", 1, 0) + AtlasLootCompareFrame_CloseButton2:Point("BOTTOMRIGHT", AtlasLootCompareFrame, "BOTTOMRIGHT", -7, 10) + AtlasLootCompareFrame_WishlistButton:Point("RIGHT", AtlasLootCompareFrame_CloseButton2, "LEFT", -1, 0) + AtlasLootCompareFrameSearch_SearchButton:Point("LEFT", AtlasLootCompareFrameSearch_Box, "RIGHT", 5, 0) + AtlasLootCompareFrameSearch_SelectModuel:Point("LEFT", AtlasLootCompareFrameSearch_SearchButton, "RIGHT", 5, 0) + AtlasLootDefaultFrame_CloseButton:ClearAllPoints() + AtlasLootDefaultFrame_CloseButton:SetPoint("TOPRIGHT", AtlasLootDefaultFrame, "TOPRIGHT", -5 -2) + AtlasLootDefaultFrame:SetFrameLevel(0) + AtlasLootItemsFrame:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) + for i = 1, 30 do if _G["AtlasLootDefaultFrame_ScrollLine"..i] then _G["AtlasLootDefaultFrame_ScrollLine"..i]:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1)end end; + + if(AtlasLootDefaultFrame_PackageSelect) then AtlasLootDefaultFrame_PackageSelect:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - AtlasLootDefaultFrame_InstanceSelect:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - AtlasLoot_AtlasInfoFrame_ToggleALButton:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - AtlasLootDefaultFrame_CompareFrame:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) - AtlasLootPanelSearch_Box:SetHeight(16) - AtlasLootPanel:SetWidth(921) end - local timeLapse = 0; - local function Nine_IsThere(self, elapsed) - self.timeLapse = self.timeLapse + elapsed - if(self.timeLapse < 2) then - return - else - self.timeLapse = 0 - end - for i = 1, 9 do local f = _G["AtlasLootCompareFrameSortButton_"..i]f:SetWidth(44.44)end; - local nineisthere={"AtlasLootCompareFrameSortButton_7","AtlasLootCompareFrameSortButton_8","AtlasLootCompareFrameSortButton_9"} - for _, object in pairs(nineisthere) do STYLE:ApplyFrameStyle(_G[object])end; - AtlasLootCompareFrameSortButton_7:Point("LEFT", AtlasLootCompareFrameSortButton_6, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_8:Point("LEFT", AtlasLootCompareFrameSortButton_7, "RIGHT", 1, 0) - AtlasLootCompareFrameSortButton_9:Point("LEFT", AtlasLootCompareFrameSortButton_8, "RIGHT", 1, 0) + AtlasLootDefaultFrame_InstanceSelect:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) + AtlasLoot_AtlasInfoFrame_ToggleALButton:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) + AtlasLootDefaultFrame_CompareFrame:SetFrameLevel(AtlasLootDefaultFrame:GetFrameLevel()+1) + AtlasLootPanelSearch_Box:SetHeight(16) + AtlasLootPanel:SetWidth(921) +end + +local function Nine_IsThere(self, elapsed) + self.timeLapse = self.timeLapse + elapsed + if(self.timeLapse < 2) then + return + else + self.timeLapse = 0 end - local function Compare_OnShow(self, event, ...) - for i = 1, 6 do _G["AtlasLootCompareFrameSortButton_"..i]:SetWidth(40)end; - local Nine = AtlasLootCompareFrameSortButton_9 - if Nine ~= nil then - Nine.timeLapse = 0 - Nine:SetScript("OnUpdate", Nine_IsThere) - end; + for i = 1, 9 do local f = _G["AtlasLootCompareFrameSortButton_"..i]f:SetWidth(44.44)end; + for _, object in pairs(nineisthere) do STYLE:ApplyFrameStyle(_G[object]) end; + AtlasLootCompareFrameSortButton_7:Point("LEFT", AtlasLootCompareFrameSortButton_6, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_8:Point("LEFT", AtlasLootCompareFrameSortButton_7, "RIGHT", 1, 0) + AtlasLootCompareFrameSortButton_9:Point("LEFT", AtlasLootCompareFrameSortButton_8, "RIGHT", 1, 0) +end + +local function Compare_OnShow(self, event, ...) + for i = 1, 6 do _G["AtlasLootCompareFrameSortButton_"..i]:SetWidth(40)end; + local Nine = AtlasLootCompareFrameSortButton_9 + if Nine ~= nil then + Nine.timeLapse = 0 + Nine:SetScript("OnUpdate", Nine_IsThere) + end; +end + +local _hook_ALPanel = function(self,_,parent,_,_,_,breaker) + if not breaker then + self:ClearAllPoints() + self:SetPoint("TOP",parent,"BOTTOM",0,-1,true) + end +end + +local _hook_OnUpdate = function(self, elapsed) + self.timeLapse = self.timeLapse + elapsed + if(self.timeLapse < 2) then + return + else + self.timeLapse = 0 end - local StripAllTextures={"AtlasLootDefaultFrame","AtlasLootDefaultFrame_ScrollFrame","AtlasLootItemsFrame","AtlasLootPanel","AtlasLootCompareFrame","AtlasLootCompareFrame_ScrollFrameMainFilterScrollChildFrame","AtlasLootCompareFrame_ScrollFrameItemFrame","AtlasLootCompareFrame_ScrollFrameMainFilter","AtlasLootCompareFrameSortButton_Name","AtlasLootCompareFrameSortButton_Rarity","AtlasLootCompareFrameSortButton_1","AtlasLootCompareFrameSortButton_2","AtlasLootCompareFrameSortButton_3","AtlasLootCompareFrameSortButton_4","AtlasLootCompareFrameSortButton_5","AtlasLootCompareFrameSortButton_6"} - local SetTemplateDefault={"AtlasLootCompareFrameSortButton_Name","AtlasLootCompareFrameSortButton_Rarity","AtlasLootCompareFrameSortButton_1","AtlasLootCompareFrameSortButton_2","AtlasLootCompareFrameSortButton_3","AtlasLootCompareFrameSortButton_4","AtlasLootCompareFrameSortButton_5","AtlasLootCompareFrameSortButton_6"} - local buttons={"AtlasLoot_AtlasInfoFrame_ToggleALButton","AtlasLootPanelSearch_SearchButton","AtlasLootDefaultFrame_CompareFrame","AtlasLootPanelSearch_ClearButton","AtlasLootPanelSearch_LastResultButton","AtlasLoot10Man25ManSwitch","AtlasLootItemsFrame_BACK","AtlasLootCompareFrameSearch_ClearButton","AtlasLootCompareFrameSearch_SearchButton","AtlasLootCompareFrame_WishlistButton","AtlasLootCompareFrame_CloseButton2"} + self:SetWidth(AtlasLootDefaultFrame:GetWidth()) +end + + +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; + -- Manipulate the main frames STYLE:ApplyFrameStyle(_G["AtlasLootDefaultFrame"], "Action"); - STYLE:ApplyFrameStyle(_G["AtlasLootItemsFrame"], "Button"); - STYLE:ApplyFrameStyle(_G["AtlasLootPanel"], "Transparent"); - hooksecurefunc(_G["AtlasLootPanel"],"SetPoint",function(self,_,parent,_,_,_,breaker) - if not breaker then - self:ClearAllPoints() - self:SetPoint("TOP",parent,"BOTTOM",0,-1,true) - end - end); + STYLE:ApplyUnderlayStyle(_G["AtlasLootItemsFrame"], "Inset"); + STYLE:ApplyFrameStyle(_G["AtlasLootPanel"], "Default"); + hooksecurefunc(_G["AtlasLootPanel"], "SetPoint", _hook_ALPanel); + _G["AtlasLootPanel"]:SetPoint("TOP",_G["AtlasLootDefaultFrame"],"BOTTOM",0,-1); -- Back to the rest STYLE:ApplyFrameStyle(_G["AtlasLootCompareFrame"], "Transparent"); @@ -134,7 +159,9 @@ local function StyleAtlasLoot() if AtlasLoot_PanelButton_10 then AtlasLoot_PanelButton_10:SetButtonTemplate() end if AtlasLoot_PanelButton_11 then AtlasLoot_PanelButton_11:SetButtonTemplate() end if AtlasLoot_PanelButton_12 then AtlasLoot_PanelButton_12:SetButtonTemplate() end - for i = 1, 15 do local f = _G["AtlasLootCompareFrameMainFilterButton"..i]f:Formula409()end; + + for i = 1, 15 do local f = _G["AtlasLootCompareFrameMainFilterButton"..i]f:Formula409() end; + STYLE:ApplyCloseButtonStyle(AtlasLootDefaultFrame_CloseButton) STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton) STYLE:ApplyCloseButtonStyle(AtlasLootCompareFrame_CloseButton_Wishlist) @@ -146,23 +173,39 @@ local function StyleAtlasLoot() AtlasLootItemsFrame_PREV:SetWidth(25) AtlasLootItemsFrame_PREV:SetHeight(25) STYLE:ApplyPaginationStyle(AtlasLootPanelSearch_SelectModuel) - STYLE:ApplyPaginationStyle(AtlasLootCompareFrameSearch_SelectModuel) - STYLE:ApplyDropdownStyle(AtlasLootDefaultFrame_PackageSelect) - AtlasLootDefaultFrame_PackageSelect:SetWidth(240) - AtlasLootDefaultFrame_PackageSelect:SetPoint("TOPLEFT", AtlasLootDefaultFrame, "TOPLEFT", 50, -50) + STYLE:ApplyPaginationStyle(AtlasLootCompareFrameSearch_SelectModuel) + + if(AtlasLootDefaultFrame_PackageSelect) then + STYLE:ApplyDropdownStyle(AtlasLootDefaultFrame_PackageSelect) + AtlasLootDefaultFrame_PackageSelect:SetWidth(240) + AtlasLootDefaultFrame_PackageSelect:SetPoint("TOPLEFT", AtlasLootDefaultFrame, "TOPLEFT", 50, -50) + end + + STYLE:ApplyDropdownStyle(AtlasLootDefaultFrame_ModuleSelect,240) STYLE:ApplyDropdownStyle(AtlasLootDefaultFrame_InstanceSelect,240) - --AtlasLootDefaultFrame_InstanceSelect:SetWidth(240) + STYLE:ApplyDropdownStyle(AtlasLootCompareFrameSearch_StatsListDropDown) AtlasLootCompareFrameSearch_StatsListDropDown:SetWidth(240) STYLE:ApplyDropdownStyle(AtlasLootCompareFrame_WishlistDropDown) AtlasLootCompareFrame_WishlistDropDown:SetWidth(240) AtlasLootPanelSearch_Box:SetEditboxTemplate() AtlasLootCompareFrameSearch_Box:SetEditboxTemplate() - if AtlasLootFilterCheck then AtlasLootFilterCheck:SetCheckboxTemplate(true) end - if AtlasLootItemsFrame_Heroic then AtlasLootItemsFrame_Heroic:SetCheckboxTemplate(true) end - if AtlasLootCompareFrameSearch_FilterCheck then AtlasLootCompareFrameSearch_FilterCheck:SetCheckboxTemplate(true) end - if AtlasLootItemsFrame_RaidFinder then AtlasLootItemsFrame_RaidFinder:SetCheckboxTemplate(true) end - if AtlasLootItemsFrame_Thunderforged then AtlasLootItemsFrame_Thunderforged:SetCheckboxTemplate(true) end + + if AtlasLootFilterCheck then + AtlasLootFilterCheck:SetCheckboxTemplate(true) + end + if AtlasLootItemsFrame_Heroic then + AtlasLootItemsFrame_Heroic:SetCheckboxTemplate(true) + end + if AtlasLootCompareFrameSearch_FilterCheck then AtlasLootCompareFrameSearch_FilterCheck:SetCheckboxTemplate(true) + end + if AtlasLootItemsFrame_RaidFinder then + AtlasLootItemsFrame_RaidFinder:SetCheckboxTemplate(true) + end + if AtlasLootItemsFrame_Thunderforged then + AtlasLootItemsFrame_Thunderforged:SetCheckboxTemplate(true) + end + AtlasLootPanel.Titel:SetTextColor(23/255, 132/255, 209/255) AtlasLootPanel.Titel:SetPoint("BOTTOM", AtlasLootPanel.TitelBg, "BOTTOM", 0, 40) STYLE:ApplyScrollStyle(AtlasLootCompareFrame_ScrollFrameItemFrameScrollBar) @@ -170,15 +213,11 @@ local function StyleAtlasLoot() AtlasLootDefaultFrame:HookScript("OnShow", AL_OnShow) AtlasLootCompareFrame:HookScript("OnShow", Compare_OnShow) AtlasLootPanel.timeLapse = 0; - AtlasLootPanel:HookScript("OnUpdate", function(self, elapsed) - self.timeLapse = self.timeLapse + elapsed - if(self.timeLapse < 2) then - return - else - self.timeLapse = 0 - end - self:SetWidth(AtlasLootDefaultFrame:GetWidth()) - end) - if AtlasLootTooltip:GetName() ~= "GameTooltip" then STYLE:ApplyTooltipStyle(AtlasLootTooltip) end + + --AtlasLootPanel:HookScript("OnUpdate", _hook_OnUpdate) + + if(AtlasLootTooltip:GetName() ~= "GameTooltip") then + STYLE:ApplyTooltipStyle(AtlasLootTooltip) + end end -STYLE:SaveAddonStyle("AtlasLoot", StyleAtlasLoot) \ No newline at end of file +STYLE:SaveAddonStyle("AtlasLoot", StyleAtlasLoot, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua index cd52cd9..65b6df7 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AuctionLite.lua @@ -45,6 +45,7 @@ local function BGHelper(parent) end local function StyleAuctionLite(event, ...) + assert(AuctionFrameTab4, "AddOn Not Loaded") if(not event or (event and event == 'PLAYER_ENTERING_WORLD')) then return; end BuyName:SetEditboxTemplate() @@ -82,4 +83,4 @@ local function StyleAuctionLite(event, ...) STYLE:SafeEventRemoval("AuctionLite", event) end -STYLE:SaveAddonStyle("AuctionLite", StyleAuctionLite, false, false, "AUCTION_HOUSE_SHOW") \ No newline at end of file +STYLE:SaveAddonStyle("AuctionLite", StyleAuctionLite, nil, nil, "AUCTION_HOUSE_SHOW") \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua index df3e815..e3e0fe1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua @@ -32,90 +32,95 @@ local STYLE = _G.StyleVillain BIGWIGS ########################################################## ]]-- -local BigWigsLoaded; -local function StyleBigWigs(event, addon) - local ButtonSize = 20 - local FreeBG = {} - local function freestyle(bar) - local bg = bar:Get("bigwigs:elvui:barbg") - if bg then - bg:ClearAllPoints() - bg:SetParent(SVUI[1].UIParent) - bg:Hide() - FreeBG[#FreeBG + 1] = bg - end +local FreeBG +local BigWigsLoaded - local ibg = bar:Get("bigwigs:elvui:iconbg") - if ibg then - ibg:ClearAllPoints() - ibg:SetParent(SVUI[1].UIParent) - ibg:Hide() - FreeBG[#FreeBG + 1] = ibg - end - bar.candyBarIconFrame.SetWidth = bar.candyBarIconFrame.OldSetWidth - bar.candyBarBar.SetPoint = bar.candyBarBar.OldSetPoint - bar.candyBarIconFrame:ClearAllPoints() - bar.candyBarIconFrame:SetPoint("TOPLEFT") - bar.candyBarIconFrame:SetPoint("BOTTOMLEFT") - bar.candyBarIconFrame:SetTexCoord(0.1,0.9,0.1,0.9) - bar.candyBarBar:ClearAllPoints() - bar.candyBarBar:SetPoint("TOPRIGHT") - bar.candyBarBar:SetPoint("BOTTOMRIGHT") - bar.candyBarBackground:SetAllPoints() - bar.candyBarDuration:ClearAllPoints() - bar.candyBarDuration:SetPoint("RIGHT", bar.candyBarBar, "RIGHT", -2, 0) - bar.candyBarLabel:ClearAllPoints() - bar.candyBarLabel:SetPoint("LEFT", bar.candyBarBar, "LEFT", 2, 0) - bar.candyBarLabel:SetPoint("RIGHT", bar.candyBarBar, "RIGHT", -2, 0) +local function freestyle(bar) + if not FreeBG then FreeBG = {} end + local bg = bar:Get("bigwigs:elvui:barbg") + if bg then + bg:ClearAllPoints() + bg:SetParent(SVUI[1].UIParent) + bg:Hide() + FreeBG[#FreeBG + 1] = bg end - local function applystyle(bar) - bar:Height(ButtonSize) - local bg = nil + + local ibg = bar:Get("bigwigs:elvui:iconbg") + if ibg then + ibg:ClearAllPoints() + ibg:SetParent(SVUI[1].UIParent) + ibg:Hide() + FreeBG[#FreeBG + 1] = ibg + end + bar.candyBarIconFrame.SetWidth = bar.candyBarIconFrame.OldSetWidth + bar.candyBarBar.SetPoint = bar.candyBarBar.OldSetPoint + bar.candyBarIconFrame:ClearAllPoints() + bar.candyBarIconFrame:SetPoint("TOPLEFT") + bar.candyBarIconFrame:SetPoint("BOTTOMLEFT") + bar.candyBarIconFrame:SetTexCoord(0.1,0.9,0.1,0.9) + bar.candyBarBar:ClearAllPoints() + bar.candyBarBar:SetPoint("TOPRIGHT") + bar.candyBarBar:SetPoint("BOTTOMRIGHT") + bar.candyBarBackground:SetAllPoints() + bar.candyBarDuration:ClearAllPoints() + bar.candyBarDuration:SetPoint("RIGHT", bar.candyBarBar, "RIGHT", -2, 0) + bar.candyBarLabel:ClearAllPoints() + bar.candyBarLabel:SetPoint("LEFT", bar.candyBarBar, "LEFT", 2, 0) + bar.candyBarLabel:SetPoint("RIGHT", bar.candyBarBar, "RIGHT", -2, 0) +end + +local function applystyle(bar) + if not FreeBG then FreeBG = {} end + bar:Height(20) + local bg = nil + if #FreeBG > 0 then + bg = tremove(FreeBG) + else + bg = CreateFrame("Frame") + end + bg:SetFixedPanelTemplate('Transparent', true) + bg:SetParent(bar) + bg:WrapOuter(bar) + bg:SetFrameLevel(bar:GetFrameLevel() - 1) + bg:SetFrameStrata(bar:GetFrameStrata()) + bg:Show() + bar:Set("bigwigs:elvui:barbg", bg) + local ibg = nil + if bar.candyBarIconFrame:GetTexture() then if #FreeBG > 0 then - bg = tremove(FreeBG) + ibg = tremove(FreeBG) else - bg = CreateFrame("Frame") - end - bg:SetFixedPanelTemplate('Transparent', true) - bg:SetParent(bar) - bg:WrapOuter(bar) - bg:SetFrameLevel(bar:GetFrameLevel() - 1) - bg:SetFrameStrata(bar:GetFrameStrata()) - bg:Show() - bar:Set("bigwigs:elvui:barbg", bg) - local ibg = nil - if bar.candyBarIconFrame:GetTexture() then - if #FreeBG > 0 then - ibg = tremove(FreeBG) - else - ibg = CreateFrame("Frame") - end - ibg:SetParent(bar) - ibg:SetFixedPanelTemplate('Transparent', true) - ibg:SetBackdropColor(0, 0, 0, 0) - ibg:WrapOuter(bar.candyBarIconFrame) - ibg:SetFrameLevel(bar:GetFrameLevel() - 1) - ibg:SetFrameStrata(bar:GetFrameStrata()) - ibg:Show() - bar:Set("bigwigs:elvui:iconbg", ibg) + ibg = CreateFrame("Frame") end - bar.candyBarLabel:SetJustifyH("LEFT") - bar.candyBarLabel:ClearAllPoints() - bar.candyBarDuration:SetJustifyH("RIGHT") - bar.candyBarDuration:ClearAllPoints() - bar.candyBarLabel:Point("LEFT", bar, "LEFT", 4, 0) - bar.candyBarDuration:Point("RIGHT", bar, "RIGHT", -4, 0) - bar.candyBarBar:ClearAllPoints() - bar.candyBarBar:SetAllPoints(bar) - bar.candyBarBar.OldSetPoint = bar.candyBarBar.SetPoint - bar.candyBarBar.SetPoint = SuperVillain.fubar - bar.candyBarIconFrame.OldSetWidth = bar.candyBarIconFrame.SetWidth - bar.candyBarIconFrame.SetWidth = SuperVillain.fubar - bar.candyBarIconFrame:ClearAllPoints() - bar.candyBarIconFrame:Point("BOTTOMRIGHT", bar, "BOTTOMLEFT", -1, 0) - bar.candyBarIconFrame:SetSize(ButtonSize, ButtonSize) - bar.candyBarIconFrame:SetTexCoord(0.1,0.9,0.1,0.9) + ibg:SetParent(bar) + ibg:SetFixedPanelTemplate('Transparent', true) + ibg:SetBackdropColor(0, 0, 0, 0) + ibg:WrapOuter(bar.candyBarIconFrame) + ibg:SetFrameLevel(bar:GetFrameLevel() - 1) + ibg:SetFrameStrata(bar:GetFrameStrata()) + ibg:Show() + bar:Set("bigwigs:elvui:iconbg", ibg) end + bar.candyBarLabel:SetJustifyH("LEFT") + bar.candyBarLabel:ClearAllPoints() + bar.candyBarDuration:SetJustifyH("RIGHT") + bar.candyBarDuration:ClearAllPoints() + bar.candyBarLabel:Point("LEFT", bar, "LEFT", 4, 0) + bar.candyBarDuration:Point("RIGHT", bar, "RIGHT", -4, 0) + bar.candyBarBar:ClearAllPoints() + bar.candyBarBar:SetAllPoints(bar) + bar.candyBarBar.OldSetPoint = bar.candyBarBar.SetPoint + bar.candyBarBar.SetPoint = SuperVillain.fubar + bar.candyBarIconFrame.OldSetWidth = bar.candyBarIconFrame.SetWidth + bar.candyBarIconFrame.SetWidth = SuperVillain.fubar + bar.candyBarIconFrame:ClearAllPoints() + bar.candyBarIconFrame:Point("BOTTOMRIGHT", bar, "BOTTOMLEFT", -1, 0) + bar.candyBarIconFrame:SetSize(20, 20) + bar.candyBarIconFrame:SetTexCoord(0.1,0.9,0.1,0.9) +end + +local function StyleBigWigs(event, addon) + assert(BigWigs, "AddOn Not Loaded") if (IsAddOnLoaded('BigWigs_Plugins') or event == "ADDON_LOADED" and addon == 'BigWigs_Plugins') then local BigWigsBars = BigWigs:GetPlugin('Bars') if BigWigsLoaded then return end @@ -135,4 +140,5 @@ local function StyleBigWigs(event, addon) STYLE:SafeEventRemoval("BigWigs", "PLAYER_ENTERING_WORLD") end end -STYLE:SaveAddonStyle("BigWigs", StyleBigWigs, "ADDON_LOADED") \ No newline at end of file + +STYLE:SaveAddonStyle("BigWigs", StyleBigWigs, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua new file mode 100644 index 0000000..f957bc3 --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua @@ -0,0 +1,56 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +S U P E R - V I L L A I N - U I By: Munglunch # +############################################################################## +########################################################## +LOCALIZED LUA FUNCTIONS +########################################################## +]]-- +--[[ GLOBALS ]]-- +local _G = _G; +local unpack = _G.unpack; +local select = _G.select; +local pairs = _G.pairs; +local string = _G.string; +--[[ STRING METHODS ]]-- +local format = string.format; +--[[ +########################################################## +GET ADDON DATA +########################################################## +]]-- +local SuperVillain, L = unpack(SVUI); +local STYLE = _G.StyleVillain; +--[[ +########################################################## +BUGSACK +########################################################## +]]-- +local function StyleBugSack(event, addon) + assert(BugSack, "AddOn Not Loaded") + hooksecurefunc(BugSack, "OpenSack", function() + if BugSackFrame.Panel then return end + BugSackFrame:Formula409() + BugSackFrame:SetPanelTemplate("Transparent") + STYLE:ApplyTabStyle(BugSackTabAll) + BugSackTabAll:SetPoint("TOPLEFT", BugSackFrame, "BOTTOMLEFT", 0, 1) + STYLE:ApplyTabStyle(BugSackTabSession) + STYLE:ApplyTabStyle(BugSackTabLast) + BugSackNextButton:SetButtonTemplate() + BugSackSendButton:SetButtonTemplate() + BugSackPrevButton:SetButtonTemplate() + STYLE:ApplyScrollbarStyle(BugSackScrollScrollBar) + end) +end + +STYLE:SaveAddonStyle("Bugsack", StyleBugSack) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua index c6527af..0fe5b66 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Clique.lua @@ -37,6 +37,8 @@ CLIQUE ########################################################## ]]-- local function StyleClique() + assert(CliqueDialog, "AddOn Not Loaded") + local Frames = { "CliqueDialog", "CliqueConfig", @@ -113,4 +115,5 @@ local function StyleClique() CliqueSpellTab.Panel:SetAllPoints() CliqueSpellTab:SetButtonTemplate() end + STYLE:SaveAddonStyle("Clique", StyleClique) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua index cb2ce77..8a1c7ff 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Cooline.lua @@ -37,6 +37,8 @@ COOLINE ########################################################## ]]-- local function StyleCoolLine() + assert(CoolLineDB, "AddOn Not Loaded") + CoolLineDB.bgcolor = { r = 0, g = 0, b = 0, a = 0, } CoolLineDB.border = "None" CoolLine.updatelook() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua index 9c711cf..89efad3 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DBM.lua @@ -36,170 +36,175 @@ local STYLE = _G.StyleVillain; DBM ########################################################## ]]-- -local function StyleDBM(event, addon) - local croprwicons = true - local buttonsize = 22 - local function StyleBars(self) - for bar in self:GetBarIterator() do - if not bar.injected then - bar.ApplyStyle = function() - local frame = bar.frame - local tbar = _G[frame:GetName()..'Bar'] - local spark = _G[frame:GetName()..'BarSpark'] - local texture = _G[frame:GetName()..'BarTexture'] - local icon1 = _G[frame:GetName()..'BarIcon1'] - local icon2 = _G[frame:GetName()..'BarIcon2'] - local name = _G[frame:GetName()..'BarName'] - local timer = _G[frame:GetName()..'BarTimer'] - if not icon1.overlay then - icon1.overlay = CreateFrame('Frame', '$parentIcon1Overlay', tbar) - icon1.overlay:Size(buttonsize) - icon1.overlay:SetPanelTemplate("Button") - icon1.overlay:SetFrameLevel(0) - icon1.overlay:Point('BOTTOMRIGHT', frame, 'BOTTOMLEFT', -2, 0) - end - if not icon2.overlay then - icon2.overlay = CreateFrame('Frame', '$parentIcon2Overlay', tbar) - icon2.overlay:Size(buttonsize) - icon2.overlay:SetPanelTemplate("Button") - icon2.overlay:SetFrameLevel(0) - icon2.overlay:Point('BOTTOMLEFT', frame, 'BOTTOMRIGHT', 2, 0) - end - if bar.color then - tbar:SetStatusBarColor(bar.color.r, bar.color.g, bar.color.b) - else - tbar:SetStatusBarColor(bar.owner.options.StartColorR, bar.owner.options.StartColorG, bar.owner.options.StartColorB) - end - if bar.enlarged then - frame:SetWidth(bar.owner.options.HugeWidth) - tbar:SetWidth(bar.owner.options.HugeWidth) - frame:SetScale(bar.owner.options.HugeScale) - else - frame:SetWidth(bar.owner.options.Width) - tbar:SetWidth(bar.owner.options.Width) - frame:SetScale(bar.owner.options.Scale) - end - spark:SetAlpha(0) - spark:SetTexture(0,0,0,0) - icon1:SetTexCoord(0.1,0.9,0.1,0.9) - icon1:ClearAllPoints() - icon1:SetAllPoints(icon1.overlay) - icon2:SetTexCoord(0.1,0.9,0.1,0.9) - icon2:ClearAllPoints() - icon2:SetAllPoints(icon2.overlay) - texture:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - tbar:SetAllPoints(frame) - frame:SetPanelTemplate("Bar") - name:ClearAllPoints() - name:SetWidth(165) - name:SetHeight(8) - name:SetJustifyH('LEFT') - name:SetShadowColor(0, 0, 0, 0) - timer:ClearAllPoints() - timer:SetJustifyH('RIGHT') - timer:SetShadowColor(0, 0, 0, 0) - frame:SetHeight(buttonsize) - name:Point('LEFT', frame, 'LEFT', 4, 0) - timer:Point('RIGHT', frame, 'RIGHT', -4, 0) - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - name:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) - timer:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) - if bar.owner.options.IconLeft then icon1:Show() icon1.overlay:Show() else icon1:Hide() icon1.overlay:Hide() end - if bar.owner.options.IconRight then icon2:Show() icon2.overlay:Show() else icon2:Hide() icon2.overlay:Hide() end - tbar:SetAlpha(1) - frame:SetAlpha(1) - texture:SetAlpha(1) - frame:Show() - bar:Update(0) - bar.injected = true +local function StyleBars(self) + for bar in self:GetBarIterator() do + if not bar.injected then + bar.ApplyStyle = function() + local frame = bar.frame + local tbar = _G[frame:GetName()..'Bar'] + local spark = _G[frame:GetName()..'BarSpark'] + local texture = _G[frame:GetName()..'BarTexture'] + local icon1 = _G[frame:GetName()..'BarIcon1'] + local icon2 = _G[frame:GetName()..'BarIcon2'] + local name = _G[frame:GetName()..'BarName'] + local timer = _G[frame:GetName()..'BarTimer'] + if not icon1.overlay then + icon1.overlay = CreateFrame('Frame', '$parentIcon1Overlay', tbar) + icon1.overlay:Size(22) + icon1.overlay:SetPanelTemplate("Button") + icon1.overlay:SetFrameLevel(0) + icon1.overlay:Point('BOTTOMRIGHT', frame, 'BOTTOMLEFT', -2, 0) + end + if not icon2.overlay then + icon2.overlay = CreateFrame('Frame', '$parentIcon2Overlay', tbar) + icon2.overlay:Size(22) + icon2.overlay:SetPanelTemplate("Button") + icon2.overlay:SetFrameLevel(0) + icon2.overlay:Point('BOTTOMLEFT', frame, 'BOTTOMRIGHT', 2, 0) + end + if bar.color then + tbar:SetStatusBarColor(bar.color.r, bar.color.g, bar.color.b) + else + tbar:SetStatusBarColor(bar.owner.options.StartColorR, bar.owner.options.StartColorG, bar.owner.options.StartColorB) end - bar:ApplyStyle() + if bar.enlarged then + frame:SetWidth(bar.owner.options.HugeWidth) + tbar:SetWidth(bar.owner.options.HugeWidth) + frame:SetScale(bar.owner.options.HugeScale) + else + frame:SetWidth(bar.owner.options.Width) + tbar:SetWidth(bar.owner.options.Width) + frame:SetScale(bar.owner.options.Scale) + end + spark:SetAlpha(0) + spark:SetTexture(0,0,0,0) + icon1:SetTexCoord(0.1,0.9,0.1,0.9) + icon1:ClearAllPoints() + icon1:SetAllPoints(icon1.overlay) + icon2:SetTexCoord(0.1,0.9,0.1,0.9) + icon2:ClearAllPoints() + icon2:SetAllPoints(icon2.overlay) + texture:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + tbar:SetAllPoints(frame) + frame:SetPanelTemplate("Bar") + name:ClearAllPoints() + name:SetWidth(165) + name:SetHeight(8) + name:SetJustifyH('LEFT') + name:SetShadowColor(0, 0, 0, 0) + timer:ClearAllPoints() + timer:SetJustifyH('RIGHT') + timer:SetShadowColor(0, 0, 0, 0) + frame:SetHeight(22) + name:Point('LEFT', frame, 'LEFT', 4, 0) + timer:Point('RIGHT', frame, 'RIGHT', -4, 0) + name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + name:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) + timer:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) + if bar.owner.options.IconLeft then icon1:Show() icon1.overlay:Show() else icon1:Hide() icon1.overlay:Hide() end + if bar.owner.options.IconRight then icon2:Show() icon2.overlay:Show() else icon2:Hide() icon2.overlay:Hide() end + tbar:SetAlpha(1) + frame:SetAlpha(1) + texture:SetAlpha(1) + frame:Show() + bar:Update(0) + bar.injected = true end + bar:ApplyStyle() end end - local StyleBossTitle = function() - local anchor = DBMBossHealthDropdown:GetParent() - if not anchor.styled then - local header = {anchor:GetRegions()} - if header[1]:IsObjectType('FontString') then - header[1]:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - header[1]:SetTextColor(1, 1, 1) - header[1]:SetShadowColor(0, 0, 0, 0) - anchor.styled = true - end - header = nil +end + +local StyleBossTitle = function() + local anchor = DBMBossHealthDropdown:GetParent() + if not anchor.styled then + local header = {anchor:GetRegions()} + if header[1]:IsObjectType('FontString') then + header[1]:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + header[1]:SetTextColor(1, 1, 1) + header[1]:SetShadowColor(0, 0, 0, 0) + anchor.styled = true end - anchor = nil + header = nil end - local StyleBoss = function() - local count = 1 - while _G[format('DBM_BossHealth_Bar_%d', count)] do - local bar = _G[format('DBM_BossHealth_Bar_%d', count)] - local background = _G[bar:GetName()..'BarBorder'] - local progress = _G[bar:GetName()..'Bar'] - local name = _G[bar:GetName()..'BarName'] - local timer = _G[bar:GetName()..'BarTimer'] - local prev = _G[format('DBM_BossHealth_Bar_%d', count-1)] - local _, anch, _ ,_, _ = bar:GetPoint() - bar:ClearAllPoints() - if count == 1 then - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point('BOTTOM', anch, 'TOP' , 0 , 12) - else - bar:Point('TOP', anch, 'BOTTOM' , 0, -buttonsize) - end + anchor = nil +end + +local StyleBoss = function() + local count = 1 + while _G[format('DBM_BossHealth_Bar_%d', count)] do + local bar = _G[format('DBM_BossHealth_Bar_%d', count)] + local background = _G[bar:GetName()..'BarBorder'] + local progress = _G[bar:GetName()..'Bar'] + local name = _G[bar:GetName()..'BarName'] + local timer = _G[bar:GetName()..'BarTimer'] + local prev = _G[format('DBM_BossHealth_Bar_%d', count-1)] + local _, anch, _ ,_, _ = bar:GetPoint() + bar:ClearAllPoints() + if count == 1 then + if DBM_SavedOptions.HealthFrameGrowUp then + bar:Point('BOTTOM', anch, 'TOP' , 0 , 12) else - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, buttonsize + 4) - else - bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, -(buttonsize + 4)) - end + bar:Point('TOP', anch, 'BOTTOM' , 0, -22) + end + else + if DBM_SavedOptions.HealthFrameGrowUp then + bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, 22 + 4) + else + bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, -(22 + 4)) end - bar:SetFixedPanelTemplate('Transparent') - background:SetNormalTexture(nil) - progress:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - progress:ClearAllPoints() - progress:FillInner(bar) - name:ClearAllPoints() - name:SetJustifyH('LEFT') - name:SetShadowColor(0, 0, 0, 0) - timer:ClearAllPoints() - timer:SetJustifyH('RIGHT') - timer:SetShadowColor(0, 0, 0, 0) - bar:SetHeight(buttonsize) - name:Point('LEFT', bar, 'LEFT', 4, 0) - timer:Point('RIGHT', bar, 'RIGHT', -4, 0) - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - count = count + 1 end + bar:SetFixedPanelTemplate('Transparent') + background:SetNormalTexture(nil) + progress:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + progress:ClearAllPoints() + progress:FillInner(bar) + name:ClearAllPoints() + name:SetJustifyH('LEFT') + name:SetShadowColor(0, 0, 0, 0) + timer:ClearAllPoints() + timer:SetJustifyH('RIGHT') + timer:SetShadowColor(0, 0, 0, 0) + bar:SetHeight(22) + name:Point('LEFT', bar, 'LEFT', 4, 0) + timer:Point('RIGHT', bar, 'RIGHT', -4, 0) + name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') + count = count + 1 end +end + +local function StyleDBM(event, addon) + assert(DBM, "AddOn Not Loaded") + hooksecurefunc(DBT, 'CreateBar', StyleBars) hooksecurefunc(DBM.BossHealth, 'Show', StyleBossTitle) hooksecurefunc(DBM.BossHealth, 'AddBoss', StyleBoss) hooksecurefunc(DBM.BossHealth, 'UpdateSettings', StyleBoss) + if not DBM_SavedOptions['DontShowRangeFrame'] then DBM.RangeCheck:Show() DBM.RangeCheck:Hide() DBMRangeCheck:HookScript('OnShow', function(self) self:SetFixedPanelTemplate('Transparent') end) DBMRangeCheckRadar:SetFixedPanelTemplate('Transparent') end + if not DBM_SavedOptions['DontShowInfoFrame'] then DBM.InfoFrame:Show(5, 'test') DBM.InfoFrame:Hide() DBMInfoFrame:HookScript('OnShow', function(self) self:SetFixedPanelTemplate('Transparent') end) end - if croprwicons then - local RaidNotice_AddMessage_ = RaidNotice_AddMessage - RaidNotice_AddMessage = function(noticeFrame, textString, colorInfo) - if textString:find(' |T') then - textString = gsub(textString,'(:12:12)',':18:18:0:0:64:64:5:59:5:59') - end - return RaidNotice_AddMessage_(noticeFrame, textString, colorInfo) + + local RaidNotice_AddMessage_ = RaidNotice_AddMessage + RaidNotice_AddMessage = function(noticeFrame, textString, colorInfo) + if textString:find(' |T') then + textString = gsub(textString,'(:12:12)',':18:18:0:0:64:64:5:59:5:59') end + return RaidNotice_AddMessage_(noticeFrame, textString, colorInfo) end - STYLE:SafeEventRemoval("DBM-Core", event) + + STYLE:SafeEventRemoval("DBM", event) end -STYLE:SaveAddonStyle("DBM-Core", StyleDBM, false, false, "PLAYER_ENTERING_WORLD", "ADDON_LOADED") \ No newline at end of file +STYLE:SaveAddonStyle("DBM", StyleDBM, false, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua index c6e53c5..38c03e4 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua @@ -39,35 +39,56 @@ local playerKey = ("%s - %s"):format(playerName, playerRealm) DXE ########################################################## ]]-- +local function StyleDXEBar(bar) + bar:SetFixedPanelTemplate("Transparent") + bar.bg:SetTexture(0,0,0,0) + bar.border.Show = SuperVillain.fubar + bar.border:Hide() + bar.statusbar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + bar.statusbar:ClearAllPoints() + bar.statusbar:FillInner() + bar.righticon:SetFixedPanelTemplate("Default") + bar.righticon.border.Show = SuperVillain.fubar + bar.righticon.border:Hide() + bar.righticon:ClearAllPoints() + bar.righticon:SetPoint("LEFT", bar, "RIGHT", 2, 0) + bar.righticon.t:SetTexCoord(0.1,0.9,0.1,0.9) + bar.righticon.t:ClearAllPoints() + bar.righticon.t:FillInner() + bar.righticon.t:SetDrawLayer("ARTWORK") + bar.lefticon:SetFixedPanelTemplate("Default") + bar.lefticon.border.Show = SuperVillain.fubar + bar.lefticon.border:Hide() + bar.lefticon:ClearAllPoints() + bar.lefticon:SetPoint("RIGHT", bar, "LEFT", -2, 0) + bar.lefticon.t:SetTexCoord(0.1,0.9,0.1,0.9) + bar.lefticon.t:ClearAllPoints() + bar.lefticon.t:FillInner() + bar.lefticon.t:SetDrawLayer("ARTWORK") +end + +local function RefreshDXEBars(frame) + if frame.refreshing then return end + frame.refreshing = true + local i = 1 + while _G["DXEAlertBar"..i] do + local bar = _G["DXEAlertBar"..i] + if not bar.styled then + bar:SetScale(1) + bar.SetScale = SuperVillain.fubar + StyleDXEBar(bar) + bar.styled = true + end + i = i + 1 + end + frame.refreshing = false +end + LoadAddOn("DXE") + local function StyleDXE() - local function StyleDXEBar(bar) - bar:SetFixedPanelTemplate("Transparent") - bar.bg:SetTexture(0,0,0,0) - bar.border.Show = SuperVillain.fubar - bar.border:Hide() - bar.statusbar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - bar.statusbar:ClearAllPoints() - bar.statusbar:FillInner() - bar.righticon:SetFixedPanelTemplate("Default") - bar.righticon.border.Show = SuperVillain.fubar - bar.righticon.border:Hide() - bar.righticon:ClearAllPoints() - bar.righticon:SetPoint("LEFT", bar, "RIGHT", 2, 0) - bar.righticon.t:SetTexCoord(0.1,0.9,0.1,0.9) - bar.righticon.t:ClearAllPoints() - bar.righticon.t:FillInner() - bar.righticon.t:SetDrawLayer("ARTWORK") - bar.lefticon:SetFixedPanelTemplate("Default") - bar.lefticon.border.Show = SuperVillain.fubar - bar.lefticon.border:Hide() - bar.lefticon:ClearAllPoints() - bar.lefticon:SetPoint("RIGHT", bar, "LEFT", -2, 0) - bar.lefticon.t:SetTexCoord(0.1,0.9,0.1,0.9) - bar.lefticon.t:ClearAllPoints() - bar.lefticon.t:FillInner() - bar.lefticon.t:SetDrawLayer("ARTWORK") - end + assert(DXE, "AddOn Not Loaded") + DXE.LayoutHealthWatchers_ = DXE.LayoutHealthWatchers DXE.LayoutHealthWatchers = function(frame) DXE:LayoutHealthWatchers_() @@ -80,24 +101,10 @@ local function StyleDXE() end end end - local function RefreshDXEBars(frame) - if frame.refreshing then return end - frame.refreshing = true - local i = 1 - while _G["DXEAlertBar"..i] do - local bar = _G["DXEAlertBar"..i] - if not bar.styled then - bar:SetScale(1) - bar.SetScale = SuperVillain.fubar - StyleDXEBar(bar) - bar.styled = true - end - i = i + 1 - end - frame.refreshing = false - end + local DXEAlerts = DXE:GetModule("Alerts") local frame = CreateFrame("Frame") + frame.elapsed = 1 frame:SetScript("OnUpdate", function(frame,elapsed) frame.elapsed = frame.elapsed + elapsed @@ -106,14 +113,17 @@ local function StyleDXE() frame.elapsed = 0 end end) + hooksecurefunc(DXEAlerts, "Simple", RefreshDXEBars) hooksecurefunc(DXEAlerts, "RefreshBars", RefreshDXEBars) DXE:LayoutHealthWatchers() DXE.Alerts:RefreshBars() + if not DXEDB then DXEDB = {} end if not DXEDB["profiles"] then DXEDB["profiles"] = {} end if not DXEDB["profiles"][playerKey] then DXEDB["profiles"][playerKey] = {} end if not DXEDB["profiles"][playerKey]["Globals"] then DXEDB["profiles"][playerKey]["Globals"] = {} end + DXEDB["profiles"][playerKey]["Globals"]["BackgroundTexture"] = [[Interface\BUTTONS\WHITE8X8]] DXEDB["profiles"][playerKey]["Globals"]["BarTexture"] = [[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]] DXEDB["profiles"][playerKey]["Globals"]["Border"] = "None" diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua index 697364e..126e8f3 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua @@ -52,31 +52,37 @@ local function DoDis(self, elapsed) end local function StyleLightHeaded() + assert(LightHeadedFrame, "AddOn Not Loaded") + + local lhframe = _G["LightHeadedFrame"] + local lhsub = _G["LightHeadedFrameSub"] + local lhopts = _G["LightHeaded_Panel"] + STYLE:ApplyFrameStyle(LightHeadedFrame) STYLE:ApplyFrameStyle(LightHeadedFrameSub) STYLE:ApplyFrameStyle(LightHeadedSearchBox) STYLE:ApplyTooltipStyle(LightHeadedTooltip) LightHeadedScrollFrame:Formula409() - local lhframe = LightHeadedFrame + lhframe.close:Hide() STYLE:ApplyCloseButtonStyle(lhframe.close) lhframe.handle:Hide() - local lhframe = LightHeadedFrameSub - STYLE:ApplyPaginationStyle(lhframe.prev) - STYLE:ApplyPaginationStyle(lhframe.next) - lhframe.prev:SetWidth(16) - lhframe.prev:SetHeight(16) - lhframe.next:SetWidth(16) - lhframe.next:SetHeight(16) - lhframe.prev:SetPoint("RIGHT", lhframe.page, "LEFT", -25, 0) - lhframe.next:SetPoint("LEFT", lhframe.page, "RIGHT", 25, 0) + + STYLE:ApplyPaginationStyle(lhsub.prev) + STYLE:ApplyPaginationStyle(lhsub.next) + lhsub.prev:SetWidth(16) + lhsub.prev:SetHeight(16) + lhsub.next:SetWidth(16) + lhsub.next:SetHeight(16) + lhsub.prev:SetPoint("RIGHT", lhsub.page, "LEFT", -25, 0) + lhsub.next:SetPoint("LEFT", lhsub.page, "RIGHT", 25, 0) STYLE:ApplyScrollStyle(LightHeadedScrollFrameScrollBar, 5) - lhframe.title:SetTextColor(23/255, 132/255, 209/255) - local LH_OnLoad = _G["LightHeadedFrame"] - LH_OnLoad.timeLapse = 0; - LH_OnLoad:SetScript("OnUpdate", DoDis) - local LH_Options = _G["LightHeaded_Panel"] - if LH_Options:IsVisible() then + lhsub.title:SetTextColor(23/255, 132/255, 209/255) + + lhframe.timeLapse = 0; + lhframe:SetScript("OnUpdate", DoDis) + + if lhopts:IsVisible() then for i = 1, 9 do local cbox = _G["LightHeaded_Panel_Toggle"..i] cbox:SetCheckboxTemplate(true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua index e64eb74..2b073ea 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua @@ -36,41 +36,45 @@ local STYLE = _G.StyleVillain; MOGIT ########################################################## ]]-- +local function StyleMogItPreview() + for i = 1, 99 do + local MogItGearSlots = { + "HeadSlot", + "ShoulderSlot", + "BackSlot", + "ChestSlot", + "ShirtSlot", + "TabardSlot", + "WristSlot", + "HandsSlot", + "WaistSlot", + "LegsSlot", + "FeetSlot", + "MainHandSlot", + "SecondaryHandSlot", + } + for _, object in pairs(MogItGearSlots) do + if _G["MogItPreview"..i..object] then + STYLE:ApplyLinkButtonStyle(_G["MogItPreview"..i..object]) + _G["MogItPreview"..i..object]:SetPushedTexture(nil) + _G["MogItPreview"..i..object]:SetHighlightTexture(nil) + end + end + if _G["MogItPreview"..i] then STYLE:ApplyFrameStyle(_G["MogItPreview"..i]) end + if _G["MogItPreview"..i.."CloseButton"] then STYLE:ApplyCloseButtonStyle(_G["MogItPreview"..i.."CloseButton"]) end + if _G["MogItPreview"..i.."Inset"] then _G["MogItPreview"..i.."Inset"]:Formula409(true) end + if _G["MogItPreview"..i.."Activate"] then _G["MogItPreview"..i.."Activate"]:SetButtonTemplate() end + end +end + local function StyleMogIt() + assert(MogItFrame, "AddOn Not Loaded") + STYLE:ApplyFrameStyle(MogItFrame) MogItFrameInset:Formula409(true) STYLE:ApplyFrameStyle(MogItFilters) MogItFiltersInset:Formula409(true) - local function StyleMogItPreview() - for i = 1, 99 do - local MogItGearSlots = { - "HeadSlot", - "ShoulderSlot", - "BackSlot", - "ChestSlot", - "ShirtSlot", - "TabardSlot", - "WristSlot", - "HandsSlot", - "WaistSlot", - "LegsSlot", - "FeetSlot", - "MainHandSlot", - "SecondaryHandSlot", - } - for _, object in pairs(MogItGearSlots) do - if _G["MogItPreview"..i..object] then - STYLE:ApplyLinkButtonStyle(_G["MogItPreview"..i..object]) - _G["MogItPreview"..i..object]:SetPushedTexture(nil) - _G["MogItPreview"..i..object]:SetHighlightTexture(nil) - end - end - if _G["MogItPreview"..i] then STYLE:ApplyFrameStyle(_G["MogItPreview"..i]) end - if _G["MogItPreview"..i.."CloseButton"] then STYLE:ApplyCloseButtonStyle(_G["MogItPreview"..i.."CloseButton"]) end - if _G["MogItPreview"..i.."Inset"] then _G["MogItPreview"..i.."Inset"]:Formula409(true) end - if _G["MogItPreview"..i.."Activate"] then _G["MogItPreview"..i.."Activate"]:SetButtonTemplate() end - end - end + hooksecurefunc(MogIt, "CreatePreview", StyleMogItPreview) STYLE:ApplyTooltipStyle(MogItTooltip) STYLE:ApplyCloseButtonStyle(MogItFrameCloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua index e14bf1b..e8af2eb 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Omen.lua @@ -37,6 +37,8 @@ OMEN ########################################################## ]]-- local function StyleOmen() + assert(Omen, "AddOn Not Loaded") + Omen.db.profile.Scale = 1 Omen.db.profile.Bar.Spacing = 1 Omen.db.profile.Background.EdgeSize = 2 diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua index 5ffb382..8acfaf2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua @@ -37,6 +37,8 @@ OUTFITTER ########################################################## ]]-- local function StyleOutfitter() + assert(OutfitterFrame, "AddOn Not Loaded") + CharacterFrame:HookScript("OnShow", function(self) PaperDollSidebarTabs:SetPoint("BOTTOMRIGHT", CharacterFrameInsetRight, "TOPRIGHT", -14, 0) end) OutfitterFrame:HookScript("OnShow", function(self) STYLE:ApplyFrameStyle(OutfitterFrame) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua index 189ed2a..62cbed9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Postal.lua @@ -37,8 +37,11 @@ POSTAL ########################################################## ]]-- local function StylePostal() + assert(PostalOpenAllButton, "AddOn Not Loaded") + InboxPrevPageButton:Point("CENTER", InboxFrame, "BOTTOMLEFT", 45, 112) InboxNextPageButton:Point("CENTER", InboxFrame, "BOTTOMLEFT", 295, 112) + for i = 1, INBOXITEMS_TO_DISPLAY do local b = _G["MailItem"..i.."ExpireTime"] b:SetPoint("TOPRIGHT", "MailItem"..i, "TOPRIGHT", -5, -10) @@ -81,4 +84,4 @@ local function StylePostal() Postal_BlackBookButton:SetPoint('LEFT', SendMailNameEditBox, 'RIGHT', 5, 2) end end -STYLE:SaveAddonStyle("Postal", StylePostal, 'MAIL_SHOW') \ No newline at end of file +STYLE:SaveAddonStyle("Postal", StylePostal, nil, nil, 'MAIL_SHOW') \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua index 78e4692..59a9487 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Quartz.lua @@ -39,7 +39,10 @@ QUARTZ local function StyleQuartz() local AceAddon = LibStub("AceAddon-3.0") if(not AceAddon) then return end - local Quartz3 = AceAddon:GetAddon("Quartz3") + local Quartz3 = AceAddon:GetAddon("Quartz3", true) + + assert(Quartz3, "AddOn Not Loaded") + local GCD = Quartz3:GetModule("GCD") local CastBar = Quartz3.CastBarTemplate.template local function StyleQuartzBar(self) @@ -57,9 +60,11 @@ local function StyleQuartz() self.IconBorder:Show() end end + hooksecurefunc(CastBar, 'ApplySettings', StyleQuartzBar) hooksecurefunc(CastBar, 'UNIT_SPELLCAST_START', StyleQuartzBar) hooksecurefunc(CastBar, 'UNIT_SPELLCAST_CHANNEL_START', StyleQuartzBar) + if GCD then hooksecurefunc(GCD, 'CheckGCD', function() if not Quartz3GCDBar.backdrop then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua index b1e52bc..736a240 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua @@ -50,7 +50,8 @@ local function NoColor(a) end; local function StyleRecount() - + assert(Recount, "AddOn Not Loaded") + function Recount:ShowReset() STYLE:LoadAlert(L['Reset Recount?'], function(self) Recount:ResetData() self:GetParent():Hide() end) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua index 90e55f8..09ed020 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/SexyCooldown.lua @@ -36,52 +36,59 @@ local STYLE = _G.StyleVillain; SEXYCOOLDOWN ########################################################## ]]-- -local function StyleSexyCooldown() - local function SCDStripStyleSettings(bar) - bar.optionsTable.args.icon.args.borderheader = nil - bar.optionsTable.args.icon.args.border = nil - bar.optionsTable.args.icon.args.borderColor = nil - bar.optionsTable.args.icon.args.borderSize = nil - bar.optionsTable.args.icon.args.borderInset = nil - bar.optionsTable.args.bar.args.bnbheader = nil - bar.optionsTable.args.bar.args.texture = nil - bar.optionsTable.args.bar.args.backgroundColor = nil - bar.optionsTable.args.bar.args.border = nil - bar.optionsTable.args.bar.args.borderColor = nil - bar.optionsTable.args.bar.args.borderSize = nil - bar.optionsTable.args.bar.args.borderInset = nil - end - local function StyleSexyCooldownBar(bar) - SCDStripStyleSettings(bar) - STYLE:ApplyFrameStyle(bar) - SuperVillain:AddToDisplayAudit(bar) - if STYLE:IsAddonReady("DockletSexyCooldown") then - bar:ClearAllPoints() - bar:Point('BOTTOMRIGHT', SVUI_ActionBar1, 'TOPRIGHT', 0, 2) - bar:Point("BOTTOMLEFT", SVUI_ActionBar1, "TOPLEFT", 0, 2) - bar:SetHeight(SVUI_ActionBar1Button1:GetHeight()) - end - end - local function StyleSexyCooldownIcon(bar, icon) - if not icon.styled then - STYLE:ApplyFrameStyle(icon, false, true) - STYLE:ApplyFrameStyle(icon.overlay,"Transparent",true) - icon.styled = true - end - icon.overlay.tex:SetTexCoord(0.1,0.9,0.1,0.9) - icon.tex:SetTexCoord(0.1,0.9,0.1,0.9) - end - local function StyleSexyCooldownBackdrop(bar) - bar:SetFixedPanelTemplate("Transparent") +local function SCDStripStyleSettings(bar) + bar.optionsTable.args.icon.args.borderheader = nil + bar.optionsTable.args.icon.args.border = nil + bar.optionsTable.args.icon.args.borderColor = nil + bar.optionsTable.args.icon.args.borderSize = nil + bar.optionsTable.args.icon.args.borderInset = nil + bar.optionsTable.args.bar.args.bnbheader = nil + bar.optionsTable.args.bar.args.texture = nil + bar.optionsTable.args.bar.args.backgroundColor = nil + bar.optionsTable.args.bar.args.border = nil + bar.optionsTable.args.bar.args.borderColor = nil + bar.optionsTable.args.bar.args.borderSize = nil + bar.optionsTable.args.bar.args.borderInset = nil +end + +local function StyleSexyCooldownBar(bar) + SCDStripStyleSettings(bar) + STYLE:ApplyFrameStyle(bar) + SuperVillain:AddToDisplayAudit(bar) + if STYLE:IsAddonReady("DockletSexyCooldown") then + bar:ClearAllPoints() + bar:Point('BOTTOMRIGHT', SVUI_ActionBar1, 'TOPRIGHT', 0, 2) + bar:Point("BOTTOMLEFT", SVUI_ActionBar1, "TOPLEFT", 0, 2) + bar:SetHeight(SVUI_ActionBar1Button1:GetHeight()) end - local function HookSCDBar(bar) - if bar.hooked then return end - hooksecurefunc(bar, "UpdateBarLook", StyleSexyCooldownBar) - hooksecurefunc(bar, "UpdateSingleIconLook", StyleSexyCooldownIcon) - hooksecurefunc(bar, "UpdateBarBackdrop", StyleSexyCooldownBackdrop) - bar.settings.icon.borderInset = 0 - bar.hooked = true +end + +local function StyleSexyCooldownIcon(bar, icon) + if not icon.styled then + STYLE:ApplyFrameStyle(icon, false, true) + STYLE:ApplyFrameStyle(icon.overlay,"Transparent",true) + icon.styled = true end + icon.overlay.tex:SetTexCoord(0.1,0.9,0.1,0.9) + icon.tex:SetTexCoord(0.1,0.9,0.1,0.9) +end + +local function StyleSexyCooldownBackdrop(bar) + bar:SetFixedPanelTemplate("Transparent") +end + +local function HookSCDBar(bar) + if bar.hooked then return end + hooksecurefunc(bar, "UpdateBarLook", StyleSexyCooldownBar) + hooksecurefunc(bar, "UpdateSingleIconLook", StyleSexyCooldownIcon) + hooksecurefunc(bar, "UpdateBarBackdrop", StyleSexyCooldownBackdrop) + bar.settings.icon.borderInset = 0 + bar.hooked = true +end + +local function StyleSexyCooldown() + assert(SexyCooldown2, "AddOn Not Loaded") + for _, bar in ipairs(SexyCooldown2.bars) do HookSCDBar(bar) bar:UpdateBarLook() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua index dde4bc7..00dd257 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Skada.lua @@ -72,6 +72,8 @@ local function skada_panel_loader(holder, window, parent) end local function StyleSkada() + assert(Skada, "AddOn Not Loaded") + if(not SkadaHolder) then local SkadaHolder = CreateFrame("Frame", "SkadaHolder", UIParent) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua index 2d7a62d..493fa90 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TinyDPS.lua @@ -37,17 +37,22 @@ TINYDPS ########################################################## ]]-- local function StyleTinyDPS() + assert(tdpsFrame, "AddOn Not Loaded") + STYLE:ApplyFrameStyle(tdpsFrame) + tdpsFrame:HookScript("OnShow", function() if InCombatLockdown() then return end; if SuperVillain.CurrentlyDocked["tdpsFrame"] then SuperDockWindowRight:Show() end - end) + end) + if tdpsStatusBar then tdpsStatusBar:SetBackdrop({bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]], edgeFile = S.Blank, tile = false, tileSize = 0, edgeSize = 1}) tdpsStatusBar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) end + tdpsRefresh() end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua index 3d35340..91df25e 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TomTom.lua @@ -37,8 +37,7 @@ TOMTOM ########################################################## ]]-- local function StyleTomTom() - if TomTomBlock then - STYLE:ApplyFrameStyle(TomTomBlock) - end + assert(TomTomBlock, "AddOn Not Loaded") + STYLE:ApplyFrameStyle(TomTomBlock) end STYLE:SaveAddonStyle("TomTom", StyleTomTom) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua index 73c6b44..9ba5cf9 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua @@ -37,6 +37,8 @@ TSDW ########################################################## ]]-- local function StyleTradeSkillDW() + assert(TradeSkillDW_QueueFrame, "AddOn Not Loaded") + TradeSkillFrame:SetPanelTemplate("Action") TradeSkillListScrollFrame:Formula409(true) TradeSkillDetailScrollFrame:Formula409(true) @@ -114,8 +116,11 @@ local function StyleTradeSkillDW() _G["TradeSkillReagent"..i.."NameFrame"]:MUNG() end end) + TradeSkillDW_QueueFrame:HookScript("OnShow", function() STYLE:ApplyFrameStyle(TradeSkillDW_QueueFrame,"Transparent") end) + STYLE:ApplyCloseButtonStyle(TradeSkillDW_QueueFrameCloseButton) + TradeSkillDW_QueueFrameInset:Formula409() TradeSkillDW_QueueFrameClear:SetButtonTemplate() TradeSkillDW_QueueFrameDown:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua index cf5721a..3487c57 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua @@ -36,183 +36,200 @@ local STYLE = _G.StyleVillain; VEM ########################################################## ]]-- -local function StyleVEM(event, addon) - if event == 'PLAYER_ENTERING_WORLD' then - local croprwicons = true - local buttonsize = 22 - local function StyleBars(self) - for bar in self:GetBarIterator() do - if not bar.injected then - bar.ApplyStyle = function() - local frame = bar.frame - local tbar = _G[frame:GetName()..'Bar'] - local spark = _G[frame:GetName()..'BarSpark'] - local texture = _G[frame:GetName()..'BarTexture'] - local icon1 = _G[frame:GetName()..'BarIcon1'] - local icon2 = _G[frame:GetName()..'BarIcon2'] - local name = _G[frame:GetName()..'BarName'] - local timer = _G[frame:GetName()..'BarTimer'] - if not icon1.overlay then - icon1.overlay = CreateFrame('Frame', '$parentIcon1Overlay', tbar) - icon1.overlay:SetFixedPanelTemplate() - icon1.overlay:SetFrameLevel(0) - icon1.overlay:Size(buttonsize) - icon1.overlay:Point('BOTTOMRIGHT', frame, 'BOTTOMLEFT', -2, 0) - end - if not icon2.overlay then - icon2.overlay = CreateFrame('Frame', '$parentIcon2Overlay', tbar) - icon2.overlay:SetFixedPanelTemplate() - icon2.overlay:SetFrameLevel(0) - icon2.overlay:Size(buttonsize) - icon2.overlay:Point('BOTTOMLEFT', frame, 'BOTTOMRIGHT', 2, 0) - end - if bar.color then - tbar:SetStatusBarColor(bar.color.r, bar.color.g, bar.color.b) - else - tbar:SetStatusBarColor(bar.owner.options.StartColorR, bar.owner.options.StartColorG, bar.owner.options.StartColorB) - end - if bar.enlarged then - frame:SetWidth(bar.owner.options.HugeWidth) - tbar:SetWidth(bar.owner.options.HugeWidth) - frame:SetScale(bar.owner.options.HugeScale) - else - frame:SetWidth(bar.owner.options.Width) - tbar:SetWidth(bar.owner.options.Width) - frame:SetScale(bar.owner.options.Scale) - end - spark:SetAlpha(0) - spark:SetTexture(0,0,0,0) - icon1:SetTexCoord(0.1,0.9,0.1,0.9) - icon1:ClearAllPoints() - icon1:FillInner(icon1.overlay) - icon2:SetTexCoord(0.1,0.9,0.1,0.9) - icon2:ClearAllPoints() - icon2:FillInner(icon2.overlay) - texture:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - tbar:FillInner(frame) - frame:SetFixedPanelTemplate() - name:ClearAllPoints() - name:SetWidth(165) - name:SetHeight(8) - name:SetJustifyH('LEFT') - name:SetShadowColor(0, 0, 0, 0) - timer:ClearAllPoints() - timer:SetJustifyH('RIGHT') - timer:SetShadowColor(0, 0, 0, 0) - if STYLE:IsAddonReady('DBMHalfBar') then - frame:SetHeight(buttonsize / 3) - name:Point('BOTTOMLEFT', frame, 'TOPLEFT', 0, 4) - timer:Point('BOTTOMRIGHT', frame, 'TOPRIGHT', -1, 2) - else - frame:SetHeight(buttonsize) - name:Point('LEFT', frame, 'LEFT', 4, 0) - timer:Point('RIGHT', frame, 'RIGHT', -4, 0) - end - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - name:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) - timer:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) - if bar.owner.options.IconLeft then icon1:Show() icon1.overlay:Show() else icon1:Hide() icon1.overlay:Hide() end - if bar.owner.options.IconRight then icon2:Show() icon2.overlay:Show() else icon2:Hide() icon2.overlay:Hide() end - tbar:SetAlpha(1) - frame:SetAlpha(1) - texture:SetAlpha(1) - frame:Show() - bar:Update(0) - bar.injected = true - end - bar:ApplyStyle() +local RaidNotice_AddMessage_ = RaidNotice_AddMessage +local NewHook = hooksecurefunc + +local function StyleBars(self) + for bar in self:GetBarIterator() do + if not bar.injected then + bar.ApplyStyle = function() + local frame = bar.frame + local tbar = _G[frame:GetName()..'Bar'] + local spark = _G[frame:GetName()..'BarSpark'] + local texture = _G[frame:GetName()..'BarTexture'] + local icon1 = _G[frame:GetName()..'BarIcon1'] + local icon2 = _G[frame:GetName()..'BarIcon2'] + local name = _G[frame:GetName()..'BarName'] + local timer = _G[frame:GetName()..'BarTimer'] + + if not icon1.overlay then + icon1.overlay = CreateFrame('Frame', '$parentIcon1Overlay', tbar) + icon1.overlay:SetFixedPanelTemplate() + icon1.overlay:SetFrameLevel(0) + icon1.overlay:Size(22) + icon1.overlay:Point('BOTTOMRIGHT', frame, 'BOTTOMLEFT', -2, 0) end - end - end - local StyleBossTitle = function() - local anchor = VEMBossHealthDropdown:GetParent() - if not anchor.styled then - local header = {anchor:GetRegions()} - if header[1]:IsObjectType('FontString') then - header[1]:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - header[1]:SetTextColor(1, 1, 1) - header[1]:SetShadowColor(0, 0, 0, 0) - anchor.styled = true + if not icon2.overlay then + icon2.overlay = CreateFrame('Frame', '$parentIcon2Overlay', tbar) + icon2.overlay:SetFixedPanelTemplate() + icon2.overlay:SetFrameLevel(0) + icon2.overlay:Size(22) + icon2.overlay:Point('BOTTOMLEFT', frame, 'BOTTOMRIGHT', 2, 0) end - header = nil - end - anchor = nil - end - local StyleBoss = function() - local count = 1 - while _G[format('VEM_BossHealth_Bar_%d', count)] do - local bar = _G[format('VEM_BossHealth_Bar_%d', count)] - local background = _G[bar:GetName()..'BarBorder'] - local progress = _G[bar:GetName()..'Bar'] - local name = _G[bar:GetName()..'BarName'] - local timer = _G[bar:GetName()..'BarTimer'] - local prev = _G[format('VEM_BossHealth_Bar_%d', count-1)] - local _, anch, _ ,_, _ = bar:GetPoint() - bar:ClearAllPoints() - if count == 1 then - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point('BOTTOM', anch, 'TOP' , 0 , 12) - else - bar:Point('TOP', anch, 'BOTTOM' , 0, -buttonsize) - end + + if bar.color then + tbar:SetStatusBarColor(bar.color.r, bar.color.g, bar.color.b) else - if DBM_SavedOptions.HealthFrameGrowUp then - bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, buttonsize + 4) - else - bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, -(buttonsize + 4)) - end + tbar:SetStatusBarColor(bar.owner.options.StartColorR, bar.owner.options.StartColorG, bar.owner.options.StartColorB) end - bar:SetFixedPanelTemplate('Transparent') - background:SetNormalTexture(nil) - progress:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) - progress:ClearAllPoints() - progress:FillInner(bar) + + if bar.enlarged then + frame:SetWidth(bar.owner.options.HugeWidth) + tbar:SetWidth(bar.owner.options.HugeWidth) + frame:SetScale(bar.owner.options.HugeScale) + else + frame:SetWidth(bar.owner.options.Width) + tbar:SetWidth(bar.owner.options.Width) + frame:SetScale(bar.owner.options.Scale) + end + + spark:SetAlpha(0) + spark:SetTexture(0,0,0,0) + + icon1:SetTexCoord(0.1,0.9,0.1,0.9) + icon1:ClearAllPoints() + icon1:FillInner(icon1.overlay) + + icon2:SetTexCoord(0.1,0.9,0.1,0.9) + icon2:ClearAllPoints() + icon2:FillInner(icon2.overlay) + + texture:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + tbar:FillInner(frame) + + frame:SetFixedPanelTemplate() + name:ClearAllPoints() + name:SetWidth(165) + name:SetHeight(8) name:SetJustifyH('LEFT') name:SetShadowColor(0, 0, 0, 0) timer:ClearAllPoints() timer:SetJustifyH('RIGHT') timer:SetShadowColor(0, 0, 0, 0) - if STYLE:IsAddonReady('DBMHalfBar') then - bar:SetHeight(buttonsize / 3) - name:Point('BOTTOMLEFT', bar, 'TOPLEFT', 4, 0) - timer:Point('BOTTOMRIGHT', bar, 'TOPRIGHT', -4, 0) - else - bar:SetHeight(buttonsize) - name:Point('LEFT', bar, 'LEFT', 4, 0) - timer:Point('RIGHT', bar, 'RIGHT', -4, 0) - end - name:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - timer:SetFontTemplate(SuperVillain.Media.font.default, 12, 'OUTLINE') - count = count + 1 + + frame:SetHeight(22) + name:Point('LEFT', frame, 'LEFT', 4, 0) + timer:Point('RIGHT', frame, 'RIGHT', -4, 0) + + name:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + timer:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + + name:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) + timer:SetTextColor(bar.owner.options.TextColorR, bar.owner.options.TextColorG, bar.owner.options.TextColorB) + + if bar.owner.options.IconLeft then icon1:Show() icon1.overlay:Show() else icon1:Hide() icon1.overlay:Hide() end + if bar.owner.options.IconRight then icon2:Show() icon2.overlay:Show() else icon2:Hide() icon2.overlay:Hide() end + + tbar:SetAlpha(1) + frame:SetAlpha(1) + texture:SetAlpha(1) + frame:Show() + bar:Update(0) + bar.injected = true end + bar:ApplyStyle() + end + end +end + +local StyleBossTitle = function() + local anchor = VEMBossHealthDropdown:GetParent() + if not anchor.styled then + local header = {anchor:GetRegions()} + if header[1]:IsObjectType('FontString') then + header[1]:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + header[1]:SetTextColor(1, 1, 1) + header[1]:SetShadowColor(0, 0, 0, 0) + anchor.styled = true end - hooksecurefunc(DBT, 'CreateBar', StyleBars) - hooksecurefunc(VEM.BossHealth, 'Show', StyleBossTitle) - hooksecurefunc(VEM.BossHealth, 'AddBoss', StyleBoss) - hooksecurefunc(VEM.BossHealth, 'UpdateSettings', StyleBoss) + header = nil + end + anchor = nil +end + +local StyleBoss = function() + local count = 1 + while _G[format('VEM_BossHealth_Bar_%d', count)] do + local bar = _G[format('VEM_BossHealth_Bar_%d', count)] + local background = _G[bar:GetName()..'BarBorder'] + local progress = _G[bar:GetName()..'Bar'] + local name = _G[bar:GetName()..'BarName'] + local timer = _G[bar:GetName()..'BarTimer'] + local prev = _G[format('VEM_BossHealth_Bar_%d', count-1)] + local _, anch, _ ,_, _ = bar:GetPoint() + bar:ClearAllPoints() + if count == 1 then + if VEM_SavedOptions.HealthFrameGrowUp then + bar:Point('BOTTOM', anch, 'TOP' , 0 , 12) + else + bar:Point('TOP', anch, 'BOTTOM' , 0, -22) + end + else + if VEM_SavedOptions.HealthFrameGrowUp then + bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, 26) + else + bar:Point('TOPLEFT', prev, 'TOPLEFT', 0, -26) + end + end + bar:SetFixedPanelTemplate('Transparent') + background:SetNormalTexture(nil) + progress:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) + progress:ClearAllPoints() + progress:FillInner(bar) + name:ClearAllPoints() + name:SetJustifyH('LEFT') + name:SetShadowColor(0, 0, 0, 0) + timer:ClearAllPoints() + timer:SetJustifyH('RIGHT') + timer:SetShadowColor(0, 0, 0, 0) + + bar:SetHeight(22) + name:Point('LEFT', bar, 'LEFT', 4, 0) + timer:Point('RIGHT', bar, 'RIGHT', -4, 0) + + name:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + timer:SetFont(SuperVillain.Media.font.default, 12, 'OUTLINE') + count = count + 1 + end +end + +local _hook_OnShow = function(self) + if(not self.Panel) then + self:SetFixedPanelTemplate('Transparent') + end +end + +local function StyleVEM(event, addon) + assert(VEM, "AddOn Not Loaded") + + if event == 'PLAYER_ENTERING_WORLD' then + NewHook(DBT, 'CreateBar', StyleBars) + NewHook(VEM.BossHealth, 'Show', StyleBossTitle) + NewHook(VEM.BossHealth, 'AddBoss', StyleBoss) + NewHook(VEM.BossHealth, 'UpdateSettings', StyleBoss) + if not VEM_SavedOptions['DontShowRangeFrame'] then VEM.RangeCheck:Show() VEM.RangeCheck:Hide() - VEMRangeCheck:HookScript('OnShow', function(self) self:SetFixedPanelTemplate('Transparent') end) + VEMRangeCheck:HookScript('OnShow', _hook_OnShow) VEMRangeCheckRadar:SetFixedPanelTemplate('Transparent') end + if not VEM_SavedOptions['DontShowInfoFrame'] then VEM.InfoFrame:Show(5, 'test') VEM.InfoFrame:Hide() - VEMInfoFrame:HookScript('OnShow', function(self) self:SetFixedPanelTemplate('Transparent') end) + VEMInfoFrame:HookScript('OnShow', _hook_OnShow) end - if croprwicons then - local RaidNotice_AddMessage_ = RaidNotice_AddMessage - RaidNotice_AddMessage = function(noticeFrame, textString, colorInfo) - if textString:find(' |T') then - textString = gsub(textString,'(:12:12)',':18:18:0:0:64:64:5:59:5:59') - end - return RaidNotice_AddMessage_(noticeFrame, textString, colorInfo) + + RaidNotice_AddMessage = function(noticeFrame, textString, colorInfo) + if textString:find(' |T') then + textString = gsub(textString,'(:12:12)',':18:18:0:0:64:64:5:59:5:59') end + return RaidNotice_AddMessage_(noticeFrame, textString, colorInfo) end end + if addon == 'VEM-GUI' then VEM_GUI_OptionsFrame:HookScript('OnShow', function() STYLE:ApplyFrameStyle(VEM_GUI_OptionsFrame) @@ -228,4 +245,4 @@ local function StyleVEM(event, addon) STYLE:SafeEventRemoval("VEM", event) end end -STYLE:SaveAddonStyle("VEM", StyleVEM, 'ADDON_LOADED') \ No newline at end of file +STYLE:SaveAddonStyle("VEM", StyleVEM, nil, true) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua index b3c9fe2..82ea63a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua @@ -36,29 +36,34 @@ local STYLE = _G.StyleVillain; WEAKAURAS ########################################################## ]]-- -local function StyleWeakAuras() - local function Style_WeakAuras(frame) - if not frame.Panel then - STYLE:ApplyFrameStyle(frame,"Transparent") - frame.icon.OldAlpha = frame.icon.SetAlpha - frame.icon.SetAlpha = function(self, ...) - frame.icon.OldAlpha(self, ...) - frame.Panel:SetAlpha(...) - end +local function Style_WeakAuras(frame) + if not frame.Panel then + STYLE:ApplyFrameStyle(frame,"Transparent") + frame.icon.OldAlpha = frame.icon.SetAlpha + frame.icon.SetAlpha = function(self, ...) + frame.icon.OldAlpha(self, ...) + frame.Panel:SetAlpha(...) end - SuperVillain:AddCD(frame.cooldown) - frame.icon:SetTexCoord(0.1,0.9,0.1,0.9) - frame.icon.SetTexCoord = SuperVillain.fubar - end - local function Create_WeakAuras(parent, data) - local region = WeakAuras.regionTypes.icon.OldCreate(parent, data) - Style_WeakAuras(region) - return region - end - local function Modify_WeakAuras(parent, region, data) - WeakAuras.regionTypes.icon.OldModify(parent, region, data) - Style_WeakAuras(region) end + SuperVillain:AddCD(frame.cooldown) + frame.icon:SetTexCoord(0.1,0.9,0.1,0.9) + frame.icon.SetTexCoord = SuperVillain.fubar +end + +local function Create_WeakAuras(parent, data) + local region = WeakAuras.regionTypes.icon.OldCreate(parent, data) + Style_WeakAuras(region) + return region +end + +local function Modify_WeakAuras(parent, region, data) + WeakAuras.regionTypes.icon.OldModify(parent, region, data) + Style_WeakAuras(region) +end + +local function StyleWeakAuras() + assert(WeakAuras, "AddOn Not Loaded") + WeakAuras.regionTypes.icon.OldCreate = WeakAuras.regionTypes.icon.create WeakAuras.regionTypes.icon.create = Create_WeakAuras WeakAuras.regionTypes.icon.OldModify = WeakAuras.regionTypes.icon.modify diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/_load.xml b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/_load.xml index aff4b42..aa9bc3a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/_load.xml +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/_load.xml @@ -1,9 +1,12 @@ <Ui xmlns="http://www.blizzard.com/wow/ui/"> <Script file='ACP.lua'/> + <Script file='AdiBags.lua'/> + <Script file='Altoholic.lua'/> <Script file='AtlasLoot.lua'/> <Script file='AuctionLite.lua'/> <Script file='alDamageMeter.lua'/> <Script file='BigWigs.lua'/> + <Script file='Bugsack.lua'/> <Script file='Clique.lua'/> <Script file='Cooline.lua'/> <Script file='DBM.lua'/> diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua index c56c14b..0f07d92 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/alDamageMeter.lua @@ -37,6 +37,8 @@ ALDAMAGEMETER ########################################################## ]]-- local function StyleALDamageMeter() + assert(_G['alDamagerMeterFrame'], "AddOn Not Loaded") + alDamageMeterFrame.bg:MUNG() STYLE:ApplyFrameStyle(alDamageMeterFrame) alDamageMeterFrame:HookScript('OnShow', function() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua index 56b042e..175a916 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua @@ -69,7 +69,8 @@ local function TransmogStyle() a9:Formula409() a9:SetSlotTemplate(true) a9:SetFrameLevel(a9:GetFrameLevel()+2) - + + a9.Panel:SetAllPoints() icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) icon:ClearAllPoints() icon:FillInner() @@ -88,4 +89,4 @@ end; STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle("Blizzard_ItemAlterationUI",TransmogStyle) \ No newline at end of file +STYLE:SaveBlizzardStyle("Blizzard_ItemAlterationUI", TransmogStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua index 5c3e725..54b7cef 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/voidstorage.lua @@ -82,4 +82,4 @@ end; STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle("Blizzard_VoidStorageUI",VoidStorageStyle) \ No newline at end of file +STYLE:SaveBlizzardStyle("Blizzard_VoidStorageUI", VoidStorageStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua index 0a28d58..b68b500 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua @@ -80,7 +80,7 @@ local function WorldMap_OnShow() if not SuperVillain.db.SVMap.tinyWorldMap then BlackoutWorld:SetTexture(0, 0, 0, 1) else - BlackoutWorld:SetTexture(nil) + BlackoutWorld:SetTexture(0,0,0,0) end if WORLDMAP_SETTINGS.size == WORLDMAP_FULLMAP_SIZE then WorldMap_FullView() @@ -137,11 +137,11 @@ local function WorldMapQuestStyle() STYLE:ApplyDropdownStyle(WorldMapContinentDropDown) STYLE:ApplyDropdownStyle(WorldMapZoneDropDown) STYLE:ApplyDropdownStyle(WorldMapShowDropDown) - --WorldMapZoomOutButton:SetButtonTemplate() - --WorldMapTrackQuest:SetCheckboxTemplate(true) + WorldMapZoomOutButton:SetButtonTemplate() + WorldMapTrackQuest:SetCheckboxTemplate(true) WorldMapFrame:HookScript("OnShow", WorldMap_OnShow) - --hooksecurefunc("WorldMapFrame_SetFullMapView", WorldMap_FullView) - --hooksecurefunc("WorldMapFrame_SetQuestMapView", WorldMap_QuestView) + hooksecurefunc("WorldMapFrame_SetFullMapView", WorldMap_FullView) + hooksecurefunc("WorldMapFrame_SetQuestMapView", WorldMap_QuestView) hooksecurefunc("WorldMap_ToggleSizeUp", WorldMap_OnShow) BlackoutWorld:SetParent(WorldMapFrame.backdrop) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua index 14d10f6..a282f53 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua @@ -95,6 +95,41 @@ end CORE FUNCTIONS ########################################################## ]]-- +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 + template = template or "Transparent" + this:SetPanelTemplate(template) +end + +function STYLE:ApplyUnderlayStyle(this, template, noStripping, fullStripping) + if(not this or (this and this.Panel)) then return end + if not noStripping then this:Formula409(fullStripping) end + template = template or "Transparent" + this:SetFixedPanelTemplate(template) +end + +function STYLE:ApplyButtonStyle(this) + if not this then return end + this:SetButtonTemplate() +end + +function STYLE:ApplyEditBoxStyle(this, width, height) + if not this then return end + this:SetEditboxTemplate() + if width then this:Width(width) end + if height then this:Height(height) end +end + +function STYLE:ApplyTextureStyle(this) + if not this then return end + this:SetTexCoord(0.1, 0.9, 0.1, 0.9) + local parent = this:GetParent() + if(parent) then + this:FillInner(parent, 1, 1) + end +end + function STYLE:ApplyCloseButtonStyle(this, anchor) if not this then return end if not this.hookedColors then @@ -105,7 +140,11 @@ function STYLE:ApplyCloseButtonStyle(this, anchor) if anchor then this:SetPoint("TOPRIGHT", anchor, "TOPRIGHT", 2, 2) end -end +end + +function STYLE:ApplyRotateStyle(this) + -- Do stuff +end function STYLE:ApplyScrollStyle(this) if(not this or (this and this.appliedStyle)) then return end @@ -177,31 +216,33 @@ end local function TabHelper(this) this:Formula409() - this:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) - this:GetNormalTexture():FillInner() + local nTex = this:GetNormalTexture() + if(nTex) then + nTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + nTex:FillInner() + end this.pushed = true; this.backdrop = CreateFrame("Frame", nil, this) this.backdrop:WrapOuter(this,1,1) - local level = this:GetFrameLevel() - if(level > 0) then - this.backdrop:SetFrameLevel(level - 1) - else - this.backdrop:SetFrameLevel(0) - end - this.backdrop:SetFixedPanelTemplate("Component", true) - this.backdrop:SetPanelColor("dark") + this.backdrop:SetFrameLevel(0) + this.backdrop:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeFile = [[Interface\AddOns\SVUI\assets\artwork\Template\GLOW]], + edgeSize = 3, + insets = { + left = 0, + right = 0, + top = 0, + bottom = 0 + } + }); + this.backdrop:SetBackdropColor(0,0,0,1) + this.backdrop:SetBackdropBorderColor(0,0,0,1) this:HookScript("OnEnter",Tab_OnEnter) this:HookScript("OnLeave",Tab_OnLeave) - hooksecurefunc(this:GetHighlightTexture(), "SetTexture", function(i, w) - if w ~= nil then - i:SetTexture(0,0,0,0) - end - end) - hooksecurefunc(this:GetCheckedTexture(), "SetTexture", function(i, w) - if w ~= nil then - i:SetTexture(0,0,0,0) - end - end) + local a,b,c,d,e = this:GetPoint() this:Point(a,b,c,1,e) end; @@ -373,14 +414,6 @@ function STYLE:ApplyTooltipStyle(frame) frame.appliedStyle = true end -function STYLE:ApplyFrameStyle(frame,template,noStripping,fullStripping) - if(not frame or (frame and frame.appliedStyle)) then return end - if not template then template = 'Transparent' end - if not noStripping then frame:Formula409(fullStripping) end - frame:SetPanelTemplate(template) - frame.appliedStyle = true -end - function STYLE:ApplyAlertStyle(frame) if(not frame or (frame and frame.appliedStyle)) then return end local alertpanel = CreateFrame("Frame", nil, frame)