Thread Tools Display Modes
Prev Previous Post   Next Post Next
03-06-10, 09:38 AM   #1
Thalyra
A Deviate Faerie Dragon
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 13
changing hotkey color

hello,

i made a script to change the hotkey color of my bartender buttons

the script is in kgpanels with "OnLoad", it works when i click on "Accept" in the KgPanels configuration menu, but when i reload my UI or relog, it doesnt work

the script (shortened):

class = UnitClass("player")
local r,g,b = 0,0,0

if class == "Krieger" or class == "Kriegerin" or class == "Warrior" then
r,g,b = 0.78,0.61,0.43
elseif class == "Priester" or class == "Priesterin" or class == "Priest" then
r,g,b = 1,1,1
.... (other classes)
end

BT4Button1.hotkey:SetVertexColor(r,g,b,1)
BT4Button2.hotkey:SetVertexColor(r,g,b,1)
.... (other buttons)
BT4Button70.hotkey:SetVertexColor(r,g,b,1)
BT4Button71.hotkey:SetVertexColor(r,g,b,1)
does anyone know how i can fix this script, so it works on UI reload etc?

Thalyra
  Reply With Quote
 

WoWInterface » Developer Discussions » Lua/XML Help » changing hotkey color


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