I've begun working on an AddOn based off of StunWatch for Warlock spells and I'm in the process of working on the XML file for it. I've got a couple questions about calling functions and also about Positions/Offsets.
I am making 3 sets of bars (DoTs, Curses, and Misc) and for each set there are X amount of bars. When I looked at StunWatch's XML file, the code for each bar was something like:
Let's say I have 12 DoT bars, is there a way to use a function for the OnShow event that has an arguement? I'm trying to minimize repetition of code so I'm wanting to do something like:
Where X is the bar I'm triggering. Is this possible?
Also, I'm wanting to make a background border for each set of bars (to help keep them organized). So will I need to create 3 bar templates and anchor the corresponding bar to that template? Or is there a way to create a background frame (similar to Necrosis's Spell Timer background) for each set?
Finally, in relation to offsets, are they based off of the current position of the parent frame or is it based off of the X/Y point on the screen?
Thanx in advance,
Edit: Notice I posted this in the wrong section. Sorry about that.