Thread Tools Display Modes
10-14-12, 07:02 AM   #1
Aryae
A Fallenroot Satyr
Join Date: Oct 2010
Posts: 24
Question KG Panels Script, color changes based on DK presence?

Title pretty much sums it up, I've searched the internet for any sample script or how to do this and didn't find much. All I really want to do is have the colors of a panel changed based on my DK's presence. Red for Blood, Green for Unholy, Blue for Frost etc. I'll keep trying to sweet talk Google into finding it for me, but figured I should post before the end of the day in case I couldn't find it. ><
  Reply With Quote
10-15-12, 03:30 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
OnLoad:
Code:
self.colors = {
    [1] = { r = 0.6, g = 0, b = 0 },
    [2] = { r = 0, g = 0.5, b = 1 },
    [3] = { r = 0.5, g = 0.8, b = 0 },
}
self:RegisterEvent("UPDATE_SHAPESHIFT_FORM")

local color = self.colors[GetShapeshiftForm()]
self:SetBackdropColor(color.r, color.g, color.b)
OnEvent:
Code:
local color = self.colors[GetShapeshiftForm()]
self:SetBackdropColor(color.r, color.g, color.b)
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote
10-15-12, 02:13 PM   #3
Aryae
A Fallenroot Satyr
Join Date: Oct 2010
Posts: 24
Works perfectly! Thank you very much
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » KG Panels Script, color changes based on DK presence?


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