Hello.
I'm currently building a small function to restyle the auto quest pop up frames and have mostly got it figured out, but I'm trying to access a particular texture (in order to change it's draw layer and/or parent) titled QuestIconBg - and can't seem to find the right method for calling it. It's the circular texture highlighted here:
This is the code I have so far:
Lua Code:
-- auto-quest pop up buttons
local function SkinAQButton()
local pop = GetNumAutoQuestPopUps()
for i = 1, pop do
local line = _G["WatchFrameAutoQuestPopUp"..i]
if (line and line:IsShown()) then
if (button.skinned==true) then return end
local button = CreateFrame("Frame", nil, line)
-- style the pop up and add border via this frame
button.skinned = true
else
button.skinned = false
end
end
end
local function alterAQButton()
local pop = GetNumAutoQuestPopUps()
for i = 1, pop do
local line = _G["WatchFrameAutoQuestPopUp"..i]
local questID, popUpType = GetAutoQuestPopUp(i)
local questTitle, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily, _ = GetQuestLogTitle(GetQuestLogIndexByID(questID))
if (isComplete and isComplete > 0) then
isComplete = true
else
isComplete = false
end
if (line and line:IsShown()) then
if (questTitle and questTitle ~= "") then
local aqf = CreateFrame("Frame", nil, line)
aqf:SetPoint("TOPLEFT", line, "TOPLEFT", -1, 1)
aqf:SetPoint("BOTTOMRIGHT", line, "BOTTOMRIGHT", -1, 1)
aqf:SetFrameStrata("HIGH")
line.aqf = aqf
if (isComplete and popUpType=="COMPLETE") then
line.ScrollChild.QuestionMark:ClearAllPoints()
line.ScrollChild.QuestionMark:SetParent(line.aqf)
line.ScrollChild.QuestionMark:SetPoint("CENTER", line.aqf, "LEFT", 29, -10)
line.ScrollChild.QuestionMark:SetDrawLayer("OVERLAY", 7)
line.type="COMPLETED"
elseif (popUpType=="OFFER") then
line.ScrollChild.Exclamation:ClearAllPoints()
line.ScrollChild.Exclamation:SetParent(line.button)
line.ScrollChild.Exclamation:SetPoint("CENTER", line.aqf, "LEFT", 29, -10)
line.ScrollChild.Exclamation:SetDrawLayer("OVERLAY", 7)
line.type="OFFER"
end
end
end
end
end
local WFhandler = CreateFrame("Frame")
WFhandler:RegisterEvent("PLAYER_LOGIN")
WFhandler:SetScript("OnEvent", function(self, event)
local numPopUps = 0
hooksecurefunc("WatchFrameAutoQuest_GetOrCreateFrame", alterAQButton)
hooksecurefunc("WatchFrameAutoQuest_DisplayAutoQuestPopUps", SkinAQButton)
alterAQButton()
SkinAQButton()
end)
basically, how on earth do I call this frame so I can tinker with it? So far I think I've tried using stuff like
line.ScrollChild.QuestIconBg and
_G["WatchFrameAutoQuestPopUp"..i.."QuestIconBg"] to no avail.