mirror of
https://github.com/brues-code/pfUI.git
synced 2026-09-29 10:46:03 +00:00
skin: add textures to gossip, quest and mail
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user