Thread Tools Display Modes
07-03-14, 02:28 AM   #1
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
accessing "QuestIconBg" watchframe texture

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:
  1. -- auto-quest pop up buttons
  2.         local function SkinAQButton()
  3.         local pop = GetNumAutoQuestPopUps()
  4.         for i = 1, pop do
  5.             local line = _G["WatchFrameAutoQuestPopUp"..i]
  6.  
  7.             if (line and line:IsShown()) then
  8.                 if (button.skinned==true) then return end
  9.                 local button = CreateFrame("Frame", nil, line)
  10.                 -- style the pop up and add border via this frame
  11.                 button.skinned = true
  12.             else
  13.                 button.skinned = false
  14.             end
  15.         end
  16.     end
  17.    
  18.     local function alterAQButton()
  19.         local pop = GetNumAutoQuestPopUps()
  20.         for i = 1, pop do
  21.             local line = _G["WatchFrameAutoQuestPopUp"..i]
  22.             local questID, popUpType = GetAutoQuestPopUp(i)
  23.             local questTitle, level, questTag, suggestedGroup, isHeader, isCollapsed, isComplete, isDaily, _ = GetQuestLogTitle(GetQuestLogIndexByID(questID))
  24.            
  25.              if (isComplete and isComplete > 0) then
  26.                 isComplete = true
  27.             else
  28.                 isComplete = false
  29.              end   
  30.            
  31.             if (line and line:IsShown()) then
  32.                 if (questTitle and questTitle ~= "") then
  33.                     local aqf = CreateFrame("Frame", nil, line)
  34.                     aqf:SetPoint("TOPLEFT", line, "TOPLEFT", -1, 1)
  35.                     aqf:SetPoint("BOTTOMRIGHT", line, "BOTTOMRIGHT", -1, 1)
  36.                     aqf:SetFrameStrata("HIGH")
  37.                     line.aqf = aqf
  38.                     if (isComplete and popUpType=="COMPLETE") then
  39.                         line.ScrollChild.QuestionMark:ClearAllPoints()
  40.                         line.ScrollChild.QuestionMark:SetParent(line.aqf)
  41.                         line.ScrollChild.QuestionMark:SetPoint("CENTER", line.aqf, "LEFT", 29, -10)
  42.                         line.ScrollChild.QuestionMark:SetDrawLayer("OVERLAY", 7)
  43.                         line.type="COMPLETED"
  44.                     elseif (popUpType=="OFFER") then
  45.                         line.ScrollChild.Exclamation:ClearAllPoints()
  46.                         line.ScrollChild.Exclamation:SetParent(line.button)
  47.                         line.ScrollChild.Exclamation:SetPoint("CENTER", line.aqf, "LEFT", 29, -10)
  48.                         line.ScrollChild.Exclamation:SetDrawLayer("OVERLAY", 7)
  49.                         line.type="OFFER"
  50.                     end
  51.                 end
  52.             end
  53.         end
  54.     end
  55.    
  56.     local WFhandler = CreateFrame("Frame")
  57.     WFhandler:RegisterEvent("PLAYER_LOGIN")
  58.    
  59.     WFhandler:SetScript("OnEvent", function(self, event)
  60.         local numPopUps = 0
  61.         hooksecurefunc("WatchFrameAutoQuest_GetOrCreateFrame", alterAQButton)
  62.         hooksecurefunc("WatchFrameAutoQuest_DisplayAutoQuestPopUps", SkinAQButton)
  63.        
  64.         alterAQButton()
  65.         SkinAQButton()
  66.     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.

Last edited by ObbleYeah : 07-03-14 at 03:14 AM.
  Reply With Quote
07-03-14, 07:36 AM   #2
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
It's possibly called _G["WatchFrameAutoQuestPopUp"..i.."ScrollChildQuestIconBg"]
  Reply With Quote
07-04-14, 02:46 AM   #3
ObbleYeah
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Sep 2008
Posts: 210
That's the one, thanks!
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » accessing "QuestIconBg" watchframe texture


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off