Thread Tools Display Modes
08-28-10, 09:03 PM   #1
Zagrei
A Cobalt Mageweaver
 
Zagrei's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 246
Class colored names in sThreatMeter?

*points to title* Is this possible? If so, how? I am thoroughly stumped :P
__________________
  Reply With Quote
08-29-10, 03:12 AM   #2
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 213
Wild guess by looking at the code real quick would be trying..

Code:
bar.textright:SetTextColor(class.r, class.g, class.b, 1);
Keep in mind that the change wont show on the testbar so best way too try and see if it works is too get a group or pet or something so you can test it.
  Reply With Quote
08-29-10, 04:25 PM   #3
Zagrei
A Cobalt Mageweaver
 
Zagrei's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 246
Well, that sure SOUNDED like it was gonna work... sadly, I get this when I put that code in:


Without the code:



P.S. Yet again, ignore the quality. I figured out that the addon I am using for FPS reduces screenshot quality, so in the future, that addon will be turned off for screenies :P

EDIT: Also, I edited the code of the addon so that it shows when solo (for while I'm testing it)... just in case you were wondering :P
__________________

Last edited by Zagrei : 08-29-10 at 05:25 PM.
  Reply With Quote
08-29-10, 10:12 PM   #4
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 213
looks odd that your whole bar turns white.. editing the wrong line?

i tried it quick and it did work here.. my own name was still white though. everyone else was classcolored...(play around unchecking text options in the config on and off)

On my way too work so couldnt give it more testing atm.
  Reply With Quote
08-30-10, 10:53 AM   #5
Zagrei
A Cobalt Mageweaver
 
Zagrei's Avatar
AddOn Compiler - Click to view compilations
Join Date: Nov 2009
Posts: 246
Originally Posted by nin View Post
looks odd that your whole bar turns white.. editing the wrong line?

i tried it quick and it did work here.. my own name was still white though. everyone else was classcolored...(play around unchecking text options in the config on and off)

On my way too work so couldnt give it more testing atm.

I am editing it right here:

Code:
bar.textleft = bar:CreateFontString("$parentTextLeft", "ARTWORK");
bar.textleft:SetFont(unpack(sThreatMeter_Data.Font));
bar.textleft:SetShadowOffset(0, 0);
bar.textleft:SetTextColor(class.r, class.g, class.b, 1);
bar.textleft:SetShadowColor(0, 0, 0, sThreatMeter_Data.FontShadowAlpha);
bar.textleft:SetJustifyH("LEFT");
bar.textleft:SetPoint("LEFT", 1, 1);
bar.textleft:SetPoint("RIGHT", bar.textright, "LEFT", -1, 1);
Is this correct?
__________________
  Reply With Quote
08-30-10, 11:10 AM   #6
nin
A Cobalt Mageweaver
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 213
you need too change it further down. otherwise its not gonna use the classcolor function methinks.. thats what causing you errors probably.

i changed line 224 in the config layouyt when testing.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Class colored names in sThreatMeter?


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