Thread Tools Display Modes
08-15-10, 02:03 PM   #1
K13wra99
A Kobold Labourer
Join Date: Aug 2010
Posts: 1
KG Panels help

So i pretty much have the whole jist of kgpanels but im sorta stumped at one part. I tried to take pictures from my desktop and use them ingame. Theyre in the interface folder and i used the correct path. However when i add the picture in the "Art Library" it shows its path but the image doesnt show. Any help?
  Reply With Quote
08-15-10, 03:04 PM   #2
Lemmiwinks
A Defias Bandit
Join Date: Jul 2009
Posts: 3
Make sure the path starts with "\\" - for example:
Code:
\\Interface\\AddOns\\MyTextures\\texture1.blp
  Reply With Quote
08-15-10, 03:07 PM   #3
xandora
A Chromatic Dragonspawn
 
xandora's Avatar
Join Date: Feb 2009
Posts: 188
Also make sure the dimensions on the image are in powers of two ie 2, 4, 6, 12, 24, 48, 96, 128, 256, 512 etc.
__________________
  Reply With Quote
08-15-10, 11:30 PM   #4
jeffy162
A Pyroguard Emberseer
 
jeffy162's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 2,364
Ummm.... Don't quote me, but I think that's supposed to be 2, 4, 8, 16, 32, 64, 128, 256, 512, and 1024. Doesn't have to be square, but can be any combination of those numbers for width and height. IE: 1024 x 16 is OK, even 16 x 1024, but not something like 85 x 320. Your images must also be in the .tga (Truevision TarGA) or .blp (Blizzard's proprietary format) format. That's a WoW requirement.

Please check the kgPanels Wiki for a more in-depth explanation.

Last edited by jeffy162 : 08-15-10 at 11:44 PM.
  Reply With Quote
08-17-10, 08:51 AM   #5
Erayo
A Defias Bandit
Join Date: Aug 2010
Posts: 2
I'm just gonna hijack this post instead of messing up the forum with even more threads!

I am curious in how you set the panels in kgpanels to maych the classcolor. So wghen you log in to a warlock you'll have purple panels and when you log on to a warrior you'll have brown ones.

I am quite sure this is some kind of scripting thingy and since I am not too good at it I haven't made any attempts at it myself.


Any help is greatly appreciated!
  Reply With Quote
08-17-10, 10:33 AM   #6
Taryble
A Molten Giant
 
Taryble's Avatar
Join Date: Jan 2009
Posts: 811
Put this in the OnLoad of each kgPanel that you want to react to class color
Code:
local classcolors = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
local cr, cg, cb = classcolors.r, classcolors.g, classcolors.b
self:SetBackdropBorderColor(cr, cg, cb)
This'll use the default class colors from the WoW interface.
If you're using the !ClassColors addon, it takes a little more work, but I'm not really sure how to set up for that.

Edit: And yes, this modifies the Border. If you want to modify the Background, change the line "self:SetBackdropBordercolor(cr, cg, cb)" to "self:SetBackdropColor(cr, cg, cb)" - there ya go.
__________________
-- Taryble

Last edited by Taryble : 08-17-10 at 11:39 AM. Reason: Whoops! Swapped cb and cg in the SetBackdropBorderColor call! Fixt!
  Reply With Quote
08-17-10, 11:22 AM   #7
Xhelius
An Aku'mai Servant
Join Date: Jan 2010
Posts: 39
This will also work to change the border color:

Code:
local _,class = UnitClass("player")

self:SetBackdropBorderColor(RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b)
Change to
self.bg:SetVertexColor for backdrop color changing.

Or use both.

meh...kinda repeated what Tarble said.
  Reply With Quote
08-17-10, 11:49 AM   #8
Taryble
A Molten Giant
 
Taryble's Avatar
Join Date: Jan 2009
Posts: 811
In fact, here's an extended version giving more exact info. Copied from a post I just made on MMOC's UI forum.

Place this in the OnLoad section for the panel you want to react to class color:
Change BORDER color:
Code:
local classcolors = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
local cr, cg, cb = classcolors.r, classcolors.g, classcolors.b
self:SetBackdropBorderColor(cr, cg, cb)
Change BACKGROUND color:
Code:
local classcolors = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
local cr, cg, cb = classcolors.r, classcolors.g, classcolors.b
self:SetBackdropColor(cr, cg, cb)
Change BOTH (why? I dunno, but it's easy):
Code:
local classcolors = RAID_CLASS_COLORS[select(2, UnitClass("player"))]
local cr, cg, cb = classcolors.r, classcolors.g, classcolors.b
self:SetBackdropColor(cr, cg, cb)
selt:SetBackdropBorderColor(cr, cg, cb)
If you want them to change color based on the class of your target, change the "player" in the first line to "target". This can be changed to any valid UnitID (player, target, focus, pet, party1-4, raid1-40, and <UnitID>target for targets of the above, or <UnitID>pet for party/raid pets).
__________________
-- Taryble
  Reply With Quote
08-17-10, 01:00 PM   #9
Erayo
A Defias Bandit
Join Date: Aug 2010
Posts: 2
Originally Posted by Taryble View Post
.
Thanks alot! I've been around asking this for over a week now! Very much appreciated!

And thanks to Xhelius aswell!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » KG Panels help


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