oUF

99.9k Downloads

Missing element: EclipseBar

haste opened this issue ยท 12 comments

commented
commented

The default EclipseBar display is quite a complex beast, and I've been trying to think of a simpler solution.

The default display has an icon that moves position dependant upon the lunar/solar power. This gives a visual representation of the current power situation.
A possibly neater solution would be to use 2 statusbars, one for solar power and the other for lunar power. As the power situation changes then the statusbars can shrink/grow to give a visual representation of this situation.

The default display maintains a fontstring to display the absolute power value, and this can be maintained within the oUF element.

A tricky part comes with feedback when max solar/lunar power is reached and the player gains the buff. I've been thinking of having the backdrop for the bars change colour, but as the relevant bar would be of width 0 at that point it does not make much sense.
So, having a container frame to hold the statusbars may be required. The visual feedback of the solar/lunar buff could be shown by changing the colour of the container frame.

So, in summary the EclipseBar element would contain the following items:

self.EclipseBar - a frame that changes colour to show the solar/lunar buffs
self.EclipseBar.lunarBar - statusbar indicating lunar power
self.EclipseBar.solarBar - statusbar indicating solar power
self.EclipseBar.text - fontstring indicating absolute power value

I am not 100% keen on changing the colour on self.EclipseBar, but I'm struggling to decide on any better solutions.
What does everyone else think of this solution?

commented

I'll have to check out how the Blizzard element actually works, but to me it sounds like textures are the way to go. It might just be me misunderstanding how it currently works tho'.

commented

self.EclipseBar.text shouldn't be done by the element if we don't have to (like with the castbar). Providing a tag would be a lot better if we can.

You also have to remember that we can't grow statusbars from right to left, without implementing this through textures. It might be worth doing as people commonly want it tho'.

Not entirely sure what the best solution for this element would be myself.

commented

I think we can do it quite nicely by anchoring the 2nd statusbar to the texture of the 1st statusbar.

It'll require a bit of logic to calculate the values so that the width of (bar1 + bar2) is constant, but it should work.

commented

I've had a go at this, and managed to get a basic implementation going. Layout config is a bit horrible so that could be improved.

Still need to think about how to add indication of gaining solar/lunar buff, and some other stuff (e.g. checking the statusbars have textures)

element : http://gist.github.com/572516
layout : http://gist.github.com/572510

I'd prefer not to commit this until it is more feature complete, but please comment on anything you see that needs improving.

commented

I've taken another stab at the eclipsebar element and split the functionality into a couple of different update routines. This means that there is no override funcionality (similar to the castbar element), but hopefully the default functionality should suffice.

There is no direct action taken for when the player gains/loses the lunar or solar buffs, but by adding their own PostUnitAura function then they can define their own update.

Have a look here and please comment if there is anything you don't like : http://gist.github.com/611986

commented

merged. I'm not entirely satisfied, but... I don't play a druid so what do I know :P

I also made some changes.

commented

My main concern is over the layout code required, but I'm not sure how to simplify it without containing the statusbar creation within the element itself. (something you have moved away from in other elements, like runebar)

At least there is something people can use when the patch hits this week. Lets see if anyone else can come up with some nice suggestions...

commented

My main concern is really that the blizzard solution seems more "sane", but it's also much more limited. Your last version was a big improvement however, so I decided to use and just see what people suggest in the future.

commented

Something nice would be to have .Spark object just like the Castbar. It would make it easier to see the actual status of the Eclipse bar, nothing important, but just suggesting. :)

commented

I would prefer a ">" or "<" instead of the spark texture. I suppose the spark could be replaced with a custom texture to accommodate this.

commented

OK, I've added some more functionality. There is now enough in here that I believe it could be included in the oUF core.

format-patch : http://gist.github.com/574496

Unfortunately configuring the layout is horrible, and I can foresee many people struggling to get this working in their layout.
Here is the function I use for my layout, it should hopefully be close enough to what the majority of users would want to implement.
http://gist.github.com/574495