Quantcast
(Classic) Modifying the Quest Watch Frame - WoWInterface
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
08-31-20, 08:09 PM   #1
Tair
A Murloc Raider
Join Date: Aug 2020
Posts: 4
(Classic) Modifying the Quest Watch Frame

Hi everyone!

I've recently begun exploring writing my own simple addons. I have a decent beginner's understanding of how to create new functions with an addon, but I'm having a difficult time understanding how to best modify/override existing Blizzard frames.

As an example, I'd like to make some minor changes the Quest Watch frame in Classic. Simple cosmetic modifications like adjusting the fonts, text alignment, etc.

I've found the Blizzard function that I believe controls the things I want to modify, which is QuestWatch_Update(). Here's a segment of code from that function:

Code:
for j=1, numObjectives do
	text, type, finished = GetQuestLogLeaderBoard(j, questIndex);
	watchText = _G["QuestWatchLine"..watchTextIndex];
	-- Set Objective text
	watchText:SetText(" - "..text);
	-- Color the objectives
	if ( finished ) then
		watchText:SetTextColor(HIGHLIGHT_FONT_COLOR.r, HIGHLIGHT_FONT_COLOR.g, HIGHLIGHT_FONT_COLOR.b);
		objectivesCompleted = objectivesCompleted + 1;
	else
		watchText:SetTextColor(0.8, 0.8, 0.8);
	end
	tempWidth = watchText:GetWidth();
	if ( tempWidth > questWatchMaxWidth ) then
		questWatchMaxWidth = tempWidth;
	end
	watchText:SetPoint("TOPLEFT", "QuestWatchLine"..(watchTextIndex - 1), "BOTTOMLEFT", 0, 0);
	watchText:Show();
	watchTextIndex = watchTextIndex + 1;
end

I'm looking for some help with understanding the correct way to reference/alias/override this code to, for example, get rid of the hyphen in front of a tracked objective:

Code:
-- original
watchText:SetText(" - "..text);
-- override
watchText:SetText(text);
I'd be grateful if anyone could point me in the right direction.

Thanks!
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » (Classic) Modifying the Quest Watch Frame

Thread Tools
Display Modes

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