View Single Post
05-07-21, 07:51 AM   #5
Xrystal
nUI Maintainer
 
Xrystal's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Feb 2006
Posts: 5,917
Try changing the numbers in the SetGradient function. I suspect the first 3 numbers are the red,green,blue percentages for color 1 and the last 3 for color 2. So in theory:

frame.myHealPrediction:SetGradient("VERTICAL", 100, 0, 0, 0, 100,0)

Would have a gradient going from red to green.

Edit:
Just found this on another post here.
SetGradientAlpha("VERTICAL", 1, 1, 1, 0, 1, 1, 1, .6)

Sounds like this sets the color gradient and the alpha so maybe change the 4th and 8th values to 0 for full alpha or 1 for full color etc.


Originally Posted by rulezyx View Post
Thank you both for the fast reply.

Thats my fault and I missed that when I was looking at their code.

I am used to have a texture path for my UI stuff but that makes perfect sense now.

So I tried to use it with one of my raidframe codes:
Code:
hooksecurefunc("CompactUnitFrame_UpdateName",function(frame)
if frame and not frame:IsForbidden() then
local frame_name = frame:GetName()
if frame_name and frame_name:match("^CompactRaidFrame%d") and frame.unit and frame.name then
local unit_name = GetUnitName(frame.unit,true)
if unit_name then
frame.name:SetFont("Fonts\\FRIZQT__.TTF", 10, "OUTLINE")
frame.myHealPrediction:SetGradient("VERTICAL", 100, 100, 100, 100, 100, 100)
end
end
end
end)
But no matter what value I put in there it always appears to be just white:
__________________

Last edited by Xrystal : 05-07-21 at 07:55 AM.
  Reply With Quote