WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Lua/XML Help (https://www.wowinterface.com/forums/forumdisplay.php?f=16)
-   -   BonusObjectiveTracker, changing font. (https://www.wowinterface.com/forums/showthread.php?t=54342)

eiszeit 08-30-16 03:59 AM

BonusObjectiveTracker, changing font.
 
Hello there,

I have this problem here with the bonus objective tracker. You can see that all quest titles, achievement titles have a specific font. But somehow, for BonusObjectives that does not work. It seems they use internal functions to put them all in a table I can't access.

Here's my current quest tracker code:

https://gist.github.com/mtthsw/0ef8f...eb031de6ddbf91

My question now is, does anyone know how to change the font of the bonus objective titles? It drives me crazy. :/

Ignore the reward icon on the Progressbar, that is already fixed.

Miiru 08-30-16 05:58 AM

You want to change the string that says "Those Beyond Redemption"?

If i remember correctly, the game handles the headers of bonusobjectives and world quests not as headers, but as lines. If you change
Lua Code:
  1. line 215 - line.Text:SetFont([[Fonts/ARIALN.ttf]], 12)
to something else, it should change the bonusobjective header also. You could add a check for textcolor and only apply your headerfont on yellow.

eiszeit 08-30-16 06:18 AM

Oh! That worked. Kinda unprecise way to get it done but here it is:

Lua Code:
  1. local r, g, b = line.Text:GetTextColor()
  2. -- hacky way to get bonus objective titles in another font
  3. -- print(line.Text:GetText(), r, g, b)
  4. if b < 0.1 then
  5.     line.Text:SetFont(FONT, 13)
  6. else
  7.     line.Text:SetFont([[Fonts/ARIALN.ttf]], 12)
  8. end

Thanks!


All times are GMT -6. The time now is 10:07 PM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI