Quartz - setting castingcolor externally. How?
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") 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. |
Code:
local class = UnitClass("player") edit: on second thought, maybe not... After looking around in Quartz's code, it appears that there are no color options for the player cast bar at all. (ie. the Quartz_Latency addon has a color variable, but Quartz_Player does not). |
Thanks! Sadly, no. There is no such variable as playercolor in Quartz.
Here is how the player cast bar is colored in Quartz's Player.lua: Code:
castBar:SetStatusBarColor(unpack(Quartz.db.profile.castingcolor)) Edit: To show what I mean about castingcolor not being defined under a namespace, here's a very abbreviated sampling of the SavedVariables-- Code:
QuartzDB = { |
As a coder, but not LUA capable or having a copy of Quartz's code to look at, instead of using AcquireDBNamespace, what about AcquireDBProfile("Player")?
|
Tried it and a bunch of variations. Nothing. I don't believe the function exists. Thanks for the shot in the dark, at any rate! :)
Edit: Problem solved. On a whim, I decided to try deleting the AcquireDBNamespace bit altogether and just tried Quartz.db.profiles.castingcolor = my variable. It worked. I'm not sure if there's any particular downside to doing it this way--by all means, yell as me if it's going to break wow--but it seems I fixed it. :) Thanks to Marroc and harrellj for offering opinions! |
All times are GMT -6. The time now is 10:02 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI