Alright, first off here's a ss of my ui might help you get an idea of what i'm talking about
http://i.imgur.com/hEXPl.jpg
Also, I'm not great with LUA or very familiar with the WoW api and what not, my background is in C++ and PHP, so I'm learning as I go here.
First off, I have borders around my player and target unit frames (PitBull4) these borders are created with kgPanels and the PitBull4 borders option. The borders on my target in PitBull change color based on the classification of my target, grey for normal, silver(light/grey) for rare, yellow for elite and purple for boss. Well I managed to create a script for kgPanels that changes the borders I've created with kgPanels to match the classification, the only problem is these borders update a lot slower than the player frame and they don't change to purple when switching to a boss.
Queston #1
So for my OnLoad registerevents should I be registering anything else? Is this just a delay in kgPanels, any suggestions?
OnLoad
Code:
self:RegisterEvent("UNIT_TARGET")
OnEvent
Code:
local cl = UnitClassification("target")
if cl == "worldboss" then
self:SetBackdropBorderColor(0.6, 0.3, 0.6)
elseif cl == "elite" then
self:SetBackdropBorderColor(1, 1, 0)
elseif (cl == "rare") or (cl == "rareelite") then
self:SetBackdropBorderColor(0.7, 0.7, 0.7)
else
self:SetBackdropBorderColor(0.47, 0.47, 0.47)
end
What do I need to add to help this script determine that my target is a boss and effectively change the color to the proper purple of the first condition in the if statement?
Question #2
I was wondering how to make simple tooltips, I have 3 buttons currently, and more to come (you can see them in the upper right just right of the xp/rep bar) and I'd like to give them tool tips, they are also created with kgPanels. any suggestions?
Question #3
I have a kgPanel frame that is the backdrop to my chat frame, I would like it to become invisible when text fades from the currently visible chat frame. I'm not sure if there's any easy way to do this or if it's going to be a big pain in the but using a whole bunch of guessing and a "RegisterEvent("CHAT_MSG") OnLoad. Ideally I'd like the frame to size itself to the number of lines of chat that are currently visible but that could be a lot harder than I'm hoping, so for now a hide when empty script would be fantastic.