Thread Tools Display Modes
05-22-11, 07:25 PM   #1
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
KGPanels + Vertical Gradient Coloring

I was wondering on how to color borders/backgrounds in KGPanels with a vertical gradient coloring. I am using a code to make them Class colored, but I also want a way to make the actual color gradient.

Any suggestions?

EDIT:
Was using:
Code:
local c = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
self.bg:SetGradientAlpha("VERTICAL", c.r, c.g, c.b, 1, 0, 0, 0, 1)
The first 1 is the alpha of the class color~

Problem with this is that I can't figure out how to reverse the colors xD The black is on top, and the class color is on bottom.
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah

Last edited by Lily.Petal : 05-22-11 at 07:31 PM.
  Reply With Quote
05-22-11, 08:21 PM   #2
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
just swap the colors in your script.
Code:
local c = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
self.bg:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, c.r, c.g, c.b, 1)
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-22-11, 08:25 PM   #3
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by Seerah View Post
just swap the colors in your script.
Code:
local c = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
self.bg:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, c.r, c.g, c.b, 1)
Thank you Seerah, feel like a slight fool :P
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-22-11, 08:26 PM   #4
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
np Hope it works!
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-22-11, 08:37 PM   #5
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by Seerah View Post
np Hope it works!
Oh it did~
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-23-11, 01:24 AM   #6
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Ugh, now I am trying to do it with my borders, but I'm having no luck what so ever. Tried:


self.BackdropBorder:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, c.r, c.g, c.b, 1)
self.BackdropBorderColor:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, c.r, c.g, c.b, 1)

and some other things. But having now luck :<
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-23-11, 05:30 AM   #7
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Lily.Petal View Post
Ugh, now I am trying to do it with my borders, but I'm having no luck what so ever. Tried:


self.BackdropBorder:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, c.r, c.g, c.b, 1)
self.BackdropBorderColor:SetGradientAlpha("VERTICAL", 0, 0, 0, 1, c.r, c.g, c.b, 1)

and some other things. But having now luck :<
You'll have to make individual panels for each border, and set their gradient. It can get to be a pain! Some of my old kgPanels frame lists went on for miles "Frame1BG" "Frame1BorderTopRight" "Frame1BorderTopLeft" etc
  Reply With Quote
05-23-11, 08:38 AM   #8
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Right. Borders themselves can't do gradients.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
05-23-11, 08:43 AM   #9
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by Nibelheim View Post
You'll have to make individual panels for each border, and set their gradient. It can get to be a pain! Some of my old kgPanels frame lists went on for miles "Frame1BG" "Frame1BorderTopRight" "Frame1BorderTopLeft" etc
Originally Posted by Seerah View Post
Right. Borders themselves can't do gradients.
Highly depressing :< if I was using straight pixel-like borders it would be fine, sadly I am using the games Tooltip border :P

Thanks for the info~
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-23-11, 12:54 PM   #10
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
Couldn't you take the tool tip border, copy it and import into an art program (after converting, of course) and add a gradient to it that way? Then import it into kgPanels after you're done.
  Reply With Quote
05-23-11, 01:11 PM   #11
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by jeffy162 View Post
Couldn't you take the tool tip border, copy it and import into an art program (after converting, of course) and add a gradient to it that way? Then import it into kgPanels after you're done.
Ofc, I'm just to lazy to do it :P
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-23-11, 01:15 PM   #12
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
Originally Posted by Lily.Petal View Post
Ofc, I'm just to lazy to do it :P
I prefer to think that you just want to do it with code. It's sounding like using a graphics program might be easier in the long run, though.

Last edited by jeffy162 : 05-23-11 at 01:19 PM.
  Reply With Quote
05-23-11, 01:19 PM   #13
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by jeffy162 View Post
I prefer to think that you just want to do it with code. Using a graphics program might be easier in the long run, though.
Would require me to open up more windows, download the image, crop it, and all the good stuff in between as well as uploading it :< I'll stick with my silly class color on the whole border :P
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-23-11, 01:21 PM   #14
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
Originally Posted by Lily.Petal View Post
Would require me to open up more windows, download the image, crop it, and all the good stuff in between as well as uploading it :< I'll stick with my silly class color on the whole border :P
Okie-dokie, As always, your choice.
  Reply With Quote
05-23-11, 01:35 PM   #15
Lily.Petal
A Molten Giant
 
Lily.Petal's Avatar
AddOn Author - Click to view addons
Join Date: Feb 2010
Posts: 540
Originally Posted by jeffy162 View Post
Okie-dokie, As always, your choice.
rawr! 10characters
__________________

Aggro Color to KG Panels Borders - Nibelheim
Lua Based UI Hider - Nibelheim
Custom LUA PowerText - Stuf - Nibelheim, Seerah
  Reply With Quote
05-23-11, 04:37 PM   #16
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
If this works correctly, here are two Blizzard tooltip border graphics. One .png, and one .psd for Photoshop. Just in case you might need them some other time.
Attached Images
 
Attached Images
File Type: psd UI-Tooltip-Border copy.psd (28.0 KB, 786 views)

Last edited by jeffy162 : 05-23-11 at 04:41 PM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » KGPanels + Vertical Gradient Coloring


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