Thread Tools Display Modes
02-22-11, 05:43 PM   #1
sacrife
An Onyxian Warder
 
sacrife's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2009
Posts: 384
Changing DK Rune colors.

I cant seem to change the colors for my runes. I tried SetStatusBarColor like my other class bars, but nothing changes.

I really dislike the default colors and I want to change them.

Any ideas?

lua Code:
  1. if playerClass =="DEATHKNIGHT" then
  2.             self.Runes = CreateFrame("Frame", nil, self)                   
  3.             for i = 1, 6 do
  4.                 self.Runes[i] = CreateFrame("StatusBar", self:GetName().."_Runes"..i, self)
  5.                 self.Runes[i]:SetHeight(cfg.ClassBarHeight)
  6.                 self.Runes[i]:SetWidth((cfg.widthCB - 5) / 6)
  7.                 if (i == 1) then
  8.                     self.Runes[i]:SetPoint("TOPLEFT", self, "TOPLEFT", -1, 1)
  9.                 else
  10.                     self.Runes[i]:SetPoint("TOPLEFT", self.Runes[i-1], "TOPRIGHT", 1, 0)
  11.                 end
  12.                 self.Runes[i]:SetStatusBarTexture(cfg.HPtex)
  13.  
  14.                 self.Runes[i].bg = self.Runes[i]:CreateTexture(nil, "BORDER")
  15.                 self.Runes[i].bg:SetPoint("TOPLEFT", self.Runes[i], "TOPLEFT", -0, 0)
  16.                 self.Runes[i].bg:SetPoint("BOTTOMRIGHT", self.Runes[i], "BOTTOMRIGHT", 0, -0)              
  17.                 self.Runes[i].bg:SetTexture(cfg.Itex)
  18.                 self.Runes[i].bg.multiplier = 0.2
  19.                
  20.                 self.RunesBorder = CreateFrame("Frame", nil, self)
  21.                 self.RunesBorder:SetPoint("TOPLEFT", self.Runes[i], "TOPLEFT", -1, 1)
  22.                 self.RunesBorder:SetPoint("BOTTOMRIGHT", self.Runes[i], "BOTTOMRIGHT", 1, -1)                  
  23.                 self.RunesBorder:SetBackdrop(backdrop)
  24.                 self.RunesBorder:SetBackdropColor(unpack(cfg.backdropcolor))
  25.                 self.RunesBorder:SetBackdropBorderColor(unpack(cfg.brdcolor))  
  26.                 self.RunesBorder:SetFrameLevel(0)  
  27.             end
  28.         end
__________________

  Reply With Quote
02-22-11, 06:00 PM   #2
tecu
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Apr 2006
Posts: 30
oUF.colors.runes = {
{1, 0, 0};
{0, .5, 0};
{0, 1, 1};
{.9, .1, 1};
}
  Reply With Quote
02-23-11, 12:04 PM   #3
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
or you can play nicely with other layouts and do:
Lua Code:
  1. local colors = setmetatable({
  2.     runes = setmetatable({
  3.         -- your colors.
  4.     }, {__index = oUF.colors.runes}),
  5. }, {__index = oUF.colors})
  6.  
  7. -- in the style function:
  8.     self.colors = colors
__________________
「貴方は1人じゃないよ」
  Reply With Quote

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » Changing DK Rune colors.


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