Originally Posted by SDPhantom
It appears the text is set up for "Parchment" material by default and makes a call to GetMaterialTextColors() to get new colors if a different material is to be used.
Here are the related XML objects and Lua code you should look at for making that specific modification.
QuestInfo.xml:282
xml Code:
<Frame name="QuestInfoFrame" hidden="true"> <Size> <AbsDimension x="300" y="100"/> </Size> <Layers> <Layer level="BACKGROUND"> <FontString name="QuestInfoTitleHeader" inherits="QuestTitleFont" justifyH="LEFT" text="Quest title"> <Size> <AbsDimension x="285" y="0"/> </Size> </FontString> <FontString name="QuestInfoObjectivesText" inherits="QuestFont" justifyH="LEFT"> <Size> <AbsDimension x="285" y="0"/> </Size> </FontString> <FontString name="QuestInfoRewardText" inherits="QuestFont" justifyH="LEFT"> <Size> <AbsDimension x="285" y="0"/> </Size> </FontString> <FontString name="QuestInfoRequiredMoneyText" inherits="QuestFontNormalSmall" text="REQUIRED_MONEY" /> <FontString name="QuestInfoGroupSize" inherits="QuestFont" /> <FontString name="QuestInfoAnchor" inherits="QuestFont" /> <FontString name="QuestInfoDescriptionHeader" inherits="QuestTitleFont" justifyH="LEFT" text="QUEST_DESCRIPTION"> <Size> <AbsDimension x="285" y="0"/> </Size> </FontString> <FontString name="QuestInfoObjectivesHeader" inherits="QuestTitleFont" text="QUEST_OBJECTIVES" justifyH="LEFT"> <Size> <AbsDimension x="285" y="0"/> </Size> </FontString> <FontString name="QuestInfoDescriptionText" inherits="QuestFont" justifyH="LEFT"> <Size> <AbsDimension x="285" y="0"/> </Size> </FontString> </Layer> </Layers> <Frames> <Frame name="QuestInfoFadingFrame"> <Size> <AbsDimension x="1" y="1"/> </Size> <Scripts> <OnUpdate function="QuestInfoFadingFrame_OnUpdate"/> </Scripts> </Frame> <Frame name="QuestInfoSpacerFrame"> <Size> <AbsDimension x="5" y="5"/> </Size> </Frame> </Frames> <Scripts> <OnLoad> self.material = "Parchment"; </OnLoad> </Scripts> </Frame>
QuestInfo.lua:29
lua Code:
function QuestInfo_Display(template, parentFrame, acceptButton, material) local lastFrame, shownFrame, bottomShownFrame; local elementsTable = template.elements; local bottomShownFrame; QuestInfoFrame.questLog = template.questLog; QuestInfoFrame.chooseItems = template.chooseItems; QuestInfoFrame.tooltip = template.tooltip; QuestInfoFrame.acceptButton = acceptButton; if ( QuestInfoFrame.material ~= material ) then QuestInfoFrame.material = material; local textColor, titleTextColor = GetMaterialTextColors(material); -- headers QuestInfoTitleHeader:SetTextColor(titleTextColor[1], titleTextColor[2], titleTextColor[3]); QuestInfoDescriptionHeader:SetTextColor(titleTextColor[1], titleTextColor[2], titleTextColor[3]); QuestInfoObjectivesHeader:SetTextColor(titleTextColor[1], titleTextColor[2], titleTextColor[3]); QuestInfoRewardsHeader:SetTextColor(titleTextColor[1], titleTextColor[2], titleTextColor[3]); -- other text QuestInfoDescriptionText:SetTextColor(textColor[1], textColor[2], textColor[3]); QuestInfoObjectivesText:SetTextColor(textColor[1], textColor[2], textColor[3]); QuestInfoGroupSize:SetTextColor(textColor[1], textColor[2], textColor[3]); QuestInfoRewardText:SetTextColor(textColor[1], textColor[2], textColor[3]); -- reward frame text QuestInfoItemChooseText:SetTextColor(textColor[1], textColor[2], textColor[3]); QuestInfoItemReceiveText:SetTextColor(textColor[1], textColor[2], textColor[3]); QuestInfoSpellLearnText:SetTextColor(textColor[1], textColor[2], textColor[3]); QuestInfoXPFrameReceiveText:SetTextColor(textColor[1], textColor[2], textColor[3]); end for i = 1, #elementsTable, 3 do shownFrame, bottomShownFrame = elementsTable[i](); if ( shownFrame ) then shownFrame:SetParent(parentFrame); if ( lastFrame ) then shownFrame:SetPoint("TOPLEFT", lastFrame, "BOTTOMLEFT", elementsTable[i+1], elementsTable[i+2]); else shownFrame:SetPoint("TOPLEFT", parentFrame, "TOPLEFT", elementsTable[i+1], elementsTable[i+2]); end lastFrame = bottomShownFrame or shownFrame; end end end
|
Thanks,
local QuestInfo_Display = function(template, parentFrame, acceptButton, material)
QuestInfoDescriptionText:SetTextColor(1, 1, 1)
QuestInfoObjectivesText:SetTextColor(1, 1, 1)
QuestInfoGroupSize:SetTextColor(1, 1, 1)
QuestInfoRewardText:SetTextColor(1, 1, 1)
QuestInfoTitleHeader:SetTextColor(0.95, 0.95, 0)
QuestInfoDescriptionHeader:SetTextColor(0.95, 0.95, 0)
QuestInfoObjectivesHeader:SetTextColor(0.95, 0.95, 0)
QuestInfoRewardsHeader:SetTextColor(0.95, 0.95, 0)
QuestInfoItemChooseText:SetTextColor(1, 1, 1)
QuestInfoItemReceiveText:SetTextColor(1, 1, 1)
QuestInfoSpellLearnText:SetTextColor(1, 1, 1)
QuestInfoXPFrameReceiveText:SetTextColor(1, 1, 1)
end
hooksecurefunc('QuestInfo_Display', QuestInfo_Display) worked perfect.