From ce4d7041f5c480b928d2e44cf620956ab1d94cba Mon Sep 17 00:00:00 2001 From: shagu Date: Sun, 10 Mar 2019 13:26:44 +0100 Subject: [PATCH] skin: add textures to gossip, quest and mail --- skins/blizzard/gossipquest.lua | 37 +++------------------- skins/blizzard/mail.lua | 8 ++--- skins/blizzard/questlog.lua | 56 +++++----------------------------- 3 files changed, 16 insertions(+), 85 deletions(-) diff --git a/skins/blizzard/gossipquest.lua b/skins/blizzard/gossipquest.lua index 2851816a..bd5c1c70 100644 --- a/skins/blizzard/gossipquest.lua +++ b/skins/blizzard/gossipquest.lua @@ -14,24 +14,6 @@ pfUI:RegisterSkin("Gossip and Quest", function () do -- quest gossip StripTextures(QuestGreetingScrollChildFrame) - local titles = { CurrentQuestsText, AvailableQuestsText, QuestTitleText, QuestDetailObjectiveTitleText, QuestDetailRewardTitleText, QuestProgressTitleText } - for _, string in pairs(titles) do - if not string._SetTextColor then - string._SetTextColor = string.SetTextColor - string.SetTextColor = function() return end - end - string:_SetTextColor(1,1,.2,1) - string:SetShadowColor(0,0,0,0) - end - - local texts = { QuestFont, GreetingText, QuestDescription, QuestObjectiveText, QuestDetailItemChooseText, QuestDetailItemReceiveText, QuestDetailSpellLearnText, QuestProgressText } - for _, string in pairs(texts) do - if not string._SetTextColor then - string._SetTextColor = string.SetTextColor - string.SetTextColor = function() return end - end - string:_SetTextColor(1,1,1,1) - end QuestTitleText:SetPoint("TOPLEFT", 10, -10) QuestProgressTitleText:SetPoint("TOPLEFT", 10, -10) @@ -55,20 +37,6 @@ pfUI:RegisterSkin("Gossip and Quest", function () icon:SetTexCoord(.08, .92, .08, .92) end end - - hooksecurefunc("QuestFrameProgressItems_Update", function() - QuestProgressRequiredItemsText:SetTextColor(1, 1, 0.2) - QuestProgressRequiredItemsText:SetShadowColor(0,0,0,0) - - local reqmoney = GetQuestMoneyToGet() - if reqmoney > 0 then - if reqmoney > GetMoney() then - QuestProgressRequiredMoneyText:SetTextColor(0.4, 0.4, 0.4) - else - QuestProgressRequiredMoneyText:SetTextColor(.4, 1, 0.4) - end - end - end) end for _, f in pairs(frames) do @@ -99,6 +67,11 @@ pfUI:RegisterSkin("Gossip and Quest", function () SkinScrollbar(_G[scroll:GetName().."ScrollBar"]) CreateBackdrop(scroll, nil, true, .75) + local bg = scroll:CreateTexture(nil, "LOW") + bg:SetAllPoints() + bg:SetTexCoord(.1,1,0,1) + bg:SetTexture("Interface\\Stationery\\StationeryTest1") + if panel ~= 'Greeting' then local num_items, hook_func if panel == 'Progress' then diff --git a/skins/blizzard/mail.lua b/skins/blizzard/mail.lua index bbb73d24..aa5b0f7c 100644 --- a/skins/blizzard/mail.lua +++ b/skins/blizzard/mail.lua @@ -65,8 +65,7 @@ pfUI:RegisterSkin("Mailbox", function () SkinMoneyInputFrame(SendMailMoney) - SendMailBodyEditBox:SetTextColor(1,1,1,1) - StationeryBackgroundLeft:Hide() + StationeryBackgroundLeft:SetAllPoints() StationeryBackgroundRight:Hide() end @@ -99,8 +98,9 @@ pfUI:RegisterSkin("Mailbox", function () StripTextures(OpenMailScrollFrame) CreateBackdrop(OpenMailScrollFrame, nil, true) SkinScrollbar(OpenMailScrollFrameScrollBar) - OpenMailBodyText:SetTextColor(1,1,1,1) - OpenStationeryBackgroundLeft:Hide() + + OpenStationeryBackgroundLeft:SetTexCoord(.1,1,.1,.9) + OpenStationeryBackgroundLeft:SetAllPoints() OpenStationeryBackgroundRight:Hide() end diff --git a/skins/blizzard/questlog.lua b/skins/blizzard/questlog.lua index 91c2e7dc..5c5c9247 100644 --- a/skins/blizzard/questlog.lua +++ b/skins/blizzard/questlog.lua @@ -159,11 +159,18 @@ pfUI:RegisterSkin("Quest Log", function () StripTextures(QuestLogDetailScrollFrame) SkinScrollbar(QuestLogDetailScrollFrameScrollBar) + + QuestLogDetailScrollFrame:ClearAllPoints() QuestLogDetailScrollFrame:SetPoint("TOPLEFT", QuestLogListScrollFrame, "TOPRIGHT", 35, 0) QuestLogDetailScrollFrame:SetHeight(376) QuestLogDetailScrollChildFrame:SetHeight(376) + local bg = QuestLogDetailScrollFrame:CreateTexture(nil, "BACKGROUND") + bg:SetAllPoints() + bg:SetTexCoord(.1,1,0,1) + bg:SetTexture("Interface\\Stationery\\StationeryTest1") + -- quest log backdrop CreateBackdrop(QuestLogDetailScrollFrame, nil, nil, .75) QuestLogDetailScrollFrame.backdrop:SetPoint("TOPLEFT", -5, 5) @@ -188,54 +195,5 @@ pfUI:RegisterSkin("Quest Log", function () icon:SetPoint("LEFT", 3, 0) icon:SetTexCoord(.08, .92, .08, .92) end - - do -- overwrite colors - hooksecurefunc("QuestLog_UpdateQuestDetails", function() - for i=1, GetNumQuestLeaderBoards() do - local string = _G["QuestLogObjective"..i] - - if not string._SetTextColor then - string._SetTextColor = string.SetTextColor - string.SetTextColor = function() return end - end - - local text, type, finished = GetQuestLogLeaderBoard(i) - if finished then - string:_SetTextColor(.4, 1, .4) - else - string:_SetTextColor(.4, .4, .4) - end - end - - local reqmoney = GetQuestLogRequiredMoney() - if reqmoney > 0 then - if reqmoney > GetMoney() then - QuestLogRequiredMoneyText:SetTextColor(1, .4, .4); - else - QuestLogRequiredMoneyText:SetTextColor(.4, 1, .4); - end - end - end) - - local titles = { QuestLogQuestTitle, QuestLogDescriptionTitle, QuestLogRewardTitleText } - for _, string in pairs(titles) do - if not string._SetTextColor then - string._SetTextColor = string.SetTextColor - string.SetTextColor = function() return end - end - string:_SetTextColor(1,1,.2,1) - string:SetShadowColor(0,0,0,0) - end - - local texts = { QuestLogObjectivesText, QuestLogTimerText, QuestLogQuestDescription, - QuestLogItemChooseText, QuestLogItemReceiveText, QuestLogSpellLearnText } - for _, string in pairs(texts) do - if not string._SetTextColor then - string._SetTextColor = string.SetTextColor - string.SetTextColor = function() return end - end - string:_SetTextColor(1,1,1,1) - end - end end end)