--[[ ############################################################################## _____/\\\\\\\\\\\____/\\\________/\\\__/\\\________/\\\__/\\\\\\\\\\\_ # ___/\\\/////////\\\_\/\\\_______\/\\\_\/\\\_______\/\\\_\/////\\\///__ # __\//\\\______\///__\//\\\______/\\\__\/\\\_______\/\\\_____\/\\\_____ # ___\////\\\__________\//\\\____/\\\___\/\\\_______\/\\\_____\/\\\_____ # ______\////\\\________\//\\\__/\\\____\/\\\_______\/\\\_____\/\\\_____ # _________\////\\\______\//\\\/\\\_____\/\\\_______\/\\\_____\/\\\_____ # __/\\\______\//\\\______\//\\\\\______\//\\\______/\\\______\/\\\_____ # _\///\\\\\\\\\\\/________\//\\\________\///\\\\\\\\\/____/\\\\\\\\\\\_# ___\///////////___________\///___________\/////////_____\///////////_# ############################################################################## S U P E R - V I L L A I N - U I By: Munglunch # ############################################################################## credit: Elv. original logic from ElvUI. Adapted to SVUI # ############################################################################## --]] local SuperVillain, L = unpack(SVUI); local STYLE = _G.StyleVillain; --[[ ########################################################## HELPERS ########################################################## ]]-- local QuestFrameList = { "QuestLogFrameAbandonButton", "QuestLogFramePushQuestButton", "QuestLogFrameTrackButton", "QuestLogFrameCancelButton", "QuestLogFrameCompleteButton" }; local function QuestScrollHelper(b, c, d, e) b:SetPanelTemplate("Inset") b.spellTex = b:CreateTexture(nil, 'ARTWORK') b.spellTex:SetTexture([[Interface\QuestFrame\QuestBG]]) if e then b.spellTex:SetPoint("TOPLEFT", 2, -2) else b.spellTex:SetPoint("TOPLEFT") end; b.spellTex:Size(c or 506, d or 615) b.spellTex:SetTexCoord(0, 1, 0.02, 1) end; local function QueuedWatchFrameItems() for i=1, WATCHFRAME_NUM_ITEMS do local button = _G["WatchFrameItem"..i] local point, relativeTo, relativePoint, xOffset, yOffset = button:GetPoint(1) button:SetFrameStrata("LOW") button:SetPoint("TOPRIGHT", relativeTo, "TOPLEFT", -30, -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; --[[ ########################################################## QUEST STYLERS ########################################################## ]]-- local function QuestGreetingStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.greeting ~= true then return end; QuestFrameGreetingPanel:HookScript("OnShow", function() QuestFrameGreetingPanel:Formula409() QuestFrameGreetingGoodbyeButton:SetButtonTemplate() QuestGreetingFrameHorizontalBreak:MUNG() end) end; local function QuestFrameStyle() if SuperVillain.db.SVStyle.blizzard.enable ~= true or SuperVillain.db.SVStyle.blizzard.quest ~= true then return end; --[[ WIPE TEXTURES ]]-- QuestInfoSkillPointFrame:Formula409() QuestLogFrame:Formula409() QuestLogScrollFrame:Formula409() QuestLogCount:Formula409() EmptyQuestLogFrame:Formula409() QuestProgressScrollFrame:Formula409() QuestLogFrameShowMapButton:Formula409() QuestGreetingScrollFrame:Formula409() QuestLogFrameCompleteButton:Formula409() QuestFrame:Formula409(true) QuestFrameDetailPanel:Formula409(true) QuestDetailScrollFrame:Formula409(true) QuestInfoItemHighlight:Formula409() QuestDetailScrollChildFrame:Formula409(true) QuestRewardScrollFrame:Formula409(true) QuestRewardScrollChildFrame:Formula409(true) QuestFrameProgressPanel:Formula409(true) QuestFrameRewardPanel:Formula409(true) QuestNPCModel:Formula409() QuestNPCModelTextFrame:Formula409() QuestLogDetailFrame:Formula409() QuestLogDetailScrollFrame:Formula409() QuestFrameInset:MUNG() QuestLogFrameInset:MUNG() QuestLogDetailFrameInset:MUNG() STYLE:ApplyCloseButtonStyle(QuestLogFrameCloseButton) STYLE:ApplyScrollStyle(QuestLogDetailScrollFrameScrollBar) STYLE:ApplyScrollStyle(QuestLogScrollFrameScrollBar, 5) STYLE:ApplyScrollStyle(QuestProgressScrollFrameScrollBar) STYLE:ApplyScrollStyle(QuestRewardScrollFrameScrollBar) QuestLogFrame:SetPanelTemplate("Halftone") QuestLogCount:SetFixedPanelTemplate("Default") STYLE:ApplyScrollStyle(QuestDetailScrollFrameScrollBar) QuestLogFrameShowMapButton:SetButtonTemplate() QuestLogFrameShowMapButton.text:ClearAllPoints() QuestLogFrameShowMapButton.text:SetPoint("CENTER") QuestLogFrameShowMapButton:Size(QuestLogFrameShowMapButton:GetWidth()-30, QuestLogFrameShowMapButton:GetHeight(), -40) STYLE:ApplyScrollStyle(QuestGreetingScrollFrameScrollBar) for _,i in pairs(QuestFrameList)do _G[i]:SetButtonTemplate() _G[i]:SetFrameLevel(_G[i]:GetFrameLevel() + 2) end; QuestLogFramePushQuestButton:Point("LEFT", QuestLogFrameAbandonButton, "RIGHT", 2, 0) QuestLogFramePushQuestButton:Point("RIGHT", QuestLogFrameTrackButton, "LEFT", -2, 0) for 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:SetFrameLevel(cLvl) 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:ApplyLinkButtonStyle(item) end end; QuestInfoSkillPointFrame:Width(QuestInfoSkillPointFrame:GetWidth() - 4) QuestInfoSkillPointFrame:SetFrameLevel(QuestInfoSkillPointFrame:GetFrameLevel() + 1) QuestInfoSkillPointFrame:SetFixedPanelTemplate("Slot") 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") QuestInfoSkillPointFramePoints:ClearAllPoints() QuestInfoSkillPointFramePoints:Point("BOTTOMRIGHT", QuestInfoSkillPointFrameIconTexture, "BOTTOMRIGHT") 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) QuestLogFrame:HookScript("OnShow", function() if not QuestLogScrollFrame.spellTex then QuestLogScrollFrame:SetFixedPanelTemplate("Default") QuestLogScrollFrame.spellTex = QuestLogScrollFrame:CreateTexture(nil, 'ARTWORK') QuestLogScrollFrame.spellTex:SetTexture([[Interface\QuestFrame\QuestBookBG]]) QuestLogScrollFrame.spellTex:SetPoint("TOPLEFT", 2, -2) QuestLogScrollFrame.spellTex:Size(514, 616) QuestLogScrollFrame.spellTex:SetTexCoord(0, 1, 0.02, 1) QuestLogScrollFrame.spellTex2 = QuestLogScrollFrame:CreateTexture(nil, 'BORDER') QuestLogScrollFrame.spellTex2:SetTexture([[Interface\FrameGeneral\UI-Background-Rock]]) QuestLogScrollFrame.spellTex2:FillInner() end end) QuestLogDetailScrollFrame:HookScript('OnShow', function(k) if not QuestLogDetailScrollFrame.Panel then QuestLogDetailScrollFrame:SetPanelTemplate("Default") QuestScrollHelper(QuestLogDetailScrollFrame, 509, 630, false) QuestLogDetailScrollFrame:Height(k:GetHeight() - 2) end; QuestLogDetailScrollFrame.spellTex:Height(k:GetHeight() + 217) end) QuestRewardScrollFrame:HookScript('OnShow', function(k) if not k.Panel then k:SetPanelTemplate("Default") 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) QuestProgressScrollFrame:SetFixedPanelTemplate() QuestGreetingScrollFrame:SetFixedPanelTemplate() QuestScrollHelper(QuestDetailScrollFrame, 506, 615, true) QuestScrollHelper(QuestProgressScrollFrame, 506, 615, true) QuestScrollHelper(QuestGreetingScrollFrame, 506, 615, true) QuestFrame:SetPanelTemplate("Action") QuestFrameAcceptButton:SetButtonTemplate() QuestFrameDeclineButton:SetButtonTemplate() QuestFrameCompleteButton:SetButtonTemplate() 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"] i:Formula409() i:SetFixedPanelTemplate("Inset") i:Width(_G["QuestProgressItem"..j]:GetWidth() - 4) texture:SetTexCoord(0.1, 0.9, 0.1, 0.9) texture:SetDrawLayer("OVERLAY") texture:Point("TOPLEFT", 2, -2) texture:Size(texture:GetWidth() - 2, texture:GetHeight() - 2) _G["QuestProgressItem"..j.."Count"]:SetDrawLayer("OVERLAY") end; QuestNPCModel:SetPanelTemplate("Comic") QuestNPCModel:Point("TOPLEFT", QuestLogDetailFrame, "TOPRIGHT", 4, -34) QuestNPCModelTextFrame:SetPanelTemplate("Default") QuestNPCModelTextFrame.Panel:Point("TOPLEFT", QuestNPCModel.Panel, "BOTTOMLEFT", 0, -2) QuestLogDetailFrame:SetPanelTemplate("Action") STYLE:ApplyCloseButtonStyle(QuestLogDetailFrameCloseButton) hooksecurefunc("QuestFrame_ShowQuestPortrait", function(m, t, text, u, r, s) QuestNPCModel:ClearAllPoints() QuestNPCModel:SetPoint("TOPLEFT", m, "TOPRIGHT", r+18, s) end) if not SuperVillain.db.system.questWatch then WatchFrame:HookScript("OnEvent", QueuedWatchFrameItems) WatchFrame:HookScript("OnUpdate", QueuedWatchFrameItems) end; end; --[[ ########################################################## STYLE LOADING ########################################################## ]]-- STYLE:SaveCustomStyle(QuestFrameStyle) STYLE:SaveCustomStyle(QuestGreetingStyle)