Commit 05ff74ef authored by Merathilis's avatar Merathilis

Cleanup/Update Quest Skins.

parent 6ba3d7cb
......@@ -16,7 +16,6 @@ local hooksecurefunc = hooksecurefunc
local function styleQuestFrame()
if E.private.skins.blizzard.enable ~= true or E.private.skins.blizzard.quest ~= true or E.private.muiSkins.blizzard.quest ~= true then return end
_G.QuestFont:SetTextColor(1, 1, 1)
------------------------
--- QuestDetailFrame ---
------------------------
......@@ -64,15 +63,63 @@ local function styleQuestFrame()
-- Copied from ElvUI
local function UpdateGreetingFrame()
for Button in _G.QuestFrameGreetingPanel.titleButtonPool:EnumerateActive() do
Button.Icon:SetDrawLayer("ARTWORK")
print("meraBlub")
local Text = Button:GetFontString():GetText()
if Text and strfind(Text, '|cff000000') then
Button:GetFontString():SetText(gsub(Text, '|cff000000', '|cffffe519'))
end
end
end
_G.QuestFrameGreetingPanel:HookScript('OnShow', UpdateGreetingFrame)
hooksecurefunc("QuestFrameGreetingPanel_OnShow", UpdateGreetingFrame)
hooksecurefunc('QuestFrameProgressItems_Update', function()
_G.QuestProgressRequiredItemsText:SetTextColor(1, .8, .1)
end)
hooksecurefunc("QuestFrame_SetTitleTextColor", function(fontString)
fontString:SetTextColor(1, .8, .1)
end)
hooksecurefunc("QuestFrame_SetTextColor", function(fontString)
fontString:SetTextColor(1, 1, 1)
end)
hooksecurefunc('QuestInfo_ShowRequiredMoney', function()
local requiredMoney = GetQuestLogRequiredMoney()
if requiredMoney > 0 then
if requiredMoney > GetMoney() then
_G.QuestInfoRequiredMoneyText:SetTextColor(.63, .09, .09)
else
_G.QuestInfoRequiredMoneyText:SetTextColor(1, .8, .1)
end
end
end)
local QuestInfoRewardsFrame = _G.QuestInfoRewardsFrame
if QuestInfoRewardsFrame.spellHeaderPool then
for _, pool in ipairs({"followerRewardPool", "spellRewardPool"}) do
QuestInfoRewardsFrame[pool]._acquire = QuestInfoRewardsFrame[pool].Acquire
QuestInfoRewardsFrame[pool].Acquire = function()
local frame = QuestInfoRewardsFrame[pool]:_acquire()
if frame then
frame.Name:SetTextColor(1, 1, 1)
end
return frame
end
end
QuestInfoRewardsFrame.spellHeaderPool._acquire = QuestInfoRewardsFrame.spellHeaderPool.Acquire
QuestInfoRewardsFrame.spellHeaderPool.Acquire = function(self)
local frame = self:_acquire()
if frame then
frame:SetTextColor(1, 1, 1)
end
return frame
end
end
_G.QuestGreetingScrollFrame:HookScript("OnShow", function(self)
self:SetTemplate("Transparent")
if not E.private.skins.parchmentRemover.enable then
......@@ -81,13 +128,6 @@ local function styleQuestFrame()
end
end)
hooksecurefunc("QuestFrame_SetMaterial", function(frame)
_G[frame:GetName().."MaterialTopLeft"]:Hide()
_G[frame:GetName().."MaterialTopRight"]:Hide()
_G[frame:GetName().."MaterialBotLeft"]:Hide()
_G[frame:GetName().."MaterialBotRight"]:Hide()
end)
for i = 1, _G.MAX_REQUIRED_ITEMS do
local bu = _G["QuestProgressItem"..i]
local ic = _G["QuestProgressItem"..i.."IconTexture"]
......@@ -111,14 +151,6 @@ local function styleQuestFrame()
_G.QuestDetailScrollFrame:SetWidth(302) -- else these buttons get cut off
hooksecurefunc(_G.QuestProgressRequiredMoneyText, "SetTextColor", function(self, r)
if r == 0 then
self:SetTextColor(.8, .8, .8)
elseif r == .2 then
self:SetTextColor(1, 1, 1)
end
end)
-- Quest NPC model
_G.QuestNPCModelShadowOverlay:Hide()
_G.QuestNPCModelBg:Hide()
......@@ -158,22 +190,52 @@ local function styleQuestFrame()
_G.QuestNPCModel:SetPoint("TOPLEFT", parentFrame, "TOPRIGHT", x, y)
end)
-- Text Color
_G.QuestProgressRequiredItemsText:SetTextColor(1, 1, 1)
_G.QuestProgressRequiredItemsText:SetShadowColor(0, 0, 0)
_G.CurrentQuestsText:SetTextColor(1, 1, 1)
_G.CurrentQuestsText.SetTextColor = MER.dummy
_G.CurrentQuestsText:SetShadowColor(0, 0, 0)
_G.QuestProgressTitleText:SetTextColor(1, 1, 1)
_G.QuestProgressTitleText:SetShadowColor(0, 0, 0)
_G.QuestProgressTitleText.SetTextColor = MER.dummy
_G.QuestProgressText:SetTextColor(1, 1, 1)
_G.QuestProgressText.SetTextColor = MER.dummy
_G.GreetingText:SetTextColor(1, 1, 1)
_G.GreetingText.SetTextColor = MER.dummy
_G.AvailableQuestsText:SetTextColor(1, 1, 1)
_G.AvailableQuestsText.SetTextColor = MER.dummy
_G.AvailableQuestsText:SetShadowColor(0, 0, 0)
-- Text Colors
--_G.QuestInfoTitleHeader:SetTextColor(1, 1, 1)
--_G.QuestInfoTitleHeader.SetTextColor = MER.dummy
--_G.QuestInfoTitleHeader:SetShadowColor(0, 0, 0)
--_G.QuestInfoDescriptionHeader:SetTextColor(1, 1, 1)
--_G.QuestInfoDescriptionHeader.SetTextColor = MER.dummy
--_G.QuestInfoDescriptionHeader:SetShadowColor(0, 0, 0)
--_G.QuestInfoObjectivesHeader:SetTextColor(1, 1, 1)
--_G.QuestInfoObjectivesHeader.SetTextColor = MER.dummy
--_G.QuestInfoObjectivesHeader:SetShadowColor(0, 0, 0)
--
--_G.QuestInfoRewardsFrame.Header:SetTextColor(1, 1, 1)
--_G.QuestInfoRewardsFrame.Header.SetTextColor = MER.dummy
--_G.QuestInfoRewardsFrame.Header:SetShadowColor(0, 0, 0)
--
--_G.QuestInfoDescriptionText:SetTextColor(1, 1, 1)
--_G.QuestInfoDescriptionText.SetTextColor = MER.dummy
--
--_G.QuestInfoObjectivesText:SetTextColor(1, 1, 1)
--_G.QuestInfoObjectivesText.SetTextColor = MER.dummy
--
--_G.QuestInfoGroupSize:SetTextColor(1, 1, 1)
--_G.QuestInfoGroupSize.SetTextColor = MER.dummy
--
--_G.QuestInfoRewardText:SetTextColor(1, 1, 1)
--_G.QuestInfoRewardText.SetTextColor = MER.dummy
--
--_G.QuestInfoSpellObjectiveLearnLabel:SetTextColor(1, 1, 1)
--_G.QuestInfoSpellObjectiveLearnLabel.SetTextColor = MER.dummy
--
--_G.QuestInfoRewardsFrame.ItemChooseText:SetTextColor(1, 1, 1)
--_G.QuestInfoRewardsFrame.ItemChooseText.SetTextColor = MER.dummy
--
--_G.QuestInfoRewardsFrame.ItemReceiveText:SetTextColor(1, 1, 1)
--_G.QuestInfoRewardsFrame.ItemReceiveText.SetTextColor = MER.dummy
--
--_G.QuestInfoRewardsFrame.PlayerTitleText:SetTextColor(1, 1, 1)
--_G.QuestInfoRewardsFrame.PlayerTitleText.SetTextColor = MER.dummy
--
--_G.QuestInfoRewardsFrame.XPFrame.ReceiveText:SetTextColor(1, 1, 1)
--_G.QuestInfoRewardsFrame.XPFrame.ReceiveText.SetTextColor = MER.dummy
--
--_G.QuestInfoRewardsFrame.spellHeaderPool:Acquire():SetVertexColor(1, 1, 1)
--_G.QuestInfoRewardsFrame.spellHeaderPool:Acquire().SetVertexColor = MER.dummy
end
S:AddCallback("mUIQuestFrame", styleQuestFrame)
......@@ -14,6 +14,10 @@ local GetNumQuestLeaderBoards = GetNumQuestLeaderBoards
local GetQuestLogLeaderBoard = GetQuestLogLeaderBoard
local GetNumQuestLogRewardSpells = GetNumQuestLogRewardSpells
local GetNumRewardSpells = GetNumRewardSpells
local C_QuestLog_GetNextWaypointText = C_QuestLog.GetNextWaypointText
local GetQuestLogSelection = GetQuestLogSelection
local GetQuestLogTitle = GetQuestLogTitle
local GetQuestID = GetQuestID
--Global variables that we don't cache, list them here for the mikk's Find Globals script
-- GLOBALS:
......@@ -46,7 +50,7 @@ local function styleQuestInfo()
restyleSpellButton(_G.QuestInfoSpellObjectiveFrame)
local function QuestInfo_GetQuestID()
if QuestInfoFrame.questLog then
if _G.QuestInfoFrame.questLog then
return select(8, GetQuestLogTitle(GetQuestLogSelection()))
else
return GetQuestID()
......@@ -59,13 +63,12 @@ local function styleQuestInfo()
local questID = QuestInfo_GetQuestID()
local objectivesTable = _G.QuestInfoObjectivesFrame.Objectives
local numVisibleObjectives = 0
local objective
local waypointText = C_QuestLog.GetNextWaypointText(questID);
local waypointText = C_QuestLog_GetNextWaypointText(questID)
if waypointText then
numVisibleObjectives = numVisibleObjectives + 1;
objective = objectivesTable[numVisibleObjectives]
objective:SetTextColor(1, 1, 1)
numVisibleObjectives = numVisibleObjectives + 1
local objective = _G['QuestInfoObjective'..numVisibleObjectives]
objective:SetTextColor(1, .8, .1)
end
for i = 1, GetNumQuestLeaderBoards() do
......@@ -73,8 +76,7 @@ local function styleQuestInfo()
if (type ~= "spell" and type ~= "log" and numVisibleObjectives < _G.MAX_OBJECTIVES) then
numVisibleObjectives = numVisibleObjectives + 1
local objective = objectivesTable[numVisibleObjectives]
local objective = _G['QuestInfoObjective'..numVisibleObjectives]
if objective then
if finished then
objective:SetTextColor(34/255, 255/255, 0/255)
......@@ -216,51 +218,56 @@ local function styleQuestInfo()
end
end)
_G.QuestInfoTitleHeader:SetTextColor(1, 1, 1)
_G.QuestInfoTitleHeader.SetTextColor = MER.dummy
_G.QuestInfoTitleHeader:SetShadowColor(0, 0, 0)
_G.QuestInfoDescriptionHeader:SetTextColor(1, 1, 1)
_G.QuestInfoDescriptionHeader.SetTextColor = MER.dummy
_G.QuestInfoDescriptionHeader:SetShadowColor(0, 0, 0)
_G.QuestInfoObjectivesHeader:SetTextColor(1, 1, 1)
_G.QuestInfoObjectivesHeader.SetTextColor = MER.dummy
_G.QuestInfoObjectivesHeader:SetShadowColor(0, 0, 0)
_G.QuestInfoRewardsFrame.Header:SetTextColor(1, 1, 1)
_G.QuestInfoRewardsFrame.Header.SetTextColor = MER.dummy
_G.QuestInfoRewardsFrame.Header:SetShadowColor(0, 0, 0)
_G.QuestInfoDescriptionText:SetTextColor(1, 1, 1)
_G.QuestInfoDescriptionText.SetTextColor = MER.dummy
_G.QuestInfoObjectivesText:SetTextColor(1, 1, 1)
_G.QuestInfoObjectivesText.SetTextColor = MER.dummy
_G.QuestInfoGroupSize:SetTextColor(1, 1, 1)
_G.QuestInfoGroupSize.SetTextColor = MER.dummy
_G.QuestInfoRewardText:SetTextColor(1, 1, 1)
_G.QuestInfoRewardText.SetTextColor = MER.dummy
_G.QuestInfoSpellObjectiveLearnLabel:SetTextColor(1, 1, 1)
_G.QuestInfoSpellObjectiveLearnLabel.SetTextColor = MER.dummy
local function HookTextColor_Yellow(self)
if self.isSetting then return end
self.isSetting = true
self:SetTextColor(1, .8, 0)
self.isSetting = nil
end
_G.QuestInfoRewardsFrame.ItemChooseText:SetTextColor(1, 1, 1)
_G.QuestInfoRewardsFrame.ItemChooseText.SetTextColor = MER.dummy
local function SetTextColor_Yellow(font)
font:SetShadowColor(0, 0, 0)
font:SetTextColor(1, .8, 0)
hooksecurefunc(font, "SetTextColor", HookTextColor_Yellow)
end
_G.QuestInfoRewardsFrame.ItemReceiveText:SetTextColor(1, 1, 1)
_G.QuestInfoRewardsFrame.ItemReceiveText.SetTextColor = MER.dummy
local yellowish = {
_G.QuestInfoTitleHeader,
_G.QuestInfoDescriptionHeader,
_G.QuestInfoObjectivesHeader,
_G.QuestInfoRewardsFrame.Header,
}
for _, font in pairs(yellowish) do
SetTextColor_Yellow(font)
end
_G.QuestInfoRewardsFrame.PlayerTitleText:SetTextColor(1, 1, 1)
_G.QuestInfoRewardsFrame.PlayerTitleText.SetTextColor = MER.dummy
local function HookTextColor_White(self)
if self.isSetting then return end
self.isSetting = true
self:SetTextColor(1, 1, 1)
self.isSetting = nil
end
_G.QuestInfoRewardsFrame.XPFrame.ReceiveText:SetTextColor(1, 1, 1)
_G.QuestInfoRewardsFrame.XPFrame.ReceiveText.SetTextColor = MER.dummy
local function SetTextColor_White(font)
font:SetShadowColor(0, 0, 0)
font:SetTextColor(1, 1, 1)
hooksecurefunc(font, "SetTextColor", HookTextColor_White)
end
_G.QuestInfoRewardsFrame.spellHeaderPool:Acquire():SetVertexColor(1, 1, 1)
_G.QuestInfoRewardsFrame.spellHeaderPool:Acquire().SetVertexColor = MER.dummy
local whitish = {
_G.QuestInfoDescriptionText,
_G.QuestInfoObjectivesText,
_G.QuestInfoGroupSize,
_G.QuestInfoRewardText,
_G.QuestInfoSpellObjectiveLearnLabel,
_G.QuestInfoRewardsFrame.ItemChooseText,
_G.QuestInfoRewardsFrame.ItemReceiveText,
_G.QuestInfoRewardsFrame.PlayerTitleText,
_G.QuestInfoRewardsFrame.XPFrame.ReceiveText,
}
for _, font in pairs(whitish) do
SetTextColor_White(font)
end
end
S:AddCallback("mUIQuestInfo", styleQuestInfo)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment