diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua index 17249a6..7870806 100644 --- a/Interface/AddOns/SVUI/SVUI.lua +++ b/Interface/AddOns/SVUI/SVUI.lua @@ -45,6 +45,8 @@ local SVUI = {}; local SVUINameSpace, SVUICore = ...; local version = GetAddOnMetadata(..., "Version"); local build = select(2, GetBuildInfo()); +local playerName = UnitName("player"); +local playerRealm = GetRealmName(); local SetAddonCore; local callbacks = {}; local numCallbacks = 0; @@ -54,9 +56,9 @@ CONSTANTS ########################################################## ]]-- BINDING_HEADER_SVUI = "SuperVillain UI"; -SLASH_RELOADUI1="/rl" -SLASH_RELOADUI2="/reloadui" -SlashCmdList.RELOADUI=ReloadUI +SLASH_RELOADUI1 = "/rl" +SLASH_RELOADUI2 = "/reloadui" +SlashCmdList.RELOADUI = ReloadUI --[[ ########################################################## MUNGLUNCH's FASTER ASSERT FUNCTION @@ -235,6 +237,17 @@ function string.link(this, prefix, text, color) local colorstring = tostring(this):color(color or "ffffff") return ("|H%s:%s|h%s|h"):format(prefix, text, colorstring) end + +function string.explode(str, delim) + local res = { } + local pattern = string.format("([^%s]+)%s()", delim, delim) + while (true) do + line, pos = str:match(pattern, pos) + if line == nil then break end + table.insert(res, line) + end + return res +end --[[ ########################################################## DEFINE REGISTRY HELPERS @@ -637,6 +650,37 @@ function SVUI:Prototype(n, v) return obj end +do + local messagePattern = "|cffFF2F00%s:|r" + local debugPattern = "|cffFF2F00%s|r [|cff992FFF%s|r]|cffFF2F00:|r" + + local function _sendmessage(msg, prefix) + if(type(msg) == "table") then + msg = tostring(msg) + end + + if(not msg) then return end + + if(prefix) then + local outbound = ("%s %s"):format(prefix, msg); + print(outbound) + else + print(msg) + end + end + + function SVUI:Debugger(msg) + if(not self.DebuggingMode) then return end + local outbound = (debugPattern):format("SVUI", "DEBUG") + _sendmessage(msg, outbound) + end + + function SVUI:AddonMessage(msg) + local outbound = (messagePattern):format("SVUI") + _sendmessage(msg, outbound) + end +end + SVUICore[1] = SVUI SVUICore[2] = SVUI.Localization diff --git a/Interface/AddOns/SVUI/SVUI.toc b/Interface/AddOns/SVUI/SVUI.toc index a228e48..c8682c4 100644 --- a/Interface/AddOns/SVUI/SVUI.toc +++ b/Interface/AddOns/SVUI/SVUI.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 4.082 +## Version: 5.02 ## Title: |cffFF9900SVUI|r ## Notes: Supervillain UI [|cff9911FFCore Framework|r]. ## SavedVariables: SVUI_Global diff --git a/Interface/AddOns/SVUI/assets/fonts/Pixel.ttf b/Interface/AddOns/SVUI/assets/fonts/Pixel.ttf index a19139b..cdb4c21 100644 Binary files a/Interface/AddOns/SVUI/assets/fonts/Pixel.ttf and b/Interface/AddOns/SVUI/assets/fonts/Pixel.ttf differ diff --git a/Interface/AddOns/SVUI/libs/LibActionButton-1.0/LibActionButton-1.0.lua b/Interface/AddOns/SVUI/libs/LibActionButton-1.0/LibActionButton-1.0.lua index f8f66d3..9a7be27 100644 --- a/Interface/AddOns/SVUI/libs/LibActionButton-1.0/LibActionButton-1.0.lua +++ b/Interface/AddOns/SVUI/libs/LibActionButton-1.0/LibActionButton-1.0.lua @@ -971,16 +971,7 @@ function Update(self) end -- Update icon and hotkey - -- if string.find(test,"SVUI_ActionBar1Button") then end - -- if test == "SVUI_ActionBar1Button1" then - -- if self._state_action ~= nil then - -- local act = self._state_action - -- local type, id, subType, spellID = GetActionInfo(act) - -- local t = {["ACTION"] = act,["TYPE"] = type, ["GenID"] = id, ["SUBTYPE"] = subType, ["SpellID"] = spellID} - -- SVUI[1]:ShowDebug("LibActionButton:"..test, " GetActionInfo", t) - -- --SVUI[1]:ShowDebug("LibActionButton:"..test, " GetActionTexture", GetActionTexture(self._state_action)) - -- end; - -- end + local texture = self:GetTexture() if texture then self.icon:SetTexture(texture) diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua b/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua index 99d819b..38cec70 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/castbar.lua @@ -44,10 +44,10 @@ local UNIT_SPELLCAST_START = function(self, event, unit, spell) local repeatCount = GetTradeskillRepeatCount() or 1 local start = GetTime() - startTime - if(tradeskill) then + if(tradeskill and repeatCount >= 1) then if(castbar.previous ~= name) then castbar.recipecount = 1 - castbar.maxrecipe = GetTradeskillRepeatCount() + castbar.maxrecipe = repeatCount castbar.duration = start else castbar.recipecount = castbar.recipecount or 1 @@ -98,8 +98,7 @@ local UNIT_SPELLCAST_START = function(self, event, unit, spell) castbar:PostCastStart(unit, name, castid) end - --castbar:Show() - SuperVillain:SecureFadeIn(castbar, 0.5, 0.5, 1) + castbar:Show() end local UNIT_SPELLCAST_FAILED = function(self, event, unit, spellname, _, castid) @@ -112,7 +111,7 @@ local UNIT_SPELLCAST_FAILED = function(self, event, unit, spellname, _, castid) castbar.casting = nil castbar.tradeskill = nil castbar.recipecount = nil - castbar.maxrecipe = nil + castbar.maxrecipe = 1 castbar.interrupt = nil castbar:SetValue(0) castbar:Hide() @@ -132,7 +131,7 @@ local UNIT_SPELLCAST_INTERRUPTED = function(self, event, unit, spellname, _, cas castbar.casting = nil castbar.tradeskill = nil castbar.recipecount = nil - castbar.maxrecipe = nil + castbar.maxrecipe = 1 castbar.channeling = nil castbar:SetValue(0) @@ -204,11 +203,11 @@ local UNIT_SPELLCAST_STOP = function(self, event, unit, spellname, _, castid) castbar.interrupt = nil castbar.tradeskill = nil castbar.recipecount = nil - castbar.maxrecipe = nil + castbar.maxrecipe = 1 castbar:SetValue(0) end - SuperVillain:SecureFadeOut(castbar, 4, 1, 0, true) + castbar:Hide() if(castbar.PostCastStop) then return castbar:PostCastStop(unit, spellname, castid) @@ -243,7 +242,7 @@ local UNIT_SPELLCAST_CHANNEL_START = function(self, event, unit, spellname) castbar.casting = nil castbar.tradeskill = nil castbar.recipecount = nil - castbar.maxrecipe = nil + castbar.maxrecipe = 1 castbar.castid = nil castbar:SetMinMaxValues(0, max) @@ -326,7 +325,7 @@ 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 + elseif(self.recipecount and self.recipecount > 0 and self.maxrecipe and self.maxrecipe > 1) then self.Time:SetText(self.recipecount .. "/" .. self.maxrecipe) else if(self.CustomTimeText) then @@ -350,7 +349,7 @@ local onUpdate = function(self, elapsed) self.casting = nil self.tradeskill = nil self.recipecount = nil - self.maxrecipe = nil + self.maxrecipe = 1 self.castid = nil self.channeling = nil @@ -366,7 +365,7 @@ local onUpdate = function(self, elapsed) self.casting = nil self.tradeskill = nil self.recipecount = nil - self.maxrecipe = nil + self.maxrecipe = 1 self:Hide() if(self.PostCastStop) then self:PostCastStop(self.__owner.unit) end diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua index ecec3b5..d2863b4 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/health.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/health.lua @@ -94,7 +94,7 @@ local Update = function(self, event, unit) min = random(1,max) health:SetValue(min) end - if(db and db.gridMode) then + if(health.gridMode) then health:SetOrientation("VERTICAL") end diff --git a/Interface/AddOns/SVUI/libs/oUF/elements/stagger.lua b/Interface/AddOns/SVUI/libs/oUF/elements/stagger.lua index bf66b8e..6cc7dc9 100644 --- a/Interface/AddOns/SVUI/libs/oUF/elements/stagger.lua +++ b/Interface/AddOns/SVUI/libs/oUF/elements/stagger.lua @@ -116,7 +116,6 @@ local Enable = function(self, unit) MonkStaggerBar:UnregisterEvent'PLAYER_SPECIALIZATION_CHANGED' MonkStaggerBar:UnregisterEvent'UNIT_DISPLAYPOWER' MonkStaggerBar:UnregisterEvent'UPDATE_VEHICLE_ACTION_BAR' - --SVUI[1]:ShowDebug("Stagger", "Enable", self) return true end end diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.toc b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.toc index 789651c..129e085 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ActionPanel/oUF_ActionPanel.toc @@ -2,7 +2,7 @@ ## Title: oUF ActionPanel ## Notes: Adds a backing to all unit frames that provides many utilities. ## Author: Munglunch -## Version: 1.081 +## Version: 5.02 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Afflicted/oUF_Afflicted.toc b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Afflicted/oUF_Afflicted.toc index 8d88588..ee5034f 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Afflicted/oUF_Afflicted.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Afflicted/oUF_Afflicted.toc @@ -2,7 +2,7 @@ ## Title: oUF Afflicted ## Notes: Adds Custom Debuff Highlighting to oUF. ## Author: Munglunch -## Version: 1.081 +## Version: 5.02 ## X-Category: oUF ## Dependencies: oUF diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc index b859c16..021f782 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_ArcaneCharge/oUF_ArcaneCharge.toc @@ -2,7 +2,7 @@ ## Title: oUF Arcane Charge ## Notes: Adds support for arcane charge indicators to oUF. ## Author: Munglunch -## Version: 1.081 +## Version: 5.02 ## Dependencies: oUF oUF_ArcaneCharge.lua \ No newline at end of file diff --git a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.toc b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.toc index 98aa9fc..2e2d68f 100644 --- a/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.toc +++ b/Interface/AddOns/SVUI/libs/oUF_Plugins/oUF_Combatant/oUF_Combatant.toc @@ -2,7 +2,7 @@ ## Title: oUF Combatant ## Notes: Adds PvP trinket status and spec icons to oUF frames. ## Author: Munglunch -## Version: 1.0810 +## Version: 5.020 ## X-Category: oUF ## Dependencies: oUF 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 8b10b13..f381dd2 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,6 +24,7 @@ local friendships = { [GetFactionInfoByID(1281)] = 1281, [GetFactionInfoByID(1282)] = 1282, [GetFactionInfoByID(1283)] = 1283, + -- [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 32a46e5..b39f859 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 @@ -59,10 +59,16 @@ local Update = function(self, elapsed) 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) + if(distance > 30) then + GPS.Arrow:SetVertexColor(0.4,0.8,0.1) + else + GPS.Arrow:SetVertexColor(0.1,1,0.1) + end + if(GPS.OnlyProximity and object.Health.percent and object.Health.percent < 80) then + local value = object.Health.percent + distance + _PROXIMITY[#_PROXIMITY + 1] = {value, GPS} + end end spin(GPS.Arrow, angle) end @@ -71,11 +77,6 @@ local Update = function(self, elapsed) 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 @@ -86,9 +87,11 @@ local Update = function(self, elapsed) end end - tsort(_PROXIMITY, sortFunc) - if(_PROXIMITY[1] and _PROXIMITY[1][2]) then - _PROXIMITY[1][2]:Show() + if(_PROXIMITY[1]) then + tsort(_PROXIMITY, sortFunc) + if(_PROXIMITY[1][2]) then + _PROXIMITY[1][2]:Show() + end end self.elapsed = 0 diff --git a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua index 54796ab..0c4c502 100644 --- a/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua +++ b/Interface/AddOns/SVUI/packages/actionbar/SVBar.lua @@ -155,9 +155,11 @@ 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] + if(data) then + local mButton = _G[data[1]] + if(mButton) then mButton:SetParent(SVUI_MicroBar) end + end end end @@ -1315,41 +1317,43 @@ CreateMicroBar = function(self) SuperVillain:AddToDisplayAudit(microBar) 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() + local data = ICON_DATA[i] + if(data) then + 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 end end diff --git a/Interface/AddOns/SVUI/packages/bag/SVBag.lua b/Interface/AddOns/SVUI/packages/bag/SVBag.lua index 12bf448..d3c9d59 100644 --- a/Interface/AddOns/SVUI/packages/bag/SVBag.lua +++ b/Interface/AddOns/SVUI/packages/bag/SVBag.lua @@ -184,7 +184,7 @@ local function BuildEquipmentMap() end end end -end +end --[[ ########################################################## CORE FUNCTIONS @@ -436,9 +436,11 @@ function MOD:Layout(isBank) f.Bags[bagID][slotID]:SetNormalTexture(nil); f.Bags[bagID][slotID]:SetCheckedTexture(nil); f.Bags[bagID][slotID]:SetSlotTemplate(true, 2, 0, 0, true); + if(_G[f.Bags[bagID][slotID]:GetName().."NewItemTexture"]) then _G[f.Bags[bagID][slotID]:GetName().."NewItemTexture"]:Hide() - end + end + 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 ); @@ -1344,13 +1346,13 @@ CONFIGS["SVBag"] = { ["enable"] = true, ["sortInverted"] = false, ["bags"] = { - ["xOffset"] = 0, - ["yOffset"] = 0, + ["xOffset"] = -40, + ["yOffset"] = 40, ["point"] = "BOTTOMRIGHT", }, ["bank"] = { - ["xOffset"] = 0, - ["yOffset"] = 0, + ["xOffset"] = 40, + ["yOffset"] = 40, ["point"] = "BOTTOMLEFT", }, ["bagSize"] = 34, diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua index 972a295..32de19d 100644 --- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua +++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua @@ -381,6 +381,13 @@ do local Tab_OnClick = function(self,button) FCF_Tab_OnClick(self,button); local chatFrame = _G[("ChatFrame%d"):format(self:GetID())]; + if(chatFrame:AtBottom() and ScrollIndicator:IsShown()) then + SuperVillain.Animate:StopFlash(ScrollIndicator) + ScrollIndicator:Hide() + elseif(not chatFrame:AtBottom() and not ScrollIndicator:IsShown()) then + ScrollIndicator:Show() + SuperVillain.Animate:Flash(ScrollIndicator,1,true) + end if ( chatFrame.isDocked and FCFDock_GetSelectedWindow(GENERAL_CHAT_DOCK) ~= chatFrame ) then self.IsOpen = true self:SetPanelColor("highlight") @@ -738,7 +745,7 @@ do local _hook_OnMouseWheel = function(self, delta) if(IsShiftKeyDown()) then - if(delta > 0) then + if(delta and delta > 0) then self:ScrollToTop() else self:ScrollToBottom() diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua index bba6bf2..d0c945e 100644 --- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua +++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua @@ -539,18 +539,19 @@ function MOD:CreateDockPanels() toolbarTop.openWidth = (leftWidth - 1) / 3; --TOP STAT HOLDERS + local topWidth = (leftWidth + rightWidth) * 0.8 local topanchor = CreateFrame("Frame", "SuperDockTopDataAnchor", SuperVillain.UIParent) - topanchor:Size((leftWidth + rightWidth) - 2, buttonsize - 8) + topanchor:Size(topWidth - 2, buttonsize - 8) topanchor:Point("LEFT", toolbarTop, "RIGHT", spacing, 0) SuperVillain:AddToDisplayAudit(topanchor) local topleftdata = CreateFrame("Frame", "TopLeftDataPanel", topanchor) - topleftdata:Size(leftWidth - 1, buttonsize - 8) + topleftdata:Size((topWidth * 0.5) - 1, buttonsize - 8) topleftdata:Point("LEFT", topanchor, "LEFT", 0, 0) STATS:NewAnchor(topleftdata, 3, "ANCHOR_CURSOR", true) local toprightdata = CreateFrame("Frame", "TopRightDataPanel", topanchor) - toprightdata:Size(leftWidth - 1, buttonsize - 8) + toprightdata:Size((topWidth * 0.5) - 1, buttonsize - 8) toprightdata:Point("RIGHT", topanchor, "RIGHT", 0, 0) STATS:NewAnchor(toprightdata, 3, "ANCHOR_CURSOR", true) diff --git a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua index f84093a..dc2b981 100644 --- a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua +++ b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua @@ -691,45 +691,47 @@ end INVITE AUTOMATONS ########################################################## ]]-- -function MOD:AutoGroupInvite(b, B) - if not self.db.autoAcceptInvite then return end - if b == "PARTY_INVITE_REQUEST" then - if QueueStatusMinimapButton:IsShown() then return end - if IsInGroup() then return end +local function AutoGroupInvite(self, event, arg) + if not SuperVillain.db.SVHenchmen.autoAcceptInvite then return end + if IsInGroup() then return end + if event == "PARTY_INVITE_REQUEST" then + if QueueStatusMinimapButton:IsShown() then return end hideStatic = true; - if GetNumFriends()>0 then ShowFriends() end - if IsInGuild()then GuildRoster()end - local r = false; - for C = 1, GetNumFriends()do - local D = GetFriendInfo(C) - if D == B then - AcceptGroup()r = true; - SuperVillain:HenchmanSays("Accepted an Invite From Your Friends!") + if GetNumFriends() > 0 then ShowFriends() end + if IsInGuild() then GuildRoster() end + local invited = false; + for i = 1, GetNumFriends()do + local friend = GetFriendInfo(i) + if friend == arg then + AcceptGroup() + invited = true; + SuperVillain:AddonMessage("Accepted an Invite From Your Friends!") break end end - if not r then - for E = 1, GetNumGuildMembers(true)do - local F = GetGuildRosterInfo(E) - if F == B then - AcceptGroup()r = true; - SuperVillain:HenchmanSays("Accepted an Invite From Your Guild!") + if not invited then + for i = 1, GetNumGuildMembers(true)do + local guildMate = GetGuildRosterInfo(i) + if guildMate == arg then + AcceptGroup() + invited = true; + SuperVillain:AddonMessage("Accepted an Invite From Your Guild!") break end end end - if not r then - for G = 1, BNGetNumFriends()do - local m, m, m, H = BNGetFriendInfo(G) - B = B:match("(.+)%-.+") or B; - if H == B then + if not invited then + for i = 1, BNGetNumFriends()do + local _, _, _, friend = BNGetFriendInfo(i) + arg = arg:match("(.+)%-.+") or arg; + if friend == arg then AcceptGroup() - SuperVillain:HenchmanSays("Accepted an Invite!") + SuperVillain:AddonMessage("Accepted an Invite!") break end end end - elseif b == "GROUP_ROSTER_UPDATE" and hideStatic == true then + elseif event == "GROUP_ROSTER_UPDATE" and hideStatic == true then StaticPopup_Hide("PARTY_INVITE") hideStatic = false end @@ -912,13 +914,13 @@ function MOD:Load() self:ToggleMailMinions() end - self:RegisterEvent('PARTY_INVITE_REQUEST','AutoGroupInvite') - self:RegisterEvent('GROUP_ROSTER_UPDATE','AutoGroupInvite') + self:RegisterEvent('PARTY_INVITE_REQUEST', AutoGroupInvite) + self:RegisterEvent('GROUP_ROSTER_UPDATE', AutoGroupInvite) for _,event in pairs(AutomatedEvents) do self:RegisterEvent(event) end - if self.db.pvpautorelease then + if SuperVillain.db.SVHenchmen.pvpautorelease then local autoReleaseHandler = CreateFrame("frame") autoReleaseHandler:RegisterEvent("PLAYER_DEAD") autoReleaseHandler:SetScript("OnEvent",function(self,event) diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index 1bb3c79..09ede7f 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -319,7 +319,7 @@ local function AdjustMapSize() BlackoutWorld:SetTexture(0, 0, 0, 1) end AdjustMapLevel() -end +end local function CheckMovement() if(not WorldMapFrame:IsShown()) then return end @@ -402,7 +402,7 @@ local function UpdateWorldMapConfig() UpdateMapCoords() end AdjustMapSize() -end +end local WorldMapFrameOnShow_Hook = function() MOD:RegisterEvent("PLAYER_REGEN_DISABLED"); @@ -470,7 +470,7 @@ do GameTooltip:Hide() end - local Calendar_OnClick = function(self) + local Calendar_OnClick = function(self) GameTimeFrame:Click(); end diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index 788b177..0edbff1 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -634,7 +634,7 @@ local function MakeSlots(id) slot.iconFrame:Height(size) slot.iconFrame:Width(size) slot.iconFrame:SetPoint("RIGHT", slot) - slot.iconFrame:SetFixedPanelTemplate("Default") + slot.iconFrame:SetPanelTemplate("Transparent") slot.icon = slot.iconFrame:CreateTexture(nil, "ARTWORK") slot.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -994,10 +994,10 @@ local GroupLootDropDown_GiveLoot = function(self) 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) + if (event == "UNIT_ENTERED_VEHICLE" or CanExitVehicle()) then + self:Show() + elseif(event == "UNIT_EXITED_VEHICLE") then + self:Hide() end end --[[ @@ -1081,7 +1081,7 @@ function MOD:Load() self:RegisterEvent("MIRROR_TIMER_PAUSE", MirrorBarToggleHandler) self:RegisterEvent("START_TIMER", MirrorBarToggleHandler) - local exit = CreateFrame("Button", "SVUI_BailOut", SuperVillain.UIParent, "SecureHandlerClickTemplate") + local exit = CreateFrame("Button", "SVUI_BailOut", SuperVillain.UIParent) exit:Size(40, 40) exit:Point("TOPLEFT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, -30) exit:SetNormalTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Icons\\EXIT") diff --git a/Interface/AddOns/SVUI/packages/stats/SVStats.lua b/Interface/AddOns/SVUI/packages/stats/SVStats.lua index 4727f5d..c8dad65 100644 --- a/Interface/AddOns/SVUI/packages/stats/SVStats.lua +++ b/Interface/AddOns/SVUI/packages/stats/SVStats.lua @@ -38,8 +38,27 @@ local CONFIGS = SuperVillain.Configs local MOD = {}; MOD.Anchors = {}; MOD.Statistics = {}; -MOD.PlotPoints = {"middle", "left", "right"}; +MOD.StatListing = {[""] = "None"}; MOD.tooltip = CreateFrame("GameTooltip", "StatisticTooltip", UIParent, "GameTooltipTemplate") +MOD.BGPanels = { + ["TopLeftDataPanel"] = {left = "Honor", middle = "Kills", right = "Assists"}, + ["TopRightDataPanel"] = {left = "Damage", middle = "Healing", right = "Deaths"} +}; +MOD.BGStats = { + ["Name"] = {1, NAME}, + ["Kills"] = {2, KILLS}, + ["Assists"] = {3, PET_ASSIST}, + ["Deaths"] = {4, DEATHS}, + ["Honor"] = {5, HONOR}, + ["Faction"] = {6, FACTION}, + ["Race"] = {7, RACE}, + ["Class"] = {8, CLASS}, + ["Damage"] = {10, DAMAGE}, + ["Healing"] = {11, SHOW_COMBAT_HEALING}, + ["Rating"] = {12, BATTLEGROUND_RATING}, + ["Changes"] = {13, RATING_CHANGE}, + ["Spec"] = {16, SPECIALIZATION} +}; --[[ ########################################################## LOCALIZED GLOBALS @@ -54,13 +73,16 @@ LOCAL VARIABLES ]]-- local playerName = UnitName("player"); local playerRealm = GetRealmName(); -local hexString = "FFFFFF"; +local BGStatString = "%s: %s" local myName = UnitName("player"); local myClass = select(2,UnitClass("player")); local classColor = RAID_CLASS_COLORS[myClass]; -local BGStatString = ''; local StatMenuFrame = CreateFrame("Frame", "SVUI_StatMenu", UIParent); local ListNeedsUpdate = true +local SCORE_CACHE = {}; + +-- When its vertical then "left" = "top" and "right" = "bottom". Yes I know thats ghetto, bite me! +local positionIndex = {{"middle", "left", "right"}, {"middle", "top", "bottom"}}; --[[ ########################################################## LOCAL FUNCTIONS @@ -69,29 +91,45 @@ LOCAL FUNCTIONS local function GrabPlot(parent, slot, max) if max == 1 then return"CENTER", parent, "CENTER" - else - if slot == 1 then - return"CENTER", parent, "CENTER" - elseif slot == 2 then - return "RIGHT", parent.holders["middle"], "LEFT", -4, 0 - elseif slot == 3 then - return"LEFT", parent.holders["middle"], "RIGHT", 4, 0 + else + if(parent.vertical) then + if slot == 1 then + return "CENTER", parent, "CENTER" + elseif slot == 2 then + return "BOTTOM", parent.holders["middle"], "TOP", 0, 4 + elseif slot == 3 then + return "TOP", parent.holders["middle"], "BOTTOM", 0, -4 + end + else + if slot == 1 then + return "CENTER", parent, "CENTER" + elseif slot == 2 then + return "RIGHT", parent.holders["middle"], "LEFT", -4, 0 + elseif slot == 3 then + return "LEFT", parent.holders["middle"], "RIGHT", 4, 0 + end end end end local UpdateAnchor = function() - local backdrops = MOD.db.showBackground - for _, anchor in pairs(MOD.Anchors)do - local w = anchor:GetWidth() / anchor.numPoints - 4; - local h = anchor:GetHeight() - 4; - if(backdrops) then - h = RightSuperDockToggleButton:GetHeight() - 6 + local backdrops, width, height = MOD.db.showBackground + for _, anchor in pairs(MOD.Anchors) do + if(anchor.vertical) then + width = anchor:GetWidth() - 4; + height = anchor:GetHeight() / anchor.numPoints - 4; + else + width = anchor:GetWidth() / anchor.numPoints - 4; + height = anchor:GetHeight() - 4; + if(backdrops) then + height = RightSuperDockToggleButton:GetHeight() - 6 + end end + for i = 1, anchor.numPoints do - local this = MOD.PlotPoints[i] - anchor.holders[this]:Width(w) - anchor.holders[this]:Height(h) + local this = positionIndex[anchor.useIndex][i] + anchor.holders[this]:Width(width) + anchor.holders[this]:Height(height) anchor.holders[this]:Point(GrabPlot(anchor, i, numPoints)) end end @@ -140,33 +178,47 @@ function MOD:ShowTip(noSpace) MOD.tooltip:Show() end -function MOD:NewAnchor(parent, maxCount, tipAnchor, isTop) +function MOD:NewAnchor(parent, maxCount, tipAnchor, isTop, customTemplate, isVertical) ListNeedsUpdate = true + + local activeIndex = isVertical and 2 or 1 + local template, strata + + if(customTemplate) then + template = customTemplate + strata = "LOW" + else + template = isTop and "FramedTop" or "FramedBottom" + strata = "HIGH" + end + MOD.Anchors[parent:GetName()] = parent; parent.holders = {}; + parent.vertical = isVertical; parent.numPoints = maxCount; parent.anchor = tipAnchor; - local template = isTop and "FramedTop" or "FramedBottom" + parent.useIndex = activeIndex + for i = 1, maxCount do - local this = MOD.PlotPoints[i] - if not parent.holders[this] then - parent.holders[this] = CreateFrame("Button", "DataText"..i, parent) - parent.holders[this]:RegisterForClicks("AnyUp") - parent.holders[this].barframe = CreateFrame("Frame", nil, parent.holders[this]) + local position = positionIndex[activeIndex][i] + if not parent.holders[position] then + parent.holders[position] = CreateFrame("Button", "DataText"..i, parent) + parent.holders[position]:RegisterForClicks("AnyUp") + parent.holders[position].barframe = CreateFrame("Frame", nil, parent.holders[position]) if(MOD.db.showBackground) then - parent.holders[this].barframe:Point("TOPLEFT", parent.holders[this], "TOPLEFT", 24, -2) - parent.holders[this].barframe:Point("BOTTOMRIGHT", parent.holders[this], "BOTTOMRIGHT", -2, 2) - parent.holders[this]:SetFramedButtonTemplate(template) + parent.holders[position].barframe:Point("TOPLEFT", parent.holders[position], "TOPLEFT", 24, -2) + parent.holders[position].barframe:Point("BOTTOMRIGHT", parent.holders[position], "BOTTOMRIGHT", -2, 2) + parent.holders[position]:SetFramedButtonTemplate(template) else - parent.holders[this].barframe:Point("TOPLEFT", parent.holders[this], "TOPLEFT", 24, 2) - parent.holders[this].barframe:Point("BOTTOMRIGHT", parent.holders[this], "BOTTOMRIGHT", 2, -2) - parent.holders[this].barframe.bg = parent.holders[this].barframe:CreateTexture(nil, "BORDER") - parent.holders[this].barframe.bg:FillInner(parent.holders[this].barframe, 2, 2) - parent.holders[this].barframe.bg:SetTexture([[Interface\BUTTONS\WHITE8X8]]) - parent.holders[this].barframe.bg:SetGradient(unpack(SuperVillain.Media.gradient.dark)) + parent.holders[position].barframe:Point("TOPLEFT", parent.holders[position], "TOPLEFT", 24, 2) + parent.holders[position].barframe:Point("BOTTOMRIGHT", parent.holders[position], "BOTTOMRIGHT", 2, -2) + parent.holders[position].barframe.bg = parent.holders[position].barframe:CreateTexture(nil, "BORDER") + parent.holders[position].barframe.bg:FillInner(parent.holders[position].barframe, 2, 2) + parent.holders[position].barframe.bg:SetTexture([[Interface\BUTTONS\WHITE8X8]]) + parent.holders[position].barframe.bg:SetGradient(unpack(SuperVillain.Media.gradient.dark)) end - parent.holders[this].barframe:SetFrameLevel(parent.holders[this]:GetFrameLevel()-1) - parent.holders[this].barframe:SetBackdrop({ + parent.holders[position].barframe:SetFrameLevel(parent.holders[position]:GetFrameLevel()-1) + parent.holders[position].barframe:SetBackdrop({ bgFile = [[Interface\BUTTONS\WHITE8X8]], edgeFile = [[Interface\AddOns\SVUI\assets\artwork\Template\GLOW]], tile = false, @@ -174,40 +226,40 @@ function MOD:NewAnchor(parent, maxCount, tipAnchor, isTop) edgeSize = 2, insets = {left = 0, right = 0, top = 0, bottom = 0} }) - parent.holders[this].barframe:SetBackdropColor(0, 0, 0, 0.5) - parent.holders[this].barframe:SetBackdropBorderColor(0, 0, 0, 0.8) - parent.holders[this].barframe.icon = CreateFrame("Frame", nil, parent.holders[this].barframe) - parent.holders[this].barframe.icon:Point("TOPLEFT", parent.holders[this], "TOPLEFT", 0, 6) - parent.holders[this].barframe.icon:Point("BOTTOMRIGHT", parent.holders[this], "BOTTOMLEFT", 26, -6) - parent.holders[this].barframe.icon.texture = parent.holders[this].barframe.icon:CreateTexture(nil, "OVERLAY") - parent.holders[this].barframe.icon.texture:FillInner(parent.holders[this].barframe.icon, 2, 2) - parent.holders[this].barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\PLACEHOLDER") - parent.holders[this].barframe.bar = CreateFrame("StatusBar", nil, parent.holders[this].barframe) - parent.holders[this].barframe.bar:FillInner(parent.holders[this].barframe, 2, 2) - parent.holders[this].barframe.bar:SetStatusBarTexture(SuperVillain.Media.bar.default) + parent.holders[position].barframe:SetBackdropColor(0, 0, 0, 0.5) + parent.holders[position].barframe:SetBackdropBorderColor(0, 0, 0, 0.8) + parent.holders[position].barframe.icon = CreateFrame("Frame", nil, parent.holders[position].barframe) + parent.holders[position].barframe.icon:Point("TOPLEFT", parent.holders[position], "TOPLEFT", 0, 6) + parent.holders[position].barframe.icon:Point("BOTTOMRIGHT", parent.holders[position], "BOTTOMLEFT", 26, -6) + parent.holders[position].barframe.icon.texture = parent.holders[position].barframe.icon:CreateTexture(nil, "OVERLAY") + parent.holders[position].barframe.icon.texture:FillInner(parent.holders[position].barframe.icon, 2, 2) + parent.holders[position].barframe.icon.texture:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\PLACEHOLDER") + parent.holders[position].barframe.bar = CreateFrame("StatusBar", nil, parent.holders[position].barframe) + parent.holders[position].barframe.bar:FillInner(parent.holders[position].barframe, 2, 2) + parent.holders[position].barframe.bar:SetStatusBarTexture(SuperVillain.Media.bar.default) - parent.holders[this].barframe.bar.extra = CreateFrame("StatusBar", nil, parent.holders[this].barframe.bar) - parent.holders[this].barframe.bar.extra:SetAllPoints() - parent.holders[this].barframe.bar.extra:SetStatusBarTexture(SuperVillain.Media.bar.default) - parent.holders[this].barframe.bar.extra:Hide() - parent.holders[this].barframe:Hide() - parent.holders[this].textframe = CreateFrame("Frame", nil, parent.holders[this]) - parent.holders[this].textframe:SetAllPoints(parent.holders[this]) - parent.holders[this].textframe:SetFrameStrata("HIGH") - parent.holders[this].text = parent.holders[this].textframe:CreateFontString(nil, "OVERLAY", nil, 7) - parent.holders[this].text:SetAllPoints() + parent.holders[position].barframe.bar.extra = CreateFrame("StatusBar", nil, parent.holders[position].barframe.bar) + parent.holders[position].barframe.bar.extra:SetAllPoints() + parent.holders[position].barframe.bar.extra:SetStatusBarTexture(SuperVillain.Media.bar.default) + parent.holders[position].barframe.bar.extra:Hide() + parent.holders[position].barframe:Hide() + parent.holders[position].textframe = CreateFrame("Frame", nil, parent.holders[position]) + parent.holders[position].textframe:SetAllPoints(parent.holders[position]) + parent.holders[position].textframe:SetFrameStrata(strata) + parent.holders[position].text = parent.holders[position].textframe:CreateFontString(nil, "OVERLAY", nil, 7) + parent.holders[position].text:SetAllPoints() if(MOD.db.showBackground) then - parent.holders[this].text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, "NONE", "CENTER", "MIDDLE") - parent.holders[this].text:SetShadowColor(0, 0, 0, 0.5) - parent.holders[this].text:SetShadowOffset(2, -4) + parent.holders[position].text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, "NONE", "CENTER", "MIDDLE") + parent.holders[position].text:SetShadowColor(0, 0, 0, 0.5) + parent.holders[position].text:SetShadowOffset(2, -4) else - parent.holders[this].text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) - parent.holders[this].text:SetJustifyH("CENTER") - parent.holders[this].text:SetJustifyV("middle") + parent.holders[position].text:SetFontTemplate(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + parent.holders[position].text:SetJustifyH("CENTER") + parent.holders[position].text:SetJustifyV("MIDDLE") end end - parent.holders[this].MenuList = {}; - parent.holders[this]:Point(GrabPlot(parent, i, maxCount)) + parent.holders[position].MenuList = {}; + parent.holders[position]:Point(GrabPlot(parent, i, maxCount)) end parent:SetScript("OnSizeChanged", UpdateAnchor) UpdateAnchor(parent) @@ -215,25 +267,26 @@ end function MOD:Extend(newStat, eventList, onEvents, update, click, focus, blur, init) if not newStat then return end - MOD.Statistics[newStat] = {} + self.Statistics[newStat] = {} + self.StatListing[newStat] = newStat if type(eventList) == "table" then - MOD.Statistics[newStat]["events"] = eventList; - MOD.Statistics[newStat]["event_handler"] = onEvents + self.Statistics[newStat]["events"] = eventList; + self.Statistics[newStat]["event_handler"] = onEvents end if update and type(update) == "function" then - MOD.Statistics[newStat]["update_handler"] = update + self.Statistics[newStat]["update_handler"] = update end if click and type(click) == "function" then - MOD.Statistics[newStat]["click_handler"] = click + self.Statistics[newStat]["click_handler"] = click end if focus and type(focus) == "function" then - MOD.Statistics[newStat]["focus_handler"] = focus + self.Statistics[newStat]["focus_handler"] = focus end if blur and type(blur) == "function" then - MOD.Statistics[newStat]["blur_handler"] = blur + self.Statistics[newStat]["blur_handler"] = blur end if init and type(init) == "function" then - MOD.Statistics[newStat]["init_handler"] = init + self.Statistics[newStat]["init_handler"] = init end end @@ -246,9 +299,24 @@ function MOD:UnSet(parent) end do - local dataLayout, dataStrings = {}, {"None",KILLING_BLOWS,HONORABLE_KILLS,DEATHS,HONOR,"None","None","None","None",DAMAGE,SHOW_COMBAT_HEALING}; - dataLayout["TopLeftDataPanel"] = {['left'] = 10, ['middle'] = 5, ['right'] = 2}; - dataLayout["TopRightDataPanel"] = {['left'] = 4, ['middle'] = 3, ['right'] = 11}; + local dataStrings = { + NAME, + KILLING_BLOWS, + HONORABLE_KILLS, + DEATHS, + HONOR, + FACTION, + RACE, + CLASS, + "None", + DAMAGE, + SHOW_COMBAT_HEALING, + BATTLEGROUND_RATING, + RATING_CHANGE, + "None", + "None", + SPECIALIZATION + }; local Stat_OnLeave = function() MOD.tooltip:Hide() @@ -401,20 +469,19 @@ do end end - local BGStatPrev; local BG_OnUpdate = function(self) - BGStatPrev = self; - local truncated, tmp, bgName; - local parentName = BGStatPrev:GetParent():GetName(); - local lookup = BGStatPrev.pointIndex - local pointIndex = dataLayout[parentName][lookup] - local scoreType = dataStrings[pointIndex] - for index = 1, GetNumBattlefieldScores() do - bgName = GetBattlefieldScore(index) - if(bgName == myName) then - tmp = select(pointIndex, GetBattlefieldScore(index)) - truncated = TruncateString(tmp) - BGStatPrev.text:SetFormattedText(BGStatString, scoreType, truncated) + local scoreString; + local parentName = self:GetParent():GetName(); + local lookup = self.pointIndex + local pointIndex = MOD.BGPanels[parentName][lookup] + local scoreindex = MOD.BGStats[pointIndex][1] + local scoreType = MOD.BGStats[pointIndex][2] + local scoreCount = GetNumBattlefieldScores() + for i = 1, scoreCount do + SCORE_CACHE = {GetBattlefieldScore(i)} + if(SCORE_CACHE[1] and SCORE_CACHE[1] == myName and SCORE_CACHE[scoreindex]) then + scoreString = TruncateString(SCORE_CACHE[scoreindex]) + self.text:SetFormattedText(BGStatString, scoreType, scoreString) break end end @@ -430,7 +497,10 @@ do else r, g, b = 1, 1, 1 end - for i = 1, GetNumBattlefieldScores() do + + local scoreCount = GetNumBattlefieldScores() + + for i = 1, scoreCount do bgName = GetBattlefieldScore(i) if(bgName and bgName == myName) then MOD.tooltip:AddDoubleLine(L["Stats For:"], bgName, 1, 1, 1, r, g, b) @@ -472,10 +542,10 @@ do local function SetMenuLists() for place,parent in pairs(MOD.Anchors)do - for h = 1, parent.numPoints do - local this = MOD.PlotPoints[h] + for i = 1, parent.numPoints do + local this = positionIndex[parent.useIndex][i] tinsert(parent.holders[this].MenuList,{text = NONE, func = function() MOD:ChangeDBVar(NONE, this, "panels", place); MOD:Generate() end}); - for name,config in pairs(MOD.Statistics)do + for name,config in pairs(MOD.Statistics) do tinsert(parent.holders[this].MenuList,{text = name, func = function() MOD:ChangeDBVar(name, this, "panels", place); MOD:Generate() end}); end end @@ -488,44 +558,56 @@ do SetMenuLists() end local instance, groupType = IsInInstance() - for place, parent in pairs(MOD.Anchors)do - for h = 1, parent.numPoints do - local this = MOD.PlotPoints[h] - parent.holders[this]:UnregisterAllEvents() - parent.holders[this]:SetScript("OnUpdate", nil) - parent.holders[this]:SetScript("OnEnter", nil) - parent.holders[this]:SetScript("OnLeave", nil) - parent.holders[this]:SetScript("OnClick", nil) - if(MOD.db.showBackground) then - parent.holders[this].text:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, "NONE") + local anchorTable = self.Anchors + local statTable = self.Statistics + local db = self.db + local allowPvP = (db.battleground and not ForceHideBGStats) or false + for place, parent in pairs(anchorTable) do + local pvpTable = allowPvP and self.BGPanels[place] + for i = 1, parent.numPoints do + local position = positionIndex[parent.useIndex][i] + + parent.holders[position]:UnregisterAllEvents() + parent.holders[position]:SetScript("OnUpdate", nil) + parent.holders[position]:SetScript("OnEnter", nil) + parent.holders[position]:SetScript("OnLeave", nil) + parent.holders[position]:SetScript("OnClick", nil) + + if(db.showBackground) then + parent.holders[position].text:SetFont(SuperVillain.Shared:Fetch("font", db.font), db.fontSize, "NONE") else - parent.holders[this].text:SetFont(SuperVillain.Shared:Fetch("font", MOD.db.font), MOD.db.fontSize, MOD.db.fontOutline) + parent.holders[position].text:SetFont(SuperVillain.Shared:Fetch("font", db.font), db.fontSize, db.fontOutline) end - parent.holders[this].text:SetText(nil) - if parent.holders[this].barframe then - parent.holders[this].barframe:Hide() + parent.holders[position].text:SetText(nil) + + if parent.holders[position].barframe then + parent.holders[position].barframe:Hide() end - parent.holders[this].pointIndex = this; - parent.holders[this]:Hide() - if place == "TopLeftDataPanel" and instance and groupType == "pvp" and not ForceHideBGStats and SuperVillain.db.SVStats.battleground then - parent.holders[this]:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") - parent.holders[this]:SetScript("OnEvent", BG_OnUpdate) - parent.holders[this]:SetScript("OnEnter", BG_OnEnter) - parent.holders[this]:SetScript("OnLeave", Stat_OnLeave) - parent.holders[this]:SetScript("OnClick", BG_OnClick) - BG_OnUpdate(parent.holders[this]) - parent.holders[this]:Show() + + parent.holders[position].pointIndex = position; + parent.holders[position]:Hide() + + if(pvpTable and ((instance and groupType == "pvp") or parent.lockedOpen)) then + parent.holders[position]:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") + parent.holders[position]:SetScript("OnEvent", BG_OnUpdate) + parent.holders[position]:SetScript("OnEnter", BG_OnEnter) + parent.holders[position]:SetScript("OnLeave", Stat_OnLeave) + parent.holders[position]:SetScript("OnClick", BG_OnClick) + + BG_OnUpdate(parent.holders[position]) + + parent.holders[position]:Show() else - for name, config in pairs(MOD.Statistics)do - for k, l in pairs(SuperVillain.db.SVStats.panels)do - if l and type(l) == "table"then - if k == place and SuperVillain.db.SVStats.panels[k][this] and SuperVillain.db.SVStats.panels[k][this] == name then - _load(parent.holders[this], config) + for name, config in pairs(statTable)do + for panelName, panelData in pairs(db.panels) do + if(panelData and type(panelData) == "table") then + if(panelName == place and panelData[position] and panelData[position] == name) then + _load(parent.holders[position], config) end - elseif l and type(l) == "string"and l == name then - if SuperVillain.db.SVStats.panels[k] == name and k == place then - _load(parent.holders[this], config) + elseif(panelData and type(panelData) == "string" and panelData == name) then + if(name == place) then + _load(parent.holders[position], config) end end end @@ -535,15 +617,6 @@ do end if ForceHideBGStats then ForceHideBGStats = nil end end - - local BGStatColorUpdate = function() - BGStatString = join("", "%s: |cff", hexString, "%s|r") - if BGStatPrev ~= nil then - BG_OnUpdate(BGStatPrev) - end - end - - SuperVillain.Registry:SetCallback(BGStatColorUpdate); end --[[ ########################################################## @@ -555,7 +628,9 @@ function MOD:ReLoad() end function MOD:Load() - hexString = SuperVillain:HexColor("highlight") or "FFFFFF" + local hexHighlight = SuperVillain:HexColor("highlight") or "FFFFFF" + local hexClass = classColor.colorStr + BGStatString = "|cff" .. hexHighlight .. "%s: |c" .. hexClass .. "%s|r"; SVUI_Global["Accountant"] = SVUI_Global["Accountant"] or {}; SVUI_Global["Accountant"][playerRealm] = SVUI_Global["Accountant"][playerRealm] or {}; SVUI_Global["Accountant"][playerRealm]["gold"] = SVUI_Global["Accountant"][playerRealm]["gold"] or {}; @@ -577,6 +652,8 @@ function MOD:Load() self:Generate() self:RegisterEvent("PLAYER_ENTERING_WORLD", "Generate") + + myName = UnitName("player"); end --[[ ########################################################## @@ -605,6 +682,11 @@ CONFIGS["SVStats"] = { ["left"] = "Durability Bar", ["middle"] = "Reputation Bar", ["right"] = "Experience Bar", + }, + ["TopRightDataPanel"] = { + ["left"] = "None", + ["middle"] = "None", + ["right"] = "None", }, }, ["localtime"] = true, diff --git a/Interface/AddOns/SVUI/packages/stats/stats/experience.lua b/Interface/AddOns/SVUI/packages/stats/stats/experience.lua index 4572ec7..4d47b94 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/experience.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/experience.lua @@ -113,14 +113,15 @@ end local function Experience_OnEnter(self) MOD:Tip(self) - local f, g = getUnitXP("player") + local XP, maxXP = getUnitXP("player") local h = GetXPExhaustion() MOD.tooltip:AddLine(L["Experience"]) MOD.tooltip:AddLine(" ") - MOD.tooltip:AddDoubleLine(L["XP:"], format(" %d / %d (%d%%)", f, g, f / g * 100), 1, 1, 1) - MOD.tooltip:AddDoubleLine(L["Remaining:"], format(" %d (%d%% - %d "..L["Bars"]..")", g-f, (g-f) / g * 100, 20 * g-f / g), 1, 1, 1) + + MOD.tooltip:AddDoubleLine(L["XP:"], (" %d / %d (%d%%)"):format(XP, maxXP, (XP / maxXP) * 100), 1, 1, 1) + MOD.tooltip:AddDoubleLine(L["Remaining:"], (" %d (%d%% - %d "..L["Bars"]..")"):format(maxXP - XP, (maxXP - XP) / maxXP * 100, 20 * (maxXP - XP) / maxXP), 1, 1, 1) if h then - MOD.tooltip:AddDoubleLine(L["Rested:"], format(" + %d (%d%%)", h, h / g * 100), 1, 1, 1) + MOD.tooltip:AddDoubleLine(L["Rested:"], format(" + %d (%d%%)", h, h / maxXP * 100), 1, 1, 1) end MOD:ShowTip() end diff --git a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua index a3a9734..69e5856 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua @@ -59,7 +59,7 @@ local guildFormattedFaction = join("|cff", patternColor, "%s:|r |cFFFFFFFF%s/%s local guildFormattedOnline = join("", "+ %d ", FRIENDS_LIST_ONLINE, "..."); local guildFormattedNote = join("", "|cff999999 ", LABEL_NOTE, ":|r %s"); local guildFormattedRank = join("", "|cff999999 ", GUILD_RANK1_DESC, ":|r %s"); -local GuildStatMembers,GuildStatXP,GuildStatMOTD = {},{},""; +local GuildStatMembers,GuildStatMOTD = {},""; local currentObject; local UnitFlagFormat = { @@ -104,7 +104,7 @@ local function SortGuildStatMembers(shift) end end end) -end; +end local function GetGuildStatMembers() twipe(GuildStatMembers) @@ -118,25 +118,12 @@ local function GetGuildStatMembers() GuildStatMembers[#GuildStatMembers + 1] = { name, rank, level, zone, note, officernote, online, statusFormat, classFileName, rankIndex, isMobile} end end -end; - -local function GetGuildStatXP() - local currentXP, nextLevelXP = UnitGetGuildXP("player") - local totalXP = currentXP + nextLevelXP; - local percent; - if currentXP > 0 and totalXP > 0 then - percent = ceil(currentXP / totalXP * 100) - else - percent = 0 - end; - GuildStatXP[0] = { currentXP, totalXP, percent } -end; +end local GuildStatEventHandler = { ["PLAYER_ENTERING_WORLD"] = function(arg1, arg2) if not GuildFrame and IsInGuild() then LoadAddOn("Blizzard_GuildUI") - GetGuildStatXP() GuildRoster() end end, @@ -151,9 +138,6 @@ local GuildStatEventHandler = { end end end, - ["GUILD_XP_UPDATE"] = function(arg1, arg2) - GetGuildStatXP() - end, ["PLAYER_GUILD_UPDATE"] = function(arg1, arg2) GuildRoster() end, @@ -167,29 +151,29 @@ local GuildStatEventHandler = { local function MenuInvite(self, unit) GuildDatatTextRightClickMenu:Hide() InviteUnit(unit) -end; +end local function MenuRightClick(self, unit) GuildDatatTextRightClickMenu:Hide() SetItemRef(("player:%s"):format(unit), ("|Hplayer:%1$s|h[%1$s]|h"):format(unit), "LeftButton") -end; +end local function MenuLeftClick() if IsInGuild() then if not GuildFrame then LoadAddOn("Blizzard_GuildUI") - end; + end GuildFrame_Toggle() GuildFrame_TabClicked(GuildFrameTab2) else if not LookingForGuildFrame then LoadAddOn("Blizzard_LookingForGuildUI") - end; + end if LookingForGuildFrame then LookingForGuildFrame_Toggle() end end -end; +end local function Guild_OnEvent(self, event, ...) currentObject = self; @@ -199,7 +183,7 @@ local function Guild_OnEvent(self, event, ...) else self.text:SetText(L['No Guild']) end -end; +end local function Guild_OnClick(self, button) if button == "RightButton" and IsInGuild() then @@ -228,11 +212,11 @@ local function Guild_OnClick(self, button) notCheckable = true, func = MenuInvite } - end; + end menuCountWhispers = menuCountWhispers + 1; if not grouped then grouped = "" - end; + end MenuMap[3].menuList[menuCountWhispers] = { text = ("|cff%02x%02x%02x%d|r |cff%02x%02x%02x%s|r %s"):format(levelc.r*255, levelc.g*255, levelc.b*255, info[3], classc.r*255, classc.g*255, classc.b*255, info[1], grouped), arg1 = info[1], @@ -240,45 +224,38 @@ local function Guild_OnClick(self, button) func = MenuRightClick } end - end; + end EasyMenu(MenuMap, GuildDatatTextRightClickMenu, "cursor", 0, 0, "MENU", 2) else MenuLeftClick() end -end; +end local function Guild_OnEnter(self, _, ap) if not IsInGuild() then return - end; + end MOD:Tip(self) local aq, ar = GetNumGuildMembers() - if #GuildStatMembers == 0 then GetGuildStatMembers() end; + if #GuildStatMembers == 0 then GetGuildStatMembers() end SortGuildStatMembers(IsShiftKeyDown()) local guildName, guildRankName, guildRankIndex = GetGuildInfo('player') if guildName and guildRankName then MOD.tooltip:AddDoubleLine(("%s "):format(guildName), guildFormattedName:format(GUILD, ar, aq), 0.4, 0.78, 1, 0.4, 0.78, 1) MOD.tooltip:AddLine(guildRankName, 0.4, 0.78, 1) - end; + end if GuildStatMOTD ~= "" then MOD.tooltip:AddLine(' ') MOD.tooltip:AddLine(("%s |cffaaaaaa- |cffffffff%s"):format(GUILD_MOTD, GuildStatMOTD), 0.75, 0.9, 1, 1) - end; + end local av = SuperVillain:HexColor(0.75,0.9,1) - if GetGuildLevel() ~= 25 then - if GuildStatXP[0] then - local Z, a0, a1 = unpack(GuildStatXP[0]) - MOD.tooltip:AddLine(' ') - MOD.tooltip:AddLine(guildFormattedXP:format(TruncateString(Z), TruncateString(a0), a1)) - end - end; local _, _, standingID, barMin, barMax, barValue = GetGuildFactionInfo() if standingID ~= 8 then barMax = barMax - barMin; barValue = barValue - barMin; barMin = 0; MOD.tooltip:AddLine(guildFormattedFaction:format(COMBAT_FACTION_CHANGE, TruncateString(barValue), TruncateString(barMax), ceil(barValue / barMax * 100))) - end; + end local zoneColor, classColor, questColor, member, groupFormat; local counter = 0; MOD.tooltip:AddLine(' ') @@ -286,39 +263,39 @@ local function Guild_OnEnter(self, _, ap) if((30 - counter) <= 1) then if((ar - 30) > 1) then MOD.tooltip:AddLine(guildFormattedOnline:format(ar - 30), 0.75, 0.9, 1) - end; + end break - end; + end member = GuildStatMembers[X] if GetRealZoneText() == member[4]then zoneColor = {r=0.3,g=1.0,b=0.3} else zoneColor = {r=0.65,g=0.65,b=0.65} - end; + end classColor, questColor = RAID_CLASS_COLORS[member[9]], GetQuestDifficultyColor(member[3]) if UnitInParty(member[1]) or UnitInRaid(member[1]) then groupFormat = "|cffaaaaaa*|r" else groupFormat = "" - end; + end if IsShiftKeyDown() then MOD.tooltip:AddDoubleLine(("%s |cff999999-|cffffffff %s"):format(member[1], member[2]), member[4], classColor.r, classColor.g, classColor.b, zoneColor.r, zoneColor.g, zoneColor.b) if member[5] ~= ""then MOD.tooltip:AddLine(guildFormattedNote:format(member[5]), 0.75, 0.9, 1, 1) - end; + end if member[6] ~= ""then MOD.tooltip:AddLine(guildFormattedRank:format(member[6]), 0.3, 1, 0.3, 1) end else MOD.tooltip:AddDoubleLine(("|cff%02x%02x%02x%d|r %s%s %s"):format(questColor.r*255, questColor.g*255, questColor.b*255, member[3], member[1], groupFormat, member[8]), member[4], classColor.r, classColor.g, classColor.b, zoneColor.r, zoneColor.g, zoneColor.b) - end; + end counter = counter + 1 - end; + end MOD:ShowTip() if not ap then GuildRoster() end -end; +end local GuildColorUpdate = function() local hexColor = SuperVillain:HexColor("highlight"); @@ -326,7 +303,7 @@ local GuildColorUpdate = function() if currentObject ~= nil then Guild_OnEvent(currentObject, 'SVUI_COLOR_UPDATE') end -end; +end SuperVillain.Registry:SetCallback(GuildColorUpdate) MOD:Extend('Guild', StatEvents, Guild_OnEvent, nil, Guild_OnClick, Guild_OnEnter) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/packages/tip/SVTip.lua b/Interface/AddOns/SVUI/packages/tip/SVTip.lua index ee1c7ea..cf45924 100644 --- a/Interface/AddOns/SVUI/packages/tip/SVTip.lua +++ b/Interface/AddOns/SVUI/packages/tip/SVTip.lua @@ -81,7 +81,9 @@ local tooltips = { ShoppingTooltip2, ShoppingTooltip3, WorldMapTooltip, WorldMapCompareTooltip1, WorldMapCompareTooltip2, WorldMapCompareTooltip3, DropDownList1MenuBackdrop, - DropDownList2MenuBackdrop, DropDownList3MenuBackdrop, BNToastFrame + DropDownList2MenuBackdrop, DropDownList3MenuBackdrop, BNToastFrame, + PetBattlePrimaryAbilityTooltip, PetBattlePrimaryUnitTooltip, + BattlePetTooltip, FloatingBattlePetTooltip, FloatingPetBattleAbilityTooltip } local classification = { @@ -160,7 +162,7 @@ local function GetTalentSpec(unit,isPlayer) return specData end end -end +end --[[ ########################################################## CORE FUNCTIONS @@ -775,6 +777,173 @@ local _hook_OnTipHide = function(self) self.SuperBorder:ClearMaskColors() end +local function ApplyTooltipSkins() + local barHeight = SuperVillain.db.SVTip.healthBar.height + + for i, tooltip in pairs(tooltips) do + if(not tooltip) then return end + if(not tooltip.SuperBorder) then + local barOffset = 0 + local alpha = 0.2 + if(tooltip == GameTooltip) then + barOffset = (barHeight + 6) * -1 + alpha = 0.5 + end + + local mask = CreateFrame("Frame", nil, tooltip) + mask:SetPoint("TOPLEFT", tooltip, "TOPLEFT", 0, 0) + mask:SetPoint("BOTTOMRIGHT", tooltip, "BOTTOMRIGHT", 0, barOffset) + mask:SetFrameLevel(0) + mask.ToggleHeight = barOffset + mask.ToggleAlpha = alpha + + --[[ STARBURST TOP ]] + mask[1] = mask:CreateTexture(nil, "BACKGROUND") + mask[1]:SetPoint("BOTTOMLEFT", mask, "TOPLEFT", 0, 0) + mask[1]:SetHeight(mask:GetWidth() * 0.25) + mask[1]:SetWidth(mask:GetWidth() * 0.25) + mask[1]:SetTexture(TT_TOP) + mask[1]:SetVertexColor(0,0,0) + mask[1]:SetBlendMode("BLEND") + mask[1]:SetAlpha(alpha) + --[[ STARBURST BOTTOM ]] + mask[2] = mask:CreateTexture(nil, "BACKGROUND") + mask[2]:SetPoint("TOPRIGHT", mask, "BOTTOMRIGHT", 0, 0) + mask[2]:SetHeight(mask:GetWidth() * 0.25) + mask[2]:SetWidth(mask:GetWidth() * 0.25) + mask[2]:SetTexture(TT_BOTTOM) + mask[2]:SetVertexColor(0,0,0) + mask[2]:SetBlendMode("BLEND") + mask[2]:SetAlpha(alpha) + --[[ HALFTONE RIGHT ]] + mask[3] = mask:CreateTexture(nil, "BACKGROUND") + mask[3]:SetPoint("LEFT", mask, "RIGHT", 0, 0) + mask[3]:SetSize(64,64) + mask[3]:SetTexture(TT_RIGHT) + mask[3]:SetVertexColor(0,0,0) + mask[3]:SetBlendMode("BLEND") + mask[3]:SetAlpha(alpha) + --[[ HALFTONE LEFT ]] + mask[4] = mask:CreateTexture(nil, "BACKGROUND") + mask[4]:SetPoint("RIGHT", mask, "LEFT", 0, 0) + mask[4]:SetSize(64,64) + mask[4]:SetTexture(TT_LEFT) + mask[4]:SetVertexColor(0,0,0) + mask[4]:SetBlendMode("BLEND") + mask[4]:SetAlpha(alpha) + + --[[ BORDER TOP ]] + mask[5] = mask:CreateTexture(nil, "OVERLAY") + mask[5]:SetPoint("TOPLEFT", mask, "TOPLEFT", 0, 0) + mask[5]:SetPoint("TOPRIGHT", mask, "TOPRIGHT", 0, 0) + mask[5]:SetHeight(1) + mask[5]:SetTexture(0,0,0) + --[[ BORDER BOTTOM ]] + mask[6] = mask:CreateTexture(nil, "OVERLAY") + mask[6]:SetPoint("BOTTOMLEFT", mask, "BOTTOMLEFT", 0, 0) + mask[6]:SetPoint("BOTTOMRIGHT", mask, "BOTTOMRIGHT", 0, 0) + mask[6]:SetHeight(1) + mask[6]:SetTexture(0,0,0) + --[[ BORDER RIGHT ]] + mask[7] = mask:CreateTexture(nil, "OVERLAY") + mask[7]:SetPoint("TOPRIGHT", mask, "TOPRIGHT", 0, 0) + mask[7]:SetPoint("BOTTOMRIGHT", mask, "BOTTOMRIGHT", 0, 0) + mask[7]:SetWidth(1) + mask[7]:SetTexture(0,0,0) + --[[ BORDER LEFT ]] + mask[8] = mask:CreateTexture(nil, "OVERLAY") + mask[8]:SetPoint("TOPLEFT", mask, "TOPLEFT", 0, 0) + mask[8]:SetPoint("BOTTOMLEFT", mask, "BOTTOMLEFT", 0, 0) + mask[8]:SetWidth(1) + mask[8]:SetTexture(0,0,0) + + mask:SetBackdrop({ + bgFile = TT_BG, + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = true, + tileSize = 128, + edgeSize = 1 + }) + mask:SetBackdropColor(0, 0, 0, 1) + mask:SetBackdropBorderColor(0, 0, 0) + + mask.SetMaskBorder = SetMaskBorder + mask.SetBurstColor = SetBurstColor + mask.SetToneColor = SetToneColor + mask.ClearMaskColors = ClearMaskColors + + tooltip.SuperBorder = mask + + if tooltip.Background then + tooltip.Background:SetTexture(0,0,0,0) + end + + if tooltip.Delimiter1 then + tooltip.Delimiter1:SetTexture(0,0,0,0) + tooltip.Delimiter2:SetTexture(0,0,0,0) + end + + if tooltip.BorderTop then + tooltip.BorderTop:SetTexture(0,0,0,0) + end + + if tooltip.BorderTopLeft then + tooltip.BorderTopLeft:SetTexture(0,0,0,0) + end + + if tooltip.BorderTopRight then + tooltip.BorderTopRight:SetTexture(0,0,0,0) + end + + if tooltip.BorderLeft then + tooltip.BorderLeft:SetTexture(0,0,0,0) + end + + if tooltip.BorderRight then + tooltip.BorderRight:SetTexture(0,0,0,0) + end + + if tooltip.BorderBottom then + tooltip.BorderBottom:SetTexture(0,0,0,0) + end + + if tooltip.BorderBottomRight then + tooltip.BorderBottomRight:SetTexture(0,0,0,0) + end + + if tooltip.BorderBottomLeft then + tooltip.BorderBottomLeft:SetTexture(0,0,0,0) + end + + tooltip:SetBackdrop({ + bgFile = TT_BG, + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tileSize = 128, + tile = true, + edgeSize = 1 + }) + tooltip:SetBackdropColor(0, 0, 0, 0) + tooltip:SetBackdropBorderColor(0, 0, 0, 0) + + tooltip.SetBackdrop = Override_BG + NewHook(tooltip, "SetBackdropColor", Override_BGColor) + NewHook(tooltip, "SetBackdropBorderColor", Override_BorderColor) + tooltip:HookScript("OnShow", _hook_OnTipShow) + tooltip:HookScript("OnHide", _hook_OnTipHide) + end + tremove(tooltips, i) + end + if(not tooltips[1]) then + MOD.AllSkinned = true + end +end + +function MOD:ReLoad() + if(not self.AllSkinned) then + ApplyTooltipSkins() + end +end + function MOD:Load() BNToastFrame:Point("TOPRIGHT", SVUI_MinimapFrame, "BOTTOMLEFT", 0, -10) SuperVillain:SetSVMovable(BNToastFrame, L["BNet Frame"], nil, nil, nil, nil, "BNET") @@ -789,118 +958,7 @@ function MOD:Load() local barHeight = self.db.healthBar.height - for _, tooltip in pairs(tooltips) do - if(tooltip.SuperBorder) then return end - - local barOffset = 0 - local alpha = 0.2 - if(tooltip == GameTooltip) then - barOffset = (barHeight + 6) * -1 - 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) - mask:SetFrameLevel(0) - mask.ToggleHeight = barOffset - mask.ToggleAlpha = alpha - - --[[ STARBURST TOP ]] - mask[1] = mask:CreateTexture(nil, "BACKGROUND") - mask[1]:SetPoint("BOTTOMLEFT", mask, "TOPLEFT", 0, 0) - mask[1]:SetHeight(mask:GetWidth() * 0.25) - mask[1]:SetWidth(mask:GetWidth() * 0.25) - mask[1]:SetTexture(TT_TOP) - mask[1]:SetVertexColor(0,0,0) - mask[1]:SetBlendMode("BLEND") - mask[1]:SetAlpha(alpha) - --[[ STARBURST BOTTOM ]] - mask[2] = mask:CreateTexture(nil, "BACKGROUND") - mask[2]:SetPoint("TOPRIGHT", mask, "BOTTOMRIGHT", 0, 0) - mask[2]:SetHeight(mask:GetWidth() * 0.25) - mask[2]:SetWidth(mask:GetWidth() * 0.25) - mask[2]:SetTexture(TT_BOTTOM) - mask[2]:SetVertexColor(0,0,0) - mask[2]:SetBlendMode("BLEND") - mask[2]:SetAlpha(alpha) - --[[ HALFTONE RIGHT ]] - mask[3] = mask:CreateTexture(nil, "BACKGROUND") - mask[3]:SetPoint("LEFT", mask, "RIGHT", 0, 0) - mask[3]:SetSize(64,64) - mask[3]:SetTexture(TT_RIGHT) - mask[3]:SetVertexColor(0,0,0) - mask[3]:SetBlendMode("BLEND") - mask[3]:SetAlpha(alpha) - --[[ HALFTONE LEFT ]] - mask[4] = mask:CreateTexture(nil, "BACKGROUND") - mask[4]:SetPoint("RIGHT", mask, "LEFT", 0, 0) - mask[4]:SetSize(64,64) - mask[4]:SetTexture(TT_LEFT) - mask[4]:SetVertexColor(0,0,0) - mask[4]:SetBlendMode("BLEND") - mask[4]:SetAlpha(alpha) - - --[[ BORDER TOP ]] - mask[5] = mask:CreateTexture(nil, "OVERLAY") - mask[5]:SetPoint("TOPLEFT", mask, "TOPLEFT", 0, 0) - mask[5]:SetPoint("TOPRIGHT", mask, "TOPRIGHT", 0, 0) - mask[5]:SetHeight(1) - mask[5]:SetTexture(0,0,0) - --[[ BORDER BOTTOM ]] - mask[6] = mask:CreateTexture(nil, "OVERLAY") - mask[6]:SetPoint("BOTTOMLEFT", mask, "BOTTOMLEFT", 0, 0) - mask[6]:SetPoint("BOTTOMRIGHT", mask, "BOTTOMRIGHT", 0, 0) - mask[6]:SetHeight(1) - mask[6]:SetTexture(0,0,0) - --[[ BORDER RIGHT ]] - mask[7] = mask:CreateTexture(nil, "OVERLAY") - mask[7]:SetPoint("TOPRIGHT", mask, "TOPRIGHT", 0, 0) - mask[7]:SetPoint("BOTTOMRIGHT", mask, "BOTTOMRIGHT", 0, 0) - mask[7]:SetWidth(1) - mask[7]:SetTexture(0,0,0) - --[[ BORDER LEFT ]] - mask[8] = mask:CreateTexture(nil, "OVERLAY") - mask[8]:SetPoint("TOPLEFT", mask, "TOPLEFT", 0, 0) - mask[8]:SetPoint("BOTTOMLEFT", mask, "BOTTOMLEFT", 0, 0) - mask[8]:SetWidth(1) - mask[8]:SetTexture(0,0,0) - - mask:SetBackdrop({ - bgFile = TT_BG, - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - tile = true, - tileSize = 128, - edgeSize = 1 - }) - mask:SetBackdropColor(0, 0, 0, 1) - mask:SetBackdropBorderColor(0, 0, 0) - - mask.SetMaskBorder = SetMaskBorder - mask.SetBurstColor = SetBurstColor - mask.SetToneColor = SetToneColor - mask.ClearMaskColors = ClearMaskColors - - tooltip.SuperBorder = mask - - tooltip:SetBackdrop({ - bgFile = TT_BG, - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - tileSize = 128, - tile = true, - edgeSize = 1 - }) - tooltip:SetBackdropColor(0, 0, 0, 0) - tooltip:SetBackdropBorderColor(0, 0, 0, 0) - - tooltip.SetBackdrop = Override_BG - NewHook(tooltip, "SetBackdropColor", Override_BGColor) - NewHook(tooltip, "SetBackdropBorderColor", Override_BorderColor) - tooltip:HookScript("OnShow", _hook_OnTipShow) - tooltip:HookScript("OnHide", _hook_OnTipHide) - end + ApplyTooltipSkins() GameTooltipStatusBar:Height(barHeight) GameTooltipStatusBar:SetStatusBarTexture(SuperVillain.Media.bar.default) diff --git a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua index c5c2005..626e670 100644 --- a/Interface/AddOns/SVUI/packages/unit/SVUnit.lua +++ b/Interface/AddOns/SVUI/packages/unit/SVUnit.lua @@ -215,6 +215,22 @@ do end end +function MOD:GetActiveSize(db) + local width, height, best = 0,0,0 + + if(self.db.grid.enable and db.gridAllowed) then + width = self.db.grid.size + height = width + best = width + else + width = db.width + height = db.height + best = min(width, height); + end + + return width, height, best +end + function MOD:AllowElement(unitFrame) if InCombatLockdown() then return; end if not unitFrame.isForced then @@ -309,7 +325,6 @@ function MOD:RefreshUnitColors() oUF_SuperVillain.SVConfigs.classbackdrop = SuperVillain.db.SVUnit.classbackdrop oUF_SuperVillain.SVConfigs.healthclass = SuperVillain.db.SVUnit.healthclass oUF_SuperVillain.SVConfigs.colorhealthbyvalue = SuperVillain.db.SVUnit.colorhealthbyvalue - oUF_SuperVillain.SVConfigs.gridMode = SuperVillain.db.SVUnit.gridMode end function MOD:RefreshAllUnitMedia() @@ -376,7 +391,15 @@ function MOD:RefreshUnitMedia(unitName) local panel = self.InfoPanel if(panel) then if(panel.Name and unitDB.name) then - panel.Name:SetFont(SuperVillain.Shared:Fetch("font", unitDB.name.font), unitDB.name.fontSize, unitDB.name.fontOutline) + if(db.grid.enable and unitDB.gridAllowed) then + panel.Name:SetFont(SuperVillain.Media.font.pixel, 8, "MONOCHROMEOUTLINE") + panel.Name:SetShadowOffset(1, -1) + panel.Name:SetShadowColor(0, 0, 0, 0.75) + else + panel.Name:SetFont(SuperVillain.Shared:Fetch("font", unitDB.name.font), unitDB.name.fontSize, unitDB.name.fontOutline) + panel.Name:SetShadowOffset(2, -2) + panel.Name:SetShadowColor(0, 0, 0, 1) + end end if(panel.Health) then panel.Health:SetFont(CURRENT_FONT, db.fontSize, db.fontOutline) @@ -443,11 +466,6 @@ end function MOD:RefreshUnitLayout(frame, template) local db = self.db[template] - local UNIT_WIDTH = db.width; - local UNIT_HEIGHT = db.height; - local BEST_SIZE = min(UNIT_WIDTH,UNIT_HEIGHT); - local AURA_HOLDER = db.width - local powerHeight = (db.power and db.power.enable) and (db.power.height - 1) or 1; local TOP_ANCHOR1, TOP_ANCHOR2, TOP_MODIFIER = "TOPRIGHT", "TOPLEFT", 1; local BOTTOM_ANCHOR1, BOTTOM_ANCHOR2, BOTTOM_MODIFIER = "BOTTOMLEFT", "BOTTOMRIGHT", -1; @@ -460,20 +478,20 @@ function MOD:RefreshUnitLayout(frame, template) BOTTOM_MODIFIER = 1 end - local portraitOverlay = false; - local overlayAnimation = false; - local portraitWidth = (1 * TOP_MODIFIER); + local UNIT_WIDTH, UNIT_HEIGHT, BEST_SIZE = self:GetActiveSize(db) + local POWER_HEIGHT = (db.power and db.power.enable) and (db.power.height - 1) or 1; + local PORTRAIT_WIDTH = (1 * TOP_MODIFIER) + local GRID_MODE = (self.db.grid.enable and db.gridAllowed) or false + local MINI_GRID = (GRID_MODE and self.db.grid.size < 26) or false + local healthPanel = frame.HealthPanel local infoPanel = frame.InfoPanel - local calculatedHeight = db.height; - - if(template:find("raid")) then - AURA_HOLDER = 100 - end + local portraitOverlay = false + local overlayAnimation = false if(db.portrait and db.portrait.enable) then if(not db.portrait.overlay) then - portraitWidth = ((db.portrait.width * TOP_MODIFIER) + (1 * TOP_MODIFIER)) + PORTRAIT_WIDTH = ((db.portrait.width * TOP_MODIFIER) + (1 * TOP_MODIFIER)) else portraitOverlay = true overlayAnimation = self.db.overlayAnimation @@ -496,7 +514,7 @@ function MOD:RefreshUnitLayout(frame, template) healthPanel:ClearAllPoints() healthPanel:Point(TOP_ANCHOR1, frame, TOP_ANCHOR1, (1 * BOTTOM_MODIFIER), -1) - healthPanel:Point(BOTTOM_ANCHOR1, frame, BOTTOM_ANCHOR1, portraitWidth, powerHeight) + healthPanel:Point(BOTTOM_ANCHOR1, frame, BOTTOM_ANCHOR1, PORTRAIT_WIDTH, POWER_HEIGHT) if(frame.StatusPanel) then if(template ~= "player" and template ~= "pet" and template ~= "target" and template ~= "targettarget" and template ~= "focus" and template ~= "focustarget") then @@ -532,45 +550,71 @@ function MOD:RefreshUnitLayout(frame, template) --[[ INFO TEXTS ]]-- local point,cX,cY; + if(infoPanel.Name and db.name) then local nametext = infoPanel.Name - point = db.name.position - cX = db.name.xOffset - cY = db.name.yOffset - nametext:ClearAllPoints() - SuperVillain:ReversePoint(nametext, point, infoPanel, cX, cY) - frame:Tag(nametext, db.name.tags) + if(GRID_MODE) then + if(self.db.grid.shownames and self.db.grid.size >= 30) then + if(not nametext:IsShown()) then nametext:Show() end + nametext:Point("CENTER", frame, "CENTER", 1, 0) + frame:Tag(nametext, "[name:grid]") + else + nametext:Hide() + end + else + point = db.name.position + cX = db.name.xOffset + cY = db.name.yOffset + nametext:ClearAllPoints() + SuperVillain:ReversePoint(nametext, point, infoPanel, cX, cY) + frame:Tag(nametext, db.name.tags) + end end if(frame.Health and infoPanel.Health and db.health) then - local healthtext = infoPanel.Health - point = db.health.position - cX = db.health.xOffset - cY = db.health.yOffset - healthtext:ClearAllPoints() - SuperVillain:ReversePoint(healthtext, point, infoPanel, cX, cY) - frame:Tag(healthtext, db.health.tags) + if(GRID_MODE) then + infoPanel.Health:Hide() + else + if(not infoPanel.Health:IsShown()) then infoPanel.Health:Show() end + local healthtext = infoPanel.Health + point = db.health.position + cX = db.health.xOffset + cY = db.health.yOffset + healthtext:ClearAllPoints() + SuperVillain:ReversePoint(healthtext, point, infoPanel, cX, cY) + frame:Tag(healthtext, db.health.tags) + end end if(frame.Power and infoPanel.Power and db.power) then - local powertext = infoPanel.Power - if db.power.tags ~= nil and db.power.tags ~= '' then - point = db.power.position - cX = db.power.xOffset - cY = db.power.yOffset - powertext:ClearAllPoints() - SuperVillain:ReversePoint(powertext, point, infoPanel, cX, cY) - if db.power.attachTextToPower then - powertext:SetParent(frame.Power) - else - powertext:SetParent(infoPanel) + if(GRID_MODE) then + infoPanel.Power:Hide() + else + if(not infoPanel.Power:IsShown()) then infoPanel.Power:Show() end + local powertext = infoPanel.Power + if db.power.tags ~= nil and db.power.tags ~= '' then + point = db.power.position + cX = db.power.xOffset + cY = db.power.yOffset + powertext:ClearAllPoints() + SuperVillain:ReversePoint(powertext, point, infoPanel, cX, cY) + if db.power.attachTextToPower then + powertext:SetParent(frame.Power) + else + powertext:SetParent(infoPanel) + end end + frame:Tag(powertext, db.power.tags) end - frame:Tag(powertext, db.power.tags) end if(infoPanel.Misc and db.misc) then - frame:Tag(infoPanel.Misc, db.misc.tags) + if(GRID_MODE) then + infoPanel.Misc:Hide() + else + if(not infoPanel.Misc:IsShown()) then infoPanel.Misc:Show() end + frame:Tag(infoPanel.Misc, db.misc.tags) + end end --[[ HEALTH LAYOUT ]]-- @@ -584,22 +628,20 @@ function MOD:RefreshUnitLayout(frame, template) end health.Smooth = self.db.smoothbars; - health.colorSmooth = nil; health.colorHealth = nil; health.colorClass = nil; health.colorReaction = nil; health.colorOverlay = nil; health.overlayAnimation = overlayAnimation - if(db.health and (db.health.frequentUpdates ~= nil)) then - end - if(frame.HealPrediction) then + + if(not GRID_MODE and frame.HealPrediction) then frame.HealPrediction["frequentUpdates"] = health.frequentUpdates end - if(portraitOverlay and self.db.forceHealthColor) then + if(not GRID_MODE and portraitOverlay and self.db.forceHealthColor) then health.colorOverlay = true; else - if(db.colorOverride and db.colorOverride == "FORCE_ON") then + if(GRID_MODE or (db.colorOverride and db.colorOverride == "FORCE_ON")) then health.colorClass = true; health.colorReaction = true elseif(db.colorOverride and db.colorOverride == "FORCE_OFF") then @@ -623,8 +665,11 @@ function MOD:RefreshUnitLayout(frame, template) end health:ClearAllPoints() health:SetAllPoints(healthPanel) - if db.health and db.health.orientation then - health:SetOrientation(db.health.orientation) + + health.gridMode = GRID_MODE; + + if(db.health and db.health.orientation) then + health:SetOrientation(GRID_MODE and "VERTICAL" or db.health.orientation) end self:RefreshHealthBar(frame, portraitOverlay) @@ -656,8 +701,8 @@ function MOD:RefreshUnitLayout(frame, template) power.frequentUpdates = db.power.frequentUpdates end power:ClearAllPoints() - power:Height(powerHeight - 2) - power:Point(BOTTOM_ANCHOR1, frame, BOTTOM_ANCHOR1, (portraitWidth - (1 * BOTTOM_MODIFIER)), 2) + power:Height(POWER_HEIGHT - 2) + power:Point(BOTTOM_ANCHOR1, frame, BOTTOM_ANCHOR1, (PORTRAIT_WIDTH - (1 * BOTTOM_MODIFIER)), 2) power:Point(BOTTOM_ANCHOR2, frame, BOTTOM_ANCHOR2, (2 * BOTTOM_MODIFIER), 2) elseif frame:IsElementEnabled('Power')then frame:DisableElement('Power') @@ -670,10 +715,10 @@ function MOD:RefreshUnitLayout(frame, template) if frame.AltPowerBar then local altPower = frame.AltPowerBar; local Alt_OnShow = function() - healthPanel:Point(TOP_ANCHOR2, portraitWidth, -(powerHeight + 1)) + healthPanel:Point(TOP_ANCHOR2, PORTRAIT_WIDTH, -(POWER_HEIGHT + 1)) end local Alt_OnHide = function() - healthPanel:Point(TOP_ANCHOR2, portraitWidth, -1) + healthPanel:Point(TOP_ANCHOR2, PORTRAIT_WIDTH, -1) altPower.text:SetText("") end if db.power.enable then @@ -682,9 +727,9 @@ function MOD:RefreshUnitLayout(frame, template) altPower.text:SetFont(infoPanel.Health:GetFont()) end altPower.text:SetAlpha(1) - altPower:Point(TOP_ANCHOR2, frame, TOP_ANCHOR2, portraitWidth, -1) + altPower:Point(TOP_ANCHOR2, frame, TOP_ANCHOR2, PORTRAIT_WIDTH, -1) altPower:Point(TOP_ANCHOR1, frame, TOP_ANCHOR1, (1 * BOTTOM_MODIFIER), -1) - altPower:SetHeight(powerHeight) + altPower:SetHeight(POWER_HEIGHT) altPower.Smooth = self.db.smoothbars; altPower:HookScript("OnShow", Alt_OnShow) altPower:HookScript("OnHide", Alt_OnHide) @@ -701,9 +746,9 @@ function MOD:RefreshUnitLayout(frame, template) if db.portrait and frame.Portrait then local portrait = frame.Portrait; - portrait:Show() + if(not GRID_MODE and db.portrait.enable) then + portrait:Show() - if db.portrait.enable then if not frame:IsElementEnabled('Portrait')then frame:EnableElement('Portrait') end @@ -740,10 +785,11 @@ function MOD:RefreshUnitLayout(frame, template) end end else - if frame:IsElementEnabled('Portrait')then + portrait:Hide() + portrait.Panel:Hide() + + if frame:IsElementEnabled('Portrait') then frame:DisableElement('Portrait') - portrait:Hide() - portrait.Panel:Hide() end end end @@ -851,7 +897,7 @@ function MOD:RefreshUnitLayout(frame, template) local buffCount = perRow * numRows; buffs.forceShow = frame.forceShowAuras; - buffs.num = buffCount; + buffs.num = GRID_MODE and 0 or buffCount; local tempSize = (((UNIT_WIDTH + 2) - (buffs.spacing * (perRow - 1))) / perRow); local auraSize = min(BEST_SIZE, tempSize) @@ -883,7 +929,7 @@ function MOD:RefreshUnitLayout(frame, template) local debuffCount = perRow * numRows; debuffs.forceShow = frame.forceShowAuras; - debuffs.num = debuffCount; + debuffs.num = GRID_MODE and 0 or debuffCount; local tempSize = (((UNIT_WIDTH + 2) - (debuffs.spacing * (perRow - 1))) / perRow); local auraSize = min(BEST_SIZE,tempSize) @@ -976,8 +1022,16 @@ function MOD:RefreshUnitLayout(frame, template) frame:EnableElement('RaidIcon') local size = ico.raidicon.size; raidIcon:ClearAllPoints() - raidIcon:Size(size) - SuperVillain:ReversePoint(raidIcon, ico.raidicon.attachTo, healthPanel, ico.raidicon.xOffset, ico.raidicon.yOffset) + + if(GRID_MODE) then + raidIcon:SetAlpha(0.7) + raidIcon:Size(10) + raidIcon:Point("TOP", healthPanel, "TOP", 0, 0) + else + raidIcon:SetAlpha(1) + raidIcon:Size(size) + SuperVillain:ReversePoint(raidIcon, ico.raidicon.attachTo, healthPanel, ico.raidicon.xOffset, ico.raidicon.yOffset) + end else frame:DisableElement('RaidIcon') raidIcon:Hide() @@ -988,13 +1042,21 @@ function MOD:RefreshUnitLayout(frame, template) if(ico.roleIcon and frame.LFDRole) then local lfd = frame.LFDRole; - if ico.roleIcon.enable then + if(not MINI_GRID and ico.roleIcon.enable) then lfd:Show() frame:EnableElement('LFDRole') local size = ico.roleIcon.size; lfd:ClearAllPoints() - lfd:Size(size) - SuperVillain:ReversePoint(lfd, ico.roleIcon.attachTo, healthPanel, ico.roleIcon.xOffset, ico.roleIcon.yOffset) + + if(GRID_MODE) then + lfd:SetAlpha(0.7) + lfd:Size(10) + lfd:Point("BOTTOM", healthPanel, "BOTTOM", 0, 0) + else + lfd:SetAlpha(1) + lfd:Size(size) + SuperVillain:ReversePoint(lfd, ico.roleIcon.attachTo, healthPanel, ico.roleIcon.xOffset, ico.roleIcon.yOffset) + end else frame:DisableElement('LFDRole') lfd:Hide() @@ -1005,14 +1067,22 @@ function MOD:RefreshUnitLayout(frame, template) if(ico.raidRoleIcons and frame.RaidRoleFramesAnchor) then local roles = frame.RaidRoleFramesAnchor; - if ico.raidRoleIcons.enable then + if(not MINI_GRID and ico.raidRoleIcons.enable) then roles:Show() frame:EnableElement('Leader') frame:EnableElement('MasterLooter') local size = ico.raidRoleIcons.size; roles:ClearAllPoints() - roles:Size(size) - SuperVillain:ReversePoint(roles, ico.raidRoleIcons.attachTo, healthPanel, ico.raidRoleIcons.xOffset, ico.raidRoleIcons.yOffset) + + if(GRID_MODE) then + roles:SetAlpha(0.7) + roles:Size(10) + roles:Point("CENTER", healthPanel, "TOPLEFT", 0, 2) + else + roles:SetAlpha(1) + roles:Size(size) + SuperVillain:ReversePoint(roles, ico.raidRoleIcons.attachTo, healthPanel, ico.raidRoleIcons.xOffset, ico.raidRoleIcons.yOffset) + end else roles:Hide() frame:DisableElement('Leader') @@ -1137,6 +1207,7 @@ local function SetProxyEnv() for i=1, 30 do tags['name:'..i] = oUF_SuperVillain.Tags.Methods['name:'..i] end + tags['name:grid'] = oUF_SuperVillain.Tags.Methods['name:grid'] tags['health:color'] = oUF_SuperVillain.Tags.Methods['health:color'] tags['health:current'] = oUF_SuperVillain.Tags.Methods['health:current'] tags['health:deficit'] = oUF_SuperVillain.Tags.Methods['health:deficit'] diff --git a/Interface/AddOns/SVUI/packages/unit/config.lua b/Interface/AddOns/SVUI/packages/unit/config.lua index 91888ee..897661f 100644 --- a/Interface/AddOns/SVUI/packages/unit/config.lua +++ b/Interface/AddOns/SVUI/packages/unit/config.lua @@ -69,7 +69,14 @@ CONFIGS["SVUnit"] = { ["auraBarShield"] = true, ["castClassColor"] = false, ["xrayFocus"] = true, - ["gpsLowHealth"] = false, + ["gpsLowHealth"] = false, + ["grid"] = { + ["enable"] = false, + ["size"] = 28, + ["shownames"] = false, + ["font"] = "Roboto", + ["fontsize"] = 16, + }, ["player"] = { ["enable"] = true, ["width"] = 215, @@ -236,8 +243,8 @@ CONFIGS["SVUnit"] = { ["raidicon"] = { ["enable"] = true, - ["size"] = 30, - ["attachTo"] = "INNERRIGHT", + ["size"] = 25, + ["attachTo"] = "INNERBOTTOMRIGHT", ["xOffset"] = 0, ["yOffset"] = 0, }, @@ -250,7 +257,7 @@ CONFIGS["SVUnit"] = { }, ["restIcon"] = { ["enable"] = true, - ["size"] = 26, + ["size"] = 25, ["attachTo"] = "INNERTOPRIGHT", ["xOffset"] = 0, ["yOffset"] = 0, @@ -1586,10 +1593,10 @@ CONFIGS["SVUnit"] = { ["showPlayer"] = true, ["predict"] = false, ["colorOverride"] = "USE_DEFAULT", - ["gridMode"] = false, ["width"] = 70, ["height"] = 70, ["gps"] = true, + ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -1646,7 +1653,7 @@ CONFIGS["SVUnit"] = { { ["enable"] = false, ["perrow"] = 2, - ["numrows"] = 2, + ["numrows"] = 1, ["attachTo"] = "FRAME", ["anchorPoint"] = "RIGHTTOP", ["verticalGrowth"] = "DOWN", @@ -1666,7 +1673,7 @@ CONFIGS["SVUnit"] = { { ["enable"] = true, ["perrow"] = 2, - ["numrows"] = 2, + ["numrows"] = 1, ["attachTo"] = "FRAME", ["anchorPoint"] = "RIGHTTOP", ["verticalGrowth"] = "DOWN", @@ -1691,7 +1698,8 @@ CONFIGS["SVUnit"] = { { ["enable"] = false, ["width"] = 30, - ["height"] = 30, + ["height"] = 30, + ["gridAllowed"] = true, ["anchorPoint"] = "BOTTOMLEFT", ["xOffset"] = - 1, ["yOffset"] = 0, @@ -1702,7 +1710,8 @@ CONFIGS["SVUnit"] = { { ["enable"] = false, ["width"] = 30, - ["height"] = 30, + ["height"] = 30, + ["gridAllowed"] = true, ["anchorPoint"] = "TOPLEFT", ["xOffset"] = - 1, ["yOffset"] = 0, @@ -1762,10 +1771,10 @@ CONFIGS["SVUnit"] = { ["showPlayer"] = true, ["predict"] = false, ["colorOverride"] = "USE_DEFAULT", - ["gridMode"] = false, ["width"] = 75, ["height"] = 34, - ["gps"] = false, + ["gps"] = false, + ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -1913,10 +1922,10 @@ CONFIGS["SVUnit"] = { ["showPlayer"] = true, ["predict"] = false, ["colorOverride"] = "USE_DEFAULT", - ["gridMode"] = false, ["width"] = 50, ["height"] = 30, ["gps"] = false, + ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -2063,10 +2072,10 @@ CONFIGS["SVUnit"] = { ["showPlayer"] = true, ["predict"] = false, ["colorOverride"] = "USE_DEFAULT", - ["gridMode"] = false, ["width"] = 50, ["height"] = 30, ["gps"] = false, + ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -2215,9 +2224,9 @@ CONFIGS["SVUnit"] = { ["startFromCenter"] = false, ["predict"] = false, ["colorOverride"] = "USE_DEFAULT", - ["gridMode"] = false, ["width"] = 80, - ["height"] = 30, + ["height"] = 30, + ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -2325,9 +2334,9 @@ CONFIGS["SVUnit"] = { ["enable"] = true, ["threatEnabled"] = true, ["rangeCheck"] = true, - ["gridMode"] = false, ["width"] = 120, - ["height"] = 28, + ["height"] = 28, + ["gridAllowed"] = true, ["formatting"] = { ["power_colored"] = true, ["power_type"] = "none", @@ -2382,9 +2391,9 @@ CONFIGS["SVUnit"] = { ["enable"] = true, ["threatEnabled"] = true, ["rangeCheck"] = true, - ["gridMode"] = false, ["width"] = 120, - ["height"] = 28, + ["height"] = 28, + ["gridAllowed"] = true, ["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 9953a30..2e02985 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/castbar.lua @@ -280,7 +280,7 @@ local CustomTimeText = function(self, value) end local CustomCastTimeUpdate = function(self, duration) - if(self.recipecount and self.maxrecipe and self.maxrecipe > 0) then + if(self.recipecount and self.recipecount > 0 and self.maxrecipe and self.maxrecipe > 1) then self.Text:SetText(self.recipecount .. "/" .. self.maxrecipe .. ": " .. self.previous) end if(self.Time) then @@ -324,7 +324,7 @@ local CustomCastBarUpdate = function(self, elapsed) self.channeling = nil self.tradeskill = nil self.recipecount = nil - self.maxrecipe = nil + self.maxrecipe = 1 self:SetValue(1) self:Hide() return @@ -353,7 +353,7 @@ local CustomCastBarUpdate = function(self, elapsed) self.casting = nil self.tradeskill = nil self.recipecount = nil - self.maxrecipe = nil + self.maxrecipe = 1 self:Hide() if(self.PostCastStop) then self:PostCastStop(self.__owner.unit) end @@ -384,7 +384,7 @@ local CustomCastBarUpdate = function(self, elapsed) self.casting = nil self.tradeskill = nil self.recipecount = nil - self.maxrecipe = nil + self.maxrecipe = 1 self:Hide() if(self.PostChannelStop) then self:PostChannelStop(self.__owner.unit) end diff --git a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua index ec0923d..426dbbc 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/essentials.lua @@ -496,6 +496,7 @@ function MOD:CreateHealthBar(frame, hasbg, reverse) healthBar.animation = flasher healthBar.noupdate = false; healthBar.fillInverted = reverse; + healthBar.gridMode = false; healthBar.colorTapping = true; healthBar.colorDisconnected = true; healthBar.Override = false; diff --git a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua index af59fa3..c957aad 100644 --- a/Interface/AddOns/SVUI/packages/unit/elements/tags.lua +++ b/Interface/AddOns/SVUI/packages/unit/elements/tags.lua @@ -21,7 +21,7 @@ local pairs = _G.pairs; local table = _G.table; local string = _G.string; --[[ STRING METHODS ]]-- -local find, format, byte = string.find, string.format, string.byte; +local find, format, byte, upper = string.find, string.format, string.byte, string.upper; local sub, gsub, len = string.sub, string.gsub, string.len; --[[ TABLE METHODS ]]-- local twipe = table.wipe; @@ -55,6 +55,13 @@ local SKULL_ICON = "|TInterface\\TARGETINGFRAME\\UI-TargetingFrame-Skull.blp:16: LOCAL FUNCTIONS ########################################################## ]]-- +local function Hex(r, g, b) + if type(r) == "table" then + if r.r then r, g, b = r.r, r.g, r.b else r, g, b = unpack(r) end + end + return format("|cff%02x%02x%02x", r*255, g*255, b*255) +end + local function TruncateString(value) if value >= 1e9 then return ("%.1fb"):format(value / 1e9):gsub("%.?0 + ([kmb])$", "%1") @@ -201,6 +208,7 @@ for i = 1, 30 do oUF_SuperVillain.Tags.Events["name:"..i] = "UNIT_NAME_UPDATE"; end oUF_SuperVillain.Tags.Events["name:level"] = "UNIT_LEVEL PLAYER_LEVEL_UP PLAYER_FLAGS_CHANGED"; +oUF_SuperVillain.Tags.Events["name:grid"] = "UNIT_NAME_UPDATE"; oUF_SuperVillain.Tags.Events["health:color"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; oUF_SuperVillain.Tags.Events["health:deficit"] = "UNIT_HEALTH_FREQUENT UNIT_MAXHEALTH UNIT_CONNECTION PLAYER_FLAGS_CHANGED"; @@ -286,6 +294,27 @@ oUF_SuperVillain.Tags.Methods["name:level"] = function(unit) hexString = Hex(r, g, b) return ("%s%s|r"):format(hexString, levelString) end + +oUF_SuperVillain.Tags.Methods["name:grid"] = function(unit) + local name = UnitName(unit) + if not name then return "" end + local unitReaction = UnitReaction(unit, "player") + local _, classToken = UnitClass(unit) + local result = "|cffC2C2C2" + if UnitIsPlayer(unit) then + local class = RAID_CLASS_COLORS[classToken] + if class then + result = Hex(class.r, class.g, class.b) + end + elseif unitReaction then + local reaction = oUF_SuperVillain["colors"].reaction[unitReaction] + result = Hex(reaction[1], reaction[2], reaction[3]) + end + name = TrimTagText(name, 4) + name = upper(name) + result = ("%s%s|r"):format(result, name) + return result +end --[[ ########################################################## HEALTH TAG METHODS diff --git a/Interface/AddOns/SVUI/packages/unit/frames.lua b/Interface/AddOns/SVUI/packages/unit/frames.lua index 6720fb0..02825c6 100644 --- a/Interface/AddOns/SVUI/packages/unit/frames.lua +++ b/Interface/AddOns/SVUI/packages/unit/frames.lua @@ -1184,14 +1184,17 @@ end local UpdateRaidSubUnit = function(self, key, db) self.colors = oUF_SuperVillain.colors; self:RegisterForClicks(MOD.db.fastClickTarget and "AnyDown" or "AnyUp") - if not InCombatLockdown() then self:Size(db.width, db.height) end + local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db) + if not InCombatLockdown() then + self:Size(UNIT_WIDTH, UNIT_HEIGHT) + end do local rdBuffs = self.RaidDebuffs; if db.rdebuffs.enable then if not self:IsElementEnabled('RaidDebuffs')then self:EnableElement("RaidDebuffs") end - local actualSz = numMin(db.rdebuffs.size, (db.height - 8)) + local actualSz = numMin(db.rdebuffs.size, (UNIT_HEIGHT - 8)) rdBuffs:Size(actualSz) rdBuffs:Point("CENTER", self, "CENTER", db.rdebuffs.xOffset, db.rdebuffs.yOffset) rdBuffs:Show() @@ -1512,9 +1515,10 @@ local UpdatePartySubUnit = function(self, key, db) end self.originalParent.childList[self] = true; if not InCombatLockdown()then - if altDB.enable then + if altDB.enable then + local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(altDB) self:SetParent(self.originalParent) - self:Size(altDB.width,altDB.height) + self:Size(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() SuperVillain:ReversePoint(self, altDB.anchorPoint, self.originalParent, altDB.xOffset, altDB.yOffset) else @@ -1538,8 +1542,9 @@ local UpdatePartySubUnit = function(self, key, db) self:Tag(nametext, altDB.tags) end else - if not InCombatLockdown() then - self:Size(db.width,db.height) + if not InCombatLockdown() then + local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db) + self:Size(UNIT_WIDTH, UNIT_HEIGHT) end MOD:RefreshUnitLayout(self, key) MOD:UpdateAuraWatch(self, key) @@ -1649,17 +1654,19 @@ local UpdateTankSubUnit = function(self, key, db) end self.originalParent.childList[self] = true; if not InCombatLockdown()then - if targets.enable then + if targets.enable then + local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(targets) self:SetParent(self.originalParent) - self:Size(targets.width, targets.height) + self:Size(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() SuperVillain:ReversePoint(self, targets.anchorPoint, self.originalParent, targets.xOffset, targets.yOffset) else self:SetParent(SuperVillain.Cloaked) end end - elseif not InCombatLockdown()then - self:Size(db.width, db.height) + elseif not InCombatLockdown() then + local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db) + self:Size(UNIT_WIDTH, UNIT_HEIGHT) end MOD:RefreshUnitLayout(self, key) do @@ -1746,17 +1753,19 @@ local UpdateAssistSubUnit = function(self, key, db) end self.originalParent.childList[self] = true; if not InCombatLockdown()then - if targets.enable then + if targets.enable then + local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(targets) self:SetParent(self.originalParent) - self:Size(targets.width, targets.height) + self:Size(UNIT_WIDTH, UNIT_HEIGHT) self:ClearAllPoints() SuperVillain:ReversePoint(self, targets.anchorPoint, self.originalParent, targets.xOffset, targets.yOffset) else self:SetParent(SuperVillain.Cloaked) end end - elseif not InCombatLockdown()then - self:Size(db.width, db.height) + elseif not InCombatLockdown() then + local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db) + self:Size(UNIT_WIDTH, UNIT_HEIGHT) end MOD:RefreshUnitLayout(self, key) @@ -1854,9 +1863,10 @@ end function MOD:ConstructGroupHeader(parentFrame, filter, styleName, headerName, template1, groupName, template2) local db = self.db[groupName] + local UNIT_WIDTH, UNIT_HEIGHT = self:GetActiveSize(db) oUF_SuperVillain:SetActiveStyle(styleName) local groupHeader = oUF_SuperVillain:SpawnHeader(headerName, template2, nil, - "oUF-initialConfigFunction", ("self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)"):format(db.width, db.height), + "oUF-initialConfigFunction", ("self:SetWidth(%d); self:SetHeight(%d); self:SetFrameLevel(5)"):format(UNIT_WIDTH, UNIT_HEIGHT), "groupFilter", filter, "showParty", true, "showRaid", true, @@ -1881,6 +1891,7 @@ GROUP HEADER METHODS local GroupSetConfigEnvironment = function(self) local key = self.___groupkey local db = MOD.db[key] + local UNIT_WIDTH, UNIT_HEIGHT = MOD:GetActiveSize(db) local anchorPoint; local sorting = db.showBy local pointMap = sortMapping[sorting] @@ -1943,13 +1954,13 @@ local GroupSetConfigEnvironment = function(self) if frame then frame:SetPoint(anchorPoint, self, anchorPoint, 0, heightCalc * vertical) end - heightCalc = heightCalc + db.height + db.wrapYOffset; + heightCalc = heightCalc + UNIT_HEIGHT + db.wrapYOffset; yCalc = yCalc + 1 else if frame then frame:SetPoint(anchorPoint, self, anchorPoint, widthCalc * horizontal, 0) end - widthCalc = widthCalc + db.width + db.wrapXOffset; + widthCalc = widthCalc + UNIT_WIDTH + db.wrapXOffset; xCalc = xCalc + 1 end else @@ -1958,27 +1969,27 @@ local GroupSetConfigEnvironment = function(self) if frame then frame:SetPoint(anchorPoint, self, anchorPoint, widthCalc * horizontal, 0) end - widthCalc = widthCalc + (db.width + db.wrapXOffset) * 5; + widthCalc = widthCalc + (UNIT_WIDTH + db.wrapXOffset) * 5; xCalc = xCalc + 1 elseif frame then - frame:SetPoint(anchorPoint, self, anchorPoint, (((db.width + db.wrapXOffset) * 5) * ((i - 1) % db.gRowCol)) * horizontal, ((db.height + db.wrapYOffset) * (yCalc - 1)) * vertical) + frame:SetPoint(anchorPoint, self, anchorPoint, (((UNIT_WIDTH + db.wrapXOffset) * 5) * ((i - 1) % db.gRowCol)) * horizontal, ((UNIT_HEIGHT + db.wrapYOffset) * (yCalc - 1)) * vertical) end else if xCalc == 1 then if frame then frame:SetPoint(anchorPoint, self, anchorPoint, 0, heightCalc * vertical) end - heightCalc = heightCalc + (db.height + db.wrapYOffset) * 5; + heightCalc = heightCalc + (UNIT_HEIGHT + db.wrapYOffset) * 5; yCalc = yCalc + 1 elseif frame then - frame:SetPoint(anchorPoint, self, anchorPoint, ((db.width + db.wrapXOffset) * (xCalc - 1)) * horizontal, (((db.height + db.wrapYOffset) * 5) * ((i - 1) % db.gRowCol)) * vertical) + frame:SetPoint(anchorPoint, self, anchorPoint, ((UNIT_WIDTH + db.wrapXOffset) * (xCalc - 1)) * horizontal, (((UNIT_HEIGHT + db.wrapYOffset) * 5) * ((i - 1) % db.gRowCol)) * vertical) end end end if heightCalc == 0 then - heightCalc = heightCalc + (db.height + db.wrapYOffset) * 5 + heightCalc = heightCalc + (UNIT_HEIGHT + db.wrapYOffset) * 5 elseif widthCalc == 0 then - widthCalc = widthCalc + (db.width + db.wrapXOffset) * 5 + widthCalc = widthCalc + (UNIT_WIDTH + db.wrapXOffset) * 5 end end self:SetSize(widthCalc - db.wrapXOffset, heightCalc - db.wrapYOffset) diff --git a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua index e3a88bc..5f744ed 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/druid.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/druid.lua @@ -49,6 +49,8 @@ assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") DRUID ALT MANA ########################################################## ]]-- +local TRACKER_FONT = [[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]] + local UpdateAltPower = function(self, unit, arg1, arg2) local value = self:GetParent().InfoPanel.Power; if(arg1 ~= arg2) then @@ -140,6 +142,7 @@ local Reposition = function(self) bar.Text:SetPoint("TOPLEFT", bar, "TOPLEFT", 10, 0) bar.Text:SetPoint("BOTTOMRIGHT", bar, "BOTTOMRIGHT", -10, 0) + bar.Text:SetFont(TRACKER_FONT, scaled, 'OUTLINE') end --[[ ########################################################## @@ -262,7 +265,7 @@ function MOD:CreateClassBar(playerFrame) points.Text = points:CreateFontString(nil,'OVERLAY') points.Text:SetAllPoints(points) - points.Text:SetFont([[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]], 26, 'OUTLINE') + points.Text:SetFont(TRACKER_FONT, 26, 'OUTLINE') points.Text:SetTextColor(1,1,1) playerFrame.HyperCombo = hyper; diff --git a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua index 75039c4..4fc1fc1 100644 --- a/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua +++ b/Interface/AddOns/SVUI/packages/unit/resources/rogue.lua @@ -49,6 +49,7 @@ assert(oUF_SuperVillain, "SVUI was unable to locate oUF.") LOCALS ########################################################## ]]-- +local TRACKER_FONT = [[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]] local ICON_FILE = [[Interface\Addons\SVUI\assets\artwork\Unitframe\Class\ROGUE]]; local ICON_COORDS = { {0,0.5,0,0.5}, @@ -193,7 +194,7 @@ local RepositionTracker = function(self) bar.Tracking:SetPoint("TOPLEFT", bar, "TOPLEFT", 0, 0) bar.Tracking.Text:ClearAllPoints() bar.Tracking.Text:SetAllPoints(bar.Tracking) - bar.Tracking.Text:SetFontTemplate([[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]], size, 'OUTLINE') + bar.Tracking.Text:SetFont(TRACKER_FONT, size, 'OUTLINE') end if(bar.Anticipation) then bar.Anticipation:ClearAllPoints() @@ -202,7 +203,7 @@ local RepositionTracker = function(self) bar.Anticipation:SetPoint("LEFT", bar.Tracking, "RIGHT", -2, 0) bar.Anticipation.Text:ClearAllPoints() bar.Anticipation.Text:SetAllPoints(bar.Anticipation) - bar.Anticipation.Text:SetFontTemplate([[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]], size, 'OUTLINE') + bar.Anticipation.Text:SetFont(TRACKER_FONT, size, 'OUTLINE') end if(bar.Guile) then bar.Guile:ClearAllPoints() @@ -211,7 +212,7 @@ local RepositionTracker = function(self) bar.Guile:SetPoint("LEFT", bar.Anticipation, "RIGHT", -2, 0) bar.Guile.Text:ClearAllPoints() bar.Guile.Text:SetAllPoints(bar.Guile) - bar.Guile.Text:SetFontTemplate([[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]], size, 'OUTLINE') + bar.Guile.Text:SetFont(TRACKER_FONT, size, 'OUTLINE') end end; @@ -225,7 +226,7 @@ function MOD:CreateClassBar(playerFrame) points.Text = points:CreateFontString(nil,'OVERLAY') points.Text:SetAllPoints(points) - points.Text:SetFontTemplate([[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]],30,'OUTLINE') + points.Text:SetFont(TRACKER_FONT,30,'OUTLINE') points.Text:SetTextColor(1,1,1) bar.Tracking = points; @@ -236,7 +237,7 @@ function MOD:CreateClassBar(playerFrame) anticipation.Text = anticipation:CreateFontString(nil,'OVERLAY') anticipation.Text:SetAllPoints(anticipation) - anticipation.Text:SetFontTemplate([[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]],30,'OUTLINE') + anticipation.Text:SetFont(TRACKER_FONT,30,'OUTLINE') anticipation.Text:SetTextColor(1,1,1) bar.Anticipation = anticipation; @@ -247,7 +248,7 @@ function MOD:CreateClassBar(playerFrame) guile.Text = guile:CreateFontString(nil,'OVERLAY') guile.Text:SetAllPoints(guile) - guile.Text:SetFontTemplate([[Interface\AddOns\SVUI\assets\fonts\Combo.ttf]],30,'OUTLINE') + guile.Text:SetFont(TRACKER_FONT,30,'OUTLINE') guile.Text:SetTextColor(1,1,1) bar.Guile = guile; diff --git a/Interface/AddOns/SVUI/scripts/questwatch.lua b/Interface/AddOns/SVUI/scripts/questwatch.lua index a998db5..e62a98c 100644 --- a/Interface/AddOns/SVUI/scripts/questwatch.lua +++ b/Interface/AddOns/SVUI/scripts/questwatch.lua @@ -58,7 +58,7 @@ local QuestDocklet = CreateFrame("Frame", "SVQuestFrameEventListener", UIParent) LOCAL VARS ########################################################## ]]-- -local ObjectiveTrackerFrame = _G["ObjectiveTrackerFrame"]; +local WatchFrame = _G["WatchFrame"]; local SuperDockWindowRight; local currentQuestItems = {}; local QuestDockletFrame, QuestDockletFrameTitle, QuestDockletFrameList, QuestDockletFrameSlider; @@ -68,16 +68,241 @@ local ICON_FILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-QUESTS]] PRE VARS/FUNCTIONS ########################################################## ]]-- +local IsTrackingCompletedQuests = function() + return band(WATCHFRAME_FILTER_TYPE, WATCHFRAME_FILTER_COMPLETED_QUESTS) == WATCHFRAME_FILTER_COMPLETED_QUESTS or false; +end; +local IsTrackingRemoteQuests = function() + return ( band(WATCHFRAME_FILTER_TYPE, WATCHFRAME_FILTER_REMOTE_ZONES) == WATCHFRAME_FILTER_REMOTE_ZONES ) or false; +end; +local IsTrackingAchievements = function() + return ( band(WATCHFRAME_FILTER_TYPE, WATCHFRAME_FILTER_ACHIEVEMENTS) == WATCHFRAME_FILTER_ACHIEVEMENTS ) or false; +end; +local IsUsingFilters = function() + if ( WATCHFRAME_FILTER_COMPLETED_QUESTS == nil ) then return false; end + return true; +end; +--[[ +QUEST ITEM MACRO ---[[NEEDS TESTING]]-- +/target [@mouseover] +/click WatchFrameItem1 +/click WatchFrameItem2 +/click WatchFrameItem3 +/click WatchFrameItem4 +/click WatchFrameItem5 +/click WatchFrameItem6 +]]-- + +-- poiWatchFrameLines1_1 +-- poiWatchFrameLines2_1 +-- poiWatchFrameLines3_1 +-- poiButton:SetPoint("TOPRIGHT", questTitle, "TOPLEFT", 0, 5) + +local function QWQuestItems() + for i=1, WATCHFRAME_NUM_ITEMS do + local button = _G["WatchFrameItem"..i] + if button then + local point, relativeTo, relativePoint, xOffset, yOffset = button:GetPoint(1) + button:SetFrameStrata("LOW") + button:SetPoint("TOPRIGHT", relativeTo, "TOPLEFT", -31, -2); + if not button.styled then + button:SetSlotTemplate() + button:SetBackdropColor(0,0,0,0) + _G["WatchFrameItem"..i.."NormalTexture"]:SetAlpha(0) + _G["WatchFrameItem"..i.."IconTexture"]:FillInner() + _G["WatchFrameItem"..i.."IconTexture"]:SetTexCoord(0.1,0.9,0.1,0.9) + SuperVillain:AddCD(_G["WatchFrameItem"..i.."Cooldown"]) + button.styled = true + end + end + end +end; +local function QWCheckTimers() + local lstTimers = GetQuestTimers(); + local numTimers = 0; + local filterOK = false; + if ( lstTimers ) then + filterOK = true; + numTimers = 1; + else + numTimers = 0; + end + return filterOK,numTimers; +end; + +local function QWCheckQuests() + local numQuestWatches = GetNumQuestWatches(); + local playerMoney = GetMoney(); + local numQuests = QuestMapUpdateAllQuests(); + local currentMapZone = GetCurrentMapZone(); + local questIndex = 0; + local numCurrentMapQuests = 0; + local numLocalQuests = 0; + local numToShow = 0; + local filterOK = false; + local usingFilters = IsUsingFilters(); + if ( not usingFilters ) then + filterOK = true; + return filterOK, numQuestWatches or 0; + elseif ( numQuestWatches == 0 ) then + return filterOK, numQuestWatches or 0; + end + local trackingCompleted = IsTrackingCompletedQuests(); + local trackingRemote = IsTrackingRemoteQuests(); + local localQuests = {}; + local currentMapQuests = {}; + twipe(currentQuestItems); + localQuests["zone"] = currentMapZone; + for i = 1, numQuests do + local questId = QuestPOIGetQuestIDByVisibleIndex(i); + currentMapQuests[questId] = i; + numCurrentMapQuests = numCurrentMapQuests + 1; + end + for id in pairs(currentMapQuests) do + localQuests[id] = true; + numLocalQuests = numLocalQuests + 1; + end + for i = 1, numQuestWatches do + questIndex = GetQuestIndexForWatch(i); + if ( questIndex ) then + local questTitle, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily, questID = GetQuestLogTitle(questIndex); + local requiredMoney = GetQuestLogRequiredMoney(questIndex); + local numObjectives = GetNumQuestLeaderBoards(questIndex); + local itemLink,itemIcon,itemCharges = GetQuestLogSpecialItemInfo(questIndex); + if ( isComplete and isComplete < 0 ) then + isComplete = false; + elseif ( numObjectives == 0 and playerMoney >= requiredMoney ) then + isComplete = true; + end + if ( itemLink ) then + local _,itemID,_,_,_,_,_,_,_,_,_,_ = split(":", itemLink) + local itemName = GetItemInfo(itemLink) + currentQuestItems[itemName] = { ['id'] = itemID, ['icon'] = itemIcon, ['charge'] = itemCharges, ['macro'] = "/use item:"..itemID }; + end + local isLocal = localQuests[questID]; + filterOK = true; + if ( isComplete and not trackingCompleted ) then + filterOK = false; + elseif ( not isLocal and not trackingRemote ) then + filterOK = false; + end + if ( filterOK ) then + numToShow = numToShow + 1; + end + end + end + filterOK = false; + if ( numToShow > 0 ) then + filterOK = true; + end + return filterOK, numQuestWatches or 0; +end; + +local function QWSetAllLevels() + local i = 1 + local scrollOffset = HybridScrollFrame_GetOffset(QuestLogScrollFrame) + for i,button in pairs(QuestLogScrollFrame.buttons) do + local questIndex = i + scrollOffset + local questTitle, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily, questID = GetQuestLogTitle(questIndex) + if ( not isHeader ) and questTitle then + local newTitle = string.format("[%d] %s", level or "?", questTitle) + button:SetText(newTitle) + QuestLogTitleButton_Resize(button) + end + i = i + 1 + end +end + +local function QWCheckAchievements() + local numAchievementWatches = GetNumTrackedAchievements(); + local lstAchievementWatches = GetTrackedAchievements(); + local filterOK = false; + local usingFilters = IsUsingFilters(); + if ( not usingFilters ) then + filterOK = true; + return filterOK, numAchievementWatches or 0; + end + local trackingAchievements = IsTrackingAchievements(); + filterOK = false; + if ( numAchievementWatches > 0 and trackingAchievements ) then + filterOK = true; + end + return filterOK, numAchievementWatches or 0; +end; + +local function QWSetWatchFrameTitle() + local _, numQuests, numAchievements, numTimers + _, numQuests = QWCheckQuests() + _, numAchievements = QWCheckAchievements() + _, numTimers = QWCheckTimers() + local numTracked = numQuests + numAchievements + numTimers; + if WatchFrameTitle then + WatchFrameTitle:SetText(OBJECTIVES_TRACKER_LABEL.." ("..numTracked ..")") + end; +end; + +local function QWCheckAutoShow(self) + if not self then return end; + if self:IsShown() then + if WatchFrameHeader then + WatchFrameHeader:Show() + end; + WatchFrameTitle:Show() + WatchFrameCollapseExpandButton:Show() + WatchFrameLines:Show() + end +end; + +local function SetQuestDockEvents() + WatchFrame:HookScript("OnEvent", QWQuestItems) + WatchFrame.ScrollListUpdate = function() + QWSetWatchFrameTitle(); + WATCHFRAME_MAXLINEWIDTH = WatchFrame:GetWidth(); + if QuestDockletFrameList then + WATCHFRAME_MAXLINEWIDTH = QuestDockletFrameList:GetWidth() - 62 + end; + end; + WatchFrame.OnUpdate = function() + WATCHFRAME_MAXLINEWIDTH = WatchFrame:GetWidth() + if QuestDockletFrameList then + WATCHFRAME_MAXLINEWIDTH = QuestDockletFrameList:GetWidth() - 62 + end; + QWQuestItems(); + --QWSetAllLevels() + WatchFrame.ScrollListUpdate() + end; + WatchFrame.OnShow = function() + Collapsed = (WatchFrame.collapsed or false); + if WatchFrameHeader == nil then + WatchFrame.userCollapsed = true + end; + UserCollapsed = (WatchFrame.userCollapsed or false); + if Collapsed then + WatchFrame_Collapse(WatchFrame) + WatchFrame.userCollapsed=UserCollapsed + else + WatchFrame_Expand(WatchFrame) + end; + WatchFrame.OnUpdate(); + end; + WatchFrame.OnShow() + + hooksecurefunc("QuestLog_Update", WatchFrame.OnUpdate) +end; --[[ ########################################################## CORE FUNCTIONS ########################################################## ]]-- local QuestDocklet_OnEvent = function(self, event) - if event == "QUEST_AUTOCOMPLETE" then + if event == "CVAR_UPDATE" then + if action == "WATCH_FRAME_WIDTH_TEXT"then + if WatchFrame then + WatchFrame.OnUpdate() + end + end + elseif event == "QUEST_AUTOCOMPLETE" then if SuperDockWindowRight.FrameName and _G[SuperDockWindowRight.FrameName] and _G[SuperDockWindowRight.FrameName]:IsShown() then return end; local button = _G["QuestDockletFrame_ToolBarButton"] if not QuestDockletFrame:IsShown() then @@ -97,22 +322,21 @@ end local function CreateQuestDocklet() SuperDockWindowRight = _G["SuperDockWindowRight"] - if(not ObjectiveTrackerFrame) then return end if(not SuperVillain.db.system.questWatch) then local frame = CreateFrame("Frame", "SVUI_QuestFrame", UIParent); - frame:SetSize(200, ObjectiveTrackerFrame:GetHeight()); + frame:SetSize(200, WatchFrame:GetHeight()); frame:SetPoint("RIGHT", UIParent, "RIGHT", -100, 0); - ObjectiveTrackerFrame:ClearAllPoints() - ObjectiveTrackerFrame:SetClampedToScreen(false) - ObjectiveTrackerFrame:SetParent(SVUI_QuestFrame) - ObjectiveTrackerFrame:SetAllPoints(SVUI_QuestFrame) - ObjectiveTrackerFrame:SetFrameLevel(SVUI_QuestFrame:GetFrameLevel() + 1) - ObjectiveTrackerFrame.ClearAllPoints = SuperVillain.fubar; - ObjectiveTrackerFrame.SetPoint = SuperVillain.fubar; - ObjectiveTrackerFrame.SetAllPoints = SuperVillain.fubar; - ObjectiveTrackerFrameLines.ClearAllPoints = SuperVillain.fubar; - ObjectiveTrackerFrameLines.SetPoint = SuperVillain.fubar; - ObjectiveTrackerFrameLines.SetAllPoints = SuperVillain.fubar; + WatchFrame:ClearAllPoints() + WatchFrame:SetClampedToScreen(false) + WatchFrame:SetParent(SVUI_QuestFrame) + WatchFrame:SetAllPoints(SVUI_QuestFrame) + WatchFrame:SetFrameLevel(SVUI_QuestFrame:GetFrameLevel() + 1) + WatchFrame.ClearAllPoints = SuperVillain.fubar; + WatchFrame.SetPoint = SuperVillain.fubar; + WatchFrame.SetAllPoints = SuperVillain.fubar; + WatchFrameLines.ClearAllPoints = SuperVillain.fubar; + WatchFrameLines.SetPoint = SuperVillain.fubar; + WatchFrameLines.SetAllPoints = SuperVillain.fubar; SuperVillain:SetSVMovable(frame, "Quest Watch"); else local bgTex = [[Interface\BUTTONS\WHITE8X8]] @@ -157,14 +381,62 @@ local function CreateQuestDocklet() QuestDockletFrameTitle:Point("TOPLEFT", QuestDockletFrameList, "BOTTOMLEFT", 0, 0); QuestDockletFrameTitle:Point("TOPRIGHT", QuestDockletFrameList, "BOTTOMRIGHT", 0, 0); QuestDockletFrameTitle:SetHeight(18) + + WatchFrame:ClearAllPoints() + WatchFrame:SetClampedToScreen(false) + WatchFrame:SetParent(QuestDockletFrameList) + WatchFrame:SetHeight(500) + WatchFrame:SetPoint("TOPRIGHT", QuestDockletFrameList, "TOPRIGHT", -31, 0) + WatchFrame:SetFrameLevel(QuestDockletFrameList:GetFrameLevel() + 1) + if QuestDockletFrameList then + WATCHFRAME_MAXLINEWIDTH = (QuestDockletFrameList:GetWidth() - 100); + WATCHFRAME_EXPANDEDWIDTH = (QuestDockletFrameList:GetWidth() - 100); + else + WATCHFRAME_MAXLINEWIDTH = (WatchFrame:GetWidth() - 100); + WATCHFRAME_EXPANDEDWIDTH = (WatchFrame:GetWidth() - 100); + end; + WatchFrame:SetWidth(WATCHFRAME_MAXLINEWIDTH) - QuestDockletFrameList:SetScrollChild(ObjectiveTrackerFrame) + WatchFrameHeader:SetParent(QuestDockletFrame) + WatchFrameHeader:ClearAllPoints() + WatchFrameHeader:FillInner(QuestDockletFrameTitle) + WatchFrameHeader:SetFrameLevel(2) + + WatchFrameTitle:SetParent(QuestDockletFrame) + WatchFrameTitle:ClearAllPoints() + WatchFrameTitle:FillInner(QuestDockletFrameTitle) + + WatchFrameCollapseExpandButton:SetParent(QuestDockletFrame) + WatchFrameCollapseExpandButton:ClearAllPoints() + WatchFrameCollapseExpandButton:SetPoint("TOPRIGHT", UIParent, "BOTTOMRIGHT", 0, 0) + WatchFrameCollapseExpandButton:Hide() + + QuestDockletFrameList:SetScrollChild(WatchFrame) QuestDockletFrameSlider:SetScript("OnValueChanged", function(self, argValue) QuestDockletFrameList:SetVerticalScroll(argValue) end) QuestDockletFrameSlider:ClearAllPoints() QuestDockletFrameSlider:SetPoint("TOPRIGHT", QuestDockletFrame, "TOPRIGHT", -3, 0) + WatchFrameLines:Formula409(true) + WatchFrameLines:SetPoint("TOPLEFT", WatchFrame, "TOPLEFT", 87, 0) + WatchFrameLines:SetPoint("BOTTOMLEFT", WatchFrame, "BOTTOMLEFT", 87, 0) + WatchFrameLines:SetWidth(WATCHFRAME_MAXLINEWIDTH - 100) + --[[Lets murder some internals to prevent overriding]]-- + WatchFrame.ClearAllPoints = SuperVillain.fubar; + WatchFrame.SetPoint = SuperVillain.fubar; + WatchFrame.SetAllPoints = SuperVillain.fubar; + WatchFrameLines.ClearAllPoints = SuperVillain.fubar; + WatchFrameLines.SetPoint = SuperVillain.fubar; + WatchFrameLines.SetAllPoints = SuperVillain.fubar; + WatchFrameLines.SetWidth = SuperVillain.fubar; + WatchFrameCollapseExpandButton.ClearAllPoints = SuperVillain.fubar; + WatchFrameCollapseExpandButton.SetPoint = SuperVillain.fubar; + WatchFrameCollapseExpandButton.SetAllPoints = SuperVillain.fubar; + + SetQuestDockEvents() + + QuestDocklet:RegisterEvent("CVAR_UPDATE") QuestDocklet:RegisterEvent("QUEST_AUTOCOMPLETE") QuestDocklet:SetScript("OnEvent", QuestDocklet_OnEvent) end diff --git a/Interface/AddOns/SVUI/system/common.lua b/Interface/AddOns/SVUI/system/common.lua index 5521b36..927c4a5 100644 --- a/Interface/AddOns/SVUI/system/common.lua +++ b/Interface/AddOns/SVUI/system/common.lua @@ -908,12 +908,9 @@ local function CreatePanelTemplate(frame, templateName, underlay, noupdate, padd bottomLeft:SetNonBlocking(true) end - local level = frame:GetFrameLevel() - 1 - if(level >= 0) then - frame.Panel:SetFrameLevel(level) - else - frame.Panel:SetFrameLevel(0) - end + local level = frame:GetFrameLevel() + frame:SetFrameLevel(level + 1) + frame.Panel:SetFrameLevel(level) end local function HasCooldown(n) @@ -992,9 +989,63 @@ end TEMPLATE API ########################################################## ]]-- +local function SetBasicPanel(self, topX, topY, bottomX, bottomY, hasShadow) + if(not self or (self and self.Panel)) then return end + + local frame = self + + local currentLevel = self:GetFrameLevel() + if(currentLevel == 0) then + currentLevel = 1 + end + + self.Panel = CreateFrame("Frame", nil, frame) + self.Panel:SetPoint("TOPLEFT", frame, "TOPLEFT", topX, topY) + self.Panel:SetPoint("BOTTOMRIGHT", frame, "BOTTOMRIGHT", bottomX, bottomY) + self.Panel:SetFrameLevel(currentLevel - 1) + if(hasShadow) then + self.Panel: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, + }, + }) + else + self.Panel:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + edgeSize = 1, + insets = + { + left = 1, + right = 1, + top = 1, + bottom = 1, + }, + }) + end + + self.Panel:SetBackdropColor(0,0,0,0.65) + self.Panel:SetBackdropBorderColor(0,0,0) + + NewHook(frame, "SetBackdrop", HookBackdrop) + NewHook(frame, "SetBackdropColor", HookBackdropColor) + NewHook(frame, "SetBackdropBorderColor", HookBackdropBorderColor) +end + local function SetPanelTemplate(self, templateName, noupdate, overridePadding, xOffset, yOffset) if(self.Panel) then return; end - if(not templateName or not _templates[templateName]) then templateName = 'Default' end + if(not templateName or not _templates[templateName]) then return SetBasicPanel(self) end local padding = false if(overridePadding and type(overridePadding) == "number") then @@ -1010,7 +1061,7 @@ end local function SetFixedPanelTemplate(self, templateName, noupdate, overridePadding, xOffset, yOffset) if(self.Panel) then return; end - if(not templateName or not _templates[templateName]) then templateName = 'Default' end + if(not templateName or not _templates[templateName]) then return SetBasicPanel(self) end local padding = false if(overridePadding and type(overridePadding) == "number") then @@ -1317,6 +1368,7 @@ local function AppendMethods(OBJECT) if not OBJECT.FillInner then META.FillInner = FillInner end if not OBJECT.MUNG then META.MUNG = MUNG end if not OBJECT.Formula409 then META.Formula409 = Formula409 end + if not OBJECT.SetBasicPanel then META.SetBasicPanel = SetBasicPanel end if not OBJECT.SetPanelTemplate then META.SetPanelTemplate = SetPanelTemplate end if not OBJECT.SetFixedPanelTemplate then META.SetFixedPanelTemplate = SetFixedPanelTemplate end if not OBJECT.SetPanelColor then META.SetPanelColor = SetPanelColor end diff --git a/Interface/AddOns/SVUI/system/database.lua b/Interface/AddOns/SVUI/system/database.lua index 60bb982..6fc573e 100644 --- a/Interface/AddOns/SVUI/system/database.lua +++ b/Interface/AddOns/SVUI/system/database.lua @@ -41,27 +41,6 @@ local name = UnitName("player") local pkey = ("%s - %s"):format(name, realm) local databaseListener = CreateFrame("Frame", nil) local CONFIGS = SuperVillain.Configs - -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 SuperVillain:Debugger(msg) - if(not self.DebuggingMode) then return end - local outbound = ("|cffFF2F00%s:|r |cff992FFF%s:|r"):format("SVUI", "DEBUG") - SendAddonMessage(msg, outbound) -end --[[ ########################################################## DEFINE SHARED MEDIA @@ -105,6 +84,7 @@ SuperVillain.Shared:Register("font","SVUI Combat Font",[[Interface\AddOns\SVUI\a SuperVillain.Shared:Register("font","SVUI Action Font",[[Interface\AddOns\SVUI\assets\fonts\Action.ttf]]) SuperVillain.Shared:Register("font","SVUI Name Font",[[Interface\AddOns\SVUI\assets\fonts\Names.ttf]]) SuperVillain.Shared:Register("font","SVUI Alert Font",[[Interface\AddOns\SVUI\assets\fonts\Alert.ttf]]) +SuperVillain.Shared:Register("font","SVUI Pixel Font",[[Interface\AddOns\SVUI\assets\fonts\Pixel.ttf]],SuperVillain.Shared.LOCALE_BIT_ruRU+SuperVillain.Shared.LOCALE_BIT_western) SuperVillain.Shared:Register("font","Roboto",[[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]],SuperVillain.Shared.LOCALE_BIT_ruRU+SuperVillain.Shared.LOCALE_BIT_western) --[[ ########################################################## @@ -146,6 +126,7 @@ do ["names"] = Shared:Fetch("font", "SVUI Name Font"), ["alert"] = Shared:Fetch("font", "SVUI Alert Font"), ["numbers"] = Shared:Fetch("font", "SVUI Number Font"), + ["pixel"] = Shared:Fetch("font", "SVUI Pixel Font"), ["roboto"] = Shared:Fetch("font", "Roboto") } @@ -287,7 +268,7 @@ CONFIGS["media"] = { ["absorbs"] = {1, 1, 0, 0.25} }, ["spellcolor"] = { - [SpellName(2825)] = {0.98, 0.57, 0.11}, --Bloodlust + [SpellName(2825)] = {0.98, 0.57, 0.11}, --Bloodlust [SpellName(32182)] = {0.98, 0.57, 0.11}, --Heroism [SpellName(80353)] = {0.98, 0.57, 0.11}, --Time Warp [SpellName(90355)] = {0.98, 0.57, 0.11}, --Ancient Hysteria diff --git a/Interface/AddOns/SVUI/system/installer.lua b/Interface/AddOns/SVUI/system/installer.lua index cc909bc..6ca8edd 100644 --- a/Interface/AddOns/SVUI/system/installer.lua +++ b/Interface/AddOns/SVUI/system/installer.lua @@ -747,6 +747,7 @@ local function SetPage(newPage) setupFrame.Desc1:SetText(L["You can now choose what group layout you prefer."]) setupFrame.Desc2:SetText(L["This will adjust various settings on group units, attempting to make certain roles more usable"]) setupFrame.Desc3:SetText(L["CHOOSE_OR_DIE"]) + SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() SuperVillain.db.LAYOUT.groupstyle = "default"; @@ -756,6 +757,7 @@ local function SetPage(newPage) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["frames schmames, lets kill some stuff!"]) end) SVUI_InstallOption1Button:SetText(L["Standard"]) + SVUI_InstallOption2Button:Show() SVUI_InstallOption2Button:SetScript("OnClick", function() SuperVillain.db.LAYOUT.groupstyle = nil; @@ -765,6 +767,7 @@ local function SetPage(newPage) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["Hey, even a super villain gets his ass kicked once in awhile. We need the likes of you!"]) end) SVUI_InstallOption2Button:SetText(L["Healer"]) + SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() SuperVillain.db.LAYOUT.groupstyle = nil; @@ -774,6 +777,16 @@ local function SetPage(newPage) SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["I will move and squeeze group frames out of your way so you have more room for BOOM!"]) end) SVUI_InstallOption3Button:SetText(L["DPS"]) + + SVUI_InstallOption4Button:Show() + SVUI_InstallOption4Button:SetScript("OnClick", function() + SuperVillain.db.LAYOUT.groupstyle = nil; + SuperVillain:SetGroupframeLayout("grid") + SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFCubed|r"]) + SVUI_SetupHolder.Desc2:SetText(L["You are cold and calculated, your frames should reflect as much."]..CONTINUED) + SVUI_SetupHolder.Desc3:SetText(CONTINUED..L["I'm gonna make these frames so precise that you can cut your finger on them!"]) + end) + SVUI_InstallOption4Button:SetText(L["Grid"]) elseif newPage == 7 then setupFrame.SubTitle:SetText(ACTIONBAR_LABEL.." "..SETTINGS) @@ -783,7 +796,7 @@ local function SetPage(newPage) SVUI_InstallOption1Button:Show() SVUI_InstallOption1Button:SetScript("OnClick", function() SuperVillain.db.LAYOUT.barstyle = nil; - SuperVillain:SetupBarLayout("onesmall") + SuperVillain:SetupBarLayout("default") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFLean And Clean|r"]) SVUI_SetupHolder.Desc2:SetText(L["Lets keep it slim and deadly, not unlike a ninja sword."]) SVUI_SetupHolder.Desc3:SetText(L["You dont ever even look at your bar hardly, so pick this one!"]) @@ -801,7 +814,7 @@ local function SetPage(newPage) SVUI_InstallOption3Button:Show() SVUI_InstallOption3Button:SetScript("OnClick", function() SuperVillain.db.LAYOUT.barstyle = nil; - SuperVillain:SetupBarLayout("default") + SuperVillain:SetupBarLayout("onebig") SVUI_SetupHolder.Desc1:SetText(L["|cff00FFFFWhat Big Buttons You Have|r"]) SVUI_SetupHolder.Desc2:SetText(L["The better to PEW-PEW you with my dear!"]) SVUI_SetupHolder.Desc3:SetText(L["When you have little time for mouse accuracy, choose this set!"]) diff --git a/Interface/AddOns/SVUI/system/presets.lua b/Interface/AddOns/SVUI/system/presets.lua index e7c4380..ab30e35 100644 --- a/Interface/AddOns/SVUI/system/presets.lua +++ b/Interface/AddOns/SVUI/system/presets.lua @@ -355,7 +355,7 @@ local presets = { ["link"] = "SVBar", ["default"] = { ["Bar1"] = { - buttonsize = 40 + buttonsize = 32 }, ["Bar2"] = { enable = false @@ -364,18 +364,18 @@ local presets = { buttons = 6, buttonspacing = 2, buttonsPerRow = 6, - buttonsize = 40 + buttonsize = 32 }, ["Bar5"] = { buttons = 6, buttonspacing = 2, buttonsPerRow = 6, - buttonsize = 40 + buttonsize = 32 } }, - ["onesmall"] = { + ["onebig"] = { ["Bar1"] = { - buttonsize = 32 + buttonsize = 40 }, ["Bar2"] = { enable = false @@ -384,13 +384,13 @@ local presets = { buttons = 6, buttonspacing = 2, buttonsPerRow = 6, - buttonsize = 32 + buttonsize = 40 }, ["Bar5"] = { buttons = 6, buttonspacing = 2, buttonsPerRow = 6, - buttonsize = 32 + buttonsize = 40 } }, ["twosmall"] = { @@ -493,7 +493,6 @@ local presets = { ["party"] = { width = 75, height = 60, - gridMode = false, wrapXOffset = 9, wrapYOffset = 13, portrait = { @@ -508,21 +507,18 @@ local presets = { ["raid10"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, ["raid25"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, ["raid40"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, @@ -582,7 +578,6 @@ local presets = { ["party"] = { width = 75, height = 60, - gridMode = false, wrapXOffset = 9, wrapYOffset = 13, portrait = { @@ -597,21 +592,18 @@ local presets = { ["raid10"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, ["raid25"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, ["raid40"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, @@ -676,7 +668,6 @@ local presets = { ["party"] = { width = 100, height = 35, - gridMode = false, wrapXOffset = 9, wrapYOffset = 13, portrait = { @@ -692,21 +683,18 @@ local presets = { ["raid10"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, ["raid25"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, ["raid40"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, @@ -756,7 +744,6 @@ local presets = { ["party"] = { width = 70, height = 30, - gridMode = false, wrapXOffset = 9, wrapYOffset = 13, portrait = { @@ -769,21 +756,18 @@ local presets = { ["raid10"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, ["raid25"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, ["raid40"] = { width = 50, height = 30, - gridMode = false, wrapXOffset = 6, wrapYOffset = 6, }, @@ -792,10 +776,12 @@ local presets = { ["layouts"] = { ["link"] = "SVUnit", ["default"] = { + ["grid"] = { + ["enable"] = false, + }, ["party"] = { width = 75, height = 60, - gridMode = false, wrapXOffset = 9, wrapYOffset = 13, portrait = { @@ -821,7 +807,6 @@ local presets = { ["raid10"] = { width = 50, height = 30, - gridMode = false, gRowCol = 1, wrapXOffset = 9, wrapYOffset = 13, @@ -846,7 +831,6 @@ local presets = { ["raid25"] = { width = 50, height = 30, - gridMode = false, gRowCol = 1, wrapXOffset = 9, wrapYOffset = 13, @@ -871,7 +855,6 @@ local presets = { ["raid40"] = { width = 50, height = 30, - gridMode = false, gRowCol = 1, wrapXOffset = 9, wrapYOffset = 13, @@ -895,10 +878,12 @@ local presets = { }, }, ["healer"] = { + ["grid"] = { + ["enable"] = false, + }, ["party"] = { width = 75, height = 60, - gridMode = false, wrapXOffset = 9, wrapYOffset = 13, portrait = { @@ -924,7 +909,6 @@ local presets = { ["raid10"] = { width = 50, height = 30, - gridMode = false, ["showBy"] = "DOWN_RIGHT", ["gRowCol"] = 1, ["wrapXOffset"] = 4, @@ -949,7 +933,6 @@ local presets = { ["raid25"] = { width = 50, height = 30, - gridMode = false, ["showBy"] = "DOWN_RIGHT", ["gRowCol"] = 1, ["wrapXOffset"] = 4, @@ -974,7 +957,6 @@ local presets = { ["raid40"] = { width = 50, height = 30, - gridMode = false, ["showBy"] = "DOWN_RIGHT", ["gRowCol"] = 1, ["wrapXOffset"] = 4, @@ -998,10 +980,12 @@ local presets = { }, }, ["dps"] = { + ["grid"] = { + ["enable"] = false, + }, ["party"] = { width = 115, height = 25, - gridMode = false, wrapXOffset = 9, wrapYOffset = 13, ["power"] = { @@ -1101,6 +1085,39 @@ local presets = { ["height"] = 20, }, }, + ["grid"] = { + ["grid"] = { + ["enable"] = true, + ["size"] = 34, + ["shownames"] = true, + }, + ["party"] = { + ["gridAllowed"] = true, + ["wrapXOffset"] = 1, + ["wrapYOffset"] = 1, + }, + ["raid10"] = { + ["gridAllowed"] = true, + ["wrapXOffset"] = 1, + ["wrapYOffset"] = 1, + ["gRowCol"] = 1, + ["showBy"] = "RIGHT_DOWN", + }, + ["raid25"] = { + ["gridAllowed"] = true, + ["wrapXOffset"] = 1, + ["wrapYOffset"] = 1, + ["gRowCol"] = 1, + ["showBy"] = "RIGHT_DOWN", + }, + ["raid40"] = { + ["gridAllowed"] = true, + ["wrapXOffset"] = 1, + ["wrapYOffset"] = 1, + ["gRowCol"] = 1, + ["showBy"] = "RIGHT_DOWN", + }, + }, } }; diff --git a/Interface/AddOns/SVUI/system/system.lua b/Interface/AddOns/SVUI/system/system.lua index 877b253..fafe031 100644 --- a/Interface/AddOns/SVUI/system/system.lua +++ b/Interface/AddOns/SVUI/system/system.lua @@ -58,9 +58,6 @@ LOCALS ########################################################## ]]-- local toonClass = select(2,UnitClass("player")); -local playerName = UnitName("player"); -local playerRealm = GetRealmName(); - local rez = GetCVar("gxResolution"); local gxHeight = tonumber(match(rez,"%d+x(%d+)")); local gxWidth = tonumber(match(rez,"(%d+)x%d+")); @@ -161,31 +158,6 @@ end SYSTEM FUNCTIONS ########################################################## ]]-- -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 SuperVillain:AddonMessage(msg) - local outbound = ("|cffFF2F00%s:|r"):format("SVUI") - SendAddonMessage(msg, outbound) -end - -function SuperVillain:ToonMessage(msg) - local outbound = ("|cff00FF00%s:|r"):format(playerName) - SendAddonMessage(msg, outbound) -end - function SuperVillain:StaticPopup_Show(arg) if arg == "ADDON_ACTION_FORBIDDEN" then StaticPopup_Hide(arg) @@ -226,7 +198,7 @@ function SuperVillain:ToggleConfig() local _,_,_,_,_,state = GetAddOnInfo("SVUI_ConfigOMatic") if state ~= "MISSING" and state ~= "DISABLED" then LoadAddOn("SVUI_ConfigOMatic") - local config_version = GetAddOnMetadata("SVUI_ConfigOMatic","Version") + local config_version = GetAddOnMetadata("SVUI_ConfigOMatic", "Version") if(tonumber(config_version) < 4) then self:StaticPopup_Show("CLIENT_UPDATE_REQUEST") end diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua index d93047b..911f9fa 100644 --- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua +++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.lua @@ -777,7 +777,6 @@ do function PLUGIN:TakeAMessage(caller, inbound) ClearResponses(caller) local data = PhoneLines[caller]; - --SuperVillain:ShowDebug("Answering Service","TakeAMessage",data) if(data) then if(data.InUse) then local data = PhoneLines[caller]; @@ -855,9 +854,9 @@ local PhoneTimeUpdate = function(self, elapsed) ElapsedUpdate = ElapsedUpdate + elapsed if ElapsedUpdate > 4 then local timer = 300; + local ttime = GetTime() ElapsedUpdate = 0 if #ResponseQueue > 0 then - local ttime = GetTime() for x = 1, #ResponseQueue, 1 do if ResponseQueue[x] then if ResponseQueue[x].ETA < ttime then @@ -867,19 +866,13 @@ local PhoneTimeUpdate = function(self, elapsed) end end end - if GetTime() > timer then + if ttime > timer then for x = 1, 5, 1 do local btn = _G["HenchmenPhoneLine"..x]; local caller = btn.Text:GetText() if(PhoneLines[caller]) then - if PhoneLines[caller].TimeStamp < (GetTime() - timer) then - if(not PhoneLines[caller].GiveUp) then - SendChatMessage("You still there?", "WHISPER", nil, caller) - PhoneLines[caller].GiveUp = true - else - PhoneLines[caller].GiveUp = nil; - HangUp(caller) - end + if PhoneLines[caller].TimeStamp < (ttime - timer) then + HangUp(caller) end end end @@ -1000,11 +993,11 @@ local function LoadAnsweringService() HenchmenOperator:Hide() local strMsg if SuperVillain.db.SVAnswer.autoAnswer == true then - strMsg = "The Henchmen Operators Are Screening My Calls.." + strMsg = "The Henchmen Operators Are Screening Your Calls.." else strMsg = "The Henchmen Operators Are Standing By.." end - SuperVillain:ToonMessage(strMsg) + SuperVillain:AddonMessage(strMsg) end CONFIGS["SVAnswer"] = { diff --git a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc index 1fc61ea..749204f 100644 --- a/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc +++ b/Interface/AddOns/SVUI_AnsweringService/SVUI_AnsweringService.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 1.081 +## Version: 5.02 ## Title: |cffFF9900SVUI |r|cffFFEF00Answering Service|r ## Notes: Supervillain UI [|cff9911FFAutomatic Whispers|r]. ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua index 38806d5..1d150b5 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.lua @@ -84,7 +84,7 @@ CORE FUNCTIONS ########################################################## ]]-- local EnemyCache, AlertedCache = {},{} -local AoWLogs = CreateFrame("Frame", "SVUI_AoWLogs", UIParent) + local playerGUID = UnitGUID('player') local playerFaction = UnitFactionGroup("player") local classColor = RAID_CLASS_COLORS @@ -93,12 +93,17 @@ local classR, classG, classB = classColors.r, classColors.g, classColors.b local classA = 0.35 local fallbackColor = {r=1,g=1,b=1} local ACTIVE_ZONE = "" +--[[ ICONS ]]-- +local INFO_ICON = [[Interface\AddOns\SVUI_ArtOfWar\artwork\PVP-INFO]] +local UTILITY_ICON = [[Interface\AddOns\SVUI_ArtOfWar\artwork\PVP-UTILITIES]] +local RADIO_ICON = [[Interface\AddOns\SVUI_ArtOfWar\artwork\PVP-RADIO]] +local SCANNER_ICON = [[Interface\AddOns\SVUI_ArtOfWar\artwork\PVP-SCANNER]] local ICON_FILE = [[Interface\AddOns\SVUI_ArtOfWar\artwork\DOCK-PVP]] local PVP_SAFE = [[Interface\AddOns\SVUI_ArtOfWar\artwork\PVP-SAFE]] local PVP_HELP = [[Interface\AddOns\SVUI_ArtOfWar\artwork\PVP-INCOMING]] -local SCAN_ICON = [[Interface\Addons\SVUI_ArtOfWar\artwork\DOCK-SCAN]] -local SCAN_ANIM = [[Interface\Addons\SVUI_ArtOfWar\artwork\SCAN-ANIMATION]] local PVP_LOST = [[Interface\WorldMap\Skull_64Red]] +local linkString = "|Hplayer:%s:1|h%s|h" +--[[ BG MAP DATA ]]-- local PVP_NODES = { [461] = { --Arathi Basin (5) "Stables", "Lumber", "Blacksmith", "Mine", "Farm" @@ -184,39 +189,37 @@ local function AddEnemyScan(guid, timestamp) end local function SaveEnemyScan(guid, timestamp) - local e = EnemyCache[guid] - if(not e) then e = AddEnemyScan(guid, timestamp) end + local enemy = EnemyCache[guid] + if(not enemy) then enemy = AddEnemyScan(guid, timestamp) end SVAOW_Cache[guid] = { - ["name"] = e.name, - ["realm"] = e.realm, - ["class"] = e.class, - ["race"] = e.race, - ["sex"] = e.sex, - ["colors"] = e.colors, - ["time"] = e.timestamp + ["name"] = enemy.name, + ["realm"] = enemy.realm, + ["class"] = enemy.class, + ["race"] = enemy.race, + ["sex"] = enemy.sex, + ["colors"] = enemy.colors, + ["time"] = enemy.timestamp } - local msg = ("Killed By: %s"):format(e.name); - HeadsUpAlarm(msg, CombatText_StandardScroll, e.colors.r, e.colors.g, e.colors.b, "sticky"); + local msg = ("Killed By: %s"):format(enemy.name); + HeadsUpAlarm(msg, CombatText_StandardScroll, enemy.colors.r, enemy.colors.g, enemy.colors.b, "sticky"); PLUGIN:UpdateSummary() end local function KilledEnemyHandler(guid) - local e = SVAOW_Cache[guid] - if(e) then - HeadsUpAlarm(("Killed Mortal Enemy: %s"):format(e.name), CombatText_StandardScroll, 0.2, 1, 0.1, "sticky"); + local enemy = SVAOW_Cache[guid] + if(enemy) then + HeadsUpAlarm(("Killed Mortal Enemy: %s"):format(enemy.name), CombatText_StandardScroll, 0.2, 1, 0.1, "sticky"); end - e = EnemyCache[guid] - if(e) then - HeadsUpAlarm(("Killed Enemy: %s"):format(e.name), CombatText_StandardScroll, 0.1, 0.8, 0); + enemy = EnemyCache[guid] + if(enemy) then + HeadsUpAlarm(("Killed Enemy: %s"):format(enemy.name), CombatText_StandardScroll, 0.1, 0.8, 0); end end local function ClearCacheScans() wipe(EnemyCache) wipe(AlertedCache) - if(PLUGIN.LogWindow) then - PLUGIN.LogWindow:Clear() - end + if(PLUGIN.LOG and PLUGIN.LOG.Output) then PLUGIN.LOG.Output:Clear() end end local function ClearSavedScans() @@ -245,7 +248,7 @@ local function StealthAlarm(name) end function PLUGIN:UpdateSummary() - self.SummaryWindow:Clear(); + self.Summary:Clear(); local stored = SVAOW_Cache; local amount = 0 for _,data in pairs(stored) do @@ -253,16 +256,16 @@ function PLUGIN:UpdateSummary() amount = amount + 1; end end - self.SummaryWindow:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8); + self.Summary:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8); end function PLUGIN:ResetLogs() wipe(EnemyCache) - self.TitleWindow:Clear(); - self.SummaryWindow:Clear(); - self.LogWindow:Clear(); - self.TitleWindow:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); - SVUI_AoWLogsClear:Show() + self.Title:Clear(); + self.Summary:Clear(); + self.LOG.Output:Clear(); + self.Title:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); + self.Switch:Show() local stored = SVAOW_Cache; local amount = 0 for _,data in pairs(stored) do @@ -270,17 +273,36 @@ function PLUGIN:ResetLogs() amount = amount + 1; end end - self.SummaryWindow:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8); + self.Summary:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8) 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() +function PLUGIN:PopulateKOS() + self.Title:Clear(); + self.Summary:Clear(); + self.LOG.Output:Clear(); + self.Title:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); + self.Switch:Show() + local stored = SVAOW_Cache; + local amount = 0 + for _,data in pairs(stored) do + if type(data) == "table" and data.name and data.class and data.race then + amount = amount + 1; + local nameLink = linkString:format(data.name, data.name) + local hex = ("%s - %s %s"):format(nameLink, data.race, data.class) + self.LOG.Output:AddMessage(hex, data.colors.r, data.colors.g, data.colors.b); + end + end + self.Summary:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8) +end + +function PLUGIN:PopulateScans() + self.COMM.Unavailable:Hide() + self.Title:Clear(); + self.Summary:Clear(); + self.LOG.Output:Clear(); + self.Title:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); + self.Switch:Show() local stored = SVAOW_Cache; local amount = 0 for _,data in pairs(stored) do @@ -288,47 +310,48 @@ function PLUGIN:SwitchToLogs() amount = amount + 1; end end - self.SummaryWindow:AddMessage(("You Have |cffff5500%s|r Mortal Enemies"):format(amount), 0.8, 0.8, 0.8); + self.Summary: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); + local nameLink = linkString:format(data.name, data.name) + local hex = ("%s - %s %s"):format(nameLink, data.race, data.class) + self.LOG.Output: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 +function PLUGIN:PauseScanner() + if(not self.InPVP) then + self.Title:Clear(); + self.Summary:Clear(); + self.LOG.Output:Clear(); + self.Title:AddMessage("Scanning Paused", 1, 0.1, 0); + self.Summary:AddMessage(ACTIVE_ZONE, 1, 0.75, 0); + self.Switch:Hide() + self.LOG.Output:AddMessage(" ", 1, 1, 1); + self.LOG.Output:AddMessage(" ", 1, 1, 1); + self.LOG.Output:AddMessage("The Enenmy Scanner Will Resume", 0.8, 0.8, 0.8); + self.LOG.Output:AddMessage("When You Leave This BattleGround", 0.8, 0.8, 0.8); 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); + self:PopulateScans() 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); + local nameLink = linkString:format(enemy.name, enemy.name) + local hex = ("%s - %s %s"):format(nameLink, enemy.race, enemy.class) + self.LOG.Output:AddMessage(hex, enemy.colors.r, enemy.colors.g, enemy.colors.b); EnemyAlarm(enemy.name, enemy.class, enemy.colors) end function PLUGIN:UpdateCommunicator() - local docklet = _G["SVUI_ArtOfWarDock_ToolBarButton"] if(not self.InPVP) then local mapID = GetCurrentMapAreaID() if(mapID) then local points = PVP_NODES[mapID] if(points) then + self.COMM.Unavailable:Hide() for i = 1, 5 do local nodeName = ("SVUI_PVPNode%d"):format(i) local node = _G[nodeName] @@ -349,13 +372,12 @@ function PLUGIN:UpdateCommunicator() end self.InPVP = true SVUIAddonEventHandler:UnregisterEvent("UPDATE_BATTLEFIELD_SCORE") - self.DockButton:SaveColors("yellow", "yellow", true) - self.DockButton.icon:SetTexture(ICON_FILE) - self.DockButton.Scanner:Hide() self.Scanning = false + self:PauseScanner() end end elseif(self.InPVP) then + self.COMM.Unavailable:Show() for i = 1, 5 do local nodeName = ("SVUI_PVPNode%d"):format(i) local node = _G[nodeName] @@ -368,12 +390,9 @@ function PLUGIN:UpdateCommunicator() end self.InPVP = nil SVUIAddonEventHandler:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") - self.DockButton:SaveColors("special", "icon", false) - self.DockButton.icon:SetTexture(0,0,0,0) - self.DockButton.Scanner:Show() self.Scanning = true - self:SwitchToLogs() + self:PopulateScans() end end @@ -386,8 +405,8 @@ function PLUGIN:UpdateZoneStatus() if(zoneText ~= ACTIVE_ZONE) then ClearCacheScans() ACTIVE_ZONE = zoneText - PLUGIN.TitleWindow:Clear(); - PLUGIN.TitleWindow:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); + PLUGIN.Title:Clear(); + PLUGIN.Title:AddMessage(("Scanning %s"):format(ACTIVE_ZONE), 1, 1, 0); end local zonePvP = GetZonePVPInfo() if(zonePvP == "sanctuary" or zoneText == "") then @@ -400,7 +419,7 @@ function PLUGIN:UpdateZoneStatus() elseif (not zonePvP or (zonePvP == "friendly") or (not UnitIsPVP("player"))) then PLUGIN.Scanning = false elseif(instanceType == "pvp") then - PLUGIN:SwitchToBG() + PLUGIN:PauseScanner() PLUGIN.Scanning = false if(not PLUGIN.InPVP) then PLUGIN:UpdateCommunicator() @@ -441,6 +460,7 @@ local function ParseIncomingLog(timestamp, event, eGuid, eName, pGuid) end local function GetSourceType(guid) + if not guid then return end local subStr, binStr, bitVal, srcType subStr = guid:sub(3, 5) binStr = ("0x%s"):format(subStr) @@ -450,6 +470,7 @@ local function GetSourceType(guid) end function PLUGIN:CombatLogScanner(timestamp, event, _, srcGUID, srcName, srcFlags, sourceRaidFlags, dstGUID, dstName, dstFlags, destRaidFlags, _, spellName) + if not srcFlags then return end local flagParse = band(srcFlags, COMBATLOG_OBJECT_REACTION_HOSTILE) local flagged = flagParse == COMBATLOG_OBJECT_REACTION_HOSTILE @@ -457,7 +478,7 @@ function PLUGIN:CombatLogScanner(timestamp, event, _, srcGUID, srcName, srcFlags if(srcGUID and srcName) then local isHostile = CombatLog_Object_IsA(srcFlags, COMBATLOG_FILTER_HOSTILE_PLAYERS) local srcType = GetSourceType(srcGUID) - if((srcType == 0 or srcType == 8) and isHostile) then + if(srcType and (srcType == 0 or srcType == 8) and isHostile) then if(event == "SPELL_AURA_APPLIED" and (spellName == L["Stealth"] or spellName == L["Prowl"])) then StealthAlarm(spellName) end @@ -472,7 +493,7 @@ function PLUGIN:CombatLogScanner(timestamp, event, _, srcGUID, srcName, srcFlags if(PLUGIN.Scanning and dstGUID and dstName) then local isHostile = CombatLog_Object_IsA(dstFlags, COMBATLOG_FILTER_HOSTILE_PLAYERS) local srcType = GetSourceType(dstGUID) - if((srcType == 0 or srcType == 8) and isHostile) then + if(srcType and (srcType == 0 or srcType == 8) and isHostile) then ParseIncomingLog(timestamp, event, dstGUID, dstName, srcGUID) end end @@ -535,26 +556,6 @@ end SVUIAddonEventHandler:SetScript("OnEvent", Registry_OnEvent) -local LogClear_OnClick = function(self, button) - if(IsShiftKeyDown()) then - ClearSavedScans() - PLUGIN:ResetLogs() - end - ClearCacheScans() -end - -local LogClear_OnEnter = function(self) - GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) - GameTooltip:ClearLines() - GameTooltip:AddDoubleLine("Click", "To Clear Scan", 0.1, 1, 0.2, 1, 1, 1) - GameTooltip:AddDoubleLine("[SHIFT] Click", "To Clear All", 0.1, 1, 0.2, 1, 1, 1) - GameTooltip:Show() -end - -local LogClear_OnLeave = function(self) - GameTooltip:Hide() -end - local onMouseWheel = function(self, delta) if (delta > 0) then self:ScrollUp() @@ -564,75 +565,41 @@ local onMouseWheel = function(self, delta) end local function MakeLogWindow() - AoWLogs:SetFrameStrata("MEDIUM") - AoWLogs:FillInner(SVUI_ArtOfWarDock) - AoWLogs:SetParent(SVUI_ArtOfWarDock) - - local title = CreateFrame("ScrollingMessageFrame", nil, AoWLogs) - title:SetSpacing(4) - title:SetClampedToScreen(false) - title:SetFrameStrata("MEDIUM") - title:SetPoint("TOPLEFT", AoWLogs, "TOPLEFT",0,0) - title:SetPoint("BOTTOMRIGHT", AoWLogs, "TOPRIGHT",0,-20) - title:SetFontTemplate(SuperVillain.Media.font.names, 16, "OUTLINE", "CENTER", "MIDDLE") - title:SetMaxLines(1) - title:EnableMouseWheel(false) - title:SetFading(false) - title:SetInsertMode('TOP') - - title.divider = title:CreateTexture(nil,"OVERLAY") - title.divider:SetTexture(classR, classG, classB) - title.divider:SetAlpha(classA) - title.divider:SetPoint("BOTTOMLEFT") - title.divider:SetPoint("BOTTOMRIGHT") - title.divider:SetHeight(1) - - local clearcount = CreateFrame("Button", "SVUI_AoWLogsClear", AoWLogs) - clearcount:SetPoint("TOPLEFT", title, "BOTTOMLEFT",0,0) - clearcount:SetPoint("BOTTOMRIGHT", title, "BOTTOMRIGHT",0,-20) - clearcount:SetButtonTemplate(true) - clearcount:SetScript("OnEnter", LogClear_OnEnter) - clearcount:SetScript("OnLeave", LogClear_OnLeave) - clearcount:SetScript("OnClick", LogClear_OnClick) - - local summary = CreateFrame("ScrollingMessageFrame", nil, AoWLogs) - summary:SetSpacing(4) - summary:SetClampedToScreen(false) - summary:SetFrameStrata("MEDIUM") - 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) - summary:SetFading(false) - summary:SetInsertMode('TOP') - - summary.divider = summary:CreateTexture(nil,"OVERLAY") - summary.divider:SetTexture(classR, classG, classB) - summary.divider:SetAlpha(classA) - summary.divider:SetPoint("BOTTOMLEFT") - summary.divider:SetPoint("BOTTOMRIGHT") - summary.divider:SetHeight(1) - - local log = CreateFrame("ScrollingMessageFrame", nil, AoWLogs) - log:SetSpacing(4) - log:SetClampedToScreen(false) - log:SetFrameStrata("MEDIUM") - log:SetPoint("TOPLEFT",summary,"BOTTOMLEFT",0,0) - log:SetPoint("BOTTOMRIGHT",AoWLogs,"BOTTOMRIGHT",0,0) - log:SetFont(SuperVillain.Media.font.system, 11, "OUTLINE") - log:SetJustifyH("CENTER") - log:SetJustifyV("MIDDLE") - log:SetShadowColor(0, 0, 0, 0) - log:SetMaxLines(120) - log:EnableMouseWheel(true) - log:SetScript("OnMouseWheel", onMouseWheel) - log:SetFading(false) - log:SetInsertMode('TOP') - - PLUGIN.TitleWindow = title - PLUGIN.SummaryWindow = summary - PLUGIN.LogWindow = log + local frame = CreateFrame("Frame", nil, UIParent) + + frame:SetFrameStrata("MEDIUM") + frame:SetPoint("TOPLEFT", PLUGIN.Summary, "BOTTOMLEFT",0,0) + frame:SetPoint("BOTTOMRIGHT", SVUI_ArtOfWarDock, "BOTTOMRIGHT",0,0) + frame:SetParent(SVUI_ArtOfWarDock) + + local output = CreateFrame("ScrollingMessageFrame", nil, frame) + output:SetSpacing(4) + output:SetClampedToScreen(false) + output:SetFrameStrata("MEDIUM") + output:SetAllPoints(frame) + output:SetFont(SuperVillain.Media.font.system, 11, "OUTLINE") + output:SetJustifyH("CENTER") + output:SetJustifyV("MIDDLE") + output:SetShadowColor(0, 0, 0, 0) + output:SetMaxLines(120) + output:EnableMouseWheel(true) + output:SetHyperlinksEnabled(true) + output:SetScript("OnMouseWheel", onMouseWheel) + output:SetFading(false) + output:SetInsertMode('TOP') + + output:SetScript("OnHyperlinkEnter", function(self, linkData, link, button) + local t = link:explode(":") + local name = t[2] or "" + SVUI_TargetScanButton:SetAttribute("macrotext", ("/tar %s"):format(name)) + SVUI_TargetScanButton:EnableMouse(true) + end) + + frame.Output = output + + PLUGIN.LOG = frame + + _G["SVUI_ArtOfWarTool1"].Window = PLUGIN.LOG SVUIAddonEventHandler:RegisterEvent("COMBAT_LOG_EVENT_UNFILTERED") SVUIAddonEventHandler:RegisterEvent("ZONE_CHANGED") @@ -644,82 +611,40 @@ local function MakeLogWindow() SVUIAddonEventHandler:RegisterEvent("UNIT_FACTION") SVUIAddonEventHandler:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") end ---[[ -########################################################## -BUILD FUNCTION -########################################################## -]]-- -local function LoadOptions() - SuperVillain.Options.args.plugins.args.pluginOptions.args.SVAOW = { - type = "group", - name = L["Art of War"], - childGroups = "tree", - args = { - enable = { - order = 1, - type = "toggle", - name = "Enable", - get = function(a) return SuperVillain.db.SVAOW.enable end, - set = function(a,b)SuperVillain.db.SVAOW.enable = b; SuperVillain:StaticPopup_Show("RL_CLIENT") end - } - } - } -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.HitBy = false; - PLUGIN.Scanning = false; - PLUGIN.InPVP = false - - local holder = CreateFrame("Frame", "SVUI_ArtOfWarDock", SuperDockWindowRight) - holder:SetFrameStrata("BACKGROUND") - MakeLogWindow() - SuperVillain:RegisterDocklet("SVUI_ArtOfWarDock", "Art of War", ICON_FILE) - local dockbutton = _G["SVUI_ArtOfWarDock_ToolBarButton"]; - - local scanner = CreateFrame("Frame", nil, dockbutton) - scanner:SetAllPoints(dockbutton) - scanner:SetFrameLevel(dockbutton:GetFrameLevel() + 2) +local function MakeCommWindow() - -- local blip = scanner:CreateTexture(nil, "BORDER") - -- blip:SetAllPoints(scanner) - -- blip:SetTexture(SCAN_ICON) - -- blip:SetVertexColor(0,0.8,0) - -- blip:SetAlpha(0.5) + local frame = CreateFrame("Frame", nil, UIParent) - scanner.Spinner = scanner:CreateTexture(nil, "ARTWORK", nil, 2) - scanner.Spinner:SetTexture(SCAN_ANIM) - scanner.Spinner:SetVertexColor(0.5,0.5,0.5) - scanner.Spinner:Size(dockbutton:GetSize()) - scanner.Spinner:SetPoint("CENTER", scanner, "CENTER", 0, 0) + frame:SetFrameStrata("MEDIUM") + frame:SetPoint("TOPLEFT", PLUGIN.Summary, "BOTTOMLEFT",0,0) + frame:SetPoint("BOTTOMRIGHT", SVUI_ArtOfWarDock, "BOTTOMRIGHT",0,0) + frame:SetParent(SVUI_ArtOfWarDock) - SuperVillain.Animate:Orbit(scanner.Spinner, 8, true) + local fallback = CreateFrame("Frame", nil, frame) + fallback:SetAllPoints(frame) - dockbutton.Scanner = scanner + local fbText = fallback:CreateFontString(nil, "OVERLAY") + fbText:SetAllPoints(fallback) + fbText:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + fbText:SetText("Nothing To Broadcast Right Now") - PLUGIN.DockButton = dockbutton - PLUGIN.DockButton.icon:SetTexture(0,0,0,0) + frame.Unavailable = fallback - local width = holder:GetWidth() - local height = holder:GetHeight() - local sectionWidth = (width / 6) - 2 - local sectionHeight = (height / 5) - 2 + local DOCK_WIDTH = frame:GetWidth(); + local DOCK_HEIGHT = frame:GetHeight(); + local BUTTON_SIZE = (DOCK_HEIGHT * 0.25) - 4; + local sectionWidth = (DOCK_WIDTH / 6) - 2 + local sectionHeight = (DOCK_HEIGHT / 5) - 2 local iconSize = sectionHeight * 0.5 for i = 1, 5 do local yOffset = (sectionHeight * (i - 1)) + 2 local poiName = ("SVUI_PVPNode%d"):format(i) - local poi = CreateFrame("Frame", poiName, holder) - poi:SetSize((width - 2), sectionHeight) - poi:SetPoint("TOP", holder, "TOP", 0, -yOffset) + local poi = CreateFrame("Frame", poiName, frame) + poi:SetSize((DOCK_WIDTH - 2), sectionHeight) + poi:SetPoint("TOP", frame, "TOP", 0, -yOffset) poi:SetPanelTemplate("Transparent") local safe = CreateFrame("Button", nil, poi) @@ -763,11 +688,365 @@ local function LoadWarVillain() poi:Hide() end + PLUGIN.COMM = frame + + _G["SVUI_ArtOfWarTool2"].Window = PLUGIN.COMM + + PLUGIN.COMM:Hide() +end + +local function MakeUtilityWindow() + local frame = CreateFrame("Frame", nil, UIParent) + + frame:SetFrameStrata("MEDIUM") + frame:SetPoint("TOPLEFT", PLUGIN.Summary, "BOTTOMLEFT",0,0) + frame:SetPoint("BOTTOMRIGHT", SVUI_ArtOfWarDock, "BOTTOMRIGHT",0,0) + frame:SetParent(SVUI_ArtOfWarDock) + + local fbText = frame:CreateFontString(nil, "OVERLAY") + fbText:SetAllPoints(frame) + fbText:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + fbText:SetText("Utilities Coming Soon....") + + PLUGIN.TOOL = frame + + _G["SVUI_ArtOfWarTool3"].Window = PLUGIN.TOOL + + PLUGIN.TOOL:Hide() +end + +local function MakeInfoWindow() + local frame = CreateFrame("Frame", nil, UIParent) + + frame:SetFrameStrata("MEDIUM") + frame:SetPoint("TOPLEFT", PLUGIN.Summary, "BOTTOMLEFT",0,0) + frame:SetPoint("BOTTOMRIGHT", SVUI_ArtOfWarDock, "BOTTOMRIGHT",0,0) + frame:SetParent(SVUI_ArtOfWarDock) + + local DATA_WIDTH = (frame:GetWidth() * 0.5) - 2; + local DATA_HEIGHT = frame:GetHeight() - 2; + + local leftColumn = CreateFrame("Frame", "SVUI_ArtOfWarInfoLeft", frame) + leftColumn:Size(DATA_WIDTH, DATA_HEIGHT) + leftColumn:Point("LEFT", frame, "LEFT", 0, 0) + leftColumn.lockedOpen = true + SuperVillain.SVStats:NewAnchor(leftColumn, 3, "ANCHOR_CURSOR", nil, "Transparent", true) + leftColumn:SetFrameLevel(0) + + local rightColumn = CreateFrame("Frame", "SVUI_ArtOfWarInfoRight", frame) + rightColumn:Size(DATA_WIDTH, DATA_HEIGHT) + rightColumn:Point("LEFT", leftColumn, "RIGHT", 2, 0) + rightColumn.lockedOpen = true + SuperVillain.SVStats:NewAnchor(rightColumn, 3, "ANCHOR_CURSOR", nil, "Transparent", true) + rightColumn:SetFrameLevel(0) + + PLUGIN.INFO = frame + + _G["SVUI_ArtOfWarTool4"].Window = PLUGIN.INFO + + SuperVillain.SVStats.BGPanels = { + ["SVUI_ArtOfWarInfoLeft"] = {top = "Honor", middle = "Kills", bottom = "Assists"}, + ["SVUI_ArtOfWarInfoRight"] = {top = "Damage", middle = "Healing", bottom = "Deaths"} + } + + SuperVillain.SVStats:Generate() + + PLUGIN.INFO:Hide() +end +--[[ +########################################################## +DOCK ELEMENT HANDLERS +########################################################## +]]-- +local ArtOfWarAlert_OnEnter = function(self) + if InCombatLockdown() then return; end + self:SetBackdropColor(0.9, 0.15, 0.1) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) + GameTooltip:ClearLines() + GameTooltip:AddLine(self.TText, 1, 1, 0) + GameTooltip:Show() +end + +local ArtOfWarAlert_OnLeave = function(self) + GameTooltip:Hide() + if InCombatLockdown() then return end; + self:SetBackdropColor(0.25, 0.52, 0.1) +end + +local ArtOfWarAlert_OnHide = function() + if InCombatLockdown() then + SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); + return; + end + SuperDockAlertRight:Deactivate() +end + +local ArtOfWarAlert_OnShow = function(self) + if InCombatLockdown() then + SuperVillain:AddonMessage(ERR_NOT_IN_COMBAT); + self:Hide() + return; + end + SuperVillain:SecureFadeIn(self, 0.3, 0, 1) + SuperDockAlertRight:Activate(self) +end + +local ArtOfWarAlert_OnMouseDown = function(self) + -- DO STUFF + SuperVillain:SecureFadeOut(self, 0.5, 1, 0, true) +end + +local ArtOfWarTool_OnEnter = function(self) + if InCombatLockdown() then return; end + self.icon:SetGradient(unpack(SuperVillain.Media.gradient.yellow)) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) + GameTooltip:ClearLines() + GameTooltip:AddLine(self.TText, 1, 1, 1) + GameTooltip:Show() +end + +local ArtOfWarTool_OnLeave = function(self) + if InCombatLockdown() then return; end + self.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + GameTooltip:Hide() +end + +local ArtOfWarTool_OnMouseDown = function(self) + SuperVillain:SecureFadeOut(PLUGIN.LOG, 0.5, 1, 0, true) + SuperVillain:SecureFadeOut(PLUGIN.COMM, 0.5, 1, 0, true) + SuperVillain:SecureFadeOut(PLUGIN.TOOL, 0.5, 1, 0, true) + SuperVillain:SecureFadeOut(PLUGIN.INFO, 0.5, 1, 0, true) + SuperVillain:SecureFadeIn(self.Window, 0.3, 0, 1) + PLUGIN.Title:Clear(); + PLUGIN.Title:AddMessage(self.TTitle, 1, 1, 0); +end + +local Scanner_OnMouseDown = function(self) + SuperVillain:SecureFadeOut(PLUGIN.LOG, 0.5, 1, 0, true) + SuperVillain:SecureFadeOut(PLUGIN.COMM, 0.5, 1, 0, true) + SuperVillain:SecureFadeOut(PLUGIN.TOOL, 0.5, 1, 0, true) + SuperVillain:SecureFadeOut(PLUGIN.INFO, 0.5, 1, 0, true) + SuperVillain:SecureFadeIn(self.Window, 0.3, 0, 1) + PLUGIN:PopulateScans() +end + +local Switch_OnEnter = function(self) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) + GameTooltip:ClearLines() + if(self.ShowingKOS) then + GameTooltip:AddDoubleLine("Click", "Show Scan List", 0.1, 1, 0.2, 1, 1, 1) + else + GameTooltip:AddDoubleLine("Click", 'Show "Kill On Sight" List', 0.1, 1, 0.2, 1, 1, 1) + end + GameTooltip:AddDoubleLine("[SHIFT] Click", "Clear All Scans", 0.1, 1, 0.2, 1, 1, 1) + GameTooltip:AddDoubleLine("[CTRL] Click", 'Clear All "Kill On Sight"', 0.1, 1, 0.2, 1, 1, 1) + GameTooltip:Show() +end + +local Switch_OnLeave = function(self) + GameTooltip:Hide() +end + +local Switch_OnClick = function(self, button) + Switch_OnLeave(self) + if(IsControlKeyDown()) then + ClearSavedScans() + PLUGIN:ResetLogs() + elseif(IsShiftKeyDown()) then + ClearCacheScans() + else + if(self.ShowingKOS) then + PLUGIN:PopulateScans() + self.ShowingKOS = false + else + PLUGIN:PopulateKOS() + self.ShowingKOS = true + end + end + Switch_OnEnter(self) +end +--[[ +########################################################## +BUILD FUNCTION +########################################################## +]]-- +local function LoadOptions() + SuperVillain.Options.args.plugins.args.pluginOptions.args.SVAOW = { + type = "group", + name = L["Art of War"], + childGroups = "tree", + args = { + enable = { + order = 1, + type = "toggle", + name = "Enable", + get = function(a) return SuperVillain.db.SVAOW.enable end, + set = function(a,b)SuperVillain.db.SVAOW.enable = b; SuperVillain:StaticPopup_Show("RL_CLIENT") end + } + } + } +end + +local function LoadWarVillain() + if(not SuperVillain.db.SVAOW.enable) then return end + + local ALERT_HEIGHT = 60; + local DOCK_WIDTH = SuperDockWindowRight:GetWidth(); + local DOCK_HEIGHT = SuperDockWindowRight:GetHeight(); + local BUTTON_SIZE = (DOCK_HEIGHT * 0.25) - 4; + + PLUGIN.db = SuperVillain.db.SVAOW + + if(not SVAOW_Data) then SVAOW_Data = {} end + if(not SVAOW_Cache) then SVAOW_Cache = {} end + + PLUGIN.HitBy = false; + PLUGIN.Scanning = false; + PLUGIN.InPVP = false + + local holder = CreateFrame("Frame", "SVUI_ArtOfWarDock", SuperDockWindowRight) + holder:SetFrameStrata("BACKGROUND") + holder:SetWidth(DOCK_WIDTH - 4); + holder:SetHeight(DOCK_HEIGHT - 4); + holder:SetPoint("CENTER",SuperDockWindowRight,"CENTER",0,0); + + local toolBar = CreateFrame("Frame", "SVUI_ArtOfWarToolBar", holder) + toolBar:SetWidth(BUTTON_SIZE + 4); + toolBar:SetHeight((BUTTON_SIZE + 4) * 4); + toolBar:SetPoint("BOTTOMLEFT",holder,"BOTTOMLEFT",0,0); + + local tbDivider = toolBar:CreateTexture(nil,"OVERLAY") + tbDivider:SetTexture(0,0,0,0.5) + tbDivider:SetPoint("TOPRIGHT") + tbDivider:SetPoint("BOTTOMRIGHT") + tbDivider:SetWidth(1) + + local tool4 = CreateFrame("Frame", "SVUI_ArtOfWarTool4", toolBar) + tool4:SetPoint("BOTTOM",toolBar,"BOTTOM",0,0) + tool4:SetSize(BUTTON_SIZE,BUTTON_SIZE) + tool4.icon = tool4:CreateTexture(nil, 'OVERLAY') + tool4.icon:SetTexture(INFO_ICON) + tool4.icon:FillInner(tool4) + tool4.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool4.TText = "Stats" + tool4.TTitle = "Statistics and Information" + tool4:SetScript('OnEnter', ArtOfWarTool_OnEnter) + tool4:SetScript('OnLeave', ArtOfWarTool_OnLeave) + tool4:SetScript('OnMouseDown', ArtOfWarTool_OnMouseDown) + + local tool3 = CreateFrame("Frame", "SVUI_ArtOfWarTool3", toolBar) + tool3:SetPoint("BOTTOM",tool4,"TOP",0,2) + tool3:SetSize(BUTTON_SIZE,BUTTON_SIZE) + tool3.icon = tool3:CreateTexture(nil, 'OVERLAY') + tool3.icon:SetTexture(UTILITY_ICON) + tool3.icon:FillInner(tool3) + tool3.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool3.TText = "Tools" + tool3.TTitle = "Tools and Utilities" + tool3:SetScript('OnEnter', ArtOfWarTool_OnEnter) + tool3:SetScript('OnLeave', ArtOfWarTool_OnLeave) + tool3:SetScript('OnMouseDown', ArtOfWarTool_OnMouseDown) + + local tool2 = CreateFrame("Frame", "SVUI_ArtOfWarTool2", toolBar) + tool2:SetPoint("BOTTOM",tool3,"TOP",0,2) + tool2:SetSize(BUTTON_SIZE,BUTTON_SIZE) + tool2.icon = tool2:CreateTexture(nil, 'OVERLAY') + tool2.icon:SetTexture(RADIO_ICON) + tool2.icon:FillInner(tool2) + tool2.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool2.TText = "Radio" + tool2.TTitle = "Radio Communicator" + tool2:SetScript('OnEnter', ArtOfWarTool_OnEnter) + tool2:SetScript('OnLeave', ArtOfWarTool_OnLeave) + tool2:SetScript('OnMouseDown', ArtOfWarTool_OnMouseDown) + + local tool1 = CreateFrame("Frame", "SVUI_ArtOfWarTool1", toolBar) + tool1:SetPoint("BOTTOM",tool2,"TOP",0,2) + tool1:SetSize(BUTTON_SIZE,BUTTON_SIZE) + tool1.icon = tool1:CreateTexture(nil, 'OVERLAY') + tool1.icon:SetTexture(SCANNER_ICON) + tool1.icon:FillInner(tool1) + tool1.icon:SetGradient("VERTICAL", 0.5, 0.53, 0.55, 0.8, 0.8, 1) + tool1.TText = "Scanner" + tool1.TTitle = "Enemy Scanner" + tool1:SetScript('OnEnter', ArtOfWarTool_OnEnter) + tool1:SetScript('OnLeave', ArtOfWarTool_OnLeave) + tool1:SetScript('OnMouseDown', Scanner_OnMouseDown) + + local title = CreateFrame("ScrollingMessageFrame", nil, holder) + title:SetSpacing(4) + title:SetClampedToScreen(false) + title:SetFrameStrata("MEDIUM") + title:SetPoint("TOPLEFT", toolBar, "TOPRIGHT",0,0) + title:SetPoint("BOTTOMRIGHT", holder, "TOPRIGHT",0,-16) + title:SetFontTemplate(SuperVillain.Media.font.names, 16, "OUTLINE", "CENTER", "MIDDLE") + title:SetMaxLines(1) + title:EnableMouseWheel(false) + title:SetFading(false) + title:SetInsertMode('TOP') + + local divider1 = title:CreateTexture(nil,"OVERLAY") + divider1:SetTexture(0,0,0,0.5) + divider1:SetPoint("BOTTOMLEFT") + divider1:SetPoint("BOTTOMRIGHT") + divider1:SetHeight(1) + + PLUGIN.Title = title + + local listbutton = CreateFrame("Button", nil, holder) + listbutton:SetPoint("TOPLEFT", title, "BOTTOMLEFT",0,0) + listbutton:SetPoint("BOTTOMRIGHT", title, "BOTTOMRIGHT",0,-14) + listbutton:SetButtonTemplate(true) + listbutton.ShowingKOS = false + listbutton:SetScript("OnEnter", Switch_OnEnter) + listbutton:SetScript("OnLeave", Switch_OnLeave) + listbutton:SetScript("OnClick", Switch_OnClick) + + PLUGIN.Switch = listbutton + + local summary = CreateFrame("ScrollingMessageFrame", nil, holder) + summary:SetSpacing(4) + summary:SetClampedToScreen(false) + summary:SetFrameStrata("MEDIUM") + summary:SetPoint("TOPLEFT", title, "BOTTOMLEFT",0,0) + summary:SetPoint("BOTTOMRIGHT", title, "BOTTOMRIGHT",0,-14) + summary:SetFontTemplate(SuperVillain.Media.font.system, 12, "OUTLINE", "CENTER", "MIDDLE") + summary:SetMaxLines(1) + summary:EnableMouse(false) + summary:SetFading(false) + summary:SetInsertMode('TOP') + + PLUGIN.Summary = summary + + local divider2 = summary:CreateTexture(nil,"OVERLAY") + divider2:SetTexture(0,0,0,0.5) + divider2:SetPoint("BOTTOMLEFT") + divider2:SetPoint("BOTTOMRIGHT") + divider2:SetHeight(1) + + MakeLogWindow() + MakeCommWindow() + MakeUtilityWindow() + MakeInfoWindow() + + SuperVillain:RegisterDocklet("SVUI_ArtOfWarDock", "Art of War", ICON_FILE) + holder:Hide() PLUGIN:ResetLogs() + + local targetButton = CreateFrame("Button", "SVUI_TargetScanButton", UIParent, "SecureActionButtonTemplate") + targetButton:SetAllPoints(PLUGIN.LOG) + targetButton:SetFrameLevel(99) + targetButton:RegisterForClicks("AnyUp") + targetButton:SetAttribute("type1", "macro") + targetButton:SetAttribute("macrotext", "/tar") + targetButton:EnableMouse(false) + targetButton:HookScript("OnClick", function(self) self:EnableMouse(false) end) end +--/tar Munglunch + CONFIGS["SVAOW"] = { ["enable"] = true } diff --git a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc index b217231..424124f 100644 --- a/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc +++ b/Interface/AddOns/SVUI_ArtOfWar/SVUI_ArtOfWar.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 1.081 +## Version: 5.02 ## Title: |cffFF9900SVUI |r|cffFFEF00Art of War|r ## Notes: Supervillain UI [|cff9911FFPvP Tools|r]. ## SavedVariables: SVAOW_Data diff --git a/Interface/AddOns/SVUI_ArtOfWar/artwork/DOCK-SCAN.blp b/Interface/AddOns/SVUI_ArtOfWar/artwork/DOCK-SCAN.blp deleted file mode 100644 index 8bc4525..0000000 Binary files a/Interface/AddOns/SVUI_ArtOfWar/artwork/DOCK-SCAN.blp and /dev/null differ diff --git a/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-INFO.blp b/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-INFO.blp new file mode 100644 index 0000000..112e648 Binary files /dev/null and b/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-INFO.blp differ diff --git a/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-RADIO.blp b/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-RADIO.blp new file mode 100644 index 0000000..8d38764 Binary files /dev/null and b/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-RADIO.blp differ diff --git a/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-SCANNER.blp b/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-SCANNER.blp new file mode 100644 index 0000000..6bcd5d3 Binary files /dev/null and b/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-SCANNER.blp differ diff --git a/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-UTILITIES.blp b/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-UTILITIES.blp new file mode 100644 index 0000000..eef0a56 Binary files /dev/null and b/Interface/AddOns/SVUI_ArtOfWar/artwork/PVP-UTILITIES.blp differ diff --git a/Interface/AddOns/SVUI_ArtOfWar/artwork/SCAN-ANIMATION.blp b/Interface/AddOns/SVUI_ArtOfWar/artwork/SCAN-ANIMATION.blp deleted file mode 100644 index 53d920b..0000000 Binary files a/Interface/AddOns/SVUI_ArtOfWar/artwork/SCAN-ANIMATION.blp and /dev/null differ diff --git a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc index 65841e1..b75cd33 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc +++ b/Interface/AddOns/SVUI_ConfigOMatic/SVUI_ConfigOMatic.toc @@ -1,9 +1,11 @@ ## Interface: 60000 -## Author: Munglunch, Elv -## Version: 4.082 +## Author: Munglunch +## Version: 5.02 ## Title: |cffFF9900SVUI |r|cffFFEF00Config O Matic|r ## Notes: Supervillain UI [|cff9911FFConfig Options|r] ## RequiredDeps: SVUI ## LoadOnDemand: 1 +## X-Notes: Special thanks to Elv and Tukz for their incredible work. +## X-Email: munglunch@gmail.com _load.xml diff --git a/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua b/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua index e876da8..11b5564 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/language/generic.lua @@ -49,6 +49,10 @@ if gameLocale == "enUS" then L["reset"] = "Reset Profile" L["reset_desc"] = "Reset the current profile back to its default values, in case your configuration is broken, or you simply want to start over." L["reset_sub"] = "Reset the current profile to the default" + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end if gameLocale == "frFR" then L["AURAS_DESC"] = "Configure les icônes qui apparaissent près de la Minicarte." @@ -81,6 +85,10 @@ if gameLocale == "frFR" then L["reset"] = "Réinitialiser le profil" L["reset_desc"] = "Réinitialise le profil actuel au cas où votre configuration est corrompue ou si vous voulez tout simplement faire table rase." L["reset_sub"] = "Réinitialise le profil actuel avec les paramètres par défaut." + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end if gameLocale == "deDE" then L["AURAS_DESC"] = "Konfiguriere die Symbole für die Stärkungs- und Schwächungszauber nahe der Minimap." @@ -112,6 +120,10 @@ if gameLocale == "deDE" then L["reset"] = "Profil zurücksetzen" L["reset_desc"] = "Setzt das momentane Profil auf Standardwerte zurück, für den Fall das mit der Konfiguration etwas schief lief oder weil du einfach neu starten willst." L["reset_sub"] = "Das aktuelle Profil auf Standard zurücksetzen." + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end if gameLocale == "itIT" then L["AURAS_DESC"] = "Configure the aura icons that appear near the minimap." @@ -144,6 +156,10 @@ if gameLocale == "itIT" then L["reset"] = "Reimposta Profilo" L["reset_desc"] = "Riporta il tuo profilo attivo alle sue impostazioni di default, nel caso in cui la tua configurazione si sia corrotta, o semplicemente tu voglia re-inizializzarla." L["reset_sub"] = "Reimposta il profilo ai suoi valori di default." + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end if gameLocale == "koKR" then L["AURAS_DESC"] = "Configure the aura icons that appear near the minimap." @@ -176,6 +192,10 @@ if gameLocale == "koKR" then L["reset"] = "프로필 초기화" L["reset_desc"] = "단순히 다시 새롭게 구성을 원하는 경우, 현재 프로필을 기본값으로 초기화 합니다." L["reset_sub"] = "현재의 프로필을 기본값으로 초기화 합니다" + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end if gameLocale == "ptBR" then L["AURAS_DESC"] = "Configurar os ícones das auras que aparecem perto do minimapa." @@ -189,6 +209,10 @@ if gameLocale == "ptBR" then L["TOGGLEART_DESC"] = "Ativa / Desativa a aparência deste quadro." L["TOOLTIP_DESC"] = "Opções de configuração para a Tooltip." L["TEXT_FORMAT_DESC"] = "Select the formatting of this text" + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end if gameLocale == "ruRU" then L["AURAS_DESC"] = "Настройка иконок эффектов, находящихся у миникарты." @@ -221,6 +245,10 @@ if gameLocale == "ruRU" then L["reset"] = "Сброс профиля" L["reset_desc"] = "Если ваша конфигурации испорчена или если вы хотите настроить всё заново - сбросьте текущий профиль на стандартные значения." L["reset_sub"] = "Сброс текущего профиля на стандартный" + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end if gameLocale == "esES" or gameLocale == "esMX" then L["AURAS_DESC"] = "Configura los iconos de las auras que aparecen cerca del minimapa." @@ -253,6 +281,10 @@ if gameLocale == "esES" or gameLocale == "esMX" then L["reset"] = "Reiniciar Perfil" L["reset_desc"] = "Reinicia el perfil actual a los valores por defectos, en caso de que se haya estropeado la configuración o quieras volver a empezar de nuevo." L["reset_sub"] = "Reinicar el perfil actual al de por defecto" + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end if gameLocale == "zhTW" then L["AURAS_DESC"] = "小地圖旁的光環圖示設定." @@ -285,6 +317,10 @@ if gameLocale == "zhTW" then L["reset"] = "重置設定檔" L["reset_desc"] = "將當前的設定檔恢復到它的預設值,用於你的設定檔損壞,或者你只是想重來的情況。" L["reset_sub"] = "將當前的設定檔恢復為預設值" + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end if gameLocale == "zhCN" then L["AURAS_DESC"] = "小地图旁的光环图标设置." @@ -317,4 +353,8 @@ if gameLocale == "zhCN" then L["reset"] = "重置配置文件" L["reset_desc"] = "将当前的配置文件恢复到它的默认值,用于你的配置文件损坏,或者你只是想重来的情况。" L["reset_sub"] = "将当前的配置文件恢复为默认值" + L["BottomRightDataPanel"] = "Bottom Bar Right" + L["BottomLeftDataPanel"] = "Bottom Bar Left" + L["TopLeftDataPanel"] = "Top Bar Left" + L["TopRightDataPanel"] = "Top Bar Right" end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua index d9fda7e..b994f81 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/dock.lua @@ -163,6 +163,7 @@ local function GetLiveDockletsA() end return t; end + local function GetLiveDockletsB() local test = SuperVillain.db.SVDock.docklets.DockletMain; local t = {["None"] = L["None"]}; diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua index 1e89d07..ca127f9 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/stat.lua @@ -17,15 +17,12 @@ LOCALIZED LUA FUNCTIONS ########################################################## ]]-- --[[ GLOBALS ]]-- -local _G = _G; +local _G = _G; local unpack = _G.unpack; local pairs = _G.pairs; local tinsert = _G.tinsert; -local string = _G.string; -local table = _G.table; -local upper = string.upper; ---[[ TABLE METHODS ]]-- -local tsort = table.sort; +local string = _G.string; +local upper = string.upper; --[[ ########################################################## GET ADDON DATA @@ -42,8 +39,8 @@ SuperVillain.Options.args.SVStats = { type = "group", name = L["Statistics"], childGroups = "tab", - get = function(i)return SuperVillain.db.SVStats[i[#i]]end, - set = function(i, h)MOD:ChangeDBVar(h, i[#i]);MOD:Generate()end, + get = function(key) return SuperVillain.db.SVStats[key[#key]] end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key]); MOD:Generate() end, args = { intro = { order = 1, @@ -56,33 +53,36 @@ SuperVillain.Options.args.SVStats = { name = L["24-Hour Time"], desc = L["Toggle 24-hour mode for the time datatext."] }, - localtime = {order = 3, type = "toggle", name = L["Local Time"], desc = L["If not set to true then the server time will be displayed instead."]}, - battleground = {order = 4, type = "toggle", name = L["Battleground Texts"], desc = L["When inside a battleground display personal scoreboard information on the main datatext bars."]}, + localtime = { + order = 3, + type = "toggle", + name = L["Local Time"], + desc = L["If not set to true then the server time will be displayed instead."] + }, + battleground = { + order = 4, + type = "toggle", + name = L["Battleground Texts"], + desc = L["When inside a battleground display personal scoreboard information on the main datatext bars."] + }, showBackground = { order = 5, name = "Show Backgrounds", desc = L["Display statistic background textures"], type = "toggle", - set = function(i, h)MOD:ChangeDBVar(h, i[#i]);SuperVillain:StaticPopup_Show("RL_CLIENT")end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key]); SuperVillain:StaticPopup_Show("RL_CLIENT") end, }, shortGold = { order = 6, type = "toggle", name = L["Shortened Gold Text"], }, - panels = { - type = "group", - name = L["Panels"], - order = 100, - args = {}, - guiInline = true - }, fontGroup = { - order = 120, + order = 7, type = "group", guiInline = true, name = L["Fonts"], - set = function(i, h)MOD:ChangeDBVar(h, i[#i]);MOD:Generate()end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key]); MOD:Generate() end, args = { font = { type = "select", @@ -112,42 +112,46 @@ SuperVillain.Options.args.SVStats = { } } } - } + }, + panels = { + type = "group", + name = L["Panels"], + order = 100, + args = {}, + guiInline = true + }, } } do - local statValues = {} + local orderIncrement = 0; + local statValues = MOD.StatListing + local configTable = SuperVillain.db.SVStats.panels; + local optionTable = SuperVillain.Options.args.SVStats.args.panels.args; - for name,b in pairs(MOD.Statistics)do - statValues[name]=name - end; - statValues[''] = NONE; - local options = SuperVillain.Options.args.SVStats.args.panels.args; - local d = 0; - for e,f in pairs(SuperVillain.db.SVStats.panels)do - d = d + 1; - if not _G[e] then - options[e] = nil; + for panelName, panelPositions in pairs(configTable)do + orderIncrement = orderIncrement + 1; + if(not _G[panelName]) then + optionTable[panelName] = nil; return - end; - if type(f) == 'table' then - options[e] = { + end + if(type(panelPositions) == "table") then + optionTable[panelName] = { type = 'group', args = {}, - name = L[e] or e, + name = L[panelName] or panelName, guiInline = true, - order = (d + 10) + order = (orderIncrement + 10) } - for g,h in pairs(f)do - options[e].args[g] = { + for position,_ in pairs(panelPositions) do + optionTable[panelName].args[position] = { type = 'select', - name = L[g] or upper(g), + name = L[position] or upper(position), values = statValues, - get = function(i)return SuperVillain.db.SVStats.panels[e][i[#i]] end, - set = function(i,h) MOD:ChangeDBVar(h, i[#i], "panels", e); MOD:Generate() end + get = function(key) return SuperVillain.db.SVStats.panels[panelName][key[#key]] end, + set = function(key, value) MOD:ChangeDBVar(value, key[#key], "panels", panelName); MOD:Generate() end } end end end -end; \ No newline at end of file +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 35272a3..008d80d 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/core.lua @@ -1519,19 +1519,19 @@ SuperVillain.Options.args.SVUnit = { type = "toggle" }, xrayFocus = { - order = 6, + order = 4, name = L["X-Ray Specs"], desc = L["Use handy graphics to focus the current target, or clear the current focus"], type = "toggle" }, gpsLowHealth = { - order = 7, + order = 5, 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, + order = 6, name = L["Range Fading"], desc = L["The transparency of units that are out of range."], type = "range", @@ -1544,9 +1544,61 @@ SuperVillain.Options.args.SVUnit = { end }, } + }, + gridGroup = { + order = 2, + type = "group", + guiInline = true, + name = L["Grid Mode"], + args = { + enable = { + order = 1, + name = L["Enable Grid Mode"], + desc = L["Converts party, party pet, raid, raid pet, tank and assist frames into symmetrical squares. Ideal for healers."], + type = "toggle", + get = function(key) + return SuperVillain.db.SVUnit.grid.enable + end, + set = function(key, value) + MOD:ChangeDBVar(value, "enable", "grid"); + MOD:RefreshUnitFrames(); + end + }, + shownames = { + order = 2, + name = L["Show Grid Names"], + desc = L["Grid frames will show name texts."], + type = "toggle", + get = function(key) + return SuperVillain.db.SVUnit.grid.shownames + end, + set = function(key, value) + if(SuperVillain.db.SVUnit.grid.size < 30) then MOD:ChangeDBVar(30, "size", "grid"); end + MOD:ChangeDBVar(value, "shownames", "grid"); + MOD:RefreshUnitFrames(); + end + }, + size = { + order = 3, + name = L["Grid Size"], + desc = L["The universal size of grid squares."], + type = "range", + min = 10, + max = 70, + step = 1, + width = "full", + get = function(key) + return SuperVillain.db.SVUnit.grid.size + end, + set = function(key, value) + MOD:ChangeDBVar(value, "size", "grid"); + MOD:RefreshUnitFrames(); + end + }, + } }, backgroundGroup = { - order = 2, + order = 3, type = "group", guiInline = true, name = "Unit Backgrounds (3D Portraits Only)", @@ -1575,7 +1627,7 @@ SuperVillain.Options.args.SVUnit = { } }, barGroup = { - order = 3, + order = 4, type = "group", guiInline = true, name = L["Bars"], @@ -1612,7 +1664,7 @@ SuperVillain.Options.args.SVUnit = { } }, fontGroup = { - order = 4, + order = 5, type = "group", guiInline = true, name = L["Fonts"], @@ -1688,7 +1740,7 @@ SuperVillain.Options.args.SVUnit = { } }, allColorsGroup = { - order = 5, + order = 6, type = "group", guiInline = true, name = L["Colors"], diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua index cd209c7..d57be1e 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/party.lua @@ -34,7 +34,7 @@ local MOD = SuperVillain.SVUnit if(not MOD) then return end; local _, ns = ... -SuperVillain.Options.args.SVUnit.args.party ={ +SuperVillain.Options.args.SVUnit.args.party = { name = L['Party Frames'], type = 'group', order = 11, @@ -42,13 +42,13 @@ SuperVillain.Options.args.SVUnit.args.party ={ get = function(l)return SuperVillain.db.SVUnit['party'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, - args ={ - enable ={ + args = { + enable = { type = 'toggle', order = 1, name = L['Enable'], }, - configureToggle ={ + configureToggle = { order = 2, type = 'execute', name = L['Display Frames'], @@ -56,24 +56,32 @@ SuperVillain.Options.args.SVUnit.args.party ={ MOD:UpdateGroupConfig(SVUI_Party, SVUI_Party.forceShow ~= true or nil) end, }, - resetSettings ={ + resetSettings = { type = 'execute', order = 3, name = L['Restore Defaults'], func = function(l, m)MOD:ResetUnitOptions('party')SuperVillain:ResetMovables('Party Frames')end, }, - tabGroups={ + tabGroups= { order=3, type='group', name=L['Unit Options'], childGroups="tree", - args={ - common ={ + args= { + common = { order = 4, type = 'group', name = L['General'], - args ={ - hideonnpc ={ + args = { + gridAllowed = { + type = 'toggle', + order = 1, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit['party'].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit['party'].gridAllowed = m; MOD:SetGroupFrame('party') end, + }, + hideonnpc = { type = 'toggle', order = 2, name = L['Text Toggle On NPC'], @@ -81,7 +89,7 @@ SuperVillain.Options.args.SVUnit.args.party ={ get = function(l)return SuperVillain.db.SVUnit['party']['power'].hideonnpc end, set = function(l, m)SuperVillain.db.SVUnit['party']['power'].hideonnpc = m;MOD:SetGroupFrame('party')end, }, - rangeCheck ={ + rangeCheck = { order = 3, name = L["Range Check"], desc = L["Check if you are in range to cast spells on this specific unit."], @@ -93,43 +101,37 @@ SuperVillain.Options.args.SVUnit.args.party ={ desc = "Show an arrow giving the direction and distance to the frames unit.", type = "toggle", }, - predict ={ + predict = { order = 5, name = L['Heal Prediction'], desc = L['Show a incomming heal prediction bar on the unitframe. Also display a slightly different colored bar for incoming overheals.'], type = 'toggle', }, - threatEnabled ={ + threatEnabled = { type = 'toggle', order = 6, name = L['Show Threat'], }, - colorOverride ={ + colorOverride = { order = 7, name = L['Class Color Override'], desc = L['Override the default class color setting.'], type = 'select', - values ={ + values = { ['USE_DEFAULT'] = L['Use Default'], ['FORCE_ON'] = L['Force On'], ['FORCE_OFF'] = L['Force Off'], }, }, - positionsGroup ={ + positionsGroup = { order = 100, name = L['Size and Positions'], type = 'group', guiInline = true, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party', nil, nil, true)end, - args ={ - gridMode ={ + args = { + width = { order = 1, - name = L["Enable Grid mode"], - type = 'toggle', - set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, - }, - width ={ - order = 2, name = L['Width'], type = 'range', min = 10, @@ -137,8 +139,8 @@ SuperVillain.Options.args.SVUnit.args.party ={ step = 1, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, }, - height ={ - order = 3, + height = { + order = 2, name = L['Height'], type = 'range', min = 10, @@ -146,18 +148,18 @@ SuperVillain.Options.args.SVUnit.args.party ={ step = 1, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party')end, }, - spacer ={ - order = 4, + spacer = { + order = 3, name = '', type = 'description', width = 'full', }, - showBy ={ - order = 5, + showBy = { + order = 4, name = L['Growth Direction'], desc = L['Growth direction from the first unitframe.'], type = 'select', - values ={ + values = { DOWN_RIGHT = format(L['%s and then %s'], L['Down'], L['Right']), DOWN_LEFT = format(L['%s and then %s'], L['Down'], L['Left']), UP_RIGHT = format(L['%s and then %s'], L['Up'], L['Right']), @@ -168,8 +170,8 @@ SuperVillain.Options.args.SVUnit.args.party ={ LEFT_UP = format(L['%s and then %s'], L['Left'], L['Up']), }, }, - groupCount ={ - order = 7, + groupCount = { + order = 5, type = 'range', name = L['Number of Groups'], min = 1, @@ -184,8 +186,8 @@ SuperVillain.Options.args.SVUnit.args.party ={ end end, }, - gRowCol ={ - order = 8, + gRowCol = { + order = 6, type = 'range', name = L['Groups Per Row/Column'], min = 1, @@ -200,16 +202,16 @@ SuperVillain.Options.args.SVUnit.args.party ={ end end, }, - wrapXOffset ={ - order = 9, + wrapXOffset = { + order = 7, type = 'range', name = L['Horizontal Spacing'], min = 0, max = 50, step = 1, }, - wrapYOffset ={ - order = 10, + wrapYOffset = { + order = 8, type = 'range', name = L['Vertical Spacing'], min = 0, @@ -218,20 +220,20 @@ SuperVillain.Options.args.SVUnit.args.party ={ }, }, }, - visibilityGroup ={ + visibilityGroup = { order = 200, name = L['Visibility'], type = 'group', guiInline = true, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party', nil, nil, true)end, - args ={ - showPlayer ={ + args = { + showPlayer = { order = 1, type = 'toggle', name = L['Display Player'], desc = L['When true, the header includes the player when not in a raid.'], }, - visibility ={ + visibility = { order = 2, type = 'input', name = L['Visibility'], @@ -241,14 +243,14 @@ SuperVillain.Options.args.SVUnit.args.party ={ }, }, }, - sortingGroup ={ + sortingGroup = { order = 300, type = 'group', guiInline = true, name = L['Grouping & Sorting'], set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party");MOD:SetGroupFrame('party', nil, nil, true)end, - args ={ - sortMethod ={ + args = { + sortMethod = { order = 1, name = L['Group By'], desc = L['Set the order that the group will sort.'], @@ -263,36 +265,36 @@ SuperVillain.Options.args.SVUnit.args.party ={ ["GROUP"] = GROUP, }, }, - sortDir ={ + sortDir = { order = 2, name = L['Sort Direction'], desc = L['Defines the sort order of the selected sort method.'], type = 'select', - values ={ + values = { ['ASC'] = L['Ascending'], ['DESC'] = L['Descending'], }, }, - spacer ={ + spacer = { order = 3, type = 'description', width = 'full', name = ' ', }, - customSorting ={ + customSorting = { order = 4, name = L['Custom Sorting'], desc = L['Enabling this allows unique sorting.'], type = 'toggle', }, - invertGroupingOrder ={ + invertGroupingOrder = { order = 5, name = L['Invert Grouping Order'], desc = L['Enabling this inverts the sorting order.'], disabled = function()return not SuperVillain.db.SVUnit['party'].customSorting end, type = 'toggle', }, - startFromCenter ={ + startFromCenter = { order = 6, name = L['Start Near Center'], desc = L['The initial group will start near the center and grow out.'], @@ -304,20 +306,20 @@ SuperVillain.Options.args.SVUnit.args.party ={ }, }, - auraWatch ={ + auraWatch = { order = 600, type = 'group', name = L['Aura Watch'], get = function(l)return SuperVillain.db.SVUnit['party']['auraWatch'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "auraWatch");MOD:SetGroupFrame('party')end, - args ={ - enable ={ + args = { + enable = { type = 'toggle', name = L['Enable'], order = 1, }, - size ={ + size = { type = 'range', name = L['Size'], desc = L['Size of the indicator icon.'], @@ -326,7 +328,7 @@ SuperVillain.Options.args.SVUnit.args.party ={ max = 15, step = 1, }, - configureButton ={ + configureButton = { type = 'execute', name = L['Configure Auras'], func = function()ns:SetToFilterConfig('BuffWatch')end, @@ -342,42 +344,50 @@ SuperVillain.Options.args.SVUnit.args.party ={ portrait = ns:SetPortraitConfigGroup(MOD.SetGroupFrame, 'party'), buffs = ns:SetAuraConfigGroup(true, 'buffs', true, MOD.SetGroupFrame, 'party'), debuffs = ns:SetAuraConfigGroup(true, 'debuffs', true, MOD.SetGroupFrame, 'party'), - petsGroup ={ + petsGroup = { order = 800, type = 'group', name = L['Party Pets'], get = function(l)return SuperVillain.db.SVUnit['party']['petsGroup'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "petsGroup");MOD:SetGroupFrame('party')end, - args ={ - enable ={ + args = { + enable = { type = 'toggle', name = L['Enable'], order = 1, }, - width ={ + gridAllowed = { + type = 'toggle', order = 2, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit['party']['petsGroup'].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit['party']['petsGroup'].gridAllowed = m; MOD:SetGroupFrame('party') end, + }, + width = { + order = 3, name = L['Width'], type = 'range', min = 10, max = 500, step = 1, }, - height ={ - order = 3, + height = { + order = 4, name = L['Height'], type = 'range', min = 10, max = 250, step = 1, }, - anchorPoint ={ + anchorPoint = { type = 'select', order = 5, name = L['Anchor Point'], desc = L['What point to anchor to the frame you set to attach to.'], values = {TOPLEFT='TOPLEFT',LEFT='LEFT',BOTTOMLEFT='BOTTOMLEFT',RIGHT='RIGHT',TOPRIGHT='TOPRIGHT',BOTTOMRIGHT='BOTTOMRIGHT',CENTER='CENTER',TOP='TOP',BOTTOM='BOTTOM'}, }, - xOffset ={ + xOffset = { order = 6, type = 'range', name = L['xOffset'], @@ -386,7 +396,7 @@ SuperVillain.Options.args.SVUnit.args.party ={ max = 500, step = 1, }, - yOffset ={ + yOffset = { order = 7, type = 'range', name = L['yOffset'], @@ -412,43 +422,51 @@ SuperVillain.Options.args.SVUnit.args.party ={ } }, }, - targetsGroup ={ + targetsGroup = { order = 900, type = 'group', name = L['Party Targets'], get = function(l)return SuperVillain.db.SVUnit['party']['targetsGroup'][l[#l]]end, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "party", "targetsGroup");MOD:SetGroupFrame('party')end, - args ={ - enable ={ + args = { + enable = { type = 'toggle', name = L['Enable'], order = 1, }, - width ={ + gridAllowed = { + type = 'toggle', order = 2, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit['party']['targetsGroup'].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit['party']['targetsGroup'].gridAllowed = m; MOD:SetGroupFrame('party') end, + }, + width = { + order = 3, name = L['Width'], type = 'range', min = 10, max = 500, step = 1, }, - height ={ - order = 3, + height = { + order = 4, name = L['Height'], type = 'range', min = 10, max = 250, step = 1, }, - anchorPoint ={ + anchorPoint = { type = 'select', order = 5, name = L['Anchor Point'], desc = L['What point to anchor to the frame you set to attach to.'], values = {TOPLEFT='TOPLEFT',LEFT='LEFT',BOTTOMLEFT='BOTTOMLEFT',RIGHT='RIGHT',TOPRIGHT='TOPRIGHT',BOTTOMRIGHT='BOTTOMRIGHT',CENTER='CENTER',TOP='TOP',BOTTOM='BOTTOM'}, }, - xOffset ={ + xOffset = { order = 6, type = 'range', name = L['xOffset'], @@ -457,7 +475,7 @@ SuperVillain.Options.args.SVUnit.args.party ={ max = 500, step = 1, }, - yOffset ={ + yOffset = { order = 7, type = 'range', name = L['yOffset'], diff --git a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua index c8fb17b..0909417 100644 --- a/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua +++ b/Interface/AddOns/SVUI_ConfigOMatic/modules/units/raid.lua @@ -74,6 +74,14 @@ for w=10,40,15 do type = "group", name = L["General Settings"], args = { + gridAllowed = { + type = 'toggle', + order = 1, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit["raid" .. w].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit["raid" .. w].gridAllowed = m; MOD:SetGroupFrame("raid" .. w) end, + }, hideonnpc = { type = "toggle", @@ -125,26 +133,10 @@ for w=10,40,15 do guiInline = true, set = function(l, m)MOD:ChangeDBVar(m, l[#l], "raid" .. w);MOD:SetGroupFrame("raid" .. w, nil, nil, true)end, args = - { - gridMode = - { - order = 1, - name = L["Enable Grid mode"], - type = "toggle", - set = function(l, m) - MOD:ChangeDBVar(m, l[#l], "raid" .. w); - MOD:SetGroupFrame("raid" .. w) - MOD:ChangeDBVar(m, l[#l], "raidpet"); - MOD:SetGroupFrame("raidpet") - MOD:ChangeDBVar(m, l[#l], "tank"); - MOD:SetGroupFrame("tank") - MOD:ChangeDBVar(m, l[#l], "assist"); - MOD:SetGroupFrame("assist") - end, - }, + { width = { - order = 2, + order = 1, name = L["Width"], type = "range", min = 10, @@ -154,7 +146,7 @@ for w=10,40,15 do }, height = { - order = 3, + order = 2, name = L["Height"], type = "range", min = 10, @@ -164,14 +156,14 @@ for w=10,40,15 do }, spacer = { - order = 4, + order = 3, name = "", type = "description", width = "full", }, showBy = { - order = 5, + order = 4, name = L["Growth Direction"], desc = L["Growth direction from the first unitframe."], type = "select", @@ -189,7 +181,7 @@ for w=10,40,15 do }, groupCount = { - order = 7, + order = 5, type = "range", name = L["Number of Groups"], min = 1, @@ -206,7 +198,7 @@ for w=10,40,15 do }, gRowCol = { - order = 8, + order = 6, type = "range", name = L["Groups Per Row / Column"], min = 1, @@ -223,7 +215,7 @@ for w=10,40,15 do }, wrapXOffset = { - order = 9, + order = 7, type = "range", name = L["Horizontal Spacing"], min = 0, @@ -232,7 +224,7 @@ for w=10,40,15 do }, wrapYOffset = { - order = 10, + order = 8, type = "range", name = L["Vertical Spacing"], min = 0, @@ -475,6 +467,14 @@ SuperVillain.Options.args.SVUnit.args.raidpet ={ type='group', name=L['General Settings'], args={ + gridAllowed = { + type = 'toggle', + order = 1, + name = L['Grid Mode Allowed'], + desc = L['If grid-mode is enabled, these units will be changed.'], + get = function(l)return SuperVillain.db.SVUnit["raidpet"].gridAllowed end, + set = function(l, m) SuperVillain.db.SVUnit["raidpet"].gridAllowed = m; MOD:SetGroupFrame("raidpet") end, + }, rangeCheck ={ order = 3, name = L["Range Check"], diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua index 836e296..eed7439 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.lua @@ -295,15 +295,13 @@ function PLUGIN:MakeLogWindow() title:SetInsertMode('TOP') title.divider = title:CreateTexture(nil,"OVERLAY") - title.divider:SetTexture(classR, classG, classB) - title.divider:SetAlpha(classA) + title.divider:SetTexture(0,0,0,0.5) title.divider:SetPoint("BOTTOMLEFT") title.divider:SetPoint("BOTTOMRIGHT") title.divider:SetHeight(1) local topleftline = title:CreateTexture(nil,"OVERLAY") - topleftline:SetTexture(classR, classG, classB) - topleftline:SetAlpha(classA) + topleftline:SetTexture(0,0,0,0.5) topleftline:SetPoint("TOPLEFT") topleftline:SetPoint("BOTTOMLEFT") topleftline:SetWidth(1) @@ -325,8 +323,7 @@ function PLUGIN:MakeLogWindow() log:SetInsertMode('TOP') local bottomleftline = log:CreateTexture(nil,"OVERLAY") - bottomleftline:SetTexture(classR, classG, classB) - bottomleftline:SetAlpha(classA) + bottomleftline:SetTexture(0,0,0,0.5) bottomleftline:SetPoint("TOPLEFT") bottomleftline:SetPoint("BOTTOMLEFT") bottomleftline:SetWidth(1) diff --git a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc index 42d5838..f0552a2 100644 --- a/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc +++ b/Interface/AddOns/SVUI_Laborer/SVUI_Laborer.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 1.081 +## Version: 5.02 ## Title: |cffFF9900SVUI |r|cffFFEF00Laborer|r ## Notes: Supervillain UI [|cff9911FFProfession Tools|r]. ## SavedVariables: LABOR_Data diff --git a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc index 5ccb4a4..025289e 100644 --- a/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc +++ b/Interface/AddOns/SVUI_LogOMatic/SVUI_LogOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch -## Version: 1.081 +## Version: 5.02 ## Title: |cffFF9900SVUI |r|cffFFEF00Log O Matic|r ## Notes: Supervillain UI [|cff9911FFData Logging|r]. ## SavedVariables: SVLOG_Data diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua index f0641ca..3925868 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.lua @@ -74,7 +74,7 @@ PLUGIN.OptionsCache = { name = "Ace3" }, } -}; +} PLUGIN.Debugging = false --[[ ########################################################## @@ -416,6 +416,11 @@ local function LoadOptions() name = L["Black Market AH"], desc = L["TOGGLEART_DESC"] }, + chat = { + type = "toggle", + name = L["Chat Menus"], + desc = L["TOGGLEART_DESC"] + }, transmogrify = { type = "toggle", name = L["Transmogrify Frame"], @@ -731,7 +736,8 @@ CONFIGS["SVStyle"] = { ["blizzard"] = { ["enable"] = true, ["bags"] = true, - ["bmah"] = true, + ["bmah"] = true, + ["chat"] = true, ["reforge"] = true, ["calendar"] = true, ["achievement"] = true, diff --git a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc index 191e60d..ad8b119 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc +++ b/Interface/AddOns/SVUI_StyleOMatic/SVUI_StyleOMatic.toc @@ -1,6 +1,6 @@ ## Interface: 60000 ## Author: Munglunch, Azilroka, Sortokk -## Version: 4.082 +## Version: 5.02 ## Title: |cffFF9900SVUI |r|cffFFEF00Style O Matic|r ## Notes: Supervillain UI [|cff9911FFAddon Skins|r]. ## RequiredDeps: SVUI diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml b/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml index 3cbb84d..969f53a 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/_load.xml @@ -9,6 +9,7 @@ <Script file='blackmarket.lua'/> <Script file='calendar.lua'/> <Script file='challenges.lua'/> + <Script file='chat.lua'/> <Script file='character.lua'/> <Script file='dressup.lua'/> <Script file='encounterjournal.lua'/> diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua index db954e1..8a5fb1d 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/achievement.lua @@ -70,11 +70,11 @@ local function AchievementStyle() STYLE:ApplyCloseButtonStyle(AchievementFrameCloseButton, AchievementFrame.Panel) STYLE:ApplyDropdownStyle(AchievementFrameFilterDropDown) AchievementFrameFilterDropDown:Point("TOPRIGHT", AchievementFrame, "TOPRIGHT", -44, 5) - STYLE:ApplyScrollStyle(AchievementFrameCategoriesContainerScrollBar, 5) - STYLE:ApplyScrollStyle(AchievementFrameAchievementsContainerScrollBar, 5) - STYLE:ApplyScrollStyle(AchievementFrameStatsContainerScrollBar, 5) - STYLE:ApplyScrollStyle(AchievementFrameComparisonContainerScrollBar, 5) - STYLE:ApplyScrollStyle(AchievementFrameComparisonStatsContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameCategoriesContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameAchievementsContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameStatsContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(AchievementFrameComparisonStatsContainerScrollBar, 5) for f = 1, 3 do STYLE:ApplyTabStyle(_G["AchievementFrameTab"..f]) _G["AchievementFrameTab"..f]:SetFrameLevel(_G["AchievementFrameTab"..f]:GetFrameLevel()+2) @@ -101,7 +101,7 @@ local function AchievementStyle() end; for f = 1, 20 do local d = _G["AchievementFrameCategoriesContainerButton"..f] - STYLE:ApplyLinkButtonStyle(d) + STYLE:ApplyItemButtonStyle(d) end; k.containerStyleed = true end) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua index ce87424..474c3ad 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/alert.lua @@ -24,21 +24,21 @@ local function AlphaHelper(this, value, flag) if value ~= 1 and flag ~= true then d:SetAlpha(1, true) end -end; +end --[[ ########################################################## ALERTFRAME STYLER ########################################################## ]]-- local function AlertStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.alertframes ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.alertframes ~= true then return end for i = 1, 4 do local alert = _G["SVUI_SystemAlert"..i]; if(alert) then for b = 1, 3 do alert.buttons[b]:SetButtonTemplate() - end; + end alert:Formula409() STYLE:ApplyAlertStyle(alert) alert.input:SetEditboxTemplate() @@ -57,10 +57,10 @@ local function AlertStyle() frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) if not frame.Panel then - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:Point("TOPLEFT", _G[frame:GetName().."Background"], "TOPLEFT", -2, -6) frame.Panel:Point("BOTTOMRIGHT", _G[frame:GetName().."Background"], "BOTTOMRIGHT", -2, 6) - end; + end _G["AchievementAlertFrame"..i.."Background"]:SetTexture(0,0,0,0) _G["AchievementAlertFrame"..i.."OldAchievement"]:MUNG() _G["AchievementAlertFrame"..i.."Glow"]:MUNG() @@ -91,10 +91,10 @@ local function AlertStyle() frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) if not frame.Panel then - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) - end; + end frame.shine:MUNG() frame.glowFrame:MUNG() frame.glowFrame.glow:MUNG() @@ -124,14 +124,14 @@ local function AlertStyle() frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) if not frame.Panel then - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) - end; + end local j = select(2, frame:GetRegions()) if j:GetObjectType() == "Texture"then if j:GetTexture() == "Interface\\GuildFrame\\GuildChallenges"then j:MUNG()end - end; + end GuildChallengeAlertFrameGlow:MUNG() GuildChallengeAlertFrameShine:MUNG() GuildChallengeAlertFrameEmblemBorder:MUNG() @@ -141,7 +141,7 @@ local function AlertStyle() GuildChallengeAlertFrameEmblemIcon.b:Point("TOPLEFT", GuildChallengeAlertFrameEmblemIcon, "TOPLEFT", -3, 3) GuildChallengeAlertFrameEmblemIcon.b:Point("BOTTOMRIGHT", GuildChallengeAlertFrameEmblemIcon, "BOTTOMRIGHT", 3, -2) GuildChallengeAlertFrameEmblemIcon:SetParent(GuildChallengeAlertFrameEmblemIcon.b) - end; + end SetLargeGuildTabardTextures("player", GuildChallengeAlertFrameEmblemIcon, nil, nil) end end) @@ -152,16 +152,16 @@ local function AlertStyle() frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) if not frame.Panel then - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", 19, -6) frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -22, 6) - end; + end for i = 1, frame:GetNumRegions()do local j = select(i, frame:GetRegions()) if j:GetObjectType() == "Texture"then if j:GetTexture() == "Interface\\Challenges\\challenges-main" then j:MUNG() end end - end; + end ChallengeModeAlertFrame1Shine:MUNG() ChallengeModeAlertFrame1GlowFrame:MUNG() ChallengeModeAlertFrame1GlowFrame.glow:MUNG() @@ -184,16 +184,16 @@ local function AlertStyle() frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) if not frame.Panel then - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", 4, 4) frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -7, 6) - end; + end for i = 1, frame:GetNumRegions()do local j = select(i, frame:GetRegions()) if j:GetObjectType() == "Texture"then if j:GetTexture() == "Interface\\Scenarios\\ScenariosParts" then j:MUNG() end end - end; + end ScenarioAlertFrame1Shine:MUNG() ScenarioAlertFrame1GlowFrame:MUNG() ScenarioAlertFrame1GlowFrame.glow:MUNG() @@ -216,10 +216,10 @@ local function AlertStyle() frame:SetAlpha(1) hooksecurefunc(frame, "SetAlpha", AlphaHelper) if not frame.Panel then - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:Point("TOPLEFT", frame, "TOPLEFT", -2, -6) frame.Panel:Point("BOTTOMRIGHT", frame, "BOTTOMRIGHT", -2, 6) - end; + end _G["CriteriaAlertFrame"..i.."Unlocked"]:SetTextColor(1, 1, 1) _G["CriteriaAlertFrame"..i.."Name"]:SetTextColor(1, 1, 0) _G["CriteriaAlertFrame"..i.."Background"]:MUNG() @@ -233,7 +233,7 @@ local function AlertStyle() _G["CriteriaAlertFrame"..i.."IconTexture"].b:Point("TOPLEFT", _G["CriteriaAlertFrame"..i.."IconTexture"], "TOPLEFT", -3, 3) _G["CriteriaAlertFrame"..i.."IconTexture"].b:Point("BOTTOMRIGHT", _G["CriteriaAlertFrame"..i.."IconTexture"], "BOTTOMRIGHT", 3, -2) _G["CriteriaAlertFrame"..i.."IconTexture"]:SetParent(_G["CriteriaAlertFrame"..i.."IconTexture"].b) - end; + end _G["CriteriaAlertFrame"..i.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) end end @@ -255,9 +255,9 @@ local function AlertStyle() frame.Icon.b:SetFixedPanelTemplate("Default") frame.Icon.b:WrapOuter(frame.Icon) frame.Icon:SetParent(frame.Icon.b) - end; + end if not frame.Panel then - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) end @@ -279,9 +279,9 @@ local function AlertStyle() frame.Icon.b:SetFixedPanelTemplate("Default") frame.Icon.b:WrapOuter(frame.Icon) frame.Icon:SetParent(frame.Icon.b) - end; + end if not frame.Panel then - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) end @@ -299,7 +299,7 @@ local function AlertStyle() frame.Icon.b:SetFixedPanelTemplate("Default") frame.Icon.b:WrapOuter(frame.Icon) frame.Icon:SetParent(frame.Icon.b) - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) @@ -315,10 +315,10 @@ local function AlertStyle() frame.Icon.b:SetFixedPanelTemplate("Default") frame.Icon.b:WrapOuter(frame.Icon) frame.Icon:SetParent(frame.Icon.b) - frame:SetPanelTemplate("Transparent", true) + frame:SetBasicPanel() frame.Panel:SetPoint("TOPLEFT", frame.Icon.b, "TOPLEFT", -4, 4) frame.Panel:SetPoint("BOTTOMRIGHT", frame.Icon.b, "BOTTOMRIGHT", 180, -4) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua index 63e6c84..4bff2f3 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/archeology.lua @@ -29,7 +29,7 @@ SuperVillain:SetSVMovable(progressBarHolder, "Archeology Progress Bar") local function ArchaeologyStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.archaeology ~= true then return end ArchaeologyFrame:Formula409() ArchaeologyFrameInset:Formula409() - ArchaeologyFrame:SetPanelTemplate("Transparent") + ArchaeologyFrame:SetPanelTemplate("Halftone") ArchaeologyFrame.Panel:SetAllPoints() ArchaeologyFrame.portrait:SetAlpha(0) ArchaeologyFrameInset:SetPanelTemplate("Inset") diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua index cfb8d78..87c46e5 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/auctionhouse.lua @@ -81,7 +81,7 @@ AUCTIONFRAME STYLER local function AuctionStyle() if(SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.auctionhouse ~= true) then return end; STYLE:ApplyCloseButtonStyle(AuctionFrameCloseButton) - STYLE:ApplyScrollStyle(AuctionsScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(AuctionsScrollFrameScrollBar) AuctionFrame:Formula409(true) AuctionFrame:SetPanelTemplate("Halftone", false, 2) BrowseFilterScrollFrame:Formula409() @@ -91,8 +91,8 @@ local function AuctionStyle() STYLE:ApplyDropdownStyle(BrowseDropDown) STYLE:ApplyDropdownStyle(PriceDropDown) STYLE:ApplyDropdownStyle(DurationDropDown) - STYLE:ApplyScrollStyle(BrowseFilterScrollFrameScrollBar) - STYLE:ApplyScrollStyle(BrowseScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(BrowseFilterScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(BrowseScrollFrameScrollBar) IsUsableCheckButton:SetCheckboxTemplate(true) ShowOnPlayerCheckButton:SetCheckboxTemplate(true) ExactMatchCheckButton:SetCheckboxTemplate(true) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua index 4063373..f1cba95 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/barbershop.lua @@ -55,7 +55,7 @@ local function BarberShopStyle() BarberShopAltFormFrameBorder:Formula409() BarberShopAltFormFrame:Point("BOTTOM", BarberShopFrame, "TOP", 0, 5) BarberShopAltFormFrame:Formula409() - BarberShopAltFormFrame:SetPanelTemplate("Transparent", true) + BarberShopAltFormFrame:SetBasicPanel() end; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua index 47780cb..ccdf5c6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/blackmarket.lua @@ -38,7 +38,7 @@ local function BlackMarketStyle() BlackMarketFrame.Inset:Formula409() BlackMarketFrame.Inset:SetFixedPanelTemplate("Inset") STYLE:ApplyCloseButtonStyle(BlackMarketFrame.CloseButton) - STYLE:ApplyScrollStyle(BlackMarketScrollFrameScrollBar, 4) + STYLE:ApplyScrollFrameStyle(BlackMarketScrollFrameScrollBar, 4) ChangeTab(BlackMarketFrame.ColumnName) ChangeTab(BlackMarketFrame.ColumnLevel) @@ -63,7 +63,7 @@ local function BlackMarketStyle() if not u.styled then u:Formula409() u:SetButtonTemplate() - STYLE:ApplyLinkButtonStyle(u.Item) + STYLE:ApplyItemButtonStyle(u.Item) u.styled = true end; if v <= t then @@ -75,7 +75,7 @@ local function BlackMarketStyle() end end) BlackMarketFrame.HotDeal:Formula409() - STYLE:ApplyLinkButtonStyle(BlackMarketFrame.HotDeal.Item) + STYLE:ApplyItemButtonStyle(BlackMarketFrame.HotDeal.Item) for b = 1, BlackMarketFrame:GetNumRegions()do local y = select(b, BlackMarketFrame:GetRegions()) if y and y:GetObjectType() == "FontString" and y:GetText() == BLACK_MARKET_TITLE then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua index b3a2f40..7e14675 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/calendar.lua @@ -131,7 +131,7 @@ local function CalendarStyle() CalendarTexturePickerFrame:Formula409() CalendarTexturePickerTitleFrame:Formula409() CalendarTexturePickerFrame:SetFixedPanelTemplate("Transparent", true) - STYLE:ApplyScrollStyle(CalendarTexturePickerScrollBar) + STYLE:ApplyScrollFrameStyle(CalendarTexturePickerScrollBar) CalendarTexturePickerAcceptButton:SetButtonTemplate() CalendarTexturePickerCancelButton:SetButtonTemplate() CalendarCreateEventInviteButton:SetButtonTemplate() @@ -164,18 +164,18 @@ local function CalendarStyle() CalendarViewEventInviteList:SetFixedPanelTemplate("Transparent", true) CalendarViewEventInviteListSection:Formula409() STYLE:ApplyCloseButtonStyle(CalendarViewEventCloseButton) - STYLE:ApplyScrollStyle(CalendarViewEventInviteListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(CalendarViewEventInviteListScrollFrameScrollBar) for _,btn in pairs(CalendarButtons)do _G[btn]:SetButtonTemplate() end CalendarEventPickerFrame:Formula409() CalendarEventPickerTitleFrame:Formula409() CalendarEventPickerFrame:SetFixedPanelTemplate("Transparent", true) - STYLE:ApplyScrollStyle(CalendarEventPickerScrollBar) + STYLE:ApplyScrollFrameStyle(CalendarEventPickerScrollBar) CalendarEventPickerCloseButton:SetButtonTemplate() - STYLE:ApplyScrollStyle(CalendarCreateEventDescriptionScrollFrameScrollBar) - STYLE:ApplyScrollStyle(CalendarCreateEventInviteListScrollFrameScrollBar) - STYLE:ApplyScrollStyle(CalendarViewEventDescriptionScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(CalendarCreateEventDescriptionScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(CalendarCreateEventInviteListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(CalendarViewEventDescriptionScrollFrameScrollBar) end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua index 63e305d..04e2845 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/character.lua @@ -182,10 +182,10 @@ local function CharacterFrameStyle() return end; STYLE:ApplyCloseButtonStyle(CharacterFrameCloseButton) - STYLE:ApplyScrollStyle(CharacterStatsPaneScrollBar) - STYLE:ApplyScrollStyle(ReputationListScrollFrameScrollBar) - STYLE:ApplyScrollStyle(TokenFrameContainerScrollBar) - STYLE:ApplyScrollStyle(GearManagerDialogPopupScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(CharacterStatsPaneScrollBar) + STYLE:ApplyScrollFrameStyle(ReputationListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(TokenFrameContainerScrollBar) + STYLE:ApplyScrollFrameStyle(GearManagerDialogPopupScrollFrameScrollBar) for _,slotName in pairs(CharacterSlotNames) do local charSlot = _G["Character"..slotName] @@ -245,8 +245,8 @@ local function CharacterFrameStyle() EquipmentFlyoutFrame:HookScript("OnShow", EquipmentFlyout_OnShow) hooksecurefunc("EquipmentFlyout_Show", EquipmentFlyout_OnShow) CharacterFramePortrait:MUNG() - STYLE:ApplyScrollStyle(_G["PaperDollTitlesPaneScrollBar"], 5) - STYLE:ApplyScrollStyle(_G["PaperDollEquipmentManagerPaneScrollBar"], 5) + STYLE:ApplyScrollFrameStyle(_G["PaperDollTitlesPaneScrollBar"], 5) + STYLE:ApplyScrollFrameStyle(_G["PaperDollEquipmentManagerPaneScrollBar"], 5) for _,btn in pairs(CharFrameList)do _G[btn]:Formula409(true) end; @@ -257,8 +257,9 @@ local function CharacterFrameStyle() CharacterFrame:SetPanelTemplate("Action") CharacterModelFrame:SetPanelTemplate("Comic", false, 0) CharacterFrameExpandButton:SetFrameLevel(CharacterModelFrame:GetFrameLevel() + 5) - CharacterStatsPane:SetFixedPanelTemplate("Inset") - PaperDollTitlesPane:SetFixedPanelTemplate("Inset") + + PaperDollTitlesPane:SetBasicPanel() + PaperDollTitlesPane:HookScript("OnShow", function(f) for _,btn in pairs(PaperDollTitlesPane.buttons)do btn.BgTop:SetTexture(0,0,0,0) @@ -266,10 +267,11 @@ local function CharacterFrameStyle() 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") + btn.text:SetFont(SuperVillain.Media.font.roboto,10,"NONE","LEFT") end end) - PaperDollEquipmentManagerPane:SetFixedPanelTemplate("Inset") + + PaperDollEquipmentManagerPane:SetBasicPanel() PaperDollEquipmentManagerPaneEquipSet:SetButtonTemplate() PaperDollEquipmentManagerPaneSaveSet:SetButtonTemplate() PaperDollEquipmentManagerPaneEquipSet:Width(PaperDollEquipmentManagerPaneEquipSet:GetWidth()-8) @@ -305,9 +307,12 @@ local function CharacterFrameStyle() GearManagerDialogPopup:Point("LEFT", PaperDollFrame, "RIGHT", 4, 0) GearManagerDialogPopupScrollFrame:Formula409() GearManagerDialogPopupEditBox:Formula409() - GearManagerDialogPopupEditBox:SetFixedPanelTemplate("Default") + + GearManagerDialogPopupEditBox:SetBasicPanel() + GearManagerDialogPopupOkay:SetButtonTemplate() GearManagerDialogPopupCancel:SetButtonTemplate() + for i = 1, NUM_GEARSET_ICONS_SHOWN do local e = _G["GearManagerDialogPopupButton"..i] local texture = e.icon; @@ -325,37 +330,46 @@ local function CharacterFrameStyle() end end end) + for i = 1, 4 do STYLE:ApplyTabStyle(_G["CharacterFrameTab"..i]) - end; + end + hooksecurefunc("PaperDollFrame_UpdateSidebarTabs", PaperDoll_UpdateTabs) + for i = 1, 7 do - _G["CharacterStatsPaneCategory"..i]:Formula409() - end; + local category = _G["CharacterStatsPaneCategory"..i] + if(category) then + category:Formula409() + category:SetButtonTemplate() + end + end + ReputationFrame:Formula409(true) ReputationListScrollFrame:Formula409() ReputationDetailFrame:Formula409() - ReputationDetailFrame:SetFixedPanelTemplate("Pattern") + ReputationDetailFrame:SetBasicPanel() ReputationDetailFrame:Point("TOPLEFT", ReputationFrame, "TOPRIGHT", 4, -28) ReputationFrame:HookScript("OnShow", Reputation_OnShow) hooksecurefunc("ExpandFactionHeader", Reputation_OnShow) hooksecurefunc("CollapseFactionHeader", Reputation_OnShow) - TokenFrameContainer:SetFixedPanelTemplate("Transparent") + TokenFrameContainer:SetBasicPanel() + TokenFrame:HookScript("OnShow", function() - for i = 1, GetCurrencyListSize()do - local e = _G["TokenFrameContainerButton"..i] - if e then - e.highlight:MUNG() - e.categoryMiddle:MUNG() - e.categoryLeft:MUNG() - e.categoryRight:MUNG() - if e.icon then - e.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + for i = 1, GetCurrencyListSize() do + local currency = _G["TokenFrameContainerButton"..i] + if(currency) then + currency.highlight:MUNG() + currency.categoryMiddle:MUNG() + currency.categoryLeft:MUNG() + currency.categoryRight:MUNG() + if currency.icon then + currency.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) end end end; TokenFramePopup:Formula409() - TokenFramePopup:SetFixedPanelTemplate("Transparent", true) + TokenFramePopup:SetBasicPanel() TokenFramePopup:Point("TOPLEFT", TokenFrame, "TOPRIGHT", 4, -28) end) PetModelFrame:SetPanelTemplate("Comic",false,1,-7,-7) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua new file mode 100644 index 0000000..f843cbc --- /dev/null +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/chat.lua @@ -0,0 +1,477 @@ +--[[ +############################################################################## +_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # + ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # + __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # + ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # + ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # + _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # + __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # + _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# + ___\///////////___________\///___________\/////////_____\///////////_# +############################################################################## +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; +--[[ +########################################################## +FRAME LISTS +########################################################## +]]-- +local ChatMenuList = { + "ChatMenu", + "EmoteMenu", + "LanguageMenu", + "VoiceMacroMenu", +}; +local ChatFrameList1 = { + "ChatConfigFrame", + "ChatConfigBackgroundFrame", + "ChatConfigCategoryFrame", + "ChatConfigChatSettingsClassColorLegend", + "ChatConfigChatSettingsLeft", + "ChatConfigChannelSettingsLeft", + "ChatConfigChannelSettingsClassColorLegend", + "ChatConfigOtherSettingsCombat", + "ChatConfigOtherSettingsPVP", + "ChatConfigOtherSettingsSystem", + "ChatConfigOtherSettingsCreature", + "ChatConfigCombatSettingsFilters", + "CombatConfigMessageSourcesDoneBy", + "CombatConfigMessageSourcesDoneTo", + "CombatConfigColorsUnitColors", + "CombatConfigColorsHighlighting", + "CombatConfigColorsColorizeUnitName", + "CombatConfigColorsColorizeSpellNames", + "CombatConfigColorsColorizeDamageNumber", + "CombatConfigColorsColorizeDamageSchool", + "CombatConfigColorsColorizeEntireLine", +}; +local ChatFrameList2 = { + "ChatConfigFrameDefaultButton", + "ChatConfigFrameOkayButton", + "CombatLogDefaultButton", + "ChatConfigCombatSettingsFiltersCopyFilterButton", + "ChatConfigCombatSettingsFiltersAddFilterButton", + "ChatConfigCombatSettingsFiltersDeleteButton", + "CombatConfigSettingsSaveButton", + "ChatConfigFrameCancelButton", +}; +local ChatFrameList3 = { + "ChatConfigCategoryFrame", + "ChatConfigBackgroundFrame", + "ChatConfigChatSettingsClassColorLegend", + "ChatConfigChannelSettingsClassColorLegend", + "ChatConfigCombatSettingsFilters", + "ChatConfigCombatSettingsFiltersScrollFrame", + "CombatConfigColorsHighlighting", + "CombatConfigColorsColorizeUnitName", + "CombatConfigColorsColorizeSpellNames", + "CombatConfigColorsColorizeDamageNumber", + "CombatConfigColorsColorizeDamageSchool", + "CombatConfigColorsColorizeEntireLine", + "ChatConfigChatSettingsLeft", + "ChatConfigOtherSettingsCombat", + "ChatConfigOtherSettingsPVP", + "ChatConfigOtherSettingsSystem", + "ChatConfigOtherSettingsCreature", + "ChatConfigChannelSettingsLeft", + "CombatConfigMessageSourcesDoneBy", + "CombatConfigMessageSourcesDoneTo", + "CombatConfigColorsUnitColors", +}; +local ChatFrameList4 = { + "CombatConfigColorsColorizeSpellNames", + "CombatConfigColorsColorizeDamageNumber", + "CombatConfigColorsColorizeDamageSchool", + "CombatConfigColorsColorizeEntireLine", +}; +local ChatFrameList5 = { + "ChatConfigFrameOkayButton", + "ChatConfigFrameDefaultButton", + "CombatLogDefaultButton", + "ChatConfigCombatSettingsFiltersDeleteButton", + "ChatConfigCombatSettingsFiltersAddFilterButton", + "ChatConfigCombatSettingsFiltersCopyFilterButton", + "CombatConfigSettingsSaveButton", +}; +local ChatFrameList6 = { + "CombatConfigColorsHighlightingLine", + "CombatConfigColorsHighlightingAbility", + "CombatConfigColorsHighlightingDamage", + "CombatConfigColorsHighlightingSchool", + "CombatConfigColorsColorizeUnitNameCheck", + "CombatConfigColorsColorizeSpellNamesCheck", + "CombatConfigColorsColorizeSpellNamesSchoolColoring", + "CombatConfigColorsColorizeDamageNumberCheck", + "CombatConfigColorsColorizeDamageNumberSchoolColoring", + "CombatConfigColorsColorizeDamageSchoolCheck", + "CombatConfigColorsColorizeEntireLineCheck", + "CombatConfigFormattingShowTimeStamp", + "CombatConfigFormattingShowBraces", + "CombatConfigFormattingUnitNames", + "CombatConfigFormattingSpellNames", + "CombatConfigFormattingItemNames", + "CombatConfigFormattingFullText", + "CombatConfigSettingsShowQuickButton", + "CombatConfigSettingsSolo", + "CombatConfigSettingsParty", + "CombatConfigSettingsRaid", +}; +--[[ +########################################################## +HELPERS +########################################################## +]]-- +local ChatGeneric_OnShow = function(self) + if(not self.Panel) then + self:SetPanelTemplate("Halftone") + end +end + +local ChatMenu_OnShow = function(self) + if(not self.Panel) then + self:SetPanelTemplate("Halftone") + end + self:ClearAllPoints() + self:Point("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 30) +end + +local ChatConfigChannelSettingsLeft_OnEvent = function(self, event) + ChatConfigChannelSettingsLeft:UnregisterEvent("PLAYER_ENTERING_WORLD") + local checkBoxTable = self.checkBoxTable; + local checkBoxNameString = "ChatConfigChannelSettingsLeftCheckBox"; + local boxHeight = ChatConfigOtherSettingsCombatCheckBox1:GetHeight() or 20 + local colorsHeight = ChatConfigChatSettingsLeftCheckBox1Check:GetHeight() or 20 + for i = 1,#checkBoxTable do + local gName = ("ChatConfigChannelSettingsLeftCheckBox%d"):format(i) + local checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:Formula409() + checkbox:SetBasicPanel() + end + checkbox:SetHeight(boxHeight) + checkbox.Panel:Point("TOPLEFT",3,-1) + checkbox.Panel:Point("BOTTOMRIGHT",-3,1) + local check = _G[("%sCheck"):format(gName)] + if(check and not check.Panel) then + check:SetCheckboxTemplate(true) + end + local colors = _G[("%sColorClasses"):format(gName)] + if(colors) then + if(not colors.Panel) then + colors:SetCheckboxTemplate(true) + end + colors:SetHeight(colorsHeight) + end + end + end +end + +local ChatConfigBackgroundFrame_OnShow = function(self) + local gName, checkbox, check, colors + local boxHeight = ChatConfigOtherSettingsCombatCheckBox1:GetHeight() or 20 + local colorsHeight = ChatConfigChatSettingsLeftCheckBox1Check:GetHeight() or 20 + + for i = 1, #CHAT_CONFIG_CHAT_LEFT do + gName = ("ChatConfigChatSettingsLeftCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:Formula409() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + checkbox:SetHeight(boxHeight) + + check = _G[("%sCheck"):format(gName)] + if(check and not check.Panel) then + check:SetCheckboxTemplate(true) + end + colors = _G[("%sColorClasses"):format(gName)] + if(colors) then + if(not colors.Panel) then + colors:SetCheckboxTemplate(true) + end + colors:SetHeight(colorsHeight) + end + end + end + for i = 1, #CHAT_CONFIG_OTHER_COMBAT do + gName = ("ChatConfigOtherSettingsCombatCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:Formula409() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check and not check.Panel) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #CHAT_CONFIG_OTHER_PVP do + gName = ("ChatConfigOtherSettingsPVPCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:Formula409() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check and not check.Panel) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #CHAT_CONFIG_OTHER_SYSTEM do + gName = ("ChatConfigOtherSettingsSystemCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:Formula409() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check and not check.Panel) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #CHAT_CONFIG_CHAT_CREATURE_LEFT do + gName = ("ChatConfigOtherSettingsCreatureCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:Formula409() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check and not check.Panel) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #COMBAT_CONFIG_MESSAGESOURCES_BY do + gName = ("CombatConfigMessageSourcesDoneByCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:Formula409() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check and not check.Panel) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #COMBAT_CONFIG_MESSAGESOURCES_TO do + gName = ("CombatConfigMessageSourcesDoneToCheckBox%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:Formula409() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + + check = _G[("%sCheck"):format(gName)] + if(check and not check.Panel) then + check:SetCheckboxTemplate(true) + end + end + end + for i = 1, #COMBAT_CONFIG_UNIT_COLORS do + gName = ("CombatConfigColorsUnitColorsSwatch%d"):format(i) + checkbox = _G[gName] + if(checkbox) then + if(not checkbox.Panel) then + checkbox:Formula409() + checkbox:SetPanelTemplate("Default") + end + checkbox.Panel:Point("TOPLEFT", 3, -1) + checkbox.Panel:Point("BOTTOMRIGHT", -3, 1) + end + end + for i = 1, 4 do + gName = ("CombatConfigMessageTypesLeftCheckBox%d"):format(i) + for j = 1, 4 do + local gName2 = ("%s_%d"):format(gName, j) + if(_G[gName] and _G[gName2]) then + _G[gName]:SetCheckboxTemplate(true) + _G[gName2]:SetCheckboxTemplate(true) + end + end + + gName = ("CombatConfigMessageTypesRightCheckBox%d"):format(i) + for j = 1, 10 do + local gName2 = ("%s_%d"):format(gName, j) + if(_G[gName] and _G[gName2]) then + _G[gName]:SetCheckboxTemplate(true) + _G[gName2]:SetCheckboxTemplate(true) + end + end + + gName = ("CombatConfigMessageTypesMiscCheckBox%d"):format(i) + if(_G[gName]) then + _G[gName]:SetCheckboxTemplate(true) + end + end +end +--[[ +########################################################## +CHAT STYLER +########################################################## +]]-- +local function ChatStyle() + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.chat ~= true then + return + end + + for i = 1, #ChatMenuList do + local name = ChatMenuList[i] + local this = _G[name] + if(this) then + if(name == "ChatMenu") then + this:HookScript("OnShow", ChatMenu_OnShow) + else + this:HookScript("OnShow", ChatGeneric_OnShow) + end + end + end + + for i = 1, #ChatFrameList1 do + local name = ChatFrameList1[i] + local this = _G[name] + if(this) then + this:Formula409() + end + end + + for i = 1, #ChatFrameList2 do + local name = ChatFrameList2[i] + local this = _G[name] + if(this) then + this:SetButtonTemplate() + end + end + + ChatConfigFrameOkayButton:Point("RIGHT", ChatConfigFrameCancelButton, "RIGHT", -11, -1) + ChatConfigCombatSettingsFiltersDeleteButton:Point("TOPRIGHT", ChatConfigCombatSettingsFilters, "BOTTOMRIGHT", 0, -1) + ChatConfigCombatSettingsFiltersAddFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -1, 0) + ChatConfigCombatSettingsFiltersCopyFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersAddFilterButton, "LEFT", -1, 0) + + if(_G["CombatConfigTab1"]) then _G["CombatConfigTab1"]:Formula409() end + if(_G["CombatConfigTab2"]) then _G["CombatConfigTab2"]:Formula409() end + if(_G["CombatConfigTab3"]) then _G["CombatConfigTab3"]:Formula409() end + if(_G["CombatConfigTab4"]) then _G["CombatConfigTab4"]:Formula409() end + if(_G["CombatConfigTab5"]) then _G["CombatConfigTab5"]:Formula409() end + + CombatConfigSettingsNameEditBox:SetEditboxTemplate() + ChatConfigFrame:SetPanelTemplate("Halftone", true) + + for i = 1, #ChatFrameList3 do + local frame = _G[ChatFrameList3[i]] + if(frame) then + frame:Formula409() + frame:SetBasicPanel() + end + end + + for i = 1, #ChatFrameList4 do + local this = _G[ChatFrameList4[i]] + if(this) then + this:ClearAllPoints() + if this == CombatConfigColorsColorizeSpellNames then + this:Point("TOP",CombatConfigColorsColorizeUnitName,"BOTTOM",0,-2) + else + this:Point("TOP",_G[ChatFrameList4[i-1]],"BOTTOM",0,-2) + end + end + end + + ChatConfigChannelSettingsLeft:RegisterEvent("PLAYER_ENTERING_WORLD") + ChatConfigChannelSettingsLeft:SetScript("OnEvent", ChatConfigChannelSettingsLeft_OnEvent) + + CreateChatChannelList(ChatConfigChannelSettings, GetChannelList()) + ChatConfig_CreateCheckboxes(ChatConfigChannelSettingsLeft, CHAT_CONFIG_CHANNEL_LIST, "ChatConfigCheckBoxWithSwatchAndClassColorTemplate", CHANNELS) + ChatConfig_UpdateCheckboxes(ChatConfigChannelSettingsLeft) + + ChatConfigBackgroundFrame:SetScript("OnShow", ChatConfigBackgroundFrame_OnShow) + + for i = 1, #COMBAT_CONFIG_TABS do + local this = _G["CombatConfigTab"..i] + if(this) then + STYLE:ApplyTabStyle(this) + this:SetHeight(this:GetHeight()-2) + this:SetWidth(ceil(this:GetWidth()+1.6)) + _G["CombatConfigTab"..i.."Text"]:SetPoint("BOTTOM", 0, 10) + end + end + + CombatConfigTab1:ClearAllPoints() + CombatConfigTab1:SetPoint("BOTTOMLEFT", ChatConfigBackgroundFrame, "TOPLEFT", 6, -2) + + for i = 1, #ChatFrameList5 do + local this = _G[ChatFrameList5[i]] + if(this) then + this:SetButtonTemplate() + end + end + + ChatConfigFrameOkayButton:SetPoint("TOPRIGHT", ChatConfigBackgroundFrame, "BOTTOMRIGHT", -3, -5) + ChatConfigFrameDefaultButton:SetPoint("TOPLEFT", ChatConfigCategoryFrame, "BOTTOMLEFT", 1, -5) + CombatLogDefaultButton:SetPoint("TOPLEFT", ChatConfigCategoryFrame, "BOTTOMLEFT", 1, -5) + ChatConfigCombatSettingsFiltersDeleteButton:SetPoint("TOPRIGHT", ChatConfigCombatSettingsFilters, "BOTTOMRIGHT", -3, -1) + ChatConfigCombatSettingsFiltersCopyFilterButton:SetPoint("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -2, 0) + ChatConfigCombatSettingsFiltersAddFilterButton:SetPoint("RIGHT", ChatConfigCombatSettingsFiltersCopyFilterButton, "LEFT", -2, 0) + + for i = 1, #ChatFrameList6 do + local this = _G[ChatFrameList6[i]] + if(this) then + this:SetCheckboxTemplate(true) + end + end + + STYLE:ApplyPaginationStyle(ChatConfigMoveFilterUpButton,true) + STYLE:ApplyPaginationStyle(ChatConfigMoveFilterDownButton,true) + + ChatConfigMoveFilterUpButton:ClearAllPoints() + ChatConfigMoveFilterDownButton:ClearAllPoints() + ChatConfigMoveFilterUpButton:SetPoint("TOPLEFT",ChatConfigCombatSettingsFilters,"BOTTOMLEFT",3,0) + ChatConfigMoveFilterDownButton:SetPoint("LEFT",ChatConfigMoveFilterUpButton,24,0) + + CombatConfigSettingsNameEditBox:SetEditboxTemplate() + + ChatConfigFrame:Size(680,596) + ChatConfigFrameHeader:ClearAllPoints() + ChatConfigFrameHeader:SetPoint("TOP", ChatConfigFrame, "TOP", 0, -5) +end; +--[[ +########################################################## +STYLE LOADING +########################################################## +]]-- +STYLE:SaveCustomStyle(ChatStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua index 1dc5fa3..3213aaf 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/encounterjournal.lua @@ -32,24 +32,26 @@ local function Tab_OnLeave(this) this.backdrop:SetBackdropBorderColor(0,0,0,1) end -local function ChangeTabHelper(this, x, y) - --this:Formula409() +local function ChangeTabHelper(this, xOffset, yOffset) this:GetNormalTexture():SetTexCoord(0.1, 0.9, 0.1, 0.9) this:GetNormalTexture():FillInner() this.backdrop = CreateFrame("Frame", nil, this) this.backdrop:FillInner(this) + local level = this:GetFrameLevel() if(level > 0) then this.backdrop:SetFrameLevel(level - 1) else this.backdrop:SetFrameLevel(0) end + this.backdrop:SetPanelTemplate("Component", true) this.backdrop:SetPanelColor("dark") this:HookScript("OnEnter",Tab_OnEnter) this:HookScript("OnLeave",Tab_OnLeave) - local a,b,c,d,e = this:GetPoint() - this:Point(a,b,c,x or 7,y or e) + + local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = this:GetPoint() + this:Point(initialAnchor, anchorParent, relativeAnchor, xOffset or 7, yOffset or yPosition) end local function Outline(frame, noHighlight) @@ -99,6 +101,7 @@ local function EncounterJournalStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.encounterjournal ~= true then return end; + EncounterJournal:Formula409(true) EncounterJournalInstanceSelect:Formula409(true) EncounterJournalNavBar:Formula409(true) @@ -115,19 +118,16 @@ local function EncounterJournalStyle() EncounterJournalInstanceSelectRaidTab:Formula409(true) ChangeTabHelper(EncounterJournalEncounterFrameInfoBossTab) ChangeTabHelper(EncounterJournalEncounterFrameInfoLootTab, 0, -10) - --EncounterJournalEncounterFrameInstanceFrame:Formula409(true) EncounterJournalSearchResults:Formula409(true) - --EncounterJournal:SetPanelTemplate("Halftone") EncounterJournal:SetPanelTemplate("Action") EncounterJournal:SetPanelColor("dark") EncounterJournalInset:SetFixedPanelTemplate("Inset") EncounterJournalInstanceSelectScrollFrameScrollChild:SetFixedPanelTemplate("Default") EncounterJournalInstanceSelectScrollFrameScrollChild:SetPanelColor("dark") - -- EncounterJournalInstanceSelectScrollFrameinstance6 - -- EncounterJournalBossButton1 + EncounterJournalEncounterFrameInstanceFrame:SetFixedPanelTemplate("Inset") local comicHolder = CreateFrame('Frame', nil, EncounterJournal.encounter) @@ -147,22 +147,11 @@ local function EncounterJournalStyle() EncounterJournalInstanceSelectDungeonTab:SetButtonTemplate() EncounterJournalInstanceSelectRaidTab:SetButtonTemplate() - STYLE:ApplyScrollbarStyle(EncounterJournalEncounterFrameInfoLootScrollBar) + STYLE:ApplyScrollBarStyle(EncounterJournalEncounterFrameInfoLootScrollBar) local bgParent = EncounterJournal.encounter.instance local loreParent = EncounterJournal.encounter.instance.loreScroll - -- local lorepanel = CreateFrame('Frame', nil, EncounterJournalEncounterFrame) - -- lorepanel:SetAllPoints(bgParent) - -- local blackout = lorepanel:CreateTexture(nil, "BACKGROUND") - -- blackout:SetAllPoints(lorepanel) - -- blackout:SetTexture(0,0,0) - -- local bigBorder = CreateFrame('Frame', nil, bgParent) - -- bigBorder:SetPoint("TOPLEFT", bgParent, "TOPLEFT", 0, 0) - -- bigBorder:SetPoint("BOTTOMRIGHT", bgParent, "BOTTOMRIGHT", 0, 66) - -- Outline(bigBorder, true) - - --bgParent.loreBG:SetTexCoord(0.07, 0.93, 0.07, 0.7) bgParent.loreBG:SetPoint("TOPLEFT", bgParent, "TOPLEFT", 0, 0) bgParent.loreBG:SetPoint("BOTTOMRIGHT", bgParent, "BOTTOMRIGHT", 0, 90) @@ -172,11 +161,6 @@ local function EncounterJournalStyle() EncounterJournal.encounter.infoFrame.description:SetTextColor(1, 1, 1) loreParent:SetFrameLevel(loreParent:GetFrameLevel() + 10) - --EncounterJournalSearchResults:SetFixedPanelTemplate("Comic") - - --EncounterJournalNavBarButton2:Formula409(true) - --EncounterJournalNavBarButton2:SetButtonTemplate() - --EncounterJournal_ListInstances local frame = EncounterJournal.instanceSelect.scroll.child local index = 1 @@ -240,4 +224,4 @@ end; STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle('Blizzard_EncounterJournal',EncounterJournalStyle) \ No newline at end of file +STYLE:SaveBlizzardStyle('Blizzard_EncounterJournal', EncounterJournalStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua index ed5e338..fd0d8b5 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/friends.lua @@ -48,6 +48,17 @@ local FriendsFrameList1 = { "AddFriendFrame", "AddFriendNoteFrame" }; +-- local FriendsFrameList2 = { +-- "FriendsFrameBroadcastInputLeft", +-- "FriendsFrameBroadcastInputRight", +-- "FriendsFrameBroadcastInputMiddle", +-- "ChannelFrameDaughterFrameChannelNameLeft", +-- "ChannelFrameDaughterFrameChannelNameRight", +-- "ChannelFrameDaughterFrameChannelNameMiddle", +-- "ChannelFrameDaughterFrameChannelPasswordLeft", +-- "ChannelFrameDaughterFrameChannelPasswordRight", +-- "ChannelFrameDaughterFrameChannelPasswordMiddle" +-- }; local FriendsFrameButtons = { "FriendsFrameAddFriendButton", "FriendsFrameSendMessageButton", @@ -75,18 +86,18 @@ local FriendsFrameButtons = { }; local function TabCustomHelper(this) - if not this then return end; + if not this then return end for _,prop in pairs(FrameSuffix) do local frame = _G[this:GetName()..prop] frame:SetTexture(0,0,0,0) - end; + end this:GetHighlightTexture():SetTexture(0,0,0,0) this.backdrop = CreateFrame("Frame", nil, this) this.backdrop:SetFixedPanelTemplate("Default") this.backdrop:SetFrameLevel(this:GetFrameLevel()-1) this.backdrop:Point("TOPLEFT", 3, -8) this.backdrop:Point("BOTTOMRIGHT", -6, 0) -end; +end local function ChannelList_OnUpdate() for i = 1, MAX_DISPLAY_CHANNEL_BUTTONS do @@ -97,7 +108,7 @@ local function ChannelList_OnUpdate() _G["ChannelButton"..i.."Text"]:SetFontTemplate(nil, 12) end end -end; +end --[[ ########################################################## FRIENDSFRAME STYLER @@ -106,15 +117,28 @@ FRIENDSFRAME STYLER local function FriendsFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.friends ~= true then return - end; - STYLE:ApplyScrollStyle(FriendsFrameFriendsScrollFrameScrollBar, 5) - STYLE:ApplyScrollStyle(WhoListScrollFrameScrollBar, 5) - STYLE:ApplyScrollStyle(ChannelRosterScrollFrameScrollBar, 5) - STYLE:ApplyScrollStyle(FriendsFriendsScrollFrameScrollBar) + end + + FriendsFrame.Panel = CreateFrame('Frame', nil, FriendsFrame) + FriendsFrame.Panel:WrapOuter(FriendsFrame) + + local panelLevel = FriendsFrame:GetFrameLevel() + + if((panelLevel - 1) >= 0) then + FriendsFrame.Panel:SetFrameLevel(panelLevel - 1) + else + FriendsFrame.Panel:SetFrameLevel(0) + end + FriendsFrame.Panel:SetPanelTemplate("Halftone") + + STYLE:ApplyScrollFrameStyle(FriendsFrameFriendsScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(WhoListScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(ChannelRosterScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(FriendsFriendsScrollFrameScrollBar) FriendsFrameInset:Formula409() WhoFrameListInset:Formula409() WhoFrameEditBoxInset:Formula409() - WhoFrameEditBoxInset:SetEditboxTemplate() + STYLE:ApplyEditBoxStyle(WhoFrameEditBoxInset) ChannelFrameRightInset:Formula409() ChannelFrameLeftInset:Formula409() ChannelFrameRightInset:SetFixedPanelTemplate("Inset", true) @@ -123,22 +147,30 @@ local function FriendsFrameStyle() LFRQueueFrameRoleInset:Formula409() LFRQueueFrameCommentInset:Formula409() LFRQueueFrameListInset:SetFixedPanelTemplate("Inset", true) - FriendsFrameFriendsScrollFrame:SetPanelTemplate("Transparent", true) + FriendsFrameFriendsScrollFrame:SetBasicPanel() FriendsFrameFriendsScrollFrame.Panel:Point("TOPRIGHT", -4, 0) - WhoFrameListInset:SetPanelTemplate("Transparent", true, 1, -2, -2) + WhoFrameListInset:SetBasicPanel() + for c, e in pairs(FriendsFrameButtons)do _G[e]:SetButtonTemplate() - end; + end + + -- for c, texture in pairs(FriendsFrameList2)do + -- _G[texture]:MUNG() + -- end + for c, V in pairs(FriendsFrameList1)do _G[V]:Formula409() - end; + end + for u = 1, FriendsFrame:GetNumRegions()do local a1 = select(u, FriendsFrame:GetRegions()) if a1:GetObjectType() == "Texture"then a1:SetTexture(0,0,0,0) a1:SetAlpha(0) end - end; + end + FriendsFrameStatusDropDown:SetPoint('TOPLEFT', FriendsTabHeader, 'TOPLEFT', 0, -27) STYLE:ApplyDropdownStyle(FriendsFrameStatusDropDown, 70) FriendsFrameBattlenetFrame:Formula409() @@ -165,41 +197,51 @@ local function FriendsFrameStyle() AddFriendFrame:SetFixedPanelTemplate("Transparent", true) ScrollOfResurrectionSelectionFrame:SetFixedPanelTemplate('Transparent') ScrollOfResurrectionSelectionFrameList:SetFixedPanelTemplate('Default') - STYLE:ApplyScrollStyle(ScrollOfResurrectionSelectionFrameListScrollFrameScrollBar, 4) + STYLE:ApplyScrollFrameStyle(ScrollOfResurrectionSelectionFrameListScrollFrameScrollBar, 4) ScrollOfResurrectionSelectionFrameTargetEditBox:SetEditboxTemplate() FriendsFrameBroadcastInput:SetPanelTemplate("Default") ChannelFrameDaughterFrameChannelName:SetPanelTemplate("Default") ChannelFrameDaughterFrameChannelPassword:SetPanelTemplate("Default") + ChannelFrame:HookScript("OnShow", function() ChannelRosterScrollFrame:Formula409() end) + hooksecurefunc("FriendsFrame_OnEvent", function() ChannelRosterScrollFrame:Formula409() end) + WhoFrame:HookScript("OnShow", function() ChannelRosterScrollFrame:Formula409() end) + hooksecurefunc("FriendsFrame_OnEvent", function() WhoListScrollFrame:Formula409() end) - ChannelFrameDaughterFrame:SetPanelTemplate("Transparent", true) - FriendsFrame:SetPanelTemplate("Halftone") + + ChannelFrameDaughterFrame:SetBasicPanel() STYLE:ApplyCloseButtonStyle(ChannelFrameDaughterFrameDetailCloseButton, ChannelFrameDaughterFrame) STYLE:ApplyCloseButtonStyle(FriendsFrameCloseButton, FriendsFrame.Panel) STYLE:ApplyDropdownStyle(WhoFrameDropDown, 150) + for i = 1, 4 do STYLE:ApplyTabStyle(_G["FriendsFrameTab"..i]) - end; + end + for i = 1, 3 do TabCustomHelper(_G["FriendsTabHeaderTab"..i]) - end; + end + hooksecurefunc("ChannelList_Update", ChannelList_OnUpdate) - FriendsFriendsFrame:SetPanelTemplate("Transparent", true) + FriendsFriendsFrame:SetBasicPanel() + _G["FriendsFriendsFrame"]:Formula409() _G["FriendsFriendsList"]:Formula409() _G["FriendsFriendsNoteFrame"]:Formula409() + _G["FriendsFriendsSendRequestButton"]:SetButtonTemplate() _G["FriendsFriendsCloseButton"]:SetButtonTemplate() + FriendsFriendsList:SetEditboxTemplate() FriendsFriendsNoteFrame:SetEditboxTemplate() STYLE:ApplyDropdownStyle(FriendsFriendsFrameDropDown, 150) @@ -211,7 +253,7 @@ local function FriendsFrameStyle() BNConversationInviteDialogCancelButton:SetButtonTemplate() for i = 1, BN_CONVERSATION_INVITE_NUM_DISPLAYED do _G["BNConversationInviteDialogListFriend"..i].checkButton:SetCheckboxTemplate(true) - end; + end FriendsTabHeaderSoRButton:SetFixedPanelTemplate('Default') FriendsTabHeaderSoRButton:SetButtonTemplate() FriendsTabHeaderSoRButtonIcon:SetDrawLayer('OVERLAY') @@ -223,10 +265,11 @@ local function FriendsFrameStyle() FriendsTabHeaderRecruitAFriendButtonIcon:SetDrawLayer('OVERLAY') FriendsTabHeaderRecruitAFriendButtonIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) FriendsTabHeaderRecruitAFriendButtonIcon:FillInner() + FriendsFrameIgnoreScrollFrame:SetFixedPanelTemplate("Inset") - STYLE:ApplyScrollStyle(FriendsFrameIgnoreScrollFrameScrollBar, 4) + STYLE:ApplyScrollFrameStyle(FriendsFrameIgnoreScrollFrameScrollBar, 4) FriendsFramePendingScrollFrame:SetFixedPanelTemplate("Inset") - STYLE:ApplyScrollStyle(FriendsFramePendingScrollFrameScrollBar, 4) + STYLE:ApplyScrollFrameStyle(FriendsFramePendingScrollFrameScrollBar, 4) IgnoreListFrame:Formula409() PendingListFrame:Formula409() ScrollOfResurrectionFrame:Formula409() @@ -239,7 +282,7 @@ local function FriendsFrameStyle() ScrollOfResurrectionFrameNoteFrame:SetFixedPanelTemplate() ScrollOfResurrectionFrameTargetEditBox:SetFixedPanelTemplate() ScrollOfResurrectionFrame:SetFixedPanelTemplate('Transparent') -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua index dda3630..01cc7d6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/gossip.lua @@ -35,10 +35,10 @@ local function GossipStyle() end) ItemTextFrame:SetPanelTemplate("Pattern") ItemTextFrameInset:MUNG() - STYLE:ApplyScrollStyle(ItemTextScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(ItemTextScrollFrameScrollBar) STYLE:ApplyCloseButtonStyle(ItemTextFrameCloseButton) local r = {"GossipFrameGreetingPanel", "GossipFrame", "GossipFrameInset", "GossipGreetingScrollFrame"} - STYLE:ApplyScrollStyle(GossipGreetingScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(GossipGreetingScrollFrameScrollBar, 5) for s, t in pairs(r)do _G[t]:Formula409() end; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua index 2320753..89efbaf 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/guild.lua @@ -101,7 +101,7 @@ local function GCTabHelper(tab) tab.bg3:SetDrawLayer("BACKGROUND",2) tab.bg3:SetTexture(0,0,0,1) tab.bg3:SetAllPoints(tab.Panel) -end; +end local RankOrder_OnUpdate = function() for b=1,GuildControlGetNumRanks()do @@ -112,12 +112,12 @@ local RankOrder_OnUpdate = function() frame.deleteButton:SetButtonTemplate() if not frame.nameBox.Panel then frame.nameBox:SetEditboxTemplate() - end; + end frame.nameBox.Panel:Point("TOPLEFT",-2,-4) frame.nameBox.Panel:Point("BOTTOMRIGHT",-4,4) end end -end; +end function GuildInfoEvents_SetButton(button, eventIndex) local dateData = date("*t") @@ -130,24 +130,24 @@ function GuildInfoEvents_SetButton(button, eventIndex) local year = dateData["year"] if month < dateData["month"] then year = year + 1 - end; + end local newTime = time{year = year, month = month, day = day} if(((newTime - time()) < 518400) and CALENDAR_WEEKDAY_NAMES[weekday]) then unformattedText = CALENDAR_WEEKDAY_NAMES[weekday] elseif CALENDAR_WEEKDAY_NAMES[weekday]and day and month then unformattedText = format(GUILD_NEWS_DATE, CALENDAR_WEEKDAY_NAMES[weekday], day, month) end - end; + end if button.text and unformattedText then button.text:SetFormattedText(GUILD_EVENT_FORMAT, unformattedText, formattedTime, title) - end; + end button.index = eventIndex; if button.icon.type ~= "event" then button.icon.type = "event" button.icon:SetTexCoord(0, 1, 0, 1) button.icon:SetWidth(14) button.icon:SetHeight(14) - end; + end if CalendarIconList[eventType] then button.icon:SetTexture(CalendarIconList[eventType]) else @@ -162,18 +162,20 @@ GUILDFRAME STYLERS local function GuildBankStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.gbank ~= true then return - end; + end GuildBankFrame:Formula409() GuildBankFrame:SetPanelTemplate("Halftone") GuildBankEmblemFrame:Formula409(true) GuildBankMoneyFrameBackground:MUNG() - STYLE:ApplyScrollStyle(GuildBankPopupScrollFrameScrollBar) - for b = 1, GuildBankFrame:GetNumChildren()do + STYLE:ApplyScrollFrameStyle(GuildBankPopupScrollFrameScrollBar) + + for b = 1, GuildBankFrame:GetNumChildren() do local c = select(b, GuildBankFrame:GetChildren()) if c.GetPushedTexture and c:GetPushedTexture() and not c:GetName() then STYLE:ApplyCloseButtonStyle(c) end - end; + end + GuildBankFrameDepositButton:SetButtonTemplate() GuildBankFrameWithdrawButton:SetButtonTemplate() GuildBankInfoSaveButton:SetButtonTemplate() @@ -185,43 +187,50 @@ local function GuildBankStyle() GuildBankTransactionsScrollFrame:Formula409() for b = 1, NUM_GUILDBANK_COLUMNS do - _G["GuildBankColumn"..b]:Formula409() - for d = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do - local e = _G["GuildBankColumn"..b.."Button"..d] - local icon = _G["GuildBankColumn"..b.."Button"..d.."IconTexture"] - local texture = _G["GuildBankColumn"..b.."Button"..d.."NormalTexture"] - if texture then - texture:SetTexture(0,0,0,0) - end; - e:SetSlotTemplate() - icon:FillInner() - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end - end; + if(_G["GuildBankColumn"..b]) then + _G["GuildBankColumn"..b]:Formula409() + for d = 1, NUM_SLOTS_PER_GUILDBANK_GROUP do + local e = _G["GuildBankColumn"..b.."Button"..d] + local icon = _G["GuildBankColumn"..b.."Button"..d.."IconTexture"] + local texture = _G["GuildBankColumn"..b.."Button"..d.."NormalTexture"] + if texture then + texture:SetTexture(0,0,0,0) + end + e:SetSlotTemplate() + icon:FillInner() + icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end + end + for b = 1, 8 do local e = _G["GuildBankTab"..b.."Button"] - local texture = _G["GuildBankTab"..b.."ButtonIconTexture"] - _G["GuildBankTab"..b]:Formula409(true) - e:Formula409() - e:SetButtonTemplate() - e:SetFixedPanelTemplate("Default") - texture:FillInner() - texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end; + if(e) then + local texture = _G["GuildBankTab"..b.."ButtonIconTexture"] + _G["GuildBankTab"..b]:Formula409(true) + e:Formula409() + e:SetButtonTemplate() + e:SetFixedPanelTemplate("Default") + texture:FillInner() + texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end + for b = 1, 4 do STYLE:ApplyTabStyle(_G["GuildBankFrameTab"..b]) - end; + end + hooksecurefunc('GuildBankFrame_Update', function() if GuildBankFrame.mode ~= "bank" then return - end; + end local f = GetCurrentGuildBankTab() local e, g, h, i, j, k, l, m; for b = 1, MAX_GUILDBANK_SLOTS_PER_TAB do g = mod(b, NUM_SLOTS_PER_GUILDBANK_GROUP) if g == 0 then g = NUM_SLOTS_PER_GUILDBANK_GROUP - end; + end h = ceil((b-0.5)/NUM_SLOTS_PER_GUILDBANK_GROUP) e = _G["GuildBankColumn"..h.."Button"..g] i = GetGuildBankItemLink(f, b) @@ -234,10 +243,11 @@ local function GuildBankStyle() end else k, l, m = 0,0,0,1 - end; + end e:SetBackdropBorderColor(k, l, m) end end) + GuildBankPopupFrame:Formula409() GuildBankPopupScrollFrame:Formula409() GuildBankPopupFrame:SetFixedPanelTemplate("Transparent", true) @@ -252,23 +262,27 @@ local function GuildBankStyle() GuildItemSearchBox:SetPanelTemplate("Overlay") GuildItemSearchBox.Panel:Point("TOPLEFT", 10, -1) GuildItemSearchBox.Panel:Point("BOTTOMRIGHT", 4, 1) + for b = 1, 16 do local e = _G["GuildBankPopupButton"..b] - local icon = _G[e:GetName().."Icon"] - e:Formula409() - e:SetFixedPanelTemplate("Default") - e:SetButtonTemplate() - icon:FillInner() - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - end; - STYLE:ApplyScrollStyle(GuildBankTransactionsScrollFrameScrollBar) - STYLE:ApplyScrollStyle(GuildBankInfoScrollFrameScrollBar) -end; + if(e) then + local icon = _G[e:GetName().."Icon"] + e:Formula409() + e:SetFixedPanelTemplate("Default") + e:SetButtonTemplate() + icon:FillInner() + icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + end + end + + STYLE:ApplyScrollFrameStyle(GuildBankTransactionsScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(GuildBankInfoScrollFrameScrollBar) +end local function GuildFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.guild ~= true then return - end; + end GuildFrame:Formula409(true) GuildFrame:SetPanelTemplate("Halftone") GuildLevelFrame:MUNG() @@ -276,23 +290,32 @@ local function GuildFrameStyle() STYLE:ApplyCloseButtonStyle(GuildFrameCloseButton) GuildRewardsFrameVisitText:ClearAllPoints() GuildRewardsFrameVisitText:SetPoint("TOP", GuildRewardsFrame, "TOP", 0, 30) - for s, y in pairs(GuildFrameList)do - _G[y]:Formula409() - end; - GuildNewsBossModel:SetPanelTemplate("Transparent", true) + + for _, gName in pairs(GuildFrameList)do + local frame = _G[gName] + if(frame) then + frame:Formula409() + end + end + + GuildNewsBossModel:SetBasicPanel() GuildNewsBossModelTextFrame:SetPanelTemplate("Default") GuildNewsBossModelTextFrame.Panel:Point("TOPLEFT", GuildNewsBossModel.Panel, "BOTTOMLEFT", 0, -1) - GuildNewsBossModel:Point("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -43) - for b, e in pairs(GuildButtonList)do - if b == 1 then - _G[e]:SetButtonTemplate() - else - _G[e]:SetButtonTemplate() - end - end; - for s, y in pairs(GuildCheckBoxList)do - _G["GuildRecruitment"..y.."Button"]:SetCheckboxTemplate(true) - end; + GuildNewsBossModel:SetPoint("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -43) + + for _, gName in pairs(GuildButtonList)do + local btn = _G[gName] + if(btn) then + btn:SetButtonTemplate() + end + end + + for _, gName in pairs(GuildCheckBoxList)do + if(_G["GuildRecruitment"..gName.."Button"]) then + _G["GuildRecruitment"..gName.."Button"]:SetCheckboxTemplate(true) + end + end + GuildRecruitmentTankButton.checkButton:SetCheckboxTemplate(true) GuildRecruitmentHealerButton.checkButton:SetCheckboxTemplate(true) GuildRecruitmentDamagerButton.checkButton:SetCheckboxTemplate(true) @@ -300,11 +323,12 @@ local function GuildFrameStyle() STYLE:ApplyTabStyle(_G["GuildFrameTab"..b]) if b == 1 then _G["GuildFrameTab"..b]:Point("TOPLEFT", GuildFrame, "BOTTOMLEFT", -10, 3) - end; - end; + end + end + GuildXPFrame:ClearAllPoints() GuildXPFrame:Point("TOP", GuildFrame, "TOP", 0, -40) - STYLE:ApplyScrollStyle(GuildPerksContainerScrollBar, 4) + STYLE:ApplyScrollFrameStyle(GuildPerksContainerScrollBar, 4) GuildNewPerksFrame:SetFixedPanelTemplate("Pattern") GuildFactionBar:Formula409() GuildFactionBar.progress:SetTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) @@ -330,78 +354,112 @@ local function GuildFrameStyle() GuildNextPerkButton.Panel:WrapOuter(GuildNextPerkButtonIconTexture) GuildRosterContainer:SetFixedPanelTemplate("Pattern") - STYLE:ApplyScrollStyle(GuildRosterContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(GuildRosterContainerScrollBar, 5) GuildRosterShowOfflineButton:SetCheckboxTemplate(true) - for b = 1, 4 do - _G["GuildRosterColumnButton"..b]:Formula409(true) - end; + + for i = 1, 4 do + local btn = _G["GuildRosterColumnButton"..i] + if(btn) then + btn:Formula409(true) + end + end + STYLE:ApplyDropdownStyle(GuildRosterViewDropdown, 200) - for b = 1, 14 do - _G["GuildRosterContainerButton"..b.."HeaderButton"]:SetButtonTemplate() - end; - GuildMemberDetailFrame:SetFixedPanelTemplate("Transparent", true) - GuildMemberNoteBackground:SetFixedPanelTemplate("Default") - GuildMemberOfficerNoteBackground:SetFixedPanelTemplate("Default") + for i = 1, 14 do + local btn = _G["GuildRosterContainerButton"..i.."HeaderButton"] + if(btn) then + btn:SetButtonTemplate() + end + end + + GuildMemberDetailFrame:SetPanelTemplate("Default", true) + GuildMemberNoteBackground:SetBasicPanel() + GuildMemberOfficerNoteBackground:SetBasicPanel() + GuildMemberRankDropdown:SetFrameLevel(GuildMemberRankDropdown:GetFrameLevel()+5) STYLE:ApplyDropdownStyle(GuildMemberRankDropdown, 175) GuildNewsFrame:Formula409() GuildNewsContainer:SetFixedPanelTemplate("Pattern") - for b = 1, 17 do - if _G["GuildNewsContainerButton"..b]then - _G["GuildNewsContainerButton"..b].header:MUNG() + + for i = 1, 17 do + local btn = _G["GuildNewsContainerButton"..i] + if(btn and btn.header) then + btn.header:MUNG() end - end; + end + GuildNewsFiltersFrame:Formula409() GuildNewsFiltersFrame:SetFixedPanelTemplate("Transparent", true) STYLE:ApplyCloseButtonStyle(GuildNewsFiltersFrameCloseButton) - for b = 1, 7 do - _G["GuildNewsFilterButton"..b]:SetCheckboxTemplate(true) - end; + + for i = 1, 7 do + local btn = _G["GuildNewsFilterButton"..i] + if(btn) then + btn:SetCheckboxTemplate(true) + end + end + GuildNewsFiltersFrame:Point("TOPLEFT", GuildFrame, "TOPRIGHT", 4, -20) - STYLE:ApplyScrollStyle(GuildNewsContainerScrollBar, 4) - STYLE:ApplyScrollStyle(GuildInfoDetailsFrameScrollBar, 4) - for b = 1, 3 do - _G["GuildInfoFrameTab"..b]:Formula409() - end; - local A = CreateFrame("Frame", nil, GuildInfoFrameInfo) - A:SetFixedPanelTemplate("Inset") - A:SetFrameLevel(GuildInfoFrameInfo:GetFrameLevel()-1) - A:Point("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -22) - A:Point("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 200) - local B = CreateFrame("Frame", nil, GuildInfoFrameInfo) - B:SetFixedPanelTemplate("Inset") - B:SetFrameLevel(GuildInfoFrameInfo:GetFrameLevel()-1) - B:Point("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -158) - B:Point("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 118) - local C = CreateFrame("Frame", nil, GuildInfoFrameInfo) - C:SetFixedPanelTemplate("Inset") - C:SetFrameLevel(GuildInfoFrameInfo:GetFrameLevel()-1) - C:Point("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -233) - C:Point("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 3) + STYLE:ApplyScrollFrameStyle(GuildNewsContainerScrollBar, 4) + STYLE:ApplyScrollFrameStyle(GuildInfoDetailsFrameScrollBar, 4) + + for i = 1, 3 do + local tab = _G["GuildInfoFrameTab"..i] + if(tab) then + tab:Formula409() + end + end + + local panel1 = CreateFrame("Frame", nil, GuildInfoFrameInfo) + panel1:SetPoint("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -22) + panel1:SetPoint("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 200) + panel1:SetBasicPanel() + + local panel2 = CreateFrame("Frame", nil, GuildInfoFrameInfo) + panel2:SetPoint("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -158) + panel2:SetPoint("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 118) + panel2:SetBasicPanel() + + local panel3 = CreateFrame("Frame", nil, GuildInfoFrameInfo) + panel3:SetPoint("TOPLEFT", GuildInfoFrameInfo, "TOPLEFT", 2, -233) + panel3:SetPoint("BOTTOMRIGHT", GuildInfoFrameInfo, "BOTTOMRIGHT", 0, 3) + panel3:SetBasicPanel() + GuildRecruitmentCommentInputFrame:SetFixedPanelTemplate("Default") GuildTextEditFrame:SetFixedPanelTemplate("Transparent", true) - STYLE:ApplyScrollStyle(GuildTextEditScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(GuildTextEditScrollFrameScrollBar, 5) GuildTextEditContainer:SetFixedPanelTemplate("Default") - for b = 1, GuildTextEditFrame:GetNumChildren()do - local c = select(b, GuildTextEditFrame:GetChildren()) - if c:GetName() == "GuildTextEditFrameCloseButton"and c:GetWidth() < 33 then - STYLE:ApplyCloseButtonStyle(c) - elseif c:GetName() == "GuildTextEditFrameCloseButton" then - c:SetButtonTemplate() + + local editChildren = GuildTextEditFrame:GetNumChildren() + for b = 1, editChildren do + local child = select(b, GuildTextEditFrame:GetChildren()) + if(child:GetName() == "GuildTextEditFrameCloseButton") then + if(child:GetWidth() < 33) then + STYLE:ApplyCloseButtonStyle(child) + else + child:SetButtonTemplate() + end end - end; - STYLE:ApplyScrollStyle(GuildLogScrollFrameScrollBar, 4) + end + + STYLE:ApplyScrollFrameStyle(GuildLogScrollFrameScrollBar, 4) GuildLogFrame:SetFixedPanelTemplate("Transparent", true) - for b = 1, GuildLogFrame:GetNumChildren()do - local c = select(b, GuildLogFrame:GetChildren()) - if c:GetName() == "GuildLogFrameCloseButton"and c:GetWidth() < 33 then - STYLE:ApplyCloseButtonStyle(c) - elseif c:GetName() == "GuildLogFrameCloseButton" then - c:SetButtonTemplate() + + local logChildren = GuildLogFrame:GetNumChildren() + for b = 1, logChildren do + local child = select(b, GuildLogFrame:GetChildren()) + if child:GetName() == "GuildLogFrameCloseButton" then + if(child:GetWidth() < 33) then + STYLE:ApplyCloseButtonStyle(child) + else + child:SetButtonTemplate() + end end - end; + end + GuildRewardsFrame:SetFixedPanelTemplate("Pattern") - STYLE:ApplyScrollStyle(GuildRewardsContainerScrollBar, 5) + STYLE:ApplyScrollFrameStyle(GuildRewardsContainerScrollBar, 5) + for b = 1, 8 do local button = _G["GuildPerksContainerButton"..b] if button then @@ -415,7 +473,8 @@ local function GuildFrameStyle() button.icon:SetParent(button.Panel) end end - end; + end + for b = 1, 8 do local button = _G["GuildRewardsContainerButton"..b] if button then @@ -429,31 +488,30 @@ local function GuildFrameStyle() button.icon:SetParent(button.Panel) end end - end; + end + local maxCalendarEvents = CalendarGetNumGuildEvents(); local scrollFrame = GuildInfoFrameApplicantsContainer; local offset = HybridScrollFrame_GetOffset(scrollFrame); local buttonIndex,counter = 0,0; + for _,button in next, GuildInfoFrameApplicantsContainer.buttons do counter = counter + 1; buttonIndex = offset + counter; button.selectedTex:MUNG() button:GetHighlightTexture():MUNG() - button:SetBackdrop(nil); - -- if ( buttonIndex <= maxCalendarEvents ) then - -- GuildInfoEvents_SetButton(button, buttonIndex); - -- end - end; -end; + button:SetBackdrop(nil) + end +end local function GuildControlStyle() - if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.guildcontrol~=true then return end; + if SuperVillain.db.SVStyle.blizzard.enable~=true or SuperVillain.db.SVStyle.blizzard.guildcontrol~=true then return end GuildControlUI:Formula409() GuildControlUIHbar:Formula409() GuildControlUI:SetFixedPanelTemplate("Halftone") GuildControlUIRankBankFrameInset:Formula409() GuildControlUIRankBankFrameInsetScrollFrame:Formula409() - STYLE:ApplyScrollStyle(GuildControlUIRankBankFrameInsetScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(GuildControlUIRankBankFrameInsetScrollFrameScrollBar) hooksecurefunc("GuildControlUI_RankOrder_Update",RankOrder_OnUpdate) GuildControlUIRankOrderFrameNewButton:HookScript("OnClick",function() SuperVillain:ExecuteTimer(1,RankOrder_OnUpdate) @@ -466,7 +524,7 @@ local function GuildControlStyle() if _G["GuildControlUIRankSettingsFrameCheckbox"..b]then _G["GuildControlUIRankSettingsFrameCheckbox"..b]:SetCheckboxTemplate(true) end - end; + end GuildControlUIRankOrderFrameNewButton:SetButtonTemplate() GuildControlUIRankSettingsFrameGoldBox:SetEditboxTemplate() GuildControlUIRankSettingsFrameGoldBox.Panel:Point("TOPLEFT",-2,-4) @@ -478,7 +536,7 @@ local function GuildControlStyle() local tabs = GetNumGuildBankTabs() if tabs < MAX_BUY_GUILDBANK_TABS then tabs = tabs + 1 - end; + end for b=1,tabs do local f=_G["GuildControlBankTab"..b.."Owned"] local icon=f.tabIcon; @@ -494,18 +552,18 @@ local function GuildControlStyle() GCTabHelper(_G["GuildControlBankTab"..b.."OwnedDepositCheck"]) GCTabHelper(_G["GuildControlBankTab"..b.."OwnedUpdateInfoCheck"]) end - end; + end Z=true end) STYLE:ApplyDropdownStyle(GuildControlUIRankBankFrameRankDropDown,180) GuildControlUIRankBankFrameRankDropDownButton:Width(20) -end; +end local function GuildRegistrarStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.guildregistrar ~= true then return - end; + end GuildRegistrarFrame:Formula409(true) GuildRegistrarFrame:SetPanelTemplate("Action") GuildRegistrarFrameInset:MUNG() @@ -523,20 +581,20 @@ local function GuildRegistrarStyle() a2:MUNG() end end - end; + end GuildRegistrarFrameEditBox:Height(20) for b = 1, 2 do _G["GuildRegistrarButton"..b]:GetFontString():SetTextColor(1, 1, 1) - end; + end GuildRegistrarPurchaseText:SetTextColor(1, 1, 1) AvailableServicesText:SetTextColor(1, 1, 0) -end; +end local function LFGuildFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfguild ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfguild ~= true then return end for r, I in pairs(LFGFrameList)do _G[I]:SetCheckboxTemplate(true) - end; + end LookingForGuildTankButton.checkButton:SetCheckboxTemplate(true) LookingForGuildHealerButton.checkButton:SetCheckboxTemplate(true) LookingForGuildDamagerButton.checkButton:SetCheckboxTemplate(true) @@ -545,7 +603,7 @@ local function LFGuildFrameStyle() LookingForGuildFrame:SetPanelTemplate("Action") LookingForGuildBrowseButton_LeftSeparator:MUNG() LookingForGuildRequestButton_RightSeparator:MUNG() - STYLE:ApplyScrollStyle(LookingForGuildBrowseFrameContainerScrollBar) + STYLE:ApplyScrollFrameStyle(LookingForGuildBrowseFrameContainerScrollBar) LookingForGuildBrowseButton:SetButtonTemplate() LookingForGuildRequestButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(LookingForGuildFrameCloseButton) @@ -556,20 +614,20 @@ local function LFGuildFrameStyle() local K = _G["LookingForGuildAppsFrameContainerButton"..u] J:SetBackdrop(nil) K:SetBackdrop(nil) - end; + end for u = 1, 3 do local tab = _G["LookingForGuildFrameTab"..u] STYLE:ApplyTabStyle(tab) tab:SetFrameStrata("HIGH") tab:SetFrameLevel(99) - end; + end GuildFinderRequestMembershipFrame:Formula409(true) GuildFinderRequestMembershipFrame:SetFixedPanelTemplate("Transparent", true) GuildFinderRequestMembershipFrameAcceptButton:SetButtonTemplate() GuildFinderRequestMembershipFrameCancelButton:SetButtonTemplate() GuildFinderRequestMembershipFrameInputFrame:Formula409() GuildFinderRequestMembershipFrameInputFrame:SetFixedPanelTemplate("Default") -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua index d73de09..dab4f0d 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/help.lua @@ -26,7 +26,8 @@ local HelpFrameList = { "HelpFrameKnowledgebase", "HelpFrameHeader", "HelpFrameKnowledgebaseErrorFrame" -}; +} + local HelpFrameButtonList = { "HelpFrameOpenTicketHelpItemRestoration", "HelpFrameAccountSecurityOpenTicket", @@ -38,16 +39,23 @@ local HelpFrameButtonList = { "GMChatOpenLog", "HelpFrameTicketSubmit", "HelpFrameTicketCancel" -}; +} + local function NavBarHelper(button) - for d = 1, #button.navList do - local i = button.navList[d] - local j = button.navList[d-1] - if i and j then - i:SetFrameLevel(0) + for i = 1, #button.navList do + local this = button.navList[i] + local last = button.navList[i - 1] + if this and last then + local level = last:GetFrameLevel() + if(level >= 2) then + level = level - 2 + else + level = 0 + end + this:SetFrameLevel(level) end end -end; +end --[[ ########################################################## HELPFRAME STYLER @@ -56,14 +64,14 @@ HELPFRAME STYLER local function HelpFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.help ~= true then return - end; + end tinsert(HelpFrameButtonList, "HelpFrameButton16") tinsert(HelpFrameButtonList, "HelpFrameSubmitSuggestionSubmit") tinsert(HelpFrameButtonList, "HelpFrameReportBugSubmit") for d = 1, #HelpFrameList do _G[HelpFrameList[d]]:Formula409(true) _G[HelpFrameList[d]]:SetPanelTemplate("Default") - end; + end HelpFrameHeader:SetFrameLevel(HelpFrameHeader:GetFrameLevel()+2) HelpFrameKnowledgebaseErrorFrame:SetFrameLevel(HelpFrameKnowledgebaseErrorFrame:GetFrameLevel()+2) HelpFrameReportBugScrollFrame:Formula409() @@ -75,8 +83,8 @@ local function HelpFrameStyle() if not e:GetName() then e:Formula409() end - end; - STYLE:ApplyScrollStyle(HelpFrameReportBugScrollFrameScrollBar) + end + STYLE:ApplyScrollFrameStyle(HelpFrameReportBugScrollFrameScrollBar) HelpFrameSubmitSuggestionScrollFrame:Formula409() HelpFrameSubmitSuggestionScrollFrame:SetPanelTemplate("Default") HelpFrameSubmitSuggestionScrollFrame.Panel:Point("TOPLEFT", -4, 4) @@ -86,8 +94,8 @@ local function HelpFrameStyle() if not e:GetName() then e:Formula409() end - end; - STYLE:ApplyScrollStyle(HelpFrameSubmitSuggestionScrollFrameScrollBar) + end + STYLE:ApplyScrollFrameStyle(HelpFrameSubmitSuggestionScrollFrameScrollBar) HelpFrameTicketScrollFrame:Formula409() HelpFrameTicketScrollFrame:SetPanelTemplate("Default") HelpFrameTicketScrollFrame.Panel:Point("TOPLEFT", -4, 4) @@ -97,8 +105,8 @@ local function HelpFrameStyle() if not e:GetName() then e:Formula409() end - end; - STYLE:ApplyScrollStyle(HelpFrameKnowledgebaseScrollFrame2ScrollBar) + end + STYLE:ApplyScrollFrameStyle(HelpFrameKnowledgebaseScrollFrame2ScrollBar) for d = 1, #HelpFrameButtonList do _G[HelpFrameButtonList[d]]:Formula409(true) _G[HelpFrameButtonList[d]]:SetButtonTemplate() @@ -107,19 +115,19 @@ local function HelpFrameStyle() _G[HelpFrameButtonList[d]].text:SetPoint("CENTER") _G[HelpFrameButtonList[d]].text:SetJustifyH("CENTER") end - end; + end for d = 1, 6 do local f = _G["HelpFrameButton"..d] f:SetButtonTemplate() f.text:ClearAllPoints() f.text:SetPoint("CENTER") f.text:SetJustifyH("CENTER") - end; + end for d = 1, HelpFrameKnowledgebaseScrollFrameScrollChild:GetNumChildren()do local f = _G["HelpFrameKnowledgebaseScrollFrameButton"..d] f:Formula409(true) f:SetButtonTemplate() - end; + end HelpFrameKnowledgebaseSearchBox:ClearAllPoints() HelpFrameKnowledgebaseSearchBox:Point("TOPLEFT", HelpFrameMainInset, "TOPLEFT", 13, -10) HelpFrameKnowledgebaseNavBarOverlay:MUNG() @@ -127,8 +135,8 @@ local function HelpFrameStyle() HelpFrame:Formula409(true) HelpFrame:SetPanelTemplate("Halftone") HelpFrameKnowledgebaseSearchBox:SetEditboxTemplate() - STYLE:ApplyScrollStyle(HelpFrameKnowledgebaseScrollFrameScrollBar, 5) - STYLE:ApplyScrollStyle(HelpFrameTicketScrollFrameScrollBar, 4) + STYLE:ApplyScrollFrameStyle(HelpFrameKnowledgebaseScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(HelpFrameTicketScrollFrameScrollBar, 4) STYLE:ApplyCloseButtonStyle(HelpFrameCloseButton, HelpFrame.Panel) STYLE:ApplyCloseButtonStyle(HelpFrameKnowledgebaseErrorFrameCloseButton, HelpFrameKnowledgebaseErrorFrame.Panel) HelpFrameCharacterStuckHearthstone:SetButtonTemplate() @@ -143,7 +151,7 @@ local function HelpFrameStyle() i:HookScript("OnClick", function() NavBarHelper(h) end) - end; + end NavBarHelper(h) end) HelpFrameGM_ResponseNeedMoreHelp:SetButtonTemplate() @@ -156,7 +164,7 @@ local function HelpFrameStyle() e:SetFixedPanelTemplate("Default") end end -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua index 2436a1f..ff3268f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/itemsocketing.lua @@ -27,7 +27,7 @@ local function ItemSocketStyle() ItemSocketingFrameInset:MUNG() ItemSocketingScrollFrame:Formula409() ItemSocketingScrollFrame:SetPanelTemplate("Inset", true) - STYLE:ApplyScrollStyle(ItemSocketingScrollFrameScrollBar, 2) + STYLE:ApplyScrollFrameStyle(ItemSocketingScrollFrameScrollBar, 2) for j = 1, MAX_NUM_SOCKETS do local i = _G[("ItemSocketingSocket%d"):format(j)]; local C = _G[("ItemSocketingSocket%dBracketFrame"):format(j)]; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua index 289bf1f..0b5db01 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/keybinding.lua @@ -41,10 +41,10 @@ local function BindingStyle() STYLE:ApplyScrollStyle(KeyBindingFrameScrollFrameScrollBar) KeyBindingFrame:Formula409() KeyBindingFrame:SetPanelTemplate("Halftone") -end +end --[[ ########################################################## STYLE LOADING ########################################################## ]]-- -STYLE:SaveBlizzardStyle("Blizzard_BindingUI",BindingStyle) \ No newline at end of file +STYLE:SaveBlizzardStyle("Blizzard_BindingUI", BindingStyle) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua index c2635ac..d3783ae 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/lfd.lua @@ -36,11 +36,11 @@ local LFDFrameList = { local Incentive_OnShow = function(button) ActionButton_ShowOverlayGlow(button:GetParent().checkButton) -end; +end local Incentive_OnHide = function(button) ActionButton_HideOverlayGlow(button:GetParent().checkButton) -end; +end local LFDQueueRandom_OnUpdate = function() LFDQueueFrame:Formula409() @@ -73,7 +73,7 @@ local LFDQueueRandom_OnUpdate = function() end end end -end; +end local ScenarioQueueRandom_OnUpdate = function() LFDQueueFrame:Formula409() @@ -99,14 +99,15 @@ local ScenarioQueueRandom_OnUpdate = function() end end end -end; +end --[[ ########################################################## LFD STYLER ########################################################## ]]-- local function LFDFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfg ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.lfg ~= true then return end + PVEFrame:Formula409() PVEFrame:SetPanelTemplate("Action") PVEFrameLeftInset:Formula409() @@ -119,25 +120,31 @@ local function LFDFrameStyle() PVEFrameTopBorder:Hide() PVEFrameLeftInsetBg:Hide() PVEFrame.shadows:Hide() + LFDQueueFramePartyBackfillBackfillButton:SetButtonTemplate() LFDQueueFramePartyBackfillNoBackfillButton:SetButtonTemplate() LFDQueueFrameRandomScrollFrameChildFrameBonusRepFrame.ChooseButton:SetButtonTemplate() ScenarioQueueFrameRandomScrollFrameChildFrameBonusRepFrame.ChooseButton:SetButtonTemplate() - STYLE:ApplyScrollStyle(ScenarioQueueFrameRandomScrollFrameScrollBar) + + STYLE:ApplyScrollFrameStyle(ScenarioQueueFrameRandomScrollFrameScrollBar) + GroupFinderFrameGroupButton1.icon:SetTexture("Interface\\Icons\\INV_Helmet_08") GroupFinderFrameGroupButton2.icon:SetTexture("Interface\\Icons\\inv_helmet_06") GroupFinderFrameGroupButton3.icon:SetTexture("Interface\\Icons\\Icon_Scenarios") GroupFinderFrameGroupButton4.icon:SetTexture("Interface\\Addons\\SVUI\\assets\\artwork\\Icons\\SVUI-EMBLEM") + LFGDungeonReadyDialogBackground:MUNG() LFGDungeonReadyDialogEnterDungeonButton:SetButtonTemplate() LFGDungeonReadyDialogLeaveQueueButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(LFGDungeonReadyDialogCloseButton) + LFGDungeonReadyDialog:Formula409() LFGDungeonReadyDialog:SetPanelTemplate("Pattern", true, 2, 4, 4) LFGDungeonReadyStatus:Formula409() LFGDungeonReadyStatus:SetPanelTemplate("Pattern", true, 2, 4, 4) LFGDungeonReadyDialogRoleIconTexture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS") LFGDungeonReadyDialogRoleIconTexture:SetAlpha(0.5) + hooksecurefunc("LFGDungeonReadyPopup_Update", function() local b, c, d, e, f, g, h, i, j, k, l, m = GetLFGProposal() if LFGDungeonReadyDialogRoleIcon:IsShown() then @@ -150,6 +157,7 @@ local function LFDFrameStyle() end end end) + LFDQueueFrameRoleButtonTankIncentiveIcon:SetAlpha(0) LFDQueueFrameRoleButtonHealerIncentiveIcon:SetAlpha(0) LFDQueueFrameRoleButtonDPSIncentiveIcon:SetAlpha(0) @@ -165,6 +173,7 @@ local function LFDFrameStyle() LFGDungeonReadyDialog.filigree:SetAlpha(0) LFGDungeonReadyDialog.bottomArt:SetAlpha(0) STYLE:ApplyCloseButtonStyle(LFGDungeonReadyStatusCloseButton) + for _,name in pairs(LFDFrameList) do local frame = _G[name]; if frame then @@ -174,7 +183,8 @@ local function LFDFrameStyle() frame:DisableDrawLayer("BACKGROUND") frame:DisableDrawLayer("OVERLAY") end - end; + end + LFDQueueFrameRoleButtonLeader.leadIcon = LFDQueueFrameRoleButtonLeader:CreateTexture(nil, 'BACKGROUND') LFDQueueFrameRoleButtonLeader.leadIcon:SetTexture([[Interface\GroupFrame\UI-Group-LeaderIcon]]) LFDQueueFrameRoleButtonLeader.leadIcon:SetPoint(LFDQueueFrameRoleButtonLeader:GetNormalTexture():GetPoint()) @@ -185,46 +195,54 @@ local function LFDFrameStyle() RaidFinderQueueFrameRoleButtonLeader.leadIcon:SetPoint(RaidFinderQueueFrameRoleButtonLeader:GetNormalTexture():GetPoint()) RaidFinderQueueFrameRoleButtonLeader.leadIcon:Size(50) RaidFinderQueueFrameRoleButtonLeader.leadIcon:SetAlpha(0.4) + hooksecurefunc('LFG_DisableRoleButton', function(self) if self.checkButton:GetChecked() then self.checkButton:SetAlpha(1) else self.checkButton:SetAlpha(0) - end; + end if self.background then self.background:Show() end end) + hooksecurefunc('LFG_EnableRoleButton', function(self) self.checkButton:SetAlpha(1) end) + hooksecurefunc("LFG_PermanentlyDisableRoleButton", function(self) if self.background then self.background:Show() self.background:SetDesaturated(true) end end) - for u = 1, 4 do - local v = GroupFinderFrame["groupButton"..u] - v.ring:Hide() - v.bg:SetTexture(0,0,0,0) - v.bg:SetAllPoints() - v:SetFixedPanelTemplate('Button') - v:SetButtonTemplate() - v.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - v.icon:SetPoint("LEFT", v, "LEFT") - v.icon:SetDrawLayer("OVERLAY") - v.icon:Size(40) - v.icon:ClearAllPoints() - v.icon:SetPoint("LEFT", 10, 0) - v.border = CreateFrame("Frame", nil, v) - v.border:SetFixedPanelTemplate('Default') - v.border:WrapOuter(v.icon) - v.icon:SetParent(v.border) - end; + + for i = 1, 4 do + local button = GroupFinderFrame["groupButton"..i] + if(button) then + button.ring:Hide() + button.bg:SetTexture(0,0,0,0) + button.bg:SetAllPoints() + button:SetFixedPanelTemplate('Button') + button:SetButtonTemplate() + button.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + button.icon:SetPoint("LEFT", button, "LEFT") + button.icon:SetDrawLayer("OVERLAY") + button.icon:Size(40) + button.icon:ClearAllPoints() + button.icon:SetPoint("LEFT", 10, 0) + button.border = CreateFrame("Frame", nil, button) + button.border:SetFixedPanelTemplate('Default') + button.border:WrapOuter(button.icon) + button.icon:SetParent(button.border) + end + end + for u = 1, 2 do STYLE:ApplyTabStyle(_G['PVEFrameTab'..u]) - end; + end + PVEFrameTab1:SetPoint('BOTTOMLEFT', PVEFrame, 'BOTTOMLEFT', 19, -31) STYLE:ApplyCloseButtonStyle(PVEFrameCloseButton) LFDParentFrame:Formula409() @@ -233,9 +251,10 @@ local function LFDFrameStyle() LFDQueueFrameSpecificListScrollFrame:Formula409() LFDQueueFrameFindGroupButton:SetButtonTemplate() hooksecurefunc("LFDQueueFrameRandom_UpdateFrame", LFDQueueRandom_OnUpdate) + hooksecurefunc("ScenarioQueueFrameSpecific_Update", function() - for u = 1, NUM_SCENARIO_CHOICE_BUTTONS do - local box = _G["ScenarioQueueFrameSpecificButton"..u.."EnableButton"] + for i = 1, NUM_SCENARIO_CHOICE_BUTTONS do + local box = _G["ScenarioQueueFrameSpecificButton"..i.."EnableButton"] if(box and (not box.Panel)) then box:Formula409() box:SetCheckboxTemplate(true, -2, -3) @@ -244,7 +263,7 @@ local function LFDFrameStyle() end) STYLE:ApplyDropdownStyle(LFDQueueFrameTypeDropDown) - + RaidFinderFrame:Formula409() RaidFinderFrameBottomInset:Formula409() RaidFinderFrameRoleInset:Formula409() @@ -257,6 +276,7 @@ local function LFDFrameStyle() RaidFinderFrameFindRaidButton:Formula409() RaidFinderFrameFindRaidButton:SetButtonTemplate() RaidFinderQueueFrame:Formula409() + for u = 1, LFD_MAX_REWARDS do local t = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u] local icon = _G["RaidFinderQueueFrameScrollFrameChildFrameItem"..u.."IconTexture"] @@ -280,7 +300,8 @@ local function LFDFrameStyle() t.restyled = true end end - end; + end + ScenarioFinderFrameInset:DisableDrawLayer("BORDER") ScenarioFinderFrame.TopTileStreaks:Hide() ScenarioFinderFrameBtnCornerRight:Hide() @@ -296,20 +317,23 @@ local function LFDFrameStyle() LFRQueueFrameSpecificListScrollFrameScrollBackgroundTopLeft:Hide() LFRQueueFrameSpecificListScrollFrameScrollBackgroundBottomRight:Hide() LFRBrowseFrameRoleInsetBg:Hide() + for u = 1, 14 do if u ~= 6 and u ~= 8 then select(u, RaidBrowserFrame:GetRegions()):Hide() end - end; + end + RaidBrowserFrame:SetPanelTemplate('Pattern') STYLE:ApplyCloseButtonStyle(RaidBrowserFrameCloseButton) LFRQueueFrameFindGroupButton:SetButtonTemplate() LFRQueueFrameAcceptCommentButton:SetButtonTemplate() - STYLE:ApplyScrollStyle(LFRQueueFrameCommentScrollFrameScrollBar) - STYLE:ApplyScrollStyle(LFDQueueFrameSpecificListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(LFRQueueFrameCommentScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(LFDQueueFrameSpecificListScrollFrameScrollBar) + RaidBrowserFrame:HookScript('OnShow', function() if not LFRQueueFrameSpecificListScrollFrameScrollBar.styled then - STYLE:ApplyScrollStyle(LFRQueueFrameSpecificListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(LFRQueueFrameSpecificListScrollFrameScrollBar) LFRBrowseFrame:Formula409() for u = 1, 2 do local C = _G['LFRParentFrameSideTab'..u] @@ -330,11 +354,11 @@ local function LFDFrameStyle() o:SetTexture(0,0,0,0) end end) - end; + end for u = 1, 7 do local C = _G['LFRBrowseFrameColumnHeader'..u] C:DisableDrawLayer('BACKGROUND') - end; + end STYLE:ApplyDropdownStyle(LFRBrowseFrameRaidDropDown) LFRBrowseFrameRefreshButton:SetButtonTemplate() LFRBrowseFrameInviteButton:SetButtonTemplate() @@ -342,10 +366,12 @@ local function LFDFrameStyle() LFRQueueFrameSpecificListScrollFrameScrollBar.styled = true end end) + LFGInvitePopup:Formula409() LFGInvitePopup:SetPanelTemplate("Pattern", true, 2, 4, 4) LFGInvitePopupAcceptButton:SetButtonTemplate() LFGInvitePopupDeclineButton:SetButtonTemplate() + _G[LFDQueueFrame.PartyBackfill:GetName().."BackfillButton"]:SetButtonTemplate() _G[LFDQueueFrame.PartyBackfill:GetName().."NoBackfillButton"]:SetButtonTemplate() _G[RaidFinderQueueFrame.PartyBackfill:GetName().."BackfillButton"]:SetButtonTemplate() @@ -353,12 +379,12 @@ local function LFDFrameStyle() _G[ScenarioQueueFrame.PartyBackfill:GetName().."BackfillButton"]:SetButtonTemplate() _G[ScenarioQueueFrame.PartyBackfill:GetName().."NoBackfillButton"]:SetButtonTemplate() - STYLE:ApplyScrollStyle(LFDQueueFrameRandomScrollFrameScrollBar) - STYLE:ApplyScrollStyle(ScenarioQueueFrameSpecificScrollFrameScrollBar) - LFDQueueFrameRandomScrollFrame:SetFixedPanelTemplate("Inset") - ScenarioQueueFrameRandomScrollFrame:SetFixedPanelTemplate("Inset") - RaidFinderQueueFrameScrollFrame:SetFixedPanelTemplate("Inset") - + STYLE:ApplyScrollFrameStyle(LFDQueueFrameRandomScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(ScenarioQueueFrameSpecificScrollFrameScrollBar) + LFDQueueFrameRandomScrollFrame:SetBasicPanel() + ScenarioQueueFrameRandomScrollFrame:SetBasicPanel() + RaidFinderQueueFrameScrollFrame:SetBasicPanel() + for u = 1, NUM_LFD_CHOICE_BUTTONS do local box = _G["LFDQueueFrameSpecificListButton"..u.."EnableButton"] if(box and (not box.Panel)) then @@ -367,6 +393,7 @@ local function LFDFrameStyle() box:SetFrameLevel(box:GetFrameLevel() + 50) end end + for u = 1, NUM_LFR_CHOICE_BUTTONS do local box = _G["LFRQueueFrameSpecificListButton"..u.."EnableButton"] if(box and (not box.Panel)) then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua index fafc02a..8664c68 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/loothistory.lua @@ -25,7 +25,7 @@ local MissingLootFrame_OnShow = function() for u = 1, N do local O = _G["MissingLootFrameItem"..u] local icon = O.icon; - STYLE:ApplyLinkButtonStyle(O, true) + STYLE:ApplyItemButtonStyle(O, true) local g, f, y, P = GetMissingLootItemInfo(u) local color = GetItemQualityColor(P) or 0,0,0,1 icon:SetTexture(g) @@ -83,7 +83,7 @@ local function LootHistoryStyle() txt:SetText("RESIZE") LootHistoryFrameScrollFrame:Formula409() - STYLE:ApplyScrollStyle(LootHistoryFrameScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(LootHistoryFrameScrollFrameScrollBar) hooksecurefunc("LootHistoryFrame_FullUpdate", LootHistoryFrame_OnUpdate) MasterLooterFrame:Formula409() MasterLooterFrame:SetFixedPanelTemplate() @@ -119,10 +119,6 @@ local function LootHistoryStyle() BonusRollFrame:Formula409() STYLE:ApplyAlertStyle(BonusRollFrame) BonusRollFrame.PromptFrame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - BonusRollFrame.PromptFrame.IconBackdrop = CreateFrame("Frame", nil, BonusRollFrame.PromptFrame) - BonusRollFrame.PromptFrame.IconBackdrop:SetFrameLevel(BonusRollFrame.PromptFrame.IconBackdrop:GetFrameLevel()-1) - BonusRollFrame.PromptFrame.IconBackdrop:WrapOuter(BonusRollFrame.PromptFrame.Icon) - BonusRollFrame.PromptFrame.IconBackdrop:SetFixedPanelTemplate() BonusRollFrame.PromptFrame.Timer.Bar:SetTexture(SuperVillain.Media.bar.default) BonusRollFrame.PromptFrame.Timer.Bar:SetVertexColor(0.1, 1, 0.1) end; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua index 7d6bae0..91cf285 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/macro.lua @@ -34,9 +34,9 @@ MACRO UI STYLER local function MacroUIStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.macro ~= true then return end; STYLE:ApplyCloseButtonStyle(MacroFrameCloseButton) - STYLE:ApplyScrollStyle(MacroButtonScrollFrameScrollBar) - STYLE:ApplyScrollStyle(MacroFrameScrollFrameScrollBar) - STYLE:ApplyScrollStyle(MacroPopupScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(MacroFrameScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(MacroPopupScrollFrameScrollBar) MacroFrame:Width(360) for b = 1, #MacroButtonList do _G[MacroButtonList[b]]:Formula409() @@ -57,15 +57,14 @@ local function MacroUIStyle() MacroFrame.Panel:SetPoint("BOTTOMRIGHT",MacroFrame,"BOTTOMRIGHT",0,-25) MacroFrameText:SetFont(SuperVillain.Media.font.roboto, 10, "OUTLINE") MacroFrameTextBackground:Formula409() - MacroFrameTextBackground:SetFixedPanelTemplate('Inset', true) - MacroFrameTextBackground.Panel:Point("TOPRIGHT", 2, 0) - MacroButtonScrollFrame:SetFixedPanelTemplate("Inset") + MacroFrameTextBackground:SetBasicPanel() MacroPopupFrame:Formula409() - MacroPopupFrame:SetPanelTemplate("Inset", true) + MacroPopupFrame:SetBasicPanel() MacroPopupScrollFrame:Formula409() MacroPopupScrollFrame:SetPanelTemplate("Pattern") MacroPopupScrollFrame.Panel:Point("TOPLEFT", 51, 2) MacroPopupScrollFrame.Panel:Point("BOTTOMRIGHT", -4, 4) + MacroButtonScrollFrame:SetBasicPanel() MacroPopupEditBox:SetEditboxTemplate() MacroPopupNameLeft:SetTexture(0,0,0,0) MacroPopupNameMiddle:SetTexture(0,0,0,0) @@ -73,7 +72,7 @@ local function MacroUIStyle() MacroFrameInset:MUNG() MacroEditButton:ClearAllPoints() MacroEditButton:Point("BOTTOMLEFT", MacroFrameSelectedMacroButton, "BOTTOMRIGHT", 10, 0) - STYLE:ApplyScrollStyle(MacroButtonScrollFrame) + STYLE:ApplyScrollFrameStyle(MacroButtonScrollFrame) MacroPopupFrame:HookScript("OnShow", function(c) c:ClearAllPoints() c:Point("TOPLEFT", MacroFrame, "TOPRIGHT", 5, -2) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua index d6f8527..23a6456 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/mailbox.lua @@ -66,7 +66,7 @@ local function MailBoxStyle() STYLE:ApplyTabStyle(MailFrameTab2) SendMailScrollFrame:Formula409(true) SendMailScrollFrame:SetFixedPanelTemplate("Inset") - STYLE:ApplyScrollStyle(SendMailScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(SendMailScrollFrameScrollBar) SendMailNameEditBox:SetEditboxTemplate() SendMailSubjectEditBox:SetEditboxTemplate() SendMailMoneyGold:SetEditboxTemplate() @@ -104,7 +104,7 @@ local function MailBoxStyle() MailFrameInset:MUNG() OpenMailScrollFrame:Formula409(true) OpenMailScrollFrame:SetFixedPanelTemplate("Default") - STYLE:ApplyScrollStyle(OpenMailScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(OpenMailScrollFrameScrollBar) SendMailBodyEditBox:SetTextColor(1, 1, 1) OpenMailBodyText:SetTextColor(1, 1, 1) InvoiceTextFontNormal:SetTextColor(1, 1, 1) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua index 4218e8a..d4a3a33 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petbattle.lua @@ -24,23 +24,6 @@ local PBAB_WIDTH = 382; local PBAB_HEIGHT = 72; local PetBattleActionBar = CreateFrame("Frame", "SVUI_PetBattleActionBar", UIParent) -local function PetBattleSetTooltip(frame) - frame.Background:SetTexture(0,0,0,0) - if frame.Delimiter1 then - frame.Delimiter1:SetTexture(0,0,0,0) - frame.Delimiter2:SetTexture(0,0,0,0) - end; - 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; - local function PetBattleButtonHelper(frame) frame:SetNormalTexture("") frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) @@ -52,7 +35,7 @@ local function PetBattleButtonHelper(frame) frame.pushed:FillInner(frame.Panel) frame.hover:FillInner(frame.Panel) frame:SetFrameStrata('LOW') -end; +end --[[ ########################################################## PETBATTLE STYLER @@ -61,7 +44,7 @@ PETBATTLE STYLER local function PetBattleStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.petbattleui ~= true then return - end; + end local PetBattleFrame = _G["PetBattleFrame"]; local BottomFrame = PetBattleFrame.BottomFrame; local ActiveFramesList = { PetBattleFrame.ActiveAlly, PetBattleFrame.ActiveEnemy } @@ -122,7 +105,7 @@ local function PetBattleStyle() frame.FirstAttack:SetPoint("RIGHT", frame.HealthBarBackdrop, "LEFT", -5, 0) frame.FirstAttack:SetTexCoord(.5, 0, .5, 1) frame.FirstAttack:SetVertexColor(.1, .1, .1, 1) - end; + end frame.HealthText:ClearAllPoints() frame.HealthText:SetPoint('CENTER', frame.HealthBarBackdrop, 'CENTER') frame.PetType:ClearAllPoints() @@ -141,7 +124,7 @@ local function PetBattleStyle() end frame.isStyled = true end - end; + end for _, frame in pairs(StandardFramesList) do if(not frame.hasTempBG) then @@ -174,7 +157,7 @@ local function PetBattleStyle() frame.HealthBarBackdrop:Point('BOTTOMLEFT', frame.ActualHealthBar, 'BOTTOMLEFT', -1, -1) frame.hasTempBG = true end - end; + end PetBattleActionBar:SetParent(PetBattleFrame) PetBattleActionBar:SetSize(PBAB_WIDTH, PBAB_HEIGHT) @@ -186,11 +169,6 @@ local function PetBattleStyle() PetBattleFrame.TopVersusText:ClearAllPoints() PetBattleFrame.TopVersusText:SetPoint("TOP", PetBattleFrame, "TOP", 0, -42) - PetBattleSetTooltip(PetBattlePrimaryAbilityTooltip) - PetBattleSetTooltip(PetBattlePrimaryUnitTooltip) - PetBattleSetTooltip(BattlePetTooltip) - PetBattleSetTooltip(FloatingBattlePetTooltip) - PetBattleSetTooltip(FloatingPetBattleAbilityTooltip) PetBattleFrame.Ally2:SetPoint("TOPRIGHT", PetBattleFrame.Ally2.iconPoint, "TOPLEFT", -6, -2) PetBattleFrame.Ally3:SetPoint('TOPRIGHT', PetBattleFrame.Ally2, 'TOPLEFT', -8, 0) @@ -234,10 +212,10 @@ local function PetBattleStyle() pet.DeadOverlay:SetAlpha(0) pet.Level:SetAlpha(0) pet.HealthText:SetAlpha(0) - end; + end PetBattleQueueReadyFrame:Formula409() - PetBattleQueueReadyFrame:SetPanelTemplate("Transparent", true) + PetBattleQueueReadyFrame:SetBasicPanel() PetBattleQueueReadyFrame.AcceptButton:SetButtonTemplate() PetBattleQueueReadyFrame.DeclineButton:SetButtonTemplate() PetBattleQueueReadyFrame.Art:SetTexture([[Interface\PetBattles\PetBattlesQueue]]) @@ -248,7 +226,7 @@ local function PetBattleStyle() PetBattleFrame.ActiveAlly.FirstAttack:Hide() PetBattleFrame.ActiveEnemy.FirstAttack:Hide() return - end; + end PetBattleFrame.ActiveAlly.FirstAttack:Show() if PetBattleFrame.ActiveAlly.SpeedIcon:IsShown() then PetBattleFrame.ActiveAlly.FirstAttack:SetVertexColor(0, 1, 0, 1) @@ -289,18 +267,18 @@ local function PetBattleStyle() frame.Icon:FillInner(frame.Panel, 2, 2) frame.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) frame.isStyled = true - end; + end if isBuff then frame:SetBackdropBorderColor(0, 1, 0) else frame:SetBackdropBorderColor(1, 0, 0) - end; + end frame.Duration:SetFont(SuperVillain.Media.font.numbers, 16, "OUTLINE") frame.Duration:ClearAllPoints() frame.Duration:SetPoint("BOTTOMLEFT", frame.Icon, "BOTTOMLEFT", 4, 4) if turnsRemaining > 0 then frame.Duration:SetText(turnsRemaining) - end; + end nextFrame = nextFrame + 1 end end @@ -366,7 +344,9 @@ local function PetBattleStyle() self.BottomFrame.ForfeitButton:SetPoint("LEFT", self.BottomFrame.CatchButton, "RIGHT", 10, 0) PetBattleButtonHelper(self.BottomFrame.ForfeitButton) end) -end; + + SuperVillain.SVTip:ReLoad() +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua index 7442216..bfeb0c1 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petjournal.lua @@ -29,7 +29,7 @@ local function Button_OnLeave(this) end local function StyleListButton(this, adjust, shrink) - if(not this or (this and this.appliedStyle)) then return end + if(not this or (this and this.StyleHooked)) then return end local link = this:GetName() local barName = this.MountBar @@ -73,7 +73,7 @@ local function StyleListButton(this, adjust, shrink) this:HookScript("OnEnter", Button_OnEnter) this:HookScript("OnLeave", Button_OnLeave) - this.appliedStyle = true + this.StyleHooked = true end local function PetJournal_UpdateMounts() @@ -159,7 +159,7 @@ local function PetJournalStyle() MountJournalListScrollFrame:Formula409() MountJournalMountButton:SetButtonTemplate() MountJournalSearchBox:SetEditboxTemplate() - STYLE:ApplyScrollStyle(MountJournalListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(MountJournalListScrollFrameScrollBar) MountJournal.MountDisplay:SetFixedPanelTemplate("Comic") for i = 1, #MountJournal.ListScrollFrame.buttons do local button = _G["MountJournalListScrollFrameButton"..i] @@ -189,12 +189,12 @@ local function PetJournalStyle() PetJournalFilterButton:Formula409(true) PetJournalFilterButton:SetButtonTemplate() PetJournalListScrollFrame:Formula409() - STYLE:ApplyScrollStyle(PetJournalListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(PetJournalListScrollFrameScrollBar) for i = 1, #PetJournal.listScroll.buttons do local button = _G["PetJournalListScrollFrameButton" .. i] local favorite = _G["PetJournalListScrollFrameButton" .. i .. "Favorite"] - STYLE:ApplyLinkButtonStyle(button, false, true) + STYLE:ApplyItemButtonStyle(button, false, true) if(favorite) then local fg = CreateFrame("Frame", nil, button) fg:SetSize(40,40) @@ -213,7 +213,7 @@ local function PetJournalStyle() PetJournalListScrollFrame:HookScript("OnVerticalScroll", PetJournal_UpdatePets) PetJournalListScrollFrame:HookScript("OnMouseWheel", PetJournal_UpdatePets) PetJournalAchievementStatus:DisableDrawLayer('BACKGROUND') - STYLE:ApplyLinkButtonStyle(PetJournalHealPetButton, true) + STYLE:ApplyItemButtonStyle(PetJournalHealPetButton, true) PetJournalHealPetButton.texture:SetTexture([[Interface\Icons\spell_magic_polymorphrabbit]]) PetJournalLoadoutBorder:Formula409() @@ -232,7 +232,7 @@ local function PetJournalStyle() pjPet.hover = true; pjPet.pushed = true; pjPet.checked = true; - STYLE:ApplyLinkButtonStyle(pjPet) + STYLE:ApplyItemButtonStyle(pjPet) pjPet.setButton:Formula409() _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:Formula409() _G['PetJournalLoadoutPet'..b..'HealthFrame'].healthBar:SetPanelTemplate('Default') @@ -243,7 +243,7 @@ local function PetJournalStyle() _G['PetJournalLoadoutPet'..b..'XPBar']:SetFrameLevel(_G['PetJournalLoadoutPet'..b..'XPBar']:GetFrameLevel()+2) for v = 1, 3 do local s = _G['PetJournalLoadoutPet'..b..'Spell'..v] - STYLE:ApplyLinkButtonStyle(s) + STYLE:ApplyItemButtonStyle(s) s.FlyoutArrow:SetTexture([[Interface\Buttons\ActionBarFlyoutButton]]) _G['PetJournalLoadoutPet'..b..'Spell'..v..'Icon']:FillInner(s) s.Panel:SetFrameLevel(s:GetFrameLevel() + 1) @@ -255,7 +255,7 @@ local function PetJournalStyle() for b = 1, 2 do local Q = _G['PetJournalSpellSelectSpell'..b] - STYLE:ApplyLinkButtonStyle(Q) + STYLE:ApplyItemButtonStyle(Q) _G['PetJournalSpellSelectSpell'..b..'Icon']:FillInner(Q) _G['PetJournalSpellSelectSpell'..b..'Icon']:SetDrawLayer('BORDER') end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua index 8fe11da..d4a632e 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/petstable.lua @@ -34,10 +34,10 @@ local function PetStableStyle() STYLE:ApplyPaginationStyle(PetStablePrevPageButton) STYLE:ApplyPaginationStyle(PetStableNextPageButton) for j = 1, NUM_PET_ACTIVE_SLOTS do - STYLE:ApplyLinkButtonStyle(_G['PetStableActivePet'..j], true) + STYLE:ApplyItemButtonStyle(_G['PetStableActivePet'..j], true) end; for j = 1, NUM_PET_STABLE_SLOTS do - STYLE:ApplyLinkButtonStyle(_G['PetStableStabledPet'..j], true) + STYLE:ApplyItemButtonStyle(_G['PetStableStabledPet'..j], true) end; PetStableSelectedPetIcon:SetTexCoord(0.1, 0.9, 0.1, 0.9) end; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua index 356c60b..740e79b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/pvp.lua @@ -25,42 +25,60 @@ PVP STYLER local function PVPFrameStyle() if (SuperVillain.db.SVStyle and (SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.pvp ~= true)) then return - end; + end + PVPUIFrame:Formula409() PVPUIFrame:SetPanelTemplate("Action") + STYLE:ApplyCloseButtonStyle(PVPUIFrameCloseButton) + for g = 1, 2 do STYLE:ApplyTabStyle(_G["PVPUIFrameTab"..g]) - end; - for g = 1, 3 do - local M = _G["PVPQueueFrameCategoryButton"..g]M:SetFixedPanelTemplate("Button") - M.Background:MUNG() - M.Ring:MUNG() - M.Icon:Size(45) - M.Icon:SetTexCoord(.15, .85, .15, .85) - M.Panel:WrapOuter(M.Icon) - M.Panel:SetFrameLevel(M:GetFrameLevel()) - M.Icon:SetDrawLayer("OVERLAY", nil, 7) - M:SetButtonTemplate() - end; + end + + for i = 1, 3 do + local btn = _G["PVPQueueFrameCategoryButton"..i] + if(btn) then + btn.Background:MUNG() + btn.Ring:MUNG() + btn:SetButtonTemplate() + btn.Icon:Size(45) + btn.Icon:SetTexCoord(.15, .85, .15, .85) + btn.Icon:SetDrawLayer("OVERLAY", nil, 7) + btn.Panel:WrapOuter(btn.Icon) + end + end + STYLE:ApplyDropdownStyle(HonorFrameTypeDropDown) + HonorFrame.Inset:Formula409() - HonorFrame.Inset:SetFixedPanelTemplate("Inset") - STYLE:ApplyScrollStyle(HonorFrameSpecificFrameScrollBar) + HonorFrame.Inset:SetBasicPanel() + + STYLE:ApplyScrollFrameStyle(HonorFrameSpecificFrameScrollBar) + HonorFrameSoloQueueButton:Formula409() HonorFrameGroupQueueButton:Formula409() HonorFrameSoloQueueButton:SetButtonTemplate() HonorFrameGroupQueueButton:SetButtonTemplate() + HonorFrame.BonusFrame:Formula409() HonorFrame.BonusFrame.ShadowOverlay:Formula409() + HonorFrame.BonusFrame.RandomBGButton:Formula409() HonorFrame.BonusFrame.RandomBGButton:SetFixedPanelTemplate("Button") HonorFrame.BonusFrame.RandomBGButton:SetButtonTemplate() HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:FillInner() HonorFrame.BonusFrame.RandomBGButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) + HonorFrame.BonusFrame.CallToArmsButton:Formula409() + HonorFrame.BonusFrame.CallToArmsButton:SetFixedPanelTemplate("Button") + HonorFrame.BonusFrame.CallToArmsButton:SetButtonTemplate() + HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:FillInner() + HonorFrame.BonusFrame.CallToArmsButton.SelectedTexture:SetTexture(1, 1, 0, 0.1) + HonorFrame.BonusFrame.DiceButton:DisableDrawLayer("ARTWORK") HonorFrame.BonusFrame.DiceButton:SetHighlightTexture("") + HonorFrame.RoleInset:Formula409() HonorFrame.RoleInset.DPSIcon.checkButton:SetCheckboxTemplate(true) HonorFrame.RoleInset.TankIcon.checkButton:SetCheckboxTemplate(true) @@ -71,9 +89,10 @@ local function PVPFrameStyle() HonorFrame.RoleInset.HealerIcon:DisableDrawLayer("BACKGROUND") HonorFrame.RoleInset.DPSIcon:DisableDrawLayer("OVERLAY") HonorFrame.RoleInset.DPSIcon:DisableDrawLayer("BACKGROUND") - hooksecurefunc("LFG_PermanentlyDisableRoleButton", function(n) - if n.bg then - n.bg:SetDesaturated(true) + + hooksecurefunc("LFG_PermanentlyDisableRoleButton", function(self) + if self.bg then + self.bg:SetDesaturated(true) end end) @@ -88,32 +107,39 @@ local function PVPFrameStyle() ConquestPointsBar.Panel:WrapOuter(ConquestPointsBar, nil, -2) ConquestFrame:Formula409() ConquestFrame.ShadowOverlay:Formula409() + ConquestJoinButton:Formula409() ConquestJoinButton:SetButtonTemplate() + ConquestFrame.RatedBG:Formula409() ConquestFrame.RatedBG:SetFixedPanelTemplate("Inset") ConquestFrame.RatedBG:SetButtonTemplate() ConquestFrame.RatedBG.SelectedTexture:FillInner() ConquestFrame.RatedBG.SelectedTexture:SetTexture(1, 1, 0, 0.1) + WarGamesFrame:Formula409() WarGamesFrame.RightInset:Formula409() WarGamesFrameInfoScrollFrame:Formula409() WarGamesFrameInfoScrollFrameScrollBar:Formula409() WarGameStartButton:Formula409() WarGameStartButton:SetButtonTemplate() - STYLE:ApplyScrollStyle(WarGamesFrameScrollFrameScrollBar) - STYLE:ApplyScrollStyle(WarGamesFrameInfoScrollFrameScrollBar) + + STYLE:ApplyScrollFrameStyle(WarGamesFrameScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(WarGamesFrameInfoScrollFrameScrollBar) + WarGamesFrame.HorizontalBar:Formula409() - + PVPReadyDialog:Formula409() PVPReadyDialog:SetPanelTemplate("Pattern") PVPReadyDialogEnterBattleButton:SetButtonTemplate() PVPReadyDialogLeaveQueueButton:SetButtonTemplate() + STYLE:ApplyCloseButtonStyle(PVPReadyDialogCloseButton) + PVPReadyDialogRoleIcon.texture:SetTexture("Interface\\LFGFrame\\UI-LFG-ICONS-ROLEBACKGROUNDS") PVPReadyDialogRoleIcon.texture:SetAlpha(0.5) - ConquestFrame.Inset:SetFixedPanelTemplate("Inset") + ConquestFrame.Inset:SetBasicPanel() WarGamesFrameScrollFrame:SetPanelTemplate("Inset",false,2,2,6) hooksecurefunc("PVPReadyDialog_Display", function(self, l, N, O, P, Q, R) @@ -128,7 +154,7 @@ local function PVPFrameStyle() self:SetHeight(100) end end) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua index 2d20d9d..21d3548 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/quest.lua @@ -38,10 +38,10 @@ local function QuestScrollHelper(b, c, d, e) b.spellTex:SetPoint("TOPLEFT", 2, -2) else b.spellTex:SetPoint("TOPLEFT") - end; + end b.spellTex:Size(c or 506, d or 615) b.spellTex:SetTexCoord(0, 1, 0.02, 1) -end; +end local function QueuedWatchFrameItems() for i=1, WATCHFRAME_NUM_ITEMS do @@ -59,7 +59,59 @@ local function QueuedWatchFrameItems() button.styled = true end end -end; +end + +-- local QuestLogScrollFrame_OnShow = function() +-- if not QuestLogScrollFrame.spellTex then +-- QuestLogScrollFrame:SetFixedPanelTemplate("Default") +-- QuestLogScrollFrame.spellTex = QuestLogScrollFrame:CreateTexture(nil, 'ARTWORK') +-- QuestLogScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBookBG]]) +-- QuestLogScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2) +-- QuestLogScrollFrame.spellTex:Size(514, 616) +-- QuestLogScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) +-- QuestLogScrollFrame.spellTex2 = QuestLogScrollFrame:CreateTexture(nil, 'BORDER') +-- QuestLogScrollFrame.spellTex2:SetTexture([[Interface\FrameGeneral\UI-Background-Rock]]) +-- QuestLogScrollFrame.spellTex2:FillInner() +-- end +-- end + +local QuestRewardScrollFrame_OnShow = function(self) + if(not self.Panel) then + self:SetPanelTemplate("Default") + QuestScrollHelper(self, 509, 630, false) + self:Height(self:GetHeight() - 2) + end + if(self.spellTex) then + self.spellTex:Height(self:GetHeight() + 217) + end +end + +local Hook_QuestInfo_Display = function(self, ...) + for i = 1, MAX_NUM_ITEMS do + local name = ("QuestInfoItem%d"):format(i) + local item = _G[name] + if(item and item:IsShown()) then + local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = item:GetPoint() + if(i == 1) then + item:Point(initialAnchor, anchorParent, relativeAnchor, 0, yPosition) + elseif(relativeAnchor == "BOTTOMLEFT") then + item:Point(initialAnchor, anchorParent, relativeAnchor, 0, -4) + else + item:Point(initialAnchor, anchorParent, relativeAnchor, 4, 0) + end + end + end +end + +local Hook_QuestInfoItem_OnClick = function(self) + QuestInfoItemHighlight:ClearAllPoints() + QuestInfoItemHighlight:SetAllPoints(self) +end + +local Hook_QuestNPCModel = function(self, _, _, _, x, y) + QuestNPCModel:ClearAllPoints() + QuestNPCModel:SetPoint("TOPLEFT", self, "TOPRIGHT", x + 18, y) +end --[[ ########################################################## QUEST STYLERS @@ -68,16 +120,16 @@ QUEST STYLERS local function QuestGreetingStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.greeting ~= true then return - end; + end QuestFrameGreetingPanel:HookScript("OnShow", function() QuestFrameGreetingPanel:Formula409() QuestFrameGreetingGoodbyeButton:SetButtonTemplate() QuestGreetingFrameHorizontalBreak:MUNG() end) -end; +end local function QuestFrameStyle() - if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.quest ~= true then return end; + if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.quest ~= true then return end STYLE:ApplyCloseButtonStyle(QuestLogFrameCloseButton) STYLE:ApplyScrollStyle(QuestLogDetailScrollFrameScrollBar) STYLE:ApplyScrollStyle(QuestLogScrollFrameScrollBar, 5) @@ -91,69 +143,50 @@ local function QuestFrameStyle() --[[MISC STYLINGS REMOVED HERE]]-- - for j = 1, MAX_NUM_ITEMS do - local item = _G["QuestInfoItem"..j] + for i = 1, MAX_NUM_ITEMS do + local item = _G["QuestInfoItem"..i] if(item) then local cLvl = item:GetFrameLevel() + 1 item:Formula409() - item:Width(item:GetWidth()-4) + item:Width(item:GetWidth() - 4) item:SetFrameLevel(cLvl) - - _G["QuestInfoItem"..j.."IconTexture"]:SetTexCoord(0.1, 0.9, 0.1, 0.9) - _G["QuestInfoItem"..j.."IconTexture"]:SetDrawLayer("OVERLAY",1) - _G["QuestInfoItem"..j.."IconTexture"]:Point("TOPLEFT", 2, -2) - _G["QuestInfoItem"..j.."IconTexture"]:Size(_G["QuestInfoItem"..j.."IconTexture"]:GetWidth()-2, _G["QuestInfoItem"..j.."IconTexture"]:GetHeight()-2) - STYLE:ApplyLinkButtonStyle(item) + + local tex = _G["QuestInfoItem"..i.."IconTexture"] + if(tex) then + tex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + tex:SetDrawLayer("OVERLAY",1) + tex:SetPoint("TOPLEFT", 2, -2) + tex:Size(tex:GetWidth() - 2, tex:GetHeight() - 2) + end + STYLE:ApplyItemButtonStyle(item) end - end; + end + QuestInfoSkillPointFrame:Formula409() - QuestInfoSkillPointFrame:Width(QuestInfoSkillPointFrame:GetWidth()-4) + QuestInfoSkillPointFrame:Width(QuestInfoSkillPointFrame:GetWidth() - 4) + local curLvl = QuestInfoSkillPointFrame:GetFrameLevel() + 1 QuestInfoSkillPointFrame:SetFrameLevel(curLvl) QuestInfoSkillPointFrame:SetFixedPanelTemplate("Slot") - QuestInfoSkillPointFrame:SetBackdropColor(1,1,0,0.5) + QuestInfoSkillPointFrame:SetBackdropColor(1, 1, 0, 0.5) QuestInfoSkillPointFrameIconTexture:SetTexCoord(0.1, 0.9, 0.1, 0.9) QuestInfoSkillPointFrameIconTexture:SetDrawLayer("OVERLAY") QuestInfoSkillPointFrameIconTexture:Point("TOPLEFT", 2, -2) QuestInfoSkillPointFrameIconTexture:Size(QuestInfoSkillPointFrameIconTexture:GetWidth()-2, QuestInfoSkillPointFrameIconTexture:GetHeight()-2) QuestInfoSkillPointFrameCount:SetDrawLayer("OVERLAY") - QuestInfoItemHighlight:Formula409() QuestInfoItemHighlight:SetFixedPanelTemplate("Slot") QuestInfoItemHighlight:SetBackdropBorderColor(1, 1, 0) QuestInfoItemHighlight:SetBackdropColor(0, 0, 0, 0) QuestInfoItemHighlight:Size(142, 40) - hooksecurefunc("QuestInfoItem_OnClick", function(k) - QuestInfoItemHighlight:ClearAllPoints() - QuestInfoItemHighlight:SetAllPoints(k) - end) - - --[[MISC STYLINGS REMOVED HERE]]-- - - QuestRewardScrollFrame:HookScript('OnShow', function(k) - if not k.Panel then - k:SetPanelTemplate("Default") - QuestScrollHelper(k, 509, 630, false) - k:Height(k:GetHeight() - 2) - end; - k.spellTex:Height(k:GetHeight() + 217) - end) - hooksecurefunc("QuestInfo_Display", function(l, m) - for j = 1, MAX_NUM_ITEMS do - local n = _G["QuestInfoItem"..j] - if not n:IsShown() then - break - end; - local o, p, q, r, s = n:GetPoint() - if j == 1 then - n:Point(o, p, q, 0, s) - elseif q == "BOTTOMLEFT"then - n:Point(o, p, q, 0, -4) - else - n:Point(o, p, q, 4, 0) - end - end - end) + + hooksecurefunc("QuestInfoItem_OnClick", Hook_QuestInfoItem_OnClick) + + --QuestLogFrame:HookScript("OnShow", QuestLogScrollFrame_OnShow) + + QuestRewardScrollFrame:HookScript("OnShow", QuestRewardScrollFrame_OnShow) + hooksecurefunc("QuestInfo_Display", Hook_QuestInfo_Display) + QuestFrame:Formula409(true) QuestFrameInset:MUNG() QuestFrameDetailPanel:Formula409(true) @@ -175,6 +208,7 @@ local function QuestFrameStyle() QuestFrameGoodbyeButton:SetButtonTemplate() QuestFrameCompleteQuestButton:SetButtonTemplate() STYLE:ApplyCloseButtonStyle(QuestFrameCloseButton, QuestFrame.Panel) + for j = 1, 6 do local i = _G["QuestProgressItem"..j] local texture = _G["QuestProgressItem"..j.."IconTexture"] @@ -186,23 +220,18 @@ local function QuestFrameStyle() texture:Point("TOPLEFT", 2, -2) texture:Size(texture:GetWidth() - 2, texture:GetHeight() - 2) _G["QuestProgressItem"..j.."Count"]:SetDrawLayer("OVERLAY") - end; + end + QuestNPCModel:Formula409() QuestNPCModel:SetPanelTemplate("Comic") - -- QuestNPCModel:Point("TOPLEFT", QuestLogDetailFrame, "TOPRIGHT", 4, -34) + QuestNPCModelTextFrame:Formula409() QuestNPCModelTextFrame:SetPanelTemplate("Default") QuestNPCModelTextFrame.Panel:Point("TOPLEFT", QuestNPCModel.Panel, "BOTTOMLEFT", 0, -2) - -- QuestLogDetailFrame:Formula409() - -- QuestLogDetailFrame:SetPanelTemplate("Action") - -- QuestLogDetailScrollFrame:Formula409() - hooksecurefunc("QuestFrame_ShowQuestPortrait", function(m, t, text, u, r, s) - QuestNPCModel:ClearAllPoints() - QuestNPCModel:SetPoint("TOPLEFT", m, "TOPRIGHT", r+18, s) - end) + hooksecurefunc("QuestFrame_ShowQuestPortrait", Hook_QuestNPCModel) -end; +end --[[ ########################################################## STYLE LOADING diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua index 82f29d4..e839fd6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/raid.lua @@ -77,11 +77,11 @@ local function RaidInfoStyle() end end; RaidInfoScrollFrame:Formula409() - RaidInfoFrame:SetPanelTemplate("Transparent", true) + RaidInfoFrame:SetBasicPanel() RaidInfoFrame.Panel:Point("TOPLEFT", RaidInfoFrame, "TOPLEFT") RaidInfoFrame.Panel:Point("BOTTOMRIGHT", RaidInfoFrame, "BOTTOMRIGHT") STYLE:ApplyCloseButtonStyle(RaidInfoCloseButton, RaidInfoFrame) - STYLE:ApplyScrollStyle(RaidInfoScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(RaidInfoScrollFrameScrollBar) RaidFrameRaidBrowserButton:SetButtonTemplate() RaidFrameAllAssistCheckButton:SetCheckboxTemplate(true) end; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua index d1a75cf..2403635 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/supervillain.lua @@ -17,67 +17,50 @@ local SuperVillain, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## -ALERTFRAME STYLER +HELPERS ########################################################## ]]-- +local ProxyLSMType = { + ["LSM30_Font"] = true, + ["LSM30_Sound"] = true, + ["LSM30_Border"] = true, + ["LSM30_Background"] = true, + ["LSM30_Statusbar"] = true +} + +local ProxyType = { + ["InlineGroup"] = true, + ["TreeGroup"] = true, + ["TabGroup"] = true, + ["SimpleGroup"] = true, + ["Frame"] = true, + ["DropdownGroup"] = true +} + local function Widget_OnEnter(b) b:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) -end; +end + local function Widget_OnLeave(b) b:SetBackdropBorderColor(0,0,0,1) -end; -local function Widget_ScrollStyle(e, f) - if _G[e:GetName().."BG"]then - _G[e:GetName().."BG"]:SetTexture(0,0,0,0) - end; - if _G[e:GetName().."Track"]then - _G[e:GetName().."Track"]:SetTexture(0,0,0,0) - end; - if _G[e:GetName().."Top"]then - _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() - if not _G[e:GetName().."ScrollUpButton"].icon then - STYLE:ApplyPaginationStyle(_G[e:GetName().."ScrollUpButton"]) - SquareButton_SetIcon(_G[e:GetName().."ScrollUpButton"], "UP") - _G[e:GetName().."ScrollUpButton"]:Size(_G[e:GetName().."ScrollUpButton"]:GetWidth()+7, _G[e:GetName().."ScrollUpButton"]:GetHeight()+7) - end; - _G[e:GetName().."ScrollDownButton"]:Formula409() - if not _G[e:GetName().."ScrollDownButton"].icon then - STYLE:ApplyPaginationStyle(_G[e:GetName().."ScrollDownButton"]) - SquareButton_SetIcon(_G[e:GetName().."ScrollDownButton"], "DOWN") - _G[e:GetName().."ScrollDownButton"]:Size(_G[e:GetName().."ScrollDownButton"]:GetWidth()+7, _G[e:GetName().."ScrollDownButton"]:GetHeight()+7) - end; - if not e.styledBackground then - e.styledBackground = CreateFrame("Frame", nil, e) - e.styledBackground:Point("TOPLEFT", _G[e:GetName().."ScrollUpButton"], "BOTTOMLEFT", 0, -1) - e.styledBackground:Point("BOTTOMRIGHT", _G[e:GetName().."ScrollDownButton"], "TOPRIGHT", 0, 1) - e.styledBackground:SetPanelTemplate("Inset", true) - end; - if e:GetThumbTexture()then - if not f then - f = 3 - end; - e:GetThumbTexture():SetTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - end - end -end; - -local function Widget_ButtonStyle(h, i, j) - if h.Left then h.Left:SetAlpha(0)end; - if h.Middle then h.Middle:SetAlpha(0)end; - if h.Right then h.Right:SetAlpha(0)end; - if h.SetNormalTexture then h:SetNormalTexture("")end; - if h.SetHighlightTexture then h:SetHighlightTexture("")end; - if h.SetPushedTexture then h:SetPushedTexture("")end; - if h.SetDisabledTexture then h:SetDisabledTexture("")end; - if i then h:Formula409()end; - if not h.template and not j then h:SetFixedPanelTemplate("Button")end; - h:HookScript("OnEnter", Widget_OnEnter)h:HookScript("OnLeave", Widget_OnLeave) -end; +end + +local function Widget_ScrollStyle(frame, arg) + return STYLE:ApplyScrollFrameStyle(frame) +end + +local function Widget_ButtonStyle(frame, strip, j) + if frame.Left then frame.Left:SetAlpha(0) end + if frame.Middle then frame.Middle:SetAlpha(0) end + if frame.Right then frame.Right:SetAlpha(0) end + if frame.SetNormalTexture then frame:SetNormalTexture(0,0,0,0) end + if frame.SetHighlightTexture then frame:SetHighlightTexture(0,0,0,0) end + if frame.SetPushedTexture then frame:SetPushedTexture(0,0,0,0) end + if frame.SetDisabledTexture then frame:SetDisabledTexture(0,0,0,0) end + if strip then frame:Formula409() end + if not frame.template and not j then frame:SetFixedPanelTemplate("Button")end + frame:HookScript("OnEnter", Widget_OnEnter)frame:HookScript("OnLeave", Widget_OnLeave) +end local function Widget_PaginationStyle(...) STYLE:ApplyPaginationStyle(...) @@ -85,45 +68,52 @@ end local NOOP = SuperVillain.fubar +local WidgetButton_OnClick = function(self) + local obj = self.obj; + if(obj and obj.pullout and obj.pullout.frame and (not obj.pullout.frame.Panel)) then + obj.pullout.frame:SetFixedPanelTemplate("Default") + end +end + +local WidgetDropButton_OnClick = function(self) + local obj = self.obj; + local widgetFrame = obj.dropdown + if(widgetFrame and not widgetFrame.Panel) then + widgetFrame:SetBasicPanel() + widgetFrame.Panel:SetPoint("TOPLEFT", widgetFrame, "TOPLEFT", 20, -2) + widgetFrame.Panel:SetPoint("BOTTOMRIGHT", widgetFrame, "BOTTOMRIGHT", -20, 2) + end +end +--[[ +########################################################## +AceGUI STYLE +########################################################## +]]-- local function StyleAceGUI(event, addon) assert((LibStub("AceGUI-3.0") and (addon == "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; local regContainer = AceGUI.RegisterAsContainer; AceGUI.RegisterAsWidget = function(self, widget) - local n = widget.type; - if n == "MultiLineEditBox"then - local e = widget.frame; - e:SetFixedPanelTemplate("Pattern") - if not widget.scrollBG.template then - widget.scrollBG:SetFixedPanelTemplate("Inset") + + local widgetType = widget.type; + + if(widgetType == "MultiLineEditBox") then + local widgetFrame = widget.frame; + widgetFrame:SetFixedPanelTemplate("Pattern") + if not widget.scrollBG.Panel then + widget.scrollBG:SetBasicPanel() end Widget_ButtonStyle(widget.button) - Widget_ScrollStyle(widget.scrollBar) - widget.scrollBar:SetPoint("RIGHT", e, "RIGHT", -4) + STYLE:ApplyScrollFrameStyle(widget.scrollBar) + widget.scrollBar:SetPoint("RIGHT", widgetFrame, "RIGHT", -4) widget.scrollBG:SetPoint("TOPRIGHT", widget.scrollBar, "TOPLEFT", -2, 19) widget.scrollBG:SetPoint("BOTTOMLEFT", widget.button, "TOPLEFT") widget.scrollFrame:SetPoint("BOTTOMRIGHT", widget.scrollBG, "BOTTOMRIGHT", -4, 8) - elseif n == "CheckBox"then + + elseif(widgetType == "CheckBox") then widget.checkbg:MUNG() widget.highlight:MUNG() if not widget.styledCheckBG then @@ -132,122 +122,111 @@ local function StyleAceGUI(event, addon) widget.styledCheckBG:SetFixedPanelTemplate("Inset") end widget.check:SetParent(widget.styledCheckBG) - elseif n == "Dropdown"then - local e = widget.dropdown; - local o = widget.button; - local p = widget.text; - e:Formula409() - o:ClearAllPoints() - o:Point("RIGHT", e, "RIGHT", -20, 0) - o:SetFrameLevel(o:GetFrameLevel() + 1) - Widget_PaginationStyle(o, true) - if not e.Panel then - e:SetPanelTemplate("Inset") - e.Panel:Point("TOPLEFT", e, "TOPLEFT", 20, -2) - e.Panel:Point("BOTTOMRIGHT", e, "BOTTOMRIGHT", -20, 2) - local level = e:GetFrameLevel() - if(level > 0) then - e.Panel:SetFrameLevel(level - 1) - else - e.Panel:SetFrameLevel(0) - end - end - o:SetParent(e.Panel) - p:SetParent(e.Panel) - o:HookScript("OnClick", function(s) - local self = s.obj; - self.pullout.frame:SetFixedPanelTemplate("Default") - end) - elseif n == "LSM30_Font" or n == "LSM30_Sound" or n == "LSM30_Border" or n == "LSM30_Background" or n == "LSM30_Statusbar" then - local e = widget.frame; - local o = e.dropButton; - local p = e.text; - e:Formula409() - Widget_PaginationStyle(o, true) - e.text:ClearAllPoints() - e.text:Point("RIGHT", o, "LEFT", -2, 0) - o:ClearAllPoints() - o:Point("RIGHT", e, "RIGHT", -10, -6) - if not e.Panel then - e:SetFixedPanelTemplate("Inset") - if n == "LSM30_Font"then - e.Panel:Point("TOPLEFT", 20, -17) - elseif n == "LSM30_Sound"then - e.Panel:Point("TOPLEFT", 20, -17) - widget.soundbutton:SetParent(e.Panel) - widget.soundbutton:ClearAllPoints() - widget.soundbutton:Point("LEFT", e.Panel, "LEFT", 2, 0) - elseif n == "LSM30_Statusbar"then - e.Panel:Point("TOPLEFT", 20, -17) - widget.bar:SetParent(e.Panel) - widget.bar:FillInner() - elseif n == "LSM30_Border"or n == "LSM30_Background"then - e.Panel:Point("TOPLEFT", 42, -16) - end - e.Panel:Point("BOTTOMRIGHT", o, "BOTTOMRIGHT", 2, -2) + + elseif(widgetType == "Dropdown") then + local widgetDropdown = widget.dropdown; + local widgetButton = widget.button; + + widgetDropdown:Formula409() + widgetButton:ClearAllPoints() + widgetButton:Point("RIGHT", widgetDropdown, "RIGHT", -20, 0) + widgetButton:SetFrameLevel(widgetButton:GetFrameLevel() + 1) + Widget_PaginationStyle(widgetButton, true) + + if(not widgetDropdown.Panel) then + widgetDropdown:SetBasicPanel() + widgetDropdown.Panel:Point("TOPLEFT", widgetDropdown, "TOPLEFT", 20, -2) + widgetDropdown.Panel:Point("BOTTOMRIGHT", widgetDropdown, "BOTTOMRIGHT", -20, 2) end - o:SetParent(e.Panel) - p:SetParent(e.Panel) - o:HookScript("OnClick", function(s, o) - local self = s.obj; - if(self.dropdown and not self.dropdown.Panel) then - local e = self.dropdown - e:SetPanelTemplate("Inset") - e.Panel:Point("TOPLEFT", e, "TOPLEFT", 20, -2) - e.Panel:Point("BOTTOMRIGHT", e, "BOTTOMRIGHT", -20, 2) - local level = e:GetFrameLevel() - if(level > 0) then - e.Panel:SetFrameLevel(level - 1) - else - e.Panel:SetFrameLevel(0) - end - end - end) - elseif n == "EditBox" then - local e = widget.editbox; - local o = widget.button; - local boxName = e:GetName() + + widgetButton:SetParent(widgetDropdown.Panel) + widget.text:SetParent(widgetDropdown.Panel) + widgetButton:HookScript("OnClick", WidgetButton_OnClick) + + elseif(widgetType == "EditBox") then + local widgetEditbox = widget.editbox; + local boxName = widgetEditbox:GetName() + if(_G[boxName.."Left"]) then _G[boxName.."Left"]:MUNG() end + if(_G[boxName.."Middle"]) then _G[boxName.."Middle"]:MUNG() end + if(_G[boxName.."Right"]) then _G[boxName.."Right"]:MUNG() end - e:Height(17) - e:SetFixedPanelTemplate("Inset") - local level = e:GetFrameLevel() - if(level > 0) then - e.Panel:SetFrameLevel(level - 1) - else - e.Panel:SetFrameLevel(0) + + widgetEditbox:Height(17) + widgetEditbox:SetBasicPanel() + Widget_ButtonStyle(widget.button) + + elseif(widgetType == "Button") then + local widgetFrame = widget.frame; + Widget_ButtonStyle(widgetFrame, nil, true) + + if(not widgetFrame.Panel) then + widgetFrame:Formula409() + widgetFrame:SetFixedPanelTemplate("Button", true) + end + widget.text:SetParent(widgetFrame.Panel) + + elseif(widgetType == "Slider") then + local widgetSlider = widget.slider; + local widgetEditbox = widget.editbox; + + if(not widgetSlider.Panel) then + widgetSlider:Formula409() + widgetSlider:SetBasicPanel() + end + + widgetSlider:Height(20) + widgetSlider:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") + widgetSlider:GetThumbTexture():SetVertexColor(0.8, 0.8, 0.8) + + widgetEditbox:Height(15) + widgetEditbox:SetPoint("TOP", widgetSlider, "BOTTOM", 0, -1) + + if(not widgetEditbox.Panel) then + widgetEditbox:SetBasicPanel() end - Widget_ButtonStyle(o) - elseif n == "Button"then - local e = widget.frame; - Widget_ButtonStyle(e, nil, true) - e:Formula409() - e:SetFixedPanelTemplate("Button", true) - e.Panel:FillInner() - widget.text:SetParent(e.Panel) - elseif n == "Slider"then - local e = widget.slider; - local t = widget.editbox; - local u = widget.lowtext; - local v = widget.hightext; - local w = 20; - e:Formula409() - e:SetFixedPanelTemplate("Inset") - e:Height(w) - e:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - e:GetThumbTexture():SetVertexColor(0.8, 0.8, 0.8) - t:SetFixedPanelTemplate("Inset") - t:Height(15) - t:Point("TOP", e, "BOTTOM", 0, -1) - u:SetPoint("TOPLEFT", e, "BOTTOMLEFT", 2, -2) - v:SetPoint("TOPRIGHT", e, "BOTTOMRIGHT", -2, -2) + + widget.lowtext:SetPoint("TOPLEFT", widgetSlider, "BOTTOMLEFT", 2, -2) + widget.hightext:SetPoint("TOPRIGHT", widgetSlider, "BOTTOMRIGHT", -2, -2) + + elseif(ProxyLSMType[widgetType]) then + local widgetFrame = widget.frame; + local dropButton = widgetFrame.dropButton; + + widgetFrame:Formula409() + Widget_PaginationStyle(dropButton, true) + widgetFrame.text:ClearAllPoints() + widgetFrame.text:Point("RIGHT", dropButton, "LEFT", -2, 0) + dropButton:ClearAllPoints() + dropButton:Point("RIGHT", widgetFrame, "RIGHT", -10, -6) + if(not widgetFrame.Panel) then + widgetFrame:SetBasicPanel() + if(widgetType == "LSM30_Font") then + widgetFrame.Panel:Point("TOPLEFT", 20, -17) + elseif(widgetType == "LSM30_Sound") then + widgetFrame.Panel:Point("TOPLEFT", 20, -17) + widget.soundbutton:SetParent(widgetFrame.Panel) + widget.soundbutton:ClearAllPoints() + widget.soundbutton:Point("LEFT", widgetFrame.Panel, "LEFT", 2, 0) + elseif(widgetType == "LSM30_Statusbar") then + widgetFrame.Panel:Point("TOPLEFT", 20, -17) + widget.bar:SetParent(widgetFrame.Panel) + widget.bar:FillInner() + elseif(widgetType == "LSM30_Border" or widgetType == "LSM30_Background") then + widgetFrame.Panel:Point("TOPLEFT", 42, -16) + end + widgetFrame.Panel:Point("BOTTOMRIGHT", dropButton, "BOTTOMRIGHT", 2, -2) + end + dropButton:SetParent(widgetFrame.Panel) + widgetFrame.text:SetParent(widgetFrame.Panel) + dropButton:HookScript("OnClick", WidgetDropButton_OnClick) end return regWidget(self, widget) end @@ -255,61 +234,63 @@ local function StyleAceGUI(event, addon) local externaltest = false; AceGUI.RegisterAsContainer = function(self, widget) - local n = widget.type; - if n == "ScrollFrame" then - local e = widget.scrollbar; - Widget_ScrollStyle(e) - elseif n == "Window" then - local e = widget.content:GetParent() - e:SetPanelTemplate("Halftone") - elseif n == "InlineGroup" or n == "TreeGroup" or n == "TabGroup" or n == "SimpleGroup" or n == "Frame" or n == "DropdownGroup" then - local e = widget.content:GetParent() - if n == "Frame" then - e:Formula409() - for z = 1, e:GetNumChildren()do - local A = select(z, e:GetChildren()) + local widgetType = widget.type; + local widgetParent = widget.content:GetParent() + if widgetType == "ScrollFrame" then + STYLE:ApplyScrollFrameStyle(widget.scrollBar) + elseif widgetType == "Window" then + widgetParent:SetPanelTemplate("Halftone") + elseif(ProxyType[widgetType]) then + if widgetType == "Frame" then + widgetParent:Formula409() + for z = 1, widgetParent:GetNumChildren()do + local A = select(z, widgetParent:GetChildren()) if A:GetObjectType() == "Button"and A:GetText() then Widget_ButtonStyle(A) else A:Formula409() end end - end - if not widget.treeframe then + end + + if widget.treeframe then + widget.treeframe:SetBasicPanel() + widgetParent:SetPoint("TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0) + local oldFunc = widget.CreateButton; + widget.CreateButton = function(self) + local newButton = oldFunc(self) + newButton.toggle:Formula409() + newButton.toggle.SetNormalTexture = NOOP; + newButton.toggle.SetPushedTexture = NOOP; + newButton.toggle:SetButtonTemplate() + newButton.toggleText = newButton.toggle:CreateFontString(nil, "OVERLAY") + newButton.toggleText:SetFont([[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]], 19) + newButton.toggleText:SetPoint("CENTER") + newButton.toggleText:SetText("*") + return newButton + end + else if not externaltest then - e:SetPanelTemplate("Halftone") - e.Panel:SetFrameLevel(0) + widgetParent:SetPanelTemplate("Halftone") + widgetParent.Panel:SetFrameLevel(0) externaltest = true else - e:SetFixedPanelTemplate("Default") - end - end - if widget.treeframe then - widget.treeframe:SetFixedPanelTemplate("Inset") - e:Point("TOPLEFT", widget.treeframe, "TOPRIGHT", 1, 0) - local B = widget.CreateButton; - widget.CreateButton = function(self) - local o = B(self) - o.toggle:Formula409() - o.toggle.SetNormalTexture = NOOP; - o.toggle.SetPushedTexture = NOOP; - o.toggle:SetButtonTemplate() - o.toggleText = o.toggle:CreateFontString(nil, "OVERLAY") - o.toggleText:SetFont([[Interface\AddOns\SVUI\assets\fonts\Roboto.ttf]], 19) - o.toggleText:SetPoint("CENTER") - o.toggleText:SetText("*") - return o - end - end - if n == "TabGroup" then - local createTab = widget.CreateTab; + widgetParent:SetFixedPanelTemplate("Default") + end + end + + if(widgetType == "TabGroup") then + local oldFunc = widget.CreateTab; widget.CreateTab = function(self, arg) - local tab = createTab(self, arg) - tab:Formula409() - return tab + local newTab = oldFunc(self, arg) + newTab:Formula409() + return newTab end end - if widget.scrollbar then Widget_ScrollStyle(widget.scrollbar) end + + if widget.scrollbar then + STYLE:ApplyScrollFrameStyle(widget.scrollBar) + end end return regContainer(self, widget) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua index e03744f..1750f9f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/system.lua @@ -46,12 +46,6 @@ local SystemFrameList2 = { "VideoOptionsFrame", "AudioOptionsFrame", }; -local SystemFrameList3 = { - "ChatMenu", - "EmoteMenu", - "LanguageMenu", - "VoiceMacroMenu", -}; local SystemFrameList4 = { "Options", "Store", @@ -65,7 +59,9 @@ local SystemFrameList4 = { "Quit", "Continue", "MacOptions", - "Help" + "Help", + "WhatsNew", + "Addons" }; local SystemFrameList5 = { "GameMenuFrame", @@ -90,100 +86,7 @@ local SystemFrameList6 = { "StackSplitCancelButton", "RolePollPopupAcceptButton" }; -local SystemFrameList7 = { - "ChatConfigFrame", - "ChatConfigBackgroundFrame", - "ChatConfigCategoryFrame", - "ChatConfigChatSettingsClassColorLegend", - "ChatConfigChatSettingsLeft", - "ChatConfigChannelSettingsLeft", - "ChatConfigChannelSettingsClassColorLegend", - "ChatConfigOtherSettingsCombat", - "ChatConfigOtherSettingsPVP", - "ChatConfigOtherSettingsSystem", - "ChatConfigOtherSettingsCreature", - "ChatConfigCombatSettingsFilters", - "CombatConfigMessageSourcesDoneBy", - "CombatConfigMessageSourcesDoneTo", - "CombatConfigColorsUnitColors", - "CombatConfigColorsHighlighting", - "CombatConfigColorsColorizeUnitName", - "CombatConfigColorsColorizeSpellNames", - "CombatConfigColorsColorizeDamageNumber", - "CombatConfigColorsColorizeDamageSchool", - "CombatConfigColorsColorizeEntireLine", -}; -local SystemFrameList8 = { - "ChatConfigFrameDefaultButton", - "ChatConfigFrameOkayButton", - "CombatLogDefaultButton", - "ChatConfigCombatSettingsFiltersCopyFilterButton", - "ChatConfigCombatSettingsFiltersAddFilterButton", - "ChatConfigCombatSettingsFiltersDeleteButton", - "CombatConfigSettingsSaveButton", - "ChatConfigFrameCancelButton", -}; -local SystemFrameList9 = { - "ChatConfigCategoryFrame", - "ChatConfigBackgroundFrame", - "ChatConfigChatSettingsClassColorLegend", - "ChatConfigChannelSettingsClassColorLegend", - "ChatConfigCombatSettingsFilters", - "ChatConfigCombatSettingsFiltersScrollFrame", - "CombatConfigColorsHighlighting", - "CombatConfigColorsColorizeUnitName", - "CombatConfigColorsColorizeSpellNames", - "CombatConfigColorsColorizeDamageNumber", - "CombatConfigColorsColorizeDamageSchool", - "CombatConfigColorsColorizeEntireLine", - "ChatConfigChatSettingsLeft", - "ChatConfigOtherSettingsCombat", - "ChatConfigOtherSettingsPVP", - "ChatConfigOtherSettingsSystem", - "ChatConfigOtherSettingsCreature", - "ChatConfigChannelSettingsLeft", - "CombatConfigMessageSourcesDoneBy", - "CombatConfigMessageSourcesDoneTo", - "CombatConfigColorsUnitColors", -}; -local SystemFrameList10 = { - "CombatConfigColorsColorizeSpellNames", - "CombatConfigColorsColorizeDamageNumber", - "CombatConfigColorsColorizeDamageSchool", - "CombatConfigColorsColorizeEntireLine", -}; -local SystemFrameList11 = { - "ChatConfigFrameOkayButton", - "ChatConfigFrameDefaultButton", - "CombatLogDefaultButton", - "ChatConfigCombatSettingsFiltersDeleteButton", - "ChatConfigCombatSettingsFiltersAddFilterButton", - "ChatConfigCombatSettingsFiltersCopyFilterButton", - "CombatConfigSettingsSaveButton", -}; -local SystemFrameList12 = { - "CombatConfigColorsHighlightingLine", - "CombatConfigColorsHighlightingAbility", - "CombatConfigColorsHighlightingDamage", - "CombatConfigColorsHighlightingSchool", - "CombatConfigColorsColorizeUnitNameCheck", - "CombatConfigColorsColorizeSpellNamesCheck", - "CombatConfigColorsColorizeSpellNamesSchoolColoring", - "CombatConfigColorsColorizeDamageNumberCheck", - "CombatConfigColorsColorizeDamageNumberSchoolColoring", - "CombatConfigColorsColorizeDamageSchoolCheck", - "CombatConfigColorsColorizeEntireLineCheck", - "CombatConfigFormattingShowTimeStamp", - "CombatConfigFormattingShowBraces", - "CombatConfigFormattingUnitNames", - "CombatConfigFormattingSpellNames", - "CombatConfigFormattingItemNames", - "CombatConfigFormattingFullText", - "CombatConfigSettingsShowQuickButton", - "CombatConfigSettingsSolo", - "CombatConfigSettingsParty", - "CombatConfigSettingsRaid", -}; + local SystemFrameList13 = { "VideoOptionsFrameCategoryFrame", "VideoOptionsFramePanelContainer", @@ -489,9 +392,6 @@ end SYSTEM WIDGET STYLERS ########################################################## ]]-- -local ChatGeneric_OnShow = function(self) if(not self.Panel) then self:SetPanelTemplate("Halftone") end end -local ChatMenu_OnShow = function(self) if(not self.Panel) then self:SetPanelTemplate("Halftone") end self:ClearAllPoints() self:Point("BOTTOMLEFT", ChatFrame1, "TOPLEFT", 0, 30) end - local function SystemPanelQue() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.misc ~= true then return end QueueStatusFrame:Formula409() @@ -524,17 +424,7 @@ local function SystemPanelQue() this:SetPanelTemplate("Halftone") end end - for i = 1, #SystemFrameList3 do - local name = SystemFrameList3[i] - local this = _G[name] - if(this) then - if(name == "ChatMenu") then - this:HookScript("OnShow", ChatMenu_OnShow) - else - this:HookScript("OnShow", ChatGeneric_OnShow) - end - end - end + LFDRoleCheckPopup:Formula409() LFDRoleCheckPopup:SetFixedPanelTemplate() LFDRoleCheckPopupAcceptButton:SetButtonTemplate() @@ -674,220 +564,49 @@ local function SystemPanelQue() end OpacityFrame:Formula409() OpacityFrame:SetFixedPanelTemplate("Transparent", true) - for i = 1, #SystemFrameList7 do - local this = _G[SystemFrameList7[i]] - if(this) then - this:Formula409() - end - end - for i = 1, #SystemFrameList8 do - local this = _G[SystemFrameList8[i]] - if(this) then - this:SetButtonTemplate() - end - end - ChatConfigFrameOkayButton:Point("RIGHT", ChatConfigFrameCancelButton, "RIGHT", -11, -1) - ChatConfigCombatSettingsFiltersDeleteButton:Point("TOPRIGHT", ChatConfigCombatSettingsFilters, "BOTTOMRIGHT", 0, -1) - ChatConfigCombatSettingsFiltersAddFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersDeleteButton, "LEFT", -1, 0) - ChatConfigCombatSettingsFiltersCopyFilterButton:Point("RIGHT", ChatConfigCombatSettingsFiltersAddFilterButton, "LEFT", -1, 0) - for i=1, 5 do - local this = _G["CombatConfigTab"..i] - if(this) then - this:Formula409() - end - end - CombatConfigSettingsNameEditBox:SetEditboxTemplate() - ChatConfigFrame:SetPanelTemplate("Pattern", true) - for i = 1, #SystemFrameList9 do - local this = _G[SystemFrameList9[i]] - if(this) then - this:Formula409() - this:SetFixedPanelTemplate("Inset", true) - end - end - for i = 1, #SystemFrameList10 do - local this = _G[SystemFrameList10[i]] - if(this) then - this:ClearAllPoints() - if this == CombatConfigColorsColorizeSpellNames then - this:Point("TOP",CombatConfigColorsColorizeUnitName,"BOTTOM",0,-2) - else - this:Point("TOP",_G[SystemFrameList10[i-1]],"BOTTOM",0,-2) - end - end - end - ChatConfigChannelSettingsLeft:RegisterEvent("PLAYER_ENTERING_WORLD") - ChatConfigChannelSettingsLeft:SetScript("OnEvent", function(self, event) - ChatConfigChannelSettingsLeft:UnregisterEvent("PLAYER_ENTERING_WORLD") - for i = 1,#ChatConfigChannelSettingsLeft.checkBoxTable do - _G["ChatConfigChannelSettingsLeftCheckBox"..i]:Formula409() - _G["ChatConfigChannelSettingsLeftCheckBox"..i]:SetPanelTemplate() - _G["ChatConfigChannelSettingsLeftCheckBox"..i].Panel:Point("TOPLEFT",3,-1) - _G["ChatConfigChannelSettingsLeftCheckBox"..i].Panel:Point("BOTTOMRIGHT",-3,1) - _G["ChatConfigChannelSettingsLeftCheckBox"..i]:SetHeight(ChatConfigOtherSettingsCombatCheckBox1:GetHeight()) - _G["ChatConfigChannelSettingsLeftCheckBox"..i.."Check"]:SetCheckboxTemplate(true) - _G["ChatConfigChannelSettingsLeftCheckBox"..i.."ColorClasses"]:SetCheckboxTemplate(true) - _G["ChatConfigChannelSettingsLeftCheckBox"..i.."ColorClasses"]:SetHeight(ChatConfigChatSettingsLeftCheckBox1Check:GetHeight()) - end - end) - CreateChatChannelList(self, GetChannelList()) - ChatConfig_CreateCheckboxes(ChatConfigChannelSettingsLeft, CHAT_CONFIG_CHANNEL_LIST, "ChatConfigCheckBoxWithSwatchAndClassColorTemplate", CHANNELS) - ChatConfig_UpdateCheckboxes(ChatConfigChannelSettingsLeft) - ChatConfigBackgroundFrame:SetScript("OnShow", function(self) - for i = 1,#CHAT_CONFIG_CHAT_LEFT do - _G["ChatConfigChatSettingsLeftCheckBox"..i]:Formula409() - _G["ChatConfigChatSettingsLeftCheckBox"..i]:SetPanelTemplate() - _G["ChatConfigChatSettingsLeftCheckBox"..i].Panel:Point("TOPLEFT",3,-1) - _G["ChatConfigChatSettingsLeftCheckBox"..i].Panel:Point("BOTTOMRIGHT",-3,1) - _G["ChatConfigChatSettingsLeftCheckBox"..i]:SetHeight(ChatConfigOtherSettingsCombatCheckBox1:GetHeight()) - _G["ChatConfigChatSettingsLeftCheckBox"..i.."Check"]:SetCheckboxTemplate(true) - _G["ChatConfigChatSettingsLeftCheckBox"..i.."ColorClasses"]:SetCheckboxTemplate(true) - _G["ChatConfigChatSettingsLeftCheckBox"..i.."ColorClasses"]:SetHeight(ChatConfigChatSettingsLeftCheckBox1Check:GetHeight()) - end - for i = 1,#CHAT_CONFIG_OTHER_COMBAT do - _G["ChatConfigOtherSettingsCombatCheckBox"..i]:Formula409() - _G["ChatConfigOtherSettingsCombatCheckBox"..i]:SetPanelTemplate() - _G["ChatConfigOtherSettingsCombatCheckBox"..i].Panel:Point("TOPLEFT",3,-1) - _G["ChatConfigOtherSettingsCombatCheckBox"..i].Panel:Point("BOTTOMRIGHT",-3,1) - _G["ChatConfigOtherSettingsCombatCheckBox"..i.."Check"]:SetCheckboxTemplate(true) - end - for i = 1,#CHAT_CONFIG_OTHER_PVP do - _G["ChatConfigOtherSettingsPVPCheckBox"..i]:Formula409() - _G["ChatConfigOtherSettingsPVPCheckBox"..i]:SetPanelTemplate() - _G["ChatConfigOtherSettingsPVPCheckBox"..i].Panel:Point("TOPLEFT",3,-1) - _G["ChatConfigOtherSettingsPVPCheckBox"..i].Panel:Point("BOTTOMRIGHT",-3,1) - _G["ChatConfigOtherSettingsPVPCheckBox"..i.."Check"]:SetCheckboxTemplate(true) - end - for i = 1,#CHAT_CONFIG_OTHER_SYSTEM do - _G["ChatConfigOtherSettingsSystemCheckBox"..i]:Formula409() - _G["ChatConfigOtherSettingsSystemCheckBox"..i]:SetPanelTemplate() - _G["ChatConfigOtherSettingsSystemCheckBox"..i].Panel:Point("TOPLEFT",3,-1) - _G["ChatConfigOtherSettingsSystemCheckBox"..i].Panel:Point("BOTTOMRIGHT",-3,1) - _G["ChatConfigOtherSettingsSystemCheckBox"..i.."Check"]:SetCheckboxTemplate(true) - end - for i = 1,#CHAT_CONFIG_CHAT_CREATURE_LEFT do - _G["ChatConfigOtherSettingsCreatureCheckBox"..i]:Formula409() - _G["ChatConfigOtherSettingsCreatureCheckBox"..i]:SetPanelTemplate() - _G["ChatConfigOtherSettingsCreatureCheckBox"..i].Panel:Point("TOPLEFT",3,-1) - _G["ChatConfigOtherSettingsCreatureCheckBox"..i].Panel:Point("BOTTOMRIGHT",-3,1) - _G["ChatConfigOtherSettingsCreatureCheckBox"..i.."Check"]:SetCheckboxTemplate(true) - end - for i = 1,#COMBAT_CONFIG_MESSAGESOURCES_BY do - _G["CombatConfigMessageSourcesDoneByCheckBox"..i]:Formula409() - _G["CombatConfigMessageSourcesDoneByCheckBox"..i]:SetPanelTemplate() - _G["CombatConfigMessageSourcesDoneByCheckBox"..i].Panel:Point("TOPLEFT",3,-1) - _G["CombatConfigMessageSourcesDoneByCheckBox"..i].Panel:Point("BOTTOMRIGHT",-3,1) - _G["CombatConfigMessageSourcesDoneByCheckBox"..i.."Check"]:SetCheckboxTemplate(true) - end - for i = 1,#COMBAT_CONFIG_MESSAGESOURCES_TO do - _G["CombatConfigMessageSourcesDoneToCheckBox"..i]:Formula409() - _G["CombatConfigMessageSourcesDoneToCheckBox"..i]:SetPanelTemplate() - _G["CombatConfigMessageSourcesDoneToCheckBox"..i].Panel:Point("TOPLEFT",3,-1) - _G["CombatConfigMessageSourcesDoneToCheckBox"..i].Panel:Point("BOTTOMRIGHT",-3,1) - _G["CombatConfigMessageSourcesDoneToCheckBox"..i.."Check"]:SetCheckboxTemplate(true) - end - for i = 1,#COMBAT_CONFIG_UNIT_COLORS do - _G["CombatConfigColorsUnitColorsSwatch"..i]:Formula409() - _G["CombatConfigColorsUnitColorsSwatch"..i]:SetPanelTemplate() - _G["CombatConfigColorsUnitColorsSwatch"..i].Panel:Point("TOPLEFT",3,-1) - _G["CombatConfigColorsUnitColorsSwatch"..i].Panel:Point("BOTTOMRIGHT",-3,1) - end - for i=1,4 do - for j=1,4 do - if _G["CombatConfigMessageTypesLeftCheckBox"..i] and _G["CombatConfigMessageTypesLeftCheckBox"..i.."_"..j] then - _G["CombatConfigMessageTypesLeftCheckBox"..i]:SetCheckboxTemplate(true) - _G["CombatConfigMessageTypesLeftCheckBox"..i.."_"..j]:SetCheckboxTemplate(true) - end - end - for j=1,10 do - if _G["CombatConfigMessageTypesRightCheckBox"..i] and _G["CombatConfigMessageTypesRightCheckBox"..i.."_"..j] then - _G["CombatConfigMessageTypesRightCheckBox"..i]:SetCheckboxTemplate(true) - _G["CombatConfigMessageTypesRightCheckBox"..i.."_"..j]:SetCheckboxTemplate(true) - end - end - _G["CombatConfigMessageTypesMiscCheckBox"..i]:SetCheckboxTemplate(true) - end - end) - for i = 1,#COMBAT_CONFIG_TABS do - local this = _G["CombatConfigTab"..i] - if(this) then - STYLE:ApplyTabStyle(this) - this:SetHeight(this:GetHeight()-2) - this:SetWidth(ceil(this:GetWidth()+1.6)) - _G["CombatConfigTab"..i.."Text"]:SetPoint("BOTTOM",0,10) - end - end - CombatConfigTab1:ClearAllPoints() - CombatConfigTab1:SetPoint("BOTTOMLEFT",ChatConfigBackgroundFrame,"TOPLEFT",6,-2) - for i = 1, #SystemFrameList11 do - local this = _G[SystemFrameList11[i]] - if(this) then - this:SetButtonTemplate() - end - end - ChatConfigFrameOkayButton:SetPoint("TOPRIGHT",ChatConfigBackgroundFrame,"BOTTOMRIGHT",-3,-5) - ChatConfigFrameDefaultButton:SetPoint("TOPLEFT",ChatConfigCategoryFrame,"BOTTOMLEFT",1,-5) - CombatLogDefaultButton:SetPoint("TOPLEFT",ChatConfigCategoryFrame,"BOTTOMLEFT",1,-5) - ChatConfigCombatSettingsFiltersDeleteButton:SetPoint("TOPRIGHT",ChatConfigCombatSettingsFilters,"BOTTOMRIGHT",-3,-1) - ChatConfigCombatSettingsFiltersCopyFilterButton:SetPoint("RIGHT",ChatConfigCombatSettingsFiltersDeleteButton,"LEFT",-2,0) - ChatConfigCombatSettingsFiltersAddFilterButton:SetPoint("RIGHT",ChatConfigCombatSettingsFiltersCopyFilterButton,"LEFT",-2,0) - for i = 1, #SystemFrameList12 do - local this = _G[SystemFrameList12[i]] - if(this) then - this:SetCheckboxTemplate(true) - end - end - STYLE:ApplyPaginationStyle(ChatConfigMoveFilterUpButton,true) - STYLE:ApplyPaginationStyle(ChatConfigMoveFilterDownButton,true) - ChatConfigMoveFilterUpButton:ClearAllPoints() - ChatConfigMoveFilterDownButton:ClearAllPoints() - ChatConfigMoveFilterUpButton:SetPoint("TOPLEFT",ChatConfigCombatSettingsFilters,"BOTTOMLEFT",3,0) - ChatConfigMoveFilterDownButton:SetPoint("LEFT",ChatConfigMoveFilterUpButton,24,0) - CombatConfigSettingsNameEditBox:SetEditboxTemplate() - ChatConfigFrame:Size(680,596) - ChatConfigFrameHeader:ClearAllPoints() - ChatConfigFrameHeader:SetPoint("TOP", ChatConfigFrame, 0, -5) - hooksecurefunc("UIDropDownMenu_InitializeHelper", function(frame) + + hooksecurefunc("UIDropDownMenu_InitializeHelper", function(self) for i = 1, UIDROPDOWNMENU_MAXLEVELS do - _G["DropDownList"..i.."Backdrop"]:SetFixedPanelTemplate("Transparent", true) - _G["DropDownList"..i.."MenuBackdrop"]:SetFixedPanelTemplate("Transparent", true) + local name = ("DropDownList%d"):format(i) + local bg = _G[("%sBackdrop"):format(name)] + STYLE:ApplyBasicBG(bg) + local menu = _G[("%sMenuBackdrop"):format(name)] + STYLE:ApplyBasicBG(menu) end - end) + end) + GuildInviteFrame:Formula409() GuildInviteFrame:SetFixedPanelTemplate('Transparent') - - --[[MISC STYLINGS REMOVED HERE]]-- - + GuildInviteFrame.Points:Formula409() + GuildInviteFrame.Points:ClearAllPoints() + GuildInviteFrame.Points:SetPoint('TOP', GuildInviteFrame, 'CENTER', -15, -25) GuildInviteFrameJoinButton:SetButtonTemplate() GuildInviteFrameDeclineButton:SetButtonTemplate() GuildInviteFrame:Height(225) GuildInviteFrame:HookScript("OnEvent", function() GuildInviteFrame:Height(225) end) + GuildInviteFrameWarningText:MUNG() BattleTagInviteFrame:Formula409() BattleTagInviteFrame:SetFixedPanelTemplate('Transparent') - + --BattleTagInviteFrameScrollFrame:SetEditboxTemplate() + for i=1, BattleTagInviteFrame:GetNumChildren() do local child = select(i, BattleTagInviteFrame:GetChildren()) if child:GetObjectType() == 'Button' then child:SetButtonTemplate() end end + for i = 1, #SystemFrameList13 do - local this = _G[SystemFrameList13[i]] - if(this) then - this:Formula409() - this:SetFixedPanelTemplate("Inset") - if this ~= _G["VideoOptionsFramePanelContainer"] and this ~= _G["InterfaceOptionsFramePanelContainer"] then - this.Panel:Point("TOPLEFT",-1,0) - this.Panel:Point("BOTTOMRIGHT",0,1) - else - this.Panel:Point("TOPLEFT", 0, 0) - this.Panel:Point("BOTTOMRIGHT", 0, 0) - end + local frame = _G[SystemFrameList13[i]] + if(frame) then + frame:Formula409() + frame:SetBasicPanel() end end + for i = 1, #SystemFrameList14 do local this = _G[SystemFrameList14[i]] if(this) then @@ -895,6 +614,7 @@ local function SystemPanelQue() STYLE:ApplyTabStyle(this) end end + InterfaceOptionsFrameTab1:ClearAllPoints() InterfaceOptionsFrameTab1:SetPoint("BOTTOMLEFT",InterfaceOptionsFrameCategories,"TOPLEFT",-11,-2) VideoOptionsFrameDefaults:ClearAllPoints() @@ -925,7 +645,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList18 do local this = _G[SystemFrameList18[i]] if(this) then - STYLE:ApplyDropdownStyle(this,165) + STYLE:ApplyDropdownStyle(this, 165) end end for i = 1, #SystemFrameList19 do @@ -949,7 +669,7 @@ local function SystemPanelQue() for i = 1, #SystemFrameList21 do local this = _G[SystemFrameList21[i]] if(this) then - STYLE:ApplyScrollbarStyle(this) + STYLE:ApplyScrollBarStyle(this) end end MacOptionsFrame:Formula409() @@ -965,7 +685,7 @@ local function SystemPanelQue() STYLE:ApplyDropdownStyle(MacOptionsFrameResolutionDropDown) STYLE:ApplyDropdownStyle(MacOptionsFrameFramerateDropDown) STYLE:ApplyDropdownStyle(MacOptionsFrameCodecDropDown) - STYLE:ApplyScrollbarStyle(MacOptionsFrameQualitySlider) + STYLE:ApplyScrollBarStyle(MacOptionsFrameQualitySlider) for i = 1, 11 do local this = _G["MacOptionsFrameCheckButton"..i] if(this) then diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua index 8a7e64f..5f73355 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/talents.lua @@ -111,18 +111,18 @@ local function TalentFrameStyle() PlayerTalentFrameInset:Formula409() PlayerTalentFrameTalents:Formula409() - local r = CreateFrame('Frame', nil, PlayerTalentFrame) - r:WrapOuter(PlayerTalentFrame) + PlayerTalentFrame.Panel = CreateFrame('Frame', nil, PlayerTalentFrame) + PlayerTalentFrame.Panel:WrapOuter(PlayerTalentFrame) - local s = PlayerTalentFrame:GetFrameLevel() + local panelLevel = PlayerTalentFrame:GetFrameLevel() - if((s - 1) >= 0) then - r:SetFrameLevel(s - 1) + if((panelLevel - 1) >= 0) then + PlayerTalentFrame.Panel:SetFrameLevel(panelLevel - 1) else - r:SetFrameLevel(0) + PlayerTalentFrame.Panel:SetFrameLevel(0) end + PlayerTalentFrame.Panel:SetPanelTemplate("Halftone") - PlayerTalentFrame:SetPanelTemplate("Halftone") PlayerTalentFrame.Panel:Point("BOTTOMRIGHT", PlayerTalentFrame, "BOTTOMRIGHT", 0, -5) PlayerTalentFrameSpecializationTutorialButton:MUNG() PlayerTalentFrameTalentsTutorialButton:MUNG() @@ -135,8 +135,8 @@ local function TalentFrameStyle() if(button) then button:Formula409() button:SetButtonTemplate() - local d, e, k, g = button:GetPoint() - button:Point(d, e, k, g, -28) + local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = button:GetPoint() + button:SetPoint(initialAnchor, anchorParent, relativeAnchor, xPosition, -28) end end @@ -148,58 +148,61 @@ local function TalentFrameStyle() 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) + for i = 1, 4 do + STYLE:ApplyTabStyle(_G["PlayerTalentFrameTab"..i]) + if i == 1 then + local d, e, k, g = _G["PlayerTalentFrameTab"..i]:GetPoint() + _G["PlayerTalentFrameTab"..i]:Point(d, e, k, g, -4) end end - hooksecurefunc('PlayerTalentFrame_UpdateTabs', function() - for b = 1, 4 do - local d, e, k, g = _G['PlayerTalentFrameTab'..b]:GetPoint() - _G['PlayerTalentFrameTab'..b]:Point(d, e, k, g, -4) + hooksecurefunc("PlayerTalentFrame_UpdateTabs", function() + for i = 1, 4 do + local d, e, k, g = _G["PlayerTalentFrameTab"..i]:GetPoint() + _G["PlayerTalentFrameTab"..i]:Point(d, e, k, g, -4) end end) PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetTexture(1, 1, 1) PlayerTalentFrameSpecializationSpellScrollFrameScrollChild.Seperator:SetAlpha(0.2) - for b = 1, 2 do - local v = _G['PlayerSpecTab'..b] - _G['PlayerSpecTab'..b..'Background']:MUNG() + for i = 1, 2 do + local v = _G["PlayerSpecTab"..i] + _G["PlayerSpecTab"..i.."Background"]:MUNG() ChangeTabHelper(v) end - hooksecurefunc('PlayerTalentFrame_UpdateSpecs', function() + hooksecurefunc("PlayerTalentFrame_UpdateSpecs", function() local d, x, f, g, h = PlayerSpecTab1:GetPoint() PlayerSpecTab1:Point(d, x, f, -1, h) end) - for b = 1, MAX_NUM_TALENT_TIERS do - local y = _G["PlayerTalentFrameTalentsTalentRow"..b] - _G["PlayerTalentFrameTalentsTalentRow"..b.."Bg"]:Hide() + for i = 1, MAX_NUM_TALENT_TIERS do + local y = _G["PlayerTalentFrameTalentsTalentRow"..i] + _G["PlayerTalentFrameTalentsTalentRow"..i.."Bg"]:Hide() y:DisableDrawLayer("BORDER") y:Formula409() y.TopLine:Point("TOP", 0, 4) y.BottomLine:Point("BOTTOM", 0, -4) for z = 1, NUM_TALENT_COLUMNS do - local A = _G["PlayerTalentFrameTalentsTalentRow"..b.."Talent"..z] - local B = _G["PlayerTalentFrameTalentsTalentRow"..b.."Talent"..z.."IconTexture"]A:Formula409() - A:SetFrameLevel(A:GetFrameLevel()+5) - A:SetPanelTemplate("Transparent") - A.Panel:WrapOuter(B) - B:SetDrawLayer("OVERLAY") - B:SetTexCoord(0.1, 0.9, 0.1, 0.9) - A.bg = CreateFrame("Frame", nil, A) - A.bg:SetFrameLevel(A:GetFrameLevel()-2) - A.bg:Point("TOPLEFT", 15, -1) - A.bg:Point("BOTTOMRIGHT", -10, 1) - A.bg:SetFixedPanelTemplate("Default") - A.bg.SelectedTexture = A.bg:CreateTexture(nil, 'ARTWORK') - A.bg.SelectedTexture:Point("TOPLEFT", A, "TOPLEFT", 15, -1) - A.bg.SelectedTexture:Point("BOTTOMRIGHT", A, "BOTTOMRIGHT", -10, 1) + local A = _G["PlayerTalentFrameTalentsTalentRow"..i.."Talent"..z] + local B = _G["PlayerTalentFrameTalentsTalentRow"..i.."Talent"..z.."IconTexture"] + if(A and B) then + A:Formula409() + A:SetFrameLevel(A:GetFrameLevel()+5) + A:SetBasicPanel() + A.Panel:WrapOuter(B) + B:SetDrawLayer("OVERLAY") + B:SetTexCoord(0.1, 0.9, 0.1, 0.9) + A.bg = CreateFrame("Frame", nil, A) + A.bg:SetFrameLevel(A:GetFrameLevel()-2) + A.bg:Point("TOPLEFT", 15, -1) + A.bg:Point("BOTTOMRIGHT", -10, 1) + A.bg:SetFixedPanelTemplate("Default") + A.bg.SelectedTexture = A.bg:CreateTexture(nil, "ARTWORK") + A.bg.SelectedTexture:Point("TOPLEFT", A, "TOPLEFT", 15, -1) + A.bg.SelectedTexture:Point("BOTTOMRIGHT", A, "BOTTOMRIGHT", -10, 1) + end end end @@ -241,7 +244,8 @@ local function TalentFrameStyle() local F = GetSpecialization(nil, i.isPet, PlayerSpecTab2:GetChecked() and 2 or 1) local G = E or F or 1; local H, p, p, icon = GetSpecializationInfo(G, nil, i.isPet) - local I = i.spellsScroll.child;I.specIcon:SetTexture(icon) + local I = i.spellsScroll.child; + I.specIcon:SetTexture(icon) local J = 1; local K; if i.isPet then @@ -263,7 +267,8 @@ local function TalentFrameStyle() J = J+1 end for b = 1, GetNumSpecializations(nil, i.isPet)do - local A = i["specButton"..b]A.SelectedTexture:FillInner(A.Panel) + local A = i["specButton"..b] + A.SelectedTexture:FillInner(A.Panel) if A.selected then A.SelectedTexture:Show() else @@ -348,9 +353,10 @@ STYLE LOADING STYLE:SaveBlizzardStyle("Blizzard_TalentUI", TalentFrameStyle) local function GlyphStyle() + GlyphFrame:Formula409() GlyphFrame.background:ClearAllPoints() GlyphFrame.background:SetAllPoints(PlayerTalentFrameInset) - GlyphFrame:SetPanelTemplate("Comic", false, 0, 3, 3) + GlyphFrame:SetFixedPanelTemplate("Comic", false, 0, 3, 3) GlyphFrameSideInset:Formula409() GlyphFrameClearInfoFrame:SetFixedPanelTemplate("Comic") GlyphFrameClearInfoFrame.icon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) @@ -360,13 +366,13 @@ local function GlyphStyle() GlyphFrameClearInfoFrame:Point("TOPLEFT", GlyphFrame, "BOTTOMLEFT", 6, -10) STYLE:ApplyDropdownStyle(GlyphFrameFilterDropDown, 212) GlyphFrameSearchBox:SetEditboxTemplate() - STYLE:ApplyScrollStyle(GlyphFrameScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(GlyphFrameScrollFrameScrollBar, 5) for b = 1, 10 do local e = _G["GlyphFrameScrollFrameButton"..b] local icon = _G["GlyphFrameScrollFrameButton"..b.."Icon"] e:Formula409() - STYLE:ApplyLinkButtonStyle(e) + STYLE:ApplyItemButtonStyle(e) icon:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua index b00d89e..5a5c6ed 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/taxi.lua @@ -26,9 +26,10 @@ local function TaxiStyle() end; TaxiFrame:Formula409() TaxiFrame:SetPanelTemplate("Default") - TaxiRouteMap:SetPanelTemplate("Transparent", false, 3, 3, 3) + + TaxiRouteMap:SetBasicPanel() TaxiRouteMap.Panel:WrapOuter(TaxiRouteMap, 4, 4) - TaxiFrame.Panel:SetFrameLevel(0) + STYLE:ApplyCloseButtonStyle(TaxiFrame.CloseButton) end; --[[ diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua index 2b4e388..a225e8b 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/ACP.lua @@ -80,7 +80,7 @@ local function StyleACP() end; for c=1,20 do _G["ACP_AddonListEntry"..c.."Enabled"]:SetCheckboxTemplate(true)end; ACP_AddonList_NoRecurse:SetCheckboxTemplate(true) - STYLE:ApplyScrollStyle(ACP_AddonList_ScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(ACP_AddonList_ScrollFrameScrollBar) STYLE:ApplyDropdownStyle(ACP_AddonListSortDropDown) ACP_AddonListSortDropDown:Width(130) ACP_AddonList_ScrollFrame:SetWidth(590) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua index 15c3572..500109e 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AdiBags.lua @@ -43,7 +43,7 @@ local function StyleAdiBags(event) local function SkinFrame(frame) local region = frame.HeaderRightRegion - frame:SetPanelTemplate("Transparent") + frame:SetBasicPanel() _G[frame:GetName()..'Bags']:SetPanelTemplate("Default") for i = 1, 3 do region.widgets[i].widget:SetButtonTemplate() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua index a673cf8..17fa321 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Altoholic.lua @@ -73,10 +73,10 @@ local function StyleAltoholic(event, addon) STYLE:ApplyFrameStyle(AltoholicFrameBagUsage) STYLE:ApplyFrameStyle(AltoholicFrameSkills) STYLE:ApplyFrameStyle(AltoholicFrameActivity) - STYLE:ApplyScrollbarStyle(AltoholicFrameSummaryScrollFrameScrollBar) - STYLE:ApplyScrollbarStyle(AltoholicFrameBagUsageScrollFrameScrollBar) - STYLE:ApplyScrollbarStyle(AltoholicFrameSkillsScrollFrameScrollBar) - STYLE:ApplyScrollbarStyle(AltoholicFrameActivityScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameSummaryScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameBagUsageScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameSkillsScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameActivityScrollFrameScrollBar) STYLE:ApplyDropdownStyle(AltoholicTabSummary_SelectLocation, 200) if(AltoholicFrameSummaryScrollFrame) then @@ -122,9 +122,9 @@ local function StyleAltoholic(event, addon) STYLE:ApplyFrameStyle(AltoholicFrameSpellbook) STYLE:ApplyFrameStyle(AltoholicFramePets) STYLE:ApplyFrameStyle(AltoholicFrameAuctions) - STYLE:ApplyScrollbarStyle(AltoholicFrameContainersScrollFrameScrollBar) - STYLE:ApplyScrollbarStyle(AltoholicFrameQuestsScrollFrameScrollBar) - STYLE:ApplyScrollbarStyle(AltoholicFrameRecipesScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameContainersScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameQuestsScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameRecipesScrollFrameScrollBar) STYLE:ApplyDropdownStyle(AltoholicFrameTalents_SelectMember) STYLE:ApplyDropdownStyle(AltoholicTabCharacters_SelectRealm) STYLE:ApplyPaginationStyle(AltoholicFrameSpellbookPrevPage) @@ -159,7 +159,7 @@ local function StyleAltoholic(event, addon) for i = 1, 7 do for j = 1, 14 do - STYLE:ApplyLinkButtonStyle(_G["AltoholicFrameContainersEntry"..i.."Item"..j]) + STYLE:ApplyItemButtonStyle(_G["AltoholicFrameContainersEntry"..i.."Item"..j]) _G["AltoholicFrameContainersEntry"..i.."Item"..j]:HookScript('OnShow', ColorAltoBorder) end end @@ -169,8 +169,8 @@ local function StyleAltoholic(event, addon) STYLE:ApplyUnderlayStyle(AltoholicFrameAchievements) AltoholicFrameAchievementsScrollFrame:Formula409(true) AltoholicAchievementsMenuScrollFrame:Formula409(true) - STYLE:ApplyScrollbarStyle(AltoholicFrameAchievementsScrollFrameScrollBar) - STYLE:ApplyScrollbarStyle(AltoholicAchievementsMenuScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameAchievementsScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicAchievementsMenuScrollFrameScrollBar) STYLE:ApplyDropdownStyle(AltoholicTabAchievements_SelectRealm) AltoholicTabAchievements_SelectRealm:Point("TOPLEFT", AltoholicFrame, "TOPLEFT", 205, -57) @@ -191,7 +191,7 @@ local function StyleAltoholic(event, addon) if IsAddOnLoaded("Altoholic_Agenda") or addon == "Altoholic_Agenda" then STYLE:ApplyFrameStyle(AltoholicFrameCalendarScrollFrame) STYLE:ApplyFrameStyle(AltoholicTabAgendaMenuItem1) - STYLE:ApplyScrollbarStyle(AltoholicFrameCalendarScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameCalendarScrollFrameScrollBar) STYLE:ApplyPaginationStyle(AltoholicFrameCalendar_NextMonth) STYLE:ApplyPaginationStyle(AltoholicFrameCalendar_PrevMonth) STYLE:ApplyButtonStyle(AltoholicTabAgendaMenuItem1, true) @@ -204,7 +204,7 @@ local function StyleAltoholic(event, addon) if IsAddOnLoaded("Altoholic_Grids") or addon == "Altoholic_Grids" then AltoholicFrameGridsScrollFrame:Formula409(true) STYLE:ApplyUnderlayStyle(AltoholicFrameGrids) - STYLE:ApplyScrollbarStyle(AltoholicFrameGridsScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameGridsScrollFrameScrollBar) STYLE:ApplyDropdownStyle(AltoholicTabGrids_SelectRealm) STYLE:ApplyDropdownStyle(AltoholicTabGrids_SelectView) @@ -230,7 +230,7 @@ local function StyleAltoholic(event, addon) if IsAddOnLoaded("Altoholic_Guild") or addon == "Altoholic_Guild" then STYLE:ApplyFrameStyle(AltoholicFrameGuildMembers) STYLE:ApplyFrameStyle(AltoholicFrameGuildBank) - STYLE:ApplyScrollbarStyle(AltoholicFrameGuildMembersScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameGuildMembersScrollFrameScrollBar) AltoholicFrameGuildMembersScrollFrame:Formula409(true) for i = 1, 2 do @@ -239,12 +239,12 @@ local function StyleAltoholic(event, addon) for i = 1, 7 do for j = 1, 14 do - STYLE:ApplyLinkButtonStyle(_G["AltoholicFrameGuildBankEntry"..i.."Item"..j]) + STYLE:ApplyItemButtonStyle(_G["AltoholicFrameGuildBankEntry"..i.."Item"..j]) end end for i = 1, 19 do - STYLE:ApplyLinkButtonStyle(_G["AltoholicFrameGuildMembersItem"..i]) + STYLE:ApplyItemButtonStyle(_G["AltoholicFrameGuildMembersItem"..i]) end for i = 1, 5 do @@ -256,8 +256,8 @@ local function StyleAltoholic(event, addon) STYLE:ApplyUnderlayStyle(AltoholicFrameSearch, true) AltoholicFrameSearchScrollFrame:Formula409(true) AltoholicSearchMenuScrollFrame:Formula409(true) - STYLE:ApplyScrollbarStyle(AltoholicFrameSearchScrollFrameScrollBar) - STYLE:ApplyScrollbarStyle(AltoholicSearchMenuScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicFrameSearchScrollFrameScrollBar) + STYLE:ApplyScrollBarStyle(AltoholicSearchMenuScrollFrameScrollBar) STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectRarity) STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectSlot) STYLE:ApplyDropdownStyle(AltoholicTabSearch_SelectLocation) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua index 004c1b0..cd01913 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/AtlasLoot.lua @@ -208,8 +208,8 @@ local function StyleAtlasLoot(event, addon) AtlasLootPanel.Titel:SetTextColor(23/255, 132/255, 209/255) AtlasLootPanel.Titel:SetPoint("BOTTOM", AtlasLootPanel.TitelBg, "BOTTOM", 0, 40) - STYLE:ApplyScrollStyle(AtlasLootCompareFrame_ScrollFrameItemFrameScrollBar) - STYLE:ApplyScrollStyle(AtlasLootCompareFrame_WishlistScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(AtlasLootCompareFrame_ScrollFrameItemFrameScrollBar) + STYLE:ApplyScrollFrameStyle(AtlasLootCompareFrame_WishlistScrollFrameScrollBar) AtlasLootDefaultFrame:HookScript("OnShow", AL_OnShow) AtlasLootCompareFrame:HookScript("OnShow", Compare_OnShow) AtlasLootPanel.timeLapse = 0; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua index f957bc3..0132037 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Bugsack.lua @@ -41,7 +41,7 @@ local function StyleBugSack(event, addon) hooksecurefunc(BugSack, "OpenSack", function() if BugSackFrame.Panel then return end BugSackFrame:Formula409() - BugSackFrame:SetPanelTemplate("Transparent") + BugSackFrame:SetBasicPanel() STYLE:ApplyTabStyle(BugSackTabAll) BugSackTabAll:SetPoint("TOPLEFT", BugSackFrame, "BOTTOMLEFT", 0, 1) STYLE:ApplyTabStyle(BugSackTabSession) @@ -49,7 +49,7 @@ local function StyleBugSack(event, addon) BugSackNextButton:SetButtonTemplate() BugSackSendButton:SetButtonTemplate() BugSackPrevButton:SetButtonTemplate() - STYLE:ApplyScrollbarStyle(BugSackScrollScrollBar) + STYLE:ApplyScrollBarStyle(BugSackScrollScrollBar) end) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua index 126e8f3..a23da07 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/LightHeaded.lua @@ -76,7 +76,7 @@ local function StyleLightHeaded() 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) + STYLE:ApplyScrollFrameStyle(LightHeadedScrollFrameScrollBar, 5) lhsub.title:SetTextColor(23/255, 132/255, 209/255) lhframe.timeLapse = 0; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua index 2b073ea..a1057e8 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Mogit.lua @@ -55,7 +55,7 @@ local function StyleMogItPreview() } for _, object in pairs(MogItGearSlots) do if _G["MogItPreview"..i..object] then - STYLE:ApplyLinkButtonStyle(_G["MogItPreview"..i..object]) + STYLE:ApplyItemButtonStyle(_G["MogItPreview"..i..object]) _G["MogItPreview"..i..object]:SetPushedTexture(nil) _G["MogItPreview"..i..object]:SetHighlightTexture(nil) end @@ -81,7 +81,7 @@ local function StyleMogIt() STYLE:ApplyCloseButtonStyle(MogItFiltersCloseButton) MogItFrameFiltersDefaults:Formula409(true) MogItFrameFiltersDefaults:SetButtonTemplate() - STYLE:ApplyScrollStyle(MogItScroll) - STYLE:ApplyScrollStyle(MogItFiltersScrollScrollBar) + STYLE:ApplyScrollFrameStyle(MogItScroll) + STYLE:ApplyScrollFrameStyle(MogItFiltersScrollScrollBar) end STYLE:SaveAddonStyle("MogIt", StyleMogIt) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua index 8acfaf2..7bee43f 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Outfitter.lua @@ -65,7 +65,7 @@ local function StyleOutfitter() OutfitterFrameTab1:SetButtonTemplate() OutfitterFrameTab2:SetButtonTemplate() OutfitterFrameTab3:SetButtonTemplate() - STYLE:ApplyScrollStyle(OutfitterMainFrameScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(OutfitterMainFrameScrollFrameScrollBar) STYLE:ApplyCloseButtonStyle(OutfitterCloseButton) OutfitterNewButton:SetButtonTemplate() OutfitterEnableNone:SetButtonTemplate() @@ -107,7 +107,7 @@ local function StyleOutfitter() OutfitterShowOutfitBar:Point("TOPLEFT", OutfitterAutoSwitch, "BOTTOMLEFT", 0, -5) OutfitterEditScriptDialogDoneButton:SetButtonTemplate() OutfitterEditScriptDialogCancelButton:SetButtonTemplate() - STYLE:ApplyScrollStyle(OutfitterEditScriptDialogSourceScriptScrollBar) + STYLE:ApplyScrollFrameStyle(OutfitterEditScriptDialogSourceScriptScrollBar) STYLE:ApplyFrameStyle(OutfitterEditScriptDialogSourceScript,"Transparent") STYLE:ApplyFrameStyle(OutfitterEditScriptDialog) STYLE:ApplyCloseButtonStyle(OutfitterEditScriptDialog.CloseButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua index 736a240..cef9ccc 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/Recount.lua @@ -102,7 +102,7 @@ local function StyleRecount() end end - STYLE:ApplyScrollStyle(Recount_MainWindow_ScrollBarScrollBar) + STYLE:ApplyScrollFrameStyle(Recount_MainWindow_ScrollBarScrollBar) Recount_MainWindow:HookScript('OnShow', function(self) if InCombatLockdown() then return end;if SuperVillain.CurrentlyDocked["Recount_MainWindow"] then SuperDockWindowRight:Show() end end) Recount.MainWindow.FileButton:HookScript('OnClick', function(self) if LibDropdownFrame0 then STYLE:ApplyFrameStyle(LibDropdownFrame0) end end) @@ -116,7 +116,7 @@ local function StyleRecount() Recount_ReportWindow.isStyled = true STYLE:ApplyFrameStyle(Recount_ReportWindow.Whisper) Recount_ReportWindow.ReportButton:SetButtonTemplate() - STYLE:ApplyScrollbarStyle(Recount_ReportWindow_Slider) + STYLE:ApplyScrollBarStyle(Recount_ReportWindow_Slider) Recount_ReportWindow_Slider:GetThumbTexture():Size(6,6) end) end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua index 9ba5cf9..777bce6 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/TradeSkillDW.lua @@ -62,7 +62,7 @@ local function StyleTradeSkillDW() end) TradeSkillFrame:Height(TradeSkillFrame:GetHeight() + 12) - TradeSkillRankFrame:SetPanelTemplate("Transparent") + TradeSkillRankFrame:SetBasicPanel() TradeSkillRankFrame:SetStatusBarTexture(SuperVillain.Media.bar.default) TradeSkillCreateButton:SetButtonTemplate() TradeSkillCancelButton:SetButtonTemplate() @@ -79,7 +79,7 @@ local function StyleTradeSkillDW() TradeSkillInputBox:SetEditboxTemplate() TradeSkillIncrementButton:Point("RIGHT", TradeSkillCreateButton, "LEFT", -13, 0) STYLE:ApplyCloseButtonStyle(TradeSkillFrameCloseButton) - STYLE:ApplyScrollStyle(TradeSkillDetailScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(TradeSkillDetailScrollFrameScrollBar) local once = false hooksecurefunc("TradeSkillFrame_SetSelection", function(id) TradeSkillSkillIcon:SetButtonTemplate() @@ -136,7 +136,7 @@ local function StyleTradeSkillDW() TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent6:Formula409() TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent7:Formula409() TradeSkillDW_QueueFrameDetailScrollFrameChildFrameReagent8:Formula409() - STYLE:ApplyScrollStyle(TradeSkillDW_QueueFrameDetailScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(TradeSkillDW_QueueFrameDetailScrollFrameScrollBar) TradeSkillListScrollFrame:Formula409() end STYLE:SaveAddonStyle("TradeSkillDW", StyleTradeSkillDW) \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua index 3487c57..539b4fe 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/VEM.lua @@ -241,7 +241,7 @@ local function StyleVEM(event, addon) STYLE:ApplyTabStyle(VEM_GUI_OptionsFrameTab2) VEM_GUI_OptionsFrameOkay:SetButtonTemplate() VEM_GUI_OptionsFrameWebsiteButton:SetButtonTemplate() - STYLE:ApplyScrollStyle(VEM_GUI_OptionsFramePanelContainerFOVScrollBar) + STYLE:ApplyScrollFrameStyle(VEM_GUI_OptionsFramePanelContainerFOVScrollBar) STYLE:SafeEventRemoval("VEM", event) end end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua index 906cb8a..f3d6d58 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/timemanager.lua @@ -44,11 +44,14 @@ local function TimeManagerStyle() sWatch:Point("TOPLEFT", TimeManagerStopwatchCheck, 2, -2) sWatch:Point("BOTTOMRIGHT", TimeManagerStopwatchCheck, -2, 2) TimeManagerStopwatchCheck:SetHighlightTexture(sWatch) + StopwatchFrame:Formula409() - StopwatchFrame:SetPanelTemplate("Transparent", true) + StopwatchFrame:SetBasicPanel() StopwatchFrame.Panel:Point("TOPLEFT", 0, -17) StopwatchFrame.Panel:Point("BOTTOMRIGHT", 0, 2) + StopwatchTabFrame:Formula409() + STYLE:ApplyCloseButtonStyle(StopwatchCloseButton) STYLE:ApplyPaginationStyle(StopwatchPlayPauseButton) STYLE:ApplyPaginationStyle(StopwatchResetButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua index ffc78dd..85ab9dd 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/tradeskill.lua @@ -34,8 +34,8 @@ local function TradeSkillStyle() TradeSkillRankFrame:Formula409() TradeSkillRankFrame:SetPanelTemplate("Slot", true, 1, 2, 2) TradeSkillRankFrame:SetStatusBarTexture(SuperVillain.Media.bar.default) - TradeSkillListScrollFrame:SetFixedPanelTemplate("Inset") - TradeSkillDetailScrollFrame:SetFixedPanelTemplate("Inset") + TradeSkillListScrollFrame:SetPanelTemplate("Inset") + TradeSkillDetailScrollFrame:SetPanelTemplate("Inset") TradeSkillFilterButton:Formula409(true) TradeSkillCreateButton:SetButtonTemplate() TradeSkillCancelButton:SetButtonTemplate() @@ -43,8 +43,8 @@ local function TradeSkillStyle() TradeSkillFilterButton.Panel:SetAllPoints() TradeSkillCreateAllButton:SetButtonTemplate() TradeSkillViewGuildCraftersButton:SetButtonTemplate() - STYLE:ApplyScrollStyle(TradeSkillListScrollFrameScrollBar) - STYLE:ApplyScrollStyle(TradeSkillDetailScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(TradeSkillListScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(TradeSkillDetailScrollFrameScrollBar) TradeSkillLinkButton:GetNormalTexture():SetTexCoord(0.25, 0.7, 0.37, 0.75) TradeSkillLinkButton:GetPushedTexture():SetTexCoord(0.25, 0.7, 0.45, 0.8) TradeSkillLinkButton:GetHighlightTexture():MUNG() diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua index 50b2469..3d237c2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/trainer.lua @@ -51,7 +51,7 @@ local function TrainerStyle() _G["ClassTrainerScrollFrameButton"..i].selectedTex:SetTexture(1, 1, 1, 0.3) _G["ClassTrainerScrollFrameButton"..i].selectedTex:FillInner() end; - STYLE:ApplyScrollStyle(ClassTrainerScrollFrameScrollBar, 5) + STYLE:ApplyScrollFrameStyle(ClassTrainerScrollFrameScrollBar, 5) for _,frame in pairs(ClassTrainerFrameList)do _G[frame]:Formula409() end; diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua index 175a916..f07a2f2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/transmog.lua @@ -81,8 +81,8 @@ local function TransmogStyle() TransmogrifyConfirmationPopup:SetPanelTemplate("Pattern") TransmogrifyConfirmationPopup.Button1:SetButtonTemplate() TransmogrifyConfirmationPopup.Button2:SetButtonTemplate() - STYLE:ApplyLinkButtonStyle(TransmogrifyConfirmationPopupItemFrame1, true) - STYLE:ApplyLinkButtonStyle(TransmogrifyConfirmationPopupItemFrame2, true) + STYLE:ApplyItemButtonStyle(TransmogrifyConfirmationPopupItemFrame1, true) + STYLE:ApplyItemButtonStyle(TransmogrifyConfirmationPopupItemFrame2, true) end; --[[ ########################################################## diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua index 976d7c5..1150dba 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/worldmap.lua @@ -86,7 +86,7 @@ local function WorldMapQuestStyle() STYLE:ApplyScrollStyle(WorldMapQuestScrollFrameScrollBar) STYLE:ApplyScrollStyle(WorldMapQuestDetailScrollFrameScrollBar, 4) STYLE:ApplyScrollStyle(WorldMapQuestRewardScrollFrameScrollBar, 4) - WorldMapFrame:SetPanelTemplate("Transparent") + WorldMapFrame:SetBasicPanel() WorldMapFrame.Panel:SetFrameLevel(1) WorldMapFrame.backdrop = CreateFrame("Frame", nil, WorldMapFrame) WorldMapFrame.backdrop:SetAllPoints(WorldMapFrame) @@ -94,7 +94,7 @@ local function WorldMapQuestStyle() WorldMapFrame.backdrop:SetPanelTemplate("Action"); WorldMapDetailFrame:SetFrameLevel(4) WorldMapArchaeologyDigSites:SetFrameLevel(6) - WorldMapDetailFrame:SetPanelTemplate("Inset") + WorldMapDetailFrame:SetBasicPanel() WorldMapDetailFrame.Panel:SetFrameLevel(3) STYLE:ApplyCloseButtonStyle(WorldMapFrameCloseButton) STYLE:ApplyCloseButtonStyle(WorldMapFrameSizeDownButton) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua index 1f809df..89573dd 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/worldstate.lua @@ -26,7 +26,7 @@ local function WorldStateStyle() WorldStateScoreFrame:Formula409() WorldStateScoreFrame:SetPanelTemplate("Halftone") STYLE:ApplyCloseButtonStyle(WorldStateScoreFrameCloseButton) - STYLE:ApplyScrollStyle(WorldStateScoreScrollFrameScrollBar) + STYLE:ApplyScrollFrameStyle(WorldStateScoreScrollFrameScrollBar) WorldStateScoreFrameInset:SetAlpha(0) WorldStateScoreFrameLeaveButton:SetButtonTemplate() for b = 1, 3 do diff --git a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua index a282f53..053a502 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/common/methods.lua @@ -39,60 +39,14 @@ local SuperVillain, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## -LOCAL FUNCTIONS -########################################################## -]]-- -local function Button_OnEnter(this) - this:SetBackdropColor(unpack(SuperVillain.Media.color.highlight)) -end - -local function Button_OnLeave(this) - this:SetBackdropColor(unpack(SuperVillain.Media.color.default)) -end - -local function Button_OnEnter2(this) - this:SetBackdropColor(unpack(SuperVillain.Media.color.highlight)) - this:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) -end - -local function Button_OnLeave2(this) - this:SetBackdropColor(unpack(SuperVillain.Media.color.default)) - this:SetBackdropBorderColor(0,0,0,1) -end - -local function Tab_OnEnter(this) - this.backdrop:SetPanelColor("highlight") - this.backdrop:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) -end - -local function Tab_OnLeave(this) - this.backdrop:SetPanelColor("dark") - this.backdrop:SetBackdropBorderColor(0,0,0,1) -end - -local function DD_OnClick(btn) - btn.func() - btn:GetParent():Hide() -end - -local function DD_OnEnter(btn) - btn.hoverTex:Show() -end - -local function DD_OnLeave(btn) - btn.hoverTex:Hide() -end - -local function CloseButton_OnEnter(this) - this:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) -end - -local function CloseButton_OnLeave(this) - this:SetBackdropBorderColor(0,0,0,1) -end ---[[ -########################################################## -CORE FUNCTIONS + /$$$$$$$$/$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$$$ +| $$_____/ $$__ $$ /$$__ $$| $$$ /$$$| $$_____/ +| $$ | $$ \ $$| $$ \ $$| $$$$ /$$$$| $$ +| $$$$$ | $$$$$$$/| $$$$$$$$| $$ $$/$$ $$| $$$$$ +| $$__/ | $$__ $$| $$__ $$| $$ $$$| $$| $$__/ +| $$ | $$ \ $$| $$ | $$| $$\ $ | $$| $$ +| $$ | $$ | $$| $$ | $$| $$ \/ | $$| $$$$$$$$ +|__/ |__/ |__/|__/ |__/|__/ |__/|________/ ########################################################## ]]-- function STYLE:ApplyFrameStyle(this, template, noStripping, fullStripping) @@ -108,26 +62,38 @@ function STYLE:ApplyUnderlayStyle(this, template, noStripping, fullStripping) template = template or "Transparent" this:SetFixedPanelTemplate(template) end +--[[ +########################################################## + /$$$$$$$ /$$ /$$ /$$$$$$$$/$$$$$$$$/$$$$$$ /$$ /$$ +| $$__ $$| $$ | $$|__ $$__/__ $$__/$$__ $$| $$$ | $$ +| $$ \ $$| $$ | $$ | $$ | $$ | $$ \ $$| $$$$| $$ +| $$$$$$$ | $$ | $$ | $$ | $$ | $$ | $$| $$ $$ $$ +| $$__ $$| $$ | $$ | $$ | $$ | $$ | $$| $$ $$$$ +| $$ \ $$| $$ | $$ | $$ | $$ | $$ | $$| $$\ $$$ +| $$$$$$$/| $$$$$$/ | $$ | $$ | $$$$$$/| $$ \ $$ +|_______/ \______/ |__/ |__/ \______/ |__/ \__/ +########################################################## +]]-- +local Button_OnEnter = function(self) + self:SetBackdropColor(unpack(SuperVillain.Media.color.highlight)) +end + +local Button_OnLeave = function(self) + self:SetBackdropColor(unpack(SuperVillain.Media.color.default)) +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 +--[[ CLOSE BUTTON ]]-- +local CloseButton_OnEnter = function(self) + self:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) 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 +local CloseButton_OnLeave = function(self) + self:SetBackdropBorderColor(0,0,0,1) end function STYLE:ApplyCloseButtonStyle(this, anchor) @@ -142,115 +108,185 @@ function STYLE:ApplyCloseButtonStyle(this, anchor) end end -function STYLE:ApplyRotateStyle(this) - -- Do stuff -end +--[[ ITEM BUTTON ]]-- -function STYLE:ApplyScrollStyle(this) - if(not this or (this and this.appliedStyle)) then return end - if _G[this:GetName().."BG"]then - _G[this:GetName().."BG"]:SetTexture(0,0,0,0) - end - if _G[this:GetName().."Track"]then - _G[this:GetName().."Track"]:SetTexture(0,0,0,0) - end - if _G[this:GetName().."Top"]then - _G[this:GetName().."Top"]:SetTexture(0,0,0,0) - end - if _G[this:GetName().."Bottom"]then - _G[this:GetName().."Bottom"]:SetTexture(0,0,0,0) - end - if _G[this:GetName().."Middle"]then - _G[this:GetName().."Middle"]:SetTexture(0,0,0,0) +function STYLE:ApplyItemButtonStyle(frame, adjust, shrink) + if(not frame or (frame and frame.StyleHooked)) then return end + + local link = frame:GetName() + + frame:Formula409() + + if(not frame.Panel) then + if shrink then + frame:SetPanelTemplate("Button", true, 1, -2, -2) + else + frame:SetFixedPanelTemplate("Button") + end + end + + if(link) then + local nameObject = _G[("%sName"):format(link)] + local iconObject = _G[("%sIcon"):format(link)] or _G[("%sIconTexture"):format(link)] + local countObject = _G[("%sCount"):format(link)] + + if(nameObject) then nameObject:SetParent(frame.Panel) end + + if(iconObject and not frame.IconShadow) then + iconObject:SetTexCoord(0.1, 0.9, 0.1, 0.9) + + if adjust then + iconObject:FillInner(frame, 2, 2) + end + + frame.IconShadow = CreateFrame("Frame", nil, frame) + frame.IconShadow:WrapOuter(iconObject) + frame.IconShadow:SetBasicPanel(0,0,0,0,true) + + iconObject:SetParent(frame.IconShadow) + end + + if(countObject and not frame.CountRaised) then + local fg = CreateFrame("Frame", nil, frame) + fg:SetSize(120, 22) + fg:SetPoint("BOTTOMLEFT", frame, "BOTTOMLEFT", 0, -11) + fg:SetFrameLevel(frame:GetFrameLevel() + 30) + + countObject:SetParent(fg) + countObject:SetAllPoints(fg) + countObject:SetFont(SuperVillain.Shared:Fetch("font", SuperVillain.db.media.fonts.number), SuperVillain.db.media.fonts.size, "OUTLINE") + countObject:SetDrawLayer("ARTWORK", 7) + + frame.CountRaised = true + end end - if _G[this:GetName().."ScrollUpButton"] and _G[this:GetName().."ScrollDownButton"]then - _G[this:GetName().."ScrollUpButton"]:Formula409() - if not _G[this:GetName().."ScrollUpButton"].icon then - STYLE:ApplyPaginationStyle(_G[this:GetName().."ScrollUpButton"]) - SquareButton_SetIcon(_G[this:GetName().."ScrollUpButton"], "UP") - _G[this:GetName().."ScrollUpButton"]:Size(_G[this:GetName().."ScrollUpButton"]:GetWidth() + 7, _G[this:GetName().."ScrollUpButton"]:GetHeight() + 7) + frame:HookScript("OnEnter", Button_OnEnter) + frame:HookScript("OnLeave", Button_OnLeave) + + frame.StyleHooked = true +end +--[[ +########################################################## + /$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$ /$$ + /$$__ $$ /$$__ $$| $$__ $$ /$$__ $$| $$ | $$ +| $$ \__/| $$ \__/| $$ \ $$| $$ \ $$| $$ | $$ +| $$$$$$ | $$ | $$$$$$$/| $$ | $$| $$ | $$ + \____ $$| $$ | $$__ $$| $$ | $$| $$ | $$ + /$$ \ $$| $$ $$| $$ \ $$| $$ | $$| $$ | $$ +| $$$$$$/| $$$$$$/| $$ | $$| $$$$$$/| $$$$$$$$| $$$$$$$$ + \______/ \______/ |__/ |__/ \______/ |________/|________/ +########################################################## +--]] +function STYLE:ApplyScrollFrameStyle(this) + if(not this or (this and this.StyleHooked)) then return end + + local scrollName = this:GetName() + local bg, track, top, bottom, mid, upButton, downButton + + + bg = _G[("%sBG"):format(scrollName)] + if(bg) then bg:SetTexture(0, 0, 0, 0) end + + track = _G[("%sTrack"):format(scrollName)] + if(track) then track:SetTexture(0, 0, 0, 0) end + + top = _G[("%sTop"):format(scrollName)] + if(top) then top:SetTexture(0, 0, 0, 0) end + + bottom = _G[("%sBottom"):format(scrollName)] + if(bottom) then bottom:SetTexture(0, 0, 0, 0) end + + mid = _G[("%sMiddle"):format(scrollName)] + if(mid) then mid:SetTexture(0, 0, 0, 0) end + + upButton = _G[("%sScrollUpButton"):format(scrollName)] + downButton = _G[("%sScrollDownButton"):format(scrollName)] + + if(upButton and downButton) then + upButton:Formula409() + if(not upButton.icon) then + local upW, upH = upButton:GetSize() + STYLE:ApplyPaginationStyle(upButton) + SquareButton_SetIcon(upButton, "UP") + upButton:Size(upW + 7, upH + 7) end - _G[this:GetName().."ScrollDownButton"]:Formula409() - if not _G[this:GetName().."ScrollDownButton"].icon then - STYLE:ApplyPaginationStyle(_G[this:GetName().."ScrollDownButton"]) - SquareButton_SetIcon(_G[this:GetName().."ScrollDownButton"], "DOWN") - _G[this:GetName().."ScrollDownButton"]:Size(_G[this:GetName().."ScrollDownButton"]:GetWidth() + 7, _G[this:GetName().."ScrollDownButton"]:GetHeight() + 7) + + downButton:Formula409() + if(not downButton.icon) then + local dnW, dnH = downButton:GetSize() + STYLE:ApplyPaginationStyle(downButton) + SquareButton_SetIcon(downButton, "DOWN") + downButton:Size(dnW + 7, dnH + 7) end - if not this.styledBackground then - this.styledBackground = CreateFrame("Frame", nil, this) - this.styledBackground:Point("TOPLEFT", _G[this:GetName().."ScrollUpButton"], "BOTTOMLEFT", 0, -1) - this.styledBackground:Point("BOTTOMRIGHT", _G[this:GetName().."ScrollDownButton"], "TOPRIGHT", 0, 1) - this.styledBackground:SetPanelTemplate("Inset", true) + + if(not this.ScrollBG) then + this.ScrollBG = CreateFrame("Frame", nil, this) + this.ScrollBG:SetPoint("TOPLEFT", upButton, "BOTTOMLEFT", 0, -1) + this.ScrollBG:SetPoint("BOTTOMRIGHT", downButton, "TOPRIGHT", 0, 1) + this.ScrollBG:SetBasicPanel() end - this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") + + if(this:GetThumbTexture()) then + this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") + end end - this.appliedStyle = true + + this.StyleHooked = true end -function STYLE:ApplyScrollbarStyle(this) - if(not this or (this and this.appliedStyle)) then return end +function STYLE:ApplyScrollBarStyle(this) + if(not this or (this and this.StyleHooked) or (this and not this.GetOrientation)) then return end + this:Formula409() - this:SetFixedPanelTemplate("Inset") - hooksecurefunc(this, "SetBackdrop", function(f, backdrop) - if backdrop ~= nil then - f:SetBackdrop(nil) - end - end) this:SetThumbTexture("Interface\\Buttons\\UI-ScrollBar-Knob") - if this:GetOrientation() == "VERTICAL"then + + if(this:GetOrientation() == "VERTICAL") then this:Width(12) else this:Height(12) - for i=1, this:GetNumRegions()do + for i=1, this:GetNumRegions() do local child = select(i, this:GetRegions()) - if child and child:GetObjectType() == "FontString" then + if(child and child:GetObjectType() == "FontString") then local anchor, parent, relative, x, y = child:GetPoint() - if relative:find("BOTTOM")then + if relative:find("BOTTOM") then child:Point(anchor, parent, relative, x, y - 4) end end end end - this.appliedStyle = true + + this:SetBasicPanel() + this.Panel:SetBackdropBorderColor(0.2,0.2,0.2) + + this.StyleHooked = true end +--[[ +########################################################## + /$$$$$$$$/$$$$$$ /$$$$$$$ /$$$$$$ +|__ $$__/$$__ $$| $$__ $$ /$$__ $$ + | $$ | $$ \ $$| $$ \ $$| $$ \__/ + | $$ | $$$$$$$$| $$$$$$$ | $$$$$$ + | $$ | $$__ $$| $$__ $$ \____ $$ + | $$ | $$ | $$| $$ \ $$ /$$ \ $$ + | $$ | $$ | $$| $$$$$$$/| $$$$$$/ + |__/ |__/ |__/|_______/ \______/ +########################################################## +--]] +local Tab_OnEnter = function(self) + self.backdrop:SetPanelColor("highlight") + self.backdrop:SetBackdropBorderColor(unpack(SuperVillain.Media.color.highlight)) +end -local function TabHelper(this) - this:Formula409() - local nTex = this:GetNormalTexture() - if(nTex) then - nTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) - nTex:FillInner() - end - this.pushed = true; - this.backdrop = CreateFrame("Frame", nil, this) - this.backdrop:WrapOuter(this,1,1) - this.backdrop:SetFrameLevel(0) - this.backdrop:SetBackdrop({ - bgFile = [[Interface\BUTTONS\WHITE8X8]], - tile = false, - tileSize = 0, - edgeFile = [[Interface\AddOns\SVUI\assets\artwork\Template\GLOW]], - edgeSize = 3, - insets = { - left = 0, - right = 0, - top = 0, - bottom = 0 - } - }); - this.backdrop:SetBackdropColor(0,0,0,1) - this.backdrop:SetBackdropBorderColor(0,0,0,1) - this:HookScript("OnEnter",Tab_OnEnter) - this:HookScript("OnLeave",Tab_OnLeave) - - local a,b,c,d,e = this:GetPoint() - this:Point(a,b,c,1,e) -end; - -function STYLE:ApplyTabStyle(this, full) - if(not this or (this and this.appliedStyle)) then return end +local Tab_OnLeave = function(self) + self.backdrop:SetPanelColor("dark") + self.backdrop:SetBackdropBorderColor(0,0,0,1) +end + +function STYLE:ApplyTabStyle(this, addBackground) + if(not this or (this and this.StyleHooked)) then return end local tab = this:GetName(); + if _G[tab.."Left"] then _G[tab.."Left"]:SetTexture(0,0,0,0) end if _G[tab.."LeftDisabled"] then _G[tab.."LeftDisabled"]:SetTexture(0,0,0,0) end if _G[tab.."Right"] then _G[tab.."Right"]:SetTexture(0,0,0,0) end @@ -258,164 +294,249 @@ function STYLE:ApplyTabStyle(this, full) if _G[tab.."Middle"] then _G[tab.."Middle"]:SetTexture(0,0,0,0) end if _G[tab.."MiddleDisabled"] then _G[tab.."MiddleDisabled"]:SetTexture(0,0,0,0) end - if this.GetHighlightTexture and this:GetHighlightTexture()then + if(not addBackground and (this.GetHighlightTexture and this:GetHighlightTexture())) then this:GetHighlightTexture():SetTexture(0,0,0,0) - else + else this:Formula409() - end - if(full) then - TabHelper(this) - end + if(addBackground) then + local nTex = this:GetNormalTexture() + + if(nTex) then + nTex:SetTexCoord(0.1, 0.9, 0.1, 0.9) + nTex:FillInner() + end + + this.pushed = true; + this.backdrop = CreateFrame("Frame", nil, this) + this.backdrop:WrapOuter(this,1,1) + this.backdrop:SetFrameLevel(0) + this.backdrop:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeFile = [[Interface\AddOns\SVUI\assets\artwork\Template\GLOW]], + edgeSize = 3, + insets = { + left = 0, + right = 0, + top = 0, + bottom = 0 + } + }); + this.backdrop:SetBackdropColor(0,0,0,1) + this.backdrop:SetBackdropBorderColor(0,0,0,1) + + local initialAnchor, anchorParent, relativeAnchor, xPosition, yPosition = this:GetPoint() + this:Point(initialAnchor, anchorParent, relativeAnchor, 1, yPosition) + else + this.backdrop = CreateFrame("Frame", nil, this) + this.backdrop:FillInner(this, 10, 3) + this.backdrop:SetFixedPanelTemplate("Component", true) + this.backdrop:SetPanelColor("dark") + + if(this:GetFrameLevel() > 0) then + this.backdrop:SetFrameLevel(this:GetFrameLevel() - 1) + end + end - local text = _G[tab.."Text"] - this.backdrop = CreateFrame("Frame", nil, this) - this.backdrop:FillInner(this, 10, 3) - this.backdrop:SetFixedPanelTemplate("Component", true) - this.backdrop:SetPanelColor("dark") - if(this:GetFrameLevel() > 0) then - this.backdrop:SetFrameLevel(this:GetFrameLevel() - 1) + this:HookScript("OnEnter", Tab_OnEnter) + this:HookScript("OnLeave", Tab_OnLeave) end - this:HookScript("OnEnter",Tab_OnEnter) - this:HookScript("OnLeave",Tab_OnLeave) - this.appliedStyle = true -end + this.StyleHooked = true +end +--[[ +########################################################## + /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$ +| $$__ $$ /$$__ $$ /$$__ $$| $$_____/ +| $$ \ $$| $$ \ $$| $$ \__/| $$ +| $$$$$$$/| $$$$$$$$| $$ /$$$$| $$$$$ +| $$____/ | $$__ $$| $$|_ $$| $$__/ +| $$ | $$ | $$| $$ \ $$| $$ +| $$ | $$ | $$| $$$$$$/| $$$$$$$$ +|__/ |__/ |__/ \______/ |________/ +########################################################## +--]] function STYLE:ApplyPaginationStyle(button, isVertical) - if(not button or not button:GetName() or (button and button.appliedStyle)) then return end - local c,d,e; - local leftDown = (button:GetName() and find(button:GetName():lower(),'left')) or find(button:GetName():lower(),'prev') or find(button:GetName():lower(),'decrement') + if(not button or (button and not button:GetName()) or (button and button.StyleHooked)) then return end + + local bName = button:GetName() + local testName = bName:lower() + local leftDown = ((bName and testName:find('left')) or testName:find('prev') or testName:find('decrement')) or false + button:Formula409() - button:SetNormalTexture(nil) - button:SetPushedTexture(nil) - button:SetHighlightTexture(nil) - button:SetDisabledTexture(nil) + button:SetNormalTexture(0,0,0,0) + button:SetPushedTexture(0,0,0,0) + button:SetHighlightTexture(0,0,0,0) + button:SetDisabledTexture(0,0,0,0) + + button:SetButtonTemplate() + button:Size((button:GetWidth() - 7), (button:GetHeight() - 7)) + if not button.icon then - button.icon=button:CreateTexture(nil,'ARTWORK') + button.icon = button:CreateTexture(nil,'ARTWORK') button.icon:Size(13) button.icon:SetPoint('CENTER') button.icon:SetTexture([[Interface\Buttons\SquareButtonTextures]]) - button.icon:SetTexCoord(0.01562500,0.20312500,0.01562500,0.20312500) - button:SetScript('OnMouseDown',function(g) - if g:IsEnabled()then - g.icon:SetPoint("CENTER",-1,-1) + button.icon:SetTexCoord(0.02, 0.2, 0.02, 0.2) + + button:SetScript('OnMouseDown',function(self) + if self:IsEnabled() then + self.icon:SetPoint("CENTER",-1,-1) end end) - button:SetScript('OnMouseUp',function(g) - g.icon:SetPoint("CENTER",0,0) + + button:SetScript('OnMouseUp',function(self) + self.icon:SetPoint("CENTER",0,0) end) - button:SetScript('OnDisable',function(g) - SetDesaturation(g.icon,true) - g.icon:SetAlpha(0.5) + + button:SetScript('OnDisable',function(self) + SetDesaturation(self.icon, true) + self.icon:SetAlpha(0.5) end) - button:SetScript('OnEnable',function(g) - SetDesaturation(g.icon,false) - g.icon:SetAlpha(1.0) + + button:SetScript('OnEnable',function(self) + SetDesaturation(self.icon, false) + self.icon:SetAlpha(1.0) end) - if not button:IsEnabled()then + + if not button:IsEnabled() then button:GetScript('OnDisable')(button) end - end + end + if isVertical then - if leftDown then SquareButton_SetIcon(button,'UP')else SquareButton_SetIcon(button,'DOWN')end + if leftDown then SquareButton_SetIcon(button,'UP') else SquareButton_SetIcon(button,'DOWN')end else - if leftDown then SquareButton_SetIcon(button,'LEFT')else SquareButton_SetIcon(button,'RIGHT')end - end - button:SetButtonTemplate() - button:Size((button:GetWidth() - 7),(button:GetHeight() - 7)) - button.appliedStyle = true + if leftDown then SquareButton_SetIcon(button,'LEFT') else SquareButton_SetIcon(button,'RIGHT')end + end + + button.StyleHooked = true end +--[[ +########################################################## + /$$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$$ +| $$__ $$| $$__ $$ /$$__ $$| $$__ $$ +| $$ \ $$| $$ \ $$| $$ \ $$| $$ \ $$ +| $$ | $$| $$$$$$$/| $$ | $$| $$$$$$$/ +| $$ | $$| $$__ $$| $$ | $$| $$____/ +| $$ | $$| $$ \ $$| $$ | $$| $$ +| $$$$$$$/| $$ | $$| $$$$$$/| $$ +|_______/ |__/ |__/ \______/ |__/ + /$$$$$$$ /$$$$$$ /$$ /$$ /$$ /$$ +| $$__ $$ /$$__ $$| $$ /$ | $$| $$$ | $$ +| $$ \ $$| $$ \ $$| $$ /$$$| $$| $$$$| $$ +| $$ | $$| $$ | $$| $$/$$ $$ $$| $$ $$ $$ +| $$ | $$| $$ | $$| $$$$_ $$$$| $$ $$$$ +| $$ | $$| $$ | $$| $$$/ \ $$$| $$\ $$$ +| $$$$$$$/| $$$$$$/| $$/ \ $$| $$ \ $$ +|_______/ \______/ |__/ \__/|__/ \__/ +########################################################## +--]] +local DropDownButton_SetPoint = function(self, _, _, _, _, _, breaker) + if not breaker then + self:Point("RIGHT", self.AnchorParent, "RIGHT", -10, 3, true) + end +end function STYLE:ApplyDropdownStyle(this, width) - if(not this or (this and this.appliedStyle)) then return end - local ddname = this:GetName(); - local button = _G[this:GetName().."Button"] + if(not this or (this and this.StyleHooked)) then return end + + local ddName = this:GetName(); + local ddText = _G[("%sText"):format(ddName)] + local ddButton = _G[("%sButton"):format(ddName)] + if not width then width = 155 end + this:Formula409() this:Width(width) - _G[ddname.."Text"]:ClearAllPoints() - _G[ddname.."Text"]:Point("RIGHT", button, "LEFT", -2, 0) - button:ClearAllPoints() - button:Point("RIGHT", this, "RIGHT", -10, 3) - hooksecurefunc(button, "SetPoint", function(this, _, _, _, _, _, breaker) - if not breaker then - button:ClearAllPoints() - button:Point("RIGHT", this, "RIGHT", -10, 3, true) - end - end) - STYLE:ApplyPaginationStyle(button, true) - local bg = CreateFrame("Frame", nil, this) - bg:Point("TOPLEFT", this, "TOPLEFT", 20, -2) - bg:Point("BOTTOMRIGHT", button, "BOTTOMRIGHT", 2, -2) - bg:SetPanelTemplate("FramedBottom") - this.appliedStyle = true -end -function STYLE:ApplyLinkButtonStyle(this, adjust, shrink) - if(not this or (this and this.appliedStyle)) then return end + if(ddButton) then + if(ddText) then + ddText:SetPoint("RIGHT", ddButton, "LEFT", -2, 0) + end - local link = this:GetName() - this:Formula409() + ddButton:ClearAllPoints() + ddButton:Point("RIGHT", this, "RIGHT", -10, 3) + ddButton.AnchorParent = this - if shrink then - this:SetPanelTemplate("Button", true, 1, -2, -2) - else - this:SetFixedPanelTemplate("Button") - end - if link then - if _G[link.."Name"] then - _G[link.."Name"]:SetParent(this.Panel) - end - local icon = this.icon or this.IconTexture; - if _G[link.."IconTexture"] then - icon = _G[link.."IconTexture"] - elseif _G[link.."Icon"]then - icon = _G[link.."Icon"] - end - if icon then - icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - if adjust then - icon:FillInner(this, 2, 2) - end - local bg = CreateFrame("Frame", nil, this) - bg:WrapOuter(icon) - bg:SetFixedPanelTemplate("Transparent") - icon:SetParent(bg) - this.IconShadow = bg + hooksecurefunc(ddButton, "SetPoint", DropDownButton_SetPoint) + + STYLE:ApplyPaginationStyle(ddButton, true) + + local currentLevel = this:GetFrameLevel() + if(currentLevel == 0) then + currentLevel = 1 end - if(_G[link.."Count"]) then - local fg = CreateFrame("Frame", nil, this) - fg:SetSize(120, 22) - fg:SetPoint("BOTTOMLEFT", this, "BOTTOMLEFT", 0, -11) - fg:SetFrameLevel(this:GetFrameLevel() + 30) - _G[link.."Count"]:SetParent(fg) - _G[link.."Count"]:SetAllPoints(fg) - _G[link.."Count"]:SetFontTemplate(SuperVillain.Media.font.numbers, 12, "OUTLINE", "LEFT") - _G[link.."Count"]:SetDrawLayer("ARTWORK",7) - end - end - this:HookScript("OnEnter",Button_OnEnter) - this:HookScript("OnLeave",Button_OnLeave) - this.appliedStyle = true + + local bg = CreateFrame("Frame", nil, this) + bg:Point("TOPLEFT", this, "TOPLEFT", 20, -2) + bg:Point("BOTTOMRIGHT", ddButton, "BOTTOMRIGHT", 2, -2) + bg:SetFrameLevel(currentLevel - 1) + bg:SetBackdrop({ + bgFile = [[Interface\BUTTONS\WHITE8X8]], + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + tileSize = 0, + edgeSize = 1, + insets = + { + left = 1, + right = 1, + top = 1, + bottom = 1, + }, + }) + bg:SetBackdropColor(0,0,0,0.75) + bg:SetBackdropBorderColor(0.2,0.2,0.2) + end + + this.StyleHooked = true end +--[[ +########################################################## + /$$$$$$$$/$$$$$$ /$$$$$$ /$$ /$$$$$$$$/$$$$$$ /$$$$$$$ +|__ $$__/$$__ $$ /$$__ $$| $$ |__ $$__/_ $$_/| $$__ $$ + | $$ | $$ \ $$| $$ \ $$| $$ | $$ | $$ | $$ \ $$ + | $$ | $$ | $$| $$ | $$| $$ | $$ | $$ | $$$$$$$/ + | $$ | $$ | $$| $$ | $$| $$ | $$ | $$ | $$____/ + | $$ | $$ | $$| $$ | $$| $$ | $$ | $$ | $$ + | $$ | $$$$$$/| $$$$$$/| $$$$$$$$| $$ /$$$$$$| $$ + |__/ \______/ \______/ |________/|__/ |______/|__/ +########################################################## +--]] +local Tooltip_OnShow = function(self) + self:SetBackdrop({ + bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]], + edgeFile = [[Interface\BUTTONS\WHITE8X8]], + tile = false, + edgeSize=1 + }) + self:SetBackdropColor(0,0,0,0.8) + self:SetBackdropBorderColor(0,0,0) +end function STYLE:ApplyTooltipStyle(frame) - if(not frame or (frame and frame.appliedStyle)) then return end - frame:HookScript('OnShow',function(this) - this:SetBackdrop({ - bgFile = [[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]], - edgeFile = [[Interface\BUTTONS\WHITE8X8]], - tile = false, - edgeSize=1 - }) - this:SetBackdropColor(0,0,0,0.8) - this:SetBackdropBorderColor(0,0,0) - end) - frame.appliedStyle = true + if(not frame or (frame and frame.StyleHooked)) then return end + frame:HookScript('OnShow', Tooltip_OnShow) + frame.StyleHooked = true end - +--[[ +########################################################## + /$$$$$$ /$$ /$$$$$$$$ /$$$$$$$ /$$$$$$$$ + /$$__ $$| $$ | $$_____/| $$__ $$|__ $$__/ +| $$ \ $$| $$ | $$ | $$ \ $$ | $$ +| $$$$$$$$| $$ | $$$$$ | $$$$$$$/ | $$ +| $$__ $$| $$ | $$__/ | $$__ $$ | $$ +| $$ | $$| $$ | $$ | $$ \ $$ | $$ +| $$ | $$| $$$$$$$$| $$$$$$$$| $$ | $$ | $$ +|__/ |__/|________/|________/|__/ |__/ |__/ +########################################################## +--]] function STYLE:ApplyAlertStyle(frame) - if(not frame or (frame and frame.appliedStyle)) then return end + if(not frame or (frame and frame.StyleHooked)) then return end + local alertpanel = CreateFrame("Frame", nil, frame) alertpanel:SetAllPoints(frame) alertpanel:SetFrameLevel(frame:GetFrameLevel() - 1) @@ -423,12 +544,14 @@ function STYLE:ApplyAlertStyle(frame) bgFile = "Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\Alert\\ALERT-BG" }) alertpanel:SetBackdropColor(0.8, 0.2, 0.2) + --[[ LEFT ]]-- local left = alertpanel:CreateTexture(nil, "BORDER") left:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\Alert\\ALERT-LEFT") left:Point("TOPRIGHT", alertpanel,"TOPLEFT", 0, 0) left:Point("BOTTOMRIGHT", alertpanel, "BOTTOMLEFT", 0, 0) left:Width(frame:GetHeight()) + --[[ RIGHT ]]-- local right = alertpanel:CreateTexture(nil, "BORDER") right:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\Alert\\ALERT-RIGHT") @@ -436,12 +559,14 @@ function STYLE:ApplyAlertStyle(frame) right:Point("TOPLEFT", alertpanel,"TOPRIGHT", -1, 0) right:Point("BOTTOMLEFT", alertpanel, "BOTTOMRIGHT", -1, 0) right:Width(frame:GetHeight() * 2) + --[[ TOP ]]-- local top = alertpanel:CreateTexture(nil, "BORDER") top:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\Alert\\ALERT-TOP") top:Point("BOTTOMLEFT", alertpanel,"TOPLEFT", 0, 0) top:Point("BOTTOMRIGHT", alertpanel, "TOPRIGHT", 0, 0) top:Height(frame:GetHeight() * 0.5) + --[[ BOTTOM ]]-- local bottom = alertpanel:CreateTexture(nil, "BORDER") bottom:SetTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Template\\Alert\\ALERT-BOTTOM") @@ -449,5 +574,36 @@ function STYLE:ApplyAlertStyle(frame) bottom:Point("TOPRIGHT", alertpanel, "BOTTOMRIGHT", 0, 0) bottom:Width(frame:GetHeight() * 0.5) - frame.appliedStyle = true -end \ No newline at end of file + frame.StyleHooked = true +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:ApplyRotateStyle(this) + -- Do stuff +end \ No newline at end of file