WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   EnhancedColourPicker and using it with kgpanels (https://www.wowinterface.com/forums/showthread.php?t=19383)

Mordaki987 11-20-08 12:31 AM

EnhancedColourPicker and using it with kgpanels
 
I'm in need of some help if anyone is knowledgable in this arena i would most appreciate the help. What i'm trying to do is use different color backgrounds for different characters through kgpanels but i am seeing no way of saving the various different profiles and in turn i'm stuck with the same color for all panels regardless of changes made on other or different characters. Example of what i am talking about is i want to use red for all the panels on my death knight then when i log into say my priest i want the colors of the panels to be either blue or purple instead of red. how would i go about accomplishing this? if anyone out there would be able to help i would be forever gratefull.

Psoewish 11-20-08 08:09 AM

You should be able to create a new layout, then create the panels you want, and copy the layout of the specific panel you need to the newly created one.

Example to clarify:

I have a layout named "example1", this layout holds all my panels for my Death Knight in red.

Now if I want to have the exact same layout for my Priest, but with different colors, there are 2 things I can do. The first one is more to answer your question in general, the second is an answer specific to this question (having different colors for different classes)

1) I would then create a new layout and call it "example2". Under panels create a new panel, and then go to the options of that panel you just created. There should be 2 dropdown menus at the top now. One to choose wich settings you want to copy, the second to choose what panel you wish to copy the settings from. So if I would have for example a left chatbox panel, I would select "all" from the first dropdown menu, and "leftchatbox" from the right one. This will copy all settings between the panels, and then you can modify the colors for that panel for that layout, while the other one will be intact.

I know it sounds quite complicated, but just read it while being in the kgpanels config window and you'll be able to figure it out I think. :)

This solution is good for having small differences between layouts that you want to use, or simply if you have mutliple UI settings saved :P


2) An easier solution for this specific problem would be the following:

In the specific panel that you want to change color based in class, go to scripts, and then go to OnLoad. Paste the following code in there:
Code:

local _, class = UnitClass("player");
        if class == "WARRIOR" then
        self:SetBackdropColor(0.95, 0.23, 0.23, 0.00)
        elseif class == "PRIEST" then
        self:SetBackdropColor(1, 0.96, 0.98, 0.00)
        elseif class == "MAGE" then
        self:SetBackdropColor(0.00, 1, 1, 0.00)
        elseif class == "DRUID" then
        self:SetBackdropColor(1, 0.49, 0.04, 0.00)
        elseif class == "PALADIN" then
        self:SetBackdropColor(0.92, 0.22, 0.46, 0.00)
        elseif class == "HUNTER" then
        self:SetBackdropColor(0.33, 0.86, 0.00, 0.00)
        elseif class == "ROGUE" then
        self:SetBackdropColor(1, 0.94, 0.16, 0.00)
        elseif class == "SHAMAN" then
        self:SetBackdropColor(0.13, 0.42, 1, 0.00)
        elseif class == "WARLOCK" then
        self:SetBackdropColor(0.36, 0.18, 1, 0.00)
        end

And edit to the colors you want to use (the codes here are the class colors). The format is (R, G, B, A). I suppose you know what RGB is, and the A is alpha :)

I hope this answers your question.

Mordaki987 11-20-08 10:04 AM

I got it now thanks to your answer it was just a matter of exporting the layout of that panels i was using then importing the layout as a new layout and switching the colors to what i wanted. your answer was very helpful in figuring it out so thank you for the assistance you were able to provide

Psoewish 11-20-08 10:07 AM

*slaps self on head*

Yeah ... exporting and importing is indeed a much easier way to do it! :D

p3lim 11-20-08 10:34 AM

Quote:

Originally Posted by Psoewish (Post 109892)
You should be able to create a new layout, then create the panels you want, and copy the layout of the specific panel you need to the newly created one.

Example to clarify:

I have a layout named "example1", this layout holds all my panels for my Death Knight in red.

Now if I want to have the exact same layout for my Priest, but with different colors, there are 2 things I can do. The first one is more to answer your question in general, the second is an answer specific to this question (having different colors for different classes)

1) I would then create a new layout and call it "example2". Under panels create a new panel, and then go to the options of that panel you just created. There should be 2 dropdown menus at the top now. One to choose wich settings you want to copy, the second to choose what panel you wish to copy the settings from. So if I would have for example a left chatbox panel, I would select "all" from the first dropdown menu, and "leftchatbox" from the right one. This will copy all settings between the panels, and then you can modify the colors for that panel for that layout, while the other one will be intact.

I know it sounds quite complicated, but just read it while being in the kgpanels config window and you'll be able to figure it out I think. :)

This solution is good for having small differences between layouts that you want to use, or simply if you have mutliple UI settings saved :P


2) An easier solution for this specific problem would be the following:

In the specific panel that you want to change color based in class, go to scripts, and then go to OnLoad. Paste the following code in there:
Code:

local _, class = UnitClass("player");
        if class == "WARRIOR" then
        self:SetBackdropColor(0.95, 0.23, 0.23, 0.00)
        elseif class == "PRIEST" then
        self:SetBackdropColor(1, 0.96, 0.98, 0.00)
        elseif class == "MAGE" then
        self:SetBackdropColor(0.00, 1, 1, 0.00)
        elseif class == "DRUID" then
        self:SetBackdropColor(1, 0.49, 0.04, 0.00)
        elseif class == "PALADIN" then
        self:SetBackdropColor(0.92, 0.22, 0.46, 0.00)
        elseif class == "HUNTER" then
        self:SetBackdropColor(0.33, 0.86, 0.00, 0.00)
        elseif class == "ROGUE" then
        self:SetBackdropColor(1, 0.94, 0.16, 0.00)
        elseif class == "SHAMAN" then
        self:SetBackdropColor(0.13, 0.42, 1, 0.00)
        elseif class == "WARLOCK" then
        self:SetBackdropColor(0.36, 0.18, 1, 0.00)
        end

And edit to the colors you want to use (the codes here are the class colors). The format is (R, G, B, A). I suppose you know what RGB is, and the A is alpha :)

I hope this answers your question.

If you want to use the default raid class colors, you can use the following code instead
Code:

local _, rclass = UnitClass('player')
local color = RAID_CLASS_COLORS[rclass]
self:SetBackdropColor(color.r, color.g, color.b)



All times are GMT -6. The time now is 09:25 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI