diff --git a/Interface/AddOns/SVUI/SVUI.lua b/Interface/AddOns/SVUI/SVUI.lua index 3abcc5a..717c741 100644 --- a/Interface/AddOns/SVUI/SVUI.lua +++ b/Interface/AddOns/SVUI/SVUI.lua @@ -225,15 +225,17 @@ function table.copy(targetTable,deepCopy,mergeTable) end function string.trim(this) - return this:find'^%s*$' and '' or this:match'^%s*(.*%S)' + return this:find('^%s*$') and '' or this:match('^%s*(.*%S)') end -function string.color(this,color) - return "|cff"..color..this.."|r"; +function string.color(this, color) + return ("|cff%s%s|r"):format(color, this) end -function string.link(this,prefix,text,color) - return "|H"..prefix..":"..tostring(text).."|h"..tostring(this):color(color or"ffffff").."|h"; +function string.link(this, prefix, text, color) + text = tostring(text) + local colorstring = tostring(this):color(color or "ffffff") + return ("|H%s:%s|h%s|h"):format(prefix, text, colorstring) end --[[ ########################################################## diff --git a/Interface/AddOns/SVUI/SVUI.xml b/Interface/AddOns/SVUI/SVUI.xml index 5292260..99085a3 100644 --- a/Interface/AddOns/SVUI/SVUI.xml +++ b/Interface/AddOns/SVUI/SVUI.xml @@ -95,105 +95,6 @@ </Frames> </Frame> - <Button name="OverrideTabButtonTemplate" virtual="true"> - <Size> - <AbsDimension x="115" y="24"/> - </Size> - <Layers> - <Layer level="BORDER"> - <Texture name="$parentLeftDisabled" file="Interface\AddOns\SVUI\assets\artwork\Template\EMPTY"> - <Size> - <AbsDimension x="20" y="24"/> - </Size> - <Anchors> - <Anchor point="BOTTOMLEFT"> - <Offset> - <AbsDimension x="0" y="-3"/> - </Offset> - </Anchor> - </Anchors> - </Texture> - <Texture name="$parentMiddleDisabled" file="Interface\AddOns\SVUI\assets\artwork\Template\EMPTY"> - <Size> - <AbsDimension x="88" y="24"/> - </Size> - <Anchors> - <Anchor point="LEFT" relativeTo="$parentLeftDisabled" relativePoint="RIGHT"/> - </Anchors> - </Texture> - <Texture name="$parentRightDisabled" file="Interface\AddOns\SVUI\assets\artwork\Template\EMPTY"> - <Size> - <AbsDimension x="20" y="24"/> - </Size> - <Anchors> - <Anchor point="LEFT" relativeTo="$parentMiddleDisabled" relativePoint="RIGHT"/> - </Anchors> - </Texture> - <Texture name="$parentLeft" file="Interface\AddOns\SVUI\assets\artwork\Template\EMPTY"> - <Size> - <AbsDimension x="20" y="24"/> - </Size> - <Anchors> - <Anchor point="TOPLEFT"/> - </Anchors> - </Texture> - <Texture name="$parentMiddle" file="Interface\AddOns\SVUI\assets\artwork\Template\EMPTY"> - <Size> - <AbsDimension x="88" y="24"/> - </Size> - <Anchors> - <Anchor point="LEFT" relativeTo="$parentLeft" relativePoint="RIGHT"/> - </Anchors> - </Texture> - <Texture name="$parentRight" file="Interface\AddOns\SVUI\assets\artwork\Template\EMPTY"> - <Size> - <AbsDimension x="20" y="24"/> - </Size> - <Anchors> - <Anchor point="LEFT" relativeTo="$parentMiddle" relativePoint="RIGHT"/> - </Anchors> - </Texture> - </Layer> - </Layers> - <Scripts> - <OnLoad> - self:SetFrameLevel(self:GetFrameLevel() + 4); - self.deselectedTextY = -3; - self.selectedTextY = -2; - </OnLoad> - <OnShow> - PanelTemplates_TabResize(self, 0); - _G[self:GetName().."HighlightTexture"]:SetWidth(self:GetTextWidth() + 30); - </OnShow> - </Scripts> - <ButtonText name="$parentText"> - <Anchors> - <Anchor point="CENTER"> - <Offset> - <AbsDimension x="0" y="-3"/> - </Offset> - </Anchor> - </Anchors> - </ButtonText> - <NormalFont style="GameFontNormalSmall"/> - <HighlightFont style="GameFontHighlightSmall"/> - <DisabledFont style="GameFontHighlightSmall"/> - <HighlightTexture name="$parentHighlightTexture" file="Interface\AddOns\SVUI\assets\artwork\Template\EMPTY" alphaMode="ADD"> - <Anchors> - <Anchor point="LEFT"> - <Offset> - <AbsDimension x="10" y="-4"/> - </Offset> - </Anchor> - <Anchor point="RIGHT"> - <Offset> - <AbsDimension x="-10" y="-4"/> - </Offset> - </Anchor> - </Anchors> - </HighlightTexture> - </Button> - <Script file='SVUI.lua'/> <Script file="libs\LibStub\LibStub.lua"/> @@ -249,12 +150,8 @@ <Script file="scripts\misc.lua"/> <Script file="scripts\mounts.lua"/> - <Script file="scripts\marker.lua"/> - <Script file="scripts\threat.lua"/> <Script file="scripts\comix.lua"/> <Script file="scripts\questwatch.lua"/> - <Script file="scripts\totems.lua"/> <Script file="scripts\raid.lua"/> <Script file="scripts\reactions.lua"/> - <Script file="scripts\pvp.lua"/> </Ui> \ No newline at end of file diff --git a/Interface/AddOns/SVUI/assets/artwork/Chat/CHAT-SCROLL.blp b/Interface/AddOns/SVUI/assets/artwork/Chat/CHAT-SCROLL.blp new file mode 100644 index 0000000..c5fc3dc Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Chat/CHAT-SCROLL.blp differ diff --git a/Interface/AddOns/SVUI/assets/artwork/Chat/CHAT-WHISPER.blp b/Interface/AddOns/SVUI/assets/artwork/Chat/CHAT-WHISPER.blp new file mode 100644 index 0000000..c07036d Binary files /dev/null and b/Interface/AddOns/SVUI/assets/artwork/Chat/CHAT-WHISPER.blp differ diff --git a/Interface/AddOns/SVUI/packages/aura/SVAura.lua b/Interface/AddOns/SVUI/packages/aura/SVAura.lua index 6bea61c..97569bf 100644 --- a/Interface/AddOns/SVUI/packages/aura/SVAura.lua +++ b/Interface/AddOns/SVUI/packages/aura/SVAura.lua @@ -353,7 +353,7 @@ do MOD:UnregisterEvent("UNIT_AURA") MOD:UnregisterEvent("GROUP_ROSTER_UPDATE") MOD:UnregisterEvent("PLAYER_SPECIALIZATION_CHANGED") - SuperVillain.RoleChangedCallback = function() end + SuperVillain.RoleChangedCallback = SuperVillain.fubar end end end diff --git a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua b/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua index 3b5fbec..d2f7854 100644 --- a/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua +++ b/Interface/AddOns/SVUI/packages/bag/tools/breakstuff.lua @@ -47,6 +47,8 @@ local ICONARTFILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-BREAKSTUFF local BreakStuffHandler = CreateFrame('Button', "BreakStuffHandler", UIParent, 'SecureActionButtonTemplate, AutoCastShineTemplate') BreakStuffHandler:SetScript('OnEvent', function(self, event, ...) self[event](self, ...) end) BreakStuffHandler:SetPoint("LEFT",UIParent,"RIGHT",500) +BreakStuffHandler.TipLines = {} +BreakStuffHandler.TText = "" BreakStuffHandler.ReadyToSmash = false; --[[ ########################################################## @@ -79,21 +81,6 @@ do return BreakableFilter["Pickables"][match(link, 'item:(%d+)')] end - local function ApplyButton(itemLink, spell, r, g, b) - local slot = GetMouseFocus() - local bag = slot:GetParent():GetID() - - if(GetContainerItemLink(bag, slot:GetID()) == itemLink) then - BreakStuffHandler:SetAttribute('spell', spell) - BreakStuffHandler:SetAttribute('target-bag', bag) - BreakStuffHandler:SetAttribute('target-slot', slot:GetID()) - BreakStuffHandler:SetAllPoints(slot) - BreakStuffHandler:Show() - - AutoCastShine_AutoCastStart(BreakStuffHandler, r, g, b) - end - end - local function ScanTooltip(self) for index = 1, self:NumLines() do local info = BreakStuff_Cache[_G['GameTooltipTextLeft' .. index]:GetText()] @@ -103,6 +90,16 @@ do end end + local function CloneTooltip() + twipe(BreakStuffHandler.TipLines) + for index = 1, GameTooltip:NumLines() do + local text = _G['GameTooltipTextLeft' .. index]:GetText() + if(text) then + BreakStuffHandler.TipLines[#BreakStuffHandler.TipLines+1] = text + end + end + end + local function DoIHaveAKey() for key in pairs(SkellyKeys) do if(GetItemCount(key) > 0) then @@ -111,23 +108,44 @@ do end end + local function ApplyButton(itemLink, spell, r, g, b) + local slot = GetMouseFocus() + local bag = slot:GetParent():GetID() + + if(GetContainerItemLink(bag, slot:GetID()) == itemLink) then + --CloneTooltip() + BreakStuffHandler:SetAttribute('spell', spell) + BreakStuffHandler:SetAttribute('target-bag', bag) + BreakStuffHandler:SetAttribute('target-slot', slot:GetID()) + BreakStuffHandler:SetAllPoints(slot) + BreakStuffHandler:Show() + + AutoCastShine_AutoCastStart(BreakStuffHandler, r, g, b) + end + end + function BreakStuffParser(self) local item, link = self:GetItem() if(item and not InCombatLockdown() and (BreakStuffHandler.ReadyToSmash == true)) then local spell, r, g, b = ScanTooltip(self) - + local rr, gg, bb = 1, 1, 1 if(spell) then ApplyButton(link, spell, r, g, b) else if(DE and IsThisBreakable(link)) then - ApplyButton(link, DE, 0.5, 0.5, 1) + rr, gg, bb = 0.5, 0.5, 1 + ApplyButton(link, DE, rr, gg, bb) elseif(PICK and IsThisOpenable(link)) then - ApplyButton(link, PICK, 0, 1, 1) + rr, gg, bb = 0, 1, 1 + ApplyButton(link, PICK, rr, gg, bb) elseif(SMITH and IsThisOpenable(link)) then + rr, gg, bb = 0, 1, 1 local hasKey = DoIHaveAKey() - ApplyButton(link, hasKey, 0, 1, 1) + ApplyButton(link, hasKey, rr, gg, bb) end end + + BreakStuffHandler.TText = ("|cff%02x%02x%02x%s:|r |cff%02x%02x%02x%s|r"):format(rr, gg, bb, spell, r, g, b, item) end end end @@ -213,7 +231,18 @@ end function MOD:PLAYER_REGEN_ENABLED() self:UnregisterEvent('PLAYER_REGEN_ENABLED') self:BreakStuffLoader() -end +end + +local SetClonedTip = function(self) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) + GameTooltip:ClearLines() + GameTooltip:AddLine(self.TText) + -- for index = 1, #self.TipLines do + -- GameTooltip:AddLine(self.TipLines[index]) + -- end + + GameTooltip:Show() +end function MOD:BreakStuffLoader() if(InCombatLockdown()) then self:RegisterEvent("PLAYER_REGEN_ENABLED"); return end @@ -279,6 +308,7 @@ function MOD:BreakStuffLoader() BreakStuffHandler:RegisterForClicks('AnyUp') BreakStuffHandler:SetFrameStrata("TOOLTIP") BreakStuffHandler:SetAttribute("type1","spell") + BreakStuffHandler:SetScript("OnEnter", SetClonedTip) BreakStuffHandler:SetScript("OnLeave", BreakStuff_OnModifier) BreakStuffHandler:RegisterEvent("MODIFIER_STATE_CHANGED") BreakStuffHandler:Hide() diff --git a/Interface/AddOns/SVUI/packages/chat/SVChat.lua b/Interface/AddOns/SVUI/packages/chat/SVChat.lua index 9dc3e73..a9bdd68 100644 --- a/Interface/AddOns/SVUI/packages/chat/SVChat.lua +++ b/Interface/AddOns/SVUI/packages/chat/SVChat.lua @@ -77,6 +77,8 @@ local CHAT_FADING = false; local CHAT_PSST = [[Interface\AddOns\SVUI\assets\sounds\whisper.mp3]]; local TIME_STAMP_MASK = "NONE"; local ICONARTFILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-CHAT]] +local SCROLL_ALERT = [[Interface\AddOns\SVUI\assets\artwork\Chat\CHAT-SCROLL]] +local WHISPER_ALERT = [[Interface\AddOns\SVUI\assets\artwork\Chat\CHAT-WHISPER]] local THROTTLE_CACHE = {}; --[[ ########################################################## @@ -107,6 +109,8 @@ CHAT_FLAG_GM = "[GM] "; LOCAL FUNCTIONS ########################################################## ]]-- +local ScrollIndicator = CreateFrame("Frame", nil) + do local EmoteCount = 39; local EmotePatterns = { @@ -207,15 +211,15 @@ do text = SetEmoticon(text) return false, text, ... end; - local result, ct = gsub(text, "(%a+)://(%S+)%s?", "%1://%2") + local result, ct = text:gsub("(%a+)://(%S+)%s?", "%1://%2") if ct > 0 then return false, SetEmoticon(result), ... end; - result, ct = gsub(text, "www%.([_A-Za-z0-9-]+)%.(%S+)%s?", "www.%1.%2") + result, ct = text:gsub("www%.([_A-Za-z0-9-]+)%.(%S+)%s?", "www.%1.%2") if ct > 0 then return false, SetEmoticon(result), ... end; - result, ct = gsub(text, "([_A-Za-z0-9-%.]+)@([_A-Za-z0-9-]+)(%.+)([_A-Za-z0-9-%.]+)%s?", "%1@%2%3%4") + result, ct = text:gsub("([_A-Za-z0-9-%.]+)@([_A-Za-z0-9-]+)(%.+)([_A-Za-z0-9-%.]+)%s?", "%1@%2%3%4") if ct > 0 then return false, SetEmoticon(result), ... end; @@ -234,23 +238,24 @@ do return msg end - local function _parse(arg1,arg2,arg3) + local function _parse(arg1, arg2, arg3) internalTest = true; - local result = " "..string.link("["..arg2.."]", "url", arg2, "0099FF").." "; - return result + local prefix = (" [%s]"):format(arg2) + local slink = prefix:link("url", arg2, "0099FF") + return ("%s "):format(slink) end local AddModifiedMessage = function(self, text, ...) internalTest = false; - if find(text,"%pTInterface%p+") or find(text,"%pTINTERFACE%p+") then + if text:find("%pTInterface%p+") or text:find("%pTINTERFACE%p+") then internalTest = true end; - if not internalTest then text = gsub(text, "(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?:%d%d?%d?%d?%d?)(%s?)", _parse) end; - if not internalTest then text = gsub(text, "(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?)(%s?)", _parse) end; - if not internalTest then text = gsub(text, "(%s?)([%w_-]+%.?[%w_-]+%.[%w_-]+:%d%d%d?%d?%d?)(%s?)", _parse) end; - if not internalTest then text = gsub(text, "(%s?)(%a+://[%w_/%.%?%%=~&-'%-]+)(%s?)", _parse) end; - if not internalTest then text = gsub(text, "(%s?)(www%.[%w_/%.%?%%=~&-'%-]+)(%s?)", _parse) end; - if not internalTest then text = gsub(text, "(%s?)([_%w-%.~-]+@[_%w-]+%.[_%w-%.]+)(%s?)", _parse) end; + if not internalTest then text = text:gsub("(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?:%d%d?%d?%d?%d?)(%s?)", _parse) end; + if not internalTest then text = text:gsub("(%s?)(%d%d?%d?%.%d%d?%d?%.%d%d?%d?%.%d%d?%d?)(%s?)", _parse) end; + if not internalTest then text = text:gsub("(%s?)([%w_-]+%.?[%w_-]+%.[%w_-]+:%d%d%d?%d?%d?)(%s?)", _parse) end; + if not internalTest then text = text:gsub("(%s?)(%a+://[%w_/%.%?%%=~&-'%-]+)(%s?)", _parse) end; + if not internalTest then text = text:gsub("(%s?)(www%.[%w_/%.%?%%=~&-'%-]+)(%s?)", _parse) end; + if not internalTest then text = text:gsub("(%s?)([_%w-%.~-]+@[_%w-]+%.[_%w-%.]+)(%s?)", _parse) end; self.TempAddMessage(self, _concatTimeStamp(text), ...) end @@ -442,7 +447,7 @@ do ChatEdit_ParseText(self, 0) end end; - local result, ct = gsub(text, "|Kf(%S+)|k(%S+)%s(%S+)|k", "%2 %3") + local result, ct = text:gsub("|Kf(%S+)|k(%S+)%s(%S+)|k", "%2 %3") if ct > 0 then result = result:gsub("|", "") self:SetText(result) @@ -501,7 +506,7 @@ do local tabSize = SuperDockChatTabBar.currentSize; local tabText = tab.text:GetText() or "Chat "..chatID; - local holder = CreateFrame("Frame",("SVUI_ChatTab%s"):format(chatID),SuperDockChatTabBar) + local holder = CreateFrame("Frame", ("SVUI_ChatTab%s"):format(chatID), SuperDockChatTabBar) holder:SetWidth(tabSize * 1.75) holder:SetHeight(tabSize) tab.chatID = chatID; @@ -521,13 +526,13 @@ do tab.icon:SetAlpha(0.5) tab.TText = tabText; - --tab.SetWidth = function()end; - tab.SetHeight = function()end; - tab.SetSize = function()end; - tab.SetParent = function()end; - tab.ClearAllPoints = function()end; - tab.SetAllPoints = function()end; - tab.SetPoint = function()end; + --tab.SetWidth = SuperVillain.fubar + tab.SetHeight = SuperVillain.fubar + tab.SetSize = SuperVillain.fubar + tab.SetParent = SuperVillain.fubar + tab.ClearAllPoints = SuperVillain.fubar + tab.SetAllPoints = SuperVillain.fubar + tab.SetPoint = SuperVillain.fubar tab:SetScript("OnEnter", Tab_OnEnter); tab:SetScript("OnLeave", Tab_OnLeave); @@ -616,6 +621,17 @@ do chat:SetTimeVisible(100) chat:SetFading(CHAT_FADING) chat:SetScript("OnHyperlinkClick", SVUI_OnHyperlinkShow) + + local alertSize = SuperDockChatTabBar.currentSize; + local alert = CreateFrame("Frame", nil, tab) + alert:SetSize(alertSize, alertSize) + alert:SetPoint("CENTER", tab, "CENTER", 0, 0) + local alticon = alert:CreateTexture(nil, "OVERLAY") + alticon:SetAllPoints(alert) + alticon:SetTexture(WHISPER_ALERT) + alticon:Hide() + chat.WhisperAlert = alert + chat.InitConfig = true end end; @@ -755,6 +771,13 @@ do self:ScrollToBottom() end end + if(self:AtBottom()) then + SuperVillain.Animate:StopFlash(ScrollIndicator) + ScrollIndicator:Hide() + else + ScrollIndicator:Show() + SuperVillain.Animate:Flash(ScrollIndicator,1,true) + end end local _hook_ChatEditOnEnterKey = function(self, input) @@ -850,7 +873,21 @@ do end end + local _hook_FCFStartAlertFlash = function(self) + if(not self.WhisperAlert) then return end + self.WhisperAlert:Show() + SuperVillain.Animate:Flash(self.WhisperAlert,1,true) + end + + local _hook_FCFStopAlertFlash = function(self) + if(not self.WhisperAlert) then return end + SuperVillain.Animate:StopFlash(self.WhisperAlert) + self.WhisperAlert:Hide() + end + function SetAllChatHooks() + NewHook('FCF_StartAlertFlash', _hook_FCFStartAlertFlash) + NewHook('FCF_StopAlertFlash', _hook_FCFStopAlertFlash) NewHook('FCF_OpenNewWindow', MOD.RefreshChatFrames) NewHook('FCF_UnDockFrame', MOD.RefreshChatFrames) NewHook('FCF_DockFrame', MOD.RefreshChatFrames) @@ -883,6 +920,16 @@ end; function MOD:Load() if(not SuperVillain.db.SVChat.enable) then return end + ScrollIndicator:SetParent(SuperDockWindowLeft) + ScrollIndicator:SetSize(22,22) + ScrollIndicator:SetPoint("BOTTOM", SuperDockWindowLeft, "BOTTOMRIGHT", 0, 0) + ScrollIndicator:SetFrameStrata("HIGH") + ScrollIndicator.icon = ScrollIndicator:CreateTexture(nil, "OVERLAY") + ScrollIndicator.icon:SetAllPoints() + ScrollIndicator.icon:SetTexture(SCROLL_ALERT) + ScrollIndicator:Hide() + + self:RegisterEvent('UPDATE_CHAT_WINDOWS', 'RefreshChatFrames') self:RegisterEvent('UPDATE_FLOATING_CHAT_WINDOWS', 'RefreshChatFrames') self:RegisterEvent('PET_BATTLE_CLOSE') diff --git a/Interface/AddOns/SVUI/packages/dock/SVDock.lua b/Interface/AddOns/SVUI/packages/dock/SVDock.lua index b1aaa73..c52a93f 100644 --- a/Interface/AddOns/SVUI/packages/dock/SVDock.lua +++ b/Interface/AddOns/SVUI/packages/dock/SVDock.lua @@ -141,7 +141,7 @@ local Docklet_OnShow = function(self) end end -local Docklet_OnHide = function(self) +function SuperVillain:CycleDocklets() for i=1, #DOCKLET_CACHE do local f = DOCKLET_CACHE[i] if(not InCombatLockdown() or (InCombatLockdown() and (f.IsProtected and not f:IsProtected()))) then @@ -200,7 +200,7 @@ end local Addon_OnClick = function(self) if SuperDockletMain.FrameName and _G[SuperDockletMain.FrameName] then if not _G[SuperDockletMain.FrameName]:IsShown() then - Docklet_OnHide() + SuperVillain:CycleDocklets() if not InCombatLockdown() and not SuperDockletMain:IsShown()then SuperDockletMain:Show() end @@ -342,7 +342,7 @@ do if not SuperDockWindowRight:IsShown()then SuperDockWindowRight:Show() end - Docklet_OnHide() + SuperVillain:CycleDocklets() _G[linkedFrame]:Show() self.IsOpen = true; self:SetPanelColor("green") @@ -372,7 +372,7 @@ do local dockIcon = texture or [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-ADDON]]; local clickFunction = (type(onclick)=="function") and onclick or Button_OnClick; local size = SuperDockToolBarRight.currentSize; - local button = _G[fName .. "_ToolBarButton"] or CreateFrame("Button",("%s_ToolBarButton"):format(fName),SuperDockToolBarRight) + local button = _G[fName .. "_ToolBarButton"] or CreateFrame("Button", ("%s_ToolBarButton"):format(fName), SuperDockToolBarRight) SuperVillain.AddTool(button) button:Size(size,size) button:SetFramedButtonTemplate() @@ -489,7 +489,7 @@ function MOD:CreateDockPanels() -- [[ TOOLBARS AND OTHER NONSENSE ]] -- - local toolbarLeft = CreateFrame("Button", "SuperDockToolBarLeft", SuperVillain.UIParent) + local toolbarLeft = CreateFrame("Frame", "SuperDockToolBarLeft", SuperVillain.UIParent) toolbarLeft:Point("LEFT", leftbutton, "RIGHT", spacing, 0) toolbarLeft:Width(1) toolbarLeft:Height(buttonsize) @@ -540,12 +540,12 @@ function MOD:CreateDockPanels() -- [[ TOOLBARS AND OTHER NONSENSE ]] -- - local toolbarRight = CreateFrame("Button", "SuperDockToolBarRight", SuperVillain.UIParent) + local toolbarRight = CreateFrame("Frame", "SuperDockToolBarRight", SuperVillain.UIParent) toolbarRight:Point("RIGHT", rightbutton, "LEFT", -spacing, 0) toolbarRight:Size(1, buttonsize) toolbarRight.currentSize = buttonsize; - local macrobar = CreateFrame("Button", "SuperDockMacroBar", SuperVillain.UIParent) + local macrobar = CreateFrame("Frame", "SuperDockMacroBar", SuperVillain.UIParent) macrobar:Point("RIGHT", toolbarRight, "LEFT", -spacing, 0) macrobar:Size(1, buttonsize) macrobar.currentSize = buttonsize; @@ -572,7 +572,7 @@ function MOD:CreateDockPanels() if MOD.SuperDockFaded then LeftSuperDock:Hide()RightSuperDock:Hide() end - local toolbarTop = CreateFrame("Button", "SuperDockToolBarTop", SuperVillain.UIParent) + local toolbarTop = CreateFrame("Frame", "SuperDockToolBarTop", SuperVillain.UIParent) toolbarTop:Point("TOPLEFT", SuperVillain.UIParent, "TOPLEFT", 2, -4) toolbarTop:Size(1, buttonsize - 12) toolbarTop.openWidth = (leftWidth - 1) / 3; @@ -804,7 +804,6 @@ end EXTERNALLY ACCESSIBLE METHODS ########################################################## ]]-- -SuperVillain.CycleDocklets = Docklet_OnHide SuperVillain.CurrentlyDocked = {}; function SuperVillain:IsDockletReady(arg) local addon = arg; @@ -1034,9 +1033,9 @@ function MOD:Load() SuperDockWindowRight:Size(width, height) SuperDockWindowRight:SetPoint("BOTTOMLEFT", SuperDockAlertRight, "TOPLEFT", 0, 0) SuperDockWindowRight:SetScript('OnShow', Docklet_OnShow) - SuperDockWindowRight:SetScript('OnHide', Docklet_OnHide) + --SuperDockWindowRight:SetScript('OnHide', SuperVillain:CycleDocklets) if not InCombatLockdown()then - Docklet_OnHide() + SuperVillain:CycleDocklets() end hooksecurefunc(RightSuperDock, 'SetSize', rightDockSizeHook) self:UpdateDockBackdrops() diff --git a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua index d7ff05f..3358a19 100644 --- a/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua +++ b/Interface/AddOns/SVUI/packages/henchmen/SVHenchmen.lua @@ -21,7 +21,6 @@ SuperVillain.Henchmen = MOD; LOCAL VARS ########################################################## ]]-- -local NOOP = function() end local HenchmenFrame = CreateFrame("Frame", "HenchmenFrame", UIParent); local STANDARD_TEXT_FONT = _G.STANDARD_TEXT_FONT local OPTION_LEFT = [[Interface\Addons\SVUI\assets\artwork\Doodads\HENCHMEN-OPTION-LEFT]]; @@ -183,7 +182,7 @@ function GetAllMail() SVUI_GetMailButton:SetScript("OnClick",nil) SVUI_GetGoldButton:SetScript("OnClick",nil) baseInboxFrame_OnClick=InboxFrame_OnClick; - InboxFrame_OnClick=NOOP; + InboxFrame_OnClick = SuperVillain.fubar SVUI_GetMailButton:RegisterEvent("UI_ERROR_MESSAGE") OpenMailItem(GetInboxNumItems()) end @@ -820,19 +819,24 @@ end function MOD:QUEST_DETAIL() if(self.db.autoquestaccept == true and self:AutoQuestProxy()) then - AcceptQuest() + if not QuestGetAutoAccept() then + AcceptQuest() + else + CloseQuest() + end end end function MOD:QUEST_ACCEPT_CONFIRM() if(self.db.autoquestaccept == true and self:AutoQuestProxy()) then ConfirmAcceptQuest() + StaticPopup_Hide("QUEST_ACCEPT_CONFIRM") end end function MOD:QUEST_PROGRESS() if(IsShiftKeyDown()) then return false; end - if(self.db.autoquestcomplete == true) then + if(self.db.autoquestcomplete == true and IsQuestCompletable()) then CompleteQuest() end end @@ -841,9 +845,9 @@ function MOD:QUEST_COMPLETE() if(not self.db.autoquestcomplete and (not self.db.autoquestreward)) then return end if(IsShiftKeyDown()) then return false; end local rewards = GetNumQuestChoices() - local auto_select = QuestFrameRewardPanel.itemChoice or QuestInfoFrame.itemChoice; - local selection, value = 1, 0; - if rewards > 0 then + if rewards > 1 then + local auto_select = QuestFrameRewardPanel.itemChoice or QuestInfoFrame.itemChoice; + local selection, value = 1, 0; if self.db.autoquestreward == true then for i = 1, rewards do local iLink = GetQuestItemLink("choice", i) @@ -870,7 +874,7 @@ function MOD:QUEST_COMPLETE() end else if(self.db.autoquestreward == true and self.db.autoquestcomplete == true) then - GetQuestReward(auto_select) + GetQuestReward(GetNumQuestChoices()) end end end diff --git a/Interface/AddOns/SVUI/packages/laborer/modes/archaeology.lua b/Interface/AddOns/SVUI/packages/laborer/modes/archaeology.lua index dbb6c3e..79df080 100644 --- a/Interface/AddOns/SVUI/packages/laborer/modes/archaeology.lua +++ b/Interface/AddOns/SVUI/packages/laborer/modes/archaeology.lua @@ -105,9 +105,9 @@ local function DisableSolve(button) button:SetAlpha(0) button.text:SetTextColor(0.5, 0.5, 0.5) button.text:SetText("") - button:SetScript("OnEnter", function() end) - button:SetScript("OnLeave", function() end) - button:SetScript("OnMouseUp", function() end) + button:SetScript("OnEnter", SuperVillain.fubar) + button:SetScript("OnLeave", SuperVillain.fubar) + button:SetScript("OnMouseUp", SuperVillain.fubar) end local function UpdateArtifactBars(index) diff --git a/Interface/AddOns/SVUI/packages/map/SVMap.lua b/Interface/AddOns/SVUI/packages/map/SVMap.lua index 49b099b..48d0585 100644 --- a/Interface/AddOns/SVUI/packages/map/SVMap.lua +++ b/Interface/AddOns/SVUI/packages/map/SVMap.lua @@ -232,7 +232,7 @@ do frame:SetTexCoord(0.1, 0.9, 0.1, 0.9 ) frame:SetDrawLayer("ARTWORK") if name == "PS_MinimapButton" then - frame.SetPoint = function()end + frame.SetPoint = SuperVillain.fubar end end end @@ -754,7 +754,7 @@ local function CreateMiniMapElements() end local function LoadWorldMap() - setfenv(WorldMapFrame_OnShow, setmetatable({ UpdateMicroButtons = function() end }, { __index = _G })) + setfenv(WorldMapFrame_OnShow, setmetatable({ UpdateMicroButtons = SuperVillain.fubar }, { __index = _G })) WorldMapShowDropDown:Point('BOTTOMRIGHT',WorldMapPositioningGuide,'BOTTOMRIGHT',-2,-4) WorldMapZoomOutButton:Point("LEFT",WorldMapZoneDropDown,"RIGHT",0,4) diff --git a/Interface/AddOns/SVUI/packages/override/SVOverride.lua b/Interface/AddOns/SVUI/packages/override/SVOverride.lua index b910b38..925c63a 100644 --- a/Interface/AddOns/SVUI/packages/override/SVOverride.lua +++ b/Interface/AddOns/SVUI/packages/override/SVOverride.lua @@ -762,16 +762,15 @@ end CORE FUNCTIONS ########################################################## ]]-- -local AutoConfirmLoot = function(_, event, ...) - if event == 'CONFIRM_LOOT_ROLL' or event == 'CONFIRM_DISENCHANT_ROLL' then - local arg1, arg2 = ... +local AutoConfirmLoot = function(_, event, arg1, arg2, ...) + if event == "CONFIRM_LOOT_ROLL" or event == "CONFIRM_DISENCHANT_ROLL" then ConfirmLootRoll(arg1, arg2) - elseif event == 'LOOT_OPENED' or event == 'LOOT_BIND_CONFIRM' then - local count = GetNumLootItems() - if count == 0 then CloseLoot() return end - for slot = 1, count do - ConfirmLootSlot(slot) - end + StaticPopup_Hide("CONFIRM_LOOT_ROLL") + return + elseif event == "LOOT_BIND_CONFIRM" then + ConfirmLootSlot(arg1, arg2) + StaticPopup_Hide("LOOT_BIND",...) + return end end diff --git a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua index 2abdb8d..c4ccafe 100644 --- a/Interface/AddOns/SVUI/packages/stats/stats/guild.lua +++ b/Interface/AddOns/SVUI/packages/stats/stats/guild.lua @@ -155,8 +155,8 @@ local GuildStatEventHandler = { ["GUILD_MOTD"] = function(arg1, arg2) GuildStatMOTD = arg2 end, - ["SVUI_FORCE_RUN"] = function() end, - ["SVUI_COLOR_UPDATE"] = function() end + ["SVUI_FORCE_RUN"] = SuperVillain.fubar, + ["SVUI_COLOR_UPDATE"] = SuperVillain.fubar }; local function MenuInvite(self, unit) diff --git a/Interface/AddOns/SVUI/scripts/marker.lua b/Interface/AddOns/SVUI/scripts/marker.lua deleted file mode 100644 index 2c3eaea..0000000 --- a/Interface/AddOns/SVUI/scripts/marker.lua +++ /dev/null @@ -1,139 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; -local pairs = _G.pairs; -local ipairs = _G.ipairs; -local type = _G.type; -local tinsert = _G.tinsert; -local math = _G.math; -local cos, deg, rad, sin = math.cos, math.deg, math.rad, math.sin; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SuperVillain, L = unpack(select(2, ...)); ---[[ -########################################################## -LOCAL VARS -########################################################## -]]-- -local ButtonIsDown; -local RaidMarkFrame=CreateFrame("Frame", "SVUI_RaidMarkFrame", UIParent) -RaidMarkFrame:EnableMouse(true) -RaidMarkFrame:SetSize(100,100) -RaidMarkFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0) -RaidMarkFrame:SetFrameStrata("DIALOG") - -local RaidMarkButton_OnEnter = function(self) - self.Texture:ClearAllPoints() - self.Texture:Point("TOPLEFT",-10,10) - self.Texture:Point("BOTTOMRIGHT",10,-10) -end; - -local RaidMarkButton_OnLeave = function(self) - self.Texture:SetAllPoints() -end; - -local RaidMarkButton_OnClick = function(self, button) - PlaySound("UChatScrollButton") - SetRaidTarget("target",button ~= "RightButton" and self:GetID() or 0) - self:GetParent():Hide() -end; - -for i=1,8 do - local raidMark = CreateFrame("Button", "RaidMarkIconButton"..i, RaidMarkFrame) - raidMark:Size(40) - raidMark:SetID(i) - raidMark.Texture = raidMark:CreateTexture(raidMark:GetName().."NormalTexture","ARTWORK") - raidMark.Texture:SetTexture([[Interface\TargetingFrame\UI-RaidTargetingIcons]]) - raidMark.Texture:SetAllPoints() - SetRaidTargetIconTexture(raidMark.Texture,i) - raidMark:RegisterForClicks("LeftbuttonUp","RightbuttonUp") - raidMark:SetScript("OnClick",RaidMarkButton_OnClick) - raidMark:SetScript("OnEnter",RaidMarkButton_OnEnter) - raidMark:SetScript("OnLeave",RaidMarkButton_OnLeave) - if(i == 8) then - raidMark:SetPoint("CENTER") - else - local radian = 360 / 7 * i; - raidMark:SetPoint("CENTER", sin(radian) * 60, cos(radian) * 60) - end -end; - -RaidMarkFrame:Hide() ---[[ -########################################################## -RAID MARKERS -########################################################## -]]-- -local function RaidMarkAllowed() - if not RaidMarkFrame then - return false - end; - if GetNumGroupMembers()>0 then - if UnitIsGroupLeader('player') or UnitIsGroupAssistant("player") then - return true - elseif IsInGroup() and not IsInRaid() then - return true - else - UIErrorsFrame:AddMessage(L["You don't have permission to mark targets."], 1.0, 0.1, 0.1, 1.0, UIERRORS_HOLD_TIME) - return false - end - else - return true - end -end; - -local function RaidMarkShowIcons() - if not UnitExists("target") or UnitIsDead("target") then return end; - local x,y = GetCursorPosition() - local scale = SuperVillain.UIParent:GetEffectiveScale() - RaidMarkFrame:SetPoint("CENTER",SuperVillain.UIParent,"BOTTOMLEFT", (x / scale), (y / scale)) - RaidMarkFrame:Show() -end; ---[[ -########################################################## -GLOBAL KEYFUNCTION -########################################################## -]]-- -function RaidMark_HotkeyPressed(button) - ButtonIsDown = button == "down" and RaidMarkAllowed() - if(RaidMarkFrame) then - if ButtonIsDown then - RaidMarkShowIcons() - else - RaidMarkFrame:Hide() - end - end -end; ---[[ -########################################################## -EVENT HANDLER -########################################################## -]]-- -RaidMarkFrame:RegisterEvent("PLAYER_TARGET_CHANGED") -RaidMarkFrame:SetScript("OnEvent",function(self, event) - if ButtonIsDown then - RaidMarkShowIcons() - end -end) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/misc.lua b/Interface/AddOns/SVUI/scripts/misc.lua index d01bcdf..687e3e4 100644 --- a/Interface/AddOns/SVUI/scripts/misc.lua +++ b/Interface/AddOns/SVUI/scripts/misc.lua @@ -21,6 +21,11 @@ local _G = _G; local unpack = _G.unpack; local select = _G.select; local pairs = _G.pairs; +local ipairs = _G.ipairs; +local type = _G.type; +local tinsert = _G.tinsert; +local math = _G.math; +local cos, deg, rad, sin = math.cos, math.deg, math.rad, math.sin; --[[ ########################################################## GET ADDON DATA @@ -43,13 +48,218 @@ function MerchantItemButton_OnModifiedClick(self, ...) end end savedMerchantItemButton_OnModifiedClick(self, ...) -end; +end --[[ ########################################################## -CONDITIONAL CHAT BUBBLES +PVP TOOLKIT ########################################################## ]]-- -local function LoadMiscEnhancements() +local ICON_FILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-PVP]] +local PVP_SAFE = [[Interface\AddOns\SVUI\assets\artwork\Icons\PVP-SAFE]] +local PVP_HELP = [[Interface\AddOns\SVUI\assets\artwork\Icons\PVP-INCOMING]] +local PVP_LOST = [[Interface\WorldMap\Skull_64Red]] +local PVP_NODES = { + [461] = { --Arathi Basin (5) + "Stables", "Lumber", "Blacksmith", "Mine", "Farm" + }, + [935] = { --Deepwind Gorge (3) + "Center Mine", "North Mine", "South Mine" + }, + [482] = { --Eye of the Storm (4) + "Fel Reaver", "Blood Elf", "Draenei", "Mage" + }, + [736] = { --The Battle for Gilneas (3) + "LightHouse", "WaterWorks", "Mines" + }, +} + +local Safe_OnEnter = function(self) + if InCombatLockdown() then return end + if(self.name and self.name ~= "") then + self:SetBackdropBorderColor(1,0.45,0) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) + GameTooltip:ClearLines() + GameTooltip:AddLine(self.name .. " is Safe!", 1, 1, 1) + GameTooltip:Show() + end +end + +local Safe_OnLeave = function(self) + if InCombatLockdown() then return end + self:SetBackdropBorderColor(0,0,0) + if(GameTooltip:IsShown()) then GameTooltip:Hide() end +end + +local Safe_OnClick = function(self) + if(self.name and self.name ~= "") then + local msg = ("%s Safe"):format(self.name) + SendChatMessage(msg, "INSTANCE_CHAT") + end +end + +local Help_OnEnter = function(self) + if InCombatLockdown() then return end + if(self.name and self.name ~= "") then + self:SetBackdropBorderColor(1,0.45,0) + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) + GameTooltip:ClearLines() + GameTooltip:AddLine(self.name .. " Needs Help!", 1, 1, 1) + GameTooltip:Show() + end +end + +local Help_OnLeave = function(self) + if InCombatLockdown() then return end + self:SetBackdropBorderColor(0,0,0) + if(GameTooltip:IsShown()) then GameTooltip:Hide() end +end + +local Help_OnClick = function(self) + if(self.name and self.name ~= "") then + local msg = ("{rt8} Incoming %s {rt8}"):format(self.name) + SendChatMessage(msg, "INSTANCE_CHAT") + end +end + +local EnteringBattleGround = function(self) + local mapID = GetCurrentMapAreaID() + if(not mapID) then + self:RegisterEvent("ZONE_CHANGED") + return + end + local points = PVP_NODES[mapID] + if(points) then + for i = 1, 5 do + local nodeName = ("SVUI_PVPNode%d"):format(i) + local node = _G[nodeName] + local safe = node.Safe + local help = node.Help + if(i <= #points) then + local name = points[i] + safe.name = name + help.name = name + node.Text:SetText(name) + node:Show() + else + safe.name = "" + help.name = "" + node.Text:SetText("") + node:Hide() + end + end + self:Enable() + end + + self:UnregisterEvent("ZONE_CHANGED") + self.InPVP = true +end + +local ExitingBattleGround = function(self) + for i = 1, 5 do + local nodeName = ("SVUI_PVPNode%d"):format(i) + local node = _G[nodeName] + local safe = node.Safe + local help = node.Help + safe.name = "" + help.name = "" + node.Text:SetText("") + node:Hide() + end + self:Disable() +end + +local PVPCommunicator_OnEvent = function(self, event, ...) + local instance, groupType = IsInInstance() + if(instance and groupType == "pvp") then + if(not self.InPVP) then + self:EnteringBattleGround() + end + else + self:ExitingBattleGround() + self.InPVP = nil + end +end + +local function LoadPVPComm() + local holder = CreateFrame("Frame", "SVUI_PVPComm", SuperDockWindowRight) + holder:SetFrameStrata("BACKGROUND") + SuperVillain:RegisterDocklet("SVUI_PVPComm", "PVP ToolKit", ICON_FILE) + + local width = holder:GetWidth() + local height = holder:GetHeight() + local sectionWidth = (width / 6) - 2 + local sectionHeight = (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) + poi:SetPanelTemplate("Transparent") + + local safe = CreateFrame("Button", nil, poi) + safe:SetSize(sectionWidth, sectionHeight) + safe:SetPoint("RIGHT", poi, "RIGHT", -2, 0) + safe:SetButtonTemplate() + safe:SetPanelColor("green") + local sicon = safe:CreateTexture(nil, "OVERLAY") + sicon:SetPoint("CENTER", safe, "CENTER", 0, 0) + sicon:SetSize(iconSize,iconSize) + sicon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + sicon:SetTexture(PVP_SAFE) + safe:SetScript("OnEnter", Safe_OnEnter) + safe:SetScript("OnLeave", Safe_OnLeave) + safe:SetScript("OnClick", Safe_OnClick) + + poi.Safe = safe + + local help = CreateFrame("Button", nil, poi) + help:SetSize(sectionWidth, sectionHeight) + help:SetPoint("RIGHT", safe, "LEFT", -2, 0) + help:SetButtonTemplate() + help:SetPanelColor("red") + local hicon = help:CreateTexture(nil, "OVERLAY") + hicon:SetPoint("CENTER", help, "CENTER", 0, 0) + hicon:SetSize(iconSize,iconSize) + hicon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + hicon:SetTexture(PVP_HELP) + help:SetScript("OnEnter", Help_OnEnter) + help:SetScript("OnLeave", Help_OnLeave) + help:SetScript("OnClick", Help_OnClick) + + poi.Help = help + + poi.Text = poi:CreateFontString(nil,"OVERLAY") + poi.Text:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") + poi.Text:SetPoint("TOPLEFT", poi, "TOPLEFT", 2, 0) + poi.Text:SetPoint("BOTTOMRIGHT", help, "BOTTOMLEFT", -2, 0) + poi.Text:SetJustifyH("CENTER") + poi.Text:SetText("") + end + + holder:Hide() + + local docklet = _G["SVUI_PVPComm_ToolBarButton"] + docklet.Enable = SuperVillain.AddTool + docklet.Disable = SuperVillain.RemoveTool + docklet.EnteringBattleGround = EnteringBattleGround + docklet.ExitingBattleGround = ExitingBattleGround + docklet:RegisterEvent("PLAYER_ENTERING_WORLD") + docklet:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") + docklet:SetScript("OnEvent", PVPCommunicator_OnEvent) + docklet:Disable() +end + +SuperVillain.Registry:NewScript(LoadPVPComm) +--[[ +########################################################## +CHAT BUBBLES +########################################################## +]]-- +local function LoadStyledChatBubbles() local TaintFix = CreateFrame("Frame") TaintFix:SetScript("OnUpdate", function(self, elapsed) if LFRBrowseFrame.timeToClear then @@ -118,4 +328,496 @@ local function LoadMiscEnhancements() end end -SuperVillain.Registry:NewScript(LoadMiscEnhancements); \ No newline at end of file +SuperVillain.Registry:NewScript(LoadStyledChatBubbles) +--[[ +########################################################## +DRESSUP HELPERS by: Leatrix +########################################################## +]]-- +local helmet, cloak; +local htimer = 0 +local hshow, cshow, hchek, cchek + + +local function LockItem(item,lock) + if lock then + item:Disable() + item:SetAlpha(0.3) + else + item:Enable() + item:SetAlpha(1.0) + end +end + +local function SetVanityPlacement() + helmet:ClearAllPoints(); + helmet:SetPoint("TOPLEFT", 166, -326) + helmet:SetHitRectInsets(0, -10, 0, 0); + helmet.text:SetText("H"); + cloak:ClearAllPoints(); + cloak:SetPoint("TOPLEFT", 206, -326) + cloak:SetHitRectInsets(0, -10, 0, 0); + cloak.text:SetText("C"); + helmet:SetAlpha(0.7); + cloak:SetAlpha(0.7); +end + +local MouseEventHandler = function(self, btn) + if btn == "RightButton" and IsShiftKeyDown() then + SetVanityPlacement(); + end +end + +local DressUpdateHandler = function(self, elapsed) + htimer = htimer + elapsed; + while (htimer > 0.05) do + if UnitIsDeadOrGhost("player") then + LockItem(helmet,true) + LockItem(cloak,true) + return + else + LockItem(helmet,false) + LockItem(cloak,false) + end + hshow, cshow, hchek, cchek = ShowingHelm(), ShowingCloak(), helmet:GetChecked(), cloak:GetChecked() + if hchek ~= hshow then + if helmet:IsEnabled() then + helmet:Disable() + end + else + if not helmet:IsEnabled() then + helmet:Enable() + end + end + if cchek ~= cshow then + if cloak:IsEnabled() then + cloak:Disable() + end + else + if not cloak:IsEnabled() then + cloak:Enable() + end + end + helmet:SetChecked(hshow); + cloak:SetChecked(cshow); + htimer = 0; + end +end + +local function LoadDressupHelper() + --[[ PAPER DOLL ENHANCEMENT ]]-- + local tabard1 = SuperVillain:CreateButton(DressUpFrame, "Tabard", "BOTTOMLEFT", 26, 79, 80, 22, "") + tabard1:SetScript("OnClick", function() + DressUpModel:UndressSlot(19) + end) + + local nude1 = SuperVillain:CreateButton(DressUpFrame, "Nude", "BOTTOMLEFT", 106, 79, 80, 22, "") + nude1:SetScript("OnClick", function() + DressUpFrameResetButton:Click() + for i = 1, 19 do + DressUpModel:UndressSlot(i) + end + end) + + local BtnStrata, BtnLevel = SideDressUpModelResetButton:GetFrameStrata(), SideDressUpModelResetButton:GetFrameLevel() + + + local tabard2 = SuperVillain:CreateButton(SideDressUpFrame, "Tabard", "BOTTOMLEFT", 14, 20, 60, 22, "") + tabard2:SetFrameStrata(BtnStrata); + tabard2:SetFrameLevel(BtnLevel); + tabard2:SetScript("OnClick", function() + SideDressUpModel:UndressSlot(19) + end) + + local nude2 = SuperVillain:CreateButton(SideDressUpFrame, "Nude", "BOTTOMRIGHT", -18, 20, 60, 22, "") + nude2:SetFrameStrata(BtnStrata); + nude2:SetFrameLevel(BtnLevel); + nude2:SetScript("OnClick", function() + SideDressUpModelResetButton:Click() + for i = 1, 19 do + SideDressUpModel:UndressSlot(i) + end + end) + + --[[ CLOAK AND HELMET TOGGLES ]]-- + helmet = CreateFrame('CheckButton', nil, CharacterModelFrame, "OptionsCheckButtonTemplate") + helmet:SetSize(24, 24) + helmet.text = helmet:CreateFontString(nil, 'OVERLAY', "GameFontNormal") + helmet.text:SetPoint("LEFT", 24, 0) + + cloak = CreateFrame('CheckButton', nil, CharacterModelFrame, "OptionsCheckButtonTemplate") + cloak:SetSize(24, 24) + cloak.text = cloak:CreateFontString(nil, 'OVERLAY', "GameFontNormal") + cloak.text:SetPoint("LEFT", 24, 0) + + helmet:SetScript('OnUpdate', DressUpdateHandler) + helmet:SetScript('OnClick', function(self, btn) + ShowHelm(helmet:GetChecked()) + end) + cloak:SetScript('OnClick', function(self, btn) + ShowCloak(cloak:GetChecked()) + end) + + helmet:SetScript('OnMouseDown', MouseEventHandler) + cloak:SetScript('OnMouseDown', MouseEventHandler) + CharacterModelFrame:HookScript("OnShow", SetVanityPlacement) +end + +SuperVillain.Registry:NewScript(LoadDressupHelper) +--[[ +########################################################## +RAIDMARKERS +########################################################## +]]-- +local ButtonIsDown; +local RaidMarkFrame=CreateFrame("Frame", "SVUI_RaidMarkFrame", UIParent) +RaidMarkFrame:EnableMouse(true) +RaidMarkFrame:SetSize(100,100) +RaidMarkFrame:SetPoint("CENTER", UIParent, "CENTER", 0, 0) +RaidMarkFrame:SetFrameStrata("DIALOG") + +local RaidMarkButton_OnEnter = function(self) + self.Texture:ClearAllPoints() + self.Texture:Point("TOPLEFT",-10,10) + self.Texture:Point("BOTTOMRIGHT",10,-10) +end + +local RaidMarkButton_OnLeave = function(self) + self.Texture:SetAllPoints() +end + +local RaidMarkButton_OnClick = function(self, button) + PlaySound("UChatScrollButton") + SetRaidTarget("target",button ~= "RightButton" and self:GetID() or 0) + self:GetParent():Hide() +end + +for i=1,8 do + local raidMark = CreateFrame("Button", "RaidMarkIconButton"..i, RaidMarkFrame) + raidMark:Size(40) + raidMark:SetID(i) + raidMark.Texture = raidMark:CreateTexture(raidMark:GetName().."NormalTexture","ARTWORK") + raidMark.Texture:SetTexture([[Interface\TargetingFrame\UI-RaidTargetingIcons]]) + raidMark.Texture:SetAllPoints() + SetRaidTargetIconTexture(raidMark.Texture,i) + raidMark:RegisterForClicks("LeftbuttonUp","RightbuttonUp") + raidMark:SetScript("OnClick",RaidMarkButton_OnClick) + raidMark:SetScript("OnEnter",RaidMarkButton_OnEnter) + raidMark:SetScript("OnLeave",RaidMarkButton_OnLeave) + if(i == 8) then + raidMark:SetPoint("CENTER") + else + local radian = 360 / 7 * i; + raidMark:SetPoint("CENTER", sin(radian) * 60, cos(radian) * 60) + end +end + +RaidMarkFrame:Hide() + +local function RaidMarkAllowed() + if not RaidMarkFrame then + return false + end + if GetNumGroupMembers()>0 then + if UnitIsGroupLeader('player') or UnitIsGroupAssistant("player") then + return true + elseif IsInGroup() and not IsInRaid() then + return true + else + UIErrorsFrame:AddMessage(L["You don't have permission to mark targets."], 1.0, 0.1, 0.1, 1.0, UIERRORS_HOLD_TIME) + return false + end + else + return true + end +end + +local function RaidMarkShowIcons() + if not UnitExists("target") or UnitIsDead("target") then return end + local x,y = GetCursorPosition() + local scale = SuperVillain.UIParent:GetEffectiveScale() + RaidMarkFrame:SetPoint("CENTER",SuperVillain.UIParent,"BOTTOMLEFT", (x / scale), (y / scale)) + RaidMarkFrame:Show() +end + +function RaidMark_HotkeyPressed(button) + ButtonIsDown = button == "down" and RaidMarkAllowed() + if(RaidMarkFrame) then + if ButtonIsDown then + RaidMarkShowIcons() + else + RaidMarkFrame:Hide() + end + end +end + +RaidMarkFrame:RegisterEvent("PLAYER_TARGET_CHANGED") +RaidMarkFrame:SetScript("OnEvent",function(self, event) + if ButtonIsDown then + RaidMarkShowIcons() + end +end) +--[[ +########################################################## +TOTEMS +########################################################## +]]-- +local Totems = CreateFrame("Frame"); +local TotemBar; + +local Totems_OnEvent = function(self, event) + if not TotemBar then return end + local displayedTotems = 0; + for i=1,MAX_TOTEMS do + if TotemBar[i] then + local haveTotem, name, start, duration, icon = GetTotemInfo(i) + if haveTotem and icon and icon ~= '' then + TotemBar[i]:Show() + TotemBar[i].Icon:SetTexture(icon) + displayedTotems = displayedTotems + 1; + CooldownFrame_SetTimer(TotemBar[i].CD, start, duration, 1) + for i=1,MAX_TOTEMS do + if _G['TotemFrameTotem'..i..'IconTexture']:GetTexture()==icon then + _G['TotemFrameTotem'..i]:ClearAllPoints() + _G['TotemFrameTotem'..i]:SetParent(TotemBar[i].Anchor) + _G['TotemFrameTotem'..i]:SetAllPoints(TotemBar[i].Anchor) + end + end + else + TotemBar[i]:Hide() + end + end + end +end + +function SuperVillain:UpdateTotems() + local totemSize = self.db.system.totems.size; + local totemSpace = self.db.system.totems.spacing; + local totemGrowth = self.db.system.totems.showBy; + local totemSort = self.db.system.totems.sortDirection; + + for i = 1, MAX_TOTEMS do + local button = TotemBar[i] + local lastButton = TotemBar[i - 1] + button:Size(totemSize) + button:ClearAllPoints() + if(totemGrowth == "HORIZONTAL" and totemSort == "ASCENDING") then + if(i == 1) then + button:SetPoint("LEFT", TotemBar, "LEFT", totemSpace, 0) + elseif lastButton then + button:SetPoint("LEFT", lastButton, "RIGHT", totemSpace, 0) + end + elseif(totemGrowth == "VERTICAL" and totemSort == "ASCENDING") then + if(i == 1) then + button:SetPoint("TOP", TotemBar, "TOP", 0, -totemSpace) + elseif lastButton then + button:SetPoint("TOP", lastButton, "BOTTOM", 0, -totemSpace) + end + elseif(totemGrowth == "HORIZONTAL" and totemSort == "DESCENDING") then + if(i == 1) then + button:SetPoint("RIGHT", TotemBar, "RIGHT", -totemSpace, 0) + elseif lastButton then + button:SetPoint("RIGHT", lastButton, "LEFT", -totemSpace, 0) + end + else + if(i == 1) then + button:SetPoint("BOTTOM", TotemBar, "BOTTOM", 0, totemSpace) + elseif lastButton then + button:SetPoint("BOTTOM", lastButton, "TOP", 0, totemSpace) + end + end + end + local tS1 = ((totemSize * MAX_TOTEMS) + (totemSpace * MAX_TOTEMS) + totemSpace); + local tS2 = (totemSize + (totemSpace * 2)); + local tW = (totemGrowth == "HORIZONTAL" and tS1 or tS2); + local tH = (totemGrowth == "HORIZONTAL" and tS2 or tS1); + TotemBar:Size(tW, tH); + Totems_OnEvent() +end + +local function CreateTotemBar() + if(not SuperVillain.db.system.totems.enable) then return; end + local xOffset = SuperVillain.db.SVDock.dockLeftWidth + 12 + TotemBar = CreateFrame("Frame", "SVUI_TotemBar", SuperVillain.UIParent) + TotemBar:SetPoint("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOMLEFT", xOffset, 40) + for i = 1, MAX_TOTEMS do + local totem = CreateFrame("Button", "TotemBarTotem"..i, TotemBar) + totem:SetID(i) + totem:SetButtonTemplate() + totem:Hide() + totem.Anchor = CreateFrame("Frame", nil, totem) + totem.Anchor:SetAlpha(0) + totem.Anchor:SetAllPoints() + totem.Icon = totem:CreateTexture(nil, "ARTWORK") + totem.Icon:FillInner() + totem.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) + totem.CD = CreateFrame("Cooldown", "TotemBarTotem"..i.."Cooldown", totem, "CooldownFrameTemplate") + totem.CD:SetReverse(true) + totem.CD:FillInner() + SuperVillain:AddCD(totem.CD) + TotemBar[i] = totem + end + TotemBar:Show() + Totems:RegisterEvent("PLAYER_TOTEM_UPDATE") + Totems:RegisterEvent("PLAYER_ENTERING_WORLD") + Totems:SetScript("OnEvent", Totems_OnEvent) + Totems_OnEvent() + SuperVillain:UpdateTotems() + local frame_name; + if SuperVillain.class == "DEATHKNIGHT" then + frame_name = L["Ghoul Bar"] + elseif SuperVillain.class == "DRUID" then + frame_name = L["Mushroom Bar"] + else + frame_name = L["Totem Bar"] + end + SuperVillain:SetSVMovable(TotemBar, frame_name) +end + +SuperVillain.Registry:NewScript(CreateTotemBar) +--[[ +########################################################## +THREAT THERMOMETER +########################################################## +]]-- +local twipe = table.wipe; +local CurrentThreats = {}; +local BARFILE = [[Interface\AddOns\SVUI\assets\artwork\Doodads\THREAT-BAR-ELEMENTS]] +local function UMadBro(scaledPercent) + local highestThreat,unitWithHighestThreat = 0,nil; + for unit,threat in pairs(CurrentThreats)do + if threat > highestThreat then + highestThreat = threat; + unitWithHighestThreat = unit + end + end + return (scaledPercent - highestThreat),unitWithHighestThreat +end + +local function GetThreatBarColor(unitWithHighestThreat) + local react = UnitReaction(unitWithHighestThreat,'player') + local _,unitClass = UnitClass(unitWithHighestThreat) + if UnitIsPlayer(unitWithHighestThreat)then + local colors = RAID_CLASS_COLORS[unitClass] + if not colors then return 15,15,15 end + return colors.r*255, colors.g*255, colors.b*255 + elseif react then + local reaction=oUF_SuperVillain['colors'].reaction[react] + return reaction[1]*255, reaction[2]*255, reaction[3]*255 + else + return 15,15,15 + end +end + +local function ThreatBar_OnEvent(self, event) + local grouped,inRaid,hasPet=IsInGroup(),IsInRaid(),UnitExists('pet') + local isTanking, status, scaledPercent = UnitDetailedThreatSituation('player','target') + if scaledPercent and scaledPercent > 0 then + self:Show() + if scaledPercent==100 then + if hasPet then + CurrentThreats['pet']=select(3,UnitDetailedThreatSituation('pet','target')) + end + if inRaid then + for i=1,40 do + if UnitExists('raid'..i) and not UnitIsUnit('raid'..i,'player') then + CurrentThreats['raid'..i]=select(3,UnitDetailedThreatSituation('raid'..i,'target')) + end + end + else + for i=1,4 do + if UnitExists('party'..i) then + CurrentThreats['party'..i]=select(3,UnitDetailedThreatSituation('party'..i,'target')) + end + end + end + local highestThreat,unitWithHighestThreat = UMadBro(scaledPercent) + if highestThreat > 0 and unitWithHighestThreat ~= nil then + local r,g,b = GetThreatBarColor(unitWithHighestThreat) + if SuperVillain.ClassRole == 'T' then + self:SetStatusBarColor(0,0.839,0) + self:SetValue(highestThreat) + else + self:SetStatusBarColor(GetThreatStatusColor(status)) + self:SetValue(scaledPercent) + end + else + self:SetStatusBarColor(GetThreatStatusColor(status)) + self:SetValue(scaledPercent) + end + else + self:SetStatusBarColor(0.3,1,0.3) + self:SetValue(scaledPercent) + end + self.text:SetFormattedText('%.0f%%',scaledPercent) + else + self:Hide() + end + twipe(CurrentThreats); +end + +local function LoadThreatBar() + if(SuperVillain.db.system.threatbar == true) then + local ThreatBar = CreateFrame('StatusBar', 'SVUI_ThreatBar', SuperVillain.UIParent); + ThreatBar:SetStatusBarTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Doodads\\THREAT-BAR") + ThreatBar:SetSize(50,100) + ThreatBar:SetFrameStrata('MEDIUM') + ThreatBar:SetOrientation("VERTICAL") + ThreatBar:SetMinMaxValues(0,100) + ThreatBar:Point('LEFT',SVUI_Target,'RIGHT',0,10) + ThreatBar.backdrop = ThreatBar:CreateTexture(nil,"BACKGROUND") + ThreatBar.backdrop:SetAllPoints(ThreatBar) + ThreatBar.backdrop:SetTexture(BARFILE) + ThreatBar.backdrop:SetTexCoord(0.5,0.75,0,0.5) + ThreatBar.backdrop:SetBlendMode("ADD") + ThreatBar.overlay = ThreatBar:CreateTexture(nil,"OVERLAY",nil,1) + ThreatBar.overlay:SetAllPoints(ThreatBar) + ThreatBar.overlay:SetTexture(BARFILE) + ThreatBar.overlay:SetTexCoord(0.75,1,0,0.5) + ThreatBar.text = ThreatBar:CreateFontString(nil,'OVERLAY') + ThreatBar.text:SetFont(SuperVillain.Media.font.numbers, 10, "OUTLINE") + ThreatBar.text:SetPoint('TOP',ThreatBar,'BOTTOM',0,0) + ThreatBar:RegisterEvent('PLAYER_TARGET_CHANGED'); + ThreatBar:RegisterEvent('UNIT_THREAT_LIST_UPDATE') + ThreatBar:RegisterEvent('GROUP_ROSTER_UPDATE') + ThreatBar:RegisterEvent('UNIT_PET') + ThreatBar:SetScript("OnEvent", ThreatBar_OnEvent) + SuperVillain:SetSVMovable(ThreatBar, "Threat Bar"); + end +end + +SuperVillain.Registry:NewScript(LoadThreatBar); + +-- local PVP_POI = { +-- [401] = { --Alterac Valley (15) +-- "Stormpike Aid Station", "Dun Baldar North Bunker", "Dun Baldar South Bunker", +-- "Stormpike Graveyard", "Icewing Bunker", "Stonehearth Graveyard", +-- "Stonehearth Bunker", "Snowfall Graveyard", "Iceblood Tower", +-- "Iceblood Graveyard", "Tower Point", "Frostwolf Graveyard", +-- "West Frostwolf Tower", "East Frostwolf Tower", "Frostwolf Relief Hut" +-- }, +-- [935] = { --Deepwind Gorge (2) +-- "Horde Cart", "Alliance Cart" +-- }, +-- [482] = { --Eye of the Storm (1) +-- "Flag" +-- }, +-- [860] = { --Silvershard Mines (1) +-- "Cart" +-- }, +-- [512] = { --Strand of the Ancients (5) +-- "Green Emerald", "Blue Sapphire", "Purple Amethyst", "Red Sun", "Yellow Moon" +-- }, +-- [540] = { --Isle of Conquest (5) +-- "Quarry", "Hangar", "Workshop", "Docks", "Refinery" +-- }, +-- [856] = { --Temple of Kotmogu (4) +-- "Red Orb", "Blue Orb", "Orange Orb", "Purple Orb" +-- }, +-- [626] = { --Twin Peaks (2) +-- "Horde Flag", "Alliance Flag" +-- }, +-- [443] = { --Warsong Gulch (2) +-- "Horde Flag", "Alliance Flag" +-- }, +-- } \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/pvp.lua b/Interface/AddOns/SVUI/scripts/pvp.lua deleted file mode 100644 index 886461d..0000000 --- a/Interface/AddOns/SVUI/scripts/pvp.lua +++ /dev/null @@ -1,271 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## -########################################################## -LOCALIZED LUA FUNCTIONS -########################################################## -]]-- ---[[ GLOBALS ]]-- -local _G = _G; -local unpack = _G.unpack; -local select = _G.select; ---[[ -########################################################## -GET ADDON DATA -########################################################## -]]-- -local SuperVillain, L = unpack(select(2, ...)); ---[[ -########################################################## -LOCALS -########################################################## -]]-- -local ICON_FILE = [[Interface\AddOns\SVUI\assets\artwork\Icons\DOCK-PVP]] -local PVP_SAFE = [[Interface\AddOns\SVUI\assets\artwork\Icons\PVP-SAFE]] -local PVP_HELP = [[Interface\AddOns\SVUI\assets\artwork\Icons\PVP-INCOMING]] -local PVP_LOST = [[Interface\WorldMap\Skull_64Red]] -local PVP_NODES = { - [461] = { --Arathi Basin (5) - "Stables", "Lumber", "Blacksmith", "Mine", "Farm" - }, - [935] = { --Deepwind Gorge (3) - "Center Mine", "North Mine", "South Mine" - }, - [482] = { --Eye of the Storm (4) - "Fel Reaver", "Blood Elf", "Draenei", "Mage" - }, - [736] = { --The Battle for Gilneas (3) - "LightHouse", "WaterWorks", "Mines" - }, -} - --- local PVP_POI = { --- [401] = { --Alterac Valley (15) --- "Stormpike Aid Station", "Dun Baldar North Bunker", "Dun Baldar South Bunker", --- "Stormpike Graveyard", "Icewing Bunker", "Stonehearth Graveyard", --- "Stonehearth Bunker", "Snowfall Graveyard", "Iceblood Tower", --- "Iceblood Graveyard", "Tower Point", "Frostwolf Graveyard", --- "West Frostwolf Tower", "East Frostwolf Tower", "Frostwolf Relief Hut" --- }, --- [935] = { --Deepwind Gorge (2) --- "Horde Cart", "Alliance Cart" --- }, --- [482] = { --Eye of the Storm (1) --- "Flag" --- }, --- [860] = { --Silvershard Mines (1) --- "Cart" --- }, --- [512] = { --Strand of the Ancients (5) --- "Green Emerald", "Blue Sapphire", "Purple Amethyst", "Red Sun", "Yellow Moon" --- }, --- [540] = { --Isle of Conquest (5) --- "Quarry", "Hangar", "Workshop", "Docks", "Refinery" --- }, --- [856] = { --Temple of Kotmogu (4) --- "Red Orb", "Blue Orb", "Orange Orb", "Purple Orb" --- }, --- [626] = { --Twin Peaks (2) --- "Horde Flag", "Alliance Flag" --- }, --- [443] = { --Warsong Gulch (2) --- "Horde Flag", "Alliance Flag" --- }, --- } ---[[ -########################################################## -HANDLERS -########################################################## -]]-- -local Safe_OnEnter = function(self) - if InCombatLockdown() then return end - if(self.name and self.name ~= "") then - self:SetBackdropBorderColor(1,0.45,0) - GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) - GameTooltip:ClearLines() - GameTooltip:AddLine(self.name .. " is Safe!", 1, 1, 1) - GameTooltip:Show() - end -end - -local Safe_OnLeave = function(self) - if InCombatLockdown() then return end - self:SetBackdropBorderColor(0,0,0) - if(GameTooltip:IsShown()) then GameTooltip:Hide() end -end - -local Safe_OnClick = function(self) - if(self.name and self.name ~= "") then - local msg = ("%s Safe"):format(self.name) - SendChatMessage(msg, "INSTANCE_CHAT") - end -end - -local Help_OnEnter = function(self) - if InCombatLockdown() then return end - if(self.name and self.name ~= "") then - self:SetBackdropBorderColor(1,0.45,0) - GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) - GameTooltip:ClearLines() - GameTooltip:AddLine(self.name .. " Needs Help!", 1, 1, 1) - GameTooltip:Show() - end -end - -local Help_OnLeave = function(self) - if InCombatLockdown() then return end - self:SetBackdropBorderColor(0,0,0) - if(GameTooltip:IsShown()) then GameTooltip:Hide() end -end - -local Help_OnClick = function(self) - if(self.name and self.name ~= "") then - local msg = ("{rt8} Incoming %s {rt8}"):format(self.name) - SendChatMessage(msg, "INSTANCE_CHAT") - end -end - -local EnteringBattleGround = function(self) - local mapID = GetCurrentMapAreaID() - local points = PVP_NODES[mapID] - if(not points) then return end - - for i = 1, 5 do - local nodeName = ("SVUI_PVPNode%d"):format(i) - local node = _G[nodeName] - local safe = node.Safe - local help = node.Help - if(i <= #points) then - local name = points[i] - safe.name = name - help.name = name - node.Text:SetText(name) - node:Show() - else - safe.name = "" - help.name = "" - node.Text:SetText("") - node:Hide() - end - end - self:Enable() -end - -local ExitingBattleGround = function(self) - for i = 1, 5 do - local nodeName = ("SVUI_PVPNode%d"):format(i) - local node = _G[nodeName] - local safe = node.Safe - local help = node.Help - safe.name = "" - help.name = "" - node.Text:SetText("") - node:Hide() - end - self:Disable() -end - -local PVPCommunicator_OnEvent = function(self, event, ...) - local instance, groupType = IsInInstance() - if(instance and groupType == "pvp") then - if(not self.InPVP) then - self:EnteringBattleGround() - self.InPVP = true - end - else - if(self.InPVP) then - self:ExitingBattleGround() - self.InPVP = nil - end - end -end ---[[ -########################################################## -LOADER -########################################################## -]]-- -local function LoadPVPComm() - local holder = CreateFrame("Frame", "SVUI_PVPComm", SuperDockWindowRight) - holder:SetFrameStrata("BACKGROUND") - SuperVillain:RegisterDocklet("SVUI_PVPComm", "PVP ToolKit", ICON_FILE) - - local width = holder:GetWidth() - local height = holder:GetHeight() - local sectionWidth = (width / 6) - 2 - local sectionHeight = (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) - poi:SetPanelTemplate("Transparent") - - local safe = CreateFrame("Button", nil, poi) - safe:SetSize(sectionWidth, sectionHeight) - safe:SetPoint("RIGHT", poi, "RIGHT", -2, 0) - safe:SetButtonTemplate() - safe:SetPanelColor("green") - local sicon = safe:CreateTexture(nil, "OVERLAY") - sicon:SetPoint("CENTER", safe, "CENTER", 0, 0) - sicon:SetSize(iconSize,iconSize) - sicon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - sicon:SetTexture(PVP_SAFE) - safe:SetScript("OnEnter", Safe_OnEnter) - safe:SetScript("OnLeave", Safe_OnLeave) - safe:SetScript("OnClick", Safe_OnClick) - - poi.Safe = safe - - local help = CreateFrame("Button", nil, poi) - help:SetSize(sectionWidth, sectionHeight) - help:SetPoint("RIGHT", safe, "LEFT", -2, 0) - help:SetButtonTemplate() - help:SetPanelColor("red") - local hicon = help:CreateTexture(nil, "OVERLAY") - hicon:SetPoint("CENTER", help, "CENTER", 0, 0) - hicon:SetSize(iconSize,iconSize) - hicon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - hicon:SetTexture(PVP_HELP) - help:SetScript("OnEnter", Help_OnEnter) - help:SetScript("OnLeave", Help_OnLeave) - help:SetScript("OnClick", Help_OnClick) - - poi.Help = help - - poi.Text = poi:CreateFontString(nil,"OVERLAY") - poi.Text:SetFont(SuperVillain.Media.font.roboto, 12, "NONE") - poi.Text:SetPoint("TOPLEFT", poi, "TOPLEFT", 2, 0) - poi.Text:SetPoint("BOTTOMRIGHT", help, "BOTTOMLEFT", -2, 0) - poi.Text:SetJustifyH("CENTER") - poi.Text:SetText("") - end - - holder:Hide() - - local docklet = _G["SVUI_PVPComm_ToolBarButton"] - docklet.Enable = SuperVillain.AddTool - docklet.Disable = SuperVillain.RemoveTool - docklet.EnteringBattleGround = EnteringBattleGround - docklet.ExitingBattleGround = ExitingBattleGround - docklet:RegisterEvent("PLAYER_ENTERING_WORLD") - docklet:RegisterEvent("UPDATE_BATTLEFIELD_SCORE") - docklet:SetScript("OnEvent", PVPCommunicator_OnEvent) - docklet:Disable() -end - -SuperVillain.Registry:NewScript(LoadPVPComm) \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/threat.lua b/Interface/AddOns/SVUI/scripts/threat.lua deleted file mode 100644 index e7e550d..0000000 --- a/Interface/AddOns/SVUI/scripts/threat.lua +++ /dev/null @@ -1,132 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SuperVillain, L = unpack(select(2, ...)); -local twipe=table.wipe; -local CurrentThreats = {}; ---[[ -########################################################## -CORE FUNCTIONS -########################################################## -]]-- -local function UMadBro(scaledPercent) - local highestThreat,unitWithHighestThreat = 0,nil; - for unit,threat in pairs(CurrentThreats)do - if threat > highestThreat then - highestThreat = threat; - unitWithHighestThreat = unit - end - end; - return (scaledPercent - highestThreat),unitWithHighestThreat -end; - -local function GetThreatBarColor(unitWithHighestThreat) - local react = UnitReaction(unitWithHighestThreat,'player') - local _,unitClass = UnitClass(unitWithHighestThreat) - if UnitIsPlayer(unitWithHighestThreat)then - local colors = RAID_CLASS_COLORS[unitClass] - if not colors then return 15,15,15 end; - return colors.r*255, colors.g*255, colors.b*255 - elseif react then - local reaction=oUF_SuperVillain['colors'].reaction[react] - return reaction[1]*255, reaction[2]*255, reaction[3]*255 - else - return 15,15,15 - end -end; - -local function ThreatBar_OnEvent(self, event) - local grouped,inRaid,hasPet=IsInGroup(),IsInRaid(),UnitExists('pet') - local isTanking, status, scaledPercent = UnitDetailedThreatSituation('player','target') - if scaledPercent and scaledPercent > 0 then - self:Show() - if scaledPercent==100 then - if hasPet then - CurrentThreats['pet']=select(3,UnitDetailedThreatSituation('pet','target')) - end; - if inRaid then - for i=1,40 do - if UnitExists('raid'..i) and not UnitIsUnit('raid'..i,'player') then - CurrentThreats['raid'..i]=select(3,UnitDetailedThreatSituation('raid'..i,'target')) - end - end - else - for i=1,4 do - if UnitExists('party'..i) then - CurrentThreats['party'..i]=select(3,UnitDetailedThreatSituation('party'..i,'target')) - end - end - end; - local highestThreat,unitWithHighestThreat = UMadBro(scaledPercent) - if highestThreat > 0 and unitWithHighestThreat ~= nil then - local r,g,b = GetThreatBarColor(unitWithHighestThreat) - if SuperVillain.ClassRole == 'T' then - self:SetStatusBarColor(0,0.839,0) - self:SetValue(highestThreat) - else - self:SetStatusBarColor(GetThreatStatusColor(status)) - self:SetValue(scaledPercent) - end - else - self:SetStatusBarColor(GetThreatStatusColor(status)) - self:SetValue(scaledPercent) - end - else - self:SetStatusBarColor(0.3,1,0.3) - self:SetValue(scaledPercent) - end; - self.text:SetFormattedText('%.0f%%',scaledPercent) - else - self:Hide() - end; - twipe(CurrentThreats); -end; ---[[ -########################################################## -LOADER -########################################################## -]]-- -local BARFILE = [[Interface\AddOns\SVUI\assets\artwork\Doodads\THREAT-BAR-ELEMENTS]] -local function LoadThreatBar() - if(SuperVillain.db.system.threatbar == true) then - local ThreatBar = CreateFrame('StatusBar', 'SVUI_ThreatBar', SuperVillain.UIParent); - ThreatBar:SetStatusBarTexture("Interface\\AddOns\\SVUI\\assets\\artwork\\Doodads\\THREAT-BAR") - ThreatBar:SetSize(50,100) - ThreatBar:SetFrameStrata('MEDIUM') - ThreatBar:SetOrientation("VERTICAL") - ThreatBar:SetMinMaxValues(0,100) - ThreatBar:Point('LEFT',SVUI_Target,'RIGHT',0,10) - ThreatBar.backdrop = ThreatBar:CreateTexture(nil,"BACKGROUND") - ThreatBar.backdrop:SetAllPoints(ThreatBar) - ThreatBar.backdrop:SetTexture(BARFILE) - ThreatBar.backdrop:SetTexCoord(0.5,0.75,0,0.5) - ThreatBar.backdrop:SetBlendMode("ADD") - ThreatBar.overlay = ThreatBar:CreateTexture(nil,"OVERLAY",nil,1) - ThreatBar.overlay:SetAllPoints(ThreatBar) - ThreatBar.overlay:SetTexture(BARFILE) - ThreatBar.overlay:SetTexCoord(0.75,1,0,0.5) - ThreatBar.text = ThreatBar:CreateFontString(nil,'OVERLAY') - ThreatBar.text:SetFont(SuperVillain.Media.font.numbers, 10, "OUTLINE") - ThreatBar.text:SetPoint('TOP',ThreatBar,'BOTTOM',0,0) - ThreatBar:RegisterEvent('PLAYER_TARGET_CHANGED'); - ThreatBar:RegisterEvent('UNIT_THREAT_LIST_UPDATE') - ThreatBar:RegisterEvent('GROUP_ROSTER_UPDATE') - ThreatBar:RegisterEvent('UNIT_PET') - ThreatBar:SetScript("OnEvent", ThreatBar_OnEvent) - SuperVillain:SetSVMovable(ThreatBar, "Threat Bar"); - end -end - -SuperVillain.Registry:NewScript(LoadThreatBar); \ No newline at end of file diff --git a/Interface/AddOns/SVUI/scripts/totems.lua b/Interface/AddOns/SVUI/scripts/totems.lua deleted file mode 100644 index 2439e1b..0000000 --- a/Interface/AddOns/SVUI/scripts/totems.lua +++ /dev/null @@ -1,133 +0,0 @@ ---[[ -############################################################################## -_____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # - ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # - __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # - ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # - ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # - _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # - __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # - _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# - ___\///////////___________\///___________\/////////_____\///////////_# -############################################################################## -S U P E R - V I L L A I N - U I By: Munglunch # -############################################################################## ---]] -local SuperVillain, L = unpack(select(2, ...)); -local Totems = CreateFrame("Frame"); -local TotemBar; ---[[ -########################################################## -CORE FUNCTIONS -########################################################## -]]-- -local Totems_OnEvent = function(self, event) - if not TotemBar then return end - local displayedTotems = 0; - for i=1,MAX_TOTEMS do - if TotemBar[i] then - local haveTotem, name, start, duration, icon = GetTotemInfo(i) - if haveTotem and icon and icon ~= '' then - TotemBar[i]:Show() - TotemBar[i].Icon:SetTexture(icon) - displayedTotems = displayedTotems + 1; - CooldownFrame_SetTimer(TotemBar[i].CD, start, duration, 1) - for i=1,MAX_TOTEMS do - if _G['TotemFrameTotem'..i..'IconTexture']:GetTexture()==icon then - _G['TotemFrameTotem'..i]:ClearAllPoints() - _G['TotemFrameTotem'..i]:SetParent(TotemBar[i].Anchor) - _G['TotemFrameTotem'..i]:SetAllPoints(TotemBar[i].Anchor) - end - end - else - TotemBar[i]:Hide() - end - end - end -end - -function SuperVillain:UpdateTotems() - local totemSize = self.db.system.totems.size; - local totemSpace = self.db.system.totems.spacing; - local totemGrowth = self.db.system.totems.showBy; - local totemSort = self.db.system.totems.sortDirection; - - for i = 1, MAX_TOTEMS do - local button = TotemBar[i] - local lastButton = TotemBar[i - 1] - button:Size(totemSize) - button:ClearAllPoints() - if(totemGrowth == "HORIZONTAL" and totemSort == "ASCENDING") then - if(i == 1) then - button:SetPoint("LEFT", TotemBar, "LEFT", totemSpace, 0) - elseif lastButton then - button:SetPoint("LEFT", lastButton, "RIGHT", totemSpace, 0) - end - elseif(totemGrowth == "VERTICAL" and totemSort == "ASCENDING") then - if(i == 1) then - button:SetPoint("TOP", TotemBar, "TOP", 0, -totemSpace) - elseif lastButton then - button:SetPoint("TOP", lastButton, "BOTTOM", 0, -totemSpace) - end - elseif(totemGrowth == "HORIZONTAL" and totemSort == "DESCENDING") then - if(i == 1) then - button:SetPoint("RIGHT", TotemBar, "RIGHT", -totemSpace, 0) - elseif lastButton then - button:SetPoint("RIGHT", lastButton, "LEFT", -totemSpace, 0) - end - else - if(i == 1) then - button:SetPoint("BOTTOM", TotemBar, "BOTTOM", 0, totemSpace) - elseif lastButton then - button:SetPoint("BOTTOM", lastButton, "TOP", 0, totemSpace) - end - end - end - local tS1 = ((totemSize * MAX_TOTEMS) + (totemSpace * MAX_TOTEMS) + totemSpace); - local tS2 = (totemSize + (totemSpace * 2)); - local tW = (totemGrowth == "HORIZONTAL" and tS1 or tS2); - local tH = (totemGrowth == "HORIZONTAL" and tS2 or tS1); - TotemBar:Size(tW, tH); - Totems_OnEvent() -end - -local function CreateTotemBar() - if(not SuperVillain.db.system.totems.enable) then return; end - local xOffset = SuperVillain.db.SVDock.dockLeftWidth + 12 - TotemBar = CreateFrame("Frame", "SVUI_TotemBar", SuperVillain.UIParent) - TotemBar:SetPoint("BOTTOMLEFT", SuperVillain.UIParent, "BOTTOMLEFT", xOffset, 40) - for i = 1, MAX_TOTEMS do - local totem = CreateFrame("Button", "TotemBarTotem"..i, TotemBar) - totem:SetID(i) - totem:SetButtonTemplate() - totem:Hide() - totem.Anchor = CreateFrame("Frame", nil, totem) - totem.Anchor:SetAlpha(0) - totem.Anchor:SetAllPoints() - totem.Icon = totem:CreateTexture(nil, "ARTWORK") - totem.Icon:FillInner() - totem.Icon:SetTexCoord(0.1, 0.9, 0.1, 0.9) - totem.CD = CreateFrame("Cooldown", "TotemBarTotem"..i.."Cooldown", totem, "CooldownFrameTemplate") - totem.CD:SetReverse(true) - totem.CD:FillInner() - SuperVillain:AddCD(totem.CD) - TotemBar[i] = totem - end - TotemBar:Show() - Totems:RegisterEvent("PLAYER_TOTEM_UPDATE") - Totems:RegisterEvent("PLAYER_ENTERING_WORLD") - Totems:SetScript("OnEvent", Totems_OnEvent) - Totems_OnEvent() - SuperVillain:UpdateTotems() - local frame_name; - if SuperVillain.class == "DEATHKNIGHT" then - frame_name = L["Ghoul Bar"] - elseif SuperVillain.class == "DRUID" then - frame_name = L["Mushroom Bar"] - else - frame_name = L["Totem Bar"] - end - SuperVillain:SetSVMovable(TotemBar, frame_name) -end - -SuperVillain.Registry:NewScript(CreateTotemBar); \ No newline at end of file diff --git a/Interface/AddOns/SVUI/system/alerts.lua b/Interface/AddOns/SVUI/system/alerts.lua index 888739e..0b47714 100644 --- a/Interface/AddOns/SVUI/system/alerts.lua +++ b/Interface/AddOns/SVUI/system/alerts.lua @@ -77,7 +77,7 @@ SuperVillain.ActiveAlerts = {}; SuperVillain.SystemAlert["CLIENT_UPDATE_REQUEST"] = { text = L["Detected that your SVUI Config addon is out of date. Update as soon as possible."], button1 = OKAY, - OnAccept = function() return end, + OnAccept = SuperVillain.fubar, state1 = 1 }; @@ -190,7 +190,7 @@ SuperVillain.SystemAlert["COPY_PROFILE_PROMPT"] = { button2 = NO, timeout = 0, hideOnEscape = 1, - OnAccept = function() end + OnAccept = SuperVillain.fubar }; SuperVillain.SystemAlert["BAR6_CONFIRMATION"] = { text = L["Enabling / Disabling Bar #6 will toggle a paging option from your main actionbar to prevent duplicating bars, are you sure you want to do this?"], @@ -205,7 +205,7 @@ SuperVillain.SystemAlert["BAR6_CONFIRMATION"] = { UpdateActionBarOptions() end end, - OnCancel = function() return end, + OnCancel = SuperVillain.fubar, timeout = 0, whileDead = 1, state1 = 1 diff --git a/Interface/AddOns/SVUI/system/database.lua b/Interface/AddOns/SVUI/system/database.lua index fef21cc..321825d 100644 --- a/Interface/AddOns/SVUI/system/database.lua +++ b/Interface/AddOns/SVUI/system/database.lua @@ -4139,7 +4139,7 @@ function SuperVillain:HexColor(arg1,arg2,arg3) r = (r < 0 or r > 1) and 0 or (r * 255) g = (g < 0 or g > 1) and 0 or (g * 255) b = (b < 0 or b > 1) and 0 or (b * 255) - local hexString = format("|cff%02x%02x%02x",r,g,b) + local hexString = ("|cff%02x%02x%02x"):format(r,g,b) return hexString end diff --git a/Interface/AddOns/SVUI/system/utilities.lua b/Interface/AddOns/SVUI/system/utilities.lua index 2750b64..d55cc1c 100644 --- a/Interface/AddOns/SVUI/system/utilities.lua +++ b/Interface/AddOns/SVUI/system/utilities.lua @@ -274,8 +274,6 @@ CHAT LOG PARSING FUNCTIONS (from LibDeformat by:ckknight) ########################################################## ]]-- do - local __die = function() end - local FORMAT_SEQUENCES = { ["s"] = ".+", ["c"] = ".", @@ -344,7 +342,7 @@ do end) end if highest_index == 0 then - cache[pattern] = __die + cache[pattern] = SuperVillain.fubar else local t = {} t[#t+1] = [=[ @@ -405,4 +403,32 @@ do end return _deformat(pattern)(text) end +end +--[[ +########################################################## +SIMPLE BUTTON CONSTRUCT +########################################################## +]]-- +local Button_OnEnter = function(self, ...) + if InCombatLockdown() then return end + GameTooltip:SetOwner(self, "ANCHOR_TOPLEFT", 0, 4) + GameTooltip:ClearLines() + GameTooltip:AddLine(self.TText, 1, 1, 1) + GameTooltip:Show() +end + +function SuperVillain:CreateButton(frame, label, anchor, x, y, width, height, tooltip) + local button = CreateFrame("Button", nil, frame, "UIPanelButtonTemplate") + button:SetWidth(width) + button:SetHeight(height) + button:SetPoint(anchor, x, y) + button:SetText(label) + button:RegisterForClicks("AnyUp") + button:SetHitRectInsets(0, 0, 0, 0); + button:SetFrameStrata("FULLSCREEN_DIALOG"); + button.TText = tooltip + button:SetButtonTemplate() + button:SetScript("OnEnter", Button_OnEnter) + button:SetScript("OnLeave", GameTooltip_Hide) + return button end \ No newline at end of file diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua index 6053b25..df3e815 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/BigWigs.lua @@ -26,8 +26,7 @@ GET ADDON DATA ########################################################## ]]-- local SuperVillain, L = unpack(SVUI); -local STYLE = _G.StyleVillain; -local NOOP = function() end; +local STYLE = _G.StyleVillain --[[ ########################################################## BIGWIGS @@ -109,9 +108,9 @@ local function StyleBigWigs(event, addon) bar.candyBarBar:ClearAllPoints() bar.candyBarBar:SetAllPoints(bar) bar.candyBarBar.OldSetPoint = bar.candyBarBar.SetPoint - bar.candyBarBar.SetPoint = NOOP + bar.candyBarBar.SetPoint = SuperVillain.fubar bar.candyBarIconFrame.OldSetWidth = bar.candyBarIconFrame.SetWidth - bar.candyBarIconFrame.SetWidth = NOOP + bar.candyBarIconFrame.SetWidth = SuperVillain.fubar bar.candyBarIconFrame:ClearAllPoints() bar.candyBarIconFrame:Point("BOTTOMRIGHT", bar, "BOTTOMLEFT", -1, 0) bar.candyBarIconFrame:SetSize(ButtonSize, ButtonSize) diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua index 67b8db9..4d2480e 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/DXE.lua @@ -41,13 +41,13 @@ local function StyleDXE() local function StyleDXEBar(bar) bar:SetFixedPanelTemplate("Transparent") bar.bg:SetTexture(nil) - bar.border.Show = function() end + bar.border.Show = SuperVillain.fubar bar.border:Hide() bar.statusbar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) bar.statusbar:ClearAllPoints() bar.statusbar:FillInner() bar.righticon:SetFixedPanelTemplate("Default") - bar.righticon.border.Show = function() end + bar.righticon.border.Show = SuperVillain.fubar bar.righticon.border:Hide() bar.righticon:ClearAllPoints() bar.righticon:SetPoint("LEFT", bar, "RIGHT", 2, 0) @@ -56,7 +56,7 @@ local function StyleDXE() bar.righticon.t:FillInner() bar.righticon.t:SetDrawLayer("ARTWORK") bar.lefticon:SetFixedPanelTemplate("Default") - bar.lefticon.border.Show = function() end + bar.lefticon.border.Show = SuperVillain.fubar bar.lefticon.border:Hide() bar.lefticon:ClearAllPoints() bar.lefticon:SetPoint("RIGHT", bar, "LEFT", -2, 0) @@ -71,7 +71,7 @@ local function StyleDXE() for i,hw in ipairs(frame.HW) do if hw:IsShown() then hw:SetFixedPanelTemplate("Transparent") - hw.border.Show = function() end + hw.border.Show = SuperVillain.fubar hw.border:Hide() hw.healthbar:SetStatusBarTexture([[Interface\AddOns\SVUI\assets\artwork\Template\DEFAULT]]) end @@ -85,7 +85,7 @@ local function StyleDXE() local bar = _G["DXEAlertBar"..i] if not bar.styled then bar:SetScale(1) - bar.SetScale = function() return end + bar.SetScale = SuperVillain.fubar StyleDXEBar(bar) bar.styled = true end diff --git a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua index 446a05f..b3c9fe2 100644 --- a/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua +++ b/Interface/AddOns/SVUI_StyleOMatic/addons/thirdparty/WeakAuras.lua @@ -48,7 +48,7 @@ local function StyleWeakAuras() end SuperVillain:AddCD(frame.cooldown) frame.icon:SetTexCoord(0.1,0.9,0.1,0.9) - frame.icon.SetTexCoord = function() end + frame.icon.SetTexCoord = SuperVillain.fubar end local function Create_WeakAuras(parent, data) local region = WeakAuras.regionTypes.icon.OldCreate(parent, data) diff --git a/Interface/BUTTONS/Thumbs.db b/Interface/BUTTONS/Thumbs.db deleted file mode 100644 index 9a524d6..0000000 Binary files a/Interface/BUTTONS/Thumbs.db and /dev/null differ diff --git a/Interface/GLUES/COMMON/Thumbs.db b/Interface/GLUES/COMMON/Thumbs.db deleted file mode 100644 index f45b1b0..0000000 Binary files a/Interface/GLUES/COMMON/Thumbs.db and /dev/null differ diff --git a/Interface/TAXIFRAME/Thumbs.db b/Interface/TAXIFRAME/Thumbs.db deleted file mode 100644 index 544aded..0000000 Binary files a/Interface/TAXIFRAME/Thumbs.db and /dev/null differ diff --git a/Interface/Tooltips/Thumbs.db b/Interface/Tooltips/Thumbs.db deleted file mode 100644 index 60da366..0000000 Binary files a/Interface/Tooltips/Thumbs.db and /dev/null differ