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