I was browsing UIs when I came across LUI, which does something interesting with Quartz--it uses a kgpanels script to set the Latency indicator color to your class color. "Cool," I thought. "I want to adapt that to set the whole bar the class color."
So here's what I have in my kgpanels script, adapted from the LUI compilation:
Code:
local class = UnitClass("player")
lagVertexColor = {RAID_CLASS_COLORS[class].r, RAID_CLASS_COLORS[class].g, RAID_CLASS_COLORS[class].b, 1}
local db = Quartz:AcquireDBNamespace("Latency")
db.profile.lagcolor=lagVertexColor
db.profile.lagalpha=1
Quartz.ApplySettings()
This works just fine--it changes the LATENCY indicator color as intended.
Now, I'm not all that incredible with scripting just yet, but I poked around Quartz's code to see how I could change this to change castingcolor (the variable name for the regular casting bar color). I can't figure it out. It doesn't seem to be working with the AcquireDBNamespace, because this particular variable is NOT stored in any particular namespace at all in the SavedVariables. So, I'm stumped and would really appreciate if I could get a bit of help.
Teach a lady to fish and all that.
Thanks in advance.