Thread Tools Display Modes
07-14-10, 04:51 AM   #1
schambi
A Murloc Raider
 
schambi's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2010
Posts: 4
Change Font of Buff Duration

Hey there
i want to know if it's possible to change the buff font of any buff like u can do it with enchantbuff (for i = 2 do (or something like this)?
Cause the other way .. hm i dont rly get how to use it as simple as possible u know? Im currently playing with 2 Addons:
Gladius and my own small "imp BLizz UI" Addon - but i dont know how to change this god damn Buff Font.

Hope someone can help me there.

schambi
  Reply With Quote
07-14-10, 06:01 AM   #2
morkesh
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 15
the for loop i can't help you with right now since i'm on my way out of the door, but

Code:
BuffButton1Duration:SetFont("Fonts\\MORPHEUS.ttf", 20)
will change the font of your first buffs duration (20 is overkill for the size by the way) so just do a for loop for all the buttons and it should be done
  Reply With Quote
07-14-10, 06:30 AM   #3
schambi
A Murloc Raider
 
schambi's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2010
Posts: 4
Oh that is ..pretty simple ^^ thanks.

Is it okay to do this for any buff? Or it is posible to lets say ..
if buffs = 1 then
BuffButton1Duration
elseif buffs = 2
BuffButton2Duration
..

okay wait that way sux^^.
I thought more like .. eh .. for buffs i = 235235iDontKnow do
BuffButtonDuration

or whatever.
As you may notice im not THAT good in lua ^^.
Its enough for small changes but something different i dont get at the first second.

schambi
  Reply With Quote
07-14-10, 07:29 AM   #4
schambi
A Murloc Raider
 
schambi's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2010
Posts: 4
Code:
'BuffButton1Duration' (a nil value)
<,.<
  Reply With Quote
07-14-10, 08:04 AM   #5
ravagernl
Proceritate Corporis
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 1,176
lua Code:
  1. -- make a copy of the global variable table for faster lookups
  2. local _G = _G
  3.  
  4. local i = 1
  5. -- while true means unending loop
  6. while true do
  7.     local dur = _G["BuffButton"..i.."Duration"]
  8.     -- there is no BuffButton99Duration for example, so skip out.
  9.     if not dur then
  10.         break
  11.     end
  12.     dur:SetFont([[Path\to\font.ttf]],12,'OUTLINE')
  13.     -- increase
  14.     i = i +1
  15. end
  16.  
  17. i = 1
  18. -- while true means unending loop
  19. while true do
  20.     local dur = _G["DebuffButton"..i.."Duration"]
  21.     -- there is no DebuffButton99Duration for example, so skip out.
  22.     if not dur then
  23.         break
  24.     end
  25.     dur:SetFont([[Path\to\font.ttf]],12,'OUTLINE')
  26.     -- increase
  27.     i = i +1
  28. end
Untested, however.

Or you can download Furbish and modify it and/or delete the unrelevant parts.

Last edited by ravagernl : 07-14-10 at 08:09 AM.
  Reply With Quote
07-14-10, 08:19 AM   #6
morkesh
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Jun 2010
Posts: 15
Hang on, looking for a clever way to do this :P
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Change Font of Buff Duration


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