Thread Tools Display Modes
11-01-12, 06:38 AM   #1
tapes
A Defias Bandit
Join Date: Aug 2009
Posts: 2
Please help a noob

Greetings!

I've never posted in this forum and the last time I visited it was (apparently) about 3 years ago, so I apologize if I'm posting on a wrong subsection or something.

Anyway, I've recently started playing WoW again and I'm planning on using an almost default UI that I plan to modify myself. I know how to do some simple things like moving, hiding and scaling frames and things like that, but I'm still a complete .lua noob.

I need help with two things:

1. making the bar above target frame health bar transparent, pic related:

2. coloring the name in the target frame according to the target's hostility (green - friendly, red - hostile)


I appreciate any help I can get.
Thank you.
  Reply With Quote
11-01-12, 06:53 AM   #2
Dridzt
A Pyroguard Emberseer
 
Dridzt's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2005
Posts: 1,360
I think this is relevant at least to the part about the background.

http://www.wowinterface.com/forums/s...ad.php?t=44627
  Reply With Quote
11-01-12, 12:27 PM   #3
tapes
A Defias Bandit
Join Date: Aug 2009
Posts: 2
Originally Posted by Dridzt View Post
I think this is relevant at least to the part about the background.

http://www.wowinterface.com/forums/s...ad.php?t=44627
Thanks! That helped, although now I realize that I didn't want to make it completely transparent, I want it to look the same way it does on the player frame (low opacity black).

Edit: I've managed to change the opacity of the bar, but it's still green and I'm not sure how to change it to black.

Last edited by tapes : 11-01-12 at 12:47 PM.
  Reply With Quote
11-01-12, 02:44 PM   #4
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,327
It looks like a texture and as such, you can use texture:SetVertexColor() to change its color. It accepts 4 values representing a RGBA value in the form of percentages ranging from 0.0-1.0. See texture:SetVertexColor().

Note the link refers to LayeredRegion, which is an abstract list of methods that is available for use by Texture objects among a few others.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 11-01-12 at 02:46 PM.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » Please help a noob


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